diff --git a/.circleci/config.yml b/.circleci/config.yml index 6dea00897a6..a91579ae94d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,7 +36,7 @@ jobs: sudo apt-get install -y rsync ninja-build ccache sudo pip install --upgrade pip sudo pip install scikit-ci-addons - ci_addons circle/install_cmake.py 3.7.2 + ci_addons circle/install_cmake.py 3.8.2 - run: name: CCache initialization command: | diff --git a/CMake/ITKModuleAPI.cmake b/CMake/ITKModuleAPI.cmake index 9f276a8dff0..af64d96dc54 100644 --- a/CMake/ITKModuleAPI.cmake +++ b/CMake/ITKModuleAPI.cmake @@ -1,5 +1,3 @@ - - #----------------------------------------------------------------------------- # Private helper macros. @@ -19,6 +17,13 @@ macro(_itk_module_use_recurse mod) endif() endmacro() +# _itk_module_config_recurse( ) +# +# Internal macro to recursively load module information into the supplied +# namespace, this is called from itk_module_config. It should be noted that +# _${ns}_${mod}_USED must be cleared if this macro is to work correctly on +# subsequent invocations. The macro will load the module files using the +# itk_module_load, making all of its variables available in the local scope. macro(_itk_module_config_recurse ns mod) if(NOT _${ns}_${mod}_USED) set(_${ns}_${mod}_USED 1) diff --git a/CMake/ITKModuleRemote.cmake b/CMake/ITKModuleRemote.cmake index 769ee26d44d..e3affa7f61b 100644 --- a/CMake/ITKModuleRemote.cmake +++ b/CMake/ITKModuleRemote.cmake @@ -126,6 +126,7 @@ function(itk_fetch_module _name _description) option(Module_${_name} "${_description}" OFF) mark_as_advanced(Module_${_name}) + # Fetch_$_remote_module} is deprecated. To maintain backward compatibility: if(Fetch_${_name}) message(WARNING "Fetch_${_name} is deprecated, please use Module_${_name} to download and enable the remote module.") @@ -136,6 +137,7 @@ function(itk_fetch_module _name _description) itk_download_attempt_check(Module_${_name}) include(CMakeParseArguments) cmake_parse_arguments(_fetch_options "" "GIT_REPOSITORY;GIT_TAG" "" ${ARGN}) + find_package(Git) if(NOT GIT_EXECUTABLE) message(FATAL_ERROR "error: could not find git for clone of ${_name}") endif() diff --git a/CMake/itkApple.cmake b/CMake/itkApple.cmake new file mode 100644 index 00000000000..e822d812379 --- /dev/null +++ b/CMake/itkApple.cmake @@ -0,0 +1,19 @@ +# Objective-C++ compile flags. +# CMake has no equivalent of CMAKE_CXX_FLAGS for Objective-C++ (bug #4756) +# so we provide this in case the user needs to specify flags specifically +# for Objective-C++ source files. For example, to build with garbage +# collection support, the -fobjc-gc flag would be used. +set(ITK_OBJCXX_FLAGS_DEFAULT "") +set(ITK_REQUIRED_OBJCXX_FLAGS ${ITK_OBJCXX_FLAGS_DEFAULT} CACHE STRING "Extra flags for Objective-C++ compilation") +mark_as_advanced(ITK_REQUIRED_OBJCXX_FLAGS) + +mark_as_advanced( + CMAKE_OSX_ARCHITECTURES + CMAKE_OSX_DEPLOYMENT_TARGET + CMAKE_OSX_SYSROOT) + +# OSX SDK 10.6 is the standard SDK for Python +if (CMAKE_OSX_DEPLOYMENT_TARGET AND + CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.6") + message(FATAL_ERROR "Minimum OS X deployment target is 10.6, please update CMAKE_OSX_DEPLOYMENT_TARGET.") +endif () diff --git a/CMake/itkCompilerChecks.cmake b/CMake/itkCompilerChecks.cmake new file mode 100644 index 00000000000..992a906a6e6 --- /dev/null +++ b/CMake/itkCompilerChecks.cmake @@ -0,0 +1,45 @@ +# Minimum compiler version check: GCC >= 4.8 +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND + CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) + message(FATAL_ERROR "GCC 4.8 or later is required.") +endif () + +# Minimum compiler version check: LLVM Clang >= 3.3 +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND + CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.3) + message(FATAL_ERROR "LLVM Clang 3.3 or later is required.") +endif () + +# Minimum compiler version check: Apple Clang >= 5.0 (Xcode 5.0) +if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND + CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) + message(FATAL_ERROR "Apple Clang 5.0 or later is required.") +endif () + +# Minimum compiler version check: Microsoft C/C++ >= 18.0 (aka VS 2013 aka VS 12.0) +if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND + CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0) + message(FATAL_ERROR "Microsoft Visual Studio 2013 or later is required.") +endif () + +# Minimum compiler version check: Intel C++ (ICC) >= 14 +if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND + CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0) + message(FATAL_ERROR "Intel C++ (ICC) 14.0 or later is required.") +endif () + +# Make sure we have C++11 enabled. +if(NOT ITK_IGNORE_CMAKE_CXX11_CHECKS) + # Needed to make sure libraries and executables not built by the + # itkModuleMacros still have the C++11 compiler flags enabled + # Wrap this in an escape hatch for unknown compilers + if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 11) # Supported values are ``11``, ``14``, and ``17``. + endif() + if(NOT CMAKE_CXX_STANDARD_REQUIRED) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + endif() + if(NOT CMAKE_CXX_EXTENSIONS) + set(CMAKE_CXX_EXTENSIONS OFF) + endif() +endif() diff --git a/CMake/itkSupportMacros.cmake b/CMake/itkSupportMacros.cmake new file mode 100644 index 00000000000..34c3913afbb --- /dev/null +++ b/CMake/itkSupportMacros.cmake @@ -0,0 +1,30 @@ +macro (itk_set_with_default var value) + if (NOT ${var}) + set(${var} "${value}") + endif () +endmacro () + +# Bridge an old, deprecated, setting to a new replacement setting. +# +# Use this function when a user-visible flag is being renamed or otherwise +# replaced. If the old value is set, it will be given as the default value, +# otherwise the given default value will be used. This returned value should +# then be used in the ``set(CACHE)`` or ``option()`` call for the new value. +# +# If the old value is set, it will warn that it is deprecated for the new name. +# +# If replacing the setting ``OLD_SETTING`` with ``NEW_SETTING``, its usage +# would look like: +# +# itk_deprecated_setting(default_setting NEW_SETTING OLD_SETTING "default value") +# set(NEW_SETTING "${default_setting}" +# CACHE STRING "Documentation for the setting.") +function (itk_deprecated_setting output_default new old intended_default) + set(default "${intended_default}") + if (DEFINED "${old}") + message(WARNING "The '${old}' variable is deprecated for '${new}'.") + set(default "${${old}}") + endif () + + set("${output_default}" "${default}" PARENT_SCOPE) +endfunction () diff --git a/CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake b/CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake index 533af511ee6..cda945f33b0 100644 --- a/CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake +++ b/CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake @@ -57,8 +57,12 @@ add_library(foo SHARED \"foo.c\") extern int bar(void); int foo(void) {return bar()+1;} ") - # ITK requires CMake >= 2.8.12. Before that, on APPLE, no flag should be passed. - set( _rpath_arg "-DCMAKE_MACOSX_RPATH='${CMAKE_MACOSX_RPATH}'" ) + # APPLE: the CMAKE_MACOSX_RPATH flag should be passed. + if(APPLE) + set( _rpath_arg "-DCMAKE_MACOSX_RPATH='${CMAKE_MACOSX_RPATH}'" ) + else() + set( _rpath_arg ) + endif() try_compile(${VARIABLE} "${test_project_dir}" diff --git a/CMake/itkVersion.cmake b/CMake/itkVersion.cmake new file mode 100644 index 00000000000..28b5fd3e8f6 --- /dev/null +++ b/CMake/itkVersion.cmake @@ -0,0 +1,4 @@ +# ITK version number components. +set(ITK_VERSION_MAJOR "5") +set(ITK_VERSION_MINOR "0") +set(ITK_VERSION_PATCH "0") diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c61ce0ef00..562895688f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,20 +1,23 @@ -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) - -foreach(p - CMP0025 # CMake 3.0 - CMP0028 - CMP0042 # CMake 3.0 - CMP0054 # CMake 3.1 - CMP0056 # CMake 3.2 - CMP0058 # CMake 3.3 - CMP0063 # CMake 3.3.2 - ) - if(POLICY ${p}) - cmake_policy(SET ${p} NEW) - endif() -endforeach() +cmake_minimum_required(VERSION 3.8.2 FATAL_ERROR) +if(CMAKE_CXX_STANDARD EQUAL "98" ) + MESSAGE(FATAL_ERROR "CMAKE_CXX_STANDARD:STRING=98 is not supported in ITK version 5 and greater.") +endif() project(ITK NONE) + +set(ITK_CMAKE_DIR "${ITK_SOURCE_DIR}/CMake") +set(CMAKE_MODULE_PATH ${ITK_CMAKE_DIR} ${CMAKE_MODULE_PATH}) + +if (APPLE) + include(itkApple) +endif () + +include(itkCompilerChecks) +include(itkVersion) +set(ITK_VERSION + "${ITK_MAJOR_VERSION}.${ITK_MINOR_VERSION}.${ITK_BUILD_VERSION}") +include(itkSupportMacros) + # Configure CMake variables that will be used in the module macros # ITK_USE_FILE is used when a remote module includes an example directory # that can be configured as an independent project. @@ -79,8 +82,6 @@ endif() include(CTest) mark_as_advanced(CLEAR BUILD_TESTING) -set(ITK_CMAKE_DIR ${ITK_SOURCE_DIR}/CMake) -set(CMAKE_MODULE_PATH ${ITK_CMAKE_DIR} ${CMAKE_MODULE_PATH}) include(ITKDownloadSetup) include(PreventInSourceBuilds) include(PreventInBuildInstalls) @@ -93,10 +94,6 @@ include(itkCheckSourceTree) set(main_project_name ${_ITKModuleMacros_DEFAULT_LABEL}) #----------------------------------------------------------------------------- -# ITK version number. -set(ITK_VERSION_MAJOR "5") -set(ITK_VERSION_MINOR "0") -set(ITK_VERSION_PATCH "0") configure_file(CMake/ITKConfigVersion.cmake.in ITKConfigVersion.cmake @ONLY) if(NOT ITK_INSTALL_RUNTIME_DIR) diff --git a/Examples/DataRepresentation/Mesh/Mesh2.cxx b/Examples/DataRepresentation/Mesh/Mesh2.cxx index bef74a90fcf..c0426132a39 100644 --- a/Examples/DataRepresentation/Mesh/Mesh2.cxx +++ b/Examples/DataRepresentation/Mesh/Mesh2.cxx @@ -315,7 +315,7 @@ int main(int, char *[]) { MeshType::CellType * cellptr = cellIterator.Value(); LineType * line = dynamic_cast( cellptr ); - if(line == ITK_NULLPTR) + if(line == nullptr) { continue; } diff --git a/Examples/DataRepresentation/Mesh/MeshCellVisitor2.cxx b/Examples/DataRepresentation/Mesh/MeshCellVisitor2.cxx index 47dbe16cfe4..69b3abab2ac 100644 --- a/Examples/DataRepresentation/Mesh/MeshCellVisitor2.cxx +++ b/Examples/DataRepresentation/Mesh/MeshCellVisitor2.cxx @@ -120,7 +120,7 @@ class CustomVertexVisitor class CustomLineVisitor { public: - CustomLineVisitor():m_Mesh( 0 ) {} + CustomLineVisitor():m_Mesh( nullptr ) {} virtual ~CustomLineVisitor() {} void SetMesh( MeshType * mesh ) { m_Mesh = mesh; } diff --git a/Examples/Filtering/CompositeFilterExample.cxx b/Examples/Filtering/CompositeFilterExample.cxx index ee1232d8672..c192d92cca3 100644 --- a/Examples/Filtering/CompositeFilterExample.cxx +++ b/Examples/Filtering/CompositeFilterExample.cxx @@ -122,10 +122,10 @@ class CompositeExampleImageFilter : typedef RescaleIntensityImageFilter< ImageType, ImageType > RescalerType; // Software Guide : EndCodeSnippet - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Display */ - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CompositeExampleImageFilter); diff --git a/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx b/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx index b4edc76dab8..a21b1ff8eab 100644 --- a/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx +++ b/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx @@ -75,8 +75,8 @@ void usage() int main( int argc, char *argv[] ) { - char *input_name = ITK_NULLPTR; - char *output_name = ITK_NULLPTR; + char *input_name = nullptr; + char *output_name = nullptr; bool ok; bool verbose = false; @@ -232,7 +232,7 @@ int main( int argc, char *argv[] ) if (ok == false) { - if (input_name == ITK_NULLPTR) + if (input_name == nullptr) { input_name = argv[1]; argc--; diff --git a/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx b/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx index fd45d8f543e..86b84266ae7 100644 --- a/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx +++ b/Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx @@ -39,7 +39,7 @@ #include "itkNumericTraits.h" #include -#include +#include int main( int argc, char * argv[] ) { diff --git a/Examples/Filtering/ScaleSpaceGenerator2D.cxx b/Examples/Filtering/ScaleSpaceGenerator2D.cxx index 201eddc5334..9a9b0a9594b 100644 --- a/Examples/Filtering/ScaleSpaceGenerator2D.cxx +++ b/Examples/Filtering/ScaleSpaceGenerator2D.cxx @@ -29,7 +29,7 @@ #include "itkImageFileWriter.h" #include "itkLaplacianRecursiveGaussianImageFilter.h" -#include +#include #include int main( int argc, char * argv[] ) diff --git a/Examples/IO/XML/DOMFindDemo.cxx b/Examples/IO/XML/DOMFindDemo.cxx index 7d8dd907dc7..5f5f2e06cf7 100644 --- a/Examples/IO/XML/DOMFindDemo.cxx +++ b/Examples/IO/XML/DOMFindDemo.cxx @@ -68,7 +68,7 @@ int main( int argc, char* argv[] ) { std::cout << "query = \"" << query << "\"" << std::endl; itk::DOMNode::Pointer dom2 = dom1->Find( query ); - if ( (itk::DOMNode*)dom2 == 0 ) + if ( (itk::DOMNode*)dom2 == nullptr ) { std::cout << "invalid query!" << std::endl; } diff --git a/Examples/IO/XML/itkParticleSwarmOptimizerDOMReader.cxx b/Examples/IO/XML/itkParticleSwarmOptimizerDOMReader.cxx index 6d2889a0a48..44f0a2babc8 100644 --- a/Examples/IO/XML/itkParticleSwarmOptimizerDOMReader.cxx +++ b/Examples/IO/XML/itkParticleSwarmOptimizerDOMReader.cxx @@ -31,7 +31,7 @@ ParticleSwarmOptimizerDOMReader::GenerateData( const DOMNodeType* inputdom, cons LoggerType* logger = this->GetLogger(); OutputType* output = this->GetOutput(); - if ( output == ITK_NULLPTR ) + if ( output == nullptr ) { logger->Info( "creating the output PSO object ...\n" ); OutputType::Pointer object = OutputType::New(); diff --git a/Examples/IO/XML/itkParticleSwarmOptimizerDOMReader.h b/Examples/IO/XML/itkParticleSwarmOptimizerDOMReader.h index cb625713c5a..23f2df735a4 100644 --- a/Examples/IO/XML/itkParticleSwarmOptimizerDOMReader.h +++ b/Examples/IO/XML/itkParticleSwarmOptimizerDOMReader.h @@ -57,7 +57,7 @@ class ParticleSwarmOptimizerDOMReader : public DOMReader * This function is called automatically when update functions are performed. * It should fill the contents of the output object by pulling information from the intermediate DOM object. */ - virtual void GenerateData( const DOMNodeType* inputdom, const void* ) ITK_OVERRIDE; + void GenerateData( const DOMNodeType* inputdom, const void* ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ParticleSwarmOptimizerDOMReader); diff --git a/Examples/IO/XML/itkParticleSwarmOptimizerDOMWriter.h b/Examples/IO/XML/itkParticleSwarmOptimizerDOMWriter.h index 99255c8d552..3a31bdf9888 100644 --- a/Examples/IO/XML/itkParticleSwarmOptimizerDOMWriter.h +++ b/Examples/IO/XML/itkParticleSwarmOptimizerDOMWriter.h @@ -57,7 +57,7 @@ class ParticleSwarmOptimizerDOMWriter : public DOMWriter * This function is called automatically when update functions are performed. * It should fill the contents of the intermediate DOM object by pulling information from the input object. */ - virtual void GenerateData( DOMNodeType* outputdom, const void* ) const ITK_OVERRIDE; + void GenerateData( DOMNodeType* outputdom, const void* ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ParticleSwarmOptimizerDOMWriter); diff --git a/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx b/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx index a975159b846..456e84c7d40 100644 --- a/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx +++ b/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx @@ -49,10 +49,10 @@ void ParticleSwarmOptimizerSAXReader::StartElement( const char* name, const char } else if ( itksys::SystemTools::Strucmp( name, "bound" ) == 0 && this->ContextIs( "/optimizer" ) ) { - std::vector* bound = 0; + std::vector* bound = nullptr; const char* id = this->GetAttribute( atts, "id" ); - if ( id == 0 ) + if ( id == nullptr ) { itkExceptionMacro( "Bound ID is missing!\n" ); } @@ -156,7 +156,7 @@ int ParticleSwarmOptimizerSAXReader::ReadFile() throw e; } - if ( this->m_OutputObject == 0 ) + if ( this->m_OutputObject == nullptr ) { itkExceptionMacro( "Object to be read is null!\n" ); } @@ -178,7 +178,7 @@ int ParticleSwarmOptimizerSAXReader::ReadFile() void ParticleSwarmOptimizerSAXReader::ProcessOptimizerAttributes( const char** atts, ParticleSwarmOptimizer* opt ) { // go over all the attribute-value pairs - for ( size_t i = 0; atts[i] != 0; i += 2 ) + for ( size_t i = 0; atts[i] != nullptr; i += 2 ) { if ( itksys::SystemTools::Strucmp( atts[i], "NumberOfParticles" ) == 0 ) { @@ -236,7 +236,7 @@ void ParticleSwarmOptimizerSAXReader::ProcessOptimizerAttributes( const char** a void ParticleSwarmOptimizerSAXReader::ProcessBoundAttributes( const char** atts, std::vector& bound ) { // go over all the attribute-value pairs - for ( size_t i = 0; atts[i] != 0; i += 2 ) + for ( size_t i = 0; atts[i] != nullptr; i += 2 ) { if ( itksys::SystemTools::Strucmp( atts[i], "value" ) == 0 ) { @@ -260,14 +260,14 @@ void ParticleSwarmOptimizerSAXReader::ProcessBoundAttributes( const char** atts, const char* ParticleSwarmOptimizerSAXReader::GetAttribute( const char** atts, const char* key ) { // go over all the attribute-value pairs - for ( size_t i = 0; atts[i] != 0; i += 2 ) + for ( size_t i = 0; atts[i] != nullptr; i += 2 ) { if ( itksys::SystemTools::Strucmp( atts[i], key ) == 0 ) { return atts[i+1]; } } - return 0; + return nullptr; } /** Check the current tags to see whether it matches a user input. */ diff --git a/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.h b/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.h index 753b421cc49..ade33a27d78 100644 --- a/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.h +++ b/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.h @@ -55,25 +55,25 @@ class ParticleSwarmOptimizerSAXReader : public XMLReader * Virtual method defined in itk::XMLReaderBase. * Check that whether the file with given name is readable. */ - virtual int CanReadFile( const char* name ) ITK_OVERRIDE; + int CanReadFile( const char* name ) override; /** * Virtual method defined in itk::XMLReaderBase. * Called when a new xml tag start is encountered. */ - virtual void StartElement( const char* name, const char** atts ) ITK_OVERRIDE; + void StartElement( const char* name, const char** atts ) override; /** * Virtual method defined in itk::XMLReaderBase. * Called when an xml tag end is encountered. */ - virtual void EndElement( const char* name ) ITK_OVERRIDE; + void EndElement( const char* name ) override; /** * Virtual method defined in itk::XMLReaderBase. * Called when handling character data inside an xml tag. */ - virtual void CharacterDataHandler( const char* inData, int inLength ) ITK_OVERRIDE; + void CharacterDataHandler( const char* inData, int inLength ) override; /** * Method for performing XML reading and output generation. diff --git a/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.cxx b/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.cxx index c4b8b286592..9e034badeb5 100644 --- a/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.cxx +++ b/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.cxx @@ -54,7 +54,7 @@ int ParticleSwarmOptimizerSAXWriter::WriteFile() throw e; } - if ( this->m_InputObject == 0 ) + if ( this->m_InputObject == nullptr ) { itkExceptionMacro( "Object to be written is null!\n" ); } diff --git a/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.h b/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.h index 071279f93f5..8a38ec07fdf 100644 --- a/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.h +++ b/Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.h @@ -52,12 +52,12 @@ class ParticleSwarmOptimizerSAXWriter : public XMLWriterBase +#include // Software Guide : BeginLatex // diff --git a/Examples/Iterators/ShapedNeighborhoodIterators2.cxx b/Examples/Iterators/ShapedNeighborhoodIterators2.cxx index 0793dbf14d2..5f88a2d7b86 100644 --- a/Examples/Iterators/ShapedNeighborhoodIterators2.cxx +++ b/Examples/Iterators/ShapedNeighborhoodIterators2.cxx @@ -27,7 +27,7 @@ #include "itkConstShapedNeighborhoodIterator.h" #include "itkImageRegionIterator.h" #include "itkNeighborhoodAlgorithm.h" -#include +#include int main( int argc, char ** argv ) { diff --git a/Examples/RegistrationITKv4/BSplineWarping1.cxx b/Examples/RegistrationITKv4/BSplineWarping1.cxx index f9a42ad503f..633e8336bac 100644 --- a/Examples/RegistrationITKv4/BSplineWarping1.cxx +++ b/Examples/RegistrationITKv4/BSplineWarping1.cxx @@ -54,12 +54,12 @@ class CommandProgressUpdate : public itk::Command CommandProgressUpdate() {}; public: - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const itk::ProcessObject * filter = static_cast< const itk::ProcessObject * >( object ); if( ! itk::ProgressEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/BSplineWarping2.cxx b/Examples/RegistrationITKv4/BSplineWarping2.cxx index c5aed495a2c..3a0451060c0 100644 --- a/Examples/RegistrationITKv4/BSplineWarping2.cxx +++ b/Examples/RegistrationITKv4/BSplineWarping2.cxx @@ -52,12 +52,12 @@ class CommandProgressUpdate : public itk::Command CommandProgressUpdate() {}; public: - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const itk::ProcessObject * filter = static_cast< const itk::ProcessObject * >( object ); if( ! itk::ProgressEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/DeformableRegistration10.cxx b/Examples/RegistrationITKv4/DeformableRegistration10.cxx index 8416e176ec6..88ae74bfdf6 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration10.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration10.cxx @@ -60,12 +60,12 @@ const unsigned int Dimension = 3; public: - void Execute(itk::Object *caller, const itk::EventObject & event) + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) + void Execute(const itk::Object * object, const itk::EventObject & event) override { const RegistrationFilterType * filter = static_cast< const RegistrationFilterType * >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) diff --git a/Examples/RegistrationITKv4/DeformableRegistration12.cxx b/Examples/RegistrationITKv4/DeformableRegistration12.cxx index a242ff2e133..7945cc30c9e 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration12.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration12.cxx @@ -91,12 +91,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::LBFGSBOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) diff --git a/Examples/RegistrationITKv4/DeformableRegistration13.cxx b/Examples/RegistrationITKv4/DeformableRegistration13.cxx index 1dba96ccbd3..c4194d9b7d0 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration13.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration13.cxx @@ -79,12 +79,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); diff --git a/Examples/RegistrationITKv4/DeformableRegistration14.cxx b/Examples/RegistrationITKv4/DeformableRegistration14.cxx index 0c4d8972575..d71f7e5e64a 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration14.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration14.cxx @@ -77,12 +77,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) diff --git a/Examples/RegistrationITKv4/DeformableRegistration15.cxx b/Examples/RegistrationITKv4/DeformableRegistration15.cxx index 36454916d23..d9c6f9a8399 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration15.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration15.cxx @@ -87,12 +87,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) diff --git a/Examples/RegistrationITKv4/DeformableRegistration16.cxx b/Examples/RegistrationITKv4/DeformableRegistration16.cxx index 0d02d9e013f..d6afcb20a36 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration16.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration16.cxx @@ -131,12 +131,12 @@ class CommandIterationUpdate : public itk::Command public: - void Execute(const itk::Object *, const itk::EventObject & ) ITK_OVERRIDE + void Execute(const itk::Object *, const itk::EventObject & ) override { std::cout << "Warning: The const Execute method shouldn't be called" << std::endl; } - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { RegistrationFilterType * filter = static_cast< RegistrationFilterType * >( caller ); @@ -172,11 +172,11 @@ class CommandResolutionLevelUpdate : public itk::Command CommandResolutionLevelUpdate() {}; public: - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object *, const itk::EventObject & ) ITK_OVERRIDE + void Execute(const itk::Object *, const itk::EventObject & ) override { std::cout << "----------------------------------" << std::endl; RmsCounter = RmsCounter + 1; diff --git a/Examples/RegistrationITKv4/DeformableRegistration17.cxx b/Examples/RegistrationITKv4/DeformableRegistration17.cxx index c4935809caa..7b3a1912156 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration17.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration17.cxx @@ -132,12 +132,12 @@ class CommandIterationUpdate : public itk::Command public: - void Execute(const itk::Object *, const itk::EventObject & ) ITK_OVERRIDE + void Execute(const itk::Object *, const itk::EventObject & ) override { std::cout << "Warning: The const Execute method shouldn't be called" << std::endl; } - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { RegistrationFilterType * filter = static_cast< RegistrationFilterType * >( caller ); @@ -173,11 +173,11 @@ class CommandResolutionLevelUpdate : public itk::Command CommandResolutionLevelUpdate() {}; public: - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object *, const itk::EventObject & ) ITK_OVERRIDE + void Execute(const itk::Object *, const itk::EventObject & ) override { std::cout << "----------------------------------" << std::endl; RmsCounter = RmsCounter + 1; diff --git a/Examples/RegistrationITKv4/DeformableRegistration2.cxx b/Examples/RegistrationITKv4/DeformableRegistration2.cxx index 52a820c89c9..fe144cba7c2 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration2.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration2.cxx @@ -68,12 +68,12 @@ public: - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const RegistrationFilterType * filter = static_cast< const RegistrationFilterType * >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) diff --git a/Examples/RegistrationITKv4/DeformableRegistration3.cxx b/Examples/RegistrationITKv4/DeformableRegistration3.cxx index c227e554e7d..41554b3392a 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration3.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration3.cxx @@ -68,12 +68,12 @@ public: - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const RegistrationFilterType * filter = static_cast< const RegistrationFilterType * >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) diff --git a/Examples/RegistrationITKv4/DeformableRegistration5.cxx b/Examples/RegistrationITKv4/DeformableRegistration5.cxx index d1379dae39c..1769cf714d8 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration5.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration5.cxx @@ -59,15 +59,15 @@ public: - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const RegistrationFilterType * filter = static_cast< const RegistrationFilterType * >( object ); - if(filter == ITK_NULLPTR) + if(filter == nullptr) { return; } diff --git a/Examples/RegistrationITKv4/DeformableRegistration7.cxx b/Examples/RegistrationITKv4/DeformableRegistration7.cxx index 8865a42aa13..c1e36d9ef9c 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration7.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration7.cxx @@ -96,12 +96,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::LBFGSBOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) diff --git a/Examples/RegistrationITKv4/DeformableRegistration8.cxx b/Examples/RegistrationITKv4/DeformableRegistration8.cxx index ece77cde532..6bc4176b51a 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration8.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration8.cxx @@ -81,12 +81,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::LBFGSBOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) diff --git a/Examples/RegistrationITKv4/DeformableRegistration9.cxx b/Examples/RegistrationITKv4/DeformableRegistration9.cxx index 8fd44001e30..ae1fb91ea4c 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration9.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration9.cxx @@ -61,12 +61,12 @@ const unsigned int Dimension = 2; public: - void Execute(itk::Object *caller, const itk::EventObject & event) + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) + void Execute(const itk::Object * object, const itk::EventObject & event) override { const RegistrationFilterType * filter = static_cast< const RegistrationFilterType * >( object ); diff --git a/Examples/RegistrationITKv4/ImageRegistration1.cxx b/Examples/RegistrationITKv4/ImageRegistration1.cxx index b2560cba52a..fc4535c27e0 100644 --- a/Examples/RegistrationITKv4/ImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration1.cxx @@ -77,12 +77,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizerv4 OptimizerType; typedef const OptimizerType* OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); diff --git a/Examples/RegistrationITKv4/ImageRegistration10.cxx b/Examples/RegistrationITKv4/ImageRegistration10.cxx index 0d8048a1029..b42e1887c46 100644 --- a/Examples/RegistrationITKv4/ImageRegistration10.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration10.cxx @@ -64,12 +64,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::AmoebaOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration11.cxx b/Examples/RegistrationITKv4/ImageRegistration11.cxx index 23f3a59afe9..842fb72365d 100644 --- a/Examples/RegistrationITKv4/ImageRegistration11.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration11.cxx @@ -69,12 +69,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::OnePlusOneEvolutionaryOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration12.cxx b/Examples/RegistrationITKv4/ImageRegistration12.cxx index 9ef6433c63d..4b623df1fb4 100644 --- a/Examples/RegistrationITKv4/ImageRegistration12.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration12.cxx @@ -73,12 +73,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration13.cxx b/Examples/RegistrationITKv4/ImageRegistration13.cxx index b90232d1b2a..73f1fec1c46 100644 --- a/Examples/RegistrationITKv4/ImageRegistration13.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration13.cxx @@ -63,12 +63,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration14.cxx b/Examples/RegistrationITKv4/ImageRegistration14.cxx index 82b025b42db..5df58d3d489 100644 --- a/Examples/RegistrationITKv4/ImageRegistration14.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration14.cxx @@ -61,13 +61,13 @@ class CommandIterationUpdate : public itk::Command typedef const OptimizerType * OptimizerPointer; void Execute(itk::Object *caller, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } void Execute(const itk::Object * object, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); diff --git a/Examples/RegistrationITKv4/ImageRegistration15.cxx b/Examples/RegistrationITKv4/ImageRegistration15.cxx index 0083b181d2e..16a1d9e7508 100644 --- a/Examples/RegistrationITKv4/ImageRegistration15.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration15.cxx @@ -59,13 +59,13 @@ class CommandIterationUpdate : public itk::Command typedef const OptimizerType * OptimizerPointer; void Execute(itk::Object *caller, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } void Execute(const itk::Object * object, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); diff --git a/Examples/RegistrationITKv4/ImageRegistration16.cxx b/Examples/RegistrationITKv4/ImageRegistration16.cxx index 8baf9daedcf..da6ca961002 100644 --- a/Examples/RegistrationITKv4/ImageRegistration16.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration16.cxx @@ -62,13 +62,13 @@ class CommandIterationUpdate : public itk::Command typedef const OptimizerType * OptimizerPointer; void Execute(itk::Object *caller, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } void Execute(const itk::Object * object, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration17.cxx b/Examples/RegistrationITKv4/ImageRegistration17.cxx index 2bbc55e8787..b982b911d38 100644 --- a/Examples/RegistrationITKv4/ImageRegistration17.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration17.cxx @@ -61,13 +61,13 @@ class CommandIterationUpdate : public itk::Command typedef const OptimizerType * OptimizerPointer; void Execute(itk::Object *caller, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } void Execute(const itk::Object * object, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration18.cxx b/Examples/RegistrationITKv4/ImageRegistration18.cxx index 742b8a7fb32..23ffc37d32a 100644 --- a/Examples/RegistrationITKv4/ImageRegistration18.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration18.cxx @@ -56,12 +56,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration19.cxx b/Examples/RegistrationITKv4/ImageRegistration19.cxx index 61bb8232b75..c36d213fb83 100644 --- a/Examples/RegistrationITKv4/ImageRegistration19.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration19.cxx @@ -52,15 +52,15 @@ class CommandIterationUpdate19 : public itk::Command typedef itk::AmoebaOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); - if( optimizer == ITK_NULLPTR) + if( optimizer == nullptr) { return; } diff --git a/Examples/RegistrationITKv4/ImageRegistration2.cxx b/Examples/RegistrationITKv4/ImageRegistration2.cxx index 0f5a9619060..8e0a86bcfcc 100644 --- a/Examples/RegistrationITKv4/ImageRegistration2.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration2.cxx @@ -107,12 +107,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::GradientDescentOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration20.cxx b/Examples/RegistrationITKv4/ImageRegistration20.cxx index fd6d2271931..4e52516b729 100644 --- a/Examples/RegistrationITKv4/ImageRegistration20.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration20.cxx @@ -78,12 +78,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration3.cxx b/Examples/RegistrationITKv4/ImageRegistration3.cxx index 2378ea8713d..b851db657fd 100644 --- a/Examples/RegistrationITKv4/ImageRegistration3.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration3.cxx @@ -178,7 +178,7 @@ class CommandIterationUpdate : public itk::Command // Software Guide : BeginCodeSnippet void Execute(itk::Object *caller, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } @@ -195,7 +195,7 @@ class CommandIterationUpdate : public itk::Command // Software Guide : BeginCodeSnippet void Execute(const itk::Object * object, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { // Software Guide : EndCodeSnippet diff --git a/Examples/RegistrationITKv4/ImageRegistration4.cxx b/Examples/RegistrationITKv4/ImageRegistration4.cxx index e626954e7a6..8718c304393 100644 --- a/Examples/RegistrationITKv4/ImageRegistration4.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration4.cxx @@ -75,12 +75,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration5.cxx b/Examples/RegistrationITKv4/ImageRegistration5.cxx index 9999a662401..def1c06abc1 100644 --- a/Examples/RegistrationITKv4/ImageRegistration5.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration5.cxx @@ -94,12 +94,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration6.cxx b/Examples/RegistrationITKv4/ImageRegistration6.cxx index b6c403e2654..e9d7f331a12 100644 --- a/Examples/RegistrationITKv4/ImageRegistration6.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration6.cxx @@ -115,12 +115,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration7.cxx b/Examples/RegistrationITKv4/ImageRegistration7.cxx index bf9663262eb..6e44f3e72bc 100644 --- a/Examples/RegistrationITKv4/ImageRegistration7.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration7.cxx @@ -104,12 +104,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration8.cxx b/Examples/RegistrationITKv4/ImageRegistration8.cxx index 9ea19b7ca78..e43aad667fc 100644 --- a/Examples/RegistrationITKv4/ImageRegistration8.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration8.cxx @@ -110,11 +110,11 @@ class CommandIterationUpdate : public itk::Command public: typedef itk::RegularStepGradientDescentOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistration9.cxx b/Examples/RegistrationITKv4/ImageRegistration9.cxx index 0b26f90a6d7..3411335a2c1 100644 --- a/Examples/RegistrationITKv4/ImageRegistration9.cxx +++ b/Examples/RegistrationITKv4/ImageRegistration9.cxx @@ -88,12 +88,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx b/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx index 34c20664834..683249d9d3f 100644 --- a/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx +++ b/Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx @@ -128,7 +128,7 @@ #include "itkCommand.h" -#include +#include // Functor to rescale plot the histogram on a log scale and invert it. template< class TInput > @@ -203,7 +203,7 @@ class HistogramWriter typedef HistogramToEntropyImageFilterType::OutputPixelType OutputPixelType; HistogramWriter(): - m_Metric(0) + m_Metric(nullptr) { // Software Guide : BeginLatex @@ -404,15 +404,15 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); - if( ! itk::IterationEvent().CheckEvent( &event ) || optimizer == ITK_NULLPTR ) + if( ! itk::IterationEvent().CheckEvent( &event ) || optimizer == nullptr ) { return; } diff --git a/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx b/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx index a85d6eae2d4..4085ba9b015 100644 --- a/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx +++ b/Examples/RegistrationITKv4/IterativeClosestPoint1.cxx @@ -55,15 +55,15 @@ class CommandIterationUpdate : public itk::Command typedef itk::LevenbergMarquardtOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = dynamic_cast< OptimizerPointer >( object ); - if( optimizer == ITK_NULLPTR ) + if( optimizer == nullptr ) { itkExceptionMacro( "Could not cast optimizer." ); } diff --git a/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx b/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx index d9d16328129..9190e6c5477 100644 --- a/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx +++ b/Examples/RegistrationITKv4/IterativeClosestPoint2.cxx @@ -53,15 +53,15 @@ class CommandIterationUpdate : public itk::Command typedef itk::LevenbergMarquardtOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = dynamic_cast< OptimizerPointer >( object ); - if( optimizer == ITK_NULLPTR ) + if( optimizer == nullptr ) { itkExceptionMacro( "Could not cast optimizer." ); } diff --git a/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx b/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx index 6dab278d8b7..03fe7ce138e 100644 --- a/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/ModelToImageRegistration1.cxx @@ -175,13 +175,13 @@ class IterationCallback : public itk::Command /** Execute method will print data at each iteration */ void Execute(itk::Object *caller, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } void Execute(const itk::Object *, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { if( typeid( event ) == typeid( itk::StartEvent ) ) { @@ -268,7 +268,7 @@ class SimpleImageToSpatialObjectMetric : itkStaticConstMacro( ParametricSpaceDimension, unsigned int, 3 ); /** Specify the moving spatial object. */ - void SetMovingSpatialObject( const MovingSpatialObjectType * object) ITK_OVERRIDE + void SetMovingSpatialObject( const MovingSpatialObjectType * object) override { if(!this->m_FixedImage) { @@ -298,7 +298,7 @@ class SimpleImageToSpatialObjectMetric : } /** Get the Derivatives of the Match Measure */ - void GetDerivative( const ParametersType &, DerivativeType & ) const ITK_OVERRIDE + void GetDerivative( const ParametersType &, DerivativeType & ) const override { return; } @@ -322,7 +322,7 @@ class SimpleImageToSpatialObjectMetric : /** Get the value for SingleValue optimizers. */ // Software Guide : BeginCodeSnippet - MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + MeasureType GetValue( const ParametersType & parameters ) const override { double value; this->m_Transform->SetParameters( parameters ); @@ -343,7 +343,7 @@ class SimpleImageToSpatialObjectMetric : /** Get Value and Derivatives for MultipleValuedOptimizers */ void GetValueAndDerivative( const ParametersType & parameters, - MeasureType & Value, DerivativeType & Derivative ) const ITK_OVERRIDE + MeasureType & Value, DerivativeType & Derivative ) const override { Value = this->GetValue(parameters); this->GetDerivative(parameters,Derivative); diff --git a/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx b/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx index 85cb29e69e1..6f69b534cb6 100644 --- a/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx +++ b/Examples/RegistrationITKv4/ModelToImageRegistration2.cxx @@ -95,12 +95,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( typeid( event ) != typeid( itk::IterationEvent ) ) diff --git a/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx b/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx index 9945f0cedcf..2067c7a1d83 100644 --- a/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/MultiResImageRegistration1.cxx @@ -174,7 +174,7 @@ class RegistrationInterfaceCommand : public itk::Command // Software Guide : BeginCodeSnippet void Execute( itk::Object * object, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { // Software Guide : EndCodeSnippet @@ -261,7 +261,7 @@ class RegistrationInterfaceCommand : public itk::Command // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - void Execute(const itk::Object * , const itk::EventObject & ) ITK_OVERRIDE + void Execute(const itk::Object * , const itk::EventObject & ) override { return; } @@ -286,12 +286,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) diff --git a/Examples/RegistrationITKv4/MultiResImageRegistration2.cxx b/Examples/RegistrationITKv4/MultiResImageRegistration2.cxx index 0efa087add8..3875f64acc3 100644 --- a/Examples/RegistrationITKv4/MultiResImageRegistration2.cxx +++ b/Examples/RegistrationITKv4/MultiResImageRegistration2.cxx @@ -85,12 +85,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) @@ -128,7 +128,7 @@ class RegistrationInterfaceCommand : public itk::Command typedef RegistrationType * RegistrationPointer; typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef OptimizerType * OptimizerPointer; - void Execute(itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object * object, const itk::EventObject & event) override { if( !(itk::IterationEvent().CheckEvent( &event )) ) { @@ -154,7 +154,7 @@ class RegistrationInterfaceCommand : public itk::Command optimizer->SetMinimumStepLength( optimizer->GetMinimumStepLength() / 10.0 ); } } - void Execute(const itk::Object * , const itk::EventObject & ) ITK_OVERRIDE + void Execute(const itk::Object * , const itk::EventObject & ) override { return; } }; diff --git a/Examples/RegistrationITKv4/MultiResImageRegistration3.cxx b/Examples/RegistrationITKv4/MultiResImageRegistration3.cxx index 0651a2a47a9..d7c82f59c17 100644 --- a/Examples/RegistrationITKv4/MultiResImageRegistration3.cxx +++ b/Examples/RegistrationITKv4/MultiResImageRegistration3.cxx @@ -53,14 +53,14 @@ class RegistrationInterfaceCommand : public itk::Command typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef OptimizerType * OptimizerPointer; - void Execute(itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object * object, const itk::EventObject & event) override { if( !(itk::IterationEvent().CheckEvent( &event )) ) { return; } RegistrationPointer registration = static_cast( object ); - if(registration == ITK_NULLPTR) + if(registration == nullptr) { return; } @@ -83,7 +83,7 @@ class RegistrationInterfaceCommand : public itk::Command } } - void Execute(const itk::Object * , const itk::EventObject & ) ITK_OVERRIDE + void Execute(const itk::Object * , const itk::EventObject & ) override { return; } }; @@ -106,12 +106,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::RegularStepGradientDescentOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) diff --git a/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx b/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx index 92bf7921f7d..c65928a73ed 100644 --- a/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx +++ b/Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx @@ -91,12 +91,12 @@ class RegistrationInterfaceCommand : public itk::Command // The Execute function simply calls another version of the \code{Execute()} // method accepting a \code{const} input object - void Execute( itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute( itk::Object * object, const itk::EventObject & event) override { Execute( (const itk::Object *) object , event ); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { if( !(itk::MultiResolutionIterationEvent().CheckEvent( &event ) ) ) { @@ -143,12 +143,12 @@ class CommandIterationUpdate : public itk::Command typedef itk::GradientDescentOptimizerv4Template OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( !(itk::IterationEvent().CheckEvent( &event )) ) diff --git a/Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx b/Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx index 5d8924c842f..565dffcc5be 100644 --- a/Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx +++ b/Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx @@ -83,12 +83,12 @@ class RegistrationInterfaceCommand : public itk::Command // The Execute function simply calls another version of the \code{Execute()} // method accepting a \code{const} input object - void Execute( itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute( itk::Object * object, const itk::EventObject & event) override { Execute( (const itk::Object *) object , event ); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { if( !(itk::MultiResolutionIterationEvent().CheckEvent( &event ) ) ) { @@ -102,7 +102,7 @@ class RegistrationInterfaceCommand : public itk::Command } const RegistrationType * registration = static_cast( object ); - if(registration == 0) + if(registration == nullptr) { itkExceptionMacro(<< "Dynamic cast failed, object of type " << object->GetNameOfClass()); } @@ -139,15 +139,15 @@ class CommandIterationUpdate : public itk::Command typedef itk::GradientDescentOptimizerv4Template OptimizerType; typedef const OptimizerType * OptimizerPointer; - void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); - if( optimizer == ITK_NULLPTR) + if( optimizer == nullptr) { return; // in this unlikely context, just do nothing. } diff --git a/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx b/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx index 4d259534956..c67d3263451 100644 --- a/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx +++ b/Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx @@ -171,13 +171,13 @@ class CommandIterationUpdate : public itk::Command public: void Execute(itk::Object *caller, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } void Execute(const itk::Object * object, - const itk::EventObject & event) ITK_OVERRIDE + const itk::EventObject & event) override { const TFilter * filter = static_cast< const TFilter * >( object ); if( typeid( event ) != typeid( itk::IterationEvent ) ) diff --git a/Examples/Segmentation/GibbsPriorImageFilter1.cxx b/Examples/Segmentation/GibbsPriorImageFilter1.cxx index 450006245d4..d44d355a83d 100644 --- a/Examples/Segmentation/GibbsPriorImageFilter1.cxx +++ b/Examples/Segmentation/GibbsPriorImageFilter1.cxx @@ -28,7 +28,7 @@ #include #include -#include +#include // Software Guide : BeginCodeSnippet #include "itkRGBGibbsPriorFilter.h" diff --git a/Examples/Statistics/WeightedSampleStatistics.cxx b/Examples/Statistics/WeightedSampleStatistics.cxx index 9bab0105a22..05313e85f15 100644 --- a/Examples/Statistics/WeightedSampleStatistics.cxx +++ b/Examples/Statistics/WeightedSampleStatistics.cxx @@ -77,7 +77,7 @@ class ExampleWeightFunction : typedef double OutputType; /**Evaluate at the specified input position */ - OutputType Evaluate( const InputType& input ) const ITK_OVERRIDE + OutputType Evaluate( const InputType& input ) const override { if ( input[0] < 3.0 ) { @@ -91,7 +91,7 @@ class ExampleWeightFunction : protected: ExampleWeightFunction() {} - ~ExampleWeightFunction() ITK_OVERRIDE {} + ~ExampleWeightFunction() override {} }; // end of class int main() diff --git a/Modules/Bridge/VTK/include/itkVTKImageExport.h b/Modules/Bridge/VTK/include/itkVTKImageExport.h index f2f56c93dc5..bf652496132 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageExport.h +++ b/Modules/Bridge/VTK/include/itkVTKImageExport.h @@ -83,33 +83,33 @@ class ITK_TEMPLATE_EXPORT VTKImageExport:public VTKImageExportBase protected: VTKImageExport(); - ~VTKImageExport() {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VTKImageExport() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; typedef typename InputImageType::Pointer InputImagePointer; typedef typename InputImageType::RegionType InputRegionType; typedef typename InputRegionType::SizeType InputSizeType; typedef typename InputRegionType::IndexType InputIndexType; - int * WholeExtentCallback() ITK_OVERRIDE; + int * WholeExtentCallback() override; - double * SpacingCallback() ITK_OVERRIDE; + double * SpacingCallback() override; - double * OriginCallback() ITK_OVERRIDE; + double * OriginCallback() override; - float * FloatSpacingCallback() ITK_OVERRIDE; + float * FloatSpacingCallback() override; - float * FloatOriginCallback() ITK_OVERRIDE; + float * FloatOriginCallback() override; - const char * ScalarTypeCallback() ITK_OVERRIDE; + const char * ScalarTypeCallback() override; - int NumberOfComponentsCallback() ITK_OVERRIDE; + int NumberOfComponentsCallback() override; - void PropagateUpdateExtentCallback(int *) ITK_OVERRIDE; + void PropagateUpdateExtentCallback(int *) override; - int * DataExtentCallback() ITK_OVERRIDE; + int * DataExtentCallback() override; - void * BufferPointerCallback() ITK_OVERRIDE; + void * BufferPointerCallback() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VTKImageExport); diff --git a/Modules/Bridge/VTK/include/itkVTKImageExportBase.h b/Modules/Bridge/VTK/include/itkVTKImageExportBase.h index c00e32922d2..d2056d6515b 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageExportBase.h +++ b/Modules/Bridge/VTK/include/itkVTKImageExportBase.h @@ -117,8 +117,8 @@ class ITKVTK_EXPORT VTKImageExportBase:public ProcessObject protected: VTKImageExportBase(); - ~VTKImageExportBase() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VTKImageExportBase() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; typedef DataObject::Pointer DataObjectPointer; diff --git a/Modules/Bridge/VTK/include/itkVTKImageImport.h b/Modules/Bridge/VTK/include/itkVTKImageImport.h index 7b180a21720..6b170ed5e32 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageImport.h +++ b/Modules/Bridge/VTK/include/itkVTKImageImport.h @@ -155,16 +155,16 @@ class ITK_TEMPLATE_EXPORT VTKImageImport:public ImageSource< TOutputImage > protected: VTKImageImport(); - ~VTKImageImport() {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VTKImageImport() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void PropagateRequestedRegion(DataObject *) ITK_OVERRIDE; + void PropagateRequestedRegion(DataObject *) override; - virtual void UpdateOutputInformation() ITK_OVERRIDE; + void UpdateOutputInformation() override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VTKImageImport); diff --git a/Modules/Bridge/VTK/include/itkVTKImageImport.hxx b/Modules/Bridge/VTK/include/itkVTKImageImport.hxx index 95825a63dd6..304a9e49c87 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageImport.hxx +++ b/Modules/Bridge/VTK/include/itkVTKImageImport.hxx @@ -88,21 +88,21 @@ VTKImageImport< TOutputImage > { itkExceptionMacro(<< "Type currently not supported"); } - m_DataExtentCallback = 0; - m_WholeExtentCallback = 0; - m_BufferPointerCallback = 0; - m_UpdateDataCallback = 0; - m_PipelineModifiedCallback = 0; - m_NumberOfComponentsCallback = 0; - m_SpacingCallback = 0; - m_FloatSpacingCallback = 0; - m_OriginCallback = 0; - m_FloatOriginCallback = 0; - m_UpdateInformationCallback = 0; - m_ScalarTypeCallback = 0; - m_DataExtentCallback = 0; - m_PropagateUpdateExtentCallback = 0; - m_CallbackUserData = 0; + m_DataExtentCallback = nullptr; + m_WholeExtentCallback = nullptr; + m_BufferPointerCallback = nullptr; + m_UpdateDataCallback = nullptr; + m_PipelineModifiedCallback = nullptr; + m_NumberOfComponentsCallback = nullptr; + m_SpacingCallback = nullptr; + m_FloatSpacingCallback = nullptr; + m_OriginCallback = nullptr; + m_FloatOriginCallback = nullptr; + m_UpdateInformationCallback = nullptr; + m_ScalarTypeCallback = nullptr; + m_DataExtentCallback = nullptr; + m_PropagateUpdateExtentCallback = nullptr; + m_CallbackUserData = nullptr; } /** diff --git a/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h b/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h index 83760fcc0f3..1643e9ad8bf 100644 --- a/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h +++ b/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h @@ -85,14 +85,14 @@ class ITK_TEMPLATE_EXPORT ImageToVTKImageFilter : public ProcessObject ExporterFilterType * GetExporter() const; /** This call delegates the update to the importer */ - virtual void Update() ITK_OVERRIDE; + void Update() override; /** This call delegates the update to the importer */ - virtual void UpdateLargestPossibleRegion() ITK_OVERRIDE; + void UpdateLargestPossibleRegion() override; protected: ImageToVTKImageFilter(); - virtual ~ImageToVTKImageFilter(); + ~ImageToVTKImageFilter() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageToVTKImageFilter); diff --git a/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.hxx b/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.hxx index e134b3f4b95..be7fafafd7a 100644 --- a/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.hxx +++ b/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.hxx @@ -58,7 +58,7 @@ ImageToVTKImageFilter if( m_Importer ) { m_Importer->Delete(); - m_Importer = 0; + m_Importer = nullptr; } } diff --git a/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.h b/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.h index d31e2b0a74a..3de043bd66b 100644 --- a/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.h +++ b/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.h @@ -80,7 +80,7 @@ class ITK_TEMPLATE_EXPORT VTKImageToImageFilter : public VTKImageImport< TOutput protected: VTKImageToImageFilter(); - virtual ~VTKImageToImageFilter(); + ~VTKImageToImageFilter() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VTKImageToImageFilter); diff --git a/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.hxx b/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.hxx index 334b02bb770..77f1930ca68 100644 --- a/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.hxx +++ b/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.hxx @@ -61,7 +61,7 @@ VTKImageToImageFilter if( m_Exporter ) { m_Exporter->Delete(); - m_Exporter = 0; + m_Exporter = nullptr; } } diff --git a/Modules/Bridge/VtkGlue/include/vtkCaptureScreen.h b/Modules/Bridge/VtkGlue/include/vtkCaptureScreen.h index 6de45f1c50e..4bcdd292739 100644 --- a/Modules/Bridge/VtkGlue/include/vtkCaptureScreen.h +++ b/Modules/Bridge/VtkGlue/include/vtkCaptureScreen.h @@ -33,7 +33,7 @@ class vtkCaptureScreen vtkCaptureScreen( vtkRenderWindow* iRenderer ) : m_Renderer ( iRenderer ) {} - vtkCaptureScreen() : m_Renderer( ITK_NULLPTR ) + vtkCaptureScreen() : m_Renderer( nullptr ) {} ~vtkCaptureScreen( ) diff --git a/Modules/Core/Common/CMake/itkCheckPrivateDynamicCast.cmake b/Modules/Core/Common/CMake/itkCheckPrivateDynamicCast.cmake index 21934f02f76..67313d7cbe5 100644 --- a/Modules/Core/Common/CMake/itkCheckPrivateDynamicCast.cmake +++ b/Modules/Core/Common/CMake/itkCheckPrivateDynamicCast.cmake @@ -52,8 +52,8 @@ int main(void) # accomplished with a custom command as a post build step for the # compilation of the executable. file(WRITE "${test_project_dir}/CMakeLists.txt" " -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) -cmake_policy(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.8.2 FATAL_ERROR) +cmake_policy(VERSION 3.8.2) project(support_private_dynamic_cast CXX) add_library(base SHARED \"base.cxx\") set_target_properties(base PROPERTIES CXX_VISIBILITY_PRESET hidden) diff --git a/Modules/Core/Common/CMake/itkGenerateNewCompilerFeatureDetectionHeaders.cmake b/Modules/Core/Common/CMake/itkGenerateNewCompilerFeatureDetectionHeaders.cmake index 9a822d610ac..704bc6759af 100644 --- a/Modules/Core/Common/CMake/itkGenerateNewCompilerFeatureDetectionHeaders.cmake +++ b/Modules/Core/Common/CMake/itkGenerateNewCompilerFeatureDetectionHeaders.cmake @@ -1,24 +1,11 @@ -if( ITK_MANUAL_GENERATE_NEW_COMPILER_DETECTION_HEADERS ) -# In order to provide backwards compatibility to pre-cmake 3.1.0 versions, -# the WriteCompilerDetectionHeader function should be run from a very -# recent version of cmake (i.e. 3.5.2) and the auto-generated files -# should be merged from the temporary build tree with the source -# code managed source tree. This should only be done VERY infrequently. -# -# SRCDIR=~/ITK -# BINDIR=~/ITK-bld -# -# merge files: ${CMAKE_CURRENT_BINARY_DIR}/TMP/itk_compiler_detection.h & ${SRCDIR}/Modules/Core/Common/include/itk_compiler_detection.h -# NOTE: ${SRCDIR}/Modules/Core/Common/include/itk_compiler_detection.h needs to include the custom UNKOWN compiler include stub -# merge files: ${CMAKE_CURRENT_BINARY_DIR}/TMP/compilers & ${SRCDIR}/Modules/Core/Common/include/compilers - ## Dynamically create compiler detection header - include(WriteCompilerDetectionHeader) - write_compiler_detection_header( - FILE "${CMAKE_CURRENT_BINARY_DIR}/TMP/itk_compiler_detection.h" +## Dynamically create compiler detection header +include(WriteCompilerDetectionHeader) +write_compiler_detection_header( + FILE "${CMAKE_CURRENT_BINARY_DIR}/itk_compiler_detection.h" PREFIX ITK - OUTPUT_FILES_VAR compiler_stub_headers - OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/TMP/compilers - COMPILERS AppleClang Clang GNU MSVC SunPro Intel #Supported compilers as of 3.5.2 + OUTPUT_FILES_VAR ITK_compiler_detection_support_headers + OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/compilers + COMPILERS ${CMAKE_CXX_COMPILER_ID} # AppleClang Clang GNU MSVC SunPro Intel #Supported compilers as of 3.5.2 VERSION ${CMAKE_VERSION} FEATURES cxx_aggregate_default_initializers # Aggregate default initializers, as defined in N3605. @@ -50,7 +37,7 @@ if( ITK_MANUAL_GENERATE_NEW_COMPILER_DETECTION_HEADERS ) cxx_generic_lambdas # Generic lambdas, as defined in N3649. cxx_inheriting_constructors # Inheriting constructors, as defined in N2540. cxx_inline_namespaces # Inline namespaces, as defined in N2535. - cxx_lambdas #Lambda functions, as defined in N2927. + cxx_lambdas # Lambda functions, as defined in N2927. cxx_lambda_init_captures # Initialized lambda captures, as defined in N3648. cxx_local_type_template_args # Local and unnamed types as template arguments, as defined in N2657. cxx_long_long_type # long long type, as defined in N1811. @@ -61,7 +48,7 @@ if( ITK_MANUAL_GENERATE_NEW_COMPILER_DETECTION_HEADERS ) cxx_range_for # Range-based for, as defined in N2930. cxx_raw_string_literals # Raw string literals, as defined in N2442. cxx_reference_qualified_functions # Reference qualified functions, as defined in N2439. - cxx_relaxed_constexpr #Relaxed constexpr, as defined in N3652. + cxx_relaxed_constexpr # Relaxed constexpr, as defined in N3652. cxx_return_type_deduction # Return type deduction on normal functions, as defined in N3386. cxx_right_angle_brackets # Right angle bracket parsing, as defined in N1757. cxx_rvalue_references # R-value references, as defined in N2118. @@ -78,5 +65,4 @@ if( ITK_MANUAL_GENERATE_NEW_COMPILER_DETECTION_HEADERS ) cxx_variadic_macros # Variadic macros, as defined in N1653. cxx_variadic_templates # Variadic templates, as defined in N2242. cxx_template_template_parameters # Template template parameters, as defined in ISO/IEC 14882:1998. - ) -endif() +) diff --git a/Modules/Core/Common/CMakeLists.txt b/Modules/Core/Common/CMakeLists.txt index b1105580f64..56080d798aa 100644 --- a/Modules/Core/Common/CMakeLists.txt +++ b/Modules/Core/Common/CMakeLists.txt @@ -62,7 +62,7 @@ endif() # Identify the version of CXX compiler used when ITK was built. This needs to be # identified so that external applications can identify how ITK was built. set(ITK_COMPILED_CXX_STANDARD_VERSION 1) -foreach(CXX_TEST_VERSION 199711L 201103L 201402L) +foreach(CXX_TEST_VERSION 201103L 201402L 201703L) try_compile(ITK_MIN_CXX_LEVEL_TEST ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp ${CMAKE_CURRENT_LIST_DIR}/CMake/itkGetCXXCompilerVersion.cxx @@ -139,14 +139,21 @@ set(ITKCommon_LIBRARIES ITKCommon) itk_module_impl() -install(FILES - ${ITKCommon_BINARY_DIR}/itkConfigure.h - DESTINATION ${ITKCommon_INSTALL_INCLUDE_DIR} - COMPONENT Development - ) - # configure and install compiler feature header files # that have fine granular support of C++11 features # identified in a way consistent with CMake 3.1.0 and # greater include(CMake/itkGenerateNewCompilerFeatureDetectionHeaders.cmake) + +install(FILES + ${ITKCommon_BINARY_DIR}/itkConfigure.h + ${CMAKE_CURRENT_BINARY_DIR}/itk_compiler_detection.h + DESTINATION ${ITKCommon_INSTALL_INCLUDE_DIR} + COMPONENT Development +) + +install(FILES + ${ITK_compiler_detection_support_headers} + DESTINATION ${ITKCommon_INSTALL_INCLUDE_DIR}/compilers + COMPONENT Development +) diff --git a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_AppleClang_CXX.h b/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_AppleClang_CXX.h deleted file mode 100644 index 0ae931769b7..00000000000 --- a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_AppleClang_CXX.h +++ /dev/null @@ -1,385 +0,0 @@ -/*========================================================================= - * - * Copyright Insight Software Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0.txt - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - *=========================================================================*/ -#ifndef ITK_COMPILER_INFO_AppleClang_CXX_h -#define ITK_COMPILER_INFO_AppleClang_CXX_h -#ifndef itk_compiler_detection_h -# error This file may only be included from itk_compiler_detection.h -#endif - -# if !(((__clang_major__ * 100) + __clang_minor__) >= 400) -# error Unsupported compiler version -# endif - -# define ITK_COMPILER_VERSION_MAJOR ITK_DEC(__clang_major__) -# define ITK_COMPILER_VERSION_MINOR ITK_DEC(__clang_minor__) -# define ITK_COMPILER_VERSION_PATCH ITK_DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define ITK_SIMULATE_VERSION_MAJOR ITK_DEC(_MSC_VER / 100) -# define ITK_SIMULATE_VERSION_MINOR ITK_DEC(_MSC_VER % 100) -# endif -# define ITK_COMPILER_VERSION_TWEAK ITK_DEC(__apple_build_version__) - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_aggregate_nsdmi) -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_alias_templates) -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_alignas) -# define ITK_COMPILER_CXX_ALIGNAS 1 -# else -# define ITK_COMPILER_CXX_ALIGNAS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_alignas) -# define ITK_COMPILER_CXX_ALIGNOF 1 -# else -# define ITK_COMPILER_CXX_ALIGNOF 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_attributes) -# define ITK_COMPILER_CXX_ATTRIBUTES 1 -# else -# define ITK_COMPILER_CXX_ATTRIBUTES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 1 -# else -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_auto_type) -# define ITK_COMPILER_CXX_AUTO_TYPE 1 -# else -# define ITK_COMPILER_CXX_AUTO_TYPE 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_binary_literals) -# define ITK_COMPILER_CXX_BINARY_LITERALS 1 -# else -# define ITK_COMPILER_CXX_BINARY_LITERALS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_constexpr) -# define ITK_COMPILER_CXX_CONSTEXPR 1 -# else -# define ITK_COMPILER_CXX_CONSTEXPR 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_contextual_conversions) -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 1 -# else -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_decltype_incomplete_return_types) -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_decltype) -# define ITK_COMPILER_CXX_DECLTYPE 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_default_function_template_args) -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_defaulted_functions) -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_defaulted_functions) -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_delegating_constructors) -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_deleted_functions) -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 1 -# else -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_explicit_conversions) -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 1 -# else -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_override_control) -# define ITK_COMPILER_CXX_FINAL 1 -# else -# define ITK_COMPILER_CXX_FINAL 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 1 -# else -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_generalized_initializers) -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 1 -# else -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_inheriting_constructors) -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 1 -# else -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_lambdas) -# define ITK_COMPILER_CXX_LAMBDAS 1 -# else -# define ITK_COMPILER_CXX_LAMBDAS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_init_captures) -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 1 -# else -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_local_type_template_args) -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 1 -# else -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_noexcept) -# define ITK_COMPILER_CXX_NOEXCEPT 1 -# else -# define ITK_COMPILER_CXX_NOEXCEPT 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_nonstatic_member_init) -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 1 -# else -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_nullptr) -# define ITK_COMPILER_CXX_NULLPTR 1 -# else -# define ITK_COMPILER_CXX_NULLPTR 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_override_control) -# define ITK_COMPILER_CXX_OVERRIDE 1 -# else -# define ITK_COMPILER_CXX_OVERRIDE 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_range_for) -# define ITK_COMPILER_CXX_RANGE_FOR 1 -# else -# define ITK_COMPILER_CXX_RANGE_FOR 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_raw_string_literals) -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 1 -# else -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_reference_qualified_functions) -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_relaxed_constexpr) -# define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 1 -# else -# define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_return_type_deduction) -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 1 -# else -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 1 -# else -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_rvalue_references) -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 1 -# else -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 1 -# else -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_static_assert) -# define ITK_COMPILER_CXX_STATIC_ASSERT 1 -# else -# define ITK_COMPILER_CXX_STATIC_ASSERT 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_strong_enums) -# define ITK_COMPILER_CXX_STRONG_ENUMS 1 -# else -# define ITK_COMPILER_CXX_STRONG_ENUMS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_thread_local) -# define ITK_COMPILER_CXX_THREAD_LOCAL 1 -# else -# define ITK_COMPILER_CXX_THREAD_LOCAL 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_trailing_return) -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 1 -# else -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_unicode_literals) -# define ITK_COMPILER_CXX_UNICODE_LITERALS 1 -# else -# define ITK_COMPILER_CXX_UNICODE_LITERALS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_generalized_initializers) -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 1 -# else -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_unrestricted_unions) -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 1 -# else -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_user_literals) -# define ITK_COMPILER_CXX_USER_LITERALS 1 -# else -# define ITK_COMPILER_CXX_USER_LITERALS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_variable_templates) -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_VARIADIC_MACROS 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_MACROS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_variadic_templates) -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __cplusplus >= 199711L -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 1 -# else -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 400 && __has_feature(cxx_atomic) -# define ITK_COMPILER_CXX_ATOMIC 1 -# else -# define ITK_COMPILER_CXX_ATOMIC 0 -# endif -#endif //ITK_COMPILER_INFO_AppleClang_CXX_h diff --git a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_Clang_CXX.h b/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_Clang_CXX.h deleted file mode 100644 index c94a86255be..00000000000 --- a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_Clang_CXX.h +++ /dev/null @@ -1,384 +0,0 @@ -/*========================================================================= - * - * Copyright Insight Software Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0.txt - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - *=========================================================================*/ -#ifndef ITK_COMPILER_INFO_Clang_CXX_h -#define ITK_COMPILER_INFO_Clang_CXX_h -#ifndef itk_compiler_detection_h -# error This file may only be included from itk_compiler_detection.h -#endif - -# if !(((__clang_major__ * 100) + __clang_minor__) >= 300) -# error Unsupported compiler version -# endif - -# define ITK_COMPILER_VERSION_MAJOR ITK_DEC(__clang_major__) -# define ITK_COMPILER_VERSION_MINOR ITK_DEC(__clang_minor__) -# define ITK_COMPILER_VERSION_PATCH ITK_DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define ITK_SIMULATE_VERSION_MAJOR ITK_DEC(_MSC_VER / 100) -# define ITK_SIMULATE_VERSION_MINOR ITK_DEC(_MSC_VER % 100) -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_aggregate_nsdmi) -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_alias_templates) -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_alignas) -# define ITK_COMPILER_CXX_ALIGNAS 1 -# else -# define ITK_COMPILER_CXX_ALIGNAS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_alignas) -# define ITK_COMPILER_CXX_ALIGNOF 1 -# else -# define ITK_COMPILER_CXX_ALIGNOF 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_attributes) -# define ITK_COMPILER_CXX_ATTRIBUTES 1 -# else -# define ITK_COMPILER_CXX_ATTRIBUTES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 1 -# else -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_auto_type) -# define ITK_COMPILER_CXX_AUTO_TYPE 1 -# else -# define ITK_COMPILER_CXX_AUTO_TYPE 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_binary_literals) -# define ITK_COMPILER_CXX_BINARY_LITERALS 1 -# else -# define ITK_COMPILER_CXX_BINARY_LITERALS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_constexpr) -# define ITK_COMPILER_CXX_CONSTEXPR 1 -# else -# define ITK_COMPILER_CXX_CONSTEXPR 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_contextual_conversions) -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 1 -# else -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_decltype_incomplete_return_types) -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_decltype) -# define ITK_COMPILER_CXX_DECLTYPE 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_default_function_template_args) -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_defaulted_functions) -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_defaulted_functions) -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_delegating_constructors) -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_deleted_functions) -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 1 -# else -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_explicit_conversions) -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 1 -# else -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_override_control) -# define ITK_COMPILER_CXX_FINAL 1 -# else -# define ITK_COMPILER_CXX_FINAL 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 1 -# else -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_generalized_initializers) -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 1 -# else -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_inheriting_constructors) -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 1 -# else -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_lambdas) -# define ITK_COMPILER_CXX_LAMBDAS 1 -# else -# define ITK_COMPILER_CXX_LAMBDAS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_init_captures) -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 1 -# else -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_local_type_template_args) -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 1 -# else -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_noexcept) -# define ITK_COMPILER_CXX_NOEXCEPT 1 -# else -# define ITK_COMPILER_CXX_NOEXCEPT 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_nonstatic_member_init) -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 1 -# else -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_nullptr) -# define ITK_COMPILER_CXX_NULLPTR 1 -# else -# define ITK_COMPILER_CXX_NULLPTR 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_override_control) -# define ITK_COMPILER_CXX_OVERRIDE 1 -# else -# define ITK_COMPILER_CXX_OVERRIDE 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_range_for) -# define ITK_COMPILER_CXX_RANGE_FOR 1 -# else -# define ITK_COMPILER_CXX_RANGE_FOR 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_raw_string_literals) -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 1 -# else -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_reference_qualified_functions) -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_relaxed_constexpr) -# define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 1 -# else -# define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_return_type_deduction) -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 1 -# else -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 1 -# else -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_rvalue_references) -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 1 -# else -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 1 -# else -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_static_assert) -# define ITK_COMPILER_CXX_STATIC_ASSERT 1 -# else -# define ITK_COMPILER_CXX_STATIC_ASSERT 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_strong_enums) -# define ITK_COMPILER_CXX_STRONG_ENUMS 1 -# else -# define ITK_COMPILER_CXX_STRONG_ENUMS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_thread_local) -# define ITK_COMPILER_CXX_THREAD_LOCAL 1 -# else -# define ITK_COMPILER_CXX_THREAD_LOCAL 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_trailing_return) -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 1 -# else -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_unicode_literals) -# define ITK_COMPILER_CXX_UNICODE_LITERALS 1 -# else -# define ITK_COMPILER_CXX_UNICODE_LITERALS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_generalized_initializers) -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 1 -# else -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_unrestricted_unions) -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 1 -# else -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_user_literals) -# define ITK_COMPILER_CXX_USER_LITERALS 1 -# else -# define ITK_COMPILER_CXX_USER_LITERALS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_variable_templates) -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_VARIADIC_MACROS 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_MACROS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __has_feature(cxx_variadic_templates) -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && __cplusplus >= 199711L -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 1 -# else -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 0 -# endif - -# if ((__clang_major__ * 100) + __clang_minor__) >= 301 && __has_feature(cxx_atomic) -# define ITK_COMPILER_CXX_ATOMIC 1 -# else -# define ITK_COMPILER_CXX_ATOMIC 0 -# endif -#endif // ITK_COMPILER_INFO_Clang_CXX_h diff --git a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_GNU_CXX.h b/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_GNU_CXX.h deleted file mode 100644 index db1cc05938a..00000000000 --- a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_GNU_CXX.h +++ /dev/null @@ -1,383 +0,0 @@ -/*========================================================================= - * - * Copyright Insight Software Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0.txt - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - *=========================================================================*/ -#ifndef ITK_COMPILER_INFO_GNU_CXX_h -#define ITK_COMPILER_INFO_GNU_CXX_h -#ifndef itk_compiler_detection_h -# error This file may only be included from itk_compiler_detection.h -#endif - -# if !((__GNUC__ * 100 + __GNUC_MINOR__) >= 404) -# error Unsupported compiler version -# endif - -# define ITK_COMPILER_VERSION_MAJOR ITK_DEC(__GNUC__) -# if defined(__GNUC_MINOR__) -# define ITK_COMPILER_VERSION_MINOR ITK_DEC(__GNUC_MINOR__) -# endif -# if defined(__GNUC_PATCHLEVEL__) -# define ITK_COMPILER_VERSION_PATCH ITK_DEC(__GNUC_PATCHLEVEL__) -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ALIGNAS 1 -# else -# define ITK_COMPILER_CXX_ALIGNAS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ALIGNOF 1 -# else -# define ITK_COMPILER_CXX_ALIGNOF 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ATTRIBUTES 1 -# else -# define ITK_COMPILER_CXX_ATTRIBUTES 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 1 -# else -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_AUTO_TYPE 1 -# else -# define ITK_COMPILER_CXX_AUTO_TYPE 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_BINARY_LITERALS 1 -# else -# define ITK_COMPILER_CXX_BINARY_LITERALS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_CONSTEXPR 1 -# else -# define ITK_COMPILER_CXX_CONSTEXPR 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 1 -# else -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 0 -# endif - -# if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_DECLTYPE 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 1 -# else -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 1 -# else -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_FINAL 1 -# else -# define ITK_COMPILER_CXX_FINAL 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 1 -# else -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 1 -# else -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 1 -# else -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_LAMBDAS 1 -# else -# define ITK_COMPILER_CXX_LAMBDAS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 1 -# else -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 1 -# else -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_NOEXCEPT 1 -# else -# define ITK_COMPILER_CXX_NOEXCEPT 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 1 -# else -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_NULLPTR 1 -# else -# define ITK_COMPILER_CXX_NULLPTR 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_OVERRIDE 1 -# else -# define ITK_COMPILER_CXX_OVERRIDE 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_RANGE_FOR 1 -# else -# define ITK_COMPILER_CXX_RANGE_FOR 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 1 -# else -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 0 -# endif - -# if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L -# define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 1 -# else -# define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 1 -# else -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 1 -# else -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 1 -# else -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 1 -# else -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_STATIC_ASSERT 1 -# else -# define ITK_COMPILER_CXX_STATIC_ASSERT 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_STRONG_ENUMS 1 -# else -# define ITK_COMPILER_CXX_STRONG_ENUMS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_THREAD_LOCAL 1 -# else -# define ITK_COMPILER_CXX_THREAD_LOCAL 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 1 -# else -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_UNICODE_LITERALS 1 -# else -# define ITK_COMPILER_CXX_UNICODE_LITERALS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 1 -# else -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 1 -# else -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_USER_LITERALS 1 -# else -# define ITK_COMPILER_CXX_USER_LITERALS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_VARIADIC_MACROS 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_MACROS 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 0 -# endif - -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 1 -# else -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 0 -# endif - -# if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 404 && __cplusplus > 201103L -# define ITK_COMPILER_CXX_ATOMIC 1 -# else -# define ITK_COMPILER_CXX_ATOMIC 0 -# endif -#endif // ITK_COMPILER_INFO_GNU_CXX_h diff --git a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_Intel_CXX.h b/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_Intel_CXX.h deleted file mode 100644 index 7eeb582da04..00000000000 --- a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_Intel_CXX.h +++ /dev/null @@ -1,398 +0,0 @@ -/*========================================================================= - * - * Copyright Insight Software Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0.txt - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - *=========================================================================*/ -#ifndef ITK_COMPILER_INFO_Intel_CXX_h -#define ITK_COMPILER_INFO_Intel_CXX_h -#ifndef itk_compiler_detection_h -# error This file may only be included from itk_compiler_detection.h -#endif - -# if !(__INTEL_COMPILER >= 1210) -# error Unsupported compiler version -# endif - - /* __INTEL_COMPILER = VRP */ -# define ITK_COMPILER_VERSION_MAJOR ITK_DEC(__INTEL_COMPILER/100) -# define ITK_COMPILER_VERSION_MINOR ITK_DEC(__INTEL_COMPILER/10 % 10) -# if defined(__INTEL_COMPILER_UPDATE) -# define ITK_COMPILER_VERSION_PATCH ITK_DEC(__INTEL_COMPILER_UPDATE) -# else -# define ITK_COMPILER_VERSION_PATCH ITK_DEC(__INTEL_COMPILER % 10) -# endif -# if defined(__INTEL_COMPILER_BUILD_DATE) - /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ -# define ITK_COMPILER_VERSION_TWEAK ITK_DEC(__INTEL_COMPILER_BUILD_DATE) -# endif -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define ITK_SIMULATE_VERSION_MAJOR ITK_DEC(_MSC_VER / 100) -# define ITK_SIMULATE_VERSION_MINOR ITK_DEC(_MSC_VER % 100) -# endif - -# if __INTEL_COMPILER >= 1600 && ((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) \ - || ((((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE == 1))) && defined(__GXX_EXPERIMENTAL_CXX0X__)\ - && !defined(__INTEL_CXX11_MODE__) ) ) -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 0 -# endif - -# if __INTEL_COMPILER >= 1500 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_ALIGNAS 1 -# else -# define ITK_COMPILER_CXX_ALIGNAS 0 -# endif - -# if __INTEL_COMPILER >= 1500 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_ALIGNOF 1 -# else -# define ITK_COMPILER_CXX_ALIGNOF 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_ATTRIBUTES 1 -# else -# define ITK_COMPILER_CXX_ATTRIBUTES 0 -# endif - -# if __INTEL_COMPILER >= 1500 && ((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) \ - || ((((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE == 1))) && defined(__GXX_EXPERIMENTAL_CXX0X__) \ - && !defined(__INTEL_CXX11_MODE__) ) ) -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 1 -# else -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_AUTO_TYPE 1 -# else -# define ITK_COMPILER_CXX_AUTO_TYPE 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_BINARY_LITERALS 1 -# else -# define ITK_COMPILER_CXX_BINARY_LITERALS 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_CONSTEXPR 1 -# else -# define ITK_COMPILER_CXX_CONSTEXPR 0 -# endif - -# if __INTEL_COMPILER >= 1600 && ((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) \ - || ((((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE == 1))) && defined(__GXX_EXPERIMENTAL_CXX0X__) \ - && !defined(__INTEL_CXX11_MODE__) ) ) -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 1 -# else -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 0 -# endif - -# if ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) \ - && (__INTEL_COMPILER > 1400 || (__INTEL_COMPILER == 1400 && __INTEL_COMPILER_UPDATE >= 2)) -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_DECLTYPE 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE 0 -# endif - -# if __INTEL_COMPILER >= 1500 && ((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) \ - || ((((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE == 1))) && defined(__GXX_EXPERIMENTAL_CXX0X__) \ - && !defined(__INTEL_CXX11_MODE__) ) ) -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 0 -# endif - -# if __INTEL_COMPILER >= 1600 && ((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) \ - || ((((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE == 1))) && defined(__GXX_EXPERIMENTAL_CXX0X__) \ - && !defined(__INTEL_CXX11_MODE__) ) ) -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 1 -# else -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 0 -# endif - -# if __INTEL_COMPILER >= 1300 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 1 -# else -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_FINAL 1 -# else -# define ITK_COMPILER_CXX_FINAL 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 1 -# else -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 0 -# endif - -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 0 - -# if __INTEL_COMPILER >= 1600 && ((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) \ - || ((((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE == 1))) && defined(__GXX_EXPERIMENTAL_CXX0X__) \ - && !defined(__INTEL_CXX11_MODE__) ) ) -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 1 -# else -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 0 -# endif - -# if __INTEL_COMPILER >= 1500 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 1 -# else -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_LAMBDAS 1 -# else -# define ITK_COMPILER_CXX_LAMBDAS 0 -# endif - -# if __INTEL_COMPILER >= 1500 && ((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) \ - || ((((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE == 1))) && defined(__GXX_EXPERIMENTAL_CXX0X__) \ - && !defined(__INTEL_CXX11_MODE__) ) ) -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 1 -# else -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 1 -# else -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_NOEXCEPT 1 -# else -# define ITK_COMPILER_CXX_NOEXCEPT 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 1 -# else -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_NULLPTR 1 -# else -# define ITK_COMPILER_CXX_NULLPTR 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_OVERRIDE 1 -# else -# define ITK_COMPILER_CXX_OVERRIDE 0 -# endif - -# if __INTEL_COMPILER >= 1300 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_RANGE_FOR 1 -# else -# define ITK_COMPILER_CXX_RANGE_FOR 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 1 -# else -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 0 -# endif - -# define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 0 - -# if __INTEL_COMPILER >= 1500 && ((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) \ - || ((((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE == 1))) && defined(__GXX_EXPERIMENTAL_CXX0X__) \ - && !defined(__INTEL_CXX11_MODE__) ) ) -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 1 -# else -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 1 -# else -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 1 -# else -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 1 -# else -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_STATIC_ASSERT 1 -# else -# define ITK_COMPILER_CXX_STATIC_ASSERT 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_STRONG_ENUMS 1 -# else -# define ITK_COMPILER_CXX_STRONG_ENUMS 0 -# endif - -# if __INTEL_COMPILER >= 1500 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_THREAD_LOCAL 1 -# else -# define ITK_COMPILER_CXX_THREAD_LOCAL 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 1 -# else -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_UNICODE_LITERALS 1 -# else -# define ITK_COMPILER_CXX_UNICODE_LITERALS 0 -# endif - -# if __INTEL_COMPILER >= 1300 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 1 -# else -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 0 -# endif - -# if __INTEL_COMPILER >= 1400 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 1 -# else -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 0 -# endif - -# if __INTEL_COMPILER >= 1500 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_USER_LITERALS 1 -# else -# define ITK_COMPILER_CXX_USER_LITERALS 0 -# endif - -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 0 - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_VARIADIC_MACROS 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_MACROS 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 0 -# endif - -# if __INTEL_COMPILER >= 1210 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 1 -# else -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 0 -# endif - -# if __INTEL_COMPILER >= 1300 && ((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define ITK_COMPILER_CXX_ATOMIC 1 -# else -# define ITK_COMPILER_CXX_ATOMIC 0 -# endif -#endif // ITK_COMPILER_INFO_Intel_CXX_h diff --git a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_MSVC_CXX.h b/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_MSVC_CXX.h deleted file mode 100644 index abbbec685c9..00000000000 --- a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_MSVC_CXX.h +++ /dev/null @@ -1,379 +0,0 @@ -/*========================================================================= - * - * Copyright Insight Software Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0.txt - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - *=========================================================================*/ -#ifndef ITK_COMPILER_INFO_MSVC_CXX_h -#define ITK_COMPILER_INFO_MSVC_CXX_h -#ifndef itk_compiler_detection_h -# error This file may only be included from itk_compiler_detection.h -#endif - -# if !(_MSC_VER >= 1600) -# error Unsupported compiler version -# endif - - /* _MSC_VER = VVRR */ -# define ITK_COMPILER_VERSION_MAJOR ITK_DEC(_MSC_VER / 100) -# define ITK_COMPILER_VERSION_MINOR ITK_DEC(_MSC_VER % 100) -# if defined(_MSC_FULL_VER) -# if _MSC_VER >= 1400 - /* _MSC_FULL_VER = VVRRPPPPP */ -# define ITK_COMPILER_VERSION_PATCH ITK_DEC(_MSC_FULL_VER % 100000) -# else - /* _MSC_FULL_VER = VVRRPPPP */ -# define ITK_COMPILER_VERSION_PATCH ITK_DEC(_MSC_FULL_VER % 10000) -# endif -# endif -# if defined(_MSC_BUILD) -# define ITK_COMPILER_VERSION_TWEAK ITK_DEC(_MSC_BUILD) -# endif - -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 0 - -# if _MSC_VER >= 1800 -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_ALIGNAS 1 -# else -# define ITK_COMPILER_CXX_ALIGNAS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_ALIGNOF 1 -# else -# define ITK_COMPILER_CXX_ALIGNOF 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_ATTRIBUTES 1 -# else -# define ITK_COMPILER_CXX_ATTRIBUTES 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 1 -# else -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_AUTO_TYPE 1 -# else -# define ITK_COMPILER_CXX_AUTO_TYPE 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_BINARY_LITERALS 1 -# else -# define ITK_COMPILER_CXX_BINARY_LITERALS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_CONSTEXPR 1 -# else -# define ITK_COMPILER_CXX_CONSTEXPR 0 -# endif - -# if _MSC_VER >= 1800 -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 1 -# else -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 0 -# endif - -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 0 - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_DECLTYPE 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 0 -# endif - -# if _MSC_VER >= 1800 -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 0 -# endif - -# if _MSC_VER >= 1800 -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 0 -# endif - -# if _MSC_VER >= 1800 -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 1 -# else -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 0 -# endif - -# if _MSC_VER >= 1700 -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 0 -# endif - -# if _MSC_VER >= 1800 -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 1 -# else -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 0 -# endif - -# if _MSC_VER >= 1700 -# define ITK_COMPILER_CXX_FINAL 1 -# else -# define ITK_COMPILER_CXX_FINAL 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 1 -# else -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 0 -# endif - -# if _MSC_FULL_VER >= 180030723 -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 1 -# else -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 1 -# else -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_LAMBDAS 1 -# else -# define ITK_COMPILER_CXX_LAMBDAS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 1 -# else -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 1 -# else -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_NOEXCEPT 1 -# else -# define ITK_COMPILER_CXX_NOEXCEPT 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 1 -# else -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_NULLPTR 1 -# else -# define ITK_COMPILER_CXX_NULLPTR 0 -# endif - -# if _MSC_VER >= 1700 -# define ITK_COMPILER_CXX_OVERRIDE 1 -# else -# define ITK_COMPILER_CXX_OVERRIDE 0 -# endif - -# if _MSC_VER >= 1700 -# define ITK_COMPILER_CXX_RANGE_FOR 1 -# else -# define ITK_COMPILER_CXX_RANGE_FOR 0 -# endif - -# if _MSC_VER >= 1800 -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 1 -# else -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 0 -# endif - -# define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 0 - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 1 -# else -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 1 -# else -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 1 -# else -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 1 -# else -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_STATIC_ASSERT 1 -# else -# define ITK_COMPILER_CXX_STATIC_ASSERT 0 -# endif - -# if _MSC_VER >= 1700 -# define ITK_COMPILER_CXX_STRONG_ENUMS 1 -# else -# define ITK_COMPILER_CXX_STRONG_ENUMS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_THREAD_LOCAL 1 -# else -# define ITK_COMPILER_CXX_THREAD_LOCAL 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 1 -# else -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_UNICODE_LITERALS 1 -# else -# define ITK_COMPILER_CXX_UNICODE_LITERALS 0 -# endif - -# if _MSC_VER >= 1800 -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 1 -# else -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 1 -# else -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 0 -# endif - -# if _MSC_VER >= 1900 -# define ITK_COMPILER_CXX_USER_LITERALS 1 -# else -# define ITK_COMPILER_CXX_USER_LITERALS 0 -# endif - -# if _MSC_FULL_VER >= 190023918 -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_VARIADIC_MACROS 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_MACROS 0 -# endif - -# if _MSC_VER >= 1800 -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 0 -# endif - -# if _MSC_VER >= 1600 -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 1 -# else -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 0 -# endif - -# if _MSC_VER >= 1700 -# define ITK_COMPILER_CXX_ATOMIC 1 -# else -# define ITK_COMPILER_CXX_ATOMIC 0 -# endif -#endif // ITK_COMPILER_INFO_MSVC_CXX_h diff --git a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_SunPro_CXX.h b/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_SunPro_CXX.h deleted file mode 100644 index 044bdc17658..00000000000 --- a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_SunPro_CXX.h +++ /dev/null @@ -1,332 +0,0 @@ -/*========================================================================= - * - * Copyright Insight Software Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0.txt - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - *=========================================================================*/ -#ifndef ITK_COMPILER_INFO_SunPro_CXX_h -#define ITK_COMPILER_INFO_SunPro_CXX_h -#ifndef itk_compiler_detection_h -# error This file may only be included from itk_compiler_detection.h -#endif - -# if !(__SUNPRO_CC >= 0x5130) -# error Unsupported compiler version -# endif - -# if __SUNPRO_CC >= 0x5100 - /* __SUNPRO_CC = 0xVRRP */ -# define ITK_COMPILER_VERSION_MAJOR ITK_HEX(__SUNPRO_CC>>12) -# define ITK_COMPILER_VERSION_MINOR ITK_HEX(__SUNPRO_CC>>4 & 0xFF) -# define ITK_COMPILER_VERSION_PATCH ITK_HEX(__SUNPRO_CC & 0xF) -# else - /* __SUNPRO_CC = 0xVRP */ -# define ITK_COMPILER_VERSION_MAJOR ITK_HEX(__SUNPRO_CC>>8) -# define ITK_COMPILER_VERSION_MINOR ITK_HEX(__SUNPRO_CC>>4 & 0xF) -# define ITK_COMPILER_VERSION_PATCH ITK_HEX(__SUNPRO_CC & 0xF) -# endif - -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 0 - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ALIGNAS 1 -# else -# define ITK_COMPILER_CXX_ALIGNAS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ALIGNOF 1 -# else -# define ITK_COMPILER_CXX_ALIGNOF 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ATTRIBUTES 1 -# else -# define ITK_COMPILER_CXX_ATTRIBUTES 0 -# endif - -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 0 - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_AUTO_TYPE 1 -# else -# define ITK_COMPILER_CXX_AUTO_TYPE 0 -# endif - -# define ITK_COMPILER_CXX_BINARY_LITERALS 0 - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_CONSTEXPR 1 -# else -# define ITK_COMPILER_CXX_CONSTEXPR 0 -# endif - -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 0 - -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 0 - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_DECLTYPE 1 -# else -# define ITK_COMPILER_CXX_DECLTYPE 0 -# endif - -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 0 - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 1 -# else -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 0 -# endif - -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 0 - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 1 -# else -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 1 -# else -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_FINAL 1 -# else -# define ITK_COMPILER_CXX_FINAL 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 1 -# else -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 1 -# else -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 0 -# endif - -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 0 - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 1 -# else -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 1 -# else -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_LAMBDAS 1 -# else -# define ITK_COMPILER_CXX_LAMBDAS 0 -# endif - -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 0 - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 1 -# else -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 1 -# else -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_NOEXCEPT 1 -# else -# define ITK_COMPILER_CXX_NOEXCEPT 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 1 -# else -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_NULLPTR 1 -# else -# define ITK_COMPILER_CXX_NULLPTR 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_OVERRIDE 1 -# else -# define ITK_COMPILER_CXX_OVERRIDE 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_RANGE_FOR 1 -# else -# define ITK_COMPILER_CXX_RANGE_FOR 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 1 -# else -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 0 -# endif - -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 0 - -# define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 0 - -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 0 - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 1 -# else -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 1 -# else -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 1 -# else -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_STATIC_ASSERT 1 -# else -# define ITK_COMPILER_CXX_STATIC_ASSERT 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_STRONG_ENUMS 1 -# else -# define ITK_COMPILER_CXX_STRONG_ENUMS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_THREAD_LOCAL 1 -# else -# define ITK_COMPILER_CXX_THREAD_LOCAL 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 1 -# else -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_UNICODE_LITERALS 1 -# else -# define ITK_COMPILER_CXX_UNICODE_LITERALS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 1 -# else -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 1 -# else -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 0 -# endif - -# define ITK_COMPILER_CXX_USER_LITERALS 0 - -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 0 - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_VARIADIC_MACROS 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_MACROS 0 -# endif - -# if (__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 1 -# else -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 0 -# endif - -# if __SUNPRO_CC >= 0x5130 && __cplusplus -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 1 -# else -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 0 -# endif - -# if (__SUNPRO_CC >= 0x5140) && __cplusplus >= 201103L -# define ITK_COMPILER_CXX_ATOMIC 1 -# else -# define ITK_COMPILER_CXX_ATOMIC 0 -# endif - -#endif //ITK_COMPILER_INFO_SunPro_CXX_h diff --git a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_UNKNOWN_CXX.h b/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_UNKNOWN_CXX.h deleted file mode 100644 index b4ffd518216..00000000000 --- a/Modules/Core/Common/include/compilers/ITK_COMPILER_INFO_UNKNOWN_CXX.h +++ /dev/null @@ -1,152 +0,0 @@ -/*========================================================================= - * - * Copyright Insight Software Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0.txt - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - *=========================================================================*/ -#ifndef ITK_COMPILER_INFO_UNKNOWN_CXX_h -#define ITK_COMPILER_INFO_UNKNOWN_CXX_h -#ifndef itk_compiler_detection_h -# error This file may only be included from itk_compiler_detection.h -#endif - -#define ITK_COMPILER_VERSION_MAJOR 0 -#define ITK_COMPILER_VERSION_MINOR 0 -#define ITK_COMPILER_VERSION_PATCH 0 - -// For unknown compilers, assume all or non C++11 support -// based solely on the value of __cplusplus - -#if __cplusplus >= 201103L -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 1 -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 1 -# define ITK_COMPILER_CXX_ALIGNAS 1 -# define ITK_COMPILER_CXX_ALIGNOF 1 -# define ITK_COMPILER_CXX_ATTRIBUTES 1 -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 1 -# define ITK_COMPILER_CXX_AUTO_TYPE 1 -# define ITK_COMPILER_CXX_BINARY_LITERALS 1 -# define ITK_COMPILER_CXX_CONSTEXPR 1 -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 1 -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 1 -# define ITK_COMPILER_CXX_DECLTYPE 1 -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 1 -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 1 -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 1 -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 1 -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 1 -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 1 -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 1 -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 1 -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 1 -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 1 -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 1 -# define ITK_COMPILER_CXX_FINAL 1 -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 1 -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 1 -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 1 -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 1 -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 1 -# define ITK_COMPILER_CXX_LAMBDAS 1 -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 1 -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 1 -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 1 -# define ITK_COMPILER_CXX_NOEXCEPT 1 -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 1 -# define ITK_COMPILER_CXX_NULLPTR 1 -# define ITK_COMPILER_CXX_OVERRIDE 1 -# define ITK_COMPILER_CXX_RANGE_FOR 1 -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 1 -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 1 -# define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 1 -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 1 -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 1 -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 1 -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 1 -# define ITK_COMPILER_CXX_STATIC_ASSERT 1 -# define ITK_COMPILER_CXX_STRONG_ENUMS 1 -# define ITK_COMPILER_CXX_THREAD_LOCAL 1 -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 1 -# define ITK_COMPILER_CXX_UNICODE_LITERALS 1 -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 1 -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 1 -# define ITK_COMPILER_CXX_USER_LITERALS 1 -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 1 -# define ITK_COMPILER_CXX_VARIADIC_MACROS 1 -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 1 -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 1 -# define ITK_COMPILER_CXX_ATOMIC 1 - -#else -// No C++11 support -# define ITK_COMPILER_CXX_AGGREGATE_DEFAULT_INITIALIZERS 0 -# define ITK_COMPILER_CXX_ALIAS_TEMPLATES 0 -# define ITK_COMPILER_CXX_ALIGNAS 0 -# define ITK_COMPILER_CXX_ALIGNOF 0 -# define ITK_COMPILER_CXX_ATTRIBUTES 0 -# define ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED 0 -# define ITK_COMPILER_CXX_AUTO_TYPE 0 -# define ITK_COMPILER_CXX_BINARY_LITERALS 0 -# define ITK_COMPILER_CXX_CONSTEXPR 0 -# define ITK_COMPILER_CXX_CONTEXTUAL_CONVERSIONS 0 -# define ITK_COMPILER_CXX_DECLTYPE_INCOMPLETE_RETURN_TYPES 0 -# define ITK_COMPILER_CXX_DECLTYPE 0 -# define ITK_COMPILER_CXX_DECLTYPE_AUTO 0 -# define ITK_COMPILER_CXX_DEFAULT_FUNCTION_TEMPLATE_ARGS 0 -# define ITK_COMPILER_CXX_DEFAULTED_FUNCTIONS 0 -# define ITK_COMPILER_CXX_DEFAULTED_MOVE_INITIALIZERS 0 -# define ITK_COMPILER_CXX_DELEGATING_CONSTRUCTORS 0 -# define ITK_COMPILER_CXX_DELETED_FUNCTIONS 0 -# define ITK_COMPILER_CXX_DIGIT_SEPARATORS 0 -# define ITK_COMPILER_CXX_ENUM_FORWARD_DECLARATIONS 0 -# define ITK_COMPILER_CXX_EXPLICIT_CONVERSIONS 0 -# define ITK_COMPILER_CXX_EXTENDED_FRIEND_DECLARATIONS 0 -# define ITK_COMPILER_CXX_EXTERN_TEMPLATES 0 -# define ITK_COMPILER_CXX_FINAL 0 -# define ITK_COMPILER_CXX_FUNC_IDENTIFIER 0 -# define ITK_COMPILER_CXX_GENERALIZED_INITIALIZERS 0 -# define ITK_COMPILER_CXX_GENERIC_LAMBDAS 0 -# define ITK_COMPILER_CXX_INHERITING_CONSTRUCTORS 0 -# define ITK_COMPILER_CXX_INLINE_NAMESPACES 0 -# define ITK_COMPILER_CXX_LAMBDAS 0 -# define ITK_COMPILER_CXX_LAMBDA_INIT_CAPTURES 0 -# define ITK_COMPILER_CXX_LOCAL_TYPE_TEMPLATE_ARGS 0 -# define ITK_COMPILER_CXX_LONG_LONG_TYPE 0 -# define ITK_COMPILER_CXX_NOEXCEPT 0 -# define ITK_COMPILER_CXX_NONSTATIC_MEMBER_INIT 0 -# define ITK_COMPILER_CXX_NULLPTR 0 -# define ITK_COMPILER_CXX_OVERRIDE 0 -# define ITK_COMPILER_CXX_RANGE_FOR 0 -# define ITK_COMPILER_CXX_RAW_STRING_LITERALS 0 -# define ITK_COMPILER_CXX_REFERENCE_QUALIFIED_FUNCTIONS 0 -# define ITK_COMPILER_CXX_RELAXED_CONSTEXPR 0 -# define ITK_COMPILER_CXX_RETURN_TYPE_DEDUCTION 0 -# define ITK_COMPILER_CXX_RIGHT_ANGLE_BRACKETS 0 -# define ITK_COMPILER_CXX_RVALUE_REFERENCES 0 -# define ITK_COMPILER_CXX_SIZEOF_MEMBER 0 -# define ITK_COMPILER_CXX_STATIC_ASSERT 0 -# define ITK_COMPILER_CXX_STRONG_ENUMS 0 -# define ITK_COMPILER_CXX_THREAD_LOCAL 0 -# define ITK_COMPILER_CXX_TRAILING_RETURN_TYPES 0 -# define ITK_COMPILER_CXX_UNICODE_LITERALS 0 -# define ITK_COMPILER_CXX_UNIFORM_INITIALIZATION 0 -# define ITK_COMPILER_CXX_UNRESTRICTED_UNIONS 0 -# define ITK_COMPILER_CXX_USER_LITERALS 0 -# define ITK_COMPILER_CXX_VARIABLE_TEMPLATES 0 -# define ITK_COMPILER_CXX_VARIADIC_MACROS 0 -# define ITK_COMPILER_CXX_VARIADIC_TEMPLATES 0 -# define ITK_COMPILER_CXX_TEMPLATE_TEMPLATE_PARAMETERS 0 -# define ITK_COMPILER_CXX_ATOMIC 0 -#endif -#endif //ITK_COMPILER_INFO_UNKNOWN_CXX_h diff --git a/Modules/Core/Common/include/itkAnnulusOperator.h b/Modules/Core/Common/include/itkAnnulusOperator.h index 22fc516f226..525aaaf6516 100644 --- a/Modules/Core/Common/include/itkAnnulusOperator.h +++ b/Modules/Core/Common/include/itkAnnulusOperator.h @@ -191,7 +191,7 @@ class ITK_TEMPLATE_EXPORT AnnulusOperator: } /** Prints some debugging information */ - virtual void PrintSelf(std::ostream & os, Indent i) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent i) const override { os << i << "AnnulusOperator { this=" << this << ", m_InnerRadius = " << m_InnerRadius @@ -213,10 +213,10 @@ class ITK_TEMPLATE_EXPORT AnnulusOperator: typedef typename Superclass::PixelType PixelType; /** Calculates operator coefficients. */ - CoefficientVector GenerateCoefficients() ITK_OVERRIDE; + CoefficientVector GenerateCoefficients() override; /** Arranges coefficients spatially in the memory buffer. */ - void Fill(const CoefficientVector & c) ITK_OVERRIDE; + void Fill(const CoefficientVector & c) override; private: diff --git a/Modules/Core/Common/include/itkArray.hxx b/Modules/Core/Common/include/itkArray.hxx index 4a041f76c70..2a85615acd9 100644 --- a/Modules/Core/Common/include/itkArray.hxx +++ b/Modules/Core/Common/include/itkArray.hxx @@ -98,7 +98,7 @@ Array< TValue > { if ( !m_LetArrayManageMemory ) { - vnl_vector< TValue >::data = ITK_NULLPTR; + vnl_vector< TValue >::data = nullptr; } } @@ -140,7 +140,7 @@ void Array< TValue > // on a resize if ( !m_LetArrayManageMemory ) { - vnl_vector< TValue >::data = ITK_NULLPTR; + vnl_vector< TValue >::data = nullptr; } // Call the superclass's set_size diff --git a/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.h b/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.h index 03b0d8dad3a..e21dc653bf7 100644 --- a/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.h +++ b/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.h @@ -68,15 +68,15 @@ class ITK_TEMPLATE_EXPORT AtanRegularizedHeavisideStepFunction: typedef typename Superclass::RealType RealType; /** Evaluate at the specified input position */ - virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & input) const override; /** Evaluate the derivative at the specified input position */ - virtual OutputType EvaluateDerivative(const InputType & input) const ITK_OVERRIDE; + OutputType EvaluateDerivative(const InputType & input) const override; protected: AtanRegularizedHeavisideStepFunction(); - virtual ~AtanRegularizedHeavisideStepFunction() ITK_OVERRIDE; + ~AtanRegularizedHeavisideStepFunction() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(AtanRegularizedHeavisideStepFunction); diff --git a/Modules/Core/Common/include/itkAutoPointer.h b/Modules/Core/Common/include/itkAutoPointer.h index 2c9d0cfc292..863917768c0 100644 --- a/Modules/Core/Common/include/itkAutoPointer.h +++ b/Modules/Core/Common/include/itkAutoPointer.h @@ -51,7 +51,7 @@ class AutoPointer typedef AutoPointer Self; /** Constructor. */ - AutoPointer ():m_Pointer(ITK_NULLPTR), m_IsOwner(false) + AutoPointer ():m_Pointer(nullptr), m_IsOwner(false) {} /** Copy constructor. */ @@ -85,7 +85,7 @@ class AutoPointer { delete m_Pointer; } - m_Pointer = ITK_NULLPTR; + m_Pointer = nullptr; m_IsOwner = false; } @@ -175,7 +175,7 @@ class AutoPointer /** Casting operator to boolean. This is used in conditional statments to check the content of the pointer against null */ operator bool() const - { return ( m_Pointer != ITK_NULLPTR ); } + { return ( m_Pointer != nullptr ); } /** Function to print object pointed to. */ /* ObjectType *Print (std::ostream& os) const diff --git a/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h b/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h index 7972f47da90..6375d8c08b6 100644 --- a/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h +++ b/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h @@ -86,8 +86,8 @@ class ITK_TEMPLATE_EXPORT AutoPointerDataObjectDecorator:public DataObject protected: AutoPointerDataObjectDecorator(); - ~AutoPointerDataObjectDecorator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~AutoPointerDataObjectDecorator() override; + void PrintSelf(std::ostream & os, Indent indent) const override; protected: diff --git a/Modules/Core/Common/include/itkBSplineDerivativeKernelFunction.h b/Modules/Core/Common/include/itkBSplineDerivativeKernelFunction.h index 86899e94f17..fa63e72c324 100644 --- a/Modules/Core/Common/include/itkBSplineDerivativeKernelFunction.h +++ b/Modules/Core/Common/include/itkBSplineDerivativeKernelFunction.h @@ -59,16 +59,16 @@ class BSplineDerivativeKernelFunction:public KernelFunctionBase itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder); /** Evaluate the function. */ - TRealValueType Evaluate( const TRealValueType & u ) const ITK_OVERRIDE + TRealValueType Evaluate( const TRealValueType & u ) const override { return this->Evaluate( Dispatch< VSplineOrder >(), u ); } protected: BSplineDerivativeKernelFunction() {} - virtual ~BSplineDerivativeKernelFunction() ITK_OVERRIDE {} + ~BSplineDerivativeKernelFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "Spline Order: " << SplineOrder << std::endl; diff --git a/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.h b/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.h index aef34394562..fc2062334f7 100644 --- a/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.h +++ b/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.h @@ -85,7 +85,7 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolationWeightFunction: /** Evaluate the weights at specified ContinuousIndex position. * Subclasses must provide this method. */ - virtual WeightsType Evaluate(const ContinuousIndexType & index) const ITK_OVERRIDE; + WeightsType Evaluate(const ContinuousIndexType & index) const override; /** Evaluate the weights at specified ContinuousIndex position. * The weights are returned in the user specified container. @@ -106,8 +106,8 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolationWeightFunction: protected: BSplineInterpolationWeightFunction(); - ~BSplineInterpolationWeightFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BSplineInterpolationWeightFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineInterpolationWeightFunction); diff --git a/Modules/Core/Common/include/itkBSplineKernelFunction.h b/Modules/Core/Common/include/itkBSplineKernelFunction.h index a49171d9396..11b57b92896 100644 --- a/Modules/Core/Common/include/itkBSplineKernelFunction.h +++ b/Modules/Core/Common/include/itkBSplineKernelFunction.h @@ -59,15 +59,15 @@ class ITK_TEMPLATE_EXPORT BSplineKernelFunction:public KernelFunctionBaseEvaluate(Dispatch< VSplineOrder >(), u); } protected: BSplineKernelFunction(){} - virtual ~BSplineKernelFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~BSplineKernelFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "Spline Order: " << SplineOrder << std::endl; diff --git a/Modules/Core/Common/include/itkBackwardDifferenceOperator.h b/Modules/Core/Common/include/itkBackwardDifferenceOperator.h index e717edc7034..74bdf6a4cba 100644 --- a/Modules/Core/Common/include/itkBackwardDifferenceOperator.h +++ b/Modules/Core/Common/include/itkBackwardDifferenceOperator.h @@ -62,10 +62,10 @@ class ITK_TEMPLATE_EXPORT BackwardDifferenceOperator: typedef typename Superclass::CoefficientVector CoefficientVector; /** Calculates operator coefficients. */ - CoefficientVector GenerateCoefficients(); + CoefficientVector GenerateCoefficients() override; /** Arranges coefficients spatially in the memory buffer. */ - void Fill(const CoefficientVector & coeff) + void Fill(const CoefficientVector & coeff) override { this->FillCenteredDirectional(coeff); } private: diff --git a/Modules/Core/Common/include/itkBarrier.h b/Modules/Core/Common/include/itkBarrier.h index ea5f013bf12..b17a96864b5 100644 --- a/Modules/Core/Common/include/itkBarrier.h +++ b/Modules/Core/Common/include/itkBarrier.h @@ -66,7 +66,7 @@ class ITKCommon_EXPORT Barrier private: Barrier(); - ~Barrier() ITK_OVERRIDE; + ~Barrier() override; unsigned int m_NumberArrived; unsigned int m_NumberExpected; diff --git a/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.h b/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.h index 0561b9dfc5b..9e2a72317c9 100644 --- a/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.h +++ b/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.h @@ -85,13 +85,13 @@ class ITK_TEMPLATE_EXPORT BinaryThresholdSpatialFunction: itkGetModifiableObjectMacro(Function, FunctionType); /** Evaluate the function at a given position. */ - virtual OutputType Evaluate(const InputType & point) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & point) const override; protected: BinaryThresholdSpatialFunction(); - ~BinaryThresholdSpatialFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryThresholdSpatialFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; FunctionOutputType m_LowerThreshold; FunctionOutputType m_UpperThreshold; diff --git a/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx b/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx index 11e1b0cbd29..4a867869a22 100644 --- a/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx @@ -28,7 +28,7 @@ BinaryThresholdSpatialFunction< TFunction > { m_LowerThreshold = NumericTraits< FunctionOutputType >::NonpositiveMin(); m_UpperThreshold = NumericTraits< FunctionOutputType >::max(); - m_Function = ITK_NULLPTR; + m_Function = nullptr; } template< typename TFunction > diff --git a/Modules/Core/Common/include/itkBoundingBox.h b/Modules/Core/Common/include/itkBoundingBox.h index 36b03aaa7fe..0205be1a777 100644 --- a/Modules/Core/Common/include/itkBoundingBox.h +++ b/Modules/Core/Common/include/itkBoundingBox.h @@ -126,11 +126,11 @@ class ITK_TEMPLATE_EXPORT BoundingBox:public Object * Therefore it is safe to invoke GetBounds() after any of those methods. */ itkGetConstReferenceMacro(Bounds, BoundsArrayType); - /** Get the center of the bounding box. Returns ITK_NULLPTR if bounding box + /** Get the center of the bounding box. Returns nullptr if bounding box * cannot be computed. */ PointType GetCenter() const; - /** Get the minimum point of the bounding box. Returns ITK_NULLPTR if bounding box + /** Get the minimum point of the bounding box. Returns nullptr if bounding box * cannot be computed. */ PointType GetMinimum() const; @@ -139,7 +139,7 @@ class ITK_TEMPLATE_EXPORT BoundingBox:public Object * set's) modified time changes. */ void SetMinimum(const PointType &); - /** Get the maximum point of the bounding box. Returns ITK_NULLPTR if bounding box + /** Get the maximum point of the bounding box. Returns nullptr if bounding box * cannot be computed. */ PointType GetMaximum() const; @@ -164,15 +164,15 @@ class ITK_TEMPLATE_EXPORT BoundingBox:public Object bool IsInside(const PointType &) const; /** Method Compute the Modified Time based on changed to the components. */ - virtual ModifiedTimeType GetMTime(void) const ITK_OVERRIDE; + ModifiedTimeType GetMTime(void) const override; /** Duplicates this bounding box */ Pointer DeepCopy() const; protected: BoundingBox(); - virtual ~BoundingBox() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BoundingBox() override; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef typename PointsContainer::ConstIterator ConstIterator; diff --git a/Modules/Core/Common/include/itkBoundingBox.hxx b/Modules/Core/Common/include/itkBoundingBox.hxx index 261f412c2b5..6247ae30c71 100644 --- a/Modules/Core/Common/include/itkBoundingBox.hxx +++ b/Modules/Core/Common/include/itkBoundingBox.hxx @@ -118,7 +118,7 @@ BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer > template< typename TPointIdentifier, int VPointDimension, typename TCoordRep, typename TPointsContainer > BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer > -::BoundingBox():m_PointsContainer(ITK_NULLPTR) +::BoundingBox():m_PointsContainer(nullptr) { m_Bounds.Fill(NumericTraits< CoordRepType >::ZeroValue()); m_CornersContainer = PointsContainer::New(); diff --git a/Modules/Core/Common/include/itkByteSwapper.h b/Modules/Core/Common/include/itkByteSwapper.h index eb352d5c1fa..db3a46874ed 100644 --- a/Modules/Core/Common/include/itkByteSwapper.h +++ b/Modules/Core/Common/include/itkByteSwapper.h @@ -124,7 +124,7 @@ class ITK_TEMPLATE_EXPORT ByteSwapper:public Object protected: ByteSwapper() {} - ~ByteSwapper() ITK_OVERRIDE {} + ~ByteSwapper() override {} /** Swap 2 bytes. */ static void Swap2(void *p); diff --git a/Modules/Core/Common/include/itkCellInterface.h b/Modules/Core/Common/include/itkCellInterface.h index 4f069a3156a..40d965a9f5e 100644 --- a/Modules/Core/Common/include/itkCellInterface.h +++ b/Modules/Core/Common/include/itkCellInterface.h @@ -33,7 +33,7 @@ return TopologyId; \ } \ virtual void Accept(CellIdentifier cellid, typename CellInterface< PixelType, \ - CellTraits >::MultiVisitor * mv) ITK_OVERRIDE \ + CellTraits >::MultiVisitor * mv) override \ { \ typename CellInterfaceVisitor< PixelType, CellTraits >::Pointer v = \ mv->GetVisitor(TopologyId); \ @@ -204,7 +204,7 @@ class ITK_TEMPLATE_EXPORT CellInterface return ( *pos ).second; } } - return ITK_NULLPTR; + return nullptr; } void AddVisitor(VisitorType *v) @@ -221,7 +221,7 @@ class ITK_TEMPLATE_EXPORT CellInterface } } - virtual ~MultiVisitor() ITK_OVERRIDE {} + ~MultiVisitor() override {} protected: VisitorPointer m_Visitors[LAST_ITK_CELL]; // fixed array set to the @@ -301,13 +301,13 @@ class ITK_TEMPLATE_EXPORT CellInterface /** Given the parametric coordinates of a point in the cell * (pCoords[CellDimension]), get the closest cell boundary feature of * topological dimension CellDimension-1. If the "inside" pointer is not - * ITK_NULLPTR, the flag is set to indicate whether the point is inside the cell. */ + * nullptr, the flag is set to indicate whether the point is inside the cell. */ virtual bool GetClosestBoundary(CoordRepType[], bool *, CellAutoPointer &) { return false; } /** Given the geometric coordinates of a point (coord[PointDimension]), * return whether it is inside the cell. Also perform the following - * calculations, if the corresponding result pointers are not ITK_NULLPTR: + * calculations, if the corresponding result pointers are not nullptr: * * - Find the closest point in or on the cell to the given point * (Returns through pointer to array: closestPoint[PointDimension]). @@ -339,7 +339,7 @@ class ITK_TEMPLATE_EXPORT CellInterface /** Intersect the cell with a line given by an origin (origin[PointDimension]) * and direction (direction[PointDimension]). The intersection point * found will be within the given tolerance of the real intersection. - * Get the following results if the corresponding pointers are not ITK_NULLPTR: + * Get the following results if the corresponding pointers are not nullptr: * * - The intersection point's geometric coordinates (returned through * pointer to array: coords[PointDimension]). @@ -362,7 +362,7 @@ class ITK_TEMPLATE_EXPORT CellInterface * Array is ordered (xmin, xmax, ymin, ymax, ....). A pointer to the * array is returned for convenience. This allows code like: * "CoordRep* bounds = cell->GetBoundingBox(new CoordRep[6]);". */ - CoordRepType * GetBoundingBox(CoordRepType[PointDimension * 2]) { return ITK_NULLPTR; } + CoordRepType * GetBoundingBox(CoordRepType[PointDimension * 2]) { return nullptr; } /** Compute the square of the diagonal length of the bounding box. */ CoordRepType GetBoundingBoxDiagonalLength2(void) { return NumericTraits< CoordRepType >::ZeroValue(); } @@ -370,7 +370,7 @@ class ITK_TEMPLATE_EXPORT CellInterface /** Intersect the given bounding box (bounds[PointDimension*2]) with a line * given by an origin (origin[PointDimension]) and direction * (direction[PointDimension]). Get the following results if the - * corresponding pointers are not ITK_NULLPTR: + * corresponding pointers are not nullptr: * * - The intersection point's geometric coordinates (returned through * pointer to array: coords[PointDimension]). diff --git a/Modules/Core/Common/include/itkCellInterfaceVisitor.h b/Modules/Core/Common/include/itkCellInterfaceVisitor.h index 60505b32733..75cf2cc8ed2 100644 --- a/Modules/Core/Common/include/itkCellInterfaceVisitor.h +++ b/Modules/Core/Common/include/itkCellInterfaceVisitor.h @@ -69,7 +69,7 @@ class ITK_TEMPLATE_EXPORT CellInterfaceVisitor:public LightObject protected: CellInterfaceVisitor() {} - ~CellInterfaceVisitor() ITK_OVERRIDE {} + ~CellInterfaceVisitor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(CellInterfaceVisitor); @@ -124,19 +124,19 @@ class CellInterfaceVisitorImplementation: /** Call the static method GetTopologyId for the CellTopology type that * we are templated over. */ - virtual int GetCellTopologyId() ITK_OVERRIDE { return CellTopology::GetTopologyId(); } + int GetCellTopologyId() override { return CellTopology::GetTopologyId(); } /** Call the method Visit from the UserVisitor template parameter that * this class inherits from. I am my own gradpa... */ void VisitFromCell(CellIdentifier cellId, CellInterface< TPixelType, - TCellTraits > *c) ITK_OVERRIDE + TCellTraits > *c) override { this->UserVisitor::Visit(cellId, (CellTopology *)c); } protected: CellInterfaceVisitorImplementation() {} - ~CellInterfaceVisitorImplementation() ITK_OVERRIDE {} + ~CellInterfaceVisitorImplementation() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(CellInterfaceVisitorImplementation); diff --git a/Modules/Core/Common/include/itkChildTreeIterator.h b/Modules/Core/Common/include/itkChildTreeIterator.h index e78a7fa41cb..8194ab72eba 100644 --- a/Modules/Core/Common/include/itkChildTreeIterator.h +++ b/Modules/Core/Common/include/itkChildTreeIterator.h @@ -37,22 +37,22 @@ class ITK_TEMPLATE_EXPORT ChildTreeIterator:public TreeIteratorBase< TTreeType > typedef typename Superclass::NodeType NodeType; /** Constructor */ - ChildTreeIterator(TreeType *tree, const TreeNodeType *start = ITK_NULLPTR); + ChildTreeIterator(TreeType *tree, const TreeNodeType *start = nullptr); /** Constructor */ ChildTreeIterator(const TreeIteratorBase< TTreeType > & iterator); /** Get the type of the iterator */ - NodeType GetType() const; + NodeType GetType() const override; /** Go to a specific child node */ - virtual bool GoToChild(ChildIdentifier number = 0); + bool GoToChild(ChildIdentifier number = 0) override; /** Go to a parent node */ - virtual bool GoToParent(); + bool GoToParent() override; /** Clone function */ - TreeIteratorBase< TTreeType > * Clone(); + TreeIteratorBase< TTreeType > * Clone() override; /** operator = */ Self & operator=(Superclass & iterator) @@ -71,10 +71,10 @@ class ITK_TEMPLATE_EXPORT ChildTreeIterator:public TreeIteratorBase< TTreeType > protected: /** Get the next value */ - const ValueType & Next(); + const ValueType & Next() override; /** Return true if the next value exists */ - bool HasNext() const; + bool HasNext() const override; private: diff --git a/Modules/Core/Common/include/itkChildTreeIterator.hxx b/Modules/Core/Common/include/itkChildTreeIterator.hxx index ef0fe1a00ab..ac09fb252fa 100644 --- a/Modules/Core/Common/include/itkChildTreeIterator.hxx +++ b/Modules/Core/Common/include/itkChildTreeIterator.hxx @@ -50,7 +50,7 @@ template< typename TTreeType > bool ChildTreeIterator< TTreeType >::GoToChild(ChildIdentifier number) { - if ( m_ParentNode->GetChild(number) == ITK_NULLPTR ) + if ( m_ParentNode->GetChild(number) == nullptr ) { return false; } @@ -69,7 +69,7 @@ ChildTreeIterator< TTreeType >::GoToParent() { TreeNodeType *parent = m_ParentNode->GetParent(); - if ( parent == ITK_NULLPTR ) + if ( parent == nullptr ) { return false; } diff --git a/Modules/Core/Common/include/itkColorTable.h b/Modules/Core/Common/include/itkColorTable.h index 8dd9b62b9c8..15d1d93bcd0 100644 --- a/Modules/Core/Common/include/itkColorTable.h +++ b/Modules/Core/Common/include/itkColorTable.h @@ -108,7 +108,7 @@ class ITK_TEMPLATE_EXPORT ColorTable:public Object protected: ColorTable(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: typedef std::vector< std::string > ColorNameVectorType; diff --git a/Modules/Core/Common/include/itkCommand.h b/Modules/Core/Common/include/itkCommand.h index 9bc35f3d912..02c6a063eed 100644 --- a/Modules/Core/Common/include/itkCommand.h +++ b/Modules/Core/Common/include/itkCommand.h @@ -63,7 +63,7 @@ class ITKCommon_EXPORT Command:public Object protected: Command(); - ~Command() ITK_OVERRIDE; + ~Command() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Command); @@ -116,7 +116,7 @@ class ITK_TEMPLATE_EXPORT MemberCommand:public Command } /** Invoke the member function. */ - virtual void Execute(Object *caller, const EventObject & event) ITK_OVERRIDE + void Execute(Object *caller, const EventObject & event) override { if ( m_MemberFunction ) { @@ -125,7 +125,7 @@ class ITK_TEMPLATE_EXPORT MemberCommand:public Command } /** Invoke the member function with a const object. */ - virtual void Execute(const Object *caller, const EventObject & event) ITK_OVERRIDE + void Execute(const Object *caller, const EventObject & event) override { if ( m_ConstMemberFunction ) { @@ -139,12 +139,12 @@ class ITK_TEMPLATE_EXPORT MemberCommand:public Command TConstMemberFunctionPointer m_ConstMemberFunction; MemberCommand() : - m_This( ITK_NULLPTR ), - m_MemberFunction( ITK_NULLPTR ), - m_ConstMemberFunction( ITK_NULLPTR ) + m_This( nullptr ), + m_MemberFunction( nullptr ), + m_ConstMemberFunction( nullptr ) {} - virtual ~MemberCommand() ITK_OVERRIDE {} + ~MemberCommand() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MemberCommand); @@ -186,7 +186,7 @@ class ITK_TEMPLATE_EXPORT ReceptorMemberCommand:public Command } /** Invoke the member function. */ - virtual void Execute(Object *, const EventObject & event) ITK_OVERRIDE + void Execute(Object *, const EventObject & event) override { if ( m_MemberFunction ) { @@ -195,7 +195,7 @@ class ITK_TEMPLATE_EXPORT ReceptorMemberCommand:public Command } /** Invoke the member function with a const object */ - virtual void Execute(const Object *, const EventObject & event) ITK_OVERRIDE + void Execute(const Object *, const EventObject & event) override { if ( m_MemberFunction ) { @@ -208,11 +208,11 @@ class ITK_TEMPLATE_EXPORT ReceptorMemberCommand:public Command TMemberFunctionPointer m_MemberFunction; ReceptorMemberCommand() : - m_This( ITK_NULLPTR ), - m_MemberFunction( ITK_NULLPTR ) + m_This( nullptr ), + m_MemberFunction( nullptr ) {} - virtual ~ReceptorMemberCommand() ITK_OVERRIDE {} + ~ReceptorMemberCommand() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ReceptorMemberCommand); @@ -253,7 +253,7 @@ class ITK_TEMPLATE_EXPORT SimpleMemberCommand:public Command } /** Invoke the callback function. */ - virtual void Execute(Object *, const EventObject &) ITK_OVERRIDE + void Execute(Object *, const EventObject &) override { if ( m_MemberFunction ) { @@ -261,7 +261,7 @@ class ITK_TEMPLATE_EXPORT SimpleMemberCommand:public Command } } - virtual void Execute(const Object *, const EventObject &) ITK_OVERRIDE + void Execute(const Object *, const EventObject &) override { if ( m_MemberFunction ) { @@ -274,11 +274,11 @@ class ITK_TEMPLATE_EXPORT SimpleMemberCommand:public Command TMemberFunctionPointer m_MemberFunction; SimpleMemberCommand() : - m_This( ITK_NULLPTR ), - m_MemberFunction( ITK_NULLPTR ) + m_This( nullptr ), + m_MemberFunction( nullptr ) {} - virtual ~SimpleMemberCommand() ITK_OVERRIDE {} + ~SimpleMemberCommand() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SimpleMemberCommand); @@ -319,7 +319,7 @@ class ITK_TEMPLATE_EXPORT SimpleConstMemberCommand:public Command } /** Invoke the const member method callback. */ - virtual void Execute(Object *, const EventObject &) ITK_OVERRIDE + void Execute(Object *, const EventObject &) override { if ( m_MemberFunction ) { @@ -327,7 +327,7 @@ class ITK_TEMPLATE_EXPORT SimpleConstMemberCommand:public Command } } - virtual void Execute(const Object *, const EventObject &) ITK_OVERRIDE + void Execute(const Object *, const EventObject &) override { if ( m_MemberFunction ) { @@ -340,11 +340,11 @@ class ITK_TEMPLATE_EXPORT SimpleConstMemberCommand:public Command TMemberFunctionPointer m_MemberFunction; SimpleConstMemberCommand() : - m_This( ITK_NULLPTR ), - m_MemberFunction( ITK_NULLPTR ) + m_This( nullptr ), + m_MemberFunction( nullptr ) {} - virtual ~SimpleConstMemberCommand() {} + ~SimpleConstMemberCommand() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SimpleConstMemberCommand); @@ -393,14 +393,14 @@ class ITKCommon_EXPORT CStyleCommand:public Command void SetClientDataDeleteCallback(DeleteDataFunctionPointer f); /** Execute the callback function. */ - virtual void Execute(Object *caller, const EventObject & event) ITK_OVERRIDE; + void Execute(Object *caller, const EventObject & event) override; /** Execute the callback function with a const Object */ - virtual void Execute(const Object *caller, const EventObject & event) ITK_OVERRIDE; + void Execute(const Object *caller, const EventObject & event) override; protected: CStyleCommand(); - ~CStyleCommand() ITK_OVERRIDE; + ~CStyleCommand() override; void * m_ClientData; FunctionPointer m_Callback; diff --git a/Modules/Core/Common/include/itkConditionVariable.h b/Modules/Core/Common/include/itkConditionVariable.h index 0211e591d40..7487059f398 100644 --- a/Modules/Core/Common/include/itkConditionVariable.h +++ b/Modules/Core/Common/include/itkConditionVariable.h @@ -83,7 +83,7 @@ class ITKCommon_EXPORT ConditionVariable:public LightObject protected: ConditionVariable(); - ~ConditionVariable() ITK_OVERRIDE; + ~ConditionVariable() override; private: ConditionVariable(const Self & other); diff --git a/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h b/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h index 22c9f4ba979..a2df6f7efef 100644 --- a/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h +++ b/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.h @@ -86,7 +86,7 @@ class ITK_TEMPLATE_EXPORT ConicShellInteriorExteriorSpatialFunction: typedef CovariantVector< double, VDimension > GradientType; /** Evaluates the function at a given position. */ - OutputType Evaluate(const InputType & position) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & position) const override; /** Set/Get the origin of the function. */ itkGetConstMacro(Origin, InputType); @@ -117,8 +117,8 @@ class ITK_TEMPLATE_EXPORT ConicShellInteriorExteriorSpatialFunction: protected: ConicShellInteriorExteriorSpatialFunction(); - virtual ~ConicShellInteriorExteriorSpatialFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ConicShellInteriorExteriorSpatialFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ConicShellInteriorExteriorSpatialFunction); diff --git a/Modules/Core/Common/include/itkConstNeighborhoodIterator.h b/Modules/Core/Common/include/itkConstNeighborhoodIterator.h index 4c273e1dc2c..84acbb6d2e2 100644 --- a/Modules/Core/Common/include/itkConstNeighborhoodIterator.h +++ b/Modules/Core/Common/include/itkConstNeighborhoodIterator.h @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT ConstNeighborhoodIterator: ConstNeighborhoodIterator(); /** Virtual destructor */ - virtual ~ConstNeighborhoodIterator() {} + ~ConstNeighborhoodIterator() override {} /** Copy constructor */ ConstNeighborhoodIterator(const ConstNeighborhoodIterator &); @@ -126,7 +126,7 @@ class ITK_TEMPLATE_EXPORT ConstNeighborhoodIterator: Self & operator=(const Self & orig); /** Standard itk print method */ - virtual void PrintSelf(std::ostream &, Indent) const; + void PrintSelf(std::ostream &, Indent) const override; /** Computes the internal, N-d offset of a pixel array position n from * (0,0, ..., 0) in the "upper-left" corner of the neighborhood. */ diff --git a/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx b/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx index 226886e0a3e..3b0e07a7b8e 100644 --- a/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx +++ b/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx @@ -222,10 +222,10 @@ ConstNeighborhoodIterator< TImage, TBoundaryCondition > SizeType zeroSize; zeroSize.Fill(0); m_Bound.Fill(0); - m_Begin = ITK_NULLPTR; + m_Begin = nullptr; m_BeginIndex.Fill(0); - m_End = ITK_NULLPTR; + m_End = nullptr; m_EndIndex.Fill(0); m_Loop.Fill(0); m_Region.SetIndex(zeroIndex); diff --git a/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.h b/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.h index 3e07fccf8ec..4da377ec791 100644 --- a/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.h +++ b/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.h @@ -94,7 +94,7 @@ class ITK_TEMPLATE_EXPORT ConstNeighborhoodIteratorWithOnlyIndex: ConstNeighborhoodIteratorWithOnlyIndex(); /** Virtual destructor */ - virtual ~ConstNeighborhoodIteratorWithOnlyIndex() {} + ~ConstNeighborhoodIteratorWithOnlyIndex() override {} /** Copy constructor */ ConstNeighborhoodIteratorWithOnlyIndex(const ConstNeighborhoodIteratorWithOnlyIndex &); @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT ConstNeighborhoodIteratorWithOnlyIndex: Self & operator=(const Self & orig); /** Standard itk print method */ - virtual void PrintSelf(std::ostream &, Indent) const; + void PrintSelf(std::ostream &, Indent) const override; /** Computes the internal, N-d offset of a pixel array position n from * (0,0, ..., 0) in the "upper-left" corner of the neighborhood. */ diff --git a/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h b/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h index 4a877d21810..e69973d6eaf 100644 --- a/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h +++ b/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h @@ -117,7 +117,7 @@ class ITK_TEMPLATE_EXPORT ConstShapedNeighborhoodIterator: /** Const Interator */ struct ConstIterator { - ConstIterator() { m_NeighborhoodIterator = ITK_NULLPTR; } + ConstIterator() { m_NeighborhoodIterator = nullptr; } ConstIterator(Self *s) { m_NeighborhoodIterator = s; @@ -229,7 +229,7 @@ class ITK_TEMPLATE_EXPORT ConstShapedNeighborhoodIterator: } /** Virtual destructor */ - virtual ~ConstShapedNeighborhoodIterator() {} + ~ConstShapedNeighborhoodIterator() override {} /** Constructor which establishes the region size, neighborhood, and image * over which to walk. */ @@ -296,7 +296,7 @@ class ITK_TEMPLATE_EXPORT ConstShapedNeighborhoodIterator: } /** Standard itk print method */ - virtual void PrintSelf(std::ostream &, Indent) const; + void PrintSelf(std::ostream &, Indent) const override; /** Add/Remove a neighborhood offset (from the center of the neighborhood) * to/from the active list. Active list offsets are the only locations diff --git a/Modules/Core/Common/include/itkConstantBoundaryCondition.h b/Modules/Core/Common/include/itkConstantBoundaryCondition.h index 063888c6b1d..914cc565535 100644 --- a/Modules/Core/Common/include/itkConstantBoundaryCondition.h +++ b/Modules/Core/Common/include/itkConstantBoundaryCondition.h @@ -92,13 +92,13 @@ class ITK_TEMPLATE_EXPORT ConstantBoundaryCondition: ConstantBoundaryCondition(); /** Runtime information support. */ - virtual const char * GetNameOfClass() const + const char * GetNameOfClass() const override { return "itkConstantBoundaryCondition"; } /** Utility for printing the boundary condition. */ - virtual void Print( std::ostream & os, Indent i = 0 ) const; + void Print( std::ostream & os, Indent i = 0 ) const override; /** Special version of initialize for images with pixel type * VariableLengthVector. */ @@ -107,17 +107,17 @@ class ITK_TEMPLATE_EXPORT ConstantBoundaryCondition: /** Computes and returns appropriate out-of-bounds values from * neighborhood iterator data. */ - virtual OutputPixelType operator()(const OffsetType &, + OutputPixelType operator()(const OffsetType &, const OffsetType &, - const NeighborhoodType *) const; + const NeighborhoodType *) const override; /** Computes and returns the appropriate pixel value from * neighborhood iterator data, using the functor. */ - virtual OutputPixelType operator()( + OutputPixelType operator()( const OffsetType &, const OffsetType &, const NeighborhoodType *, - const NeighborhoodAccessorFunctorType &) const; + const NeighborhoodAccessorFunctorType &) const override; /** Set the value of the constant. */ void SetConstant(const OutputPixelType & c); @@ -128,7 +128,7 @@ class ITK_TEMPLATE_EXPORT ConstantBoundaryCondition: /** Tell if the boundary condition can index to any location within * the associated iterator's neighborhood or if it has some limited * subset (such as none) that it relies upon. */ - bool RequiresCompleteNeighborhood() { return false; } + bool RequiresCompleteNeighborhood() override { return false; } /** Determines the necessary input region for the output region. * For this boundary condition, only the intersection of the largest @@ -139,8 +139,8 @@ class ITK_TEMPLATE_EXPORT ConstantBoundaryCondition: * \return The necessary input region required to determine the * pixel values in the outputRequestedRegion. */ - virtual RegionType GetInputRequestedRegion( const RegionType & inputLargestPossibleRegion, - const RegionType & outputRequestedRegion ) const; + RegionType GetInputRequestedRegion( const RegionType & inputLargestPossibleRegion, + const RegionType & outputRequestedRegion ) const override; /** Returns a value for a given pixel at an index. If the index is inside the * bounds of the input image, then the pixel value is obtained from @@ -149,7 +149,7 @@ class ITK_TEMPLATE_EXPORT ConstantBoundaryCondition: * \param index The index of the desired pixel. * \param image The image from which pixel values should be determined. */ - OutputPixelType GetPixel( const IndexType & index, const TInputImage * image ) const; + OutputPixelType GetPixel( const IndexType & index, const TInputImage * image ) const override; private: OutputPixelType m_Constant; diff --git a/Modules/Core/Common/include/itkCreateObjectFunction.h b/Modules/Core/Common/include/itkCreateObjectFunction.h index e967708dbe7..3be7a9f7a7c 100644 --- a/Modules/Core/Common/include/itkCreateObjectFunction.h +++ b/Modules/Core/Common/include/itkCreateObjectFunction.h @@ -43,7 +43,7 @@ class ITKCommon_EXPORT CreateObjectFunctionBase:public Object protected: CreateObjectFunctionBase(); - ~CreateObjectFunctionBase(); + ~CreateObjectFunctionBase() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CreateObjectFunctionBase); @@ -66,11 +66,11 @@ class CreateObjectFunction:public CreateObjectFunctionBase /** Methods from itk:LightObject. */ itkFactorylessNewMacro(Self); - virtual LightObject::Pointer CreateObject() ITK_OVERRIDE { return T::New().GetPointer(); } + LightObject::Pointer CreateObject() override { return T::New().GetPointer(); } protected: CreateObjectFunction() {} - ~CreateObjectFunction() ITK_OVERRIDE {} + ~CreateObjectFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(CreateObjectFunction); diff --git a/Modules/Core/Common/include/itkDataObject.h b/Modules/Core/Common/include/itkDataObject.h index 58f52e6929c..ae797b65d19 100644 --- a/Modules/Core/Common/include/itkDataObject.h +++ b/Modules/Core/Common/include/itkDataObject.h @@ -53,7 +53,7 @@ class ITKCommon_EXPORT DataObjectError:public ExceptionObject DataObjectError(); /** Destructor. Need to specify empty throw() to avoid warnings. */ - virtual ~DataObjectError() ITK_NOEXCEPT ITK_OVERRIDE {} + ~DataObjectError() ITK_NOEXCEPT override {} /** Constructor. Needed to ensure the exception object can be copied. */ DataObjectError(const char *file, unsigned int lineNumber); @@ -101,7 +101,7 @@ class ITKCommon_EXPORT InvalidRequestedRegionError:public DataObjectError InvalidRequestedRegionError(); /** Destructor. Need to specify empty throw() to avoid warnings. */ - virtual ~InvalidRequestedRegionError() ITK_NOEXCEPT ITK_OVERRIDE {} + ~InvalidRequestedRegionError() ITK_NOEXCEPT override {} /** Constructor. Needed to ensure the exception object can be copied. */ InvalidRequestedRegionError(const char *file, unsigned int lineNumber); @@ -123,7 +123,7 @@ class ITKCommon_EXPORT InvalidRequestedRegionError:public DataObjectError * specific exception subtypes. The default is to print out the * location where the exception was first thrown and any description * provided by the "thrower". */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; /*----------------------------Data Object--------------------------------*/ @@ -479,8 +479,8 @@ class ITK_FORCE_EXPORT_MACRO(ITKCommon) DataObject:public Object protected: DataObject(); - virtual ~DataObject() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DataObject() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Propagate a call to ResetPipeline(). Called only from ProcessObject. */ virtual void PropagateResetPipeline(); diff --git a/Modules/Core/Common/include/itkDataObjectDecorator.h b/Modules/Core/Common/include/itkDataObjectDecorator.h index 590d0370371..9a148ae0308 100644 --- a/Modules/Core/Common/include/itkDataObjectDecorator.h +++ b/Modules/Core/Common/include/itkDataObjectDecorator.h @@ -91,12 +91,12 @@ class ITK_TEMPLATE_EXPORT DataObjectDecorator:public DataObject virtual ComponentType * GetModifiable(); /** The most recent MTime of this object and the held component */ - virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE; + ModifiedTimeType GetMTime() const override; /** Restore the data object to its initial state. This means * releasing the help component. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** \brief Graft the content of one decorator onto another * @@ -104,7 +104,7 @@ class ITK_TEMPLATE_EXPORT DataObjectDecorator:public DataObject * then the component pointer is copies to that both decorators * refer to the same object. */ - virtual void Graft( const DataObject * ) ITK_OVERRIDE; + void Graft( const DataObject * ) override; void Graft( const Self * decorator ); /** Method to aid in dynamic Graft of polymorphic types. @@ -125,8 +125,8 @@ class ITK_TEMPLATE_EXPORT DataObjectDecorator:public DataObject protected: DataObjectDecorator(); - ~DataObjectDecorator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DataObjectDecorator() override; + void PrintSelf(std::ostream & os, Indent indent) const override; protected: diff --git a/Modules/Core/Common/include/itkDataObjectDecorator.hxx b/Modules/Core/Common/include/itkDataObjectDecorator.hxx index 2087e68d2ad..74d2c35dd87 100644 --- a/Modules/Core/Common/include/itkDataObjectDecorator.hxx +++ b/Modules/Core/Common/include/itkDataObjectDecorator.hxx @@ -121,7 +121,7 @@ DataObjectDecorator< T > { this->SetTimeStamp(m_Component->GetTimeStamp()); } - m_Component = ITK_NULLPTR; + m_Component = nullptr; } /** diff --git a/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h b/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h index 8ba0c330f89..de8fe68c5d9 100644 --- a/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h +++ b/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h @@ -77,7 +77,7 @@ class DefaultVectorPixelAccessorFunctor } - DefaultVectorPixelAccessorFunctor () : m_Begin(ITK_NULLPTR) {} + DefaultVectorPixelAccessorFunctor () : m_Begin(nullptr) {} /** Set the PixelAccessor. This is set at construction time by the image iterators. * The type PixelAccessorType is obtained from the ImageType over which the iterators diff --git a/Modules/Core/Common/include/itkDerivativeOperator.h b/Modules/Core/Common/include/itkDerivativeOperator.h index 3012564294f..0e1794c18aa 100644 --- a/Modules/Core/Common/include/itkDerivativeOperator.h +++ b/Modules/Core/Common/include/itkDerivativeOperator.h @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT DerivativeOperator: unsigned int GetOrder() const { return m_Order; } /** Prints some debugging information */ - virtual void PrintSelf(std::ostream & os, Indent i) const + void PrintSelf(std::ostream & os, Indent i) const override { os << i << "DerivativeOperator { this=" << this << ", m_Order = " << m_Order << "}" << std::endl; @@ -118,10 +118,10 @@ class ITK_TEMPLATE_EXPORT DerivativeOperator: typedef typename Superclass::CoefficientVector CoefficientVector; /** Calculates operator coefficients. */ - CoefficientVector GenerateCoefficients(); + CoefficientVector GenerateCoefficients() override; /** Arranges coefficients spatially in the memory buffer. */ - void Fill(const CoefficientVector & coeff) + void Fill(const CoefficientVector & coeff) override { Superclass::FillCenteredDirectional(coeff); } private: diff --git a/Modules/Core/Common/include/itkDirectory.h b/Modules/Core/Common/include/itkDirectory.h index 5593d8bb19d..1b99d74e239 100644 --- a/Modules/Core/Common/include/itkDirectory.h +++ b/Modules/Core/Common/include/itkDirectory.h @@ -65,8 +65,8 @@ class ITKCommon_EXPORT Directory:public Object protected: Directory(); - ~Directory() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~Directory() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Directory); diff --git a/Modules/Core/Common/include/itkDomainThreader.h b/Modules/Core/Common/include/itkDomainThreader.h index ac662d089f3..71f0f04d9c5 100644 --- a/Modules/Core/Common/include/itkDomainThreader.h +++ b/Modules/Core/Common/include/itkDomainThreader.h @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT DomainThreader: public Object protected: DomainThreader(); - virtual ~DomainThreader() ITK_OVERRIDE; + ~DomainThreader() override; /** This is evauated at the beginning of Execute() so that it can be used in * BeforeThreadedExecution(). */ diff --git a/Modules/Core/Common/include/itkDomainThreader.hxx b/Modules/Core/Common/include/itkDomainThreader.hxx index 6753d3ebeec..a89ca8dc6f4 100644 --- a/Modules/Core/Common/include/itkDomainThreader.hxx +++ b/Modules/Core/Common/include/itkDomainThreader.hxx @@ -30,7 +30,7 @@ DomainThreader< TDomainPartitioner, TAssociate > this->m_DomainPartitioner = DomainPartitionerType::New(); this->m_MultiThreader = MultiThreader::New(); this->m_NumberOfThreadsUsed = 0; - this->m_Associate = ITK_NULLPTR; + this->m_Associate = nullptr; } template< typename TDomainPartitioner, typename TAssociate > diff --git a/Modules/Core/Common/include/itkDynamicLoader.h b/Modules/Core/Common/include/itkDynamicLoader.h index a69ccab063b..0f6e534fed3 100644 --- a/Modules/Core/Common/include/itkDynamicLoader.h +++ b/Modules/Core/Common/include/itkDynamicLoader.h @@ -78,7 +78,7 @@ class ITKCommon_EXPORT DynamicLoader:public Object protected: DynamicLoader(); - ~DynamicLoader() ITK_OVERRIDE; + ~DynamicLoader() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DynamicLoader); diff --git a/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.h b/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.h index 6bd00bbbe63..2c4510a75a3 100644 --- a/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.h +++ b/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.h @@ -75,13 +75,13 @@ class ITK_TEMPLATE_EXPORT EllipsoidInteriorExteriorSpatialFunction: void SetOrientations(const OrientationType &); /** Evaluates the function at a given position. */ - OutputType Evaluate(const InputType & position) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & position) const override; protected: EllipsoidInteriorExteriorSpatialFunction(); - virtual ~EllipsoidInteriorExteriorSpatialFunction() ITK_OVERRIDE; + ~EllipsoidInteriorExteriorSpatialFunction() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(EllipsoidInteriorExteriorSpatialFunction); diff --git a/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx b/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx index 8010d2a448f..e18465270f3 100644 --- a/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx @@ -27,7 +27,7 @@ template< unsigned int VDimension, typename TInput > EllipsoidInteriorExteriorSpatialFunction< VDimension, TInput > ::EllipsoidInteriorExteriorSpatialFunction() { - m_Orientations = ITK_NULLPTR; + m_Orientations = nullptr; m_Axes.Fill(1.0f); // Lengths of ellipsoid axes. m_Center.Fill(0.0f); // Origin of ellipsoid } diff --git a/Modules/Core/Common/include/itkEquivalencyTable.h b/Modules/Core/Common/include/itkEquivalencyTable.h index f7205f66b93..c135a83db86 100644 --- a/Modules/Core/Common/include/itkEquivalencyTable.h +++ b/Modules/Core/Common/include/itkEquivalencyTable.h @@ -136,10 +136,10 @@ class ITKCommon_EXPORT EquivalencyTable:public DataObject protected: EquivalencyTable() {} - virtual ~EquivalencyTable() ITK_OVERRIDE {} + ~EquivalencyTable() override {} ITK_DISALLOW_COPY_AND_ASSIGN(EquivalencyTable); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; HashTableType m_HashMap; }; diff --git a/Modules/Core/Common/include/itkEventObject.h b/Modules/Core/Common/include/itkEventObject.h index 1cfb09fac32..56971b5d555 100644 --- a/Modules/Core/Common/include/itkEventObject.h +++ b/Modules/Core/Common/include/itkEventObject.h @@ -134,7 +134,7 @@ classname::classname(const classname &s):super(s){}; \ classname::~classname() {} \ const char * classname::GetEventName() const { return #classname; } \ bool classname::CheckEvent(const::itk::EventObject * e) const \ - { return ( dynamic_cast< const classname * >( e ) != ITK_NULLPTR ); } \ + { return ( dynamic_cast< const classname * >( e ) != nullptr ); } \ ::itk::EventObject *classname::MakeObject() const { return new classname; } \ // @@ -157,7 +157,7 @@ public: \ virtual ~classname() {} \ virtual const char *GetEventName() const { return #classname; } \ virtual bool CheckEvent(const::itk::EventObject * e) const \ - { return ( dynamic_cast< const Self * >( e ) != ITK_NULLPTR ); } \ + { return ( dynamic_cast< const Self * >( e ) != nullptr ); } \ virtual::itk::EventObject *MakeObject() const \ { return new Self; } \ classname(const Self &s):super(s){}; \ diff --git a/Modules/Core/Common/include/itkExceptionObject.h b/Modules/Core/Common/include/itkExceptionObject.h index bf173d328fc..c1dc259e4c7 100644 --- a/Modules/Core/Common/include/itkExceptionObject.h +++ b/Modules/Core/Common/include/itkExceptionObject.h @@ -64,7 +64,7 @@ class ITKCommon_EXPORT ExceptionObject:public std::exception ExceptionObject(const ExceptionObject & orig); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~ExceptionObject() ITK_NOEXCEPT ITK_OVERRIDE; + ~ExceptionObject() ITK_NOEXCEPT override; /** Assignment operator. */ ExceptionObject & operator=(const ExceptionObject & orig); @@ -103,7 +103,7 @@ class ITKCommon_EXPORT ExceptionObject:public std::exception virtual unsigned int GetLine() const; /** Provide std::exception::what() implementation. */ - virtual const char * what() const ITK_NOEXCEPT ITK_OVERRIDE; + const char * what() const ITK_NOEXCEPT override; private: /** \class ReferenceCounterInterface @@ -183,9 +183,9 @@ class ITKCommon_EXPORT MemoryAllocationError:public ExceptionObject const std::string & loc):ExceptionObject(file, lineNumber, desc, loc) {} /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~MemoryAllocationError() ITK_NOEXCEPT ITK_OVERRIDE; + ~MemoryAllocationError() ITK_NOEXCEPT override; - virtual const char * GetNameOfClass() const ITK_OVERRIDE + const char * GetNameOfClass() const override { return "MemoryAllocationError"; } }; @@ -208,9 +208,9 @@ class ITKCommon_EXPORT RangeError:public ExceptionObject RangeError(const std::string & file, unsigned int lineNumber):ExceptionObject(file, lineNumber) {} /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~RangeError() ITK_NOEXCEPT ITK_OVERRIDE; + ~RangeError() ITK_NOEXCEPT override; - virtual const char * GetNameOfClass() const ITK_OVERRIDE + const char * GetNameOfClass() const override { return "RangeError"; } }; @@ -240,9 +240,9 @@ class ITKCommon_EXPORT InvalidArgumentError:public ExceptionObject InvalidArgumentError(const std::string & file, unsigned int lineNumber):ExceptionObject(file, lineNumber) {} /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~InvalidArgumentError() ITK_NOEXCEPT ITK_OVERRIDE; + ~InvalidArgumentError() ITK_NOEXCEPT override; - virtual const char * GetNameOfClass() const ITK_OVERRIDE + const char * GetNameOfClass() const override { return "InvalidArgumentError"; } }; @@ -265,9 +265,9 @@ class ITKCommon_EXPORT IncompatibleOperandsError:public ExceptionObject IncompatibleOperandsError(const std::string & file, unsigned int lineNumber):ExceptionObject(file, lineNumber) {} /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~IncompatibleOperandsError() ITK_NOEXCEPT ITK_OVERRIDE; + ~IncompatibleOperandsError() ITK_NOEXCEPT override; - virtual const char * GetNameOfClass() const ITK_OVERRIDE + const char * GetNameOfClass() const override { return "IncompatibleOperandsError"; } }; @@ -299,9 +299,9 @@ class ITKCommon_EXPORT ProcessAborted:public ExceptionObject } /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~ProcessAborted() ITK_NOEXCEPT ITK_OVERRIDE; + ~ProcessAborted() ITK_NOEXCEPT override; - virtual const char * GetNameOfClass() const ITK_OVERRIDE + const char * GetNameOfClass() const override { return "ProcessAborted"; } }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkExtractImageFilter.h b/Modules/Core/Common/include/itkExtractImageFilter.h index d15bfdc66e0..690f0205b1c 100644 --- a/Modules/Core/Common/include/itkExtractImageFilter.h +++ b/Modules/Core/Common/include/itkExtractImageFilter.h @@ -229,8 +229,8 @@ class ITK_TEMPLATE_EXPORT ExtractImageFilter: protected: ExtractImageFilter(); - ~ExtractImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ExtractImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** ExtractImageFilter can produce an image which is a different * resolution than its input image. As such, ExtractImageFilter @@ -240,7 +240,7 @@ class ITK_TEMPLATE_EXPORT ExtractImageFilter: * below. * * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** This function calls the actual region copier to do the mapping from * output image space to input image space. It uses a @@ -252,8 +252,8 @@ class ITK_TEMPLATE_EXPORT ExtractImageFilter: * support output images of a lower dimension that the input. * * \sa ImageToImageFilter::CallCopyRegion() */ - virtual void CallCopyOutputRegionToInputRegion(InputImageRegionType & destRegion, - const OutputImageRegionType & srcRegion) ITK_OVERRIDE; + void CallCopyOutputRegionToInputRegion(InputImageRegionType & destRegion, + const OutputImageRegionType & srcRegion) override; /** ExtractImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() @@ -265,12 +265,12 @@ class ITK_TEMPLATE_EXPORT ExtractImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** Overridden to check if there is no work to be done, before * calling superclass' implementation. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; InputImageRegionType m_ExtractionRegion; diff --git a/Modules/Core/Common/include/itkExtractImageFilterRegionCopier.h b/Modules/Core/Common/include/itkExtractImageFilterRegionCopier.h index 3ff572bcaa6..a95c616220b 100644 --- a/Modules/Core/Common/include/itkExtractImageFilterRegionCopier.h +++ b/Modules/Core/Common/include/itkExtractImageFilterRegionCopier.h @@ -150,8 +150,8 @@ class ExtractImageFilterRegionCopier: } /** Duplicate the superclass method to avoid warnings. */ - virtual void operator()(ImageRegion< T1 > & destRegion, - const ImageRegion< T2 > & srcRegion) const + void operator()(ImageRegion< T1 > & destRegion, + const ImageRegion< T2 > & srcRegion) const override { ImageRegionCopier< T1, T2 >::operator()(destRegion, srcRegion); } diff --git a/Modules/Core/Common/include/itkFastMutexLock.h b/Modules/Core/Common/include/itkFastMutexLock.h index 2f637746e5f..038cb796f4e 100644 --- a/Modules/Core/Common/include/itkFastMutexLock.h +++ b/Modules/Core/Common/include/itkFastMutexLock.h @@ -84,10 +84,10 @@ class ITKCommon_EXPORT FastMutexLock:public Object protected: FastMutexLock() {} - ~FastMutexLock() ITK_OVERRIDE {} + ~FastMutexLock() override {} SimpleFastMutexLock m_SimpleFastMutexLock; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FastMutexLock); diff --git a/Modules/Core/Common/include/itkFileOutputWindow.h b/Modules/Core/Common/include/itkFileOutputWindow.h index 74e64ebdeee..4c88c62a75d 100644 --- a/Modules/Core/Common/include/itkFileOutputWindow.h +++ b/Modules/Core/Common/include/itkFileOutputWindow.h @@ -51,7 +51,7 @@ class ITKCommon_EXPORT FileOutputWindow:public OutputWindow itkTypeMacro(FileOutputWindow, OutputWindow); /** Send a string to display. */ - virtual void DisplayText(const char *) ITK_OVERRIDE; + void DisplayText(const char *) override; /** Set the filename for the log file */ itkSetStringMacro(FileName); @@ -74,8 +74,8 @@ class ITKCommon_EXPORT FileOutputWindow:public OutputWindow protected: FileOutputWindow(); - virtual ~FileOutputWindow() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FileOutputWindow() override; + void PrintSelf(std::ostream & os, Indent indent) const override; void Initialize(); diff --git a/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.h b/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.h index 4d9d35aa8c8..5e5d3d8bc5c 100644 --- a/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.h +++ b/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.h @@ -78,7 +78,7 @@ class ITK_TEMPLATE_EXPORT FiniteCylinderSpatialFunction: virtual void SetOrientation(const InputType _Orientation); /** Evaluates the function at a given position. */ - OutputType Evaluate(const InputType & position) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & position) const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -92,9 +92,9 @@ class ITK_TEMPLATE_EXPORT FiniteCylinderSpatialFunction: protected: FiniteCylinderSpatialFunction(); - virtual ~FiniteCylinderSpatialFunction() ITK_OVERRIDE; + ~FiniteCylinderSpatialFunction() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h index 7ee4c901406..06d7c628836 100644 --- a/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.h @@ -109,10 +109,10 @@ class ITK_TEMPLATE_EXPORT FloodFilledFunctionConditionalConstIterator: void InitializeIterator(); /** Default Destructor. */ - virtual ~FloodFilledFunctionConditionalConstIterator() {} + ~FloodFilledFunctionConditionalConstIterator() override {} /** Compute whether the index of interest should be included in the flood */ - virtual bool IsPixelIncluded(const IndexType & index) const = 0; + bool IsPixelIncluded(const IndexType & index) const override = 0; /** operator= is provided to make sure the handle to the image is properly * reference counted. */ @@ -144,15 +144,15 @@ class ITK_TEMPLATE_EXPORT FloodFilledFunctionConditionalConstIterator: * This causes the index to be calculated from pointer arithmetic and is * therefore an expensive operation. * \sa SetIndex */ - const IndexType GetIndex() + const IndexType GetIndex() override { return m_IndexStack.front(); } /** Get the pixel value */ - const PixelType Get(void) const + const PixelType Get(void) const override { return this->m_Image->GetPixel( m_IndexStack.front() ); } /** Is the iterator at the end of the region? */ - bool IsAtEnd() + bool IsAtEnd() override { return this->m_IsAtEnd; } /** Put more seeds on the list */ @@ -208,7 +208,7 @@ class ITK_TEMPLATE_EXPORT FloodFilledFunctionConditionalConstIterator: } /** Walk forward one index */ - void operator++() + void operator++() override { this->DoFloodStep(); } void DoFloodStep(); diff --git a/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalConstIterator.h index 645aee349a7..1b774a3d600 100644 --- a/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalConstIterator.h @@ -103,10 +103,10 @@ class ITK_TEMPLATE_EXPORT FloodFilledImageFunctionConditionalConstIterator: FunctionType *fnPtr):Superclass(imagePtr, fnPtr) {} /** Default Destructor. */ - virtual ~FloodFilledImageFunctionConditionalConstIterator() {} + ~FloodFilledImageFunctionConditionalConstIterator() override {} /** Compute whether the index of interest should be included in the flood */ - bool IsPixelIncluded(const IndexType & index) const; + bool IsPixelIncluded(const IndexType & index) const override; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalIterator.h b/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalIterator.h index ef6ad63c98d..5c57c41e491 100644 --- a/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalIterator.h +++ b/Modules/Core/Common/include/itkFloodFilledImageFunctionConditionalIterator.h @@ -94,7 +94,7 @@ class FloodFilledImageFunctionConditionalIterator:public FloodFilledImageFunctio FunctionType *fnPtr):Superclass(imagePtr, fnPtr) {} /** Get the pixel value */ - const PixelType Get(void) const + const PixelType Get(void) const override { return const_cast< ImageType * >( this->m_Image.GetPointer() )->GetPixel( this->m_IndexStack.front() ); } /** Set the pixel value */ @@ -102,7 +102,7 @@ class FloodFilledImageFunctionConditionalIterator:public FloodFilledImageFunctio { const_cast< ImageType * >( this->m_Image.GetPointer() )->GetPixel( this->m_IndexStack.front() ) = value; } /** Default Destructor. */ - virtual ~FloodFilledImageFunctionConditionalIterator() {} + ~FloodFilledImageFunctionConditionalIterator() override {} }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h index 96cc794ef23..71566e2f62e 100644 --- a/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.h @@ -80,10 +80,10 @@ class ITK_TEMPLATE_EXPORT FloodFilledSpatialFunctionConditionalConstIterator:pub FloodFilledSpatialFunctionConditionalConstIterator(const ImageType *imagePtr, FunctionType *fnPtr); /** Default Destructor. */ - virtual ~FloodFilledSpatialFunctionConditionalConstIterator() {} + ~FloodFilledSpatialFunctionConditionalConstIterator() override {} /** Compute whether the index of interest should be included in the flood */ - bool IsPixelIncluded(const IndexType & index) const; + bool IsPixelIncluded(const IndexType & index) const override; /** Set the inclusion strategy to origin */ void SetOriginInclusionStrategy() { m_InclusionStrategy = 0; } diff --git a/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalIterator.h b/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalIterator.h index efa349e828d..d72cbe6b4b3 100644 --- a/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalIterator.h +++ b/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalIterator.h @@ -81,7 +81,7 @@ class FloodFilledSpatialFunctionConditionalIterator:public FunctionType *fnPtr):Superclass(imagePtr, fnPtr) {} /** Get the pixel value, const version to avoid overload warnings */ - const PixelType Get(void) const + const PixelType Get(void) const override { return const_cast< ImageType * >( this->m_Image.GetPointer() )->GetPixel( this->m_IndexStack.front() ); } /** Get the pixel value, non-const version is sometimes useful. */ @@ -93,7 +93,7 @@ class FloodFilledSpatialFunctionConditionalIterator:public { const_cast< ImageType * >( this->m_Image.GetPointer() )->GetPixel( this->m_IndexStack.front() ) = value; } /** Default Destructor. */ - virtual ~FloodFilledSpatialFunctionConditionalIterator() {} + ~FloodFilledSpatialFunctionConditionalIterator() override {} }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkForwardDifferenceOperator.h b/Modules/Core/Common/include/itkForwardDifferenceOperator.h index f12f647634d..79ee1ac7f27 100644 --- a/Modules/Core/Common/include/itkForwardDifferenceOperator.h +++ b/Modules/Core/Common/include/itkForwardDifferenceOperator.h @@ -71,12 +71,13 @@ class ITK_TEMPLATE_EXPORT ForwardDifferenceOperator: typedef typename Superclass::CoefficientVector CoefficientVector; /** Calculates operator coefficients. */ - CoefficientVector GenerateCoefficients(); + CoefficientVector GenerateCoefficients() override; /** Arranges coefficients spatially in the memory buffer. */ - void Fill(const CoefficientVector & coeff) - - { this->FillCenteredDirectional(coeff); } + void Fill(const CoefficientVector & coeff) override + { + this->FillCenteredDirectional(coeff); + } }; } // namespace itk diff --git a/Modules/Core/Common/include/itkFrustumSpatialFunction.h b/Modules/Core/Common/include/itkFrustumSpatialFunction.h index a8c1d10e261..1d9d97ebeb5 100644 --- a/Modules/Core/Common/include/itkFrustumSpatialFunction.h +++ b/Modules/Core/Common/include/itkFrustumSpatialFunction.h @@ -67,7 +67,7 @@ class ITK_TEMPLATE_EXPORT FrustumSpatialFunction: } FrustumRotationPlaneType; /** Evaluates the function at a given position. */ - OutputType Evaluate(const InputType & position) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & position) const override; /** Set/Get the apex of the pyramid. */ itkGetConstMacro(Apex, InputType); @@ -99,8 +99,8 @@ class ITK_TEMPLATE_EXPORT FrustumSpatialFunction: protected: FrustumSpatialFunction(); - virtual ~FrustumSpatialFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FrustumSpatialFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FrustumSpatialFunction); diff --git a/Modules/Core/Common/include/itkFunctionBase.h b/Modules/Core/Common/include/itkFunctionBase.h index e2eaaab76ec..68cfa103c51 100644 --- a/Modules/Core/Common/include/itkFunctionBase.h +++ b/Modules/Core/Common/include/itkFunctionBase.h @@ -64,7 +64,7 @@ class ITK_TEMPLATE_EXPORT FunctionBase:public Object protected: FunctionBase(){} - ~FunctionBase() ITK_OVERRIDE {} + ~FunctionBase() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(FunctionBase); diff --git a/Modules/Core/Common/include/itkGaussianDerivativeOperator.h b/Modules/Core/Common/include/itkGaussianDerivativeOperator.h index c535caaca7f..620e46e7f3e 100644 --- a/Modules/Core/Common/include/itkGaussianDerivativeOperator.h +++ b/Modules/Core/Common/include/itkGaussianDerivativeOperator.h @@ -147,7 +147,7 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeOperator : unsigned int GetOrder() const { return m_Order; } /** Prints member variables */ - virtual void PrintSelf(std::ostream & os, Indent i) const; + void PrintSelf(std::ostream & os, Indent i) const override; protected: @@ -166,10 +166,10 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeOperator : static double ModifiedBesselI(int, double); /** Calculates operator coefficients. */ - CoefficientVector GenerateCoefficients(); + CoefficientVector GenerateCoefficients() override; /** Arranges coefficients spatially in the memory buffer. */ - void Fill(const CoefficientVector & coeff) + void Fill(const CoefficientVector & coeff) override { this->FillCenteredDirectional(coeff); } private: @@ -179,7 +179,7 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeOperator : CoefficientVector GenerateGaussianCoefficients() const; /** For compatibility with itkWarningMacro */ - const char * GetNameOfClass() const + const char * GetNameOfClass() const override { return "itkGaussianDerivativeOperator"; } diff --git a/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.h b/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.h index 343065817b4..d42d669115e 100644 --- a/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.h +++ b/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.h @@ -71,7 +71,7 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeSpatialFunction:public SpatialFuncti /** Evaluate the function at a given position and return the * value in the specific direction. SetDirection() should be used * to set the direction. */ - OutputType Evaluate(const TInput & position) const ITK_OVERRIDE; + OutputType Evaluate(const TInput & position) const override; /** Evaluate the function at a given position and return a vector */ VectorType EvaluateVector(const TInput & position) const; @@ -90,8 +90,8 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeSpatialFunction:public SpatialFuncti protected: GaussianDerivativeSpatialFunction(); - virtual ~GaussianDerivativeSpatialFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GaussianDerivativeSpatialFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GaussianDerivativeSpatialFunction); diff --git a/Modules/Core/Common/include/itkGaussianKernelFunction.h b/Modules/Core/Common/include/itkGaussianKernelFunction.h index 8dc7845fe6f..17a1e23f90b 100644 --- a/Modules/Core/Common/include/itkGaussianKernelFunction.h +++ b/Modules/Core/Common/include/itkGaussianKernelFunction.h @@ -54,13 +54,13 @@ class GaussianKernelFunction:public KernelFunctionBase itkTypeMacro(GaussianKernelFunction, KernelFunctionBase); /** Evaluate the function. */ - TRealValueType Evaluate(const TRealValueType & u) const ITK_OVERRIDE + TRealValueType Evaluate(const TRealValueType & u) const override { return ( std::exp( static_cast< TRealValueType >(-0.5) * itk::Math::sqr(u) ) * m_Factor ); } protected: GaussianKernelFunction(): m_Factor( NumericTraits< TRealValueType >::OneValue() / std::sqrt(static_cast< TRealValueType >(2.0 * itk::Math::pi )) ) {}; - virtual ~GaussianKernelFunction() ITK_OVERRIDE {}; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~GaussianKernelFunction() override {}; + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Core/Common/include/itkGaussianOperator.h b/Modules/Core/Common/include/itkGaussianOperator.h index 62c85d82158..d2bd59c7fc4 100644 --- a/Modules/Core/Common/include/itkGaussianOperator.h +++ b/Modules/Core/Common/include/itkGaussianOperator.h @@ -142,7 +142,7 @@ class ITK_TEMPLATE_EXPORT GaussianOperator: { return m_MaximumKernelWidth; } /** Prints some debugging information. */ - virtual void PrintSelf(std::ostream & os, Indent i) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent i) const override { os << i << "GaussianOperator { this=" << this << ", m_Variance = " << m_Variance @@ -169,10 +169,10 @@ class ITK_TEMPLATE_EXPORT GaussianOperator: protected: /** Calculates operator coefficients. */ - CoefficientVector GenerateCoefficients() ITK_OVERRIDE; + CoefficientVector GenerateCoefficients() override; /** Arranges coefficients spatially in the memory buffer. */ - void Fill(const CoefficientVector & coeff) ITK_OVERRIDE + void Fill(const CoefficientVector & coeff) override { this->FillCenteredDirectional(coeff); } private: diff --git a/Modules/Core/Common/include/itkGaussianSpatialFunction.h b/Modules/Core/Common/include/itkGaussianSpatialFunction.h index f51c3f1bd7a..07f0c9105ee 100644 --- a/Modules/Core/Common/include/itkGaussianSpatialFunction.h +++ b/Modules/Core/Common/include/itkGaussianSpatialFunction.h @@ -67,7 +67,7 @@ class ITK_TEMPLATE_EXPORT GaussianSpatialFunction: typedef FixedArray< double, VImageDimension > ArrayType; /** Evaluate the function at a given position. */ - OutputType Evaluate(const TInput & position) const ITK_OVERRIDE; + OutputType Evaluate(const TInput & position) const override; /** Set/Get the scale factor to multiply the true value of the Gaussian. */ itkSetMacro(Scale, double); @@ -88,8 +88,8 @@ class ITK_TEMPLATE_EXPORT GaussianSpatialFunction: protected: GaussianSpatialFunction(); - virtual ~GaussianSpatialFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GaussianSpatialFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GaussianSpatialFunction); diff --git a/Modules/Core/Common/include/itkHeavisideStepFunction.h b/Modules/Core/Common/include/itkHeavisideStepFunction.h index 20a340fbc9f..f5b5bd73087 100644 --- a/Modules/Core/Common/include/itkHeavisideStepFunction.h +++ b/Modules/Core/Common/include/itkHeavisideStepFunction.h @@ -73,14 +73,14 @@ class ITK_TEMPLATE_EXPORT HeavisideStepFunction: typedef typename Superclass::OutputType OutputType; /** Evaluate at the specified input position */ - OutputType Evaluate(const InputType & input) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & input) const override; /** Evaluate the derivative at the specified input position */ - OutputType EvaluateDerivative(const InputType & input) const ITK_OVERRIDE; + OutputType EvaluateDerivative(const InputType & input) const override; protected: HeavisideStepFunction(); - ~HeavisideStepFunction() ITK_OVERRIDE; + ~HeavisideStepFunction() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HeavisideStepFunction); diff --git a/Modules/Core/Common/include/itkHeavisideStepFunctionBase.h b/Modules/Core/Common/include/itkHeavisideStepFunctionBase.h index e6e218a8d54..0c39c807f92 100644 --- a/Modules/Core/Common/include/itkHeavisideStepFunctionBase.h +++ b/Modules/Core/Common/include/itkHeavisideStepFunctionBase.h @@ -67,7 +67,7 @@ class HeavisideStepFunctionBase:public FunctionBase< TInput, TOutput > typedef typename Superclass::OutputType OutputType; /** Evaluate at the specified input position */ - virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE = 0; + OutputType Evaluate(const InputType & input) const override = 0; /** Evaluate the derivative at the specified input position */ virtual OutputType EvaluateDerivative(const InputType & input) const = 0; @@ -82,7 +82,7 @@ class HeavisideStepFunctionBase:public FunctionBase< TInput, TOutput > protected: HeavisideStepFunctionBase() : Superclass() {} - virtual ~HeavisideStepFunctionBase() ITK_OVERRIDE {} + ~HeavisideStepFunctionBase() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(HeavisideStepFunctionBase); diff --git a/Modules/Core/Common/include/itkHexahedronCell.h b/Modules/Core/Common/include/itkHexahedronCell.h index d73e0631704..4bca1007a0d 100644 --- a/Modules/Core/Common/include/itkHexahedronCell.h +++ b/Modules/Core/Common/include/itkHexahedronCell.h @@ -71,29 +71,29 @@ class ITK_TEMPLATE_EXPORT HexahedronCell:public TCellInterface, private Hexahedr itkStaticConstMacro(CellDimension, unsigned int, 3); /** Implement the standard CellInterface. */ - virtual CellGeometry GetType(void) const ITK_OVERRIDE + CellGeometry GetType(void) const override { return Superclass::HEXAHEDRON_CELL; } - virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE; + void MakeCopy(CellAutoPointer &) const override; - virtual unsigned int GetDimension(void) const ITK_OVERRIDE; + unsigned int GetDimension(void) const override; - virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE; + unsigned int GetNumberOfPoints(void) const override; - virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE; + CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override; - virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) ITK_OVERRIDE; - virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE; + bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override; + void SetPointIds(PointIdConstIterator first) override; - virtual void SetPointIds(PointIdConstIterator first, PointIdConstIterator last) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override; - virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE; - virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE; + void SetPointId(int localId, PointIdentifier) override; + PointIdIterator PointIdsBegin(void) override; - virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsBegin(void) const override; - virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE; + PointIdIterator PointIdsEnd(void) override; - virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsEnd(void) const override; /** Hexahedron-specific interface. */ virtual CellFeatureCount GetNumberOfVertices() const; @@ -107,12 +107,12 @@ class ITK_TEMPLATE_EXPORT HexahedronCell:public TCellInterface, private Hexahedr virtual bool GetFace(CellFeatureIdentifier, FaceAutoPointer &); /** Evaluate the position inside the cell */ - virtual bool EvaluatePosition(CoordRepType *, + bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, - InterpolationWeightType *) ITK_OVERRIDE; + InterpolationWeightType *) override; /** Visitor interface */ itkCellVisitMacro(Superclass::HEXAHEDRON_CELL); @@ -135,7 +135,7 @@ class ITK_TEMPLATE_EXPORT HexahedronCell:public TCellInterface, private Hexahedr } } - ~HexahedronCell() ITK_OVERRIDE {} + ~HexahedronCell() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(HexahedronCell); diff --git a/Modules/Core/Common/include/itkImage.h b/Modules/Core/Common/include/itkImage.h index 32d4b6363aa..bf85236bc82 100644 --- a/Modules/Core/Common/include/itkImage.h +++ b/Modules/Core/Common/include/itkImage.h @@ -166,11 +166,11 @@ class ITK_TEMPLATE_EXPORT Image:public ImageBase< VImageDimension > /** Allocate the image memory. The size of the image must * already be set, e.g. by calling SetRegions(). */ - virtual void Allocate(bool initializePixels = false) ITK_OVERRIDE; + void Allocate(bool initializePixels = false) override; /** Restore the data object to its initial state. This means releasing * memory. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Fill the image buffer with a value. Be sure to call Allocate() * first. */ @@ -224,9 +224,9 @@ class ITK_TEMPLATE_EXPORT Image:public ImageBase< VImageDimension > /** Return a pointer to the beginning of the buffer. This is used by * the image iterator class. */ virtual TPixel * GetBufferPointer() - { return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR; } + { return m_Buffer ? m_Buffer->GetBufferPointer() : nullptr; } virtual const TPixel * GetBufferPointer() const - { return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR; } + { return m_Buffer ? m_Buffer->GetBufferPointer() : nullptr; } /** Return a pointer to the container. */ PixelContainer * GetPixelContainer() @@ -267,21 +267,21 @@ class ITK_TEMPLATE_EXPORT Image:public ImageBase< VImageDimension > const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const { return NeighborhoodAccessorFunctorType(); } - virtual unsigned int GetNumberOfComponentsPerPixel() const ITK_OVERRIDE; + unsigned int GetNumberOfComponentsPerPixel() const override; protected: Image(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; - virtual void Graft(const DataObject *data) ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; + void Graft(const DataObject *data) override; - virtual ~Image() ITK_OVERRIDE {} + ~Image() override {} /** Compute helper matrices used to transform Index coordinates to * PhysicalPoint coordinates and back. This method is virtual and will be * overloaded in derived classes in order to provide backward compatibility * behavior in classes that did not used to take image orientation into * account. */ - virtual void ComputeIndexToPhysicalPointMatrices() ITK_OVERRIDE; + void ComputeIndexToPhysicalPointMatrices() override; using Superclass::Graft; private: ITK_DISALLOW_COPY_AND_ASSIGN(Image); diff --git a/Modules/Core/Common/include/itkImage.hxx b/Modules/Core/Common/include/itkImage.hxx index 50470ef24da..0b4bd33b314 100644 --- a/Modules/Core/Common/include/itkImage.hxx +++ b/Modules/Core/Common/include/itkImage.hxx @@ -129,7 +129,7 @@ Image< TPixel, VImageDimension > // Attempt to cast data to an Image const Self * const imgData = dynamic_cast< const Self * >( data ); - if ( imgData != ITK_NULLPTR ) + if ( imgData != nullptr ) { this->Graft(imgData); } diff --git a/Modules/Core/Common/include/itkImageBase.h b/Modules/Core/Common/include/itkImageBase.h index 82f85248ab6..3a9e483b3b4 100644 --- a/Modules/Core/Common/include/itkImageBase.h +++ b/Modules/Core/Common/include/itkImageBase.h @@ -165,7 +165,7 @@ class ITK_TEMPLATE_EXPORT ImageBase:public DataObject typedef Matrix< SpacePrecisionType, VImageDimension, VImageDimension > DirectionType; /** Restore object to initialized state. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Image dimension. The dimension of an image is fixed at construction. */ static unsigned int GetImageDimension() @@ -281,7 +281,7 @@ class ITK_TEMPLATE_EXPORT ImageBase:public DataObject * the object to be modified. This method is called internally by * the pipeline and therefore bypasses the modified time * calculation. */ - virtual void SetRequestedRegion( const DataObject *data ) ITK_OVERRIDE; + void SetRequestedRegion( const DataObject *data ) override; /** Get the region object that defines the size and starting index * for the region of the image requested (i.e., the region of the @@ -568,7 +568,7 @@ class ITK_TEMPLATE_EXPORT ImageBase:public DataObject * ImageBase has more meta-data than its DataObject. Thus, it must * provide its own version of CopyInformation() in order to copy the * LargestPossibleRegion from the input parameter. */ - virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override; /** Graft the data and information from one image to another. This * is a convenience method to setup a second image with all the meta @@ -589,7 +589,7 @@ class ITK_TEMPLATE_EXPORT ImageBase:public DataObject * ProcessObject::UpdateOutputInformation() which determines modified * times, LargestPossibleRegions, and any extra meta data like spacing, * origin, etc. */ - virtual void UpdateOutputInformation() ITK_OVERRIDE; + void UpdateOutputInformation() override; /** UpdateOutputData() is part of the pipeline infrastructure to * communicate between ProcessObjects and DataObjects. The method of @@ -598,12 +598,12 @@ class ITK_TEMPLATE_EXPORT ImageBase:public DataObject * input's requested region to zero, to indicate that it does not * need to be updated or executed. */ - virtual void UpdateOutputData() ITK_OVERRIDE; + void UpdateOutputData() override; /** Set the RequestedRegion to the LargestPossibleRegion. This * forces a filter to produce all of the output in one execution * (i.e. not streaming) on the next call to Update(). */ - virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE; + void SetRequestedRegionToLargestPossibleRegion() override; /** Determine whether the RequestedRegion is outside of the * BufferedRegion. This method returns true if the RequestedRegion @@ -614,7 +614,7 @@ class ITK_TEMPLATE_EXPORT ImageBase:public DataObject * inside the BufferedRegion from the previous execution (and the * current filter is up to date), then a given filter does not need * to re-execute */ - virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE; + bool RequestedRegionIsOutsideOfTheBufferedRegion() override; /** Verify that the RequestedRegion is within the * LargestPossibleRegion. If the RequestedRegion is not within the @@ -624,7 +624,7 @@ class ITK_TEMPLATE_EXPORT ImageBase:public DataObject * used by PropagateRequestedRegion(). PropagateRequestedRegion() * throws a InvalidRequestedRegionError exception is the requested * region is not within the LargestPossibleRegion. */ - virtual bool VerifyRequestedRegion() ITK_OVERRIDE; + bool VerifyRequestedRegion() override; /** INTERNAL This method is used internally by filters to copy meta-data from * the output to the input. Users should not have a need to use this method. @@ -649,8 +649,8 @@ class ITK_TEMPLATE_EXPORT ImageBase:public DataObject protected: ImageBase(); - ~ImageBase() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageBase() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Calculate the offsets needed to move from one pixel to the next * along a row, column, slice, volume, etc. These offsets are based @@ -727,7 +727,7 @@ class ITK_TEMPLATE_EXPORT ImageBase:public DataObject return index; } - virtual void Graft(const DataObject *data) ITK_OVERRIDE; + void Graft(const DataObject *data) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageBase); diff --git a/Modules/Core/Common/include/itkImageBase.hxx b/Modules/Core/Common/include/itkImageBase.hxx index 5b4d6a69d94..dd21117d6c8 100644 --- a/Modules/Core/Common/include/itkImageBase.hxx +++ b/Modules/Core/Common/include/itkImageBase.hxx @@ -321,7 +321,7 @@ ImageBase< VImageDimension > // Attempt to cast data to an ImageBase const ImageBase< VImageDimension > * const imgData = dynamic_cast< const ImageBase< VImageDimension > * >( data ); - if ( imgData != ITK_NULLPTR ) + if ( imgData != nullptr ) { // Copy the meta data for this data type this->SetLargestPossibleRegion( imgData->GetLargestPossibleRegion() ); @@ -489,7 +489,7 @@ ImageBase< VImageDimension > { const ImageBase * const imgData = dynamic_cast< const ImageBase * >( data ); - if ( imgData != ITK_NULLPTR ) + if ( imgData != nullptr ) { // only copy the RequestedRegion if the parameter object is an image this->SetRequestedRegion( imgData->GetRequestedRegion() ); diff --git a/Modules/Core/Common/include/itkImageConstIterator.h b/Modules/Core/Common/include/itkImageConstIterator.h index eb8c5d8cd4c..0d7e363b73c 100644 --- a/Modules/Core/Common/include/itkImageConstIterator.h +++ b/Modules/Core/Common/include/itkImageConstIterator.h @@ -136,8 +136,8 @@ class ITK_TEMPLATE_EXPORT ImageConstIterator m_PixelAccessor(), m_PixelAccessorFunctor() { - m_Image = ITK_NULLPTR; - m_Buffer = ITK_NULLPTR; + m_Image = nullptr; + m_Buffer = nullptr; m_Offset = 0; m_BeginOffset = 0; m_EndOffset = 0; diff --git a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx index 23d32d12511..167cc6b975c 100644 --- a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx @@ -29,9 +29,9 @@ template< typename TImage > ImageConstIteratorWithIndex< TImage > ::ImageConstIteratorWithIndex() { - m_Position = ITK_NULLPTR; - m_Begin = ITK_NULLPTR; - m_End = ITK_NULLPTR; + m_Position = nullptr; + m_Begin = nullptr; + m_End = nullptr; m_Remaining = false; } diff --git a/Modules/Core/Common/include/itkImageDuplicator.h b/Modules/Core/Common/include/itkImageDuplicator.h index f9591d0f5ff..d553124d2a4 100644 --- a/Modules/Core/Common/include/itkImageDuplicator.h +++ b/Modules/Core/Common/include/itkImageDuplicator.h @@ -101,8 +101,8 @@ class ITK_TEMPLATE_EXPORT ImageDuplicator:public Object protected: ImageDuplicator(); - virtual ~ImageDuplicator() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageDuplicator() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageDuplicator); diff --git a/Modules/Core/Common/include/itkImageDuplicator.hxx b/Modules/Core/Common/include/itkImageDuplicator.hxx index c3a4ae909ca..87eeaebc688 100644 --- a/Modules/Core/Common/include/itkImageDuplicator.hxx +++ b/Modules/Core/Common/include/itkImageDuplicator.hxx @@ -28,8 +28,8 @@ template< typename TInputImage > ImageDuplicator< TInputImage > ::ImageDuplicator() { - m_InputImage = ITK_NULLPTR; - m_DuplicateImage = ITK_NULLPTR; + m_InputImage = nullptr; + m_DuplicateImage = nullptr; m_InternalImageTime = 0; } diff --git a/Modules/Core/Common/include/itkImageIORegion.h b/Modules/Core/Common/include/itkImageIORegion.h index c38e70043b4..755a02abef4 100644 --- a/Modules/Core/Common/include/itkImageIORegion.h +++ b/Modules/Core/Common/include/itkImageIORegion.h @@ -83,7 +83,7 @@ class ITKCommon_EXPORT ImageIORegion:public Region unsigned int GetRegionDimension() const; /** Return the region type. Images are described with structured regions. */ - virtual RegionType GetRegionType() const ITK_OVERRIDE; + RegionType GetRegionType() const override; /** Constructor. ImageIORegion is a lightweight object that is not reference * counted, so the constructor is public. */ @@ -95,7 +95,7 @@ class ITKCommon_EXPORT ImageIORegion:public Region /** Destructor. ImageIORegion is a lightweight object that is not reference * counted, so the destructor is public. */ - virtual ~ImageIORegion() ITK_OVERRIDE; + ~ImageIORegion() override; /** Copy constructor. ImageIORegion is a lightweight object that is not * reference counted, so the copy constructor is public. */ @@ -152,7 +152,7 @@ class ITKCommon_EXPORT ImageIORegion:public Region * including superclasses. Typically not called by the user (use Print() * instead) but used in the hierarchical print process to combine the * output of several classes. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: unsigned int m_ImageDimension; diff --git a/Modules/Core/Common/include/itkImageIterator.h b/Modules/Core/Common/include/itkImageIterator.h index 335ba610601..99ddfefa072 100644 --- a/Modules/Core/Common/include/itkImageIterator.h +++ b/Modules/Core/Common/include/itkImageIterator.h @@ -95,7 +95,7 @@ class ITK_TEMPLATE_EXPORT ImageIterator:public ImageConstIterator< TImage > ImageIterator(); /** Default Destructor */ - ~ImageIterator() {} + ~ImageIterator() override {} /** Copy Constructor. The copy constructor is provided to make sure the * handle to the image is properly reference counted. */ diff --git a/Modules/Core/Common/include/itkImageIteratorWithIndex.h b/Modules/Core/Common/include/itkImageIteratorWithIndex.h index 01500ae5635..53cf10588bf 100644 --- a/Modules/Core/Common/include/itkImageIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageIteratorWithIndex.h @@ -98,7 +98,7 @@ class ITK_TEMPLATE_EXPORT ImageIteratorWithIndex:public ImageConstIteratorWithIn ImageIteratorWithIndex(); /** Default Destructor */ - ~ImageIteratorWithIndex() {} + ~ImageIteratorWithIndex() override {} /** Copy Constructor. The copy constructor is provided to make sure the * handle to the image is properly reference counted. */ diff --git a/Modules/Core/Common/include/itkImageKernelOperator.h b/Modules/Core/Common/include/itkImageKernelOperator.h index 644f4b7272b..e178a1cae17 100644 --- a/Modules/Core/Common/include/itkImageKernelOperator.h +++ b/Modules/Core/Common/include/itkImageKernelOperator.h @@ -83,7 +83,7 @@ class ITK_TEMPLATE_EXPORT ImageKernelOperator : const ImageType * GetImageKernel() const; /** Prints information about the object. */ - virtual void PrintSelf(std::ostream & os, Indent i) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent i) const override { os << i << "ImageKernelOperator { this=" << this << "} " << std::endl; @@ -92,10 +92,10 @@ class ITK_TEMPLATE_EXPORT ImageKernelOperator : protected: /** Calculates operator coefficients. */ - CoefficientVector GenerateCoefficients() ITK_OVERRIDE; + CoefficientVector GenerateCoefficients() override; /** Arranges coefficients spatially in the memory buffer. */ - void Fill(const CoefficientVector & coeff) ITK_OVERRIDE; + void Fill(const CoefficientVector & coeff) override; private: typename ImageType::ConstPointer m_ImageKernel; diff --git a/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.h index 4bf9f5147f3..705b693b41e 100644 --- a/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.h @@ -137,7 +137,7 @@ class ITK_TEMPLATE_EXPORT ImageRandomConstIteratorWithIndex:public ImageConstIte /** Default constructor. Needed since we provide a cast constructor. */ ImageRandomConstIteratorWithIndex(); - ~ImageRandomConstIteratorWithIndex() {} + ~ImageRandomConstIteratorWithIndex() override {} /** Constructor establishes an iterator to walk a particular image and a * particular region of that image. */ diff --git a/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.h b/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.h index b75671deb05..f0a1190ba62 100644 --- a/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.h +++ b/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.h @@ -139,7 +139,7 @@ class ITK_TEMPLATE_EXPORT ImageRandomConstIteratorWithOnlyIndex:public ImageCons /** Default constructor. Needed since we provide a cast constructor. */ ImageRandomConstIteratorWithOnlyIndex(); - ~ImageRandomConstIteratorWithOnlyIndex() {} + ~ImageRandomConstIteratorWithOnlyIndex() override {} /** Constructor establishes an iterator to walk a particular image and a * particular region of that image. */ diff --git a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h index 83eec3c1897..37a32d21efe 100644 --- a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h @@ -236,7 +236,7 @@ class ITK_TEMPLATE_EXPORT ImageRandomNonRepeatingConstIteratorWithIndex:public I /** Default constructor. Needed since we provide a cast constructor. */ ImageRandomNonRepeatingConstIteratorWithIndex(); - ~ImageRandomNonRepeatingConstIteratorWithIndex() + ~ImageRandomNonRepeatingConstIteratorWithIndex() override { delete m_Permutation; } @@ -255,7 +255,7 @@ class ITK_TEMPLATE_EXPORT ImageRandomNonRepeatingConstIteratorWithIndex:public I { this->ImageConstIteratorWithIndex< TImage >::operator=(it); - m_Permutation = ITK_NULLPTR; + m_Permutation = nullptr; } /** operator= is provided to deep copy m_Permutation. */ diff --git a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx index 32ee9056bca..6c098d5f013 100644 --- a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx @@ -30,7 +30,7 @@ ImageRandomNonRepeatingConstIteratorWithIndex< TImage > m_NumberOfPixelsInRegion = 0L; m_NumberOfSamplesRequested = 0L; m_NumberOfSamplesDone = 0L; - m_Permutation = ITK_NULLPTR; + m_Permutation = nullptr; } /** Constructor establishes an iterator to walk a particular image and a diff --git a/Modules/Core/Common/include/itkImageRegion.h b/Modules/Core/Common/include/itkImageRegion.h index 6046eba28e2..60cc1bd9959 100644 --- a/Modules/Core/Common/include/itkImageRegion.h +++ b/Modules/Core/Common/include/itkImageRegion.h @@ -104,7 +104,7 @@ class ITK_TEMPLATE_EXPORT ImageRegion:public Region typedef ImageRegion< itkGetStaticConstMacro(SliceDimension) > SliceRegion; /** Return the region type. Images are described with structured regions. */ - virtual typename Superclass::RegionType GetRegionType() const ITK_OVERRIDE + typename Superclass::RegionType GetRegionType() const override { return Superclass::ITK_STRUCTURED_REGION; } /** Constructor. ImageRegion is a lightweight object that is not reference @@ -113,7 +113,7 @@ class ITK_TEMPLATE_EXPORT ImageRegion:public Region /** Destructor. ImageRegion is a lightweight object that is not reference * counted, so the destructor is public. */ - virtual ~ImageRegion() ITK_OVERRIDE; + ~ImageRegion() override; /** Copy constructor. ImageRegion is a lightweight object that is not * reference counted, so the copy constructor is public. */ @@ -308,7 +308,7 @@ class ITK_TEMPLATE_EXPORT ImageRegion:public Region * including superclasses. Typically not called by the user (use Print() * instead) but used in the hierarchical print process to combine the * output of several classes. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: IndexType m_Index; diff --git a/Modules/Core/Common/include/itkImageRegionConstIterator.h b/Modules/Core/Common/include/itkImageRegionConstIterator.h index 705271d799d..716f23ec8ba 100644 --- a/Modules/Core/Common/include/itkImageRegionConstIterator.h +++ b/Modules/Core/Common/include/itkImageRegionConstIterator.h @@ -213,7 +213,7 @@ class ITK_TEMPLATE_EXPORT ImageRegionConstIterator:public ImageConstIterator< TI /** Set the index. No bounds checking is performed. This is overridden * from the parent because we have an extra ivar. * \sa GetIndex */ - void SetIndex(const IndexType & ind) ITK_OVERRIDE + void SetIndex(const IndexType & ind) override { Superclass::SetIndex(ind); m_SpanEndOffset = this->m_Offset + static_cast< OffsetValueType >( this->m_Region.GetSize()[0] ) diff --git a/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h b/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h index e75630d64da..dc41e813d9e 100644 --- a/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h +++ b/Modules/Core/Common/include/itkImageRegionReverseConstIterator.h @@ -224,7 +224,7 @@ class ITK_TEMPLATE_EXPORT ImageRegionReverseConstIterator:public ImageReverseCon /** Set the index. No bounds checking is performed. This is overridden * from the parent because we have an extra ivar. * \sa GetIndex */ - void SetIndex(const IndexType & ind) ITK_OVERRIDE + void SetIndex(const IndexType & ind) override { Superclass::SetIndex(ind); m_SpanBeginOffset = this->m_Offset + static_cast< OffsetValueType >( this->m_Region.GetSize()[0] ) diff --git a/Modules/Core/Common/include/itkImageRegionSplitterBase.h b/Modules/Core/Common/include/itkImageRegionSplitterBase.h index 0367dceb691..fd24a54671c 100644 --- a/Modules/Core/Common/include/itkImageRegionSplitterBase.h +++ b/Modules/Core/Common/include/itkImageRegionSplitterBase.h @@ -143,7 +143,7 @@ class ITKCommon_EXPORT ImageRegionSplitterBase IndexValueType regionIndex[], SizeValueType regionSize[] ) const = 0; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageRegionSplitterBase); diff --git a/Modules/Core/Common/include/itkImageRegionSplitterDirection.h b/Modules/Core/Common/include/itkImageRegionSplitterDirection.h index 1478593d115..80746c6dbab 100644 --- a/Modules/Core/Common/include/itkImageRegionSplitterDirection.h +++ b/Modules/Core/Common/include/itkImageRegionSplitterDirection.h @@ -60,18 +60,18 @@ class ITKCommon_EXPORT ImageRegionSplitterDirection ImageRegionSplitterDirection(); - virtual unsigned int GetNumberOfSplitsInternal(unsigned int dim, + unsigned int GetNumberOfSplitsInternal(unsigned int dim, const IndexValueType regionIndex[], const SizeValueType regionSize[], - unsigned int requestedNumber) const ITK_OVERRIDE; + unsigned int requestedNumber) const override; - virtual unsigned int GetSplitInternal(unsigned int dim, + unsigned int GetSplitInternal(unsigned int dim, unsigned int i, unsigned int numberOfPieces, IndexValueType regionIndex[], - SizeValueType regionSize[]) const ITK_OVERRIDE; + SizeValueType regionSize[]) const override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageRegionSplitterDirection); diff --git a/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h b/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h index 21d82d70fff..190bde70d13 100644 --- a/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h +++ b/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h @@ -75,18 +75,18 @@ class ITKCommon_EXPORT ImageRegionSplitterMultidimensional ImageRegionSplitterMultidimensional(); - virtual unsigned int GetNumberOfSplitsInternal(unsigned int dim, + unsigned int GetNumberOfSplitsInternal(unsigned int dim, const IndexValueType regionIndex[], const SizeValueType regionSize[], - unsigned int requestedNumber) const ITK_OVERRIDE; + unsigned int requestedNumber) const override; - virtual unsigned int GetSplitInternal(unsigned int dim, + unsigned int GetSplitInternal(unsigned int dim, unsigned int i, unsigned int numberOfPieces, IndexValueType regionIndex[], - SizeValueType regionSize[]) const ITK_OVERRIDE; + SizeValueType regionSize[]) const override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageRegionSplitterMultidimensional); diff --git a/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h b/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h index f08349f834b..dd7bf211031 100644 --- a/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h +++ b/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h @@ -63,16 +63,16 @@ class ITKCommon_EXPORT ImageRegionSplitterSlowDimension protected: ImageRegionSplitterSlowDimension(); - virtual unsigned int GetNumberOfSplitsInternal( unsigned int dim, + unsigned int GetNumberOfSplitsInternal( unsigned int dim, const IndexValueType regionIndex[], const SizeValueType regionSize[], - unsigned int requestedNumber ) const ITK_OVERRIDE; + unsigned int requestedNumber ) const override; - virtual unsigned int GetSplitInternal( unsigned int dim, + unsigned int GetSplitInternal( unsigned int dim, unsigned int i, unsigned int numberOfPieces, IndexValueType regionIndex[], - SizeValueType regionSize[] ) const ITK_OVERRIDE; + SizeValueType regionSize[] ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageRegionSplitterSlowDimension); diff --git a/Modules/Core/Common/include/itkImageScanlineConstIterator.h b/Modules/Core/Common/include/itkImageScanlineConstIterator.h index aff0ca23f79..42a26618e69 100644 --- a/Modules/Core/Common/include/itkImageScanlineConstIterator.h +++ b/Modules/Core/Common/include/itkImageScanlineConstIterator.h @@ -208,7 +208,7 @@ class ITK_TEMPLATE_EXPORT ImageScanlineConstIterator: * This is overridden from the parent because we have an extra ivar. * \sa GetIndex */ - void SetIndex(const IndexType & ind) ITK_OVERRIDE + void SetIndex(const IndexType & ind) override { Superclass::SetIndex(ind); m_SpanEndOffset = this->m_Offset + static_cast< OffsetValueType >( this->m_Region.GetSize()[0] ) diff --git a/Modules/Core/Common/include/itkImageSource.h b/Modules/Core/Common/include/itkImageSource.h index d9952b15993..017d31fbf16 100644 --- a/Modules/Core/Common/include/itkImageSource.h +++ b/Modules/Core/Common/include/itkImageSource.h @@ -213,12 +213,12 @@ class ITK_TEMPLATE_EXPORT ImageSource * SmartPointer to a DataObject. If a subclass of ImageSource has * multiple outputs of different types, then that class must provide * an implementation of MakeOutput(). */ - virtual ProcessObject::DataObjectPointer MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx) ITK_OVERRIDE; - virtual ProcessObject::DataObjectPointer MakeOutput(const ProcessObject::DataObjectIdentifierType &) ITK_OVERRIDE; + ProcessObject::DataObjectPointer MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx) override; + ProcessObject::DataObjectPointer MakeOutput(const ProcessObject::DataObjectIdentifierType &) override; protected: ImageSource(); - virtual ~ImageSource() ITK_OVERRIDE {} + ~ImageSource() override {} /** A version of GenerateData() specific for image processing * filters. This implementation will split the processing across @@ -235,7 +235,7 @@ class ITK_TEMPLATE_EXPORT ImageSource * instead. * * \sa ThreadedGenerateData() */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** If an imaging filter can be implemented as a multithreaded * algorithm, the filter will provide an implementation of diff --git a/Modules/Core/Common/include/itkImageSource.hxx b/Modules/Core/Common/include/itkImageSource.hxx index 38285356f65..4f62bb13622 100644 --- a/Modules/Core/Common/include/itkImageSource.hxx +++ b/Modules/Core/Common/include/itkImageSource.hxx @@ -115,7 +115,7 @@ ImageSource< TOutputImage > TOutputImage *out = dynamic_cast< TOutputImage * > ( this->ProcessObject::GetOutput(idx) ); - if ( out == ITK_NULLPTR && this->ProcessObject::GetOutput(idx) != ITK_NULLPTR ) + if ( out == nullptr && this->ProcessObject::GetOutput(idx) != nullptr ) { itkWarningMacro (<< "Unable to convert output number " << idx << " to type " << typeid( OutputImageType ).name () ); } @@ -143,7 +143,7 @@ ImageSource< TOutputImage > { if ( !graft ) { - itkExceptionMacro(<< "Requested to graft output that is a ITK_NULLPTR pointer"); + itkExceptionMacro(<< "Requested to graft output that is a nullptr pointer"); } // we use the process object method since all out output may not be diff --git a/Modules/Core/Common/include/itkImageToImageFilter.h b/Modules/Core/Common/include/itkImageToImageFilter.h index 2bba37b1be3..6ba61770d5b 100644 --- a/Modules/Core/Common/include/itkImageToImageFilter.h +++ b/Modules/Core/Common/include/itkImageToImageFilter.h @@ -165,11 +165,11 @@ class ITK_TEMPLATE_EXPORT ImageToImageFilter:public ImageSource< TOutputImage >, */ virtual void PushBackInput(const InputImageType *image); - virtual void PopBackInput() ITK_OVERRIDE; + void PopBackInput() override; virtual void PushFrontInput(const InputImageType *image); - virtual void PopFrontInput() ITK_OVERRIDE; + void PopFrontInput() override; /** get/set the Coordinate tolerance * This tolerance is used when comparing the space defined @@ -209,9 +209,9 @@ class ITK_TEMPLATE_EXPORT ImageToImageFilter:public ImageSource< TOutputImage >, protected: ImageToImageFilter(); - ~ImageToImageFilter() ITK_OVERRIDE; + ~ImageToImageFilter() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** \brief Verifies that the input images occupy the same physical * space and the each index is at the same physical location. @@ -232,7 +232,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageFilter:public ImageSource< TOutputImage >, * * \sa ProcessObject::VerifyInputInformation */ - virtual void VerifyInputInformation() ITK_OVERRIDE; + void VerifyInputInformation() override; /** What is the input requested region that is required to produce * the output requested region? The base assumption for image @@ -258,7 +258,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageFilter:public ImageSource< TOutputImage >, * * \sa ProcessObject::GenerateInputRequestedRegion(), * ImageSource::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Typedef for the region copier function object that converts an * input region to an output region. */ @@ -351,9 +351,9 @@ class ITK_TEMPLATE_EXPORT ImageToImageFilter:public ImageSource< TOutputImage >, * the versions from ProcessObject to avoid warnings about hiding * methods from the superclass. */ - void PushBackInput(const DataObject *input) ITK_OVERRIDE + void PushBackInput(const DataObject *input) override { Superclass::PushBackInput(input); } - void PushFrontInput(const DataObject *input) ITK_OVERRIDE + void PushFrontInput(const DataObject *input) override { Superclass::PushFrontInput(input); } private: diff --git a/Modules/Core/Common/include/itkImageToImageFilter.hxx b/Modules/Core/Common/include/itkImageToImageFilter.hxx index b4464c272ac..4ac2357926c 100644 --- a/Modules/Core/Common/include/itkImageToImageFilter.hxx +++ b/Modules/Core/Common/include/itkImageToImageFilter.hxx @@ -90,7 +90,7 @@ ImageToImageFilter< TInputImage, TOutputImage > const TInputImage *in = dynamic_cast< const TInputImage * > ( this->ProcessObject::GetInput(idx) ); - if ( in == ITK_NULLPTR && this->ProcessObject::GetInput(idx) != ITK_NULLPTR ) + if ( in == nullptr && this->ProcessObject::GetInput(idx) != nullptr ) { itkWarningMacro (<< "Unable to convert input number " << idx << " to type " << typeid( InputImageType ).name () ); } @@ -170,7 +170,7 @@ ImageToImageFilter< TInputImage, TOutputImage > typedef ImageBase< InputImageDimension > ImageBaseType; - ImageBaseType *inputPtr1 = ITK_NULLPTR; + ImageBaseType *inputPtr1 = nullptr; InputDataObjectIterator it(this); for(; !it.IsAtEnd(); ++it ) diff --git a/Modules/Core/Common/include/itkImageTransformer.h b/Modules/Core/Common/include/itkImageTransformer.h index eff3ebe6f34..66b10fbcead 100644 --- a/Modules/Core/Common/include/itkImageTransformer.h +++ b/Modules/Core/Common/include/itkImageTransformer.h @@ -109,13 +109,13 @@ class ITK_TEMPLATE_EXPORT ImageTransformer:public ProcessObject * an input to a filter. */ virtual void PushBackInput(const InputImageType *image); - virtual void PopBackInput() ITK_OVERRIDE; + void PopBackInput() override; virtual void PushFrontInput(const InputImageType *image); - virtual void PopFrontInput() ITK_OVERRIDE; + void PopFrontInput() override; protected: ImageTransformer(); - virtual ~ImageTransformer() ITK_OVERRIDE {} + ~ImageTransformer() override {} /** The image transformer is assumed to need the whole input. * @@ -130,7 +130,7 @@ class ITK_TEMPLATE_EXPORT ImageTransformer:public ProcessObject * * \sa ProcessObject::GenerateInputRequestedRegion(), * ImageSource::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** A version of GenerateData() specific for image processing * filters. This implementation will split the processing across @@ -147,7 +147,7 @@ class ITK_TEMPLATE_EXPORT ImageTransformer:public ProcessObject * instead. * * \sa ThreadedGenerateData() */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** If an imaging filter can be implemented as a multithreaded * algorithm, the filter will provide an implementation of @@ -228,9 +228,9 @@ class ITK_TEMPLATE_EXPORT ImageTransformer:public ProcessObject * methods from the superclass. * NOTE: The same code resides in ImageToImageFilter */ - virtual void PushBackInput(const DataObject *input) ITK_OVERRIDE + void PushBackInput(const DataObject *input) override { Superclass::PushBackInput(input); } - virtual void PushFrontInput(const DataObject *input) ITK_OVERRIDE + void PushFrontInput(const DataObject *input) override { Superclass::PushFrontInput(input); } /** Internal structure used for passing image data into the threading library diff --git a/Modules/Core/Common/include/itkImageTransformer.hxx b/Modules/Core/Common/include/itkImageTransformer.hxx index 4f854906bbd..dce87296938 100644 --- a/Modules/Core/Common/include/itkImageTransformer.hxx +++ b/Modules/Core/Common/include/itkImageTransformer.hxx @@ -99,7 +99,7 @@ ImageTransformer< TInputImage > { if ( this->GetNumberOfInputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return itkDynamicCastInDebugMode< TInputImage * > diff --git a/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.h b/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.h index 05134f6a18b..ae50e86683c 100644 --- a/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.h +++ b/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.h @@ -63,8 +63,8 @@ class ITK_TEMPLATE_EXPORT ImageVectorOptimizerParametersHelper * The size of the new memroy block must be the same as current size of * Array and the parameter image's buffer, in elements of TValue. * Memory must be managed by caller afterwards. */ - virtual void MoveDataPointer(CommonContainerType* container, - TValue * pointer ); + void MoveDataPointer(CommonContainerType* container, + TValue * pointer ) override; /** Set an image that holds the parameter data. \c container is a pointer * of type itkArray to the object to which this helper is assigned. @@ -73,10 +73,10 @@ class ITK_TEMPLATE_EXPORT ImageVectorOptimizerParametersHelper * A dynamic cast is performed on \c object to make sure its of proper type. * Generally this will be called from * OptimizerParameters::SetParameterObject. */ - virtual void SetParametersObject(CommonContainerType * container, - LightObject * ); + void SetParametersObject(CommonContainerType * container, + LightObject * ) override; - virtual ~ImageVectorOptimizerParametersHelper(){} + ~ImageVectorOptimizerParametersHelper() override {} private: /** The parameter image used by the class */ diff --git a/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx b/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx index b1d5f6dfcbe..85e7845b578 100644 --- a/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx +++ b/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx @@ -30,7 +30,7 @@ template< typename TValue, ImageVectorOptimizerParametersHelper< TValue, NVectorDimension, VImageDimension > ::ImageVectorOptimizerParametersHelper() { - m_ParameterImage = ITK_NULLPTR; + m_ParameterImage = nullptr; } /** Move the data pointer */ @@ -66,16 +66,16 @@ void ImageVectorOptimizerParametersHelper< TValue, NVectorDimension, VImageDimension > ::SetParametersObject(CommonContainerType * container, LightObject * object) { - if( object == ITK_NULLPTR ) + if( object == nullptr ) { - m_ParameterImage = ITK_NULLPTR; + m_ParameterImage = nullptr; return; } else { ParameterImageType* image = dynamic_cast( object ); - if( image == ITK_NULLPTR ) + if( image == nullptr ) { itkGenericExceptionMacro( "ImageVectorOptimizerParametersHelper::SetParametersObject: object is " diff --git a/Modules/Core/Common/include/itkImportImageContainer.h b/Modules/Core/Common/include/itkImportImageContainer.h index cca6eb08f9f..99567a5e878 100644 --- a/Modules/Core/Common/include/itkImportImageContainer.h +++ b/Modules/Core/Common/include/itkImportImageContainer.h @@ -137,12 +137,12 @@ class ITK_TEMPLATE_EXPORT ImportImageContainer:public Object protected: ImportImageContainer(); - virtual ~ImportImageContainer() ITK_OVERRIDE; + ~ImportImageContainer() override; /** PrintSelf routine. Normally this is a protected internal method. It is * made public here so that Image can call this method. Users should not * call this method but should call Print() instead. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Allocates elements of the array. If UseDefaultConstructor is true, then diff --git a/Modules/Core/Common/include/itkImportImageContainer.hxx b/Modules/Core/Common/include/itkImportImageContainer.hxx index 5350f02a362..2bb4a84c719 100644 --- a/Modules/Core/Common/include/itkImportImageContainer.hxx +++ b/Modules/Core/Common/include/itkImportImageContainer.hxx @@ -36,7 +36,7 @@ template< typename TElementIdentifier, typename TElement > ImportImageContainer< TElementIdentifier, TElement > ::ImportImageContainer() { - m_ImportPointer = ITK_NULLPTR; + m_ImportPointer = nullptr; m_ContainerManageMemory = true; m_Capacity = 0; m_Size = 0; @@ -190,7 +190,7 @@ TElement *ImportImageContainer< TElementIdentifier, TElement > } catch ( ... ) { - data = ITK_NULLPTR; + data = nullptr; } if ( !data ) { @@ -212,7 +212,7 @@ void ImportImageContainer< TElementIdentifier, TElement > { delete[] m_ImportPointer; } - m_ImportPointer = ITK_NULLPTR; + m_ImportPointer = nullptr; m_Capacity = 0; m_Size = 0; } diff --git a/Modules/Core/Common/include/itkImportImageFilter.h b/Modules/Core/Common/include/itkImportImageFilter.h index 377f3bd0ee3..39d6df35bf3 100644 --- a/Modules/Core/Common/include/itkImportImageFilter.h +++ b/Modules/Core/Common/include/itkImportImageFilter.h @@ -127,17 +127,17 @@ class ITK_TEMPLATE_EXPORT ImportImageFilter: protected: ImportImageFilter(); - ~ImportImageFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImportImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** This filter does not actually "produce" any data, rather it "wraps" * the user supplied data into an itk::Image. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** This is a source, so it must set the spacing, size, and largest possible * region for the output image that it will produce. * \sa ProcessObject::GenerateOutputInformation() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** This filter can only produce the amount of data that it is given, * so we must override ProcessObject::EnlargeOutputRequestedRegion() @@ -146,7 +146,7 @@ class ITK_TEMPLATE_EXPORT ImportImageFilter: * given.) * * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - virtual void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImportImageFilter); diff --git a/Modules/Core/Common/include/itkInOrderTreeIterator.h b/Modules/Core/Common/include/itkInOrderTreeIterator.h index dcbf66f21c4..ce89b866b3b 100644 --- a/Modules/Core/Common/include/itkInOrderTreeIterator.h +++ b/Modules/Core/Common/include/itkInOrderTreeIterator.h @@ -37,21 +37,21 @@ class InOrderTreeIterator:public TreeIteratorBase< TTreeType > /** Constructors */ InOrderTreeIterator(TreeType & start); - InOrderTreeIterator(TreeType *tree, TreeNodeType *start = ITK_NULLPTR); + InOrderTreeIterator(TreeType *tree, TreeNodeType *start = nullptr); /** Get the type of iterator */ - NodeType GetType() const; + NodeType GetType() const override; /** Clone function */ - TreeIteratorBase< TTreeType > * Clone(); + TreeIteratorBase< TTreeType > * Clone() override; protected: /** Return the next node */ - const ValueType & Next(); + const ValueType & Next() override; /** Return true if the next node exists */ - bool HasNext() const; + bool HasNext() const override; private: @@ -83,7 +83,7 @@ InOrderTreeIterator< TTreeType >::GetType() const template< typename TTreeType > bool InOrderTreeIterator< TTreeType >::HasNext() const { - if ( const_cast< TreeNodeType * >( FindNextNode() ) != ITK_NULLPTR ) + if ( const_cast< TreeNodeType * >( FindNextNode() ) != nullptr ) { return true; } @@ -104,9 +104,9 @@ template< typename TTreeType > const typename InOrderTreeIterator< TTreeType >::TreeNodeType * InOrderTreeIterator< TTreeType >::FindNextNode() const { - if ( this->m_Position == ITK_NULLPTR ) + if ( this->m_Position == nullptr ) { - return ITK_NULLPTR; + return nullptr; } if ( this->m_Position->HasChildren() ) @@ -116,7 +116,7 @@ InOrderTreeIterator< TTreeType >::FindNextNode() const if ( !this->m_Position->HasParent() ) { - return ITK_NULLPTR; + return nullptr; } TreeNodeType *child = this->m_Position; @@ -128,7 +128,7 @@ InOrderTreeIterator< TTreeType >::FindNextNode() const while ( childPosition < lastChildPosition ) { TreeNodeType *help = parent->GetChild(childPosition + 1); - if ( help != ITK_NULLPTR ) + if ( help != nullptr ) { return help; } @@ -143,7 +143,7 @@ InOrderTreeIterator< TTreeType >::FindNextNode() const // Subtree if ( parent->ChildPosition(this->m_Root) >= 0 ) { - return ITK_NULLPTR; + return nullptr; } childPosition = parent->ChildPosition(child); lastChildPosition = parent->CountChildren() - 1; @@ -151,13 +151,13 @@ InOrderTreeIterator< TTreeType >::FindNextNode() const while ( childPosition < lastChildPosition ) { TreeNodeType *help = parent->GetChild(childPosition + 1); - if ( help != ITK_NULLPTR ) + if ( help != nullptr ) { return help; } } } - return ITK_NULLPTR; + return nullptr; } /** Clone function */ diff --git a/Modules/Core/Common/include/itkInPlaceImageFilter.h b/Modules/Core/Common/include/itkInPlaceImageFilter.h index b82b45a5c61..cd215dc6ea9 100644 --- a/Modules/Core/Common/include/itkInPlaceImageFilter.h +++ b/Modules/Core/Common/include/itkInPlaceImageFilter.h @@ -121,9 +121,9 @@ class ITK_TEMPLATE_EXPORT InPlaceImageFilter:public ImageToImageFilter< TInputIm protected: InPlaceImageFilter(); - ~InPlaceImageFilter() ITK_OVERRIDE; + ~InPlaceImageFilter() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** The GenerateData method normally allocates the buffers for all * of the outputs of a filter. Since InPlaceImageFilter's can use an @@ -137,7 +137,7 @@ class ITK_TEMPLATE_EXPORT InPlaceImageFilter:public ImageToImageFilter< TInputIm * an InPlaceFilter is not threaded (i.e. it provides an * implementation of GenerateData()), then this method (or * equivalent) must be called in GenerateData(). */ - virtual void AllocateOutputs() ITK_OVERRIDE + void AllocateOutputs() override { this->InternalAllocateOutputs(IsSame()); } @@ -151,7 +151,7 @@ class ITK_TEMPLATE_EXPORT InPlaceImageFilter:public ImageToImageFilter< TInputIm * releases the input that it has overwritten. * * \sa ProcessObject::ReleaseInputs() */ - virtual void ReleaseInputs() ITK_OVERRIDE; + void ReleaseInputs() override; /** This methods should only be called during the GenerateData phase * of the pipeline. This method return true if the input image's diff --git a/Modules/Core/Common/include/itkInPlaceImageFilter.hxx b/Modules/Core/Common/include/itkInPlaceImageFilter.hxx index cda865c81dd..89060dafa70 100644 --- a/Modules/Core/Common/include/itkInPlaceImageFilter.hxx +++ b/Modules/Core/Common/include/itkInPlaceImageFilter.hxx @@ -76,7 +76,7 @@ InPlaceImageFilter< TInputImage, TOutputImage > { // Use ProcessObject's GetInput method to get a DataObject pointer, // then perform a dynamic_cast to the expected InputImageType. This - // may fail and that is an expected likely hood, if inputPtr is ITK_NULLPTR + // may fail and that is an expected likely hood, if inputPtr is nullptr // then this filter will not run in-place. const InputImageType *inputPtr = dynamic_cast( this->ProcessObject::GetInput(0) ); OutputImageType *outputPtr = this->GetOutput(); @@ -85,7 +85,7 @@ InPlaceImageFilter< TInputImage, TOutputImage > // additionally the buffered and requested regions of the input and // output must match. bool rMatch = true; - if( inputPtr != ITK_NULLPTR && (unsigned int)InputImageDimension == (unsigned int)OutputImageDimension ) + if( inputPtr != nullptr && (unsigned int)InputImageDimension == (unsigned int)OutputImageDimension ) { for( unsigned int i=0; i<(unsigned int)InputImageDimension; i++ ) { @@ -103,7 +103,7 @@ InPlaceImageFilter< TInputImage, TOutputImage > { rMatch = false; } - if ( inputPtr != ITK_NULLPTR && + if ( inputPtr != nullptr && this->GetInPlace() && this->CanRunInPlace() && rMatch ) @@ -111,7 +111,7 @@ InPlaceImageFilter< TInputImage, TOutputImage > // Graft this first input to the output. Later, we'll need to // remove the input's hold on the bulk data. // - OutputImagePointer inputAsOutput = ITK_NULLPTR; + OutputImagePointer inputAsOutput = nullptr; if ( IsSame() ) { inputAsOutput = reinterpret_cast( const_cast< TInputImage * >( inputPtr ) ); diff --git a/Modules/Core/Common/include/itkIntTypes.h b/Modules/Core/Common/include/itkIntTypes.h index bebcd90b654..bf364f9924e 100644 --- a/Modules/Core/Common/include/itkIntTypes.h +++ b/Modules/Core/Common/include/itkIntTypes.h @@ -21,7 +21,7 @@ #include "itkMacro.h" #if defined( ITK_HAVE_STDINT_H ) -#include +#include #else // the system doesn't have the C or C++ version of stdint so lets use // KWIML's macros for fixed widths diff --git a/Modules/Core/Common/include/itkInteriorExteriorSpatialFunction.h b/Modules/Core/Common/include/itkInteriorExteriorSpatialFunction.h index 647371abfdb..0d548a5d925 100644 --- a/Modules/Core/Common/include/itkInteriorExteriorSpatialFunction.h +++ b/Modules/Core/Common/include/itkInteriorExteriorSpatialFunction.h @@ -69,12 +69,12 @@ class ITK_TEMPLATE_EXPORT InteriorExteriorSpatialFunction:public * A return of 1 means inside or on the surface of the function, * 0 means outside the function * The actual definition of inside/outside is left up to the subclass */ - virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE = 0; + OutputType Evaluate(const InputType & input) const override = 0; protected: InteriorExteriorSpatialFunction(); - virtual ~InteriorExteriorSpatialFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~InteriorExteriorSpatialFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(InteriorExteriorSpatialFunction); diff --git a/Modules/Core/Common/include/itkKernelFunctionBase.h b/Modules/Core/Common/include/itkKernelFunctionBase.h index 69f46d11a89..6b60790ffb7 100644 --- a/Modules/Core/Common/include/itkKernelFunctionBase.h +++ b/Modules/Core/Common/include/itkKernelFunctionBase.h @@ -55,7 +55,7 @@ class KernelFunctionBase:public FunctionBase< TRealValueType, TRealValueType > itkTypeMacro(KernelFunctionBase, FunctionBase); /** Evaluate the function. Subclasses must implement this. */ - virtual TRealValueType Evaluate(const TRealValueType & u) const ITK_OVERRIDE = 0; + TRealValueType Evaluate(const TRealValueType & u) const override = 0; #ifdef ITK_USE_STRICT_CONCEPT_CHECKING // Begin concept checking @@ -66,8 +66,8 @@ class KernelFunctionBase:public FunctionBase< TRealValueType, TRealValueType > protected: KernelFunctionBase() {}; - virtual ~KernelFunctionBase() ITK_OVERRIDE {}; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~KernelFunctionBase() override {}; + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkLaplacianOperator.h b/Modules/Core/Common/include/itkLaplacianOperator.h index 44bb6f43c02..6bb90b1db0a 100644 --- a/Modules/Core/Common/include/itkLaplacianOperator.h +++ b/Modules/Core/Common/include/itkLaplacianOperator.h @@ -104,7 +104,7 @@ class ITK_TEMPLATE_EXPORT LaplacianOperator: } /** Prints some debugging information */ - virtual void PrintSelf(std::ostream & os, Indent i) const + void PrintSelf(std::ostream & os, Indent i) const override { os << i << "LaplacianOperator { this=" << this << "}" << std::endl; @@ -122,11 +122,11 @@ class ITK_TEMPLATE_EXPORT LaplacianOperator: typedef typename Superclass::CoefficientVector CoefficientVector; /** Calculates operator coefficients. */ - CoefficientVector GenerateCoefficients(); + CoefficientVector GenerateCoefficients() override; /** Arranges coefficients spatially in the memory buffer, default * function was NOT used. */ - void Fill(const CoefficientVector &); + void Fill(const CoefficientVector &) override; private: /** Weights applied to derivatives in each axial direction */ diff --git a/Modules/Core/Common/include/itkLeafTreeIterator.h b/Modules/Core/Common/include/itkLeafTreeIterator.h index 1accf6d167d..34469944b27 100644 --- a/Modules/Core/Common/include/itkLeafTreeIterator.h +++ b/Modules/Core/Common/include/itkLeafTreeIterator.h @@ -42,21 +42,21 @@ class ITK_TEMPLATE_EXPORT LeafTreeIterator:public TreeIteratorBase< TTreeType > LeafTreeIterator(TreeType *tree); /** Destructor */ - virtual ~LeafTreeIterator(); + ~LeafTreeIterator() override; /** Return the type of iterator */ - NodeType GetType() const; + NodeType GetType() const override; /** Clone function */ - TreeIteratorBase< TTreeType > * Clone(); + TreeIteratorBase< TTreeType > * Clone() override; protected: /** Return the next value */ - const ValueType & Next(); + const ValueType & Next() override; /** Return true if the next value exists */ - bool HasNext() const; + bool HasNext() const override; private: @@ -67,7 +67,7 @@ class ITK_TEMPLATE_EXPORT LeafTreeIterator:public TreeIteratorBase< TTreeType > /** Constructor */ template< typename TTreeType > LeafTreeIterator< TTreeType >::LeafTreeIterator(const TTreeType *tree): - TreeIteratorBase< TTreeType >(tree, ITK_NULLPTR) + TreeIteratorBase< TTreeType >(tree, nullptr) { this->m_Begin = const_cast< TreeNodeType * >( this->FindNextNode() ); // // @@ -84,7 +84,7 @@ LeafTreeIterator< TTreeType >::LeafTreeIterator(const TTreeType *tree): /** Constructor */ template< typename TTreeType > LeafTreeIterator< TTreeType >::LeafTreeIterator(TTreeType *tree): - TreeIteratorBase< TTreeType >(tree, ITK_NULLPTR) + TreeIteratorBase< TTreeType >(tree, nullptr) { this->m_Begin = const_cast< TreeNodeType * >( this->FindNextNode() ); // // @@ -115,11 +115,11 @@ LeafTreeIterator< TTreeType >::GetType() const template< typename TTreeType > bool LeafTreeIterator< TTreeType >::HasNext() const { - if ( this->m_Position == ITK_NULLPTR ) + if ( this->m_Position == nullptr ) { return false; } - if ( const_cast< TreeNodeType * >( FindNextNode() ) != ITK_NULLPTR ) + if ( const_cast< TreeNodeType * >( FindNextNode() ) != nullptr ) { return true; } @@ -145,7 +145,7 @@ LeafTreeIterator< TTreeType >::FindNextNode() const ++it; // go next if ( it.IsAtEnd() ) { - return ITK_NULLPTR; + return nullptr; } if ( !it.HasChild() ) @@ -162,7 +162,7 @@ LeafTreeIterator< TTreeType >::FindNextNode() const ++it; } - return ITK_NULLPTR; + return nullptr; } /** Clone function */ diff --git a/Modules/Core/Common/include/itkLevelOrderTreeIterator.h b/Modules/Core/Common/include/itkLevelOrderTreeIterator.h index ff0c3a0f717..07545809f51 100644 --- a/Modules/Core/Common/include/itkLevelOrderTreeIterator.h +++ b/Modules/Core/Common/include/itkLevelOrderTreeIterator.h @@ -44,15 +44,15 @@ class ITK_TEMPLATE_EXPORT LevelOrderTreeIterator:public TreeIteratorBase< TTreeT typedef typename Superclass::NodeType NodeType; /** Constructor with end level specification */ - LevelOrderTreeIterator(TreeType *tree, int endLevel = INT_MAX, const TreeNodeType *start = ITK_NULLPTR); + LevelOrderTreeIterator(TreeType *tree, int endLevel = INT_MAX, const TreeNodeType *start = nullptr); /** Constructor with end level specification */ - LevelOrderTreeIterator(TreeType *tree, int startLevel, int endLevel, const TreeNodeType *start = ITK_NULLPTR); + LevelOrderTreeIterator(TreeType *tree, int startLevel, int endLevel, const TreeNodeType *start = nullptr); - virtual ~LevelOrderTreeIterator() {} + ~LevelOrderTreeIterator() override {} /** Get the type of the iterator */ - NodeType GetType() const; + NodeType GetType() const override; /** Get the start level */ int GetStartLevel() const; @@ -64,7 +64,7 @@ class ITK_TEMPLATE_EXPORT LevelOrderTreeIterator:public TreeIteratorBase< TTreeT int GetLevel() const; /** Clone function */ - TreeIteratorBase< TTreeType > * Clone(); + TreeIteratorBase< TTreeType > * Clone() override; /** operator = */ const Self & operator=(const Self & iterator) @@ -82,10 +82,10 @@ class ITK_TEMPLATE_EXPORT LevelOrderTreeIterator:public TreeIteratorBase< TTreeT protected: /** Return the next node */ - const ValueType & Next(); + const ValueType & Next() override; /** Return true if the next node exists */ - bool HasNext() const; + bool HasNext() const override; private: diff --git a/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx b/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx index fb4f336e367..92534a1e1a0 100644 --- a/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx +++ b/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx @@ -30,7 +30,7 @@ LevelOrderTreeIterator< TTreeType > { m_StartLevel = -1; m_EndLevel = endLevel; - if ( start != ITK_NULLPTR ) + if ( start != nullptr ) { m_Queue.push(start); this->m_Position = const_cast< TreeNodeType * >( start ); @@ -54,7 +54,7 @@ LevelOrderTreeIterator< TTreeType > { m_StartLevel = startLevel; m_EndLevel = endLevel; - if ( start != ITK_NULLPTR ) + if ( start != nullptr ) { m_Queue.push(start); this->m_Position = const_cast< TreeNodeType * >( start ); @@ -125,14 +125,14 @@ LevelOrderTreeIterator< TTreeType >::FindNextNode() const do { node = FindNextNodeHelp(); - if ( node == ITK_NULLPTR ) + if ( node == nullptr ) { - return ITK_NULLPTR; + return nullptr; } level = GetLevel(node); if ( level > m_EndLevel ) { - return ITK_NULLPTR; + return nullptr; } } while ( level < m_StartLevel ); @@ -145,7 +145,7 @@ template< typename TTreeType > int LevelOrderTreeIterator< TTreeType >::GetLevel() const { - if ( this->m_Position == ITK_NULLPTR ) + if ( this->m_Position == nullptr ) { return -1; } @@ -165,7 +165,7 @@ template< typename TTreeType > int LevelOrderTreeIterator< TTreeType >::GetLevel(const TreeNodeType *node) const { - if ( node == ITK_NULLPTR ) + if ( node == nullptr ) { return -1; } @@ -186,15 +186,15 @@ LevelOrderTreeIterator< TTreeType >::FindNextNodeHelp() const { if ( m_Queue.empty() ) { - return ITK_NULLPTR; + return nullptr; } const TreeNodeType *currentNode = m_Queue.front(); m_Queue.pop(); - if ( currentNode == ITK_NULLPTR ) + if ( currentNode == nullptr ) { - return ITK_NULLPTR; + return nullptr; } int size = currentNode->CountChildren(); @@ -202,7 +202,7 @@ LevelOrderTreeIterator< TTreeType >::FindNextNodeHelp() const for ( int i = 0; i < size; i++ ) { TreeNodeType *child = dynamic_cast< TreeNodeType * >( currentNode->GetChild(i) ); - if ( child != ITK_NULLPTR ) + if ( child != nullptr ) { m_Queue.push(child); } diff --git a/Modules/Core/Common/include/itkLightProcessObject.h b/Modules/Core/Common/include/itkLightProcessObject.h index 91923f3650c..6261dd8a3a4 100644 --- a/Modules/Core/Common/include/itkLightProcessObject.h +++ b/Modules/Core/Common/include/itkLightProcessObject.h @@ -115,8 +115,8 @@ class ITKCommon_EXPORT LightProcessObject:public Object protected: LightProcessObject(); - ~LightProcessObject() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LightProcessObject() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** This method causes the filter to generate its output. */ virtual void GenerateData() {} diff --git a/Modules/Core/Common/include/itkLineCell.h b/Modules/Core/Common/include/itkLineCell.h index afd3ef0ad23..bab16a583e4 100644 --- a/Modules/Core/Common/include/itkLineCell.h +++ b/Modules/Core/Common/include/itkLineCell.h @@ -59,30 +59,30 @@ class ITK_TEMPLATE_EXPORT LineCell:public TCellInterface itkStaticConstMacro(CellDimension, unsigned int, 1); /** Implement the standard CellInterface. */ - virtual CellGeometry GetType(void) const ITK_OVERRIDE + CellGeometry GetType(void) const override { return Superclass::LINE_CELL; } - virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE; + void MakeCopy(CellAutoPointer &) const override; - virtual unsigned int GetDimension(void) const ITK_OVERRIDE; + unsigned int GetDimension(void) const override; - virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE; + unsigned int GetNumberOfPoints(void) const override; - virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE; + CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override; - virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) ITK_OVERRIDE; - virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE; + bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override; + void SetPointIds(PointIdConstIterator first) override; - virtual void SetPointIds(PointIdConstIterator first, - PointIdConstIterator last) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first, + PointIdConstIterator last) override; - virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE; - virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE; + void SetPointId(int localId, PointIdentifier) override; + PointIdIterator PointIdsBegin(void) override; - virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsBegin(void) const override; - virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE; + PointIdIterator PointIdsEnd(void) override; - virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsEnd(void) const override; /** Line-specific interface. */ virtual CellFeatureCount GetNumberOfVertices() const; @@ -100,7 +100,7 @@ class ITK_TEMPLATE_EXPORT LineCell:public TCellInterface } } - ~LineCell() ITK_OVERRIDE {} + ~LineCell() override {} protected: /** Store number of points needed for a line segment. */ diff --git a/Modules/Core/Common/include/itkLineIterator.h b/Modules/Core/Common/include/itkLineIterator.h index 000fa6d61a4..1d1254e585f 100644 --- a/Modules/Core/Common/include/itkLineIterator.h +++ b/Modules/Core/Common/include/itkLineIterator.h @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT LineIterator:public LineConstIterator< TImage > const IndexType & lastIndex); /** Default Destructor. */ - virtual ~LineIterator() ITK_OVERRIDE {} + ~LineIterator() override {} }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkLogOutput.h b/Modules/Core/Common/include/itkLogOutput.h index bce11ce9a72..5c95727626c 100644 --- a/Modules/Core/Common/include/itkLogOutput.h +++ b/Modules/Core/Common/include/itkLogOutput.h @@ -63,7 +63,7 @@ class ITKCommon_EXPORT LogOutput:public Object LogOutput(); /** Destructor */ - virtual ~LogOutput(); + ~LogOutput() override; }; } diff --git a/Modules/Core/Common/include/itkLogger.h b/Modules/Core/Common/include/itkLogger.h index e1cbf445027..78b77ed4534 100644 --- a/Modules/Core/Common/include/itkLogger.h +++ b/Modules/Core/Common/include/itkLogger.h @@ -53,7 +53,7 @@ class ITKCommon_EXPORT Logger:public LoggerBase Logger(); /** Destructor */ - virtual ~Logger() ITK_OVERRIDE; + ~Logger() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Logger); diff --git a/Modules/Core/Common/include/itkLoggerBase.h b/Modules/Core/Common/include/itkLoggerBase.h index 2c9e2e646c3..c9a3beb4dba 100644 --- a/Modules/Core/Common/include/itkLoggerBase.h +++ b/Modules/Core/Common/include/itkLoggerBase.h @@ -166,10 +166,10 @@ class ITKCommon_EXPORT LoggerBase:public Object LoggerBase(); /** Destructor */ - virtual ~LoggerBase() ITK_OVERRIDE; + ~LoggerBase() override; /** Print contents of a LoggerBase */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; protected: diff --git a/Modules/Core/Common/include/itkLoggerManager.h b/Modules/Core/Common/include/itkLoggerManager.h index e09047da3b0..be871399ba2 100644 --- a/Modules/Core/Common/include/itkLoggerManager.h +++ b/Modules/Core/Common/include/itkLoggerManager.h @@ -96,10 +96,10 @@ class ITKCommon_EXPORT LoggerManager:public Object LoggerManager() {} /** Destructor */ - virtual ~LoggerManager() ITK_OVERRIDE {} + ~LoggerManager() override {} /** Print contents of a LoggerManager */ - virtual void PrintSelf(std::ostream & s, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & s, Indent indent) const override; private: diff --git a/Modules/Core/Common/include/itkLoggerOutput.h b/Modules/Core/Common/include/itkLoggerOutput.h index 43dc28a3ada..9d33e1e770e 100644 --- a/Modules/Core/Common/include/itkLoggerOutput.h +++ b/Modules/Core/Common/include/itkLoggerOutput.h @@ -64,27 +64,27 @@ class ITKCommon_EXPORT LoggerOutput:public OutputWindow typedef Logger *LoggerType; /** Send a string to display. */ - virtual void DisplayText(const char *t) ITK_OVERRIDE; + void DisplayText(const char *t) override; /** Send a string as an error message to display. * The default implementation calls DisplayText() but subclasses * could present this message differently. */ - virtual void DisplayErrorText(const char *t) ITK_OVERRIDE; + void DisplayErrorText(const char *t) override; /** Send a string as a warningmessage to display. * The default implementation calls DisplayText() but subclasses * could present this message differently. */ - virtual void DisplayWarningText(const char *t) ITK_OVERRIDE; + void DisplayWarningText(const char *t) override; /** Send a string as a message to display. * The default implementation calls DisplayText() but subclasses * could present this message differently. */ - virtual void DisplayGenericOutputText(const char *t) ITK_OVERRIDE; + void DisplayGenericOutputText(const char *t) override; /** Send a string as a debug message to display. * The default implementation calls DisplayText() but subclasses * could present this message differently. */ - virtual void DisplayDebugText(const char *t) ITK_OVERRIDE; + void DisplayDebugText(const char *t) override; itkSetMacro(Logger, LoggerType); @@ -96,9 +96,9 @@ class ITKCommon_EXPORT LoggerOutput:public OutputWindow } protected: - LoggerOutput():m_Logger(ITK_NULLPTR) {} - virtual ~LoggerOutput() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + LoggerOutput():m_Logger(nullptr) {} + ~LoggerOutput() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: Logger *m_Logger; diff --git a/Modules/Core/Common/include/itkLoggerThreadWrapper.h b/Modules/Core/Common/include/itkLoggerThreadWrapper.h index d245cc29705..2e122f21ee5 100644 --- a/Modules/Core/Common/include/itkLoggerThreadWrapper.h +++ b/Modules/Core/Common/include/itkLoggerThreadWrapper.h @@ -67,16 +67,16 @@ class ITK_TEMPLATE_EXPORT LoggerThreadWrapper:public SimpleLoggerType /** Set the priority level for the current logger. Only messages that have * priorities equal or greater than the one set here will be posted to the * current outputs */ - virtual void SetPriorityLevel(PriorityLevelType level) ITK_OVERRIDE; + void SetPriorityLevel(PriorityLevelType level) override; /** Get the priority level for the current logger. Only messages that have * priorities equal or greater than the one set here will be posted to the * current outputs */ - virtual PriorityLevelType GetPriorityLevel() const ITK_OVERRIDE; + PriorityLevelType GetPriorityLevel() const override; - virtual void SetLevelForFlushing(PriorityLevelType level) ITK_OVERRIDE; + void SetLevelForFlushing(PriorityLevelType level) override; - virtual PriorityLevelType GetLevelForFlushing() const ITK_OVERRIDE; + PriorityLevelType GetLevelForFlushing() const override; /** Set the delay in milliseconds between checks to see if there are any * low priority messages to be processed. @@ -89,11 +89,11 @@ class ITK_TEMPLATE_EXPORT LoggerThreadWrapper:public SimpleLoggerType virtual DelayType GetDelay() const; /** Registers another output stream with the multiple output. */ - virtual void AddLogOutput(OutputType *output) ITK_OVERRIDE; + void AddLogOutput(OutputType *output) override; - virtual void Write(PriorityLevelType level, std::string const & content) ITK_OVERRIDE; + void Write(PriorityLevelType level, std::string const & content) override; - virtual void Flush() ITK_OVERRIDE; + void Flush() override; protected: @@ -101,10 +101,10 @@ class ITK_TEMPLATE_EXPORT LoggerThreadWrapper:public SimpleLoggerType LoggerThreadWrapper(); /** Destructor */ - virtual ~LoggerThreadWrapper() ITK_OVERRIDE; + ~LoggerThreadWrapper() override; /** Print contents of a LoggerThreadWrapper */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; static ITK_THREAD_RETURN_TYPE ThreadFunction(void *); diff --git a/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx b/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx index c8d1dd37343..2af1e813991 100644 --- a/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx +++ b/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx @@ -172,7 +172,7 @@ ITK_THREAD_RETURN_TYPE LoggerThreadWrapper< SimpleLoggerType >::ThreadFunction(v { struct MultiThreader:: ThreadInfoStruct *pInfo = (struct MultiThreader::ThreadInfoStruct *)pInfoStruct; - if ( ( pInfo != ITK_NULLPTR ) && ( pInfo->UserData != ITK_NULLPTR ) ) + if ( ( pInfo != nullptr ) && ( pInfo->UserData != nullptr ) ) { LoggerThreadWrapper *pLogger = (LoggerThreadWrapper *)pInfo->UserData; diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h index bc3f56f51a4..83333facbc0 100644 --- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h @@ -207,9 +207,7 @@ namespace itk #endif #endif -#if ITK_COMPILED_CXX_STANDARD_VERSION >= 201103L - #define ITK_HAS_CXX11_RVREF -#endif +#define ITK_HAS_CXX11_RVREF //-*-*-* //The following deprecations should be removed in ITKV6 and later @@ -238,7 +236,7 @@ namespace itk # if ( __GNUC__ >= 7 ) # define ITK_FALLTHROUGH __attribute__((fallthrough)) # endif -#elif ITK_COMPILED_CXX_STANDARD_VERSION >= 201103L && defined(__has_warning) +#elif defined(__has_warning) # if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") # define ITK_FALLTHROUGH [[clang::fallthrough]] # endif @@ -277,7 +275,7 @@ namespace itk static Pointer New(void) \ { \ Pointer smartPtr = ::itk::ObjectFactory< x >::Create(); \ - if ( smartPtr.GetPointer() == ITK_NULLPTR ) \ + if ( smartPtr.GetPointer() == nullptr ) \ { \ smartPtr = new x; \ } \ @@ -286,7 +284,7 @@ namespace itk } #define itkCreateAnotherMacro(x) \ - virtual ::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE \ + ::itk::LightObject::Pointer CreateAnother(void) const override \ { \ ::itk::LightObject::Pointer smartPtr; \ smartPtr = x::New().GetPointer(); \ @@ -322,7 +320,7 @@ namespace itk rawPtr->UnRegister(); \ return smartPtr; \ } \ - virtual ::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE \ + ::itk::LightObject::Pointer CreateAnother(void) const override \ { \ ::itk::LightObject::Pointer smartPtr; \ smartPtr = x::New().GetPointer(); \ @@ -343,7 +341,7 @@ namespace itk /** Macro used to add standard methods to all classes, mainly type * information. */ #define itkTypeMacro(thisClass, superclass) \ - virtual const char *GetNameOfClass() const ITK_OVERRIDE \ + const char *GetNameOfClass() const override \ { \ return #thisClass; \ } @@ -867,7 +865,7 @@ CLANG_PRAGMA_POP \ const DecoratorType *input = \ itkDynamicCastInDebugMode< const DecoratorType * >( \ this->ProcessObject::GetInput(#name) ); \ - if( input == ITK_NULLPTR ) \ + if( input == nullptr ) \ { \ itkExceptionMacro(<<"input" #name " is not set"); \ } \ @@ -927,9 +925,9 @@ CLANG_PRAGMA_POP \ const DecoratorType *input = \ itkDynamicCastInDebugMode< const DecoratorType * >( \ this->ProcessObject::GetInput(#name) ); \ - if( input == ITK_NULLPTR ) \ + if( input == nullptr ) \ { \ - return ITK_NULLPTR; \ + return nullptr; \ } \ return input->Get(); \ } @@ -1246,7 +1244,7 @@ class kernel \ // A useful macro in the PrintSelf method for printing member variables // which are pointers to object based on the LightObject class. #define itkPrintSelfObjectMacro(name) \ - if (static_cast(this->m_##name) == ITK_NULLPTR) \ + if (static_cast(this->m_##name) == nullptr) \ { \ os << indent << #name << ": (null)" << std::endl; \ } \ @@ -1307,7 +1305,7 @@ class kernel \ const DecoratorType *output = \ itkDynamicCastInDebugMode< const DecoratorType * >( \ this->ProcessObject::GetOutput(#name) ); \ - if( output == ITK_NULLPTR ) \ + if( output == nullptr ) \ { \ itkExceptionMacro(<<"output" #name " is not set"); \ } \ diff --git a/Modules/Core/Common/include/itkMath.h b/Modules/Core/Common/include/itkMath.h index d51abf860b4..9278c8dfb28 100644 --- a/Modules/Core/Common/include/itkMath.h +++ b/Modules/Core/Common/include/itkMath.h @@ -744,8 +744,6 @@ ITKCommon_EXPORT unsigned long long GreatestPrimeFactor( unsigned long long n ); * Alias the vnl_math functions in the itk::Math * namespace. If possible, use the std:: equivalents */ -#if ITK_COMPILED_CXX_STANDARD_VERSION >= 201103L - /** A macro to allow perfect forwarding of functions using * C++11 or greater features * http://stackoverflow.com/questions/9864125/c11-how-to-alias-a-function @@ -782,82 +780,6 @@ ITK_PERFECT_FORWARD_MACRO(squared_magnitude,vnl_math::squared_magnitude); #undef ITK_PERFECT_FORWARD_MACRO -#else -template bool isnan(const T value) { return vnl_math::isnan(value); } -template bool isinf(const T value) { return vnl_math::isinf(value); } -template bool isfinite(const T value) { return vnl_math::isfinite(value); } -template T cbrt(const T value) { return vnl_math::cuberoot(value); } -template T hypot(const T value1, const T value2) { return vnl_math::hypot(value1,value2); } -template T angle_0_to_2pi(const T angle) { return vnl_math::angle_0_to_2pi(angle); } -template T angle_minuspi_to_pi(const T angle) { return vnl_math::angle_minuspi_to_pi(angle); } -template inline int rnd_halfinttoeven(const T x) {return vnl_math::rnd_halfinttoeven(x); } -template inline int rnd_halfintup(const T x) { return vnl_math::rnd_halfintup(x); } -template inline int rnd(const T x) { return vnl_math::rnd(x); } -template inline int floor(const T x) { return vnl_math::floor(x); } -template inline int ceil(const T x) { return vnl_math::ceil(x); } -template int sgn(const T x) { return vnl_math::sgn(x); } -template int sgn0(const T x) { return vnl_math::sgn0(x); } -template T remainder_truncated(const T x, const T y) { return vnl_math::remainder_truncated(x,y); } -template T remainder_floored(const T x, const T y) { return vnl_math::remainder_floored(x,y); } - -inline bool abs(const bool x) { return x; } -inline unsigned char abs(const unsigned char x) { return x; } -inline unsigned char abs(const signed char x) { return vnl_math::abs(x); } -inline unsigned char abs(const char x) { return vnl_math::abs(x); } -inline unsigned short abs(const short x) { return vnl_math::abs(x); } -inline unsigned short abs(const unsigned short x) { return x; } -inline unsigned int abs(const int x) { return vnl_math::abs(x); } -inline unsigned int abs(const unsigned int x) { return x; } -inline unsigned long abs(const long x) { return vnl_math::abs(x); } -inline unsigned long abs(const unsigned long x) { return x; } -#if VCL_HAS_LONG_LONG -inline unsigned long long abs(const long long x) { return vnl_math::abs(x); } -inline unsigned long long abs(const unsigned long long x) { return x; } -#endif -inline float abs(const float x) { return std::abs(x); } -inline double abs(const double x) { return std::abs(x); } -inline long double abs(const long double x) { return std::abs(x); } - -inline bool sqr(const bool x) { return vnl_math::sqr(x); } -inline int sqr(const int x) { return vnl_math::sqr(x); } -inline unsigned int sqr(const unsigned int x) { return vnl_math::sqr(x); } -inline long sqr(const long x) { return vnl_math::sqr(x); } -inline unsigned long sqr(const unsigned long x) { return vnl_math::sqr(x); } -#if VCL_HAS_LONG_LONG -inline long long sqr(const long long x) { return vnl_math::sqr(x); } -inline unsigned long long sqr(const unsigned long long x) { return vnl_math::sqr(x); } -#endif -inline float sqr(const float x) { return vnl_math::sqr(x); } -inline double sqr(const double x) { return vnl_math::sqr(x); } - -inline bool cube(const bool x) { return vnl_math::cube(x); } -inline int cube(const int x) { return vnl_math::cube(x); } -inline unsigned int cube(const unsigned int x) { return vnl_math::cube(x); } -inline long cube(const long x) { return vnl_math::cube(x); } -inline unsigned long cube(const unsigned long x) { return vnl_math::cube(x); } -#if VCL_HAS_LONG_LONG -inline long long cube(const long long x) { return vnl_math::cube(x); } -inline unsigned long long cube(const unsigned long long x) { return vnl_math::cube(x); } -#endif -inline float cube(const float x) { return vnl_math::cube(x); } -inline double cube(const double x) { return vnl_math::cube(x); } - -inline unsigned int squared_magnitude(const char x) { return vnl_math::squared_magnitude(x); } -inline unsigned int squared_magnitude(const unsigned char x) { return vnl_math::squared_magnitude(x); } -inline unsigned int squared_magnitude(const int x) { return vnl_math::squared_magnitude(x); } -inline unsigned int squared_magnitude(const unsigned int x) { return vnl_math::squared_magnitude(x); } -inline unsigned long squared_magnitude(const long x) { return vnl_math::squared_magnitude(x); } -inline unsigned long squared_magnitude(const unsigned long x) { return vnl_math::squared_magnitude(x); } -#if VCL_HAS_LONG_LONG -inline unsigned long long squared_magnitude(const long long x) { return vnl_math::squared_magnitude(x); } -inline unsigned long long squared_magnitude(const unsigned long long x) { return vnl_math::squared_magnitude(x); } -#endif -inline float squared_magnitude(const float x) { return vnl_math::squared_magnitude(x); } -inline double squared_magnitude(const double x) { return vnl_math::squared_magnitude(x); } -inline long double squared_magnitude(const long double x) { return vnl_math::squared_magnitude(x); } - -#endif //If not C++11 features - } // end namespace Math } // end namespace itk diff --git a/Modules/Core/Common/include/itkMathDetail.h b/Modules/Core/Common/include/itkMathDetail.h index 19f535634b5..6b17b156137 100644 --- a/Modules/Core/Common/include/itkMathDetail.h +++ b/Modules/Core/Common/include/itkMathDetail.h @@ -35,7 +35,7 @@ // The Sun Studio CC compiler seems to have a bug where if cstdio is // included stdio.h must also be included before fenv.h #include -#include // should this be cfenv? +#include // should this be cfenv? #endif /* ITK_HAVE_FENV_H */ #if defined( ITK_HAVE_EMMINTRIN_H ) && !defined( ITK_WRAPPING_PARSER ) diff --git a/Modules/Core/Common/include/itkMatrixResizeableDataObject.h b/Modules/Core/Common/include/itkMatrixResizeableDataObject.h index 5481b22ae6e..319611db8da 100644 --- a/Modules/Core/Common/include/itkMatrixResizeableDataObject.h +++ b/Modules/Core/Common/include/itkMatrixResizeableDataObject.h @@ -56,7 +56,7 @@ class ITK_TEMPLATE_EXPORT MatrixResizeableDataObject:public DataObject, public v MatrixResizeableDataObject(); /** Default Destructor. */ - ~MatrixResizeableDataObject() ITK_OVERRIDE; + ~MatrixResizeableDataObject() override; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkMemoryProbe.h b/Modules/Core/Common/include/itkMemoryProbe.h index 76750900a79..ba50b1cb745 100644 --- a/Modules/Core/Common/include/itkMemoryProbe.h +++ b/Modules/Core/Common/include/itkMemoryProbe.h @@ -42,7 +42,7 @@ class ITKCommon_EXPORT MemoryProbe: public: MemoryProbe(); - ~MemoryProbe() ITK_OVERRIDE; + ~MemoryProbe() override; /** Type for measuring memory. */ typedef SizeValueType MemoryLoadType; @@ -51,7 +51,7 @@ class ITKCommon_EXPORT MemoryProbe: typedef double MeanMemoryLoadType; protected: - virtual MemoryLoadType GetInstantValue(void) const ITK_OVERRIDE; + MemoryLoadType GetInstantValue(void) const override; private: mutable MemoryUsageObserver m_MemoryObserver; diff --git a/Modules/Core/Common/include/itkMemoryProbesCollectorBase.h b/Modules/Core/Common/include/itkMemoryProbesCollectorBase.h index 47d12c43478..2d410b64411 100644 --- a/Modules/Core/Common/include/itkMemoryProbesCollectorBase.h +++ b/Modules/Core/Common/include/itkMemoryProbesCollectorBase.h @@ -37,7 +37,7 @@ namespace itk class ITKCommon_EXPORT MemoryProbesCollectorBase:public ResourceProbesCollectorBase< MemoryProbe > { public: - virtual ~MemoryProbesCollectorBase(); + ~MemoryProbesCollectorBase() override; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkMemoryUsageObserver.h b/Modules/Core/Common/include/itkMemoryUsageObserver.h index 34a0d37af45..91496075d83 100644 --- a/Modules/Core/Common/include/itkMemoryUsageObserver.h +++ b/Modules/Core/Common/include/itkMemoryUsageObserver.h @@ -94,8 +94,8 @@ class ITKCommon_EXPORT MacOSXMemoryUsageObserver:public MemoryUsageObserverBase { public: /** destructor */ - virtual ~MacOSXMemoryUsageObserver() ITK_OVERRIDE; - virtual MemoryLoadType GetMemoryUsage() ITK_OVERRIDE; + ~MacOSXMemoryUsageObserver() override; + MemoryLoadType GetMemoryUsage() override; }; #endif // Mac OS X @@ -114,8 +114,8 @@ class ITKCommon_EXPORT SysResourceMemoryUsageObserver:public MemoryUsageObserver { public: /** destructor */ - virtual ~SysResourceMemoryUsageObserver() ITK_OVERRIDE; - virtual MemoryLoadType GetMemoryUsage() ITK_OVERRIDE; + ~SysResourceMemoryUsageObserver() override; + MemoryLoadType GetMemoryUsage() override; }; #if defined( ITK_HAS_MALLINFO ) @@ -157,7 +157,7 @@ class ITKCommon_EXPORT MemoryUsageObserver: { public: /** destructor */ - virtual ~MemoryUsageObserver(); + ~MemoryUsageObserver() override; }; } // end of namespace itk diff --git a/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h b/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h index e3c9c5aa144..1e276815538 100644 --- a/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h +++ b/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h @@ -206,7 +206,7 @@ class ITKCommon_EXPORT MersenneTwisterRandomVariateGenerator: * values together, otherwise the generator state can be learned after * reading 624 consecutive values. */ - virtual double GetVariate() ITK_OVERRIDE; + double GetVariate() override; /** Same as GetVariate() */ double operator()(); @@ -239,8 +239,8 @@ class ITKCommon_EXPORT MersenneTwisterRandomVariateGenerator: protected: MersenneTwisterRandomVariateGenerator(); - virtual ~MersenneTwisterRandomVariateGenerator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MersenneTwisterRandomVariateGenerator() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Period parameter */ itkStaticConstMacro(M, unsigned int, 397); @@ -359,7 +359,7 @@ inline void MersenneTwisterRandomVariateGenerator::SetSeed() { // use time() and clock() to generate a unlikely-to-repeat seed. - SetSeed( hash( time(ITK_NULLPTR), clock() ) ); + SetSeed( hash( time(nullptr), clock() ) ); } diff --git a/Modules/Core/Common/include/itkMetaDataObject.h b/Modules/Core/Common/include/itkMetaDataObject.h index ac8c44ab2d6..6c2622d8a0f 100644 --- a/Modules/Core/Common/include/itkMetaDataObject.h +++ b/Modules/Core/Common/include/itkMetaDataObject.h @@ -91,7 +91,7 @@ class ITK_TEMPLATE_EXPORT MetaDataObject:public MetaDataObjectBase * \author Hans J. Johnson * \return A pointer to a const char array containing the unique type name. */ - virtual const char * GetMetaDataObjectTypeName() const ITK_OVERRIDE; + const char * GetMetaDataObjectTypeName() const override; /** * The definition of this function is necessary to fulfill @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT MetaDataObject:public MetaDataObjectBase * \author Hans J. Johnson * \return A constant reference to a std::type_info object */ - virtual const std::type_info & GetMetaDataObjectTypeInfo() const ITK_OVERRIDE; + const std::type_info & GetMetaDataObjectTypeInfo() const override; /** * Function to return the stored value of type MetaDataObjectType. @@ -119,11 +119,11 @@ class ITK_TEMPLATE_EXPORT MetaDataObject:public MetaDataObjectBase * Defines the default behavior for printing out this element * \param os An output stream */ - virtual void Print(std::ostream & os) const ITK_OVERRIDE; + void Print(std::ostream & os) const override; protected: MetaDataObject(); - virtual ~MetaDataObject() ITK_OVERRIDE; + ~MetaDataObject() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaDataObject); @@ -177,7 +177,7 @@ inline bool ExposeMetaData(const MetaDataDictionary & Dictionary, const std::str const MetaDataObjectBase::ConstPointer baseObjectSmartPointer = Dictionary[key]; MetaDataObject< T > const * const TempMetaDataObject = dynamic_cast< MetaDataObject< T > const * >( baseObjectSmartPointer.GetPointer() ); - if ( TempMetaDataObject == ITK_NULLPTR ) + if ( TempMetaDataObject == nullptr ) { return false; } diff --git a/Modules/Core/Common/include/itkMetaDataObjectBase.h b/Modules/Core/Common/include/itkMetaDataObjectBase.h index 307c76e5694..a9c53aec1f9 100644 --- a/Modules/Core/Common/include/itkMetaDataObjectBase.h +++ b/Modules/Core/Common/include/itkMetaDataObjectBase.h @@ -76,7 +76,7 @@ class ITKCommon_EXPORT MetaDataObjectBase: public LightObject protected: MetaDataObjectBase(); - virtual ~MetaDataObjectBase() ITK_OVERRIDE; + ~MetaDataObjectBase() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaDataObjectBase); diff --git a/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h b/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h index 7787e5f3ef6..b47fba9faba 100644 --- a/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h +++ b/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h @@ -103,8 +103,8 @@ class ITK_TEMPLATE_EXPORT MinimumMaximumImageCalculator:public Object protected: MinimumMaximumImageCalculator(); - virtual ~MinimumMaximumImageCalculator() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MinimumMaximumImageCalculator() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MinimumMaximumImageCalculator); diff --git a/Modules/Core/Common/include/itkMultiThreader.h b/Modules/Core/Common/include/itkMultiThreader.h index 966f50295ba..71b27baf3ff 100644 --- a/Modules/Core/Common/include/itkMultiThreader.h +++ b/Modules/Core/Common/include/itkMultiThreader.h @@ -170,8 +170,8 @@ class ITKCommon_EXPORT MultiThreader : public Object protected: MultiThreader(); - ~MultiThreader() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MultiThreader() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MultiThreader); diff --git a/Modules/Core/Common/include/itkMultipleLogOutput.h b/Modules/Core/Common/include/itkMultipleLogOutput.h index ba8111d1d09..f213b2121e2 100644 --- a/Modules/Core/Common/include/itkMultipleLogOutput.h +++ b/Modules/Core/Common/include/itkMultipleLogOutput.h @@ -59,23 +59,23 @@ class ITKCommon_EXPORT MultipleLogOutput:public LogOutput void AddLogOutput(OutputType *output); /** Broadcast a flush operation to all the output streams */ - virtual void Flush() ITK_OVERRIDE; + void Flush() override; /** Write to multiple outputs */ - virtual void Write(double timestamp) ITK_OVERRIDE; + void Write(double timestamp) override; /** Write to multiple outputs */ - virtual void Write(const std::string & content) ITK_OVERRIDE; + void Write(const std::string & content) override; /** Write to a buffer */ - virtual void Write(const std::string & content, double timestamp) ITK_OVERRIDE; + void Write(const std::string & content, double timestamp) override; protected: /** Constructor */ MultipleLogOutput(); /** Destructor */ - virtual ~MultipleLogOutput() ITK_OVERRIDE; + ~MultipleLogOutput() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MultipleLogOutput); diff --git a/Modules/Core/Common/include/itkMutexLock.h b/Modules/Core/Common/include/itkMutexLock.h index 5bfccac4bb3..045bd82a6db 100644 --- a/Modules/Core/Common/include/itkMutexLock.h +++ b/Modules/Core/Common/include/itkMutexLock.h @@ -127,10 +127,10 @@ class ITKCommon_EXPORT MutexLock:public Object protected: MutexLock() {} - ~MutexLock() ITK_OVERRIDE {} + ~MutexLock() override {} SimpleMutexLock m_SimpleMutexLock; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MutexLock); diff --git a/Modules/Core/Common/include/itkNeighborhoodAllocator.h b/Modules/Core/Common/include/itkNeighborhoodAllocator.h index c86ebeeaa80..eeeac55f020 100644 --- a/Modules/Core/Common/include/itkNeighborhoodAllocator.h +++ b/Modules/Core/Common/include/itkNeighborhoodAllocator.h @@ -53,7 +53,7 @@ class NeighborhoodAllocator typedef const TPixel * const_iterator; /** Default constructor */ - NeighborhoodAllocator():m_ElementCount(0), m_Data(ITK_NULLPTR) {} + NeighborhoodAllocator():m_ElementCount(0), m_Data(nullptr) {} /** Default destructor */ ~NeighborhoodAllocator() diff --git a/Modules/Core/Common/include/itkNeighborhoodIterator.h b/Modules/Core/Common/include/itkNeighborhoodIterator.h index b0de5ccbbc8..adb3af5f654 100644 --- a/Modules/Core/Common/include/itkNeighborhoodIterator.h +++ b/Modules/Core/Common/include/itkNeighborhoodIterator.h @@ -252,7 +252,7 @@ class ITK_TEMPLATE_EXPORT NeighborhoodIterator: Superclass(radius, ptr, region) {} /** Standard print method */ - virtual void PrintSelf(std::ostream &, Indent) const; + void PrintSelf(std::ostream &, Indent) const override; /** Returns the central memory pointer of the neighborhood. */ InternalPixelType * GetCenterPointer() diff --git a/Modules/Core/Common/include/itkNeighborhoodOperator.h b/Modules/Core/Common/include/itkNeighborhoodOperator.h index 6df08e2a9f3..98b199949b4 100644 --- a/Modules/Core/Common/include/itkNeighborhoodOperator.h +++ b/Modules/Core/Common/include/itkNeighborhoodOperator.h @@ -130,7 +130,7 @@ class ITK_TEMPLATE_EXPORT NeighborhoodOperator: virtual void FlipAxes(); /** Prints some debugging information. */ - virtual void PrintSelf(std::ostream & os, Indent i) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent i) const override { os << i << "NeighborhoodOperator { this=" << this << " Direction = " << m_Direction << " }" << std::endl; diff --git a/Modules/Core/Common/include/itkObject.h b/Modules/Core/Common/include/itkObject.h index 4591060914a..1efd9f987bb 100644 --- a/Modules/Core/Common/include/itkObject.h +++ b/Modules/Core/Common/include/itkObject.h @@ -73,7 +73,7 @@ class ITKCommon_EXPORT Object:public LightObject * object that is exactly the same type as the referring object. * This is useful in cases where an object has been cast back to a * base class. */ - virtual LightObject::Pointer CreateAnother() const ITK_OVERRIDE; + LightObject::Pointer CreateAnother() const override; /** Standard part of all itk objects. */ itkTypeMacro(Object, LightObject); @@ -101,13 +101,13 @@ class ITKCommon_EXPORT Object:public LightObject virtual void Modified() const; /** Increase the reference count (mark as used by another object). */ - virtual void Register() const ITK_OVERRIDE; + void Register() const override; /** Decrease the reference count (release by another object). */ - virtual void UnRegister() const ITK_NOEXCEPT ITK_OVERRIDE; + void UnRegister() const ITK_NOEXCEPT override; /** Sets the reference count (use with care) */ - virtual void SetReferenceCount(int) ITK_OVERRIDE; + void SetReferenceCount(int) override; /** This is a global flag that controls whether any debug, warning * or error messages are displayed. */ @@ -183,13 +183,13 @@ class ITKCommon_EXPORT Object:public LightObject protected: Object(); - virtual ~Object() ITK_OVERRIDE; + ~Object() override; /** Methods invoked by Print() to print information about the object * including superclasses. Typically not called by the user (use Print() * instead) but used in the hierarchical print process to combine the * output of several classes. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; bool PrintObservers(std::ostream & os, Indent indent) const; diff --git a/Modules/Core/Common/include/itkObjectFactoryBase.h b/Modules/Core/Common/include/itkObjectFactoryBase.h index 096fc8ed32d..a079be8c738 100644 --- a/Modules/Core/Common/include/itkObjectFactoryBase.h +++ b/Modules/Core/Common/include/itkObjectFactoryBase.h @@ -206,7 +206,7 @@ class ITKCommon_EXPORT ObjectFactoryBase:public Object static void SynchronizeObjectFactoryBase(ObjectFactoryBasePrivate * objectFactoryBasePrivate); protected: - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Register object creation information with the factory. */ void RegisterOverride(const char *classOverride, @@ -227,7 +227,7 @@ class ITKCommon_EXPORT ObjectFactoryBase:public Object CreateAllObject(const char *itkclassname); ObjectFactoryBase(); - virtual ~ObjectFactoryBase() ITK_OVERRIDE; + ~ObjectFactoryBase() override; private: OverRideMap *m_OverrideMap; diff --git a/Modules/Core/Common/include/itkObjectStore.h b/Modules/Core/Common/include/itkObjectStore.h index 466dad7b181..ea4c372ace0 100644 --- a/Modules/Core/Common/include/itkObjectStore.h +++ b/Modules/Core/Common/include/itkObjectStore.h @@ -126,8 +126,8 @@ class ITK_TEMPLATE_EXPORT ObjectStore:public Object protected: ObjectStore(); - ~ObjectStore() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ObjectStore() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Returns a new size to grow. */ SizeValueType GetGrowthSize(); diff --git a/Modules/Core/Common/include/itkOctree.h b/Modules/Core/Common/include/itkOctree.h index 54953b31213..2aa13407820 100644 --- a/Modules/Core/Common/include/itkOctree.h +++ b/Modules/Core/Common/include/itkOctree.h @@ -128,12 +128,12 @@ class ITK_TEMPLATE_EXPORT Octree:public OctreeBase ImageTypePointer GetImage(); - virtual void BuildFromBuffer(const void *buffer, const unsigned int xsize, const unsigned int ysize, const unsigned int zsize) ITK_OVERRIDE; + void BuildFromBuffer(const void *buffer, const unsigned int xsize, const unsigned int ysize, const unsigned int zsize) override; void BuildFromImage(Image< TPixel, 3 > *fromImage); Octree(); - ~Octree() ITK_OVERRIDE; + ~Octree() override; void SetColor(unsigned int color) { m_Tree.SetColor(color); } void SetTree(OctreeNodeBranch *branch) { m_Tree.SetBranch(branch); } void SetTrueDims(const unsigned int Dim0, const unsigned int Dim1, @@ -142,19 +142,19 @@ class ITK_TEMPLATE_EXPORT Octree:public OctreeBase int GetValue(const unsigned int Dim0, const unsigned int Dim1, const unsigned int Dim2); - virtual void SetWidth(unsigned int width) ITK_OVERRIDE; + void SetWidth(unsigned int width) override; - virtual void SetDepth(unsigned int depth) ITK_OVERRIDE; + void SetDepth(unsigned int depth) override; - virtual unsigned int GetWidth() ITK_OVERRIDE; + unsigned int GetWidth() override; - virtual unsigned int GetDepth() ITK_OVERRIDE; + unsigned int GetDepth() override; - virtual OctreeNode * GetTree() ITK_OVERRIDE; + OctreeNode * GetTree() override; - virtual const OctreeNodeBranch * GetColorTable() const ITK_OVERRIDE; + const OctreeNodeBranch * GetColorTable() const override; - virtual int GetColorTableSize() const ITK_OVERRIDE; + int GetColorTableSize() const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Octree); diff --git a/Modules/Core/Common/include/itkOptimizerParameters.hxx b/Modules/Core/Common/include/itkOptimizerParameters.hxx index 37b3fdd3ead..5a73c3c45b8 100644 --- a/Modules/Core/Common/include/itkOptimizerParameters.hxx +++ b/Modules/Core/Common/include/itkOptimizerParameters.hxx @@ -28,7 +28,7 @@ template OptimizerParameters ::OptimizerParameters() : Array(), - m_Helper(ITK_NULLPTR) + m_Helper(nullptr) { this->Initialize(); } @@ -38,7 +38,7 @@ template OptimizerParameters ::OptimizerParameters(const OptimizerParameters& rhs) : Array(rhs), - m_Helper(ITK_NULLPTR) + m_Helper(nullptr) { //Note: don't copy the OptimizerParametersHelper. //The Array copy constructor will allocate new memory @@ -53,7 +53,7 @@ template OptimizerParameters ::OptimizerParameters(SizeValueType dimension) : Array(dimension), - m_Helper(ITK_NULLPTR) + m_Helper(nullptr) { this->Initialize(); } @@ -63,7 +63,7 @@ template OptimizerParameters ::OptimizerParameters(const ArrayType& array) : Array(array), - m_Helper(ITK_NULLPTR) + m_Helper(nullptr) { this->Initialize(); } @@ -136,7 +136,7 @@ void OptimizerParameters ::MoveDataPointer( TParametersValueType * pointer ) { - if( m_Helper == ITK_NULLPTR ) + if( m_Helper == nullptr ) { itkGenericExceptionMacro("OptimizerParameters::MoveDataPointer: " "m_Helper must be set."); @@ -149,7 +149,7 @@ void OptimizerParameters ::SetParametersObject( LightObject * object ) { - if( m_Helper == ITK_NULLPTR ) + if( m_Helper == nullptr ) { itkGenericExceptionMacro("OptimizerParameters::SetParameterObject: " "m_Helper must be set."); diff --git a/Modules/Core/Common/include/itkOutputWindow.h b/Modules/Core/Common/include/itkOutputWindow.h index 58b10721dbd..d67a36596e7 100644 --- a/Modules/Core/Common/include/itkOutputWindow.h +++ b/Modules/Core/Common/include/itkOutputWindow.h @@ -99,8 +99,8 @@ class ITKCommon_EXPORT OutputWindow:public Object protected: OutputWindow(); - virtual ~OutputWindow() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~OutputWindow() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(OutputWindow); diff --git a/Modules/Core/Common/include/itkPeriodicBoundaryCondition.h b/Modules/Core/Common/include/itkPeriodicBoundaryCondition.h index b1baf4788de..249eca729dd 100644 --- a/Modules/Core/Common/include/itkPeriodicBoundaryCondition.h +++ b/Modules/Core/Common/include/itkPeriodicBoundaryCondition.h @@ -63,24 +63,24 @@ class ITK_TEMPLATE_EXPORT PeriodicBoundaryCondition: PeriodicBoundaryCondition() {} /** Runtime information support. */ - virtual const char * GetNameOfClass() const + const char * GetNameOfClass() const override { return "itkPeriodicBoundaryCondition"; } /** Computes and returns a neighborhood of appropriate values from * neighborhood iterator data.. */ - virtual OutputPixelType operator()(const OffsetType & point_index, + OutputPixelType operator()(const OffsetType & point_index, const OffsetType & boundary_offset, - const NeighborhoodType *data) const; + const NeighborhoodType *data) const override; /** Computes and returns the appropriate pixel value from * neighborhood iterator data, using the functor. */ - virtual OutputPixelType operator()( + OutputPixelType operator()( const OffsetType & point_index, const OffsetType & boundary_offset, const NeighborhoodType *data, - const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const; + const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const override; /** Determines the necessary input region for the output region. * For this boundary condition, the output region is mapped into the @@ -95,8 +95,8 @@ class ITK_TEMPLATE_EXPORT PeriodicBoundaryCondition: * \return The necessary input region required to determine the * pixel values in the outputRequestedRegion. */ - virtual RegionType GetInputRequestedRegion( const RegionType & inputLargestPossibleRegion, - const RegionType & outputRequestedRegion ) const; + RegionType GetInputRequestedRegion( const RegionType & inputLargestPossibleRegion, + const RegionType & outputRequestedRegion ) const override; /** Returns a value for a given pixel at an index. If the index is inside the * bounds of the input image, then the pixel value is obtained from @@ -106,7 +106,7 @@ class ITK_TEMPLATE_EXPORT PeriodicBoundaryCondition: * \param index The index of the desired pixel. * \param image The image from which pixel values should be determined. */ - OutputPixelType GetPixel( const IndexType & index, const TInputImage * image ) const; + OutputPixelType GetPixel( const IndexType & index, const TInputImage * image ) const override; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h b/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h index 88ecdee7266..c8b2b765250 100644 --- a/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h +++ b/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h @@ -379,8 +379,8 @@ class ITK_TEMPLATE_EXPORT PhasedArray3DSpecialCoordinatesImage: m_FirstSampleDistance = 0; } - virtual ~PhasedArray3DSpecialCoordinatesImage() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PhasedArray3DSpecialCoordinatesImage() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PhasedArray3DSpecialCoordinatesImage); diff --git a/Modules/Core/Common/include/itkPointSet.h b/Modules/Core/Common/include/itkPointSet.h index f13836fd7fe..4f2f2c5be46 100644 --- a/Modules/Core/Common/include/itkPointSet.h +++ b/Modules/Core/Common/include/itkPointSet.h @@ -135,7 +135,7 @@ class ITK_TEMPLATE_EXPORT PointSet:public DataObject PointsContainerPointer m_PointsContainer; /** An object containing data associated with the mesh's points. - * Optionally, this can be ITK_NULLPTR, indicating that no data are associated with + * Optionally, this can be nullptr, indicating that no data are associated with * the points. The data for a point can be accessed through its point * identifier. */ PointDataContainerPointer m_PointDataContainer; @@ -144,7 +144,7 @@ class ITK_TEMPLATE_EXPORT PointSet:public DataObject /** PointSet-level operation interface. */ void PassStructure(Self *inputPointSet); - virtual void Initialize(void) ITK_OVERRIDE; + void Initialize(void) override; PointIdentifier GetNumberOfPoints() const; @@ -175,23 +175,23 @@ class ITK_TEMPLATE_EXPORT PointSet:public DataObject bool GetPointData(PointIdentifier, PixelType *) const; /** Methods to manage streaming. */ - virtual void UpdateOutputInformation() ITK_OVERRIDE; + void UpdateOutputInformation() override; - virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE; + void SetRequestedRegionToLargestPossibleRegion() override; - virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override; - virtual void Graft(const DataObject *data) ITK_OVERRIDE; + void Graft(const DataObject *data) override; - virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE; + bool RequestedRegionIsOutsideOfTheBufferedRegion() override; - virtual bool VerifyRequestedRegion() ITK_OVERRIDE; + bool VerifyRequestedRegion() override; /** Set the requested region from this data object to match the requested * region of the data object passed in as a parameter. This method * implements the API from DataObject. The data object parameter must be * castable to a PointSet. */ - virtual void SetRequestedRegion(const DataObject *data) ITK_OVERRIDE; + void SetRequestedRegion(const DataObject *data) override; /** Set/Get the Requested region */ virtual void SetRequestedRegion(const RegionType & region); @@ -206,8 +206,8 @@ class ITK_TEMPLATE_EXPORT PointSet:public DataObject protected: /** Constructor for use by New() method. */ PointSet(); - ~PointSet() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PointSet() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; // If the RegionType is ITK_UNSTRUCTURED_REGION, then the following // variables represent the maximum number of region that the data diff --git a/Modules/Core/Common/include/itkPointSet.hxx b/Modules/Core/Common/include/itkPointSet.hxx index f43e8dca830..0f8a5deb9e9 100644 --- a/Modules/Core/Common/include/itkPointSet.hxx +++ b/Modules/Core/Common/include/itkPointSet.hxx @@ -50,7 +50,7 @@ PointSet< TPixelType, VDimension, TMeshTraits > os << indent << "Maximum Number Of Regions: " << m_MaximumNumberOfRegions << std::endl; os << indent << "Point Data Container pointer: " - << ( ( this->m_PointDataContainer ) ? this->m_PointDataContainer.GetPointer() : ITK_NULLPTR ) << std::endl; + << ( ( this->m_PointDataContainer ) ? this->m_PointDataContainer.GetPointer() : nullptr ) << std::endl; os << indent << "Size of Point Data Container: " << ( ( this->m_PointDataContainer ) ? this->m_PointDataContainer->Size() : 0 ) << std::endl; } @@ -172,7 +172,7 @@ PointSet< TPixelType, VDimension, TMeshTraits > * Check if a point exists for a given point identifier. If a spot for * the point identifier exists, "point" is set, and true is returned. * Otherwise, false is returned, and "point" is not modified. - * If "point" is ITK_NULLPTR, then it is never set, but the existence of the point + * If "point" is nullptr, then it is never set, but the existence of the point * is still returned. */ template< typename TPixelType, unsigned int VDimension, typename TMeshTraits > @@ -247,7 +247,7 @@ PointSet< TPixelType, VDimension, TMeshTraits > * Check if point data exists for a given point identifier. If a spot for * the point identifier exists, "data" is set, and true is returned. * Otherwise, false is returned, and "data" is not modified. - * If "data" is ITK_NULLPTR, then it is never set, but the existence of the point + * If "data" is nullptr, then it is never set, but the existence of the point * data is still returned. */ template< typename TPixelType, unsigned int VDimension, typename TMeshTraits > @@ -308,8 +308,8 @@ PointSet< TPixelType, VDimension, TMeshTraits > { Superclass::Initialize(); - m_PointsContainer = ITK_NULLPTR; - m_PointDataContainer = ITK_NULLPTR; + m_PointsContainer = nullptr; + m_PointDataContainer = nullptr; } /****************************************************************************** @@ -323,8 +323,8 @@ PointSet< TPixelType, VDimension, TMeshTraits > template< typename TPixelType, unsigned int VDimension, typename TMeshTraits > PointSet< TPixelType, VDimension, TMeshTraits > ::PointSet(): - m_PointsContainer(ITK_NULLPTR), - m_PointDataContainer(ITK_NULLPTR) + m_PointsContainer(nullptr), + m_PointDataContainer(nullptr) { // If we used unstructured regions instead of structured regions, then diff --git a/Modules/Core/Common/include/itkPointSetToImageFilter.h b/Modules/Core/Common/include/itkPointSetToImageFilter.h index 6ca1704c584..dda46bb647a 100644 --- a/Modules/Core/Common/include/itkPointSetToImageFilter.h +++ b/Modules/Core/Common/include/itkPointSetToImageFilter.h @@ -139,10 +139,10 @@ class ITK_TEMPLATE_EXPORT PointSetToImageFilter:public ImageSource< TOutputImage protected: PointSetToImageFilter(); - ~PointSetToImageFilter() ITK_OVERRIDE; + ~PointSetToImageFilter() override; - virtual void GenerateOutputInformation() ITK_OVERRIDE {} // do nothing - virtual void GenerateData() ITK_OVERRIDE; + void GenerateOutputInformation() override {} // do nothing + void GenerateData() override; SizeType m_Size; @@ -155,7 +155,7 @@ class ITK_TEMPLATE_EXPORT PointSetToImageFilter:public ImageSource< TOutputImage ValueType m_InsideValue; ValueType m_OutsideValue; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PointSetToImageFilter); diff --git a/Modules/Core/Common/include/itkPolygonCell.h b/Modules/Core/Common/include/itkPolygonCell.h index 1198f3c8b10..69fb02e0864 100644 --- a/Modules/Core/Common/include/itkPolygonCell.h +++ b/Modules/Core/Common/include/itkPolygonCell.h @@ -78,22 +78,22 @@ class ITK_TEMPLATE_EXPORT PolygonCell:public TCellInterface itkCellVisitMacro(Superclass::POLYGON_CELL); /** Implement the standard CellInterface. */ - virtual CellGeometry GetType(void) const ITK_OVERRIDE + CellGeometry GetType(void) const override { return Superclass::POLYGON_CELL; } - virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE; + void MakeCopy(CellAutoPointer &) const override; - virtual unsigned int GetDimension(void) const ITK_OVERRIDE; + unsigned int GetDimension(void) const override; - virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE; + unsigned int GetNumberOfPoints(void) const override; - virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE; + CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override; - virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) ITK_OVERRIDE; + bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override; - virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first) override; - virtual void SetPointIds(PointIdConstIterator first, - PointIdConstIterator last) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first, + PointIdConstIterator last) override; void AddPointId(PointIdentifier); void RemovePointId(PointIdentifier); @@ -103,14 +103,14 @@ class ITK_TEMPLATE_EXPORT PolygonCell:public TCellInterface void ClearPoints(); - virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE; - virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE; + void SetPointId(int localId, PointIdentifier) override; + PointIdIterator PointIdsBegin(void) override; - virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsBegin(void) const override; - virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE; + PointIdIterator PointIdsEnd(void) override; - virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsEnd(void) const override; /** Polygon-specific interface. */ virtual CellFeatureCount GetNumberOfVertices() const; @@ -131,7 +131,7 @@ class ITK_TEMPLATE_EXPORT PolygonCell:public TCellInterface this->BuildEdges(); } - ~PolygonCell() ITK_OVERRIDE {} + ~PolygonCell() override {} protected: std::vector< EdgeInfo > m_Edges; diff --git a/Modules/Core/Common/include/itkPolygonCell.hxx b/Modules/Core/Common/include/itkPolygonCell.hxx index a99015d86ba..ff88d3ad55b 100644 --- a/Modules/Core/Common/include/itkPolygonCell.hxx +++ b/Modules/Core/Common/include/itkPolygonCell.hxx @@ -298,7 +298,7 @@ PolygonCell< TCellInterface > } else { - return ITK_NULLPTR; + return nullptr; } } @@ -318,7 +318,7 @@ PolygonCell< TCellInterface > } else { - return ITK_NULLPTR; + return nullptr; } } @@ -337,7 +337,7 @@ PolygonCell< TCellInterface > } else { - return ITK_NULLPTR; + return nullptr; } } @@ -357,7 +357,7 @@ PolygonCell< TCellInterface > } else { - return ITK_NULLPTR; + return nullptr; } } diff --git a/Modules/Core/Common/include/itkPostOrderTreeIterator.h b/Modules/Core/Common/include/itkPostOrderTreeIterator.h index fef93761367..6f792175e43 100644 --- a/Modules/Core/Common/include/itkPostOrderTreeIterator.h +++ b/Modules/Core/Common/include/itkPostOrderTreeIterator.h @@ -39,17 +39,17 @@ class PostOrderTreeIterator:public TreeIteratorBase< TTreeType > PostOrderTreeIterator(TreeType *tree); /** Get the type of the iterator */ - NodeType GetType() const; + NodeType GetType() const override; /** Clone function */ - TreeIteratorBase< TTreeType > * Clone(); + TreeIteratorBase< TTreeType > * Clone() override; protected: /** Return the next node */ - const ValueType & Next(); + const ValueType & Next() override; /** Return true if the next node exists */ - bool HasNext() const; + bool HasNext() const override; protected: @@ -63,16 +63,16 @@ class PostOrderTreeIterator:public TreeIteratorBase< TTreeType > /** Constructor */ template< typename TTreeType > PostOrderTreeIterator< TTreeType >::PostOrderTreeIterator(TTreeType *tree): - TreeIteratorBase< TTreeType >(tree, ITK_NULLPTR) + TreeIteratorBase< TTreeType >(tree, nullptr) { - if ( tree->GetRoot() == ITK_NULLPTR ) + if ( tree->GetRoot() == nullptr ) { - this->m_Begin = ITK_NULLPTR; + this->m_Begin = nullptr; } else { const TreeNodeType *root = dynamic_cast(tree->GetRoot()); - if(root == ITK_NULLPTR) + if(root == nullptr) { itkGenericExceptionMacro(<< "Can't downcast root node to TreeNodeType *"); } @@ -95,7 +95,7 @@ template< typename TTreeType > bool PostOrderTreeIterator< TTreeType >::HasNext() const { - if ( const_cast< TreeNodeType * >( FindNextNode() ) != ITK_NULLPTR ) + if ( const_cast< TreeNodeType * >( FindNextNode() ) != nullptr ) { return true; } @@ -116,22 +116,22 @@ template< typename TTreeType > const typename PostOrderTreeIterator< TTreeType >::TreeNodeType * PostOrderTreeIterator< TTreeType >::FindNextNode() const { - if ( this->m_Position == ITK_NULLPTR || this->m_Position == this->m_Root ) + if ( this->m_Position == nullptr || this->m_Position == this->m_Root ) { - return ITK_NULLPTR; + return nullptr; } TreeNodeType *sister = const_cast< TreeNodeType * >( FindSister(this->m_Position) ); - if ( sister != ITK_NULLPTR ) + if ( sister != nullptr ) { return FindMostRightLeaf(sister); } - if(this->m_Position->GetParent() == ITK_NULLPTR) + if(this->m_Position->GetParent() == nullptr) { - return ITK_NULLPTR; + return nullptr; } TreeNodeType *rval = dynamic_cast(this->m_Position->GetParent()); - if(rval == ITK_NULLPTR) + if(rval == nullptr) { itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *"); } @@ -145,11 +145,11 @@ PostOrderTreeIterator< TTreeType >::FindSister(TreeNodeType *node) const { if ( !node->HasParent() ) { - return ITK_NULLPTR; + return nullptr; } TreeNodeType *parent = dynamic_cast(node->GetParent()); - if(parent == ITK_NULLPTR) + if(parent == nullptr) { itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *"); } @@ -159,21 +159,21 @@ PostOrderTreeIterator< TTreeType >::FindSister(TreeNodeType *node) const while ( childPosition < lastChildPosition ) { - if(parent->GetChild(childPosition + 1) == ITK_NULLPTR) + if(parent->GetChild(childPosition + 1) == nullptr) { childPosition++; } else { TreeNodeType *sister = dynamic_cast(parent->GetChild(childPosition + 1)); - if ( sister == ITK_NULLPTR) + if ( sister == nullptr) { itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *"); } return sister; } } - return ITK_NULLPTR; + return nullptr; } /** Find the most right leaf */ @@ -189,23 +189,23 @@ PostOrderTreeIterator< TTreeType >::FindMostRightLeaf(TreeNodeType *node) const do { - if(node->GetChild(i) == ITK_NULLPTR) + if(node->GetChild(i) == nullptr) { - helpNode = ITK_NULLPTR; + helpNode = nullptr; } else { helpNode = dynamic_cast(node->GetChild(i)); - if(helpNode == ITK_NULLPTR) + if(helpNode == nullptr) { itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *"); } } i++; } - while ( helpNode == ITK_NULLPTR && i < childCount ); + while ( helpNode == nullptr && i < childCount ); - if ( helpNode == ITK_NULLPTR ) + if ( helpNode == nullptr ) { return node; } diff --git a/Modules/Core/Common/include/itkPreOrderTreeIterator.h b/Modules/Core/Common/include/itkPreOrderTreeIterator.h index b173af9408c..4945b0facb9 100644 --- a/Modules/Core/Common/include/itkPreOrderTreeIterator.h +++ b/Modules/Core/Common/include/itkPreOrderTreeIterator.h @@ -38,20 +38,20 @@ class PreOrderTreeIterator:public TreeIteratorBase< TTreeType > typedef typename Superclass::NodeType NodeType; /** Constructor */ - PreOrderTreeIterator(const TTreeType *tree, const TreeNodeType *start = ITK_NULLPTR); + PreOrderTreeIterator(const TTreeType *tree, const TreeNodeType *start = nullptr); /** Get the type of the iterator */ - NodeType GetType() const; + NodeType GetType() const override; /** Clone function */ - TreeIteratorBase< TTreeType > * Clone(); + TreeIteratorBase< TTreeType > * Clone() override; protected: /** Return the next node */ - const ValueType & Next(); + const ValueType & Next() override; /** Return true if the next node exists */ - bool HasNext() const; + bool HasNext() const override; private: @@ -83,7 +83,7 @@ template< typename TTreeType > bool PreOrderTreeIterator< TTreeType >::HasNext() const { - if ( const_cast< TreeNodeType * >( FindNextNode() ) != ITK_NULLPTR ) + if ( const_cast< TreeNodeType * >( FindNextNode() ) != nullptr ) { return true; } @@ -104,9 +104,9 @@ template< typename TTreeType > const typename PreOrderTreeIterator< TTreeType >::TreeNodeType * PreOrderTreeIterator< TTreeType >::FindNextNode() const { - if ( this->m_Position == ITK_NULLPTR ) + if ( this->m_Position == nullptr ) { - return ITK_NULLPTR; + return nullptr; } if ( this->m_Position->HasChildren() ) { @@ -115,7 +115,7 @@ PreOrderTreeIterator< TTreeType >::FindNextNode() const if ( !this->m_Position->HasParent() ) { - return ITK_NULLPTR; + return nullptr; } TreeNodeType *child = this->m_Position; @@ -124,7 +124,7 @@ PreOrderTreeIterator< TTreeType >::FindNextNode() const // Are we a subtree? Then we are done. if ( parent && parent->ChildPosition(this->m_Root) >= 0 ) { - return ITK_NULLPTR; + return nullptr; } int childPosition = parent->ChildPosition(child); @@ -134,7 +134,7 @@ PreOrderTreeIterator< TTreeType >::FindNextNode() const { TreeNodeType *help = dynamic_cast< TreeNodeType * >( parent->GetChild(childPosition + 1) ); - if ( help != ITK_NULLPTR ) + if ( help != nullptr ) { return help; } @@ -149,7 +149,7 @@ PreOrderTreeIterator< TTreeType >::FindNextNode() const // Subtree if ( parent->ChildPosition(this->m_Root) >= 0 ) { - return ITK_NULLPTR; + return nullptr; } childPosition = parent->ChildPosition(child); @@ -159,13 +159,13 @@ PreOrderTreeIterator< TTreeType >::FindNextNode() const { TreeNodeType *help = dynamic_cast< TreeNodeType * >( parent->GetChild(childPosition + 1) ); - if ( help != ITK_NULLPTR ) + if ( help != nullptr ) { return help; } } } - return ITK_NULLPTR; + return nullptr; } /** Clone function */ diff --git a/Modules/Core/Common/include/itkPriorityQueueContainer.h b/Modules/Core/Common/include/itkPriorityQueueContainer.h index 6cfb94d7902..9731d65eae2 100644 --- a/Modules/Core/Common/include/itkPriorityQueueContainer.h +++ b/Modules/Core/Common/include/itkPriorityQueueContainer.h @@ -129,7 +129,7 @@ class ITK_TEMPLATE_EXPORT MinPriorityQueueElementWrapper: MinPriorityQueueElementWrapper(ElementType element, ElementPriorityType priority); - virtual ~MinPriorityQueueElementWrapper(); + ~MinPriorityQueueElementWrapper() override; bool operator>(const MinPriorityQueueElementWrapper & other) const; @@ -137,17 +137,17 @@ class ITK_TEMPLATE_EXPORT MinPriorityQueueElementWrapper: bool operator==(const MinPriorityQueueElementWrapper & other) const; - ElementIdentifierType GetLocation(const MinPriorityQueueElementWrapper & element) const; + ElementIdentifierType GetLocation(const MinPriorityQueueElementWrapper & element) const override; void SetLocation(MinPriorityQueueElementWrapper & element, - const ElementIdentifierType & identifier); + const ElementIdentifierType & identifier) override; // still virtual to be able to overload it in the Max flavor - virtual bool is_less(const MinPriorityQueueElementWrapper & element1, - const MinPriorityQueueElementWrapper & element2) const; + bool is_less(const MinPriorityQueueElementWrapper & element1, + const MinPriorityQueueElementWrapper & element2) const override; - virtual bool is_greater(const MinPriorityQueueElementWrapper & element1, - const MinPriorityQueueElementWrapper & element2) const; + bool is_greater(const MinPriorityQueueElementWrapper & element1, + const MinPriorityQueueElementWrapper & element2) const override; }; // ------------------------------------------------------------------------ @@ -180,19 +180,19 @@ class ITK_TEMPLATE_EXPORT MaxPriorityQueueElementWrapper: MaxPriorityQueueElementWrapper(ElementType element, ElementPriorityType priority); - virtual ~MaxPriorityQueueElementWrapper() {} + ~MaxPriorityQueueElementWrapper() override {} virtual bool is_less(const MaxPriorityQueueElementWrapper & element1, const MaxPriorityQueueElementWrapper & element2) const; - virtual bool is_less(const Superclass & element1, - const Superclass & element2) const; + bool is_less(const Superclass & element1, + const Superclass & element2) const override; virtual bool is_greater(const MaxPriorityQueueElementWrapper & element1, const MaxPriorityQueueElementWrapper & element2) const; - virtual bool is_greater(const Superclass & element1, - const Superclass & element2) const; + bool is_greater(const Superclass & element1, + const Superclass & element2) const override; }; // ------------------------------------------------------------------------ @@ -224,7 +224,7 @@ class ITK_TEMPLATE_EXPORT PriorityQueueContainer: public: PriorityQueueContainer(); - ~PriorityQueueContainer() ITK_OVERRIDE; + ~PriorityQueueContainer() override; template< typename TInputIterator > PriorityQueueContainer(TInputIterator first, TInputIterator last): diff --git a/Modules/Core/Common/include/itkProcessObject.h b/Modules/Core/Common/include/itkProcessObject.h index 6e5d55f1b64..335ea5cca99 100644 --- a/Modules/Core/Common/include/itkProcessObject.h +++ b/Modules/Core/Common/include/itkProcessObject.h @@ -185,7 +185,7 @@ class ITKCommon_EXPORT ProcessObject:public Object /** \brief Get the size of the input container. * - * If the Primary input is ITK_NULLPTR it is not counted. This is + * If the Primary input is nullptr it is not counted. This is * not the number of inputs that have valid DataObject's * assigned. Use GetNumberOfValidRequiredInputs() to determine how * many inputs are non-null. @@ -455,7 +455,7 @@ class ITKCommon_EXPORT ProcessObject:public Object protected: ProcessObject(); - ~ProcessObject() ITK_OVERRIDE; + ~ProcessObject() override; /** \class ProcessObjectDomainThreader * \brief Multi-threaded processing on a domain by processing sub-domains per @@ -495,7 +495,7 @@ class ITKCommon_EXPORT ProcessObject:public Object ITK_DISALLOW_COPY_AND_ASSIGN(ProcessObjectDomainThreader); }; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; // // Input Methods @@ -503,7 +503,7 @@ class ITKCommon_EXPORT ProcessObject:public Object /** \brief Return an input. * - * ITK_NULLPTR is returned if the name or indexed input is undefined. + * nullptr is returned if the name or indexed input is undefined. */ DataObject * GetInput(const DataObjectIdentifierType & key); const DataObject * GetInput(const DataObjectIdentifierType & key) const; @@ -511,9 +511,9 @@ class ITKCommon_EXPORT ProcessObject:public Object /** Method used internally for getting an indexed input. */ DataObject * GetInput(DataObjectPointerArraySizeType idx) - { return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second.GetPointer() : ITK_NULLPTR; } + { return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second.GetPointer() : nullptr; } const DataObject * GetInput(DataObjectPointerArraySizeType idx) const - { return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second.GetPointer() : ITK_NULLPTR; } + { return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second.GetPointer() : nullptr; } /** \brief Protected method for setting indexed and named inputs. * @@ -524,7 +524,7 @@ class ITKCommon_EXPORT ProcessObject:public Object virtual void SetInput(const DataObjectIdentifierType & key, DataObject *input); virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input); - /** Sets first ITK_NULLPTR indexed input, appends to the end otherwise */ + /** Sets first nullptr indexed input, appends to the end otherwise */ virtual void AddInput(DataObject *input); /** \brief Push/Pop an indexed input of this process object. @@ -544,7 +544,7 @@ class ITKCommon_EXPORT ProcessObject:public Object * * If the input is the last indexed input the number of indexed * inputs will be reduced by one. Otherwise, if the input is - * required or indexed it will be set to ITK_NULLPTR. + * required or indexed it will be set to nullptr. */ virtual void RemoveInput(const DataObjectIdentifierType & key); virtual void RemoveInput(DataObjectPointerArraySizeType); @@ -566,7 +566,7 @@ class ITKCommon_EXPORT ProcessObject:public Object /** \brief Define the number of indexed inputs defined. * * The new indexed inputs' values are set to - * ITK_NULLPTR. If the size is reduced then the input definition is + * nullptr. If the size is reduced then the input definition is * removed entirely from the named input entries and index inputs. */ void SetNumberOfIndexedInputs(DataObjectPointerArraySizeType num); diff --git a/Modules/Core/Common/include/itkProgressAccumulator.h b/Modules/Core/Common/include/itkProgressAccumulator.h index 68d5f881c25..30e3f2687e4 100644 --- a/Modules/Core/Common/include/itkProgressAccumulator.h +++ b/Modules/Core/Common/include/itkProgressAccumulator.h @@ -113,8 +113,8 @@ class ITKCommon_EXPORT ProgressAccumulator:public Object protected: ProgressAccumulator(); - virtual ~ProgressAccumulator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & s, Indent indent) const ITK_OVERRIDE; + ~ProgressAccumulator() override; + void PrintSelf(std::ostream & s, Indent indent) const override; private: /** Command for observing progress of pipeline filters */ diff --git a/Modules/Core/Common/include/itkQuadraticEdgeCell.h b/Modules/Core/Common/include/itkQuadraticEdgeCell.h index a36ec78b606..5d3e8cb96d1 100644 --- a/Modules/Core/Common/include/itkQuadraticEdgeCell.h +++ b/Modules/Core/Common/include/itkQuadraticEdgeCell.h @@ -54,30 +54,30 @@ class ITK_TEMPLATE_EXPORT QuadraticEdgeCell:public TCellInterface itkStaticConstMacro(CellDimension, unsigned int, 1); /** Implement the standard CellInterface. */ - virtual CellGeometry GetType(void) const ITK_OVERRIDE + CellGeometry GetType(void) const override { return Superclass::QUADRATIC_EDGE_CELL; } - virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE; + void MakeCopy(CellAutoPointer &) const override; - virtual unsigned int GetDimension(void) const ITK_OVERRIDE; + unsigned int GetDimension(void) const override; - virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE; + unsigned int GetNumberOfPoints(void) const override; - virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE; + CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override; - virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) ITK_OVERRIDE; - virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE; + bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override; + void SetPointIds(PointIdConstIterator first) override; - virtual void SetPointIds(PointIdConstIterator first, - PointIdConstIterator last) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first, + PointIdConstIterator last) override; - virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE; - virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE; + void SetPointId(int localId, PointIdentifier) override; + PointIdIterator PointIdsBegin(void) override; - virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsBegin(void) const override; - virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE; + PointIdIterator PointIdsEnd(void) override; - virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsEnd(void) const override; /** QuadraticEdge-specific interface. */ virtual CellFeatureCount GetNumberOfVertices() const; @@ -95,13 +95,13 @@ class ITK_TEMPLATE_EXPORT QuadraticEdgeCell:public TCellInterface } } - ~QuadraticEdgeCell() ITK_OVERRIDE {} + ~QuadraticEdgeCell() override {} /** Given the parametric coordinates of a point in the cell * returned the values of its ShapeFunctions */ - virtual void EvaluateShapeFunctions( + void EvaluateShapeFunctions( const ParametricCoordArrayType & parametricCoordinates, - ShapeFunctionsArrayType & weights) const ITK_OVERRIDE; + ShapeFunctionsArrayType & weights) const override; protected: /** Store number of points needed for a line segment. */ diff --git a/Modules/Core/Common/include/itkQuadraticTriangleCell.h b/Modules/Core/Common/include/itkQuadraticTriangleCell.h index fba617a663f..3b05f884581 100644 --- a/Modules/Core/Common/include/itkQuadraticTriangleCell.h +++ b/Modules/Core/Common/include/itkQuadraticTriangleCell.h @@ -60,30 +60,30 @@ class ITK_TEMPLATE_EXPORT QuadraticTriangleCell:public TCellInterface, private Q itkStaticConstMacro(CellDimension, unsigned int, 2); /** Implement the standard CellInterface. */ - virtual CellGeometry GetType(void) const ITK_OVERRIDE + CellGeometry GetType(void) const override { return Superclass::QUADRATIC_TRIANGLE_CELL; } - virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE; + void MakeCopy(CellAutoPointer &) const override; - virtual unsigned int GetDimension(void) const ITK_OVERRIDE; + unsigned int GetDimension(void) const override; - virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE; + unsigned int GetNumberOfPoints(void) const override; - virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE; + CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override; - virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) ITK_OVERRIDE; - virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE; + bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override; + void SetPointIds(PointIdConstIterator first) override; - virtual void SetPointIds(PointIdConstIterator first, - PointIdConstIterator last) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first, + PointIdConstIterator last) override; - virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE; - virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE; + void SetPointId(int localId, PointIdentifier) override; + PointIdIterator PointIdsBegin(void) override; - virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsBegin(void) const override; - virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE; + PointIdIterator PointIdsEnd(void) override; - virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsEnd(void) const override; /** Triangle-specific interface. */ virtual CellFeatureCount GetNumberOfVertices() const; @@ -99,9 +99,9 @@ class ITK_TEMPLATE_EXPORT QuadraticTriangleCell:public TCellInterface, private Q /** Given the parametric coordinates of a point in the cell * determine the value of its Shape Functions * returned through an itkArray). */ - virtual void EvaluateShapeFunctions( + void EvaluateShapeFunctions( const ParametricCoordArrayType & parametricCoordinates, - ShapeFunctionsArrayType & weights) const ITK_OVERRIDE; + ShapeFunctionsArrayType & weights) const override; public: QuadraticTriangleCell() @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT QuadraticTriangleCell:public TCellInterface, private Q } } - ~QuadraticTriangleCell() ITK_OVERRIDE {} + ~QuadraticTriangleCell() override {} protected: /** Store the number of points needed for a triangle. */ diff --git a/Modules/Core/Common/include/itkQuadrilateralCell.h b/Modules/Core/Common/include/itkQuadrilateralCell.h index 8984e3b27bd..b0d992e8409 100644 --- a/Modules/Core/Common/include/itkQuadrilateralCell.h +++ b/Modules/Core/Common/include/itkQuadrilateralCell.h @@ -62,30 +62,30 @@ class ITK_TEMPLATE_EXPORT QuadrilateralCell:public TCellInterface, private Quadr itkStaticConstMacro(NumberOfDerivatives, unsigned int, 8); /** Implement the standard CellInterface. */ - virtual CellGeometry GetType(void) const ITK_OVERRIDE + CellGeometry GetType(void) const override { return Superclass::QUADRILATERAL_CELL; } - virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE; + void MakeCopy(CellAutoPointer &) const override; - virtual unsigned int GetDimension(void) const ITK_OVERRIDE; + unsigned int GetDimension(void) const override; - virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE; + unsigned int GetNumberOfPoints(void) const override; - virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE; + CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override; - virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) ITK_OVERRIDE; - virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE; + bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override; + void SetPointIds(PointIdConstIterator first) override; - virtual void SetPointIds(PointIdConstIterator first, - PointIdConstIterator last) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first, + PointIdConstIterator last) override; - virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE; - virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE; + void SetPointId(int localId, PointIdentifier) override; + PointIdIterator PointIdsBegin(void) override; - virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsBegin(void) const override; - virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE; + PointIdIterator PointIdsEnd(void) override; - virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsEnd(void) const override; /** Quadrilateral-specific interface. */ virtual CellFeatureCount GetNumberOfVertices() const; @@ -96,12 +96,12 @@ class ITK_TEMPLATE_EXPORT QuadrilateralCell:public TCellInterface, private Quadr virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &); /** Evaluate the position inside the cell */ - virtual bool EvaluatePosition(CoordRepType * position, + bool EvaluatePosition(CoordRepType * position, PointsContainer * points, CoordRepType * closestPoint, CoordRepType[CellDimension], double * dist2, - InterpolationWeightType * weight) ITK_OVERRIDE; + InterpolationWeightType * weight) override; /** Visitor interface */ itkCellVisitMacro(Superclass::QUADRILATERAL_CELL); @@ -115,7 +115,7 @@ class ITK_TEMPLATE_EXPORT QuadrilateralCell:public TCellInterface, private Quadr } } - ~QuadrilateralCell() ITK_OVERRIDE {} + ~QuadrilateralCell() override {} protected: /** Store the number of points needed for a quadrilateral. */ diff --git a/Modules/Core/Common/include/itkRandomVariateGeneratorBase.h b/Modules/Core/Common/include/itkRandomVariateGeneratorBase.h index ca7a688a1b5..e4392f0a492 100644 --- a/Modules/Core/Common/include/itkRandomVariateGeneratorBase.h +++ b/Modules/Core/Common/include/itkRandomVariateGeneratorBase.h @@ -47,7 +47,7 @@ class ITKCommon_EXPORT RandomVariateGeneratorBase:public Object protected: RandomVariateGeneratorBase(); - virtual ~RandomVariateGeneratorBase() ITK_OVERRIDE; + ~RandomVariateGeneratorBase() override; private: }; // end of class diff --git a/Modules/Core/Common/include/itkRealTimeClock.h b/Modules/Core/Common/include/itkRealTimeClock.h index 2411f5dd65c..f9c131518c6 100644 --- a/Modules/Core/Common/include/itkRealTimeClock.h +++ b/Modules/Core/Common/include/itkRealTimeClock.h @@ -71,9 +71,9 @@ class ITKCommon_EXPORT RealTimeClock:public Object RealTimeClock(); /** Destructor. */ - virtual ~RealTimeClock() ITK_OVERRIDE; + ~RealTimeClock() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: FrequencyType m_Frequency; @@ -84,7 +84,7 @@ class ITKCommon_EXPORT RealTimeClock:public Object // We hide this method in the private section, because it returns the // modified time of the itk::Object. That modified time is ambiguous with // the role of the RealTimeStamp. - virtual const TimeStamp & GetTimeStamp() const ITK_OVERRIDE; + const TimeStamp & GetTimeStamp() const override; }; } // end of namespace itk diff --git a/Modules/Core/Common/include/itkRegularizedHeavisideStepFunction.h b/Modules/Core/Common/include/itkRegularizedHeavisideStepFunction.h index 040252cb1c9..26d79dc38f6 100644 --- a/Modules/Core/Common/include/itkRegularizedHeavisideStepFunction.h +++ b/Modules/Core/Common/include/itkRegularizedHeavisideStepFunction.h @@ -71,7 +71,7 @@ class ITK_TEMPLATE_EXPORT RegularizedHeavisideStepFunction: protected: RegularizedHeavisideStepFunction(); - virtual ~RegularizedHeavisideStepFunction(); + ~RegularizedHeavisideStepFunction() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RegularizedHeavisideStepFunction); diff --git a/Modules/Core/Common/include/itkRootTreeIterator.h b/Modules/Core/Common/include/itkRootTreeIterator.h index f1ef3d98052..feea3af9808 100644 --- a/Modules/Core/Common/include/itkRootTreeIterator.h +++ b/Modules/Core/Common/include/itkRootTreeIterator.h @@ -35,21 +35,21 @@ class RootTreeIterator:public TreeIteratorBase< TTreeType > typedef typename Superclass::NodeType NodeType; /** Constructor */ - RootTreeIterator(TreeType *tree, const TreeNodeType *start = ITK_NULLPTR); + RootTreeIterator(TreeType *tree, const TreeNodeType *start = nullptr); /** Return the type of the iterator */ - NodeType GetType() const; + NodeType GetType() const override; /** Clone function */ - TreeIteratorBase< TTreeType > * Clone(); + TreeIteratorBase< TTreeType > * Clone() override; protected: /** Return the next node */ - const ValueType & Next(); + const ValueType & Next() override; /** Return true if the next node exists */ - bool HasNext() const; + bool HasNext() const override; private: @@ -83,7 +83,7 @@ template< typename TTreeType > bool RootTreeIterator< TTreeType >::HasNext() const { - if ( const_cast< TreeNodeType * >( FindNextNode() ) != ITK_NULLPTR ) + if ( const_cast< TreeNodeType * >( FindNextNode() ) != nullptr ) { return true; } @@ -104,13 +104,13 @@ template< typename TTreeType > const typename RootTreeIterator< TTreeType >::TreeNodeType * RootTreeIterator< TTreeType >::FindNextNode() const { - if ( this->m_Position == ITK_NULLPTR ) + if ( this->m_Position == nullptr ) { - return ITK_NULLPTR; + return nullptr; } if ( this->m_Position == this->m_Root ) { - return ITK_NULLPTR; + return nullptr; } return this->m_Position->GetParent(); } diff --git a/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h index ee0648df651..5ca22838640 100644 --- a/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.h @@ -119,10 +119,10 @@ class ITK_TEMPLATE_EXPORT ShapedFloodFilledFunctionConditionalConstIterator: void InitializeIterator(); /** Default Destructor. */ - virtual ~ShapedFloodFilledFunctionConditionalConstIterator() {} + ~ShapedFloodFilledFunctionConditionalConstIterator() override {} /** Compute whether the index of interest should be included in the flood */ - virtual bool IsPixelIncluded(const IndexType & index) const = 0; + bool IsPixelIncluded(const IndexType & index) const override = 0; /** operator= is provided to make sure the handle to the image is properly * reference counted. */ @@ -141,15 +141,15 @@ class ITK_TEMPLATE_EXPORT ShapedFloodFilledFunctionConditionalConstIterator: * This causes the index to be calculated from pointer arithmetic and is * therefore an expensive operation. * \sa SetIndex */ - const IndexType GetIndex() + const IndexType GetIndex() override { return m_IndexStack.front(); } /** Get the pixel value */ - const PixelType Get(void) const + const PixelType Get(void) const override { return this->m_Image->GetPixel( m_IndexStack.front() ); } /** Is the iterator at the end of the region? */ - bool IsAtEnd() + bool IsAtEnd() override { return this->m_IsAtEnd; } /** Put more seeds on the list */ @@ -199,7 +199,7 @@ class ITK_TEMPLATE_EXPORT ShapedFloodFilledFunctionConditionalConstIterator: } /** Walk forward one index */ - void operator++() + void operator++() override { this->DoFloodStep(); } void DoFloodStep(); diff --git a/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalConstIterator.h b/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalConstIterator.h index 09b484493e9..c071ca8ea7d 100644 --- a/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalConstIterator.h +++ b/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalConstIterator.h @@ -103,10 +103,10 @@ class ITK_TEMPLATE_EXPORT ShapedFloodFilledImageFunctionConditionalConstIterator FunctionType *fnPtr):Superclass(imagePtr, fnPtr) {} /** Default Destructor. */ - virtual ~ShapedFloodFilledImageFunctionConditionalConstIterator() {} + ~ShapedFloodFilledImageFunctionConditionalConstIterator() override {} /** Compute whether the index of interest should be included in the flood */ - bool IsPixelIncluded(const IndexType & index) const; + bool IsPixelIncluded(const IndexType & index) const override; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalIterator.h b/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalIterator.h index 1f700802d55..7df25d9d86d 100644 --- a/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalIterator.h +++ b/Modules/Core/Common/include/itkShapedFloodFilledImageFunctionConditionalIterator.h @@ -95,7 +95,7 @@ class ShapedFloodFilledImageFunctionConditionalIterator:public FunctionType *fnPtr):Superclass(imagePtr, fnPtr) {} /** Get the pixel value */ - const PixelType Get(void) const + const PixelType Get(void) const override { return const_cast< ImageType * >( this->m_Image.GetPointer() )->GetPixel( this->m_IndexStack.front() ); } /** Set the pixel value */ @@ -103,7 +103,7 @@ class ShapedFloodFilledImageFunctionConditionalIterator:public { const_cast< ImageType * >( this->m_Image.GetPointer() )->GetPixel( this->m_IndexStack.front() ) = value; } /** Default Destructor. */ - virtual ~ShapedFloodFilledImageFunctionConditionalIterator() {} + ~ShapedFloodFilledImageFunctionConditionalIterator() override {} }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkShapedNeighborhoodIterator.h b/Modules/Core/Common/include/itkShapedNeighborhoodIterator.h index 29ecf98df38..8247e3aa5a0 100644 --- a/Modules/Core/Common/include/itkShapedNeighborhoodIterator.h +++ b/Modules/Core/Common/include/itkShapedNeighborhoodIterator.h @@ -186,7 +186,7 @@ class ITK_TEMPLATE_EXPORT ShapedNeighborhoodIterator: Iterator() {} Iterator(Self *s):ConstIterator(s) {} - ~Iterator() {} + ~Iterator() override {} Iterator & operator=(const Iterator & o) { ConstIterator::operator=(o); @@ -207,7 +207,7 @@ class ITK_TEMPLATE_EXPORT ShapedNeighborhoodIterator: } /** Virtual destructor */ - virtual ~ShapedNeighborhoodIterator() {} + ~ShapedNeighborhoodIterator() override {} /** Constructor which establishes the region size, neighborhood, and image * over which to walk. */ @@ -240,7 +240,7 @@ class ITK_TEMPLATE_EXPORT ShapedNeighborhoodIterator: } /** Standard itk print method */ - virtual void PrintSelf(std::ostream &, Indent) const; + void PrintSelf(std::ostream &, Indent) const override; /** Returns a const iterator for the neighborhood which points to the first * pixel in the neighborhood. */ @@ -252,7 +252,7 @@ class ITK_TEMPLATE_EXPORT ShapedNeighborhoodIterator: const ConstIterator & End() const { return this->m_ConstEndIterator; } - void ClearActiveList() + void ClearActiveList() override { Superclass::ClearActiveList(); m_EndIterator.GoToEnd(); @@ -266,14 +266,14 @@ class ITK_TEMPLATE_EXPORT ShapedNeighborhoodIterator: typedef typename Superclass::NeighborIndexType NeighborIndexType; - void ActivateIndex(NeighborIndexType n) + void ActivateIndex(NeighborIndexType n) override { Superclass::ActivateIndex(n); m_EndIterator.GoToEnd(); m_BeginIterator.GoToBegin(); } - void DeactivateIndex(NeighborIndexType n) + void DeactivateIndex(NeighborIndexType n) override { Superclass::DeactivateIndex(n); m_EndIterator.GoToEnd(); diff --git a/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h b/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h index 5fa962adf24..865b5809d56 100644 --- a/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h +++ b/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h @@ -90,8 +90,8 @@ class ITK_TEMPLATE_EXPORT SimpleDataObjectDecorator:public DataObject protected: SimpleDataObjectDecorator(); - ~SimpleDataObjectDecorator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SimpleDataObjectDecorator() override; + void PrintSelf(std::ostream & os, Indent indent) const override; protected: diff --git a/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.h b/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.h index a733273a1f7..52bb86e4eff 100644 --- a/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.h +++ b/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.h @@ -68,14 +68,14 @@ class ITK_TEMPLATE_EXPORT SinRegularizedHeavisideStepFunction: typedef typename Superclass::RealType RealType; /** Evaluate at the specified input position */ - OutputType Evaluate(const InputType & input) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & input) const override; /** Evaluate the derivative at the specified input position */ - OutputType EvaluateDerivative(const InputType & input) const ITK_OVERRIDE; + OutputType EvaluateDerivative(const InputType & input) const override; protected: SinRegularizedHeavisideStepFunction(); - ~SinRegularizedHeavisideStepFunction() ITK_OVERRIDE; + ~SinRegularizedHeavisideStepFunction() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SinRegularizedHeavisideStepFunction); diff --git a/Modules/Core/Common/include/itkSmapsFileParser.h b/Modules/Core/Common/include/itkSmapsFileParser.h index 1d87cb998b2..ec030239358 100644 --- a/Modules/Core/Common/include/itkSmapsFileParser.h +++ b/Modules/Core/Common/include/itkSmapsFileParser.h @@ -166,13 +166,13 @@ class ITKCommon_EXPORT SmapsData_2_6:public MapData public: typedef MapData::MemoryLoadType MemoryLoadType; - virtual ~SmapsData_2_6() ITK_OVERRIDE; + ~SmapsData_2_6() override; /** Returns the heap usage in kB of the process */ - virtual MemoryLoadType GetHeapUsage() ITK_OVERRIDE; + MemoryLoadType GetHeapUsage() override; /** Returns the stack usage in kB of the process */ - virtual MemoryLoadType GetStackUsage() ITK_OVERRIDE; + MemoryLoadType GetStackUsage() override; /** fill the smaps data */ friend ITKCommon_EXPORT std::istream & operator>>(std::istream & smapsStream, @@ -195,13 +195,13 @@ class ITKCommon_EXPORT VMMapData_10_2:public MapData public: typedef MapData::MemoryLoadType MemoryLoadType; VMMapData_10_2(); - virtual ~VMMapData_10_2() ITK_OVERRIDE; + ~VMMapData_10_2() override; /** Returns the heap usage in kB of the process */ - virtual MemoryLoadType GetHeapUsage() ITK_OVERRIDE; + MemoryLoadType GetHeapUsage() override; /** Returns the stack usage in kB of the process */ - virtual MemoryLoadType GetStackUsage() ITK_OVERRIDE; + MemoryLoadType GetStackUsage() override; /** fill the smaps data */ friend ITKCommon_EXPORT std::istream & operator>>(std::istream & stream, diff --git a/Modules/Core/Common/include/itkSmapsFileParser.hxx b/Modules/Core/Common/include/itkSmapsFileParser.hxx index d8465e66c71..eb6578d8a4f 100644 --- a/Modules/Core/Common/include/itkSmapsFileParser.hxx +++ b/Modules/Core/Common/include/itkSmapsFileParser.hxx @@ -178,8 +178,8 @@ void VMMapFileParser< TVMMapDataType >::ReadFile(const std::string & mapFileLoca std::stringstream vmmapCommand; vmmapCommand << "vmmap " << getpid(); - FILE *vmmapCommandOutput = ITK_NULLPTR; - if ( ( vmmapCommandOutput = popen(vmmapCommand.str().c_str(), "r") ) == ITK_NULLPTR ) + FILE *vmmapCommandOutput = nullptr; + if ( ( vmmapCommandOutput = popen(vmmapCommand.str().c_str(), "r") ) == nullptr ) { itkGenericExceptionMacro(<< "Error using pmap. Can execute pmap command"); } diff --git a/Modules/Core/Common/include/itkSmartPointer.h b/Modules/Core/Common/include/itkSmartPointer.h index b14bee3892e..e12351d28f5 100644 --- a/Modules/Core/Common/include/itkSmartPointer.h +++ b/Modules/Core/Common/include/itkSmartPointer.h @@ -48,7 +48,7 @@ class SmartPointer /** Constructor */ SmartPointer () - { m_Pointer = ITK_NULLPTR; } + { m_Pointer = nullptr; } /** Copy constructor */ SmartPointer (const SmartPointer< ObjectType > & p): @@ -64,7 +64,7 @@ class SmartPointer ~SmartPointer () { this->UnRegister(); - m_Pointer = ITK_NULLPTR; + m_Pointer = nullptr; } /** Overload operator -> */ @@ -77,11 +77,11 @@ class SmartPointer /** Test if the pointer is not NULL. */ bool IsNotNull() const - { return m_Pointer != ITK_NULLPTR; } + { return m_Pointer != nullptr; } /** Test if the pointer is NULL. */ bool IsNull() const - { return m_Pointer == ITK_NULLPTR; } + { return m_Pointer == nullptr; } /** Template comparison operators. */ template< typename TR > diff --git a/Modules/Core/Common/include/itkSmartPointerForwardReference.h b/Modules/Core/Common/include/itkSmartPointerForwardReference.h index 3f3edc2df65..70734107352 100644 --- a/Modules/Core/Common/include/itkSmartPointerForwardReference.h +++ b/Modules/Core/Common/include/itkSmartPointerForwardReference.h @@ -50,7 +50,7 @@ class ITK_TEMPLATE_EXPORT SmartPointerForwardReference public: /** Constructor */ SmartPointerForwardReference () - { m_Pointer = ITK_NULLPTR; } + { m_Pointer = nullptr; } /** Const constructor */ SmartPointerForwardReference (const SmartPointerForwardReference< T > & p); diff --git a/Modules/Core/Common/include/itkSobelOperator.h b/Modules/Core/Common/include/itkSobelOperator.h index e545d6af0bf..a1d1717ee4d 100644 --- a/Modules/Core/Common/include/itkSobelOperator.h +++ b/Modules/Core/Common/include/itkSobelOperator.h @@ -113,7 +113,7 @@ class ITK_TEMPLATE_EXPORT SobelOperator: * The radius of the operator will be 0 except along the axis on which * the operator will work. * \sa CreateToRadius \sa FillCenteredDirectional \sa SetDirection() \sa GetDirection() */ - virtual void CreateDirectional() ITK_OVERRIDE + void CreateDirectional() override { this->CreateToRadius(1); } @@ -135,7 +135,7 @@ class ITK_TEMPLATE_EXPORT SobelOperator: /** * Prints some debugging information */ - virtual void PrintSelf(std::ostream & os, Indent i) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent i) const override { os << i << "SobelOperator { this=" << this << "}" << std::endl; Superclass::PrintSelf( os, i.GetNextIndent() ); @@ -152,12 +152,12 @@ class ITK_TEMPLATE_EXPORT SobelOperator: /** * Calculates operator coefficients. */ - CoefficientVector GenerateCoefficients() ITK_OVERRIDE; + CoefficientVector GenerateCoefficients() override; /** * Arranges coefficients spatially in the memory buffer. */ - void Fill(const CoefficientVector & c) ITK_OVERRIDE; + void Fill(const CoefficientVector & c) override; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkSparseFieldLayer.h b/Modules/Core/Common/include/itkSparseFieldLayer.h index dd3ddb83590..d500c493f4a 100644 --- a/Modules/Core/Common/include/itkSparseFieldLayer.h +++ b/Modules/Core/Common/include/itkSparseFieldLayer.h @@ -70,7 +70,7 @@ class ITK_TEMPLATE_EXPORT ConstSparseFieldLayerIterator } ConstSparseFieldLayerIterator() - { m_Pointer = ITK_NULLPTR; } + { m_Pointer = nullptr; } ConstSparseFieldLayerIterator(TNodeType *p) { m_Pointer = p; } @@ -256,8 +256,8 @@ class ITK_TEMPLATE_EXPORT SparseFieldLayer: protected: SparseFieldLayer(); - ~SparseFieldLayer() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SparseFieldLayer() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SparseFieldLayer); diff --git a/Modules/Core/Common/include/itkSparseImage.h b/Modules/Core/Common/include/itkSparseImage.h index 62ac70329e0..85f27a3e192 100644 --- a/Modules/Core/Common/include/itkSparseImage.h +++ b/Modules/Core/Common/include/itkSparseImage.h @@ -131,13 +131,13 @@ class ITK_TEMPLATE_EXPORT SparseImage:public Image< TNode *, VImageDimension > /** This function initializes the m_NodeList and m_NodeStore variables, and calls the superclass Initialize method. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; protected: SparseImage(); - ~SparseImage() ITK_OVERRIDE {} + ~SparseImage() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: /** The variables for storing the node variables. */ diff --git a/Modules/Core/Common/include/itkSpatialFunction.h b/Modules/Core/Common/include/itkSpatialFunction.h index 88d442b4247..2be5174d015 100644 --- a/Modules/Core/Common/include/itkSpatialFunction.h +++ b/Modules/Core/Common/include/itkSpatialFunction.h @@ -67,12 +67,12 @@ class ITK_TEMPLATE_EXPORT SpatialFunction:public FunctionBase< TInput, TOutput > /** Evaluate the function at a given position. Remember, position is * represented by an n-d itk::Point object with data type double. */ - virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE = 0; + OutputType Evaluate(const InputType & input) const override = 0; protected: SpatialFunction(); - virtual ~SpatialFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SpatialFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SpatialFunction); diff --git a/Modules/Core/Common/include/itkSpatialOrientationAdapter.h b/Modules/Core/Common/include/itkSpatialOrientationAdapter.h index 40039495b67..c9a1fbde294 100644 --- a/Modules/Core/Common/include/itkSpatialOrientationAdapter.h +++ b/Modules/Core/Common/include/itkSpatialOrientationAdapter.h @@ -95,10 +95,10 @@ class ITKCommon_EXPORT SpatialOrientationAdapter: SpatialOrientationAdapter() {} /** convert from direction cosines. */ - virtual OrientationType FromDirectionCosines(const DirectionType & Dir) ITK_OVERRIDE; + OrientationType FromDirectionCosines(const DirectionType & Dir) override; /** convert to direction cosines. */ - virtual DirectionType ToDirectionCosines(const OrientationType & Or) ITK_OVERRIDE; + DirectionType ToDirectionCosines(const OrientationType & Or) override; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkSpecialCoordinatesImage.h b/Modules/Core/Common/include/itkSpecialCoordinatesImage.h index 813554c89a1..4a844cfe60b 100644 --- a/Modules/Core/Common/include/itkSpecialCoordinatesImage.h +++ b/Modules/Core/Common/include/itkSpecialCoordinatesImage.h @@ -170,11 +170,11 @@ class ITK_TEMPLATE_EXPORT SpecialCoordinatesImage:public ImageBase< VImageDimens /** Allocate the image memory. The size of the image must * already be set, e.g. by calling SetRegions(). */ - virtual void Allocate(bool initialize=false) ITK_OVERRIDE; + void Allocate(bool initialize=false) override; /** Restore the data object to its initial state. This means releasing * memory. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Fill the image buffer with a value. Be sure to call Allocate() * first. */ @@ -225,8 +225,8 @@ class ITK_TEMPLATE_EXPORT SpecialCoordinatesImage:public ImageBase< VImageDimens /** Return a pointer to the beginning of the buffer. This is used by * the image iterator class. */ - TPixel * GetBufferPointer() { return m_Buffer ? m_Buffer->GetBufferPointer() : 0; } - const TPixel * GetBufferPointer() const { return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR; } + TPixel * GetBufferPointer() { return m_Buffer ? m_Buffer->GetBufferPointer() : nullptr; } + const TPixel * GetBufferPointer() const { return m_Buffer ? m_Buffer->GetBufferPointer() : nullptr; } /** Return a pointer to the container. */ PixelContainer * GetPixelContainer() { return m_Buffer.GetPointer(); } @@ -248,12 +248,12 @@ class ITK_TEMPLATE_EXPORT SpecialCoordinatesImage:public ImageBase< VImageDimens * to the output of a normal filter which is being used to output a * special-coordinates image. Filters designed to produce a particular kind * of special-coordinates image should do this automatically. */ - virtual void SetSpacing(const SpacingType &) ITK_OVERRIDE {} - virtual void SetSpacing(const double[VImageDimension]) ITK_OVERRIDE {} - virtual void SetSpacing(const float[VImageDimension]) ITK_OVERRIDE {} - virtual void SetOrigin(const PointType) ITK_OVERRIDE {} - virtual void SetOrigin(const double[VImageDimension]) ITK_OVERRIDE {} - virtual void SetOrigin(const float[VImageDimension]) ITK_OVERRIDE {} + void SetSpacing(const SpacingType &) override {} + void SetSpacing(const double[VImageDimension]) override {} + void SetSpacing(const float[VImageDimension]) override {} + void SetOrigin(const PointType) override {} + void SetOrigin(const double[VImageDimension]) override {} + void SetOrigin(const float[VImageDimension]) override {} /* It is ILLEGAL in C++ to make a templated member function virtual! */ /* Therefore, we must just let templates take care of everything. */ @@ -281,9 +281,9 @@ class ITK_TEMPLATE_EXPORT SpecialCoordinatesImage:public ImageBase< VImageDimens protected: SpecialCoordinatesImage(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual ~SpecialCoordinatesImage() ITK_OVERRIDE {} + ~SpecialCoordinatesImage() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SpecialCoordinatesImage); diff --git a/Modules/Core/Common/include/itkSphereSpatialFunction.h b/Modules/Core/Common/include/itkSphereSpatialFunction.h index 018a294a51c..f2e63499256 100644 --- a/Modules/Core/Common/include/itkSphereSpatialFunction.h +++ b/Modules/Core/Common/include/itkSphereSpatialFunction.h @@ -55,7 +55,7 @@ class ITK_TEMPLATE_EXPORT SphereSpatialFunction: typedef typename Superclass::OutputType OutputType; /** Evaluates the function at a given position */ - OutputType Evaluate(const InputType & position) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & position) const override; /** Get and set the center of the sphere. */ itkGetConstMacro(Center, InputType); @@ -67,8 +67,8 @@ class ITK_TEMPLATE_EXPORT SphereSpatialFunction: protected: SphereSpatialFunction(); - virtual ~SphereSpatialFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SphereSpatialFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SphereSpatialFunction); diff --git a/Modules/Core/Common/include/itkStdStreamLogOutput.h b/Modules/Core/Common/include/itkStdStreamLogOutput.h index 8bc1f6ffcdb..2ad85857cc2 100644 --- a/Modules/Core/Common/include/itkStdStreamLogOutput.h +++ b/Modules/Core/Common/include/itkStdStreamLogOutput.h @@ -62,25 +62,25 @@ class ITKCommon_EXPORT StdStreamLogOutput:public LogOutput void SetStream(StreamType & Stream); /** flush a buffer */ - virtual void Flush() ITK_OVERRIDE; + void Flush() override; /** Write to multiple outputs */ - virtual void Write(double timestamp) ITK_OVERRIDE; + void Write(double timestamp) override; /** Write to a buffer */ - virtual void Write(std::string const & content) ITK_OVERRIDE; + void Write(std::string const & content) override; /** Write to a buffer */ - virtual void Write(std::string const & content, double timestamp) ITK_OVERRIDE; + void Write(std::string const & content, double timestamp) override; protected: /** Constructor */ StdStreamLogOutput(); /** Destructor */ - virtual ~StdStreamLogOutput() ITK_OVERRIDE; + ~StdStreamLogOutput() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Core/Common/include/itkStdStreamStateSave.h b/Modules/Core/Common/include/itkStdStreamStateSave.h index 8191eedd5cc..8407d64caac 100644 --- a/Modules/Core/Common/include/itkStdStreamStateSave.h +++ b/Modules/Core/Common/include/itkStdStreamStateSave.h @@ -49,7 +49,7 @@ class StdStreamStateSave public: explicit StdStreamStateSave(std::ios& stream) : m_Ios(stream), - m_State(ITK_NULLPTR) + m_State(nullptr) { m_State.copyfmt(stream); } diff --git a/Modules/Core/Common/include/itkStoppingCriterionBase.h b/Modules/Core/Common/include/itkStoppingCriterionBase.h index 35d5c5e8936..8db0f4466b7 100644 --- a/Modules/Core/Common/include/itkStoppingCriterionBase.h +++ b/Modules/Core/Common/include/itkStoppingCriterionBase.h @@ -55,7 +55,7 @@ class ITKCommon_EXPORT StoppingCriterionBase : public Object /** \brief Constructor */ StoppingCriterionBase(); /** \brief Destructor */ - virtual ~StoppingCriterionBase() ITK_OVERRIDE; + ~StoppingCriterionBase() override; private: StoppingCriterionBase( const Self& ); diff --git a/Modules/Core/Common/include/itkStreamingImageFilter.h b/Modules/Core/Common/include/itkStreamingImageFilter.h index 21c90c02063..bcca09f3a68 100644 --- a/Modules/Core/Common/include/itkStreamingImageFilter.h +++ b/Modules/Core/Common/include/itkStreamingImageFilter.h @@ -95,13 +95,13 @@ class ITK_TEMPLATE_EXPORT StreamingImageFilter:public ImageToImageFilter< TInput * or ThreadedGenerateData() method. Instead, all the work is done * in UpdateOutputData() since it must update a little, execute a little, * update some more, execute some more, etc. */ - virtual void UpdateOutputData(DataObject *output) ITK_OVERRIDE; + void UpdateOutputData(DataObject *output) override; /** Override PropagateRequestedRegion from ProcessObject * Since inside UpdateOutputData we iterate over streaming pieces * we don't need to proapage up the pipeline */ - virtual void PropagateRequestedRegion(DataObject *output) ITK_OVERRIDE; + void PropagateRequestedRegion(DataObject *output) override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -114,8 +114,8 @@ class ITK_TEMPLATE_EXPORT StreamingImageFilter:public ImageToImageFilter< TInput protected: StreamingImageFilter(); - ~StreamingImageFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~StreamingImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StreamingImageFilter); diff --git a/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.h b/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.h index fdca284ec78..d3247bcf66e 100644 --- a/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.h +++ b/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.h @@ -61,7 +61,7 @@ class ITK_TEMPLATE_EXPORT SymmetricEllipsoidInteriorExteriorSpatialFunction: typedef typename Superclass::OutputType OutputType; /** Evaluates the function at a given position. */ - OutputType Evaluate(const InputType & position) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & position) const override; /** Get and set the center of the ellipsoid. */ itkGetConstMacro(Center, InputType); @@ -73,9 +73,9 @@ class ITK_TEMPLATE_EXPORT SymmetricEllipsoidInteriorExteriorSpatialFunction: protected: SymmetricEllipsoidInteriorExteriorSpatialFunction(); - virtual ~SymmetricEllipsoidInteriorExteriorSpatialFunction() ITK_OVERRIDE; + ~SymmetricEllipsoidInteriorExteriorSpatialFunction() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: SymmetricEllipsoidInteriorExteriorSpatialFunction(const Self &); //purposely diff --git a/Modules/Core/Common/include/itkTetrahedronCell.h b/Modules/Core/Common/include/itkTetrahedronCell.h index 4aaec123844..8259ce352a5 100644 --- a/Modules/Core/Common/include/itkTetrahedronCell.h +++ b/Modules/Core/Common/include/itkTetrahedronCell.h @@ -64,31 +64,31 @@ class ITK_TEMPLATE_EXPORT TetrahedronCell:public TCellInterface, private Tetrahe itkStaticConstMacro(CellDimension, unsigned int, 3); /** Implement the standard CellInterface. */ - virtual CellGeometry GetType(void) const ITK_OVERRIDE + CellGeometry GetType(void) const override { return Superclass::TETRAHEDRON_CELL; } - virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE; + void MakeCopy(CellAutoPointer &) const override; - virtual unsigned int GetDimension(void) const ITK_OVERRIDE; + unsigned int GetDimension(void) const override; - virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE; + unsigned int GetNumberOfPoints(void) const override; - virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE; + CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override; - virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, - CellAutoPointer &) ITK_OVERRIDE; - virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE; + bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, + CellAutoPointer &) override; + void SetPointIds(PointIdConstIterator first) override; - virtual void SetPointIds(PointIdConstIterator first, - PointIdConstIterator last) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first, + PointIdConstIterator last) override; - virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE; - virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE; + void SetPointId(int localId, PointIdentifier) override; + PointIdIterator PointIdsBegin(void) override; - virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsBegin(void) const override; - virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE; + PointIdIterator PointIdsEnd(void) override; - virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsEnd(void) const override; /** Tetrahedron-specific interface. */ virtual CellFeatureCount GetNumberOfVertices() const; @@ -104,12 +104,12 @@ class ITK_TEMPLATE_EXPORT TetrahedronCell:public TCellInterface, private Tetrahe /** Visitor interface. */ itkCellVisitMacro(Superclass::TETRAHEDRON_CELL); - virtual bool EvaluatePosition(CoordRepType *, + bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, - InterpolationWeightType *) ITK_OVERRIDE; + InterpolationWeightType *) override; public: TetrahedronCell() @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT TetrahedronCell:public TCellInterface, private Tetrahe } } - ~TetrahedronCell() ITK_OVERRIDE {} + ~TetrahedronCell() override {} protected: /** Store the number of points needed for a tetrahedron. */ diff --git a/Modules/Core/Common/include/itkTetrahedronCell.hxx b/Modules/Core/Common/include/itkTetrahedronCell.hxx index 13ad3c42e88..6f14f9d9fb5 100644 --- a/Modules/Core/Common/include/itkTetrahedronCell.hxx +++ b/Modules/Core/Common/include/itkTetrahedronCell.hxx @@ -208,7 +208,7 @@ TetrahedronCell< TCellInterface > for ( i = 0; i < 4; i++ ) { this->GetFace (i, triangle); - triangle->EvaluatePosition(x, points, closest, pc, &dist2, ITK_NULLPTR); + triangle->EvaluatePosition(x, points, closest, pc, &dist2, nullptr); if ( dist2 < *minDist2 ) { diff --git a/Modules/Core/Common/include/itkTextOutput.h b/Modules/Core/Common/include/itkTextOutput.h index ac6e25368a3..6b8335b10cd 100644 --- a/Modules/Core/Common/include/itkTextOutput.h +++ b/Modules/Core/Common/include/itkTextOutput.h @@ -37,12 +37,12 @@ class ITKCommon_EXPORT TextOutput:public OutputWindow /** New macro for creation of through a Smart Pointer */ itkNewMacro(TextOutput); - virtual void DisplayText(const char *s) ITK_OVERRIDE + void DisplayText(const char *s) override { std::cout << s << std::endl; } protected: TextOutput(); - virtual ~TextOutput() ITK_OVERRIDE; + ~TextOutput() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TextOutput); diff --git a/Modules/Core/Common/include/itkThreadJob.h b/Modules/Core/Common/include/itkThreadJob.h index 8ee26083c85..ef4b753b55f 100644 --- a/Modules/Core/Common/include/itkThreadJob.h +++ b/Modules/Core/Common/include/itkThreadJob.h @@ -68,9 +68,9 @@ struct ThreadJob #endif ThreadJob() : - m_ThreadFunction(ITK_NULLPTR), - m_Semaphore(ITK_NULLPTR), - m_UserData(ITK_NULLPTR) + m_ThreadFunction(nullptr), + m_Semaphore(nullptr), + m_UserData(nullptr) { } diff --git a/Modules/Core/Common/include/itkThreadLogger.h b/Modules/Core/Common/include/itkThreadLogger.h index c14bec37c55..9280edf3ee0 100644 --- a/Modules/Core/Common/include/itkThreadLogger.h +++ b/Modules/Core/Common/include/itkThreadLogger.h @@ -72,16 +72,16 @@ class ITKCommon_EXPORT ThreadLogger:public Logger /** Set the priority level for the current logger. Only messages that have * priorities equal or greater than the one set here will be posted to the * current outputs. */ - virtual void SetPriorityLevel(PriorityLevelType level) ITK_OVERRIDE; + void SetPriorityLevel(PriorityLevelType level) override; /** Get the priority level for the current logger. Only messages that have * priorities equal or greater than the one set here will be posted to the * current outputs. */ - virtual PriorityLevelType GetPriorityLevel() const ITK_OVERRIDE; + PriorityLevelType GetPriorityLevel() const override; - virtual void SetLevelForFlushing(PriorityLevelType level) ITK_OVERRIDE; + void SetLevelForFlushing(PriorityLevelType level) override; - virtual PriorityLevelType GetLevelForFlushing() const ITK_OVERRIDE; + PriorityLevelType GetLevelForFlushing() const override; /** Set the delay in milliseconds between checks to see if there are any * low priority messages to be processed. @@ -94,11 +94,11 @@ class ITKCommon_EXPORT ThreadLogger:public Logger virtual DelayType GetDelay() const; /** Registers another output stream with the multiple output. */ - virtual void AddLogOutput(OutputType *output) ITK_OVERRIDE; + void AddLogOutput(OutputType *output) override; - virtual void Write(PriorityLevelType level, std::string const & content) ITK_OVERRIDE; + void Write(PriorityLevelType level, std::string const & content) override; - virtual void Flush() ITK_OVERRIDE; + void Flush() override; protected: @@ -106,10 +106,10 @@ class ITKCommon_EXPORT ThreadLogger:public Logger ThreadLogger(); /** Destructor */ - virtual ~ThreadLogger() ITK_OVERRIDE; + ~ThreadLogger() override; /** Print contents of a ThreadLogger */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; static ITK_THREAD_RETURN_TYPE ThreadFunction(void *); diff --git a/Modules/Core/Common/include/itkThreadPool.h b/Modules/Core/Common/include/itkThreadPool.h index b097d48d14e..544a31b119a 100644 --- a/Modules/Core/Common/include/itkThreadPool.h +++ b/Modules/Core/Common/include/itkThreadPool.h @@ -120,7 +120,7 @@ class ITKCommon_EXPORT ThreadPool : public Object void DeleteThreads(); ThreadPool(); - virtual ~ThreadPool() ITK_OVERRIDE; + ~ThreadPool() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ThreadPool); diff --git a/Modules/Core/Common/include/itkThreadSupport.h b/Modules/Core/Common/include/itkThreadSupport.h index 48ad3148f7e..0f06eb205cc 100644 --- a/Modules/Core/Common/include/itkThreadSupport.h +++ b/Modules/Core/Common/include/itkThreadSupport.h @@ -47,7 +47,7 @@ namespace itk typedef pthread_mutex_t FastMutexType; typedef void *( * ThreadFunctionType )(void *); typedef pthread_t ThreadProcessIdType; -#define ITK_THREAD_RETURN_VALUE NULL /* This is from a c library, and always needs to be NULL, not ITK_NULLPTR */ +#define ITK_THREAD_RETURN_VALUE NULL /* This is from a c library, and always needs to be NULL, not nullptr */ #define ITK_THREAD_RETURN_TYPE void * #elif defined(ITK_USE_WIN32_THREADS) diff --git a/Modules/Core/Common/include/itkThreadedDomainPartitioner.h b/Modules/Core/Common/include/itkThreadedDomainPartitioner.h index 6954aa79326..c989838c7b4 100644 --- a/Modules/Core/Common/include/itkThreadedDomainPartitioner.h +++ b/Modules/Core/Common/include/itkThreadedDomainPartitioner.h @@ -78,7 +78,7 @@ class ITK_TEMPLATE_EXPORT ThreadedDomainPartitioner : public Object protected: ThreadedDomainPartitioner(){} - ~ThreadedDomainPartitioner() ITK_OVERRIDE {} + ~ThreadedDomainPartitioner() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ThreadedDomainPartitioner); diff --git a/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.h b/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.h index 18ac6f84277..3485d3d64ba 100644 --- a/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.h +++ b/Modules/Core/Common/include/itkThreadedImageRegionPartitioner.h @@ -78,15 +78,15 @@ class ITK_TEMPLATE_EXPORT ThreadedImageRegionPartitioner * If \c threadId is greater than the return value, the contents of * \c subRegion are undefined. */ - virtual + ThreadIdType PartitionDomain(const ThreadIdType threadId, const ThreadIdType requestedTotal, const DomainType& completeRegion, - DomainType& subRegion) const ITK_OVERRIDE; + DomainType& subRegion) const override; protected: ThreadedImageRegionPartitioner(); - virtual ~ThreadedImageRegionPartitioner() ITK_OVERRIDE; + ~ThreadedImageRegionPartitioner() override; typedef ImageRegionSplitterSlowDimension ImageRegionSplitterType; diff --git a/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h b/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h index 8c97e8df84d..567b2a23991 100644 --- a/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h +++ b/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h @@ -75,15 +75,15 @@ class ITKCommon_EXPORT ThreadedIndexedContainerPartitioner * If \c threadId is greater than the return value, the contents of * \c subIndexRange are undefined. */ - virtual + ThreadIdType PartitionDomain(const ThreadIdType threadId, const ThreadIdType requestedTotal, const DomainType& completeIndexRange, - DomainType& subIndexRange) const ITK_OVERRIDE; + DomainType& subIndexRange) const override; protected: ThreadedIndexedContainerPartitioner(); - virtual ~ThreadedIndexedContainerPartitioner() ITK_OVERRIDE; + ~ThreadedIndexedContainerPartitioner() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ThreadedIndexedContainerPartitioner); diff --git a/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.h b/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.h index f64af55e07b..59753cadc61 100644 --- a/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.h +++ b/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.h @@ -137,15 +137,15 @@ class ITK_TEMPLATE_EXPORT ThreadedIteratorRangePartitioner * If \c threadId is greater than the return value, the contents of * \c subDomain are undefined. */ - virtual + ThreadIdType PartitionDomain(const ThreadIdType threadId, const ThreadIdType requestedTotal, const DomainType& completeDomain, - DomainType& subDomain) const ITK_OVERRIDE; + DomainType& subDomain) const override; protected: ThreadedIteratorRangePartitioner(); - virtual ~ThreadedIteratorRangePartitioner() ITK_OVERRIDE; + ~ThreadedIteratorRangePartitioner() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ThreadedIteratorRangePartitioner); diff --git a/Modules/Core/Common/include/itkTimeProbe.h b/Modules/Core/Common/include/itkTimeProbe.h index 759663ded4f..8a9ec7f2667 100644 --- a/Modules/Core/Common/include/itkTimeProbe.h +++ b/Modules/Core/Common/include/itkTimeProbe.h @@ -60,12 +60,12 @@ class ITKCommon_EXPORT TimeProbe:public TimeProbe(); /** Destructor */ - virtual ~TimeProbe() ITK_OVERRIDE; + ~TimeProbe() override; /** Get the current time. * Warning: the returned value is not the elapsed time since the last Start() call. */ - virtual TimeStampType GetInstantValue(void) const ITK_OVERRIDE; + TimeStampType GetInstantValue(void) const override; /** Get a handle to m_RealTimeClock. */ itkGetConstObjectMacro( RealTimeClock, RealTimeClock ); diff --git a/Modules/Core/Common/include/itkTimeProbesCollectorBase.h b/Modules/Core/Common/include/itkTimeProbesCollectorBase.h index e1247ac34f1..b43128a8fb1 100644 --- a/Modules/Core/Common/include/itkTimeProbesCollectorBase.h +++ b/Modules/Core/Common/include/itkTimeProbesCollectorBase.h @@ -42,7 +42,7 @@ class ITKCommon_EXPORT TimeProbesCollectorBase:public ResourceProbesCollectorBas TimeProbesCollectorBase(); /** destructor */ - virtual ~TimeProbesCollectorBase(); + ~TimeProbesCollectorBase() override; }; } diff --git a/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.h b/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.h index 19ed4dc588f..11244335392 100644 --- a/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.h +++ b/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.h @@ -62,7 +62,7 @@ class ITK_TEMPLATE_EXPORT TorusInteriorExteriorSpatialFunction: typedef typename Superclass::OutputType OutputType; /** Evaluates the function at a given position. */ - OutputType Evaluate(const InputType & position) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & position) const override; /** Set/Get the origin of the torus (the point from which the major * radius is measured). */ @@ -79,8 +79,8 @@ class ITK_TEMPLATE_EXPORT TorusInteriorExteriorSpatialFunction: protected: TorusInteriorExteriorSpatialFunction(); - virtual ~TorusInteriorExteriorSpatialFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~TorusInteriorExteriorSpatialFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TorusInteriorExteriorSpatialFunction); diff --git a/Modules/Core/Common/include/itkTreeChangeEvent.h b/Modules/Core/Common/include/itkTreeChangeEvent.h index 963221c08e3..551706d5871 100644 --- a/Modules/Core/Common/include/itkTreeChangeEvent.h +++ b/Modules/Core/Common/include/itkTreeChangeEvent.h @@ -40,23 +40,23 @@ class ITK_TEMPLATE_EXPORT TreeChangeEvent:public ModifiedEvent /** Constructor */ TreeChangeEvent(): - m_ChangePosition( ITK_NULLPTR ) + m_ChangePosition( nullptr ) {} /** Copy constructor */ TreeChangeEvent(const TreeIteratorBase< TTreeType > & position) { m_ChangePosition = &position; } /** Destructor */ - virtual ~TreeChangeEvent() ITK_OVERRIDE {} + ~TreeChangeEvent() override {} /** Get the event name */ - virtual const char * GetEventName() const ITK_OVERRIDE { return "TreeChangeEvent"; } + const char * GetEventName() const override { return "TreeChangeEvent"; } /** Check the event */ - virtual bool CheckEvent(const::itk::EventObject *e) const ITK_OVERRIDE { return (dynamic_cast< const Self * >( e ) != ITK_NULLPTR); } + bool CheckEvent(const::itk::EventObject *e) const override { return (dynamic_cast< const Self * >( e ) != nullptr); } /** Make the event object */ - virtual::itk::EventObject * MakeObject() const ITK_OVERRIDE { return new Self(*m_ChangePosition); } + ::itk::EventObject * MakeObject() const override { return new Self(*m_ChangePosition); } /** Get the change position */ const TreeIteratorBase< TTreeType > & GetChangePosition() const { return *m_ChangePosition; } @@ -89,11 +89,11 @@ class TreeNodeChangeEvent:public TreeChangeEvent< TTreeType > TreeNodeChangeEvent(const TreeIteratorBase< TTreeType > & position): TreeChangeEvent< TTreeType >(position) {} - virtual const char * GetEventName() const { return "TreeNodeChangeEvent"; } + const char * GetEventName() const override { return "TreeNodeChangeEvent"; } - virtual bool CheckEvent(const::itk::EventObject *e) const { return dynamic_cast< const Self * >( e ); } + bool CheckEvent(const::itk::EventObject *e) const override { return dynamic_cast< const Self * >( e ); } - virtual::itk::EventObject * MakeObject() const { return new Self(*this->m_ChangePosition); } + ::itk::EventObject * MakeObject() const override { return new Self(*this->m_ChangePosition); } TreeNodeChangeEvent(const Self & s):TreeChangeEvent< TTreeType >(s) {} @@ -122,13 +122,13 @@ class ITK_TEMPLATE_EXPORT TreeAddEvent:public TreeChangeEvent< TTreeType > TreeChangeEvent< TTreeType >(position) {} /** Get the name of the event */ - virtual const char * GetEventName() const { return "TreeAddEvent"; } + const char * GetEventName() const override { return "TreeAddEvent"; } /** Check event function */ - virtual bool CheckEvent(const::itk::EventObject *e) const { return (dynamic_cast< const Self * >( e ) != ITK_NULLPTR); } + bool CheckEvent(const::itk::EventObject *e) const override { return (dynamic_cast< const Self * >( e ) != nullptr); } /** Make the event object */ - virtual::itk::EventObject * MakeObject() const { return new Self(*this->m_ChangePosition); } + ::itk::EventObject * MakeObject() const override { return new Self(*this->m_ChangePosition); } TreeAddEvent(const Self & s):TreeChangeEvent< TTreeType >(s) {} @@ -157,13 +157,13 @@ class ITK_TEMPLATE_EXPORT TreeRemoveEvent:public TreeChangeEvent< TTreeType > TreeChangeEvent< TTreeType >(position) {} /** Get the event name */ - virtual const char * GetEventName() const { return "TreeRemoveEvent"; } + const char * GetEventName() const override { return "TreeRemoveEvent"; } /** Check the event */ - virtual bool CheckEvent(const::itk::EventObject *e) const { return (dynamic_cast< const Self * >( e ) != ITK_NULLPTR); } + bool CheckEvent(const::itk::EventObject *e) const override { return (dynamic_cast< const Self * >( e ) != nullptr); } /** Make the event object */ - virtual::itk::EventObject * MakeObject() const { return new Self(*this->m_ChangePosition); } + ::itk::EventObject * MakeObject() const override { return new Self(*this->m_ChangePosition); } TreeRemoveEvent(const Self & s):TreeChangeEvent< TTreeType >(s) {} @@ -188,11 +188,11 @@ class ITK_TEMPLATE_EXPORT TreePruneEvent:public TreeRemoveEvent< TTreeType > TreePruneEvent(const TreeIteratorBase< TTreeType > & position): TreeRemoveEvent< TTreeType >(position) {} - virtual const char * GetEventName() const { return "TreePruneEvent"; } + const char * GetEventName() const override { return "TreePruneEvent"; } - virtual bool CheckEvent(const::itk::EventObject *e) const { return (dynamic_cast< const Self * >( e ) != ITK_NULLPTR); } + bool CheckEvent(const::itk::EventObject *e) const override { return (dynamic_cast< const Self * >( e ) != nullptr); } - virtual::itk::EventObject * MakeObject() const { return new Self(*this->m_ChangePosition); } + ::itk::EventObject * MakeObject() const override { return new Self(*this->m_ChangePosition); } TreePruneEvent(const Self & s):TreeRemoveEvent< TTreeType >(s) {} diff --git a/Modules/Core/Common/include/itkTreeContainer.h b/Modules/Core/Common/include/itkTreeContainer.h index 0b3a36e70cf..d6616b30db2 100644 --- a/Modules/Core/Common/include/itkTreeContainer.h +++ b/Modules/Core/Common/include/itkTreeContainer.h @@ -64,28 +64,28 @@ class ITK_TEMPLATE_EXPORT TreeContainer:public TreeContainerBase< TValue > TreeContainer(TreeContainer< TValue > & tree); /** Set the root as an element */ - virtual bool SetRoot(const TValue element) ITK_OVERRIDE; + bool SetRoot(const TValue element) override; /** The the root as an iterator position */ bool SetRoot(IteratorType & pos); /** Set the root as a tree node */ - virtual bool SetRoot(TreeNode< TValue > *node) ITK_OVERRIDE; + bool SetRoot(TreeNode< TValue > *node) override; /** Return true if the element is in the tree */ - bool Contains(const TValue element) ITK_OVERRIDE; + bool Contains(const TValue element) override; /** Return the number of elements in the tree */ - int Count() const ITK_OVERRIDE; + int Count() const override; /** Return true if the element is a leaf */ - bool IsLeaf(const TValue element) ITK_OVERRIDE; + bool IsLeaf(const TValue element) override; /** Return true if the element is a root */ - bool IsRoot(const TValue element) ITK_OVERRIDE; + bool IsRoot(const TValue element) override; /** Clear the tree */ - bool Clear() ITK_OVERRIDE; + bool Clear() override; /** operator equal */ bool operator==(TreeContainer< TValue > & tree); @@ -94,7 +94,7 @@ class ITK_TEMPLATE_EXPORT TreeContainer:public TreeContainerBase< TValue > bool Swap(IteratorType & v, IteratorType & w); /** Get the root */ - const TreeNodeType * GetRoot() const ITK_OVERRIDE { return m_Root.GetPointer(); } + const TreeNodeType * GetRoot() const override { return m_Root.GetPointer(); } /** Add a child to a given parent using values */ bool Add(const TValue child, const TValue parent); @@ -105,13 +105,13 @@ class ITK_TEMPLATE_EXPORT TreeContainer:public TreeContainerBase< TValue > protected: TreeContainer(); - virtual ~TreeContainer() ITK_OVERRIDE; + ~TreeContainer() override; typename TreeNodeType::Pointer m_Root; int m_DefaultChildrenCount; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkTreeContainer.hxx b/Modules/Core/Common/include/itkTreeContainer.hxx index bfce71ccb22..f9a9c73b60f 100644 --- a/Modules/Core/Common/include/itkTreeContainer.hxx +++ b/Modules/Core/Common/include/itkTreeContainer.hxx @@ -26,7 +26,7 @@ namespace itk template< typename TValue > TreeContainer< TValue >::TreeContainer() { - m_Root = ITK_NULLPTR; + m_Root = nullptr; this->SetSubtree(false); m_DefaultChildrenCount = 2; } @@ -35,7 +35,7 @@ TreeContainer< TValue >::TreeContainer() template< typename TValue > TreeContainer< TValue >::TreeContainer(int dcc) { - m_Root = ITK_NULLPTR; + m_Root = nullptr; this->SetSubtree(false); m_DefaultChildrenCount = dcc; } @@ -44,7 +44,7 @@ TreeContainer< TValue >::TreeContainer(int dcc) template< typename TValue > TreeContainer< TValue >::TreeContainer(TreeContainer< TValue > & ) { - m_Root = ITK_NULLPTR; + m_Root = nullptr; this->SetSubtree(false); m_DefaultChildrenCount = 3; } @@ -61,7 +61,7 @@ TreeContainer< TValue >::SetRoot(const TValue element) { m_Root = TreeNodeType::New(); m_Root->Set(element); - m_Root->SetParent(ITK_NULLPTR); + m_Root->SetParent(nullptr); return true; } @@ -102,23 +102,23 @@ TreeContainer< TValue >::Swap(IteratorType & v, IteratorType & w) TreeNode< TValue > *nv = v.GetNode(); TreeNode< TValue > *nw = w.GetNode(); - if ( nv == ITK_NULLPTR || nw == ITK_NULLPTR ) + if ( nv == nullptr || nw == nullptr ) { return false; } TreeNode< TValue > *pv = nv->GetParent(); TreeNode< TValue > *pw = nw->GetParent(); - if ( pv == ITK_NULLPTR && pw == ITK_NULLPTR ) + if ( pv == nullptr && pw == nullptr ) { return false; } - else if ( pv == ITK_NULLPTR ) + else if ( pv == nullptr ) { pw->ReplaceChild(nw, nv); m_Root = nw; } - else if ( pw == ITK_NULLPTR ) + else if ( pw == nullptr ) { pv->ReplaceChild(nv, nw); m_Root = nv; @@ -231,7 +231,7 @@ bool TreeContainer< TValue >::Clear() { PreOrderTreeIterator< Self > it(this, m_Root); bool success = it.Remove(); - m_Root = ITK_NULLPTR; + m_Root = nullptr; return success; } @@ -250,7 +250,7 @@ TreeContainer< TValue >::GetNode(TValue val) const } ++it; } - return ITK_NULLPTR; + return nullptr; } /** Set the root of the tree from the iterator position */ @@ -263,15 +263,15 @@ TreeContainer< TValue >::SetRoot(IteratorType & pos) return false; } TreeNode< TValue > *node = pos.GetNode(); - if ( node == ITK_NULLPTR ) + if ( node == nullptr ) { return false; } TreeNode< TValue > *parent = node->GetParent(); - TreeNode< TValue > *help = ITK_NULLPTR; + TreeNode< TValue > *help = nullptr; - if ( parent == ITK_NULLPTR ) + if ( parent == nullptr ) { return false; } @@ -279,12 +279,12 @@ TreeContainer< TValue >::SetRoot(IteratorType & pos) m_Root = node; node->AddChild(parent); parent->Remove(node); - node->SetParent(ITK_NULLPTR); + node->SetParent(nullptr); help = parent->GetParent(); parent->SetParent(node); node = parent; - while ( help != ITK_NULLPTR ) + while ( help != nullptr ) { parent = help; help = help->GetParent(); diff --git a/Modules/Core/Common/include/itkTreeContainerBase.h b/Modules/Core/Common/include/itkTreeContainerBase.h index ebbeec6e8b7..2d7a7a0ae6e 100644 --- a/Modules/Core/Common/include/itkTreeContainerBase.h +++ b/Modules/Core/Common/include/itkTreeContainerBase.h @@ -76,7 +76,7 @@ class TreeContainerBase:public Object protected: TreeContainerBase() : m_SubTree(false) {} - virtual ~TreeContainerBase() ITK_OVERRIDE {} + ~TreeContainerBase() override {} bool m_SubTree; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkTreeIteratorBase.h b/Modules/Core/Common/include/itkTreeIteratorBase.h index 69e8632d0eb..af07b5a2caa 100644 --- a/Modules/Core/Common/include/itkTreeIteratorBase.h +++ b/Modules/Core/Common/include/itkTreeIteratorBase.h @@ -155,7 +155,7 @@ class ITK_TEMPLATE_EXPORT TreeIteratorBase bool IsAtBegin(void) const { return ( m_Position == m_Begin ); } /** Is the iterator at the end of the tree?. The iterator is at the - * end if it points to ITK_NULLPTR */ + * end if it points to nullptr */ bool IsAtEnd(void) const { return ( m_Position == m_End ); } /** Clone the iterator */ diff --git a/Modules/Core/Common/include/itkTreeIteratorBase.hxx b/Modules/Core/Common/include/itkTreeIteratorBase.hxx index 31a2678c172..f3d972e27bd 100644 --- a/Modules/Core/Common/include/itkTreeIteratorBase.hxx +++ b/Modules/Core/Common/include/itkTreeIteratorBase.hxx @@ -53,7 +53,7 @@ TreeIteratorBase< TTreeType >::TreeIteratorBase(TTreeType *tree, const TreeNodeT m_Position = const_cast< TreeNodeType * >( m_Root ); m_Tree = tree; m_Begin = m_Position; - m_End = ITK_NULLPTR; + m_End = nullptr; } /** Constructor */ @@ -71,7 +71,7 @@ TreeIteratorBase< TTreeType >::TreeIteratorBase(const TTreeType *tree, const Tre m_Position = const_cast< TreeNodeType * >( m_Root ); m_Tree = const_cast< TTreeType * >( tree ); m_Begin = m_Position; - m_End = ITK_NULLPTR; + m_End = nullptr; } /** Return the current value of the node */ @@ -98,7 +98,7 @@ template< typename TTreeType > bool TreeIteratorBase< TTreeType >::Add(ValueType element) { - if ( m_Position == ITK_NULLPTR && m_Root == ITK_NULLPTR ) + if ( m_Position == nullptr && m_Root == nullptr ) { bool returnValue = const_cast< TTreeType * >( m_Tree )->SetRoot(element); // signal AddEvent for self @@ -108,7 +108,7 @@ TreeIteratorBase< TTreeType >::Add(ValueType element) m_Tree->InvokeEvent( TreeAddEvent< TTreeType >(*this) ); return returnValue; } - else if ( m_Position == ITK_NULLPTR ) + else if ( m_Position == nullptr ) { return false; } @@ -165,7 +165,7 @@ template< typename TTreeType > bool TreeIteratorBase< TTreeType >::IsRoot() const { - if ( m_Root == ITK_NULLPTR ) + if ( m_Root == nullptr ) { return false; } @@ -192,13 +192,13 @@ TreeIteratorBase< TTreeType >::Add(TTreeType & subTree) return false; } - if ( m_Root == ITK_NULLPTR ) + if ( m_Root == nullptr ) { m_Root = static_cast< const TreeNodeType * >( subTree.GetRoot() ); } else { - if ( m_Position == ITK_NULLPTR ) + if ( m_Position == nullptr ) { return false; } @@ -223,11 +223,11 @@ template< typename TTreeType > bool TreeIteratorBase< TTreeType >::HasChild(int number) const { - if ( m_Position == ITK_NULLPTR ) + if ( m_Position == nullptr ) { return false; } - if ( m_Position->GetChild(number) != ITK_NULLPTR ) + if ( m_Position->GetChild(number) != nullptr ) { return true; } @@ -257,7 +257,7 @@ TreeIteratorBase< TTreeType >::RemoveChild(int number) } TreeNodeType *child = dynamic_cast< TreeNodeType * >( m_Position->GetChild(number) ); - if ( child != ITK_NULLPTR ) + if ( child != nullptr ) { // signal PruneEvent (node plus all children are removed) TreeIteratorBase< TTreeType > *childIterator = Clone(); @@ -279,7 +279,7 @@ template< typename TTreeType > int TreeIteratorBase< TTreeType >::CountChildren() const { - if ( m_Position == ITK_NULLPTR ) + if ( m_Position == nullptr ) { return -1; } @@ -291,7 +291,7 @@ template< typename TTreeType > bool TreeIteratorBase< TTreeType >::HasParent() const { - return ( m_Position != ITK_NULLPTR && m_Position->GetParent() != ITK_NULLPTR ); + return ( m_Position != nullptr && m_Position->GetParent() != nullptr ); } /** Disconnect the tree */ @@ -299,7 +299,7 @@ template< typename TTreeType > bool TreeIteratorBase< TTreeType >::Disconnect() { - if ( m_Position == ITK_NULLPTR ) + if ( m_Position == nullptr ) { return false; } @@ -327,7 +327,7 @@ TreeIteratorBase< TTreeType >::Disconnect() m_Tree->InvokeEvent( TreeRemoveEvent< TTreeType >(*this) ); - m_Position = ITK_NULLPTR; + m_Position = nullptr; return true; } @@ -339,7 +339,7 @@ TreeIteratorBase< TTreeType >::Children() itkGenericOutputMacro("Not implemented yet"); ::itk::ExceptionObject e_(__FILE__, __LINE__, "Not implemented yet", ITK_LOCATION); throw e_; /* Explicit naming to work around Intel compiler bug. */ - return ITK_NULLPTR; + return nullptr; } /** Return the first parent found */ @@ -347,9 +347,9 @@ template< typename TTreeType > const typename TreeIteratorBase< TTreeType >::TreeNodeType * TreeIteratorBase< TTreeType >::GetParent() const { - if ( m_Position == ITK_NULLPTR ) + if ( m_Position == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return m_Position->GetParent(); @@ -362,21 +362,21 @@ TreeIteratorBase< TTreeType > *TreeIteratorBase< TTreeType >::Parents() itkGenericOutputMacro("Not implemented yet"); ::itk::ExceptionObject e_(__FILE__, __LINE__, "Not implemented yet", ITK_LOCATION); throw e_; /* Explicit naming to work around Intel compiler bug. */ - return ITK_NULLPTR; + return nullptr; } /** Go to a child */ template< typename TTreeType > bool TreeIteratorBase< TTreeType >::GoToChild(ChildIdentifier number) { - if ( m_Position == ITK_NULLPTR ) + if ( m_Position == nullptr ) { return false; } TreeNodeType *next = dynamic_cast< TreeNodeType * >( m_Position->GetChild(number) ); - if ( next == ITK_NULLPTR ) + if ( next == nullptr ) { return false; } @@ -388,7 +388,7 @@ bool TreeIteratorBase< TTreeType >::GoToChild(ChildIdentifier number) template< typename TTreeType > bool TreeIteratorBase< TTreeType >::GoToParent() { - if ( m_Position == ITK_NULLPTR ) + if ( m_Position == nullptr ) { return false; } @@ -408,18 +408,18 @@ TreeIteratorBase< TTreeType > *TreeIteratorBase< TTreeType >::GetChild(int numbe { if ( !m_Position ) { - return ITK_NULLPTR; + return nullptr; } TreeNodeType *child = dynamic_cast< TreeNodeType * >( m_Position->GetChild(number) ); if ( !child ) { - return ITK_NULLPTR; + return nullptr; } // return new WalkTreeIterator( child, m_Root, m_Tree, getType() // ); - return ITK_NULLPTR; + return nullptr; } /** Count the number of nodes from the beginning */ @@ -477,7 +477,7 @@ template< typename TTreeType > bool TreeIteratorBase< TTreeType >::Remove() { - if ( m_Position == ITK_NULLPTR ) + if ( m_Position == nullptr ) { return false; } @@ -493,13 +493,13 @@ TreeIteratorBase< TTreeType >::Remove() } else if ( m_Root == m_Position ) { - m_Root = ITK_NULLPTR; - m_Tree->SetRoot( (TreeNodeType *)ITK_NULLPTR ); - // this won't do anything if root is already != ITK_NULLPTR ==> root cannot be + m_Root = nullptr; + m_Tree->SetRoot( (TreeNodeType *)nullptr ); + // this won't do anything if root is already != nullptr ==> root cannot be // removed } - m_Position->SetParent(ITK_NULLPTR); // we don't have a parent anymore + m_Position->SetParent(nullptr); // we don't have a parent anymore m_Tree->InvokeEvent( TreePruneEvent< TTreeType >(*this) ); while ( m_Position->CountChildren() > 0 ) // remove all children { @@ -508,8 +508,8 @@ TreeIteratorBase< TTreeType >::Remove() m_Position->Remove(child); } - position = ITK_NULLPTR; - m_Position = ITK_NULLPTR; // Smart pointer, deletes *m_Position + position = nullptr; + m_Position = nullptr; // Smart pointer, deletes *m_Position m_Tree->Modified(); diff --git a/Modules/Core/Common/include/itkTreeIteratorClone.h b/Modules/Core/Common/include/itkTreeIteratorClone.h index d275657d609..ad945ee90c7 100644 --- a/Modules/Core/Common/include/itkTreeIteratorClone.h +++ b/Modules/Core/Common/include/itkTreeIteratorClone.h @@ -43,8 +43,8 @@ class TreeIteratorClone /** Copy constructor */ TreeIteratorClone (const TreeIteratorClone< ObjectType > & p) { - m_Pointer = ITK_NULLPTR; - if ( p.m_Pointer != ITK_NULLPTR ) + m_Pointer = nullptr; + if ( p.m_Pointer != nullptr ) { m_Pointer = p.m_Pointer->Clone(); } @@ -54,7 +54,7 @@ class TreeIteratorClone TreeIteratorClone (ObjectType *p) { m_Pointer = 0; - if ( p != ITK_NULLPTR ) + if ( p != nullptr ) { m_Pointer = p->Clone(); } @@ -63,7 +63,7 @@ class TreeIteratorClone /** Constructor to reference p */ TreeIteratorClone (const ObjectType & p) { - m_Pointer = ITK_NULLPTR; + m_Pointer = nullptr; m_Pointer = const_cast< ObjectType * >( &p )->Clone(); } @@ -71,7 +71,7 @@ class TreeIteratorClone ~TreeIteratorClone () { delete m_Pointer; - m_Pointer = ITK_NULLPTR; + m_Pointer = nullptr; } /** Overload operator -> */ @@ -112,8 +112,8 @@ class TreeIteratorClone if ( m_Pointer != r ) { delete m_Pointer; - m_Pointer = ITK_NULLPTR; - if ( r != ITK_NULLPTR ) + m_Pointer = nullptr; + if ( r != nullptr ) { m_Pointer = const_cast< ObjectType * >( r )->Clone(); } diff --git a/Modules/Core/Common/include/itkTreeNode.h b/Modules/Core/Common/include/itkTreeNode.h index f906b24947e..6e784433c7b 100644 --- a/Modules/Core/Common/include/itkTreeNode.h +++ b/Modules/Core/Common/include/itkTreeNode.h @@ -86,7 +86,7 @@ class ITK_TEMPLATE_EXPORT TreeNode:public Object bool Remove(Self *n); /** Get the number of children given a name and depth */ - ChildIdentifier GetNumberOfChildren(unsigned int depth = 0, char *name = ITK_NULLPTR) const; + ChildIdentifier GetNumberOfChildren(unsigned int depth = 0, char *name = nullptr) const; /** Replace a given child by a new one */ bool ReplaceChild(Self *oldChild, Self *newChild); @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT TreeNode:public Object /** Get the children list */ #if !defined( ITK_WRAPPING_PARSER ) - virtual ChildrenListType * GetChildren(unsigned int depth = 0, char *name = ITK_NULLPTR) const; + virtual ChildrenListType * GetChildren(unsigned int depth = 0, char *name = nullptr) const; #endif @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT TreeNode:public Object protected: TreeNode(); - virtual ~TreeNode() ITK_OVERRIDE; + ~TreeNode() override; TValue m_Data; Self *m_Parent; diff --git a/Modules/Core/Common/include/itkTreeNode.hxx b/Modules/Core/Common/include/itkTreeNode.hxx index f0451fe7a0c..39cb3afc382 100644 --- a/Modules/Core/Common/include/itkTreeNode.hxx +++ b/Modules/Core/Common/include/itkTreeNode.hxx @@ -27,7 +27,7 @@ namespace itk /** Constructor */ template< typename TValue > TreeNode< TValue > -::TreeNode():m_Parent(ITK_NULLPTR) +::TreeNode():m_Parent(nullptr) {} /** Destructor */ @@ -44,10 +44,10 @@ TreeNode< TValue > for ( ChildIdentifier i = numberOfChildren; i > 0; i-- ) { - m_Children[i - 1]->SetParent(ITK_NULLPTR); + m_Children[i - 1]->SetParent(nullptr); } m_Children.clear(); - m_Parent = ITK_NULLPTR; + m_Parent = nullptr; m_Data = 0; } @@ -74,7 +74,7 @@ TreeNode< TValue > } else { - return ITK_NULLPTR; + return nullptr; } } @@ -117,7 +117,7 @@ TreeNode< TValue > //keep ourself alive just a bit longer Pointer ourself = this; - if ( m_Parent != ITK_NULLPTR ) + if ( m_Parent != nullptr ) { m_Parent->Remove(this); } @@ -155,7 +155,7 @@ TreeNode< TValue > //keep node alive just a bit longer Pointer position = n; m_Children.erase(pos); - n->SetParent(ITK_NULLPTR); + n->SetParent(nullptr); return true; } return false; @@ -242,7 +242,7 @@ TreeNode< TValue > m_Children.resize(childId); for ( ChildIdentifier i = numberOfChildren; i <= childId; i++ ) { - m_Children[i] = ITK_NULLPTR; + m_Children[i] = nullptr; } m_Children[number] = node; return; @@ -263,7 +263,7 @@ TreeNode< TValue > ChildIdentifier cnt = 0; while ( it != itEnd ) { - if ( name == ITK_NULLPTR || strstr(typeid( **it ).name(), name) ) + if ( name == nullptr || strstr(typeid( **it ).name(), name) ) { ++cnt; } @@ -300,7 +300,7 @@ TreeNode< TValue > while ( childrenListIt != childrenListEnd ) { - if ( name == ITK_NULLPTR || strstr(typeid( **childrenListIt ).name(), name) ) + if ( name == nullptr || strstr(typeid( **childrenListIt ).name(), name) ) { children->push_back(*childrenListIt); } diff --git a/Modules/Core/Common/include/itkTriangleCell.h b/Modules/Core/Common/include/itkTriangleCell.h index dbeee18987c..c0329bca4b4 100644 --- a/Modules/Core/Common/include/itkTriangleCell.h +++ b/Modules/Core/Common/include/itkTriangleCell.h @@ -68,31 +68,31 @@ class ITK_TEMPLATE_EXPORT TriangleCell: itkStaticConstMacro(CellDimension, unsigned int, 2); /** Implement the standard CellInterface. */ - virtual CellGeometry GetType(void) const ITK_OVERRIDE + CellGeometry GetType(void) const override { return Superclass::TRIANGLE_CELL; } - virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE; + void MakeCopy(CellAutoPointer &) const override; - virtual unsigned int GetDimension(void) const ITK_OVERRIDE; + unsigned int GetDimension(void) const override; - virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE; + unsigned int GetNumberOfPoints(void) const override; - virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE; + CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override; - virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, - CellAutoPointer &) ITK_OVERRIDE; - virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE; + bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, + CellAutoPointer &) override; + void SetPointIds(PointIdConstIterator first) override; - virtual void SetPointIds(PointIdConstIterator first, - PointIdConstIterator last) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first, + PointIdConstIterator last) override; - virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE; - virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE; + void SetPointId(int localId, PointIdentifier) override; + PointIdIterator PointIdsBegin(void) override; - virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsBegin(void) const override; - virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE; + PointIdIterator PointIdsEnd(void) override; - virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsEnd(void) const override; /** Triangle-specific interface. */ virtual CellFeatureCount GetNumberOfVertices() const; @@ -102,12 +102,12 @@ class ITK_TEMPLATE_EXPORT TriangleCell: virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &); virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &); - virtual bool EvaluatePosition(CoordRepType *, + bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, - InterpolationWeightType *) ITK_OVERRIDE; + InterpolationWeightType *) override; /** Cell visitor interface. */ itkCellVisitMacro(Superclass::TRIANGLE_CELL); @@ -126,7 +126,7 @@ class ITK_TEMPLATE_EXPORT TriangleCell: TriangleCell(): m_PointIds( NumberOfPoints, NumericTraits< PointIdentifier >::max() ) {} - ~TriangleCell() ITK_OVERRIDE {} + ~TriangleCell() override {} protected: /** Store the number of points needed for a triangle. */ diff --git a/Modules/Core/Common/include/itkUnaryCorrespondenceMatrix.h b/Modules/Core/Common/include/itkUnaryCorrespondenceMatrix.h index 5c5537cf08c..b0e1922229d 100644 --- a/Modules/Core/Common/include/itkUnaryCorrespondenceMatrix.h +++ b/Modules/Core/Common/include/itkUnaryCorrespondenceMatrix.h @@ -55,7 +55,7 @@ class ITK_TEMPLATE_EXPORT UnaryCorrespondenceMatrix:public DataObject, public vn UnaryCorrespondenceMatrix(); /** Default Destructor. */ - ~UnaryCorrespondenceMatrix() {} + ~UnaryCorrespondenceMatrix() override {} }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkUnaryFunctorImageFilter.h b/Modules/Core/Common/include/itkUnaryFunctorImageFilter.h index 84eba195065..9f05cb6461c 100644 --- a/Modules/Core/Common/include/itkUnaryFunctorImageFilter.h +++ b/Modules/Core/Common/include/itkUnaryFunctorImageFilter.h @@ -98,7 +98,7 @@ class ITK_TEMPLATE_EXPORT UnaryFunctorImageFilter:public InPlaceImageFilter< TIn protected: UnaryFunctorImageFilter(); - virtual ~UnaryFunctorImageFilter() ITK_OVERRIDE {} + ~UnaryFunctorImageFilter() override {} /** UnaryFunctorImageFilter can produce an image which is a different * resolution than its input image. As such, UnaryFunctorImageFilter @@ -108,7 +108,7 @@ class ITK_TEMPLATE_EXPORT UnaryFunctorImageFilter:public InPlaceImageFilter< TIn * below. * * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** UnaryFunctorImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() routine @@ -121,7 +121,7 @@ class ITK_TEMPLATE_EXPORT UnaryFunctorImageFilter:public InPlaceImageFilter< TIn * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(UnaryFunctorImageFilter); diff --git a/Modules/Core/Common/include/itkValarrayImageContainer.h b/Modules/Core/Common/include/itkValarrayImageContainer.h index 1505201271e..218d70741bb 100644 --- a/Modules/Core/Common/include/itkValarrayImageContainer.h +++ b/Modules/Core/Common/include/itkValarrayImageContainer.h @@ -106,7 +106,7 @@ class ITK_TEMPLATE_EXPORT ValarrayImageContainer: } else { - return ITK_NULLPTR; + return nullptr; } } @@ -139,7 +139,7 @@ class ITK_TEMPLATE_EXPORT ValarrayImageContainer: /** PrintSelf routine. Normally this is a protected internal method. It is * made public here so that Image can call this method. Users should not * call this method but should call Print() instead. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Object::PrintSelf(os, indent); // Print out the pointer to bulk data memory. We use const_cast<> to diff --git a/Modules/Core/Common/include/itkVariableLengthVector.h b/Modules/Core/Common/include/itkVariableLengthVector.h index 0f6bb47518e..50c2d676b0e 100644 --- a/Modules/Core/Common/include/itkVariableLengthVector.h +++ b/Modules/Core/Common/include/itkVariableLengthVector.h @@ -265,7 +265,7 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector { itkAssertInDebugAndIgnoreInReleaseMacro(newBuffer); const std::size_t nb = std::min(newSize, oldSize); - itkAssertInDebugAndIgnoreInReleaseMacro(nb == 0 || (nb > 0 && oldBuffer != ITK_NULLPTR)); + itkAssertInDebugAndIgnoreInReleaseMacro(nb == 0 || (nb > 0 && oldBuffer != nullptr)); std::copy(oldBuffer, oldBuffer+nb, newBuffer); } }; @@ -390,7 +390,7 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector if (m_NumElements != 0) { m_Data = this->AllocateElements(m_NumElements); - itkAssertInDebugAndIgnoreInReleaseMacro(m_Data != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(m_Data != nullptr); for ( ElementIdentifier i = 0; i < m_NumElements; ++i ) { this->m_Data[i] = static_cast< ValueType >( v[i] ); @@ -398,7 +398,7 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector } else { - m_Data = ITK_NULLPTR; + m_Data = nullptr; } } diff --git a/Modules/Core/Common/include/itkVariableLengthVector.hxx b/Modules/Core/Common/include/itkVariableLengthVector.hxx index bb4b7845682..c152a58b3ac 100644 --- a/Modules/Core/Common/include/itkVariableLengthVector.hxx +++ b/Modules/Core/Common/include/itkVariableLengthVector.hxx @@ -32,7 +32,7 @@ namespace itk template< typename TValue > VariableLengthVector< TValue > ::VariableLengthVector():m_LetArrayManageMemory(true), - m_Data(ITK_NULLPTR), + m_Data(nullptr), m_NumElements(0) {} @@ -40,11 +40,11 @@ VariableLengthVector< TValue > template< typename TValue > VariableLengthVector< TValue > ::VariableLengthVector(unsigned int length): - m_Data(ITK_NULLPTR) + m_Data(nullptr) { Reserve(length); // postcondition(s) - itkAssertInDebugAndIgnoreInReleaseMacro(m_Data != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(m_Data != nullptr); } /** Constructor with user specified data */ @@ -77,13 +77,13 @@ VariableLengthVector< TValue > if (m_NumElements != 0) { m_Data = this->AllocateElements(m_NumElements); - itkAssertInDebugAndIgnoreInReleaseMacro(m_Data != ITK_NULLPTR); - itkAssertInDebugAndIgnoreInReleaseMacro(v.m_Data != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(m_Data != nullptr); + itkAssertInDebugAndIgnoreInReleaseMacro(v.m_Data != nullptr); std::copy(&v.m_Data[0], &v.m_Data[m_NumElements], &this->m_Data[0]); } else { - m_Data = ITK_NULLPTR; + m_Data = nullptr; } } @@ -96,7 +96,7 @@ VariableLengthVector< TValue > , m_NumElements (v.m_NumElements) { v.m_LetArrayManageMemory = true; - v.m_Data = ITK_NULLPTR; + v.m_Data = nullptr; v.m_NumElements = 0; } @@ -137,7 +137,7 @@ VariableLengthVector< TValue > // NB: It's not necessary to always reset v. The choice made is to avoid a // test v.m_LetArrayManageMemory = true; - v.m_Data = ITK_NULLPTR; + v.m_Data = nullptr; v.m_NumElements = 0; return *this; @@ -154,7 +154,7 @@ VariableLengthVector< TValue > m_LetArrayManageMemory = true; m_Data = this->AllocateElements(m_NumElements); // allocate Elements post-condition - itkAssertInDebugAndIgnoreInReleaseMacro(m_Data != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(m_Data != nullptr); for ( ElementIdentifier i = 0; i < m_NumElements; ++i ) { this->m_Data[i] = static_cast(rhs[i]); @@ -199,7 +199,7 @@ void VariableLengthVector< TValue > { TValue *temp = this->AllocateElements(size); itkAssertInDebugAndIgnoreInReleaseMacro(temp); - itkAssertInDebugAndIgnoreInReleaseMacro(m_NumElements == 0 || (m_NumElements>0 && m_Data != ITK_NULLPTR)); + itkAssertInDebugAndIgnoreInReleaseMacro(m_NumElements == 0 || (m_NumElements>0 && m_Data != nullptr)); // only copy the portion of the data used in the old buffer std::copy(m_Data, m_Data+m_NumElements, @@ -219,7 +219,7 @@ void VariableLengthVector< TValue > m_NumElements = size; m_LetArrayManageMemory = true; } - itkAssertInDebugAndIgnoreInReleaseMacro(m_Data != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(m_Data != nullptr); } /** Allocate memory of certain size and return it */ @@ -297,7 +297,7 @@ void VariableLengthVector< TValue > delete[] m_Data; } - m_Data = ITK_NULLPTR; + m_Data = nullptr; m_NumElements = 0; } @@ -317,7 +317,7 @@ void VariableLengthVector< TValue > { TValue * temp = this->AllocateElements(sz); // may throw itkAssertInDebugAndIgnoreInReleaseMacro(temp); - itkAssertInDebugAndIgnoreInReleaseMacro(m_NumElements == 0 || (m_NumElements > 0 && m_Data != ITK_NULLPTR)); + itkAssertInDebugAndIgnoreInReleaseMacro(m_NumElements == 0 || (m_NumElements > 0 && m_Data != nullptr)); keepValues(sz, m_NumElements, m_Data, temp); // possible leak if TValue copy may throw // commit changes if (m_LetArrayManageMemory) @@ -335,7 +335,7 @@ template< typename TValue > void VariableLengthVector< TValue > ::Fill(TValue const & v) { - itkAssertInDebugAndIgnoreInReleaseMacro(m_NumElements == 0 || (m_NumElements>0 && m_Data!=ITK_NULLPTR)); + itkAssertInDebugAndIgnoreInReleaseMacro(m_NumElements == 0 || (m_NumElements>0 && m_Data!=nullptr)); // VC++ version of std::fill_n() expects the output iterator to be valid // instead of expecting the range [OutIt, OutIt+n) to be valid. std::fill(&this->m_Data[0], &this->m_Data[m_NumElements], v); @@ -357,8 +357,8 @@ VariableLengthVector< TValue > // VC++ version of std::copy expects the input range to be valid, and the // output iterator as well (as it's a pointer, it's expected non null) // Hence the manual loop instead - itkAssertInDebugAndIgnoreInReleaseMacro(N==0 || this->m_Data != ITK_NULLPTR); - itkAssertInDebugAndIgnoreInReleaseMacro(N==0 || v.m_Data != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(N==0 || this->m_Data != nullptr); + itkAssertInDebugAndIgnoreInReleaseMacro(N==0 || v.m_Data != nullptr); for (ElementIdentifier i=0; i!=N; ++i) { this->m_Data[i] = v.m_Data[i]; @@ -380,8 +380,8 @@ VariableLengthVector< TValue > itkAssertInDebugAndIgnoreInReleaseMacro(N > 0); itkAssertInDebugAndIgnoreInReleaseMacro(N == this->Size()); // Redundant precondition checks - itkAssertInDebugAndIgnoreInReleaseMacro(v.m_Data != ITK_NULLPTR); - itkAssertInDebugAndIgnoreInReleaseMacro(this->m_Data != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(v.m_Data != nullptr); + itkAssertInDebugAndIgnoreInReleaseMacro(this->m_Data != nullptr); std::copy(&v.m_Data[0], &v.m_Data[N], &this->m_Data[0]); diff --git a/Modules/Core/Common/include/itkVectorContainer.h b/Modules/Core/Common/include/itkVectorContainer.h index 72293c4ce89..7acaa77695f 100644 --- a/Modules/Core/Common/include/itkVectorContainer.h +++ b/Modules/Core/Common/include/itkVectorContainer.h @@ -315,7 +315,7 @@ class ITK_TEMPLATE_EXPORT VectorContainer: /** * Check if the given index is in range of the vector. If it is not, return - * false. Otherwise, set the element through the pointer (if it isn't ITK_NULLPTR), + * false. Otherwise, set the element through the pointer (if it isn't nullptr), * and return true. */ bool GetElementIfIndexExists(ElementIdentifier, Element *) const; diff --git a/Modules/Core/Common/include/itkVectorContainer.hxx b/Modules/Core/Common/include/itkVectorContainer.hxx index a3fe162a688..e3407fa4e90 100644 --- a/Modules/Core/Common/include/itkVectorContainer.hxx +++ b/Modules/Core/Common/include/itkVectorContainer.hxx @@ -135,7 +135,7 @@ VectorContainer< TElementIdentifier, TElement > /** * Check if the given index is in range of the STL vector. If it is not, * return false. Otherwise, set the element through the pointer (if it isn't - * ITK_NULLPTR), and return true. + * nullptr), and return true. */ template< typename TElementIdentifier, typename TElement > bool diff --git a/Modules/Core/Common/include/itkVectorImage.h b/Modules/Core/Common/include/itkVectorImage.h index a88bcd85e6a..f29e2b16ec5 100644 --- a/Modules/Core/Common/include/itkVectorImage.h +++ b/Modules/Core/Common/include/itkVectorImage.h @@ -198,11 +198,11 @@ class ITK_TEMPLATE_EXPORT VectorImage: /** Allocate the image memory. The size of the image must * already be set, e.g. by calling SetRegions(). */ - virtual void Allocate(bool UseDefaultConstructor = false) ITK_OVERRIDE; + void Allocate(bool UseDefaultConstructor = false) override; /** Restore the data object to its initial state. This means releasing * memory. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Fill the image buffer with a value. Be sure to call Allocate() * first. */ @@ -276,11 +276,11 @@ class ITK_TEMPLATE_EXPORT VectorImage: * the image iterator class. */ InternalPixelType * GetBufferPointer() { - return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR; + return m_Buffer ? m_Buffer->GetBufferPointer() : nullptr; } const InternalPixelType * GetBufferPointer() const { - return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR; + return m_Buffer ? m_Buffer->GetBufferPointer() : nullptr; } /** Return a pointer to the container. */ @@ -328,16 +328,16 @@ class ITK_TEMPLATE_EXPORT VectorImage: itkGetConstReferenceMacro(VectorLength, VectorLengthType); /** Get/Set the number of components each pixel has, ie the VectorLength */ - virtual unsigned int GetNumberOfComponentsPerPixel() const ITK_OVERRIDE; + unsigned int GetNumberOfComponentsPerPixel() const override; - virtual void SetNumberOfComponentsPerPixel(unsigned int n) ITK_OVERRIDE; + void SetNumberOfComponentsPerPixel(unsigned int n) override; protected: VectorImage(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual ~VectorImage() ITK_OVERRIDE {} - virtual void Graft(const DataObject *data) ITK_OVERRIDE; + ~VectorImage() override {} + void Graft(const DataObject *data) override; using Superclass::Graft; private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorImage); diff --git a/Modules/Core/Common/include/itkVectorImage.hxx b/Modules/Core/Common/include/itkVectorImage.hxx index 4aae4ead246..4cc4d426bbd 100644 --- a/Modules/Core/Common/include/itkVectorImage.hxx +++ b/Modules/Core/Common/include/itkVectorImage.hxx @@ -117,7 +117,7 @@ void VectorImage< TPixel, VImageDimension > ::Graft(const Self *image) { - if(image == ITK_NULLPTR) + if(image == nullptr) { return; } @@ -136,14 +136,14 @@ void VectorImage< TPixel, VImageDimension > ::Graft(const DataObject *data) { - if(data == ITK_NULLPTR) + if(data == nullptr) { return; } // Attempt to cast data to an Image const Self *imgData = dynamic_cast< const Self * >( data ); - if( imgData == ITK_NULLPTR ) + if( imgData == nullptr ) { // pointer could not be cast back down itkExceptionMacro( << "itk::VectorImage::Graft() cannot cast " diff --git a/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h b/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h index c7ee19b4aa3..d7b8d5bb26e 100644 --- a/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h +++ b/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h @@ -54,9 +54,9 @@ class VectorImageNeighborhoodAccessorFunctor *ImageBoundaryConditionConstPointerType; VectorImageNeighborhoodAccessorFunctor(VectorLengthType length): - m_VectorLength(length), m_OffsetMultiplier(length - 1), m_Begin(ITK_NULLPTR) {} + m_VectorLength(length), m_OffsetMultiplier(length - 1), m_Begin(nullptr) {} VectorImageNeighborhoodAccessorFunctor(): - m_VectorLength(0), m_OffsetMultiplier(0), m_Begin(ITK_NULLPTR) {} + m_VectorLength(0), m_OffsetMultiplier(0), m_Begin(nullptr) {} /** Set the pointer index to the start of the buffer. * This must be set by the iterators to the starting location of the buffer. diff --git a/Modules/Core/Common/include/itkVersion.h b/Modules/Core/Common/include/itkVersion.h index 5a3810de2f4..af626d50b44 100644 --- a/Modules/Core/Common/include/itkVersion.h +++ b/Modules/Core/Common/include/itkVersion.h @@ -86,7 +86,7 @@ class ITKCommon_EXPORT Version:public Object protected: Version(); - ~Version() ITK_OVERRIDE; + ~Version() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Version); diff --git a/Modules/Core/Common/include/itkVersor.h b/Modules/Core/Common/include/itkVersor.h index a1b9f043ff1..3d157b6cba3 100644 --- a/Modules/Core/Common/include/itkVersor.h +++ b/Modules/Core/Common/include/itkVersor.h @@ -271,7 +271,7 @@ class ITK_TEMPLATE_EXPORT Versor } static inline ValueType Epsilon() { - return Epsilon((ValueType *)ITK_NULLPTR); + return Epsilon((ValueType *)nullptr); } /** Component parallel to x axis. */ diff --git a/Modules/Core/Common/include/itkVertexCell.h b/Modules/Core/Common/include/itkVertexCell.h index b1f108b95b2..7656fcf8919 100644 --- a/Modules/Core/Common/include/itkVertexCell.h +++ b/Modules/Core/Common/include/itkVertexCell.h @@ -51,31 +51,31 @@ class ITK_TEMPLATE_EXPORT VertexCell:public TCellInterface itkStaticConstMacro(CellDimension, unsigned int, 0); /** Implement the standard CellInterface. */ - virtual CellGeometry GetType(void) const ITK_OVERRIDE + CellGeometry GetType(void) const override { return Superclass::VERTEX_CELL; } - virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE; + void MakeCopy(CellAutoPointer &) const override; - virtual unsigned int GetDimension(void) const ITK_OVERRIDE; + unsigned int GetDimension(void) const override; - virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE; + unsigned int GetNumberOfPoints(void) const override; - virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE; + CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override; - virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, - CellAutoPointer &) ITK_OVERRIDE; - virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE; + bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, + CellAutoPointer &) override; + void SetPointIds(PointIdConstIterator first) override; - virtual void SetPointIds(PointIdConstIterator first, - PointIdConstIterator last) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first, + PointIdConstIterator last) override; - virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE; - virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE; + void SetPointId(int localId, PointIdentifier) override; + PointIdIterator PointIdsBegin(void) override; - virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsBegin(void) const override; - virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE; + PointIdIterator PointIdsEnd(void) override; - virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE; + PointIdConstIterator PointIdsEnd(void) const override; /** Vertex-specific interface. */ virtual void SetPointId(PointIdentifier); @@ -85,12 +85,12 @@ class ITK_TEMPLATE_EXPORT VertexCell:public TCellInterface itkCellVisitMacro(Superclass::VERTEX_CELL); /** Evaluate the position of a given point */ - virtual bool EvaluatePosition(CoordRepType *, + bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, - InterpolationWeightType *) ITK_OVERRIDE; + InterpolationWeightType *) override; public: VertexCell() @@ -101,7 +101,7 @@ class ITK_TEMPLATE_EXPORT VertexCell:public TCellInterface } } - ~VertexCell() ITK_OVERRIDE {} + ~VertexCell() override {} protected: /** diff --git a/Modules/Core/Common/include/itkWeakPointer.h b/Modules/Core/Common/include/itkWeakPointer.h index 8b48edf05c7..342d060743b 100644 --- a/Modules/Core/Common/include/itkWeakPointer.h +++ b/Modules/Core/Common/include/itkWeakPointer.h @@ -49,7 +49,7 @@ class WeakPointer /** Constructor. */ WeakPointer () - { m_Pointer = ITK_NULLPTR; } + { m_Pointer = nullptr; } /** Copy constructor. */ WeakPointer (const WeakPointer< ObjectType > & p):m_Pointer(p.m_Pointer) {} @@ -59,7 +59,7 @@ class WeakPointer /** Destructor. */ ~WeakPointer () - { m_Pointer = ITK_NULLPTR; } + { m_Pointer = nullptr; } /** Overload operator ->. */ ObjectType * operator->() const @@ -88,11 +88,11 @@ class WeakPointer /** Test if the pointer is not NULL. */ bool IsNotNull() const - { return m_Pointer != ITK_NULLPTR; } + { return m_Pointer != nullptr; } /** Test if the pointer is NULL. */ bool IsNull() const - { return m_Pointer == ITK_NULLPTR; } + { return m_Pointer == nullptr; } /** Comparison of pointers. Less than comparison. */ bool operator<(const WeakPointer & r) const diff --git a/Modules/Core/Common/include/itkXMLFileOutputWindow.h b/Modules/Core/Common/include/itkXMLFileOutputWindow.h index cb1878dd454..2f0df983878 100644 --- a/Modules/Core/Common/include/itkXMLFileOutputWindow.h +++ b/Modules/Core/Common/include/itkXMLFileOutputWindow.h @@ -62,27 +62,27 @@ class ITKCommon_EXPORT XMLFileOutputWindow:public FileOutputWindow itkTypeMacro(XMLFileOutputWindow, FileOutputWindow); /** Send a string to the XML file. */ - virtual void DisplayText(const char *) ITK_OVERRIDE; + void DisplayText(const char *) override; /** Send an error string to the XML file. */ - virtual void DisplayErrorText(const char *) ITK_OVERRIDE; + void DisplayErrorText(const char *) override; /** Send a warning string to the XML file. */ - virtual void DisplayWarningText(const char *) ITK_OVERRIDE; + void DisplayWarningText(const char *) override; /** Send a generic output string to the XML file. */ - virtual void DisplayGenericOutputText(const char *) ITK_OVERRIDE; + void DisplayGenericOutputText(const char *) override; /** Send a debug string to the XML file. */ - virtual void DisplayDebugText(const char *) ITK_OVERRIDE; + void DisplayDebugText(const char *) override; /** Put the text into the log file without processing it. */ virtual void DisplayTag(const char *); protected: XMLFileOutputWindow(); - virtual ~XMLFileOutputWindow() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~XMLFileOutputWindow() override; + void PrintSelf(std::ostream & os, Indent indent) const override; void Initialize(); diff --git a/Modules/Core/Common/include/itkXMLFilterWatcher.h b/Modules/Core/Common/include/itkXMLFilterWatcher.h index 44e38f673db..c7c6c24236b 100644 --- a/Modules/Core/Common/include/itkXMLFilterWatcher.h +++ b/Modules/Core/Common/include/itkXMLFilterWatcher.h @@ -38,13 +38,13 @@ class ITKCommon_EXPORT XMLFilterWatcher protected: /** Callback method to show the ProgressEvent */ - virtual void ShowProgress(); + void ShowProgress() override; /** Callback method to show the StartEvent */ - virtual void StartFilter(); + void StartFilter() override; /** Callback method to show the EndEvent */ - virtual void EndFilter(); + void EndFilter() override; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.h b/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.h index 7b3cab686a9..7171503c2a6 100644 --- a/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.h +++ b/Modules/Core/Common/include/itkZeroFluxNeumannBoundaryCondition.h @@ -83,24 +83,24 @@ class ITK_TEMPLATE_EXPORT ZeroFluxNeumannBoundaryCondition: ZeroFluxNeumannBoundaryCondition() {} /** Runtime information support. */ - virtual const char * GetNameOfClass() const + const char * GetNameOfClass() const override { return "itkZeroFluxNeumannBoundaryCondition"; } /** Computes and returns a neighborhood of appropriate values from * neighborhood iterator data.. */ - virtual OutputPixelType operator()(const OffsetType & point_index, + OutputPixelType operator()(const OffsetType & point_index, const OffsetType & boundary_offset, - const NeighborhoodType *data) const; + const NeighborhoodType *data) const override; /** Computes and returns the appropriate pixel value from * neighborhood iterator data, using the functor. */ - virtual OutputPixelType operator()( + OutputPixelType operator()( const OffsetType & point_index, const OffsetType & boundary_offset, const NeighborhoodType *data, - const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const; + const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const override; /** Determines the necessary input region for the output region. * For this boundary condition, only the intersection of the largest @@ -113,8 +113,8 @@ class ITK_TEMPLATE_EXPORT ZeroFluxNeumannBoundaryCondition: * \return The necessary input region required to determine the * pixel values in the outputRequestedRegion. */ - virtual RegionType GetInputRequestedRegion( const RegionType & inputLargestPossibleRegion, - const RegionType & outputRequestedRegion ) const; + RegionType GetInputRequestedRegion( const RegionType & inputLargestPossibleRegion, + const RegionType & outputRequestedRegion ) const override; /** Returns a value for a given pixel at an index. If the index is inside the * bounds of the input image, then the pixel value is obtained from @@ -123,7 +123,7 @@ class ITK_TEMPLATE_EXPORT ZeroFluxNeumannBoundaryCondition: * \param index The index of the desired pixel. * \param image The image from which pixel values should be determined. */ - OutputPixelType GetPixel( const IndexType & index, const TInputImage * image ) const; + OutputPixelType GetPixel( const IndexType & index, const TInputImage * image ) const override; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itk_compiler_detection.h b/Modules/Core/Common/include/itk_compiler_detection.h deleted file mode 100644 index 8fb60090a65..00000000000 --- a/Modules/Core/Common/include/itk_compiler_detection.h +++ /dev/null @@ -1,309 +0,0 @@ -/*========================================================================= - * - * Copyright Insight Software Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0.txt - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - *=========================================================================*/ -// This is a generated file. Do not edit! - -#ifndef itk_compiler_detection_h -#define itk_compiler_detection_h - -#define ITK_DEC(X) (X) -#define ITK_HEX(X) ( \ - ((X)>>28 & 0xF) * 10000000 + \ - ((X)>>24 & 0xF) * 1000000 + \ - ((X)>>20 & 0xF) * 100000 + \ - ((X)>>16 & 0xF) * 10000 + \ - ((X)>>12 & 0xF) * 1000 + \ - ((X)>>8 & 0xF) * 100 + \ - ((X)>>4 & 0xF) * 10 + \ - ((X) & 0xF) \ - ) - -#ifdef __cplusplus -# define ITK_COMPILER_IS_Comeau 0 -# define ITK_COMPILER_IS_Intel 0 -# define ITK_COMPILER_IS_PathScale 0 -# define ITK_COMPILER_IS_Embarcadero 0 -# define ITK_COMPILER_IS_Borland 0 -# define ITK_COMPILER_IS_Watcom 0 -# define ITK_COMPILER_IS_OpenWatcom 0 -# define ITK_COMPILER_IS_SunPro 0 -# define ITK_COMPILER_IS_HP 0 -# define ITK_COMPILER_IS_Compaq 0 -# define ITK_COMPILER_IS_zOS 0 -# define ITK_COMPILER_IS_XL 0 -# define ITK_COMPILER_IS_VisualAge 0 -# define ITK_COMPILER_IS_PGI 0 -# define ITK_COMPILER_IS_Cray 0 -# define ITK_COMPILER_IS_TI 0 -# define ITK_COMPILER_IS_Fujitsu 0 -# define ITK_COMPILER_IS_SCO 0 -# define ITK_COMPILER_IS_AppleClang 0 -# define ITK_COMPILER_IS_Clang 0 -# define ITK_COMPILER_IS_GNU 0 -# define ITK_COMPILER_IS_MSVC 0 -# define ITK_COMPILER_IS_ADSP 0 -# define ITK_COMPILER_IS_IAR 0 -# define ITK_COMPILER_IS_ARMCC 0 -# define ITK_COMPILER_IS_MIPSpro 0 - -#if defined(__COMO__) -# undef ITK_COMPILER_IS_Comeau -# define ITK_COMPILER_IS_Comeau 1 - -#elif defined(__INTEL_COMPILER) || defined(__ICC) -# undef ITK_COMPILER_IS_Intel -# define ITK_COMPILER_IS_Intel 1 - -#elif defined(__PATHCC__) -# undef ITK_COMPILER_IS_PathScale -# define ITK_COMPILER_IS_PathScale 1 - -#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) -# undef ITK_COMPILER_IS_Embarcadero -# define ITK_COMPILER_IS_Embarcadero 1 - -#elif defined(__BORLANDC__) -# undef ITK_COMPILER_IS_Borland -# define ITK_COMPILER_IS_Borland 1 - -#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 -# undef ITK_COMPILER_IS_Watcom -# define ITK_COMPILER_IS_Watcom 1 - -#elif defined(__WATCOMC__) -# undef ITK_COMPILER_IS_OpenWatcom -# define ITK_COMPILER_IS_OpenWatcom 1 - -#elif defined(__SUNPRO_CC) -# undef ITK_COMPILER_IS_SunPro -# define ITK_COMPILER_IS_SunPro 1 - -#elif defined(__HP_aCC) -# undef ITK_COMPILER_IS_HP -# define ITK_COMPILER_IS_HP 1 - -#elif defined(__DECCXX) -# undef ITK_COMPILER_IS_Compaq -# define ITK_COMPILER_IS_Compaq 1 - -#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) -# undef ITK_COMPILER_IS_zOS -# define ITK_COMPILER_IS_zOS 1 - -#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 -# undef ITK_COMPILER_IS_XL -# define ITK_COMPILER_IS_XL 1 - -#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 -# undef ITK_COMPILER_IS_VisualAge -# define ITK_COMPILER_IS_VisualAge 1 - -#elif defined(__PGI) -# undef ITK_COMPILER_IS_PGI -# define ITK_COMPILER_IS_PGI 1 - -#elif defined(_CRAYC) -# undef ITK_COMPILER_IS_Cray -# define ITK_COMPILER_IS_Cray 1 - -#elif defined(__TI_COMPILER_VERSION__) -# undef ITK_COMPILER_IS_TI -# define ITK_COMPILER_IS_TI 1 - -#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) -# undef ITK_COMPILER_IS_Fujitsu -# define ITK_COMPILER_IS_Fujitsu 1 - -#elif defined(__SCO_VERSION__) -# undef ITK_COMPILER_IS_SCO -# define ITK_COMPILER_IS_SCO 1 - -#elif defined(__clang__) && defined(__apple_build_version__) -# undef ITK_COMPILER_IS_AppleClang -# define ITK_COMPILER_IS_AppleClang 1 - -#elif defined(__clang__) -# undef ITK_COMPILER_IS_Clang -# define ITK_COMPILER_IS_Clang 1 - -#elif defined(__GNUC__) -# undef ITK_COMPILER_IS_GNU -# define ITK_COMPILER_IS_GNU 1 - -#elif defined(_MSC_VER) -# undef ITK_COMPILER_IS_MSVC -# define ITK_COMPILER_IS_MSVC 1 - -#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) -# undef ITK_COMPILER_IS_ADSP -# define ITK_COMPILER_IS_ADSP 1 - -#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) -# undef ITK_COMPILER_IS_IAR -# define ITK_COMPILER_IS_IAR 1 - -#elif defined(__ARMCC_VERSION) -# undef ITK_COMPILER_IS_ARMCC -# define ITK_COMPILER_IS_ARMCC 1 - -#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) -# undef ITK_COMPILER_IS_MIPSpro -# define ITK_COMPILER_IS_MIPSpro 1 - - -#endif - -# if ITK_COMPILER_IS_AppleClang - -# include "compilers/ITK_COMPILER_INFO_AppleClang_CXX.h" - -# elif ITK_COMPILER_IS_Clang - -# include "compilers/ITK_COMPILER_INFO_Clang_CXX.h" - -# elif ITK_COMPILER_IS_GNU && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 404) //Default to UNKWOWN compiler if < 4.4 - -# include "compilers/ITK_COMPILER_INFO_GNU_CXX.h" - -# elif ITK_COMPILER_IS_MSVC && (_MSC_VER >= 1600) //Default to UNKOWN compiler if < 1600 - -# include "compilers/ITK_COMPILER_INFO_MSVC_CXX.h" - -# elif ITK_COMPILER_IS_SunPro - -# include "compilers/ITK_COMPILER_INFO_SunPro_CXX.h" - -# elif ITK_COMPILER_IS_Intel - -# include "compilers/ITK_COMPILER_INFO_Intel_CXX.h" - -# else -//NOTE: The follow 4 lines are not autogenerated with WriteCompilerDetectionHeader -// Do default behavior of all or nothing# error Unsupported compiler -// #warning "compiler not recognized, using all or nothing C++11 support guess" -# include "compilers/ITK_COMPILER_INFO_UNKNOWN_CXX.h" -# endif - -# if ITK_COMPILER_CXX_ALIGNAS -# define ITK_ALIGNAS(X) alignas(X) -# elif ITK_COMPILER_IS_GNU || ITK_COMPILER_IS_Clang || ITK_COMPILER_IS_AppleClang -# define ITK_ALIGNAS(X) __attribute__ ((__aligned__(X))) -# elif ITK_COMPILER_IS_MSVC -# define ITK_ALIGNAS(X) __declspec(align(X)) -# else -# define ITK_ALIGNAS(X) -# endif - - -# if ITK_COMPILER_CXX_ALIGNOF -# define ITK_ALIGNOF(X) alignof(X) -# elif ITK_COMPILER_IS_GNU || ITK_COMPILER_IS_Clang || ITK_COMPILER_IS_AppleClang -# define ITK_ALIGNOF(X) __alignof__(X) -# elif ITK_COMPILER_IS_MSVC -# define ITK_ALIGNOF(X) __alignof(X) -# endif - - -# ifndef ITK_DEPRECATED -# if ITK_COMPILER_CXX_ATTRIBUTE_DEPRECATED -# define ITK_DEPRECATED [[deprecated]] -# define ITK_DEPRECATED_MSG(MSG) [[deprecated(MSG)]] -# elif ITK_COMPILER_IS_GNU || ITK_COMPILER_IS_Clang -# define ITK_DEPRECATED __attribute__((__deprecated__)) -# define ITK_DEPRECATED_MSG(MSG) __attribute__((__deprecated__(MSG))) -# elif ITK_COMPILER_IS_MSVC -# define ITK_DEPRECATED __declspec(deprecated) -# define ITK_DEPRECATED_MSG(MSG) __declspec(deprecated(MSG)) -# else -# define ITK_DEPRECATED -# define ITK_DEPRECATED_MSG(MSG) -# endif -# endif - - -# if ITK_COMPILER_CXX_CONSTEXPR -# define ITK_CONSTEXPR constexpr -# else -# define ITK_CONSTEXPR -# endif - - -# if ITK_COMPILER_CXX_DELETED_FUNCTIONS -# define ITK_DELETED_FUNCTION = delete -# else -# define ITK_DELETED_FUNCTION -# endif - - -# if ITK_COMPILER_CXX_EXTERN_TEMPLATES -# define ITK_EXTERN_TEMPLATE extern -# else -# define ITK_EXTERN_TEMPLATE -# endif - - -# if ITK_COMPILER_CXX_FINAL -# define ITK_FINAL final -# else -# define ITK_FINAL -# endif - - -# if ITK_COMPILER_CXX_NOEXCEPT -# define ITK_NOEXCEPT noexcept -# else -# define ITK_NOEXCEPT throw() -# endif - - -# if ITK_COMPILER_CXX_NULLPTR -# define ITK_NULLPTR nullptr -# else -# define ITK_NULLPTR 0 -# endif - - -# if ITK_COMPILER_CXX_OVERRIDE -# define ITK_OVERRIDE override -# else -# define ITK_OVERRIDE -# endif - -# if ITK_COMPILER_CXX_STATIC_ASSERT -# define ITK_STATIC_ASSERT(X) static_assert(X, #X) -# define ITK_STATIC_ASSERT_MSG(X, MSG) static_assert(X, MSG) -# else -template struct ITKStaticAssert; -template<> struct ITKStaticAssert{}; -# define ITK_STATIC_ASSERT(X) sizeof(ITKStaticAssert) -# define ITK_STATIC_ASSERT_MSG(X, MSG) sizeof(ITKStaticAssert) -# endif - - -# if ITK_COMPILER_CXX_THREAD_LOCAL -# define ITK_THREAD_LOCAL thread_local -# elif ITK_COMPILER_IS_GNU || ITK_COMPILER_IS_Clang || ITK_COMPILER_IS_AppleClang -# define ITK_THREAD_LOCAL __thread -# elif ITK_COMPILER_IS_MSVC -# define ITK_THREAD_LOCAL __declspec(thread) -# else -// ITK_THREAD_LOCAL not defined for this configuration. -# endif - -#endif - -#endif // itk_compiler_detection_h diff --git a/Modules/Core/Common/src/itkCommand.cxx b/Modules/Core/Common/src/itkCommand.cxx index 76679ccdcdc..33bb76e2548 100644 --- a/Modules/Core/Common/src/itkCommand.cxx +++ b/Modules/Core/Common/src/itkCommand.cxx @@ -26,10 +26,10 @@ namespace itk {} CStyleCommand::CStyleCommand() : - m_ClientData( ITK_NULLPTR ), - m_Callback( ITK_NULLPTR ), - m_ConstCallback( ITK_NULLPTR ), - m_ClientDataDeleteCallback( ITK_NULLPTR ) + m_ClientData( nullptr ), + m_Callback( nullptr ), + m_ConstCallback( nullptr ), + m_ClientDataDeleteCallback( nullptr ) {} CStyleCommand::~CStyleCommand() diff --git a/Modules/Core/Common/src/itkConditionVariablePThreads.cxx b/Modules/Core/Common/src/itkConditionVariablePThreads.cxx index de0bd7ea4e0..704cc43c4f4 100644 --- a/Modules/Core/Common/src/itkConditionVariablePThreads.cxx +++ b/Modules/Core/Common/src/itkConditionVariablePThreads.cxx @@ -21,7 +21,7 @@ namespace itk { ConditionVariable::ConditionVariable() { - pthread_cond_init(&m_ConditionVariable.m_ConditionVariable, ITK_NULLPTR); + pthread_cond_init(&m_ConditionVariable.m_ConditionVariable, nullptr); } ConditionVariable::~ConditionVariable() diff --git a/Modules/Core/Common/src/itkConditionVariableWinThreads.cxx b/Modules/Core/Common/src/itkConditionVariableWinThreads.cxx index d5a40103294..dcde58a9759 100644 --- a/Modules/Core/Common/src/itkConditionVariableWinThreads.cxx +++ b/Modules/Core/Common/src/itkConditionVariableWinThreads.cxx @@ -23,15 +23,15 @@ ConditionVariable::ConditionVariable() { m_ConditionVariable.m_NumberOfWaiters = 0; m_ConditionVariable.m_WasBroadcast = 0; - m_ConditionVariable.m_Semaphore = CreateSemaphore(ITK_NULLPTR, // no security + m_ConditionVariable.m_Semaphore = CreateSemaphore(nullptr, // no security 0, // initial value 0x7fffffff, // max count - ITK_NULLPTR); // unnamed + nullptr); // unnamed InitializeCriticalSection(&m_ConditionVariable.m_NumberOfWaitersLock); - m_ConditionVariable.m_WaitersAreDone = CreateEvent(ITK_NULLPTR, // no security + m_ConditionVariable.m_WaitersAreDone = CreateEvent(nullptr, // no security FALSE, // auto-reset FALSE, // non-signaled initially - ITK_NULLPTR); // unnamed + nullptr); // unnamed } ConditionVariable::~ConditionVariable() diff --git a/Modules/Core/Common/src/itkDataObject.cxx b/Modules/Core/Common/src/itkDataObject.cxx index 95f2f87cd72..dcf0bb40c83 100644 --- a/Modules/Core/Common/src/itkDataObject.cxx +++ b/Modules/Core/Common/src/itkDataObject.cxx @@ -34,17 +34,17 @@ bool DataObject:: m_GlobalReleaseDataFlag = false; DataObjectError ::DataObjectError(): - ExceptionObject(), m_DataObject(ITK_NULLPTR) + ExceptionObject(), m_DataObject(nullptr) {} DataObjectError ::DataObjectError(const char *file, unsigned int lineNumber): - ExceptionObject(file, lineNumber), m_DataObject(ITK_NULLPTR) + ExceptionObject(file, lineNumber), m_DataObject(nullptr) {} DataObjectError ::DataObjectError(const std::string & file, unsigned int lineNumber): - ExceptionObject(file, lineNumber), m_DataObject(ITK_NULLPTR) + ExceptionObject(file, lineNumber), m_DataObject(nullptr) {} DataObjectError @@ -133,7 +133,7 @@ ::PrintSelf(std::ostream & os, Indent indent) const //---------------------------------------------------------------------------- DataObject::DataObject():m_UpdateMTime() { - m_Source = ITK_NULLPTR; + m_Source = nullptr; m_SourceOutputName = ""; m_ReleaseDataFlag = false; @@ -208,7 +208,7 @@ ::DisconnectPipeline() // disconnect ourselves from the current process object if ( m_Source ) { - m_Source->SetOutput(m_SourceOutputName, ITK_NULLPTR); + m_Source->SetOutput(m_SourceOutputName, nullptr); } // set our release data flag to off by default (purposely done after @@ -231,7 +231,7 @@ ::DisconnectSource(ProcessObject *arg, const DataObjectIdentifierType & name) itkDebugMacro("disconnecting source " << arg << ", source output name " << name); - m_Source = ITK_NULLPTR; + m_Source = nullptr; m_SourceOutputName = ""; this->Modified(); return true; diff --git a/Modules/Core/Common/src/itkExceptionObject.cxx b/Modules/Core/Common/src/itkExceptionObject.cxx index a12d07c56f3..b8263214246 100644 --- a/Modules/Core/Common/src/itkExceptionObject.cxx +++ b/Modules/Core/Common/src/itkExceptionObject.cxx @@ -94,14 +94,14 @@ class ExceptionObject::ReferenceCountedExceptionData:public ExceptionData, publi /** Increase the reference count (mark as used by another object). * Delegates the counting to its LightObject superclass */ - virtual void Register() const ITK_OVERRIDE + void Register() const override { this->LightObject::Register(); } /** Decrease the reference count (release by another object). * Delegates the counting to its LightObject superclass */ - virtual void UnRegister() const ITK_NOEXCEPT ITK_OVERRIDE + void UnRegister() const ITK_NOEXCEPT override { this->LightObject::UnRegister(); } @@ -118,7 +118,7 @@ class ExceptionObject::ReferenceCountedExceptionData:public ExceptionData, publi // Destructor. Only invoked via LightObject::UnRegister(), when its reference // count drops to zero. - ~ReferenceCountedExceptionData() ITK_OVERRIDE {} + ~ReferenceCountedExceptionData() override {} ITK_DISALLOW_COPY_AND_ASSIGN(ReferenceCountedExceptionData); }; @@ -133,8 +133,8 @@ ExceptionObject::ExceptionObject( unsigned int lineNumber, const char *desc, const char *loc): - m_ExceptionData( ReferenceCountedExceptionData::ConstNew(file == ITK_NULLPTR ? "":file, lineNumber, desc == ITK_NULLPTR ? "":desc, loc == - ITK_NULLPTR ? "":loc) ) + m_ExceptionData( ReferenceCountedExceptionData::ConstNew(file == nullptr ? "":file, lineNumber, desc == nullptr ? "":desc, loc == + nullptr ? "":loc) ) {} ExceptionObject::ExceptionObject( @@ -210,7 +210,7 @@ ExceptionObject::operator==(const ExceptionObject & orig) } else { - return ( thisData != ITK_NULLPTR ) && ( origData != ITK_NULLPTR ) + return ( thisData != nullptr ) && ( origData != nullptr ) && thisData->m_Location == origData->m_Location && thisData->m_Description == origData->m_Description && thisData->m_File == origData->m_File diff --git a/Modules/Core/Common/src/itkFileOutputWindow.cxx b/Modules/Core/Common/src/itkFileOutputWindow.cxx index 9576d84325e..cf40a05a7c3 100644 --- a/Modules/Core/Common/src/itkFileOutputWindow.cxx +++ b/Modules/Core/Common/src/itkFileOutputWindow.cxx @@ -27,7 +27,7 @@ ::FileOutputWindow() { m_Flush = false; m_Append = false; - m_Stream = ITK_NULLPTR; + m_Stream = nullptr; m_FileName = ""; } @@ -35,7 +35,7 @@ FileOutputWindow ::~FileOutputWindow() { delete m_Stream; - m_Stream = ITK_NULLPTR; + m_Stream = nullptr; } void diff --git a/Modules/Core/Common/src/itkFloatingPointExceptions.cxx b/Modules/Core/Common/src/itkFloatingPointExceptions.cxx index 9a781db5c93..11712063a6d 100644 --- a/Modules/Core/Common/src/itkFloatingPointExceptions.cxx +++ b/Modules/Core/Common/src/itkFloatingPointExceptions.cxx @@ -506,7 +506,7 @@ ::Enable() act.sa_sigaction = fhdl; sigemptyset(&act.sa_mask); act.sa_flags = SA_SIGINFO; - sigaction(SIGFPE,&act,ITK_NULLPTR); + sigaction(SIGFPE,&act,nullptr); FloatingPointExceptions::m_Enabled = true; } void diff --git a/Modules/Core/Common/src/itkLightObject.cxx b/Modules/Core/Common/src/itkLightObject.cxx index 3d4779ac3af..8ee1459ae12 100644 --- a/Modules/Core/Common/src/itkLightObject.cxx +++ b/Modules/Core/Common/src/itkLightObject.cxx @@ -48,7 +48,7 @@ LightObject::New() Pointer smartPtr; LightObject *rawPtr = ::itk::ObjectFactory< LightObject >::Create(); - if ( rawPtr == ITK_NULLPTR ) + if ( rawPtr == nullptr ) { rawPtr = new LightObject; } @@ -218,7 +218,7 @@ ::PrintSelf(std::ostream & os, Indent indent) const #ifdef GCC_USEDEMANGLE char const *mangledName = typeid( *this ).name(); int status; - char * unmangled = abi::__cxa_demangle(mangledName, ITK_NULLPTR, ITK_NULLPTR, &status); + char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); os << indent << "RTTI typeinfo: "; diff --git a/Modules/Core/Common/src/itkLoggerManager.cxx b/Modules/Core/Common/src/itkLoggerManager.cxx index a848c74cbcf..64e2ad6634d 100644 --- a/Modules/Core/Common/src/itkLoggerManager.cxx +++ b/Modules/Core/Common/src/itkLoggerManager.cxx @@ -61,7 +61,7 @@ LoggerManager::GetLogger(const NameType & name) if ( loggerItr == this->m_LoggerSet.end() ) { - return ITK_NULLPTR; + return nullptr; } return loggerItr->second.GetPointer(); } diff --git a/Modules/Core/Common/src/itkMemoryUsageObserver.cxx b/Modules/Core/Common/src/itkMemoryUsageObserver.cxx index c036599c093..f35be74a65b 100644 --- a/Modules/Core/Common/src/itkMemoryUsageObserver.cxx +++ b/Modules/Core/Common/src/itkMemoryUsageObserver.cxx @@ -50,7 +50,7 @@ #ifdef __APPLE__ #include #include -#include +#include #include #endif @@ -191,7 +191,7 @@ WindowsMemoryUsageObserver::GetMemoryUsage() | PROCESS_VM_READ, FALSE, pid); - if ( ITK_NULLPTR == hProcess ) + if ( nullptr == hProcess ) { // Can't determine memory usage. return 0; @@ -369,12 +369,12 @@ SunSolarisMemoryUsageObserver::GetMemoryUsage() MemoryLoadType mem = 0; int pid = getpid(); - FILE * fp = ITK_NULLPTR; + FILE * fp = nullptr; std::stringstream command; command << "pmap " << pid << std::endl; - if ( ( fp = popen(command.str().c_str(), "r") ) == ITK_NULLPTR ) + if ( ( fp = popen(command.str().c_str(), "r") ) == nullptr ) { itkGenericExceptionMacro(<< "Error using pmap. Can execute pmap command"); } @@ -396,7 +396,7 @@ SunSolarisMemoryUsageObserver::GetMemoryUsage() { break; } - if ( fgets(remaining, 256, fp) != ITK_NULLPTR ) + if ( fgets(remaining, 256, fp) != nullptr ) { mapping = remaining; if ( mapping.find("[ heap ]", 0) != std::string::npos ) diff --git a/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx b/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx index 889fb16a439..86d95d02137 100644 --- a/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx +++ b/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx @@ -24,7 +24,7 @@ namespace Statistics { // Static/Global variables -MersenneTwisterRandomVariateGenerator::Pointer MersenneTwisterRandomVariateGenerator::m_StaticInstance = ITK_NULLPTR; +MersenneTwisterRandomVariateGenerator::Pointer MersenneTwisterRandomVariateGenerator::m_StaticInstance = nullptr; SimpleFastMutexLock MersenneTwisterRandomVariateGenerator::m_StaticInstanceLock; MersenneTwisterRandomVariateGenerator::IntegerType MersenneTwisterRandomVariateGenerator::m_StaticDiffer = 0; diff --git a/Modules/Core/Common/src/itkMetaDataDictionary.cxx b/Modules/Core/Common/src/itkMetaDataDictionary.cxx index 1a3b7a6f60f..7314cfee674 100644 --- a/Modules/Core/Common/src/itkMetaDataDictionary.cxx +++ b/Modules/Core/Common/src/itkMetaDataDictionary.cxx @@ -29,7 +29,7 @@ MetaDataDictionary ::~MetaDataDictionary() { delete m_Dictionary; - m_Dictionary = ITK_NULLPTR; + m_Dictionary = nullptr; } MetaDataDictionary diff --git a/Modules/Core/Common/src/itkMultiThreader.cxx b/Modules/Core/Common/src/itkMultiThreader.cxx index 9e3fab39f9e..ce8184d1e20 100644 --- a/Modules/Core/Common/src/itkMultiThreader.cxx +++ b/Modules/Core/Common/src/itkMultiThreader.cxx @@ -173,19 +173,19 @@ MultiThreader::MultiThreader() : for( ThreadIdType i = 0; i < ITK_MAX_THREADS; ++i ) { m_ThreadInfoArray[i].ThreadID = i; - m_ThreadInfoArray[i].ActiveFlag = ITK_NULLPTR; - m_ThreadInfoArray[i].ActiveFlagLock = ITK_NULLPTR; + m_ThreadInfoArray[i].ActiveFlag = nullptr; + m_ThreadInfoArray[i].ActiveFlagLock = nullptr; - m_MultipleMethod[i] = ITK_NULLPTR; - m_MultipleData[i] = ITK_NULLPTR; + m_MultipleMethod[i] = nullptr; + m_MultipleData[i] = nullptr; m_SpawnedThreadActiveFlag[i] = 0; - m_SpawnedThreadActiveFlagLock[i] = ITK_NULLPTR; + m_SpawnedThreadActiveFlagLock[i] = nullptr; m_SpawnedThreadInfoArray[i].ThreadID = i; } - m_SingleMethod = ITK_NULLPTR; - m_SingleData = ITK_NULLPTR; + m_SingleMethod = nullptr; + m_SingleData = nullptr; if (m_UseThreadPool) { ThreadIdType idleCount = std::max(1u, @@ -247,7 +247,7 @@ void MultiThreader::SingleMethodExecute() // checked in the WaitForSingleMethodThread loops for( thread_loop = 1; thread_loop < m_NumberOfThreads; ++thread_loop ) { - process_id[thread_loop] = 0; + process_id[thread_loop] = ITK_THREAD_RETURN_VALUE; } // Spawn a set of threads through the SingleMethodProxy. Exceptions diff --git a/Modules/Core/Common/src/itkMultiThreaderPThreads.cxx b/Modules/Core/Common/src/itkMultiThreaderPThreads.cxx index 122ba3964a1..f1b1a40dd9d 100644 --- a/Modules/Core/Common/src/itkMultiThreaderPThreads.cxx +++ b/Modules/Core/Common/src/itkMultiThreaderPThreads.cxx @@ -55,7 +55,7 @@ void MultiThreader::MultipleMethodExecute() } for( ThreadIdType thread_loop = 0; thread_loop < m_NumberOfThreads; ++thread_loop ) { - if( m_MultipleMethod[thread_loop] == (ThreadFunctionType)ITK_NULLPTR ) + if( m_MultipleMethod[thread_loop] == (ThreadFunctionType)nullptr ) { itkExceptionMacro(<< "No multiple method set for: " << thread_loop); return; @@ -103,7 +103,7 @@ void MultiThreader::MultipleMethodExecute() // waits for each of the other processes to exit for( ThreadIdType thread_loop = 1; thread_loop < m_NumberOfThreads; ++thread_loop ) { - pthread_join(process_id[thread_loop], ITK_NULLPTR); + pthread_join(process_id[thread_loop], nullptr); } } @@ -171,10 +171,10 @@ void MultiThreader::TerminateThread(ThreadIdType ThreadID) m_SpawnedThreadActiveFlag[ThreadID] = 0; m_SpawnedThreadActiveFlagLock[ThreadID]->Unlock(); - pthread_join(m_SpawnedThreadProcessID[ThreadID], ITK_NULLPTR); + pthread_join(m_SpawnedThreadProcessID[ThreadID], nullptr); - m_SpawnedThreadActiveFlagLock[ThreadID] = ITK_NULLPTR; - m_SpawnedThreadActiveFlagLock[ThreadID] = ITK_NULLPTR; + m_SpawnedThreadActiveFlagLock[ThreadID] = nullptr; + m_SpawnedThreadActiveFlagLock[ThreadID] = nullptr; } void @@ -182,7 +182,7 @@ MultiThreader ::SpawnWaitForSingleMethodThread(ThreadProcessIdType threadHandle) { // Using POSIX threads - if ( pthread_join(threadHandle, ITK_NULLPTR) ) + if ( pthread_join(threadHandle, nullptr) ) { itkExceptionMacro(<< "Unable to join thread."); } diff --git a/Modules/Core/Common/src/itkMultiThreaderWinThreads.cxx b/Modules/Core/Common/src/itkMultiThreaderWinThreads.cxx index de6e5c06edd..46dceac5dfa 100644 --- a/Modules/Core/Common/src/itkMultiThreaderWinThreads.cxx +++ b/Modules/Core/Common/src/itkMultiThreaderWinThreads.cxx @@ -77,7 +77,7 @@ void MultiThreader::MultipleMethodExecute() &m_ThreadInfoArray[threadCount], 0, (unsigned int *)&threadId); - if( processId[threadCount] == ITK_NULLPTR ) + if( processId[threadCount] == nullptr ) { itkExceptionMacro("Error in thread creation!"); } @@ -183,7 +183,7 @@ ::SpawnDispatchSingleMethodThread(MultiThreader::ThreadInfoStruct *threadInfo) HANDLE threadHandle = (HANDLE)_beginthreadex(0, 0, this->SingleMethodProxy, threadInfo, 0, (unsigned int *)&threadId); - if ( threadHandle == ITK_NULLPTR ) + if ( threadHandle == nullptr ) { itkExceptionMacro("Error in thread creation !!!"); } diff --git a/Modules/Core/Common/src/itkMutexLockPThreads.cxx b/Modules/Core/Common/src/itkMutexLockPThreads.cxx index c07c71457f7..115757fad76 100644 --- a/Modules/Core/Common/src/itkMutexLockPThreads.cxx +++ b/Modules/Core/Common/src/itkMutexLockPThreads.cxx @@ -32,7 +32,7 @@ namespace itk // Construct a new MutexLock SimpleMutexLock::SimpleMutexLock() { - pthread_mutex_init(&m_MutexLock, ITK_NULLPTR); + pthread_mutex_init(&m_MutexLock, nullptr); } // Destruct the MutexVariable diff --git a/Modules/Core/Common/src/itkMutexLockWinThreads.cxx b/Modules/Core/Common/src/itkMutexLockWinThreads.cxx index 66da7513c76..b8bf7741d09 100644 --- a/Modules/Core/Common/src/itkMutexLockWinThreads.cxx +++ b/Modules/Core/Common/src/itkMutexLockWinThreads.cxx @@ -33,7 +33,7 @@ namespace itk // Construct a new MutexLock SimpleMutexLock::SimpleMutexLock() { - m_MutexLock = CreateMutex(ITK_NULLPTR, FALSE, ITK_NULLPTR); + m_MutexLock = CreateMutex(nullptr, FALSE, nullptr); } // Destruct the MutexVariable diff --git a/Modules/Core/Common/src/itkObject.cxx b/Modules/Core/Common/src/itkObject.cxx index ca48f694bc1..f7088beacfa 100644 --- a/Modules/Core/Common/src/itkObject.cxx +++ b/Modules/Core/Common/src/itkObject.cxx @@ -248,7 +248,7 @@ SubjectImplementation::GetCommand(unsigned long tag) return ( *i )->m_Command; } } - return ITK_NULLPTR; + return nullptr; } bool @@ -295,7 +295,7 @@ Object::New() Pointer smartPtr; Object *rawPtr = ::itk::ObjectFactory< Object >::Create(); - if ( rawPtr == ITK_NULLPTR ) + if ( rawPtr == nullptr ) { rawPtr = new Object; } @@ -526,7 +526,7 @@ ::GetCommand(unsigned long tag) { return this->m_SubjectImplementation->GetCommand(tag); } - return ITK_NULLPTR; + return nullptr; } void @@ -599,8 +599,8 @@ Object ::Object(): LightObject(), m_Debug(false), - m_SubjectImplementation(ITK_NULLPTR), - m_MetaDataDictionary(ITK_NULLPTR), + m_SubjectImplementation(nullptr), + m_MetaDataDictionary(nullptr), m_ObjectName() { this->Modified(); @@ -638,7 +638,7 @@ MetaDataDictionary & Object ::GetMetaDataDictionary(void) { - if ( m_MetaDataDictionary == ITK_NULLPTR ) + if ( m_MetaDataDictionary == nullptr ) { m_MetaDataDictionary = new MetaDataDictionary; } @@ -649,7 +649,7 @@ const MetaDataDictionary & Object ::GetMetaDataDictionary(void) const { - if ( m_MetaDataDictionary == ITK_NULLPTR ) + if ( m_MetaDataDictionary == nullptr ) { m_MetaDataDictionary = new MetaDataDictionary; } @@ -660,7 +660,7 @@ void Object ::SetMetaDataDictionary(const MetaDataDictionary & rhs) { - if ( m_MetaDataDictionary == ITK_NULLPTR ) + if ( m_MetaDataDictionary == nullptr ) { m_MetaDataDictionary = new MetaDataDictionary; } diff --git a/Modules/Core/Common/src/itkObjectFactoryBase.cxx b/Modules/Core/Common/src/itkObjectFactoryBase.cxx index 430af69bff0..56e7e73bbcb 100644 --- a/Modules/Core/Common/src/itkObjectFactoryBase.cxx +++ b/Modules/Core/Common/src/itkObjectFactoryBase.cxx @@ -32,7 +32,7 @@ #endif #include "itkDirectory.h" #include "itkVersion.h" -#include +#include #include @@ -83,10 +83,10 @@ class ObjectFactoryBasePrivateInitializer (*i)->UnRegister(); } delete m_ObjectFactoryBasePrivate->m_InternalFactories; - m_ObjectFactoryBasePrivate->m_InternalFactories = ITK_NULLPTR; + m_ObjectFactoryBasePrivate->m_InternalFactories = nullptr; } delete m_ObjectFactoryBasePrivate; - m_ObjectFactoryBasePrivate = ITK_NULLPTR; + m_ObjectFactoryBasePrivate = nullptr; } /** Create the GlobalTimeStamp if needed and return it. */ @@ -251,7 +251,7 @@ ::CreateInstance(const char *itkclassname) return newobject; } } - return ITK_NULLPTR; + return nullptr; } std::list< LightObject::Pointer > @@ -574,7 +574,7 @@ ::ReHash() */ ObjectFactoryBase::ObjectFactoryBase() { - m_LibraryHandle = ITK_NULLPTR; + m_LibraryHandle = nullptr; m_LibraryDate = 0; m_OverrideMap = new OverRideMap; } @@ -600,7 +600,7 @@ ::RegisterFactoryInternal(ObjectFactoryBase *factory) { ObjectFactoryBasePrivate * factoryBase = GetObjectFactoryBase(); - if ( factory->m_LibraryHandle != ITK_NULLPTR ) + if ( factory->m_LibraryHandle != nullptr ) { itkGenericExceptionMacro( "A dynamic factory tried to be loaded internally!" ); } @@ -627,7 +627,7 @@ ::RegisterFactory(ObjectFactoryBase *factory, InsertionPositionType where, size_ { ObjectFactoryBasePrivate * factoryBase = GetObjectFactoryBase(); - if ( factory->m_LibraryHandle == ITK_NULLPTR ) + if ( factory->m_LibraryHandle == nullptr ) { const char nonDynamicName[] = "Non-Dynamicaly loaded factory"; factory->m_LibraryPath = nonDynamicName; @@ -829,7 +829,7 @@ ::UnRegisterAllFactories() } #endif delete factoryBase->m_RegisteredFactories; - factoryBase->m_RegisteredFactories = ITK_NULLPTR; + factoryBase->m_RegisteredFactories = nullptr; factoryBase->m_Initialized = false; } } @@ -870,7 +870,7 @@ ::CreateObject(const char *itkclassname) return ( *i ).second.m_CreateObject->CreateObject(); } } - return ITK_NULLPTR; + return nullptr; } std::list< LightObject::Pointer > @@ -956,7 +956,7 @@ ObjectFactoryBasePrivate * ObjectFactoryBase ::GetObjectFactoryBase() { - if( m_ObjectFactoryBasePrivate == ITK_NULLPTR ) + if( m_ObjectFactoryBasePrivate == nullptr ) { m_ObjectFactoryBasePrivate = ObjectFactoryBasePrivateInitializer::GetObjectFactoryBasePrivate(); } @@ -990,7 +990,7 @@ std::list< ObjectFactoryBase * > ObjectFactoryBase ::GetRegisteredFactories() { - if( m_ObjectFactoryBasePrivate == ITK_NULLPTR ) + if( m_ObjectFactoryBasePrivate == nullptr ) { GetObjectFactoryBase(); } diff --git a/Modules/Core/Common/src/itkOctreeNode.cxx b/Modules/Core/Common/src/itkOctreeNode.cxx index 64f3392f19d..dff45545e9e 100644 --- a/Modules/Core/Common/src/itkOctreeNode.cxx +++ b/Modules/Core/Common/src/itkOctreeNode.cxx @@ -27,8 +27,8 @@ namespace itk */ OctreeNode::OctreeNode(void) { - m_Parent = ITK_NULLPTR; - m_Branch = ITK_NULLPTR; + m_Parent = nullptr; + m_Branch = nullptr; } OctreeNode::~OctreeNode(void) @@ -48,7 +48,7 @@ OctreeNode & OctreeNode::GetChild(const enum LeafIdentifier ChildID) long int OctreeNode::GetColor(void) const { - if ( m_Parent != ITK_NULLPTR ) + if ( m_Parent != nullptr ) { const long int x = m_Branch - m_Parent->GetColorTable(); @@ -65,7 +65,7 @@ long int OctreeNode::GetColor(void) const void OctreeNode::SetColor(int color) { - if ( m_Parent != ITK_NULLPTR ) + if ( m_Parent != nullptr ) { this->RemoveChildren(); m_Branch = const_cast< OctreeNodeBranch * >( m_Parent->GetColorTable() ) + color; @@ -85,7 +85,7 @@ void OctreeNode::SetBranch(OctreeNodeBranch *NewBranch) */ bool OctreeNode::IsNodeColored(void) const { - if ( m_Parent != ITK_NULLPTR ) + if ( m_Parent != nullptr ) { const OctreeNodeBranch *colorTable = m_Parent->GetColorTable(); const OctreeNodeBranch *first = &( colorTable[0] ); @@ -104,13 +104,13 @@ void OctreeNode::RemoveChildren(void) if ( !this->IsNodeColored() ) { delete m_Branch; - if ( m_Parent != ITK_NULLPTR ) + if ( m_Parent != nullptr ) { m_Branch = &( const_cast< OctreeNodeBranch * >( m_Parent->GetColorTable() )[0] ); } else { - m_Branch = ITK_NULLPTR; + m_Branch = nullptr; } } } diff --git a/Modules/Core/Common/src/itkOutputWindow.cxx b/Modules/Core/Common/src/itkOutputWindow.cxx index 6e59fc8d0fb..c5b5a309617 100644 --- a/Modules/Core/Common/src/itkOutputWindow.cxx +++ b/Modules/Core/Common/src/itkOutputWindow.cxx @@ -34,7 +34,7 @@ namespace itk { -OutputWindow::Pointer OutputWindow:: m_Instance = ITK_NULLPTR; +OutputWindow::Pointer OutputWindow:: m_Instance = nullptr; /** * Prompting off by default diff --git a/Modules/Core/Common/src/itkProcessObject.cxx b/Modules/Core/Common/src/itkProcessObject.cxx index a688d92012e..5465d87a518 100644 --- a/Modules/Core/Common/src/itkProcessObject.cxx +++ b/Modules/Core/Common/src/itkProcessObject.cxx @@ -28,7 +28,7 @@ #include "itkProcessObject.h" #include "itkMutexLockHolder.h" -#include +#include #include #include @@ -134,7 +134,7 @@ ProcessObject // let the output know we no longer want to associate with the object it->second->DisconnectSource(this, it->first); // let go of our reference to the data object - it->second = ITK_NULLPTR; + it->second = nullptr; } } } @@ -166,7 +166,7 @@ ::SetNumberOfIndexedInputs(DataObjectPointerArraySizeType num) if (num < 1 ) { - m_IndexedInputs[0]->second = ITK_NULLPTR; + m_IndexedInputs[0]->second = nullptr; } } else @@ -234,7 +234,7 @@ ::RemoveInput(const DataObjectIdentifierType & key) // if primary or required set to null if ( key == m_IndexedInputs[0]->first || this->IsRequiredInputName(key) ) { - this->SetInput(key, ITK_NULLPTR); + this->SetInput(key, nullptr); return; } @@ -243,7 +243,7 @@ ::RemoveInput(const DataObjectIdentifierType & key) { if ( m_IndexedInputs[i]->first == key ) { - this->SetNthInput(i, ITK_NULLPTR); + this->SetNthInput(i, nullptr); if ( i == m_IndexedInputs.size() - 1 ) { // remove the last indexed input @@ -387,7 +387,7 @@ ::RemoveOutput(const DataObjectIdentifierType & key) // if primary or required set to null if ( key == m_IndexedOutputs[0]->first ) { - this->SetOutput( key, ITK_NULLPTR ); + this->SetOutput( key, nullptr ); return; } @@ -396,7 +396,7 @@ ::RemoveOutput(const DataObjectIdentifierType & key) { if ( m_IndexedOutputs[i]->first == key ) { - this->SetNthOutput(i, ITK_NULLPTR); + this->SetNthOutput(i, nullptr); if ( i == m_IndexedOutputs.size() - 1 ) { // remove the last indexed input @@ -553,7 +553,7 @@ ::SetNumberOfIndexedOutputs(DataObjectPointerArraySizeType num) for( DataObjectPointerArraySizeType i=std::max(num, 1); iGetNumberOfIndexedOutputs(); ++i ) { - // an output should never be ITK_NULLPTR + // an output should never be nullptr itkAssertInDebugAndIgnoreInReleaseMacro( m_IndexedOutputs[i]->second ); // let the output know we no longer want to associate with the @@ -567,7 +567,7 @@ ::SetNumberOfIndexedOutputs(DataObjectPointerArraySizeType num) if (num < 1 ) { - m_IndexedOutputs[0]->second = ITK_NULLPTR; + m_IndexedOutputs[0]->second = nullptr; } } else @@ -593,7 +593,7 @@ ::GetOutput(const DataObjectIdentifierType & key) DataObjectPointerMap::iterator it = m_Outputs.find(key); if ( it == m_Outputs.end() ) { - return ITK_NULLPTR; + return nullptr; } return it->second.GetPointer(); } @@ -606,7 +606,7 @@ ::GetOutput(const DataObjectIdentifierType & key) const DataObjectPointerMap::const_iterator it = m_Outputs.find(key); if ( it == m_Outputs.end() ) { - return ITK_NULLPTR; + return nullptr; } return it->second.GetPointer(); } @@ -745,7 +745,7 @@ ::GetNumberOfIndexedOutputs() const { return m_IndexedOutputs.size(); } - return this->GetPrimaryOutput() != ITK_NULLPTR; + return this->GetPrimaryOutput() != nullptr; } // ProcessObject::ConstDataObjectPointerArray @@ -780,7 +780,7 @@ ::GetInput(const DataObjectIdentifierType & key) DataObjectPointerMap::iterator it = m_Inputs.find(key); if ( it == m_Inputs.end() ) { - return ITK_NULLPTR; + return nullptr; } return it->second.GetPointer(); } @@ -793,7 +793,7 @@ ::GetInput(const DataObjectIdentifierType & key) const DataObjectPointerMap::const_iterator it = m_Inputs.find(key); if ( it == m_Inputs.end() ) { - return ITK_NULLPTR; + return nullptr; } return it->second.GetPointer(); } @@ -1064,7 +1064,7 @@ ::GetNumberOfIndexedInputs() const { return m_IndexedInputs.size(); } - return static_cast(this->GetPrimaryInput() != ITK_NULLPTR); + return static_cast(this->GetPrimaryInput() != nullptr); } // ProcessObject::ConstDataObjectPointerArray @@ -1419,7 +1419,7 @@ ::VerifyPreconditions() */ for( NameSet::const_iterator it = this->m_RequiredInputNames.begin(); it != this->m_RequiredInputNames.end(); ++it ) { - if ( this->GetInput( *it ) == ITK_NULLPTR ) + if ( this->GetInput( *it ) == nullptr ) { itkExceptionMacro(<< "Input " << *it << " is required but not set."); } @@ -1431,7 +1431,7 @@ ::VerifyPreconditions() NameSet::const_iterator i = m_RequiredInputNames.begin(); while (i != m_RequiredInputNames.end()) { - if ( this->GetInput(*i) == ITK_NULLPTR ) + if ( this->GetInput(*i) == nullptr ) { itkExceptionMacro( << "Required Input " << *i << "is not specified!" << " The required inputs are expected to be the first inputs."); diff --git a/Modules/Core/Common/src/itkProgressAccumulator.cxx b/Modules/Core/Common/src/itkProgressAccumulator.cxx index 53a57d459bf..f32585bc915 100644 --- a/Modules/Core/Common/src/itkProgressAccumulator.cxx +++ b/Modules/Core/Common/src/itkProgressAccumulator.cxx @@ -22,7 +22,7 @@ namespace itk ProgressAccumulator ::ProgressAccumulator() { - m_MiniPipelineFilter = ITK_NULLPTR; + m_MiniPipelineFilter = nullptr; // Initialize the progress values m_AccumulatedProgress = 0.0f; diff --git a/Modules/Core/Common/src/itkRealTimeClock.cxx b/Modules/Core/Common/src/itkRealTimeClock.cxx index 587fe507055..45aee28cf56 100644 --- a/Modules/Core/Common/src/itkRealTimeClock.cxx +++ b/Modules/Core/Common/src/itkRealTimeClock.cxx @@ -101,7 +101,7 @@ RealTimeClock::GetTimeInSeconds() const return value; #else struct timeval tval; - ::gettimeofday(&tval, ITK_NULLPTR); + ::gettimeofday(&tval, nullptr); TimeStampType value = static_cast< TimeStampType >( tval.tv_sec ) + static_cast< TimeStampType >( tval.tv_usec ) / this->m_Frequency; @@ -135,7 +135,7 @@ RealTimeClock::GetRealTimeStamp() const return value; #else struct timeval tval; - ::gettimeofday(&tval, ITK_NULLPTR); + ::gettimeofday(&tval, nullptr); RealTimeStamp value( static_cast(tval.tv_sec), static_cast(tval.tv_usec) ); return value; diff --git a/Modules/Core/Common/src/itkSimpleFastMutexLockWinThreads.cxx b/Modules/Core/Common/src/itkSimpleFastMutexLockWinThreads.cxx index f35ebded04b..e367b081914 100644 --- a/Modules/Core/Common/src/itkSimpleFastMutexLockWinThreads.cxx +++ b/Modules/Core/Common/src/itkSimpleFastMutexLockWinThreads.cxx @@ -32,7 +32,7 @@ namespace itk // Construct a new SimpleMutexLock SimpleFastMutexLock::SimpleFastMutexLock() { - //this->MutexLock = CreateMutex( ITK_NULLPTR, FALSE, ITK_NULLPTR ); + //this->MutexLock = CreateMutex( nullptr, FALSE, nullptr ); InitializeCriticalSection(&m_FastMutexLock); } diff --git a/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx b/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx index 1e56339c7d0..b66063886b6 100644 --- a/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx +++ b/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx @@ -85,7 +85,7 @@ ::SimpleFilterWatcher() : #endif m_TestAbort(false), 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/itkSmapsFileParser.cxx b/Modules/Core/Common/src/itkSmapsFileParser.cxx index 86042e9c614..30f7b0f07df 100644 --- a/Modules/Core/Common/src/itkSmapsFileParser.cxx +++ b/Modules/Core/Common/src/itkSmapsFileParser.cxx @@ -370,7 +370,7 @@ SmapsData_2_6::~SmapsData_2_6() std::istream & operator>>(std::istream & smapsStream, SmapsData_2_6 & data) { - SmapsRecord *record = ITK_NULLPTR; + SmapsRecord *record = nullptr; // reset the records from a previous parsing data.Reset(); @@ -428,7 +428,7 @@ VMMapData_10_2 std::istream & operator>>(std::istream & stream, VMMapData_10_2 & data) { - MapRecord *record = ITK_NULLPTR; + MapRecord *record = nullptr; // reset the records from a previous parsing data.Reset(); diff --git a/Modules/Core/Common/src/itkStdStreamLogOutput.cxx b/Modules/Core/Common/src/itkStdStreamLogOutput.cxx index 99f206bf0bf..de310b65cec 100644 --- a/Modules/Core/Common/src/itkStdStreamLogOutput.cxx +++ b/Modules/Core/Common/src/itkStdStreamLogOutput.cxx @@ -23,7 +23,7 @@ namespace itk /** Constructor */ StdStreamLogOutput::StdStreamLogOutput() { - this->m_Stream = ITK_NULLPTR; + this->m_Stream = nullptr; } /** Destructor */ diff --git a/Modules/Core/Common/src/itkThreadLogger.cxx b/Modules/Core/Common/src/itkThreadLogger.cxx index cfa1a71e532..466e7385db9 100644 --- a/Modules/Core/Common/src/itkThreadLogger.cxx +++ b/Modules/Core/Common/src/itkThreadLogger.cxx @@ -180,12 +180,12 @@ ::ThreadFunction(void *pInfoStruct) { struct MultiThreader:: ThreadInfoStruct *pInfo = (struct MultiThreader::ThreadInfoStruct *)pInfoStruct; - if ( pInfo == ITK_NULLPTR ) + if ( pInfo == nullptr ) { return ITK_THREAD_RETURN_VALUE; } - if ( pInfo->UserData == ITK_NULLPTR ) + if ( pInfo->UserData == nullptr ) { return ITK_THREAD_RETURN_VALUE; } diff --git a/Modules/Core/Common/src/itkThreadPool.cxx b/Modules/Core/Common/src/itkThreadPool.cxx index 7c1221b4434..bdf9ea092e7 100644 --- a/Modules/Core/Common/src/itkThreadPool.cxx +++ b/Modules/Core/Common/src/itkThreadPool.cxx @@ -205,7 +205,7 @@ ThreadPool ThreadJob dummy; dummy.m_ThreadFunction = &noOperation; dummy.m_Semaphore = &jobSem[i]; - dummy.m_UserData = ITK_NULLPTR; //makes dummy jobs easier to spot while debugging + dummy.m_UserData = nullptr; //makes dummy jobs easier to spot while debugging AddWork(dummy); } diff --git a/Modules/Core/Common/src/itkThreadPoolPosix.cxx b/Modules/Core/Common/src/itkThreadPoolPosix.cxx index c6d4814ae77..e8ff6a5d356 100644 --- a/Modules/Core/Common/src/itkThreadPoolPosix.cxx +++ b/Modules/Core/Common/src/itkThreadPoolPosix.cxx @@ -17,10 +17,10 @@ *=========================================================================*/ #include "itkThreadPool.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include "itksys/SystemInformation.hxx" @@ -127,7 +127,7 @@ bool ThreadPool ::PlatformClose(ThreadProcessIdType &threadId) { - return pthread_join(threadId, ITK_NULLPTR) == 0; + return pthread_join(threadId, nullptr) == 0; } void @@ -142,7 +142,7 @@ ::AddThread() #if !defined( __CYGWIN__ ) pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); #endif - const int rc = pthread_create(&m_Threads.back(), &attr, &ThreadPool::ThreadExecute, ITK_NULLPTR); + const int rc = pthread_create(&m_Threads.back(), &attr, &ThreadPool::ThreadExecute, nullptr); if (rc) { diff --git a/Modules/Core/Common/src/itkThreadPoolWin32.cxx b/Modules/Core/Common/src/itkThreadPoolWin32.cxx index 97c1ded2dcb..d8783c769bf 100644 --- a/Modules/Core/Common/src/itkThreadPoolWin32.cxx +++ b/Modules/Core/Common/src/itkThreadPoolWin32.cxx @@ -42,7 +42,7 @@ std::string GetLastErrorAsString() return std::string(); //No error message has been recorded } - LPSTR messageBuffer = ITK_NULLPTR; + LPSTR messageBuffer = nullptr; size_t size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errorMessageID, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&messageBuffer, 0, NULL); @@ -58,8 +58,8 @@ void ThreadPool ::PlatformCreate(Semaphore &semaphore) { - semaphore = CreateSemaphore(ITK_NULLPTR, 0, 0x7ffffffel, ITK_NULLPTR); - if (semaphore == ITK_NULLPTR) + semaphore = CreateSemaphore(nullptr, 0, 0x7ffffffel, nullptr); + if (semaphore == nullptr) { itkGenericExceptionMacro(<< "CreateSemaphore error. " << GetLastErrorAsString()); } @@ -80,7 +80,7 @@ void ThreadPool ::PlatformSignal(Semaphore &semaphore) { - if (!ReleaseSemaphore(semaphore, 1, ITK_NULLPTR)) + if (!ReleaseSemaphore(semaphore, 1, nullptr)) { itkGenericExceptionMacro(<< "SignalSemaphore error. " << GetLastErrorAsString()); } @@ -108,14 +108,14 @@ ThreadPool ::AddThread() { ThreadProcessIdType threadHandle = reinterpret_cast(_beginthreadex( - ITK_NULLPTR, + nullptr, 0, ThreadPool::ThreadExecute, - ITK_NULLPTR, + nullptr, 0, - ITK_NULLPTR)); + nullptr)); - if (threadHandle == ITK_NULLPTR) + if (threadHandle == nullptr) { itkDebugMacro(<< "ERROR adding thread to thread pool"); itkExceptionMacro(<< "Cannot create thread. " << GetLastErrorAsString()); diff --git a/Modules/Core/Common/src/itkTimeStamp.cxx b/Modules/Core/Common/src/itkTimeStamp.cxx index e56d402cd7c..f81a3c3474b 100644 --- a/Modules/Core/Common/src/itkTimeStamp.cxx +++ b/Modules/Core/Common/src/itkTimeStamp.cxx @@ -62,7 +62,7 @@ class GlobalTimeStampInitializer ~GlobalTimeStampInitializer() { delete m_GlobalTimeStamp; - m_GlobalTimeStamp = ITK_NULLPTR; + m_GlobalTimeStamp = nullptr; } /** Create the GlobalTimeStamp if needed and return it. */ @@ -119,7 +119,7 @@ TimeStamp::GlobalTimeStampType * TimeStamp ::GetGlobalTimeStamp() { - if( m_GlobalTimeStamp == ITK_NULLPTR ) + if( m_GlobalTimeStamp == nullptr ) { m_GlobalTimeStamp = GlobalTimeStampInitializer::GetGlobalTimeStamp(); } diff --git a/Modules/Core/Common/src/itkWin32OutputWindow.cxx b/Modules/Core/Common/src/itkWin32OutputWindow.cxx index fccb8f29daa..45ec91a9fd9 100644 --- a/Modules/Core/Common/src/itkWin32OutputWindow.cxx +++ b/Modules/Core/Common/src/itkWin32OutputWindow.cxx @@ -38,7 +38,7 @@ Win32OutputWindow if ( Win32OutputWindow::m_OutputWindow ) { DestroyWindow(Win32OutputWindow::m_OutputWindow); - Win32OutputWindow::m_OutputWindow = ITK_NULLPTR; + Win32OutputWindow::m_OutputWindow = nullptr; } } @@ -64,14 +64,14 @@ ::WndProc(HWND hWnd, UINT message, } break; case WM_DESTROY: - Win32OutputWindow::m_OutputWindow = ITK_NULLPTR; + Win32OutputWindow::m_OutputWindow = nullptr; Object::GlobalWarningDisplayOff(); break; case WM_CLOSE: if ( Win32OutputWindow::m_OutputWindow ) { DestroyWindow(Win32OutputWindow::m_OutputWindow); - Win32OutputWindow::m_OutputWindow = ITK_NULLPTR; + Win32OutputWindow::m_OutputWindow = nullptr; } break; case WM_CREATE: @@ -159,16 +159,16 @@ ::Initialize() WNDCLASS wndClass; /** has the class been registered ? */ - if ( !GetClassInfo(GetModuleHandle(ITK_NULLPTR), "OutputWindow", &wndClass) ) + if ( !GetClassInfo(GetModuleHandle(nullptr), "OutputWindow", &wndClass) ) { wndClass.style = CS_HREDRAW | CS_VREDRAW; wndClass.lpfnWndProc = Win32OutputWindow::WndProc; wndClass.cbClsExtra = 0; - wndClass.hInstance = GetModuleHandle(ITK_NULLPTR); - wndClass.hIcon = LoadIcon(ITK_NULLPTR, IDI_APPLICATION); - wndClass.hCursor = LoadCursor(ITK_NULLPTR, IDC_ARROW); + wndClass.hInstance = GetModuleHandle(nullptr); + wndClass.hIcon = LoadIcon(nullptr, IDI_APPLICATION); + wndClass.hCursor = LoadCursor(nullptr, IDC_ARROW); wndClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); - wndClass.lpszMenuName = ITK_NULLPTR; + wndClass.lpszMenuName = nullptr; wndClass.lpszClassName = "OutputWindow"; /** doesn't use these extra 4 bytes, but app writers may want them, * so we provide them. */ @@ -181,12 +181,12 @@ ::Initialize() "OutputWindow", "OutputWindow", WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 0, 0, 512, 512, - ITK_NULLPTR, ITK_NULLPTR, GetModuleHandle(ITK_NULLPTR), ITK_NULLPTR); + nullptr, nullptr, GetModuleHandle(nullptr), nullptr); /** Now create child window with text display box */ CREATESTRUCT lpParam; - lpParam.hInstance = GetModuleHandle(ITK_NULLPTR); - lpParam.hMenu = ITK_NULLPTR; + lpParam.hInstance = GetModuleHandle(nullptr); + lpParam.hMenu = nullptr; lpParam.hwndParent = win; lpParam.cx = 512; lpParam.cy = 512; @@ -210,7 +210,7 @@ ::Initialize() lpParam.cx, // window width lpParam.cy, // window height lpParam.hwndParent, // handle to parent or owner window - ITK_NULLPTR, // handle to menu or child-window identifier + nullptr, // handle to menu or child-window identifier lpParam.hInstance, // handle to application instance &lpParam // pointer to window-creation data ); @@ -232,7 +232,7 @@ ::PromptText(const char *text) std::ostringstream msg; msg << text << "\nPress Cancel to suppress any further messages."; - if ( MessageBox(ITK_NULLPTR, msg.str().c_str(), "Error", + if ( MessageBox(nullptr, msg.str().c_str(), "Error", MB_ICONERROR | MB_OKCANCEL) == IDCANCEL ) { Object::GlobalWarningDisplayOff(); diff --git a/Modules/Core/Common/src/itkXMLFileOutputWindow.cxx b/Modules/Core/Common/src/itkXMLFileOutputWindow.cxx index 541c285a0ac..edb61fbec03 100644 --- a/Modules/Core/Common/src/itkXMLFileOutputWindow.cxx +++ b/Modules/Core/Common/src/itkXMLFileOutputWindow.cxx @@ -18,7 +18,7 @@ #include "itkXMLFileOutputWindow.h" #include -#include +#include namespace itk { diff --git a/Modules/Core/Common/test/ClientTestLibraryA.cxx b/Modules/Core/Common/test/ClientTestLibraryA.cxx index d57697a7436..506f382d188 100644 --- a/Modules/Core/Common/test/ClientTestLibraryA.cxx +++ b/Modules/Core/Common/test/ClientTestLibraryA.cxx @@ -34,7 +34,7 @@ dynamic_castDownCast( const char * type, const char * instanceSource, itk::Objec const static int failed = 1; DerivedType const * derived = dynamic_cast< DerivedType const * >( base ); - if( derived != ITK_NULLPTR ) + if( derived != nullptr ) { std::cout << type << " cast in library A for an instance from " << instanceSource << "\tsucceeded." << std::endl; return passed; diff --git a/Modules/Core/Common/test/ClientTestLibraryB.cxx b/Modules/Core/Common/test/ClientTestLibraryB.cxx index b4dff3ecae8..f1e3f81472d 100644 --- a/Modules/Core/Common/test/ClientTestLibraryB.cxx +++ b/Modules/Core/Common/test/ClientTestLibraryB.cxx @@ -34,7 +34,7 @@ dynamic_castDownCast( const char * type, const char * instanceSource, itk::Objec const static int failed = 1; DerivedType const * derived = dynamic_cast< DerivedType const * >( base ); - if( derived != ITK_NULLPTR ) + if( derived != nullptr ) { std::cout << type << " cast in library B for an instance from " << instanceSource << "\tsucceeded." << std::endl; return passed; diff --git a/Modules/Core/Common/test/ClientTestLibraryC.cxx b/Modules/Core/Common/test/ClientTestLibraryC.cxx index a6dc481ef62..d62ea5bb837 100644 --- a/Modules/Core/Common/test/ClientTestLibraryC.cxx +++ b/Modules/Core/Common/test/ClientTestLibraryC.cxx @@ -34,7 +34,7 @@ dynamic_castDownCast( const char * type, const char * instanceSource, itk::Objec const static int failed = 1; DerivedType const * derived = dynamic_cast< DerivedType const * >( base ); - if( derived != ITK_NULLPTR ) + if( derived != nullptr ) { std::cout << type << " cast in library C for an instance from " << instanceSource << "\tsucceeded." << std::endl; return passed; diff --git a/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx b/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx index 54f237ca557..638d4264d03 100644 --- a/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx +++ b/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx @@ -17,7 +17,7 @@ *=========================================================================*/ #include -#include +#include #include "itkImageRegionIteratorWithIndex.h" #include "itkImageRegionIterator.h" diff --git a/Modules/Core/Common/test/itkAtomicIntTest.cxx b/Modules/Core/Common/test/itkAtomicIntTest.cxx index 88a6f36c21d..06dea94e52d 100644 --- a/Modules/Core/Common/test/itkAtomicIntTest.cxx +++ b/Modules/Core/Common/test/itkAtomicIntTest.cxx @@ -240,14 +240,14 @@ int itkAtomicIntTest(int, char*[]) } itk::MultiThreader::Pointer mt = itk::MultiThreader::New(); - mt->SetSingleMethod(MyFunction, NULL); + mt->SetSingleMethod(MyFunction, nullptr); mt->SetNumberOfThreads(NumThreads); mt->SingleMethodExecute(); - mt->SetSingleMethod(MyFunction2, NULL); + mt->SetSingleMethod(MyFunction2, nullptr); mt->SingleMethodExecute(); - mt->SetSingleMethod(MyFunction3, NULL); + mt->SetSingleMethod(MyFunction3, nullptr); mt->SingleMethodExecute(); // Making sure that atomic incr returned unique @@ -281,7 +281,7 @@ int itkAtomicIntTest(int, char*[]) } } - mt->SetSingleMethod(MyFunction4, NULL); + mt->SetSingleMethod(MyFunction4, nullptr); mt->SingleMethodExecute(); std::cout << Total << " " << TotalAtomic.load() << std::endl; @@ -289,7 +289,7 @@ int itkAtomicIntTest(int, char*[]) std::cout << "MTime: " << AnObject->GetMTime() << std::endl; - mt->SetSingleMethod(MyFunctionPtr, NULL); + mt->SetSingleMethod(MyFunctionPtr, nullptr); mt->SingleMethodExecute(); // Making sure that pointer atomic incr returned unique diff --git a/Modules/Core/Common/test/itkCMakeConfigurationTest.cxx b/Modules/Core/Common/test/itkCMakeConfigurationTest.cxx index 8bdb721e46a..6cf1c20b222 100644 --- a/Modules/Core/Common/test/itkCMakeConfigurationTest.cxx +++ b/Modules/Core/Common/test/itkCMakeConfigurationTest.cxx @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include void itkCMakeInformationPrintFile(const char* name, std::ostream& os) { @@ -85,7 +85,7 @@ int main(int argc, char* argv[]) "ITKConfig.cmake", "ITKConfigVersion.cmake", "ITKTargets.cmake", - NULL + nullptr }; for(const char** f = files; *f; ++f) diff --git a/Modules/Core/Common/test/itkCompensatedSummationTest2.cxx b/Modules/Core/Common/test/itkCompensatedSummationTest2.cxx index 5dd5975054c..a201f76246d 100644 --- a/Modules/Core/Common/test/itkCompensatedSummationTest2.cxx +++ b/Modules/Core/Common/test/itkCompensatedSummationTest2.cxx @@ -56,7 +56,7 @@ class CompensatedSummationTest2Associate TestDomainThreader() {}; private: - virtual void BeforeThreadedExecution() ITK_OVERRIDE + void BeforeThreadedExecution() override { const itk::ThreadIdType numThreadsUsed = this->GetNumberOfThreadsUsed(); this->m_PerThreadCompensatedSum.resize( numThreadsUsed ); @@ -66,8 +66,8 @@ class CompensatedSummationTest2Associate } } - virtual void ThreadedExecution( const DomainType& subdomain, - const itk::ThreadIdType threadId ) ITK_OVERRIDE + void ThreadedExecution( const DomainType& subdomain, + const itk::ThreadIdType threadId ) override { itk::CompensatedSummation compensatedSum; for( DomainType::IndexValueType i=subdomain[0]; i <= subdomain[1]; i++ ) @@ -77,7 +77,7 @@ class CompensatedSummationTest2Associate } } - virtual void AfterThreadedExecution() ITK_OVERRIDE + void AfterThreadedExecution() override { this->m_Associate->m_UncompensatedSumOfThreads = itk::NumericTraits::ZeroValue(); this->m_Associate->m_CompensatedSumOfThreads.ResetToZero(); diff --git a/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx b/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx index 35c9d4e09a4..a46e5166837 100644 --- a/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx +++ b/Modules/Core/Common/test/itkDataObjectAndProcessObjectTest.cxx @@ -250,7 +250,7 @@ int itkDataObjectAndProcessObjectTest(int, char* [] ) TEST_SET_GET( input0, process->GetInput(0) ); TEST_SET_GET( input0, process->GetInput("Primary") ); TEST_SET_GET_VALUE( 1, process->GetNumberOfIndexedInputs() ); - process->SetPrimaryInput( ITK_NULLPTR ); + process->SetPrimaryInput( nullptr ); TEST_SET_GET_NULL_VALUE( process->GetPrimaryInput() ); TEST_SET_GET_NULL_VALUE( process->GetInput(0) ); @@ -270,7 +270,7 @@ int itkDataObjectAndProcessObjectTest(int, char* [] ) process->SetNthInput( 1, input1 ); TEST_SET_GET( input1, process->GetInput(1) ); TEST_SET_GET_VALUE( 2, process->GetNumberOfIndexedInputs() ); - process->SetNthInput( 1, ITK_NULLPTR ); + process->SetNthInput( 1, nullptr ); TEST_SET_GET_NULL_VALUE( process->GetInput(1) ); process->SetNthInput( 1, input1 ); @@ -331,7 +331,7 @@ int itkDataObjectAndProcessObjectTest(int, char* [] ) TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); process->SetNumberOfRequiredInputs(2); - process->SetInput( "Image2", ITK_NULLPTR ); + process->SetInput( "Image2", nullptr ); process->SetNthInput( 10, input0 ); TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); TRY_EXPECT_EXCEPTION(process->VerifyPreconditions() ); @@ -376,7 +376,7 @@ int itkDataObjectAndProcessObjectTest(int, char* [] ) TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); - process->SetInput( "OptImage", ITK_NULLPTR ); + process->SetInput( "OptImage", nullptr ); TEST_EXPECT_EQUAL( 1, process->GetNumberOfValidRequiredInputs() ); TRY_EXPECT_NO_EXCEPTION(process->VerifyPreconditions() ); diff --git a/Modules/Core/Common/test/itkDataObjectTest.cxx b/Modules/Core/Common/test/itkDataObjectTest.cxx index 8f7e18f2cec..38a05ff60df 100644 --- a/Modules/Core/Common/test/itkDataObjectTest.cxx +++ b/Modules/Core/Common/test/itkDataObjectTest.cxx @@ -38,8 +38,8 @@ class DataObjectTestHelper : public DataObject protected: DataObjectTestHelper() {} - ~DataObjectTestHelper() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~DataObjectTestHelper() override {} + void PrintSelf(std::ostream & os, Indent indent) const override { this->Superclass::PrintSelf( os, indent ); } diff --git a/Modules/Core/Common/test/itkDecoratorTest.cxx b/Modules/Core/Common/test/itkDecoratorTest.cxx index 6defbebc5b8..5b2ca292945 100644 --- a/Modules/Core/Common/test/itkDecoratorTest.cxx +++ b/Modules/Core/Common/test/itkDecoratorTest.cxx @@ -85,23 +85,23 @@ int itkDecoratorTest(int, char* [] ) TransformBaseObjectType::Pointer decoratedBaseTransform = TransformBaseObjectType::New(); decoratedBaseTransform->Graft( decoratedTransform.GetPointer() ); - TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != ITK_NULLPTR ); + TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != nullptr ); decoratedBaseTransform->ReleaseData(); - TEST_EXPECT_TRUE( decoratedBaseTransform->Get() == ITK_NULLPTR ); + TEST_EXPECT_TRUE( decoratedBaseTransform->Get() == nullptr ); decoratedBaseTransform->Graft( f.GetPointer() ); - TEST_EXPECT_TRUE( decoratedBaseTransform->Get() == ITK_NULLPTR ); + TEST_EXPECT_TRUE( decoratedBaseTransform->Get() == nullptr ); - decoratedBaseTransform->Graft( static_cast(ITK_NULLPTR) ); + decoratedBaseTransform->Graft( static_cast(nullptr) ); decoratedBaseTransform->Graft( decoratedTransform.GetPointer() ); - TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != ITK_NULLPTR ); + TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != nullptr ); - decoratedBaseTransform->Graft( static_cast(ITK_NULLPTR) ); - TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != ITK_NULLPTR ); + decoratedBaseTransform->Graft( static_cast(nullptr) ); + TEST_EXPECT_TRUE( decoratedBaseTransform->Get() != nullptr ); decoratedTransform->ReleaseData(); decoratedTransform->Graft( decoratedBaseTransform ); - TEST_EXPECT_TRUE( decoratedTransform->Get() == ITK_NULLPTR ); + TEST_EXPECT_TRUE( decoratedTransform->Get() == nullptr ); std::cout << "----------------------------------------------------" << std::endl; diff --git a/Modules/Core/Common/test/itkEnableIfTest.cxx b/Modules/Core/Common/test/itkEnableIfTest.cxx index b128d470fd3..9387b1d99b2 100644 --- a/Modules/Core/Common/test/itkEnableIfTest.cxx +++ b/Modules/Core/Common/test/itkEnableIfTest.cxx @@ -20,7 +20,7 @@ #include "itkIsSame.h" #include "itkNumericTraits.h" #include "itkFixedArray.h" -#include +#include #include namespace diff --git a/Modules/Core/Common/test/itkExceptionObjectTest.cxx b/Modules/Core/Common/test/itkExceptionObjectTest.cxx index 85d4cc6a4de..f153c8acb50 100644 --- a/Modules/Core/Common/test/itkExceptionObjectTest.cxx +++ b/Modules/Core/Common/test/itkExceptionObjectTest.cxx @@ -31,7 +31,7 @@ class mammal class human : public mammal { public: - virtual int GetType() ITK_OVERRIDE + int GetType() override { return 32; } @@ -40,7 +40,7 @@ class human : public mammal class naked_mole_rat : public mammal { public: - virtual int GetType() ITK_OVERRIDE + int GetType() override { return 2; } diff --git a/Modules/Core/Common/test/itkFactoryTestLib.cxx b/Modules/Core/Common/test/itkFactoryTestLib.cxx index 397085eb9f0..3c8d096444f 100644 --- a/Modules/Core/Common/test/itkFactoryTestLib.cxx +++ b/Modules/Core/Common/test/itkFactoryTestLib.cxx @@ -57,7 +57,7 @@ class TestImportImageContainer : public itk::ImportImageContainer< TElementIdent } protected: - TElement* AllocateElements(ElementIdentifier size, bool) const ITK_OVERRIDE + TElement* AllocateElements(ElementIdentifier size, bool) const override { std::cout << "TestImportImageContainer: Allocating " << size << " elements of type " @@ -101,7 +101,7 @@ class TestImportImageContainer : public itk::ImportImageContainer< TElementIdent return data; } - void DeallocateManagedMemory() ITK_OVERRIDE + void DeallocateManagedMemory() override { std::cout << "TestImportImageContainer: Deallocating " << this->Capacity() << " elements of type " @@ -149,8 +149,8 @@ class ImportImageContainerFactory : public itk::ObjectFactoryBase typedef itk::SmartPointer ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char* GetITKSourceVersion() const ITK_OVERRIDE { return ITK_SOURCE_VERSION; } - const char* GetDescription() const ITK_OVERRIDE { return "A Factory for ImportImageContainer"; } + const char* GetITKSourceVersion() const override { return ITK_SOURCE_VERSION; } + const char* GetDescription() const override { return "A Factory for ImportImageContainer"; } /** Method for class instantiation. */ itkFactorylessNewMacro(Self); diff --git a/Modules/Core/Common/test/itkFilterDispatchTest.cxx b/Modules/Core/Common/test/itkFilterDispatchTest.cxx index 0d5e4adf68a..e75c80feaf7 100644 --- a/Modules/Core/Common/test/itkFilterDispatchTest.cxx +++ b/Modules/Core/Common/test/itkFilterDispatchTest.cxx @@ -69,7 +69,7 @@ class ExampleImageFilter: typedef TOutputImage OutputImageType; enum { ImageDimension = InputImageType::ImageDimension }; - void Update(void) ITK_OVERRIDE; + void Update(void) override; /** * Method for creation through the object factory. @@ -80,7 +80,7 @@ class ExampleImageFilter: ExampleImageFilter() {} ExampleImageFilter(const Self&) {} void operator=(const Self&) {} - virtual ~ExampleImageFilter() ITK_OVERRIDE {} + ~ExampleImageFilter() override {} private: /** diff --git a/Modules/Core/Common/test/itkFixedArrayTest2.cxx b/Modules/Core/Common/test/itkFixedArrayTest2.cxx index 882963789fa..29135e4aa4e 100644 --- a/Modules/Core/Common/test/itkFixedArrayTest2.cxx +++ b/Modules/Core/Common/test/itkFixedArrayTest2.cxx @@ -18,9 +18,9 @@ #include #include "itkFixedArray.h" -#include +#include +#include #include -#include int itkFixedArrayTest2(int, char* [] ) { diff --git a/Modules/Core/Common/test/itkFloatingPointExceptionsExtern.cxx b/Modules/Core/Common/test/itkFloatingPointExceptionsExtern.cxx index 582a9ac83d2..a2618f5f998 100644 --- a/Modules/Core/Common/test/itkFloatingPointExceptionsExtern.cxx +++ b/Modules/Core/Common/test/itkFloatingPointExceptionsExtern.cxx @@ -15,7 +15,7 @@ * limitations under the License. * *=========================================================================*/ -#include +#include extern const double itkFloatingPointExceptionsTest_double_zero = 0.0; extern const double itkFloatingPointExceptionsTest_double_max = DBL_MAX; diff --git a/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx b/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx index 4dc9d861f6c..862dc54082d 100644 --- a/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx +++ b/Modules/Core/Common/test/itkFloatingPointExceptionsTest.cxx @@ -17,7 +17,7 @@ *=========================================================================*/ #include "itkFloatingPointExceptions.h" #include -#include +#include // constants declared in another compilation unit to prevent // compilation time errors for divide by zero and overflow diff --git a/Modules/Core/Common/test/itkHashTableTest.cxx b/Modules/Core/Common/test/itkHashTableTest.cxx index 08b12abec47..cd2160f2fab 100644 --- a/Modules/Core/Common/test/itkHashTableTest.cxx +++ b/Modules/Core/Common/test/itkHashTableTest.cxx @@ -29,7 +29,7 @@ void IgnoreUnusedVariable(const T&) } extern "C" { -#include +#include } struct eqstr diff --git a/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx b/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx index 44aa70d526e..1846756d045 100644 --- a/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx +++ b/Modules/Core/Common/test/itkImageVectorOptimizerParametersHelperTest.cxx @@ -155,7 +155,7 @@ int itkImageVectorOptimizerParametersHelperTest(int, char *[]) params.MoveDataPointer( array.data_block() ); //Test null image pointer - params.SetParametersObject( ITK_NULLPTR ); + params.SetParametersObject( nullptr ); TRY_EXPECT_EXCEPTION( params.MoveDataPointer( array.data_block() ) ); //Test setting an image of wrong type diff --git a/Modules/Core/Common/test/itkIntTypesTest.cxx b/Modules/Core/Common/test/itkIntTypesTest.cxx index 295a0606ec4..f627899b509 100644 --- a/Modules/Core/Common/test/itkIntTypesTest.cxx +++ b/Modules/Core/Common/test/itkIntTypesTest.cxx @@ -23,20 +23,20 @@ namespace { template -bool CheckSize( size_t size, T* = 0 ) +bool CheckSize( size_t size, T* = nullptr ) { return ( sizeof( T ) == size ); } template -bool CheckAtleastSize( size_t size, T* = 0 ) +bool CheckAtleastSize( size_t size, T* = nullptr ) { return ( sizeof( T ) >= size ); } template -bool CheckTraits( bool issigned, T* = 0 ) +bool CheckTraits( bool issigned, T* = nullptr ) { // make sure that we have a specialized NumericTraits T t0 = itk::NumericTraits::ZeroValue(); @@ -58,7 +58,7 @@ bool CheckTraits( bool issigned, T* = 0 ) template -bool CheckType( size_t size, bool exactSize, bool issigned, const char * name, T* = 0 ) +bool CheckType( size_t size, bool exactSize, bool issigned, const char * name, T* = nullptr ) { bool ret = true; diff --git a/Modules/Core/Common/test/itkIteratorTests.cxx b/Modules/Core/Common/test/itkIteratorTests.cxx index c53ea5bf0ee..5c0ffd03be3 100644 --- a/Modules/Core/Common/test/itkIteratorTests.cxx +++ b/Modules/Core/Common/test/itkIteratorTests.cxx @@ -22,7 +22,7 @@ #include "itkVector.h" #include "itkImageRegionIterator.h" #include "itkImageRegionIteratorWithIndex.h" -#include +#include int itkIteratorTests(int, char* [] ) { diff --git a/Modules/Core/Common/test/itkLoggerManagerTest.cxx b/Modules/Core/Common/test/itkLoggerManagerTest.cxx index d1391b66d2b..6f78ab0a74d 100644 --- a/Modules/Core/Common/test/itkLoggerManagerTest.cxx +++ b/Modules/Core/Common/test/itkLoggerManagerTest.cxx @@ -24,7 +24,7 @@ class LogTester { public: - LogTester(){ this->m_Logger = ITK_NULLPTR; } + LogTester(){ this->m_Logger = nullptr; } itk::Logger* GetLogger() { return m_Logger; } void SetLogger(itk::Logger* logger) { m_Logger = logger; } void log() { @@ -103,14 +103,14 @@ int itkLoggerManagerTest( int argc, char *argv [] ) std::cout << " Message #3" << std::endl; itk::Logger* pLogger; pLogger = manager->GetLogger("org.itk.logTester.logger"); - if( pLogger == ITK_NULLPTR ) + if( pLogger == nullptr ) { throw "LoggerManager::GetLogger() failed"; } pLogger->Write(itk::LoggerBase::INFO, "This is the message from the logger got from a LoggerManager"); - if( manager->GetLogger("abc") != ITK_NULLPTR ) + if( manager->GetLogger("abc") != nullptr ) { - throw "LoggerManager::GetLogger() must return ITK_NULLPTR"; + throw "LoggerManager::GetLogger() must return nullptr"; } manager->Flush(); } diff --git a/Modules/Core/Common/test/itkLoggerTest.cxx b/Modules/Core/Common/test/itkLoggerTest.cxx index 096f37b4e4b..22a84a0660c 100644 --- a/Modules/Core/Common/test/itkLoggerTest.cxx +++ b/Modules/Core/Common/test/itkLoggerTest.cxx @@ -24,7 +24,7 @@ class LogTester { public: - LogTester(){ this->m_Logger = ITK_NULLPTR; } + LogTester(){ this->m_Logger = nullptr; } itk::Logger* GetLogger() { return m_Logger; } void SetLogger(itk::Logger* logger) { m_Logger = logger; } void log() { diff --git a/Modules/Core/Common/test/itkLoggerThreadWrapperTest.cxx b/Modules/Core/Common/test/itkLoggerThreadWrapperTest.cxx index 83eccb555f6..4a84cf12b5a 100644 --- a/Modules/Core/Common/test/itkLoggerThreadWrapperTest.cxx +++ b/Modules/Core/Common/test/itkLoggerThreadWrapperTest.cxx @@ -50,7 +50,7 @@ class SimpleLogger : public itk::LoggerBase /** New macro for creation of through a Smart Pointer */ itkNewMacro( Self ); - virtual std::string BuildFormattedEntry(PriorityLevelType level, std::string const & content) ITK_OVERRIDE + std::string BuildFormattedEntry(PriorityLevelType level, std::string const & content) override { std::string HeaderLevelStart(""); std::string HeaderLevelStop(""); @@ -92,13 +92,13 @@ class SimpleLogger : public itk::LoggerBase /** Constructor */ SimpleLogger() {}; /** Destructor */ - virtual ~SimpleLogger() ITK_OVERRIDE {}; + ~SimpleLogger() override {}; }; // class Logger class LogTester { public: - LogTester(){ this->m_Logger = ITK_NULLPTR; } + LogTester(){ this->m_Logger = nullptr; } itk::LoggerBase* GetLogger() { return m_Logger; } void SetLogger(itk::LoggerBase* logger) { m_Logger = logger; } void log() { diff --git a/Modules/Core/Common/test/itkMathCastWithRangeCheckTest.cxx b/Modules/Core/Common/test/itkMathCastWithRangeCheckTest.cxx index da8c7678cf4..b68841ca7c9 100644 --- a/Modules/Core/Common/test/itkMathCastWithRangeCheckTest.cxx +++ b/Modules/Core/Common/test/itkMathCastWithRangeCheckTest.cxx @@ -66,7 +66,7 @@ bool DoCastWithRangeCheckTestVerify( const T2 value, const T1 = 0 ) template < typename T1, typename T2 > -bool DoCastWithRangeCheckTestExulstive( const T1* = 0, const T2* = 0 ) +bool DoCastWithRangeCheckTestExulstive( const T1* = nullptr, const T2* = nullptr ) { // test convert T2 to T1 bool pass = true; @@ -79,7 +79,7 @@ bool DoCastWithRangeCheckTestExulstive( const T1* = 0, const T2* = 0 ) } template < typename T1, typename T2 > -bool DoCastWithRangeCheckTest( const T1* = 0, const T2* = 0 ) +bool DoCastWithRangeCheckTest( const T1* = nullptr, const T2* = nullptr ) { int minus_one = -1; @@ -95,7 +95,7 @@ bool DoCastWithRangeCheckTest( const T1* = 0, const T2* = 0 ) } template < typename T1 > -bool DoCastWithRangeCheckTestForTypes( const T1* = 0 ) +bool DoCastWithRangeCheckTestForTypes( const T1* = nullptr ) { // call method for all type to be converted to type T1 bool pass = true; diff --git a/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx b/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx index 0f1c876a7e6..bed9e682841 100644 --- a/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx +++ b/Modules/Core/Common/test/itkMetaDataDictionaryTest.cxx @@ -55,13 +55,13 @@ int itkMetaDataDictionaryTest(int , char * []) //NOTE: Only the pointer is copied, not the data within the pointer! itk::EncapsulateMetaData(MyDictionary,"MemoryChangedOutsideOfDictionary",StrandedMemory); { - char * temp = ITK_NULLPTR; + char * temp = nullptr; itk::ExposeMetaData(MyDictionary,"MemoryChangedOutsideOfDictionary",temp); std::cout << "Memory Before Change: "<(MyDictionary,"MemoryChangedOutsideOfDictionary",temp); std::cout << "Memory After Change: "<( "I T K" ); typedef itk::Image< unsigned short, 3 > ImageType; - ImageType::Pointer image = ITK_NULLPTR; + ImageType::Pointer image = nullptr; result += testMetaData< ImageType::Pointer >( image ); return result; diff --git a/Modules/Core/Common/test/itkNumericTraitsTest.cxx b/Modules/Core/Common/test/itkNumericTraitsTest.cxx index 15f5ec5f12d..d41bd805a64 100644 --- a/Modules/Core/Common/test/itkNumericTraitsTest.cxx +++ b/Modules/Core/Common/test/itkNumericTraitsTest.cxx @@ -85,7 +85,7 @@ template void CheckVariableLengthArrayTraits(const T &t) #ifdef GCC_USEDEMANGLE char const *mangledName = typeid( t ).name(); int status; - char * unmangled = abi::__cxa_demangle(mangledName, ITK_NULLPTR, ITK_NULLPTR, &status); + char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); name = unmangled; free(unmangled); #else @@ -117,7 +117,7 @@ template void CheckFixedArrayTraits(const T &t) #ifdef GCC_USEDEMANGLE char const *mangledName = typeid( t ).name(); int status; - char * unmangled = abi::__cxa_demangle(mangledName, ITK_NULLPTR, ITK_NULLPTR, &status); + char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); name = unmangled; free(unmangled); #else diff --git a/Modules/Core/Common/test/itkObjectFactoryTest.cxx b/Modules/Core/Common/test/itkObjectFactoryTest.cxx index 49273ca91d8..d88ce4320fa 100644 --- a/Modules/Core/Common/test/itkObjectFactoryTest.cxx +++ b/Modules/Core/Common/test/itkObjectFactoryTest.cxx @@ -46,7 +46,7 @@ class TestImage : public itk::Image< TPixel, VImageDimension > itkTypeMacro(TestImage, Image); // Methods from itkObject - virtual ~TestImage() ITK_OVERRIDE {} + ~TestImage() override {} TestImage() { } @@ -73,7 +73,7 @@ class TestImage2 : public itk::Image< TPixel, VImageDimension > itkTypeMacro(TestImage2, Image); // Methods from itkObject - virtual ~TestImage2() ITK_OVERRIDE {} + ~TestImage2() override {} TestImage2() { } @@ -92,8 +92,8 @@ class TestFactory : public itk::ObjectFactoryBase typedef itk::SmartPointer ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char* GetITKSourceVersion() const ITK_OVERRIDE { return ITK_SOURCE_VERSION; } - virtual const char* GetDescription() const ITK_OVERRIDE { return "A Test Factory"; } + const char* GetITKSourceVersion() const override { return ITK_SOURCE_VERSION; } + const char* GetDescription() const override { return "A Test Factory"; } /** Method for class instantiation. */ itkFactorylessNewMacro(Self); diff --git a/Modules/Core/Common/test/itkObjectFactoryTest3.cxx b/Modules/Core/Common/test/itkObjectFactoryTest3.cxx index 217de8d6eb9..c666c352e88 100644 --- a/Modules/Core/Common/test/itkObjectFactoryTest3.cxx +++ b/Modules/Core/Common/test/itkObjectFactoryTest3.cxx @@ -28,7 +28,7 @@ class FakeObject3 : public itk::Object protected: FakeObject3() {} - ~FakeObject3() {} + ~FakeObject3() override {} }; class TestFactory3 : public itk::ObjectFactoryBase @@ -40,8 +40,8 @@ class TestFactory3 : public itk::ObjectFactoryBase typedef itk::SmartPointer ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char* GetITKSourceVersion() const ITK_OVERRIDE { return ITK_SOURCE_VERSION; } - virtual const char* GetDescription() const ITK_OVERRIDE { return m_Description.c_str(); } + const char* GetITKSourceVersion() const override { return ITK_SOURCE_VERSION; } + const char* GetDescription() const override { return m_Description.c_str(); } /** Method for class instantiation. */ itkFactorylessNewMacro(Self); diff --git a/Modules/Core/Common/test/itkOctreeTest.cxx b/Modules/Core/Common/test/itkOctreeTest.cxx index 5181df964ee..698898f7d30 100644 --- a/Modules/Core/Common/test/itkOctreeTest.cxx +++ b/Modules/Core/Common/test/itkOctreeTest.cxx @@ -19,9 +19,9 @@ #include "itkOctree.h" #include "itkNumericTraits.h" #include "itkImageRegionIterator.h" -#include -#include -#include +#include +#include +#include template class IdentityMap @@ -47,7 +47,7 @@ int itkOctreeTest(int, char *[]) img->SetBufferedRegion(region); img->SetRequestedRegion(region); img->Allocate(); - srand( (unsigned)time( ITK_NULLPTR) ); + srand( (unsigned)time( nullptr) ); itk::ImageRegionIterator ri(img,region); try { diff --git a/Modules/Core/Common/test/itkOptimizerParametersTest.cxx b/Modules/Core/Common/test/itkOptimizerParametersTest.cxx index 81429434d0c..7d7496b17ac 100644 --- a/Modules/Core/Common/test/itkOptimizerParametersTest.cxx +++ b/Modules/Core/Common/test/itkOptimizerParametersTest.cxx @@ -121,7 +121,7 @@ bool runTestByType() TRY_EXPECT_EXCEPTION( params.SetParametersObject( dummyObj.GetPointer() ) ); /* Test with null helper and expect exception */ - params.SetHelper( ITK_NULLPTR ); + params.SetHelper( nullptr ); TRY_EXPECT_EXCEPTION( params.MoveDataPointer( block ) ); TRY_EXPECT_EXCEPTION( params.SetParametersObject( dummyObj.GetPointer() ) ); diff --git a/Modules/Core/Common/test/itkSTLThreadTest.cxx b/Modules/Core/Common/test/itkSTLThreadTest.cxx index 8443908ad04..a05d407ea9f 100644 --- a/Modules/Core/Common/test/itkSTLThreadTest.cxx +++ b/Modules/Core/Common/test/itkSTLThreadTest.cxx @@ -22,7 +22,7 @@ namespace itkSTLThreadTestImpl { static int done = 0; static int numberOfIterations = 10; -static itk::MutexLock::Pointer sharedMutex = 0; +static itk::MutexLock::Pointer sharedMutex = nullptr; static ITK_THREAD_RETURN_TYPE Runner(void*); static int Thread(int); @@ -106,7 +106,7 @@ int itkSTLThreadTest(int argc, char* argv[]) std::cout << "threader->GetGlobalMaximumNumberOfThreads(): " << threader->GetGlobalMaximumNumberOfThreads() << std::endl; - itk::ThreadIdType threadId = threader->SpawnThread(itkSTLThreadTestImpl::Runner, ITK_NULLPTR); + itk::ThreadIdType threadId = threader->SpawnThread(itkSTLThreadTestImpl::Runner, nullptr); std::cout << "SpawnThread(itkSTLThreadTestImpl::Runner, results): " << threadId << std::endl; threader->TerminateThread(threadId); diff --git a/Modules/Core/Common/test/itkSimpleFilterWatcherTest.cxx b/Modules/Core/Common/test/itkSimpleFilterWatcherTest.cxx index 445871e520d..de8760648e3 100644 --- a/Modules/Core/Common/test/itkSimpleFilterWatcherTest.cxx +++ b/Modules/Core/Common/test/itkSimpleFilterWatcherTest.cxx @@ -82,7 +82,7 @@ namespace itk #endif protected: TanHelperImageFilter() {} - virtual ~TanHelperImageFilter() ITK_OVERRIDE {} + ~TanHelperImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(TanHelperImageFilter); }; diff --git a/Modules/Core/Common/test/itkSmartPointerTest.cxx b/Modules/Core/Common/test/itkSmartPointerTest.cxx index dbdf4b83027..ce96b4d31e6 100644 --- a/Modules/Core/Common/test/itkSmartPointerTest.cxx +++ b/Modules/Core/Common/test/itkSmartPointerTest.cxx @@ -152,7 +152,7 @@ int itkSmartPointerTest(int, char* [] ) // check test of null pointer - itkTestObject::Pointer q(ITK_NULLPTR); + itkTestObject::Pointer q(nullptr); std::cout << q; std::cout <<"first test" << std::endl; diff --git a/Modules/Core/Common/test/itkSpatialFunctionTest.cxx b/Modules/Core/Common/test/itkSpatialFunctionTest.cxx index b6d1d8e61a4..4f6a5d39e85 100644 --- a/Modules/Core/Common/test/itkSpatialFunctionTest.cxx +++ b/Modules/Core/Common/test/itkSpatialFunctionTest.cxx @@ -16,7 +16,7 @@ * *=========================================================================*/ -#include +#include // Spatial function stuff #include "itkSphereSpatialFunction.h" diff --git a/Modules/Core/Common/test/itkSpawnThreadTest.cxx b/Modules/Core/Common/test/itkSpawnThreadTest.cxx index 7440b0b1bf1..43334050044 100644 --- a/Modules/Core/Common/test/itkSpawnThreadTest.cxx +++ b/Modules/Core/Common/test/itkSpawnThreadTest.cxx @@ -54,7 +54,7 @@ void* ThreadFunction(void *ptr) std::cerr << "Thread #" << localthreadId << " is done." << std::endl; localMutex->Unlock(); - return ITK_NULLPTR; + return nullptr; } #if !defined(ITK_USE_PTHREADS) diff --git a/Modules/Core/Common/test/itkThreadLoggerTest.cxx b/Modules/Core/Common/test/itkThreadLoggerTest.cxx index 0773314e06d..3d4b8fc5937 100644 --- a/Modules/Core/Common/test/itkThreadLoggerTest.cxx +++ b/Modules/Core/Common/test/itkThreadLoggerTest.cxx @@ -31,7 +31,7 @@ typedef std::vector ThreadDataVec; class LogTester { public: - LogTester(){ this->m_Logger = ITK_NULLPTR; } + LogTester(){ this->m_Logger = nullptr; } itk::Logger* GetLogger() { return m_Logger; } void SetLogger(itk::Logger* logger) { m_Logger = logger; } void log() { diff --git a/Modules/Core/Common/test/itkThreadPoolTest.cxx b/Modules/Core/Common/test/itkThreadPoolTest.cxx index 542eac0eebf..fd38ec5294c 100644 --- a/Modules/Core/Common/test/itkThreadPoolTest.cxx +++ b/Modules/Core/Common/test/itkThreadPoolTest.cxx @@ -48,7 +48,7 @@ void* execute(void *ptr) } } - return ITK_NULLPTR; + return nullptr; } #if !defined(ITK_USE_PTHREADS) diff --git a/Modules/Core/Common/test/itkThreadedIndexedContainerPartitionerTest.cxx b/Modules/Core/Common/test/itkThreadedIndexedContainerPartitionerTest.cxx index 643ebb85a69..c1dcb429f5b 100644 --- a/Modules/Core/Common/test/itkThreadedIndexedContainerPartitionerTest.cxx +++ b/Modules/Core/Common/test/itkThreadedIndexedContainerPartitionerTest.cxx @@ -45,7 +45,7 @@ class DomainThreaderAssociate TestDomainThreader() {}; private: - virtual void BeforeThreadedExecution() ITK_OVERRIDE + void BeforeThreadedExecution() override { this->m_DomainInThreadedExecution.resize( this->GetNumberOfThreadsUsed() ); DomainType unsetDomain; @@ -56,8 +56,8 @@ class DomainThreaderAssociate } } - virtual void ThreadedExecution( const DomainType& subdomain, - const itk::ThreadIdType threadId ) ITK_OVERRIDE + void ThreadedExecution( const DomainType& subdomain, + const itk::ThreadIdType threadId ) override { if( threadId == 0 ) { @@ -66,7 +66,7 @@ class DomainThreaderAssociate this->m_DomainInThreadedExecution[threadId] = subdomain; } - virtual void AfterThreadedExecution() ITK_OVERRIDE + void AfterThreadedExecution() override { std::cout << "\nDomain partition per thread:" << std::endl; for( itk::ThreadIdType i = 0; i < m_DomainInThreadedExecution.size(); ++i ) diff --git a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest.cxx b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest.cxx index 3260d71efe5..fa525b8b8b9 100644 --- a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest.cxx +++ b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest.cxx @@ -53,7 +53,7 @@ namespace TestDomainThreader() {}; private: - virtual void BeforeThreadedExecution() ITK_OVERRIDE + void BeforeThreadedExecution() override { this->m_DomainInThreadedExecution.resize( this->GetNumberOfThreadsUsed() ); BorderValuesType unsetBorderValues( 2, -1 ); @@ -63,8 +63,8 @@ namespace } } - virtual void ThreadedExecution( const DomainType& subdomain, - const itk::ThreadIdType threadId ) ITK_OVERRIDE + void ThreadedExecution( const DomainType& subdomain, + const itk::ThreadIdType threadId ) override { if( threadId == 0 ) { @@ -77,7 +77,7 @@ namespace this->m_DomainInThreadedExecution[threadId][1] = *it; } - virtual void AfterThreadedExecution() ITK_OVERRIDE + void AfterThreadedExecution() override { std::cout << "\nDomain partition per thread:" << std::endl; for( itk::ThreadIdType i = 0; i < m_DomainInThreadedExecution.size(); ++i ) diff --git a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest2.cxx b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest2.cxx index 49cc5173433..f92f971ab7c 100644 --- a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest2.cxx +++ b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest2.cxx @@ -56,7 +56,7 @@ namespace TestDomainThreader() {}; private: - virtual void BeforeThreadedExecution() ITK_OVERRIDE + void BeforeThreadedExecution() override { this->m_DomainInThreadedExecution.resize( this->GetNumberOfThreadsUsed() ); BorderValuesType unsetBorderValues( 2, -1 ); @@ -66,8 +66,8 @@ namespace } } - virtual void ThreadedExecution( const DomainType& subdomain, - const itk::ThreadIdType threadId ) ITK_OVERRIDE + void ThreadedExecution( const DomainType& subdomain, + const itk::ThreadIdType threadId ) override { if( threadId == 0 ) { @@ -80,7 +80,7 @@ namespace this->m_DomainInThreadedExecution[threadId][1] = it.Value(); } - virtual void AfterThreadedExecution() ITK_OVERRIDE + void AfterThreadedExecution() override { std::cout << "\nDomain partition per thread:" << std::endl; for( itk::ThreadIdType i = 0; i < m_DomainInThreadedExecution.size(); ++i ) diff --git a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest3.cxx b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest3.cxx index 4f45f7fe814..0801b83f0f6 100644 --- a/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest3.cxx +++ b/Modules/Core/Common/test/itkThreadedIteratorRangePartitionerTest3.cxx @@ -56,7 +56,7 @@ namespace TestDomainThreader() {}; private: - virtual void BeforeThreadedExecution() ITK_OVERRIDE + void BeforeThreadedExecution() override { this->m_DomainInThreadedExecution.resize( this->GetNumberOfThreadsUsed() ); BorderValuesType unsetBorderValues( 2, -1 ); @@ -66,8 +66,8 @@ namespace } } - virtual void ThreadedExecution( const DomainType& subdomain, - const itk::ThreadIdType threadId ) ITK_OVERRIDE + void ThreadedExecution( const DomainType& subdomain, + const itk::ThreadIdType threadId ) override { if( threadId == 0 ) { @@ -80,7 +80,7 @@ namespace this->m_DomainInThreadedExecution[threadId][1] = it.Index(); } - virtual void AfterThreadedExecution() ITK_OVERRIDE + void AfterThreadedExecution() override { std::cout << "\nDomain partition per thread:" << std::endl; for( itk::ThreadIdType i = 0; i < m_DomainInThreadedExecution.size(); ++i ) diff --git a/Modules/Core/Common/test/itkTreeContainerTest2.cxx b/Modules/Core/Common/test/itkTreeContainerTest2.cxx index 897ea766f22..5f80395d64c 100644 --- a/Modules/Core/Common/test/itkTreeContainerTest2.cxx +++ b/Modules/Core/Common/test/itkTreeContainerTest2.cxx @@ -133,12 +133,12 @@ class TreeChangeListener : public itk::Command typedef itk::SmartPointer ConstPointer; itkNewMacro(Self); - virtual void Execute( itk::Object*, const itk::EventObject& event ) ITK_OVERRIDE + void Execute( itk::Object*, const itk::EventObject& event ) override { std::cout << event.GetEventName() << std::endl; } - virtual void Execute( const itk::Object *, const itk::EventObject &event ) ITK_OVERRIDE + void Execute( const itk::Object *, const itk::EventObject &event ) override { std::cout << event.GetEventName(); diff --git a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.h b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.h index 3d7ab152845..6beccf125f0 100644 --- a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.h +++ b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.h @@ -117,18 +117,18 @@ class ITK_TEMPLATE_EXPORT DenseFiniteDifferenceImageFilter: protected: DenseFiniteDifferenceImageFilter() { m_UpdateBuffer = UpdateBufferType::New(); } - ~DenseFiniteDifferenceImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DenseFiniteDifferenceImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** A simple method to copy the data from the input to the output. ( Supports * "read-only" image adaptors in the case where the input image type converts * to a different output image type. ) */ - virtual void CopyInputToOutput() ITK_OVERRIDE; + void CopyInputToOutput() override; /** This method applies changes from the m_UpdateBuffer to the output using * the ThreadedApplyUpdate() method and a multithreading mechanism. "dt" is * the time step to use for the update of each pixel. */ - virtual void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE; + void ApplyUpdate(const TimeStepType& dt) override; /** Method to allow subclasses to get direct access to the update * buffer */ @@ -138,11 +138,11 @@ class ITK_TEMPLATE_EXPORT DenseFiniteDifferenceImageFilter: /** This method populates an update buffer with changes for each pixel in the * output using the ThreadedCalculateChange() method and a multithreading * mechanism. Returns value is a time step to be used for the update. */ - virtual TimeStepType CalculateChange() ITK_OVERRIDE; + TimeStepType CalculateChange() override; /** This method allocates storage in m_UpdateBuffer. It is called from * Superclass::GenerateData(). */ - virtual void AllocateUpdateBuffer() ITK_OVERRIDE; + void AllocateUpdateBuffer() override; /** The type of region used for multithreading */ typedef typename UpdateBufferType::RegionType ThreadRegionType; diff --git a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx index 358c21348f3..1205e36c8e4 100644 --- a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx +++ b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx @@ -36,7 +36,7 @@ DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage > if ( !input || !output ) { - itkExceptionMacro(<< "Either input and/or output is ITK_NULLPTR."); + itkExceptionMacro(<< "Either input and/or output is nullptr."); } // Check if we are doing in-place filtering diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h index f68344f0e7d..48d77d4988e 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h @@ -182,9 +182,9 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceFunction:public LightObject protected: FiniteDifferenceFunction(); - ~FiniteDifferenceFunction() ITK_OVERRIDE {} + ~FiniteDifferenceFunction() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; RadiusType m_Radius; PixelRealType m_ScaleCoefficients[ImageDimension]; diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.h b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.h index fd95b6d67e8..ac99fd5e3c8 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.h +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.h @@ -223,12 +223,12 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceImageFilter: protected: FiniteDifferenceImageFilter(); - virtual ~FiniteDifferenceImageFilter() ITK_OVERRIDE; + ~FiniteDifferenceImageFilter() override; /** State that the filter is in, i.e. UNINITIALIZED or INITIALIZED */ bool m_IsInitialized; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** This method allocates a temporary update container in the subclass. */ virtual void AllocateUpdateBuffer() = 0; @@ -253,7 +253,7 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceImageFilter: /** This is the default, high-level algorithm for calculating finite * difference solutions. It calls virtual methods in its subclasses * to implement the major steps of the algorithm. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** FiniteDifferenceImageFilter needs a larger input requested region than * the output requested region. As such, we need to provide @@ -266,7 +266,7 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceImageFilter: * handled as described in the FiniteDifferenceFunction defined by the * subclass. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This method returns true when the current iterative solution of the * equation has met the criteria to stop solving. Defined by a subclass. */ diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx index a8b437af2cb..ea5de22bd51 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx @@ -31,7 +31,7 @@ FiniteDifferenceImageFilter< TInputImage, TOutputImage > { m_UseImageSpacing = true; m_ElapsedIterations = 0; - m_DifferenceFunction = ITK_NULLPTR; + m_DifferenceFunction = nullptr; m_NumberOfIterations = NumericTraits< IdentifierType >::max(); m_MaximumRMSError = 0.0; m_RMSChange = 0.0; @@ -264,9 +264,9 @@ FiniteDifferenceImageFilter< TInputImage, TOutputImage > if ( this->m_UseImageSpacing ) { const TOutputImage *outputImage = this->GetOutput(); - if ( outputImage == ITK_NULLPTR ) + if ( outputImage == nullptr ) { - itkExceptionMacro("Output image is ITK_NULLPTR"); + itkExceptionMacro("Output image is nullptr"); } typedef typename TOutputImage::SpacingType SpacingType; diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.h b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.h index e7c989da9eb..5b13b2337d7 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.h +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.h @@ -114,17 +114,17 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceSparseImageFilter: protected: FiniteDifferenceSparseImageFilter(); - ~FiniteDifferenceSparseImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FiniteDifferenceSparseImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** This method splits the active pixels of the sparse image into equal size * lists for multi-threading. These lists remain constant throughout the * operation of this filter. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** This class does not use AllocateUpdateBuffer to allocate memory for its * narrow band. All memory is handled through the SparseImage class. */ - virtual void AllocateUpdateBuffer() ITK_OVERRIDE {} + void AllocateUpdateBuffer() override {} /** This function can be used to implements constraints on the range of data * values. Default is no constraint. */ @@ -146,7 +146,7 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceSparseImageFilter: /** This function updates the m_Data variable in the output image nodes using the update values computed by CalculateChange. */ - virtual void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE; + void ApplyUpdate(const TimeStepType& dt) override; /** Multi-threaded implementation of ApplyUpdate. */ static ITK_THREAD_RETURN_TYPE ApplyUpdateThreaderCallback(void *arg); @@ -157,7 +157,7 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceSparseImageFilter: /** This method computes changes to the output image using the ComputeSparseUpdate method in the Sparse Function object. */ - virtual TimeStepType CalculateChange() ITK_OVERRIDE; + TimeStepType CalculateChange() override; /** Multuthreaded implementation of CalculateChange */ static ITK_THREAD_RETURN_TYPE CalculateChangeThreaderCallback(void *arg); diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx index ca37f4caf1e..474e2478b23 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx @@ -26,7 +26,7 @@ template< typename TInputImageType, typename TSparseOutputImageType > FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType > ::FiniteDifferenceSparseImageFilter() { - m_SparseFunction = ITK_NULLPTR; + m_SparseFunction = nullptr; m_PrecomputeFlag = false; } diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h index 8346004174b..d7fc92dd693 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h @@ -81,11 +81,11 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceSparseImageFunction: * class because we need to work with neighborhoods of pointers to data * variables instead of neighborhoods of data directly. This function is * replaced by the ComputeSparseUpdate function. */ - virtual PixelType ComputeUpdate(const NeighborhoodType &, + PixelType ComputeUpdate(const NeighborhoodType &, void *, - const FloatOffsetType &) ITK_OVERRIDE + const FloatOffsetType &) override { - return static_cast< PixelType >( ITK_NULLPTR ); + return static_cast< PixelType >( nullptr ); } /** The update called from the FiniteDifferenceSparseImageFilter. This @@ -109,8 +109,8 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceSparseImageFunction: protected: FiniteDifferenceSparseImageFunction() {} - ~FiniteDifferenceSparseImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FiniteDifferenceSparseImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FiniteDifferenceSparseImageFunction); diff --git a/Modules/Core/GPUCommon/include/itkGPUDataManager.h b/Modules/Core/GPUCommon/include/itkGPUDataManager.h index 256c0d89ab6..dbd5deeaad7 100644 --- a/Modules/Core/GPUCommon/include/itkGPUDataManager.h +++ b/Modules/Core/GPUCommon/include/itkGPUDataManager.h @@ -118,8 +118,8 @@ class GPUDataManager : public Object //DataObject// protected: GPUDataManager(); - virtual ~GPUDataManager() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GPUDataManager() override; + void PrintSelf(std::ostream & os, Indent indent) const override; protected: /* NOTE: ivars are protected instead of private to improve performance access in child classes*/ diff --git a/Modules/Core/GPUCommon/include/itkGPUImage.h b/Modules/Core/GPUCommon/include/itkGPUImage.h index c338f6d9e27..a66c6aa0923 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImage.h +++ b/Modules/Core/GPUCommon/include/itkGPUImage.h @@ -76,9 +76,9 @@ class ITK_TEMPLATE_EXPORT GPUImage : public Image // // Allocate CPU and GPU memory space // - virtual void Allocate(bool initialize=false) ITK_OVERRIDE; + void Allocate(bool initialize=false) override; - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; void FillBuffer(const TPixel & value); @@ -98,9 +98,9 @@ class ITK_TEMPLATE_EXPORT GPUImage : public Image // // Get CPU buffer pointer // - TPixel* GetBufferPointer() ITK_OVERRIDE; + TPixel* GetBufferPointer() override; - const TPixel * GetBufferPointer() const ITK_OVERRIDE; + const TPixel * GetBufferPointer() const override; /** Return the Pixel Accessor object */ AccessorType GetPixelAccessor(void) @@ -165,7 +165,7 @@ class ITK_TEMPLATE_EXPORT GPUImage : public Image * increment GPU's time stamp in GPUGenerateData() the * CPU's time stamp will be increased after that. */ - void DataHasBeenGenerated() ITK_OVERRIDE + void DataHasBeenGenerated() override { Superclass::DataHasBeenGenerated(); if( m_DataManager->IsCPUBufferDirty() ) @@ -178,9 +178,9 @@ class ITK_TEMPLATE_EXPORT GPUImage : public Image virtual void Graft(const Self *data); protected: - virtual void Graft(const DataObject *data) ITK_OVERRIDE; + void Graft(const DataObject *data) override; GPUImage(); - virtual ~GPUImage() ITK_OVERRIDE; + ~GPUImage() override; using Superclass::Graft; private: @@ -197,10 +197,10 @@ class ITK_TEMPLATE_EXPORT GPUImageFactory : public itk::ObjectFactoryBase typedef itk::SmartPointer ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char* GetITKSourceVersion() const ITK_OVERRIDE { + const char* GetITKSourceVersion() const override { return ITK_SOURCE_VERSION; } - const char* GetDescription() const ITK_OVERRIDE { + const char* GetDescription() const override { return "A Factory for GPUImage"; } diff --git a/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h b/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h index ac59aefbb46..1a9caa9a0e6 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h +++ b/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h @@ -75,7 +75,7 @@ class ITK_TEMPLATE_EXPORT GPUImageDataManager : public GPUDataManager protected: GPUImageDataManager() {} - virtual ~GPUImageDataManager() ITK_OVERRIDE {} + ~GPUImageDataManager() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(GPUImageDataManager); diff --git a/Modules/Core/GPUCommon/include/itkGPUImageDataManager.hxx b/Modules/Core/GPUCommon/include/itkGPUImageDataManager.hxx index d71b8962e6a..fafbd49bc31 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImageDataManager.hxx +++ b/Modules/Core/GPUCommon/include/itkGPUImageDataManager.hxx @@ -76,13 +76,13 @@ void GPUImageDataManager< ImageType >::MakeCPUBufferUpToDate() * correctly managed. Therefore, we check the time stamp of * CPU and GPU data as well */ - if( (m_IsCPUBufferDirty || (gpu_time > cpu_time) ) && m_GPUBuffer != ITK_NULLPTR && m_CPUBuffer != ITK_NULLPTR ) + if( (m_IsCPUBufferDirty || (gpu_time > cpu_time) ) && m_GPUBuffer != nullptr && m_CPUBuffer != nullptr ) { cl_int errid; itkDebugMacro(<< "GPU->CPU data copy" ); errid = clEnqueueReadBuffer(m_ContextManager->GetCommandQueue( - m_CommandQueueId), m_GPUBuffer, CL_TRUE, 0, m_BufferSize, m_CPUBuffer, 0, ITK_NULLPTR, - ITK_NULLPTR); + m_CommandQueueId), m_GPUBuffer, CL_TRUE, 0, m_BufferSize, m_CPUBuffer, 0, nullptr, + nullptr); OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); m_Image->Modified(); @@ -113,13 +113,13 @@ void GPUImageDataManager< ImageType >::MakeGPUBufferUpToDate() * correctly managed. Therefore, we check the time stamp of * CPU and GPU data as well */ - if( (m_IsGPUBufferDirty || (gpu_time < cpu_time) ) && m_CPUBuffer != ITK_NULLPTR && m_GPUBuffer != ITK_NULLPTR ) + if( (m_IsGPUBufferDirty || (gpu_time < cpu_time) ) && m_CPUBuffer != nullptr && m_GPUBuffer != nullptr ) { cl_int errid; itkDebugMacro(<< "CPU->GPU data copy"); errid = clEnqueueWriteBuffer(m_ContextManager->GetCommandQueue( - m_CommandQueueId), m_GPUBuffer, CL_TRUE, 0, m_BufferSize, m_CPUBuffer, 0, ITK_NULLPTR, - ITK_NULLPTR); + m_CommandQueueId), m_GPUBuffer, CL_TRUE, 0, m_BufferSize, m_CPUBuffer, 0, nullptr, + nullptr); OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); this->SetTimeStamp( cpu_time_stamp ); diff --git a/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.h b/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.h index 54cccce4477..c820f9a916f 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.h +++ b/Modules/Core/GPUCommon/include/itkGPUImageToImageFilter.h @@ -72,17 +72,17 @@ class ITK_TEMPLATE_EXPORT GPUImageToImageFilter : public TParentImageFilter itkGetConstMacro(GPUEnabled, bool); itkBooleanMacro(GPUEnabled); - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; virtual void GraftOutput(typename itk::GPUTraits< TOutputImage >::Type *output); virtual void GraftOutput(const DataObjectIdentifierType & key, typename itk::GPUTraits< TOutputImage >::Type *output); protected: - virtual void GraftOutput(DataObject *output) ITK_OVERRIDE; - virtual void GraftOutput(const DataObjectIdentifierType & key, DataObject *output) ITK_OVERRIDE; + void GraftOutput(DataObject *output) override; + void GraftOutput(const DataObjectIdentifierType & key, DataObject *output) override; GPUImageToImageFilter(); - ~GPUImageToImageFilter() ITK_OVERRIDE; + ~GPUImageToImageFilter() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; virtual void GPUGenerateData() { } diff --git a/Modules/Core/GPUCommon/include/itkGPUInPlaceImageFilter.h b/Modules/Core/GPUCommon/include/itkGPUInPlaceImageFilter.h index 82ca17e32b2..6d44813b549 100644 --- a/Modules/Core/GPUCommon/include/itkGPUInPlaceImageFilter.h +++ b/Modules/Core/GPUCommon/include/itkGPUInPlaceImageFilter.h @@ -67,9 +67,9 @@ class ITK_TEMPLATE_EXPORT GPUInPlaceImageFilter : public GPUImageToImageFilter< protected: GPUInPlaceImageFilter(); - ~GPUInPlaceImageFilter() ITK_OVERRIDE; + ~GPUInPlaceImageFilter() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** The GenerateData method normally allocates the buffers for all * of the outputs of a filter. Since InPlaceImageFilter's can use an @@ -83,7 +83,7 @@ class ITK_TEMPLATE_EXPORT GPUInPlaceImageFilter : public GPUImageToImageFilter< * an InPlaceFilter is not threaded (i.e. it provides an * implementation of GenerateData()), then this method (or * equivalent) must be called in GenerateData(). */ - virtual void AllocateOutputs() ITK_OVERRIDE; + void AllocateOutputs() override; /** InPlaceImageFilter may transfer ownership of the input bulk data * to the output object. Once the output object owns the bulk data @@ -94,7 +94,7 @@ class ITK_TEMPLATE_EXPORT GPUInPlaceImageFilter : public GPUImageToImageFilter< * releases the input that it has overwritten. * * \sa ProcessObject::ReleaseInputs() */ - virtual void ReleaseInputs() ITK_OVERRIDE; + void ReleaseInputs() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GPUInPlaceImageFilter); diff --git a/Modules/Core/GPUCommon/include/itkGPUKernelManager.h b/Modules/Core/GPUCommon/include/itkGPUKernelManager.h index 21241560b76..c0560e80a71 100644 --- a/Modules/Core/GPUCommon/include/itkGPUKernelManager.h +++ b/Modules/Core/GPUCommon/include/itkGPUKernelManager.h @@ -137,7 +137,7 @@ class GPUKernelManager : public LightObject protected: GPUKernelManager(); - virtual ~GPUKernelManager() ITK_OVERRIDE; + ~GPUKernelManager() override; bool CheckArgumentReady(int kernelIdx); diff --git a/Modules/Core/GPUCommon/include/itkGPUReduction.h b/Modules/Core/GPUCommon/include/itkGPUReduction.h index 52542684467..b20a3e139fc 100644 --- a/Modules/Core/GPUCommon/include/itkGPUReduction.h +++ b/Modules/Core/GPUCommon/include/itkGPUReduction.h @@ -68,7 +68,7 @@ class ITK_TEMPLATE_EXPORT GPUReduction : void GetNumBlocksAndThreads(int whichKernel, int n, int maxBlocks, int maxThreads, int &blocks, int &threads); unsigned int GetReductionKernel(int whichKernel, int blockSize, int isPowOf2); - void AllocateGPUInputBuffer(TElement *h_idata = ITK_NULLPTR); + void AllocateGPUInputBuffer(TElement *h_idata = nullptr); void ReleaseGPUInputBuffer(); void InitializeKernel(unsigned int size); @@ -90,8 +90,8 @@ class ITK_TEMPLATE_EXPORT GPUReduction : protected: GPUReduction(); - ~GPUReduction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GPUReduction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** GPU kernel manager for GPUFiniteDifferenceFunction class */ GPUKernelManager::Pointer m_GPUKernelManager; diff --git a/Modules/Core/GPUCommon/include/itkGPUReduction.hxx b/Modules/Core/GPUCommon/include/itkGPUReduction.hxx index 8850b5b2ff7..f6ea2fe223e 100644 --- a/Modules/Core/GPUCommon/include/itkGPUReduction.hxx +++ b/Modules/Core/GPUCommon/include/itkGPUReduction.hxx @@ -34,7 +34,7 @@ GPUReduction< TElement > { /*** Prepare GPU opencl program ***/ m_GPUKernelManager = GPUKernelManager::New(); - m_GPUDataManager = ITK_NULLPTR; + m_GPUDataManager = nullptr; m_ReduceGPUKernelHandle = 0; m_TestGPUKernelHandle = 0; @@ -175,7 +175,7 @@ void GPUReduction< TElement > ::ReleaseGPUInputBuffer() { - if (m_GPUDataManager == (GPUDataPointer)ITK_NULLPTR) + if (m_GPUDataManager == (GPUDataPointer)nullptr) { return; } @@ -312,7 +312,7 @@ GPUReduction< TElement > this->m_GPUKernelManager->SetKernelArg(m_ReduceGPUKernelHandle, argidx++, sizeof(cl_int), &n); //shared memory below - this->m_GPUKernelManager->SetKernelArg(m_ReduceGPUKernelHandle, argidx++, sizeof(TElement) * numThreads, ITK_NULLPTR); + this->m_GPUKernelManager->SetKernelArg(m_ReduceGPUKernelHandle, argidx++, sizeof(TElement) * numThreads, nullptr); size_t globalSize[1]; size_t localSize[1]; diff --git a/Modules/Core/GPUCommon/include/itkGPUUnaryFunctorImageFilter.h b/Modules/Core/GPUCommon/include/itkGPUUnaryFunctorImageFilter.h index 263bcc3b097..193d7390e42 100644 --- a/Modules/Core/GPUCommon/include/itkGPUUnaryFunctorImageFilter.h +++ b/Modules/Core/GPUCommon/include/itkGPUUnaryFunctorImageFilter.h @@ -84,11 +84,11 @@ class ITK_TEMPLATE_EXPORT GPUUnaryFunctorImageFilter : public GPUInPlaceImageFil protected: GPUUnaryFunctorImageFilter() { } - virtual ~GPUUnaryFunctorImageFilter() ITK_OVERRIDE {} + ~GPUUnaryFunctorImageFilter() override {} - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - virtual void GPUGenerateData() ITK_OVERRIDE; + void GPUGenerateData() override; /** GPU kernel handle is defined here instead of in the child class * because GPUGenerateData() in this base class is used. */ diff --git a/Modules/Core/GPUCommon/src/itkGPUContextManager.cxx b/Modules/Core/GPUCommon/src/itkGPUContextManager.cxx index 7724d69b317..c94b4378765 100644 --- a/Modules/Core/GPUCommon/src/itkGPUContextManager.cxx +++ b/Modules/Core/GPUCommon/src/itkGPUContextManager.cxx @@ -21,11 +21,11 @@ namespace itk { // static variable initialization -GPUContextManager* GPUContextManager::m_Instance = ITK_NULLPTR; +GPUContextManager* GPUContextManager::m_Instance = nullptr; GPUContextManager* GPUContextManager::GetInstance() { - if(m_Instance == ITK_NULLPTR) + if(m_Instance == nullptr) { m_Instance = new GPUContextManager(); } @@ -35,7 +35,7 @@ GPUContextManager* GPUContextManager::GetInstance() void GPUContextManager::DestroyInstance() { m_Instance->Delete(); - m_Instance = ITK_NULLPTR; + m_Instance = nullptr; itkDebugStatement(std::cout << "OpenCL context is destroyed." << std::endl); } @@ -44,12 +44,12 @@ GPUContextManager::GPUContextManager() cl_int errid; // Get the platforms - errid = clGetPlatformIDs(0, ITK_NULLPTR, &m_NumberOfPlatforms); + errid = clGetPlatformIDs(0, nullptr, &m_NumberOfPlatforms); OpenCLCheckError( errid, __FILE__, __LINE__, ITK_LOCATION ); // Get NVIDIA platform by default m_Platform = OpenCLSelectPlatform("NVIDIA"); - assert(m_Platform != ITK_NULLPTR); + assert(m_Platform != nullptr); cl_device_type devType = CL_DEVICE_TYPE_GPU;//CL_DEVICE_TYPE_CPU;// @@ -57,8 +57,8 @@ GPUContextManager::GPUContextManager() m_Devices = OpenCLGetAvailableDevices(m_Platform, devType, &m_NumberOfDevices); // create context - m_Context = clCreateContext(ITK_NULLPTR, m_NumberOfDevices, m_Devices, ITK_NULLPTR, ITK_NULLPTR, &errid); -// m_Context = clCreateContext(0, m_NumberOfDevices, m_Devices, clLogMessagesToStdoutAPPLE, ITK_NULLPTR, &errid); + m_Context = clCreateContext(nullptr, m_NumberOfDevices, m_Devices, nullptr, nullptr, &errid); +// m_Context = clCreateContext(0, m_NumberOfDevices, m_Devices, clLogMessagesToStdoutAPPLE, nullptr, &errid); OpenCLCheckError( errid, __FILE__, __LINE__, ITK_LOCATION ); diff --git a/Modules/Core/GPUCommon/src/itkGPUDataManager.cxx b/Modules/Core/GPUCommon/src/itkGPUDataManager.cxx index dea9bc6ca53..f8b307ebc43 100644 --- a/Modules/Core/GPUCommon/src/itkGPUDataManager.cxx +++ b/Modules/Core/GPUCommon/src/itkGPUDataManager.cxx @@ -25,8 +25,8 @@ namespace itk GPUDataManager::GPUDataManager() { m_ContextManager = GPUContextManager::GetInstance(); - m_GPUBuffer = ITK_NULLPTR; - m_CPUBuffer = ITK_NULLPTR; + m_GPUBuffer = nullptr; + m_CPUBuffer = nullptr; this->Initialize(); } @@ -58,7 +58,7 @@ void GPUDataManager::Allocate() #ifdef VERBOSE std::cout << this << "::Allocate Create GPU buffer of size " << m_BufferSize << " Bytes" << std::endl; #endif - m_GPUBuffer = clCreateBuffer(m_ContextManager->GetCurrentContext(), m_MemFlags, m_BufferSize, ITK_NULLPTR, &errid); + m_GPUBuffer = clCreateBuffer(m_ContextManager->GetCurrentContext(), m_MemFlags, m_BufferSize, nullptr, &errid); OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); m_IsGPUBufferDirty = true; } @@ -98,14 +98,14 @@ void GPUDataManager::UpdateCPUBuffer() { MutexHolderType holder(m_Mutex); - if( m_IsCPUBufferDirty && m_GPUBuffer != ITK_NULLPTR && m_CPUBuffer != ITK_NULLPTR ) + if( m_IsCPUBufferDirty && m_GPUBuffer != nullptr && m_CPUBuffer != nullptr ) { cl_int errid; #ifdef VERBOSE std::cout << this << "::UpdateCPUBuffer GPU->CPU data copy " << m_GPUBuffer << "->" << m_CPUBuffer << std::endl; #endif errid = clEnqueueReadBuffer(m_ContextManager->GetCommandQueue( - m_CommandQueueId), m_GPUBuffer, CL_TRUE, 0, m_BufferSize, m_CPUBuffer, 0, ITK_NULLPTR, ITK_NULLPTR); + m_CommandQueueId), m_GPUBuffer, CL_TRUE, 0, m_BufferSize, m_CPUBuffer, 0, nullptr, nullptr); OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); m_IsCPUBufferDirty = false; @@ -116,14 +116,14 @@ void GPUDataManager::UpdateGPUBuffer() { MutexHolderType mutexHolder(m_Mutex); - if( m_IsGPUBufferDirty && m_CPUBuffer != ITK_NULLPTR && m_GPUBuffer != ITK_NULLPTR ) + if( m_IsGPUBufferDirty && m_CPUBuffer != nullptr && m_GPUBuffer != nullptr ) { cl_int errid; #ifdef VERBOSE std::cout << this << "::UpdateGPUBuffer CPU->GPU data copy " << m_CPUBuffer << "->" << m_GPUBuffer << std::endl; #endif errid = clEnqueueWriteBuffer(m_ContextManager->GetCommandQueue( - m_CommandQueueId), m_GPUBuffer, CL_TRUE, 0, m_BufferSize, m_CPUBuffer, 0, ITK_NULLPTR, ITK_NULLPTR); + m_CommandQueueId), m_GPUBuffer, CL_TRUE, 0, m_BufferSize, m_CPUBuffer, 0, nullptr, nullptr); OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); m_IsGPUBufferDirty = false; @@ -223,8 +223,8 @@ void GPUDataManager::Initialize() } m_BufferSize = 0; - m_GPUBuffer = ITK_NULLPTR; - m_CPUBuffer = ITK_NULLPTR; + m_GPUBuffer = nullptr; + m_CPUBuffer = nullptr; m_MemFlags = CL_MEM_READ_WRITE; // default flag m_IsGPUBufferDirty = false; m_IsCPUBufferDirty = false; diff --git a/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx b/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx index e4845e22ef0..05cfd71b61e 100644 --- a/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx +++ b/Modules/Core/GPUCommon/src/itkGPUKernelManager.cxx @@ -22,7 +22,7 @@ namespace itk { GPUKernelManager::GPUKernelManager() { - m_Program = ITK_NULLPTR; + m_Program = nullptr; m_Manager = GPUContextManager::GetInstance(); if(m_Manager->GetNumberOfCommandQueues() > 0) m_CommandQueueId = 0; // default @@ -41,7 +41,7 @@ GPUKernelManager::~GPUKernelManager() m_KernelContainer.pop_back(); } - if(m_Program != ITK_NULLPTR) + if(m_Program != nullptr) { errid = clReleaseProgram(m_Program); OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); @@ -51,7 +51,7 @@ GPUKernelManager::~GPUKernelManager() bool GPUKernelManager::LoadProgramFromFile(const char* filename, const char* cPreamble) { // locals - FILE* pFileStream = ITK_NULLPTR; + FILE* pFileStream = nullptr; size_t szSourceLength; size_t szFinalLength; @@ -66,7 +66,7 @@ bool GPUKernelManager::LoadProgramFromFile(const char* filename, const char* cPr // printout OpenCL source Path std::cout << "Loading source file: " << filename << std::endl; pFileStream = fopen(filename, "rb"); - if(pFileStream == ITK_NULLPTR) + if(pFileStream == nullptr) { itkWarningMacro("Cannot open OpenCL source file"); return false; @@ -114,7 +114,7 @@ bool GPUKernelManager::LoadProgramFromFile(const char* filename, const char* cPr } // build program - errid = clBuildProgram(m_Program, 0, ITK_NULLPTR, ITK_NULLPTR, ITK_NULLPTR, ITK_NULLPTR); + errid = clBuildProgram(m_Program, 0, nullptr, nullptr, nullptr, nullptr); if(errid != CL_SUCCESS) { //itkWarningMacro("OpenCL program build error"); @@ -123,13 +123,13 @@ bool GPUKernelManager::LoadProgramFromFile(const char* filename, const char* cPr size_t paramValueSize = 0; // get error message size - clGetProgramBuildInfo(m_Program, m_Manager->GetDeviceId(0), CL_PROGRAM_BUILD_LOG, 0, ITK_NULLPTR, ¶mValueSize); + clGetProgramBuildInfo(m_Program, m_Manager->GetDeviceId(0), CL_PROGRAM_BUILD_LOG, 0, nullptr, ¶mValueSize); char *paramValue; paramValue = (char*)malloc(paramValueSize); // get error message - clGetProgramBuildInfo(m_Program, m_Manager->GetDeviceId(0), CL_PROGRAM_BUILD_LOG, paramValueSize, paramValue, ITK_NULLPTR); + clGetProgramBuildInfo(m_Program, m_Manager->GetDeviceId(0), CL_PROGRAM_BUILD_LOG, paramValueSize, paramValue, nullptr); /* std::ostringstream itkmsg; @@ -187,7 +187,7 @@ bool GPUKernelManager::LoadProgramFromString(const char* cSource, const char* cP } // build program - errid = clBuildProgram(m_Program, 0, ITK_NULLPTR, ITK_NULLPTR, ITK_NULLPTR, ITK_NULLPTR); + errid = clBuildProgram(m_Program, 0, nullptr, nullptr, nullptr, nullptr); if(errid != CL_SUCCESS) { //itkWarningMacro("OpenCL program build error"); @@ -196,13 +196,13 @@ bool GPUKernelManager::LoadProgramFromString(const char* cSource, const char* cP size_t paramValueSize = 0; // get error message size - clGetProgramBuildInfo(m_Program, m_Manager->GetDeviceId(0), CL_PROGRAM_BUILD_LOG, 0, ITK_NULLPTR, ¶mValueSize); + clGetProgramBuildInfo(m_Program, m_Manager->GetDeviceId(0), CL_PROGRAM_BUILD_LOG, 0, nullptr, ¶mValueSize); char *paramValue; paramValue = (char*)malloc(paramValueSize); // get error message - clGetProgramBuildInfo(m_Program, m_Manager->GetDeviceId(0), CL_PROGRAM_BUILD_LOG, paramValueSize, paramValue, ITK_NULLPTR); + clGetProgramBuildInfo(m_Program, m_Manager->GetDeviceId(0), CL_PROGRAM_BUILD_LOG, paramValueSize, paramValue, nullptr); /* std::ostringstream itkmsg; @@ -245,7 +245,7 @@ int GPUKernelManager::CreateKernel(const char* kernelName) // argument list m_KernelArgumentReady.push_back( std::vector< KernelArgumentList >() ); cl_uint nArg; - errid = clGetKernelInfo( newKernel, CL_KERNEL_NUM_ARGS, sizeof(cl_uint), &nArg, ITK_NULLPTR); + errid = clGetKernelInfo( newKernel, CL_KERNEL_NUM_ARGS, sizeof(cl_uint), &nArg, nullptr); (m_KernelArgumentReady.back() ).resize( nArg ); ResetArguments( (int)m_KernelContainer.size()-1 ); @@ -291,7 +291,7 @@ cl_int GPUKernelManager::GetDeviceInfo( { case CL_DEVICE_MAX_WORK_ITEM_SIZES: errid = clGetDeviceInfo(m_Manager->GetDeviceId(0), - CL_DEVICE_MAX_WORK_ITEM_SIZES, argSize, argValue, ITK_NULLPTR); + CL_DEVICE_MAX_WORK_ITEM_SIZES, argSize, argValue, nullptr); break; default: itkGenericExceptionMacro (<< "Unknown type of device info"); @@ -311,7 +311,7 @@ bool GPUKernelManager::SetKernelArg(int kernelIdx, cl_uint argIdx, size_t argSiz OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); m_KernelArgumentReady[kernelIdx][argIdx].m_IsReady = true; - m_KernelArgumentReady[kernelIdx][argIdx].m_GPUDataManager = (GPUDataManager::Pointer)ITK_NULLPTR; + m_KernelArgumentReady[kernelIdx][argIdx].m_GPUDataManager = (GPUDataManager::Pointer)nullptr; return true; } @@ -341,7 +341,7 @@ bool GPUKernelManager::CheckArgumentReady(int kernelIdx) if(!(m_KernelArgumentReady[kernelIdx][i].m_IsReady) ) return false; // automatic synchronization before kernel launch - if(m_KernelArgumentReady[kernelIdx][i].m_GPUDataManager != (GPUDataManager::Pointer)ITK_NULLPTR) + if(m_KernelArgumentReady[kernelIdx][i].m_GPUDataManager != (GPUDataManager::Pointer)nullptr) { m_KernelArgumentReady[kernelIdx][i].m_GPUDataManager->SetCPUBufferDirty(); } @@ -356,7 +356,7 @@ void GPUKernelManager::ResetArguments(int kernelIdx) for(int i=0; iGetCommandQueue( -// m_CommandQueueId), m_KernelContainer[kernelIdx], 1, ITK_NULLPTR, &globalWorkSize, -// &localWorkSize, 0, ITK_NULLPTR, ITK_NULLPTR); +// m_CommandQueueId), m_KernelContainer[kernelIdx], 1, nullptr, &globalWorkSize, +// &localWorkSize, 0, nullptr, nullptr); errid = clEnqueueNDRangeKernel(m_Manager->GetCommandQueue( - m_CommandQueueId), m_KernelContainer[kernelIdx], 1, ITK_NULLPTR, &globalWorkSize, - ITK_NULLPTR, 0, ITK_NULLPTR, ITK_NULLPTR); + m_CommandQueueId), m_KernelContainer[kernelIdx], 1, nullptr, &globalWorkSize, + nullptr, 0, nullptr, nullptr); OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); if(errid != CL_SUCCESS) @@ -412,10 +412,10 @@ bool GPUKernelManager::LaunchKernel2D(int kernelIdx, cl_int errid; // TODO should we allow the user to determine localWorkSize? // errid = clEnqueueNDRangeKernel(m_Manager->GetCommandQueue( -// m_CommandQueueId), m_KernelContainer[kernelIdx], 2, ITK_NULLPTR, gws, -// lws, 0, ITK_NULLPTR, ITK_NULLPTR); +// m_CommandQueueId), m_KernelContainer[kernelIdx], 2, nullptr, gws, +// lws, 0, nullptr, nullptr); errid = clEnqueueNDRangeKernel(m_Manager->GetCommandQueue( - m_CommandQueueId), m_KernelContainer[kernelIdx], 2, ITK_NULLPTR, gws, ITK_NULLPTR, 0, ITK_NULLPTR, ITK_NULLPTR); + m_CommandQueueId), m_KernelContainer[kernelIdx], 2, nullptr, gws, nullptr, 0, nullptr, nullptr); OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); if(errid != CL_SUCCESS) @@ -452,9 +452,9 @@ bool GPUKernelManager::LaunchKernel3D(int kernelIdx, cl_int errid; // TODO should we allow the user to determine localWorkSize? // errid = clEnqueueNDRangeKernel(m_Manager->GetCommandQueue( -// m_CommandQueueId), m_KernelContainer[kernelIdx], 3, ITK_NULLPTR, gws, lws, 0, ITK_NULLPTR, ITK_NULLPTR); +// m_CommandQueueId), m_KernelContainer[kernelIdx], 3, nullptr, gws, lws, 0, nullptr, nullptr); errid = clEnqueueNDRangeKernel(m_Manager->GetCommandQueue( - m_CommandQueueId), m_KernelContainer[kernelIdx], 3, ITK_NULLPTR, gws, ITK_NULLPTR, 0, ITK_NULLPTR, ITK_NULLPTR); + m_CommandQueueId), m_KernelContainer[kernelIdx], 3, nullptr, gws, nullptr, 0, nullptr, nullptr); OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); if(errid != CL_SUCCESS) @@ -485,8 +485,8 @@ bool GPUKernelManager::LaunchKernel(int kernelIdx, int dim, size_t *globalWorkSi cl_int errid; errid = clEnqueueNDRangeKernel(m_Manager->GetCommandQueue( - m_CommandQueueId), m_KernelContainer[kernelIdx], (cl_uint)dim, ITK_NULLPTR, globalWorkSize, - localWorkSize, 0, ITK_NULLPTR, ITK_NULLPTR); + m_CommandQueueId), m_KernelContainer[kernelIdx], (cl_uint)dim, nullptr, globalWorkSize, + localWorkSize, 0, nullptr, nullptr); OpenCLCheckError(errid, __FILE__, __LINE__, ITK_LOCATION); /* diff --git a/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx b/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx index 21ebddb5a63..4ed9b7be10a 100644 --- a/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx +++ b/Modules/Core/GPUCommon/src/itkOpenCLUtil.cxx @@ -48,17 +48,17 @@ int OpenCLGetLocalBlockSize(unsigned int ImageDim) // cl_device_id* OpenCLGetAvailableDevices(cl_platform_id platform, cl_device_type devType, cl_uint* numAvailableDevices) { - cl_device_id* availableDevices = ITK_NULLPTR; + cl_device_id* availableDevices = nullptr; cl_uint totalNumDevices; // get total # of devices cl_int errid; - errid = clGetDeviceIDs(platform, devType, 0, ITK_NULLPTR, &totalNumDevices); + errid = clGetDeviceIDs(platform, devType, 0, nullptr, &totalNumDevices); OpenCLCheckError( errid, __FILE__, __LINE__, ITK_LOCATION ); cl_device_id* totalDevices = (cl_device_id *)malloc(totalNumDevices * sizeof(cl_device_id) ); - errid = clGetDeviceIDs(platform, devType, totalNumDevices, totalDevices, ITK_NULLPTR); + errid = clGetDeviceIDs(platform, devType, totalNumDevices, totalDevices, nullptr); OpenCLCheckError( errid, __FILE__, __LINE__, ITK_LOCATION ); (*numAvailableDevices) = 0; @@ -67,7 +67,7 @@ cl_device_id* OpenCLGetAvailableDevices(cl_platform_id platform, cl_device_type for(cl_uint i=0; i max_flops ) @@ -157,29 +157,29 @@ void OpenCLPrintDeviceInfo(cl_device_id device, bool verbose) { char device_string[1024]; - clGetDeviceInfo(device, CL_DEVICE_NAME, sizeof(device_string), &device_string, ITK_NULLPTR); + clGetDeviceInfo(device, CL_DEVICE_NAME, sizeof(device_string), &device_string, nullptr); printf("%s\n", device_string); size_t worksize[3]; - clGetDeviceInfo(device,CL_DEVICE_MAX_WORK_ITEM_SIZES,sizeof(worksize),&worksize,ITK_NULLPTR); + clGetDeviceInfo(device,CL_DEVICE_MAX_WORK_ITEM_SIZES,sizeof(worksize),&worksize,nullptr); std::cout << "Maximum Work Item Sizes : { " << worksize[0] << ", " << worksize[1] << ", " << worksize[2] << " }" << std::endl; size_t maxWorkgroupSize; - clGetDeviceInfo(device,CL_DEVICE_MAX_WORK_GROUP_SIZE,sizeof(maxWorkgroupSize),&maxWorkgroupSize,ITK_NULLPTR); + clGetDeviceInfo(device,CL_DEVICE_MAX_WORK_GROUP_SIZE,sizeof(maxWorkgroupSize),&maxWorkgroupSize,nullptr); std::cout << "Maximum Work Group Size : " << maxWorkgroupSize << std::endl; if (verbose) { cl_uint mem_align; - clGetDeviceInfo(device, CL_DEVICE_MEM_BASE_ADDR_ALIGN, sizeof(mem_align), &mem_align, ITK_NULLPTR); + clGetDeviceInfo(device, CL_DEVICE_MEM_BASE_ADDR_ALIGN, sizeof(mem_align), &mem_align, nullptr); std::cout << "Alignment in bits of the base address : " << mem_align << std::endl; cl_uint min_align; - clGetDeviceInfo(device, CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, sizeof(min_align), &min_align, ITK_NULLPTR); + clGetDeviceInfo(device, CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, sizeof(min_align), &min_align, nullptr); std::cout << "Smallest alignment in bytes for any data type : " << min_align << std::endl; char device_extensions[1024]; - clGetDeviceInfo(device, CL_DEVICE_EXTENSIONS, sizeof(device_extensions), &device_extensions, ITK_NULLPTR); + clGetDeviceInfo(device, CL_DEVICE_EXTENSIONS, sizeof(device_extensions), &device_extensions, nullptr); printf("%s\n", device_extensions); } @@ -194,10 +194,10 @@ cl_platform_id OpenCLSelectPlatform(const char* name) cl_uint num_platforms; cl_platform_id* clPlatformIDs; cl_int ciErrNum; - cl_platform_id clSelectedPlatformID = ITK_NULLPTR; + cl_platform_id clSelectedPlatformID = nullptr; // Get OpenCL platform count - ciErrNum = clGetPlatformIDs (0, ITK_NULLPTR, &num_platforms); + ciErrNum = clGetPlatformIDs (0, nullptr, &num_platforms); if (ciErrNum != CL_SUCCESS) { printf(" Error %i in clGetPlatformIDs Call !!!\n\n", ciErrNum); @@ -211,18 +211,18 @@ cl_platform_id OpenCLSelectPlatform(const char* name) else { // if there's a platform or more, make space for ID's - if ( (clPlatformIDs = (cl_platform_id*)malloc(num_platforms * sizeof(cl_platform_id) ) ) == ITK_NULLPTR) + if ( (clPlatformIDs = (cl_platform_id*)malloc(num_platforms * sizeof(cl_platform_id) ) ) == nullptr) { printf("Failed to allocate memory for cl_platform ID's!\n\n"); } else { - ciErrNum = clGetPlatformIDs (num_platforms, clPlatformIDs, ITK_NULLPTR); + ciErrNum = clGetPlatformIDs (num_platforms, clPlatformIDs, nullptr); if(ciErrNum == CL_SUCCESS) { clSelectedPlatformID = clPlatformIDs[0]; // default // debug - ciErrNum = clGetPlatformInfo (clPlatformIDs[0], CL_PLATFORM_NAME, 1024, &chBuffer, ITK_NULLPTR); + ciErrNum = clGetPlatformInfo (clPlatformIDs[0], CL_PLATFORM_NAME, 1024, &chBuffer, nullptr); std::cout << "Platform " << " : " << chBuffer << std::endl; // } @@ -233,7 +233,7 @@ cl_platform_id OpenCLSelectPlatform(const char* name) for(cl_uint i = 0; i < num_platforms; ++i) { - ciErrNum = clGetPlatformInfo (clPlatformIDs[i], CL_PLATFORM_NAME, 1024, &chBuffer, ITK_NULLPTR); + ciErrNum = clGetPlatformInfo (clPlatformIDs[i], CL_PLATFORM_NAME, 1024, &chBuffer, nullptr); // debug std::cout << "Platform " << i << " : " << chBuffer << std::endl; @@ -241,7 +241,7 @@ cl_platform_id OpenCLSelectPlatform(const char* name) if(ciErrNum == CL_SUCCESS) { - if(strstr(chBuffer, name) != ITK_NULLPTR) + if(strstr(chBuffer, name) != nullptr) { clSelectedPlatformID = clPlatformIDs[i]; } @@ -349,7 +349,7 @@ bool IsGPUAvailable() { cl_platform_id platformId = OpenCLSelectPlatform("NVIDIA"); - if(platformId == ITK_NULLPTR) return false; + if(platformId == nullptr) return false; cl_device_type devType = CL_DEVICE_TYPE_GPU; diff --git a/Modules/Core/GPUCommon/test/itkGPUReductionTest.cxx b/Modules/Core/GPUCommon/test/itkGPUReductionTest.cxx index 049d28b8afa..35ef39d9dbc 100644 --- a/Modules/Core/GPUCommon/test/itkGPUReductionTest.cxx +++ b/Modules/Core/GPUCommon/test/itkGPUReductionTest.cxx @@ -74,7 +74,7 @@ int itkGPUReductionTest(int argc, char *argv[]) std::cout << "Expected CPU sum to be " << numPixels << ", GPUReduction computed " << CPUsum << " which is wrong." << std::endl; status = EXIT_FAILURE; } - summer = ITK_NULLPTR; // explicit GPU object destruction test + summer = nullptr; // explicit GPU object destruction test itk::GPUContextManager::GetInstance()->DestroyInstance(); // GPUContextManager singleton destruction test return status; } diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h index bf34d37c262..dcbeba9b8d4 100644 --- a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h +++ b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h @@ -100,33 +100,33 @@ class ITK_TEMPLATE_EXPORT GPUDenseFiniteDifferenceImageFilter : protected: GPUDenseFiniteDifferenceImageFilter(); - ~GPUDenseFiniteDifferenceImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GPUDenseFiniteDifferenceImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** This method applies changes from the m_UpdateBuffer to the output using * the GPU. "dt" is the time step to use for the update of each pixel. */ - virtual void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE; + void ApplyUpdate(const TimeStepType& dt) override; - virtual void GPUApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE; + void GPUApplyUpdate(const TimeStepType& dt) override; /** This method populates an update buffer with changes for each pixel in the * output using the GPU. Returns value is a time step to be used for the update. */ - virtual TimeStepType GPUCalculateChange() ITK_OVERRIDE; + TimeStepType GPUCalculateChange() override; /** A simple method to copy the data from the input to the output. ( Supports * "read-only" image adaptors in the case where the input image type converts * to a different output image type. ) */ - virtual void CopyInputToOutput() ITK_OVERRIDE; + void CopyInputToOutput() override; /** Method to allow subclasses to get direct access to the update * buffer */ - virtual UpdateBufferType * GetUpdateBuffer() ITK_OVERRIDE { + UpdateBufferType * GetUpdateBuffer() override { return CPUSuperclass::GetUpdateBuffer(); } /** This method allocates storage in m_UpdateBuffer. It is called from * Superclass::GenerateData(). */ - virtual void AllocateUpdateBuffer() ITK_OVERRIDE; + void AllocateUpdateBuffer() override; /* GPU kernel handle for GPUApplyUpdate */ int m_ApplyUpdateGPUKernelHandle; diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFunction.h b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFunction.h index 7cff7b67844..b8165a7e273 100644 --- a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFunction.h +++ b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceFunction.h @@ -88,7 +88,7 @@ class GPUFiniteDifferenceFunction : public FiniteDifferenceFunction< TImageType virtual PixelType ComputeUpdate( const NeighborhoodType & itkNotUsed(neighborhood), void *itkNotUsed(globalData), const FloatOffsetType & itkNotUsed(offset = FloatOffsetType(0.0)) ) - ITK_OVERRIDE + override { PixelType pix = itk::NumericTraits::ZeroValue(); return pix; @@ -112,7 +112,7 @@ class GPUFiniteDifferenceFunction : public FiniteDifferenceFunction< TImageType GPUFiniteDifferenceFunction() { m_GPUKernelManager = GPUKernelManager::New(); } - ~GPUFiniteDifferenceFunction() ITK_OVERRIDE {} + ~GPUFiniteDifferenceFunction() override {} /** GPU kernel manager for GPUFiniteDifferenceFunction class */ typename GPUKernelManager::Pointer m_GPUKernelManager; diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.h b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.h index 917a992492f..d94473343b9 100644 --- a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.h +++ b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.h @@ -75,7 +75,7 @@ class ITK_TEMPLATE_EXPORT GPUFiniteDifferenceImageFilter : /** This method returns a pointer to a FiniteDifferenceFunction object that * will be used by the filter to calculate updates at image pixels. * \returns A FiniteDifferenceObject pointer. */ - virtual const typename FiniteDifferenceFunctionType::Pointer &GetDifferenceFunction() const ITK_OVERRIDE + const typename FiniteDifferenceFunctionType::Pointer &GetDifferenceFunction() const override { return this->m_DifferenceFunction; } @@ -83,7 +83,7 @@ class ITK_TEMPLATE_EXPORT GPUFiniteDifferenceImageFilter : /** This method sets the pointer to a FiniteDifferenceFunction object that * will be used by the filter to calculate updates at image pixels. * \returns A FiniteDifferenceObject pointer. */ - virtual void SetDifferenceFunction ( FiniteDifferenceFunctionType *differenceFunction ) ITK_OVERRIDE + void SetDifferenceFunction ( FiniteDifferenceFunctionType *differenceFunction ) override { itkDebugMacro("setting m_DifferenceFunction to " << differenceFunction); if ( this->m_DifferenceFunction != differenceFunction ) @@ -128,12 +128,12 @@ class ITK_TEMPLATE_EXPORT GPUFiniteDifferenceImageFilter : protected: GPUFiniteDifferenceImageFilter(); - ~GPUFiniteDifferenceImageFilter() ITK_OVERRIDE; + ~GPUFiniteDifferenceImageFilter() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** This method allocates a temporary update container in the subclass. */ - virtual void AllocateUpdateBuffer() ITK_OVERRIDE = 0; + void AllocateUpdateBuffer() override = 0; /** This method is defined by a subclass to apply changes to the output * from an update buffer and a time step value "dt". @@ -150,12 +150,12 @@ class ITK_TEMPLATE_EXPORT GPUFiniteDifferenceImageFilter : /** This method can be defined in subclasses as needed to copy the input * to the output. See DenseFiniteDifferenceImageFilter for an * implementation. */ - virtual void CopyInputToOutput() ITK_OVERRIDE = 0; + void CopyInputToOutput() override = 0; /** This is the default, high-level algorithm for calculating finite * difference solutions. It calls virtual methods in its subclasses * to implement the major steps of the algorithm. */ - virtual void GPUGenerateData() ITK_OVERRIDE; + void GPUGenerateData() override; /** FiniteDifferenceImageFilter needs a larger input requested region than * the output requested region. As such, we need to provide @@ -168,11 +168,11 @@ class ITK_TEMPLATE_EXPORT GPUFiniteDifferenceImageFilter : * handled as described in the FiniteDifferenceFunction defined by the * subclass. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This method returns true when the current iterative solution of the * equation has met the criteria to stop solving. Defined by a subclass. */ - virtual bool Halt() ITK_OVERRIDE; + bool Halt() override; /** This method is similar to Halt(), and its default implementation in this * class is simply to call Halt(). However, this method takes as a parameter @@ -183,7 +183,7 @@ class ITK_TEMPLATE_EXPORT GPUFiniteDifferenceImageFilter : * Notice that ThreadedHalt is only called by the multithreaded filters, so you * still should implement Halt, just in case a non-threaded filter is used. */ - virtual bool ThreadedHalt( void *itkNotUsed(threadInfo) ) ITK_OVERRIDE { + bool ThreadedHalt( void *itkNotUsed(threadInfo) ) override { return this->Halt(); } @@ -192,7 +192,7 @@ class ITK_TEMPLATE_EXPORT GPUFiniteDifferenceImageFilter : * initialization, i.e. in the SparseFieldLevelSetImageFilter, initialize * the list of layers. */ - virtual void Initialize() ITK_OVERRIDE { + void Initialize() override { } /** This method is optionally defined by a subclass and is called immediately @@ -201,7 +201,7 @@ class ITK_TEMPLATE_EXPORT GPUFiniteDifferenceImageFilter : * gradient magnitude of the image in anisotropic diffusion functions), or * otherwise prepare for the next iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE + void InitializeIteration() override { m_DifferenceFunction->InitializeIteration(); } @@ -219,11 +219,11 @@ class ITK_TEMPLATE_EXPORT GPUFiniteDifferenceImageFilter : * * The default is to return the minimum value in the list. */ virtual TimeStepType ResolveTimeStep(const std::vector& timeStepList, - const std::vector< bool >& valid) const ITK_OVERRIDE; + const std::vector< bool >& valid) const override; /** This method is called after the solution has been generated to allow * subclasses to apply some further processing to the output. */ - virtual void PostProcessOutput() ITK_OVERRIDE { + void PostProcessOutput() override { } /** The maximum number of iterations this filter will run */ diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.hxx b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.hxx index d65d96f6338..086ea113ea3 100644 --- a/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.hxx +++ b/Modules/Core/GPUFiniteDifference/include/itkGPUFiniteDifferenceImageFilter.hxx @@ -31,7 +31,7 @@ GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter > { m_UseImageSpacing = false; this->m_ElapsedIterations = 0; - m_DifferenceFunction = ITK_NULLPTR; + m_DifferenceFunction = nullptr; this->m_NumberOfIterations = NumericTraits< unsigned int >::max(); m_MaximumRMSError = 0.0; m_RMSChange = 0.0; @@ -280,9 +280,9 @@ GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter > if ( this->m_UseImageSpacing ) { const TOutputImage *outputImage = this->GetOutput(); - if ( outputImage == ITK_NULLPTR ) + if ( outputImage == nullptr ) { - itkExceptionMacro("Output image is ITK_NULLPTR"); + itkExceptionMacro("Output image is nullptr"); } typedef typename TOutputImage::SpacingType SpacingType; diff --git a/Modules/Core/ImageAdaptors/include/itkAbsImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkAbsImageAdaptor.h index ff517f53d9b..2cf2d9980a1 100644 --- a/Modules/Core/ImageAdaptors/include/itkAbsImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkAbsImageAdaptor.h @@ -95,7 +95,7 @@ class AbsImageAdaptor:public protected: AbsImageAdaptor() {} - virtual ~AbsImageAdaptor() ITK_OVERRIDE {} + ~AbsImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AbsImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkAcosImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkAcosImageAdaptor.h index 46ae43d2ed3..ae9567689f8 100644 --- a/Modules/Core/ImageAdaptors/include/itkAcosImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkAcosImageAdaptor.h @@ -91,7 +91,7 @@ class AcosImageAdaptor:public protected: AcosImageAdaptor() {} - virtual ~AcosImageAdaptor() ITK_OVERRIDE {} + ~AcosImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AcosImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkAddImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkAddImageAdaptor.h index 7bfe53b624e..0821ab178fd 100644 --- a/Modules/Core/ImageAdaptors/include/itkAddImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkAddImageAdaptor.h @@ -65,7 +65,7 @@ class AddImageAdaptor:public protected: AddImageAdaptor() {} - virtual ~AddImageAdaptor() ITK_OVERRIDE {} + ~AddImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AddImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkAsinImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkAsinImageAdaptor.h index eb1ee97ca9e..93110b21870 100644 --- a/Modules/Core/ImageAdaptors/include/itkAsinImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkAsinImageAdaptor.h @@ -92,7 +92,7 @@ class AsinImageAdaptor:public protected: AsinImageAdaptor() {} - virtual ~AsinImageAdaptor() ITK_OVERRIDE {} + ~AsinImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AsinImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkAtanImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkAtanImageAdaptor.h index 3e2605c75d9..79769d143f7 100644 --- a/Modules/Core/ImageAdaptors/include/itkAtanImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkAtanImageAdaptor.h @@ -95,7 +95,7 @@ class AtanImageAdaptor:public protected: AtanImageAdaptor() {} - virtual ~AtanImageAdaptor() ITK_OVERRIDE {} + ~AtanImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AtanImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkComplexConjugateImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkComplexConjugateImageAdaptor.h index 3a8f5f8ea50..eb932c1957f 100644 --- a/Modules/Core/ImageAdaptors/include/itkComplexConjugateImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkComplexConjugateImageAdaptor.h @@ -87,7 +87,7 @@ class ComplexConjugateImageAdaptor:public protected: ComplexConjugateImageAdaptor() {} - virtual ~ComplexConjugateImageAdaptor() ITK_OVERRIDE {} + ~ComplexConjugateImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ComplexConjugateImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkComplexToImaginaryImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkComplexToImaginaryImageAdaptor.h index c3f1c717947..0c019d3cc8b 100644 --- a/Modules/Core/ImageAdaptors/include/itkComplexToImaginaryImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkComplexToImaginaryImageAdaptor.h @@ -95,7 +95,7 @@ class ComplexToImaginaryImageAdaptor:public protected: ComplexToImaginaryImageAdaptor() {} - virtual ~ComplexToImaginaryImageAdaptor() ITK_OVERRIDE {} + ~ComplexToImaginaryImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ComplexToImaginaryImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkComplexToModulusImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkComplexToModulusImageAdaptor.h index 36cb51ba0c0..3cf3de78929 100644 --- a/Modules/Core/ImageAdaptors/include/itkComplexToModulusImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkComplexToModulusImageAdaptor.h @@ -95,7 +95,7 @@ class ComplexToModulusImageAdaptor:public protected: ComplexToModulusImageAdaptor() {} - virtual ~ComplexToModulusImageAdaptor() ITK_OVERRIDE {} + ~ComplexToModulusImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ComplexToModulusImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkComplexToPhaseImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkComplexToPhaseImageAdaptor.h index 77607b9d57c..0f6b6473700 100644 --- a/Modules/Core/ImageAdaptors/include/itkComplexToPhaseImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkComplexToPhaseImageAdaptor.h @@ -90,7 +90,7 @@ class ComplexToPhaseImageAdaptor:public protected: ComplexToPhaseImageAdaptor() {} - virtual ~ComplexToPhaseImageAdaptor() ITK_OVERRIDE {} + ~ComplexToPhaseImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ComplexToPhaseImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkComplexToRealImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkComplexToRealImageAdaptor.h index ccfe0334d16..9b113b99157 100644 --- a/Modules/Core/ImageAdaptors/include/itkComplexToRealImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkComplexToRealImageAdaptor.h @@ -92,7 +92,7 @@ class ComplexToRealImageAdaptor:public protected: ComplexToRealImageAdaptor() {} - virtual ~ComplexToRealImageAdaptor() ITK_OVERRIDE {} + ~ComplexToRealImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ComplexToRealImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkCosImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkCosImageAdaptor.h index b1e8b0f8e56..fe6dfcc21fa 100644 --- a/Modules/Core/ImageAdaptors/include/itkCosImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkCosImageAdaptor.h @@ -89,7 +89,7 @@ class CosImageAdaptor:public protected: CosImageAdaptor() {} - virtual ~CosImageAdaptor() ITK_OVERRIDE {} + ~CosImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(CosImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkExpImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkExpImageAdaptor.h index 76408cc06f1..ad71bc06593 100644 --- a/Modules/Core/ImageAdaptors/include/itkExpImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkExpImageAdaptor.h @@ -89,7 +89,7 @@ class ExpImageAdaptor:public protected: ExpImageAdaptor() {} - virtual ~ExpImageAdaptor() ITK_OVERRIDE {} + ~ExpImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ExpImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkExpNegativeImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkExpNegativeImageAdaptor.h index ec2d3897c55..5f20bc1c881 100644 --- a/Modules/Core/ImageAdaptors/include/itkExpNegativeImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkExpNegativeImageAdaptor.h @@ -89,7 +89,7 @@ class ExpNegativeImageAdaptor:public protected: ExpNegativeImageAdaptor() {} - virtual ~ExpNegativeImageAdaptor() ITK_OVERRIDE {} + ~ExpNegativeImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ExpNegativeImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h index 0316543c71e..9626077237b 100644 --- a/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h @@ -143,23 +143,23 @@ class ITK_TEMPLATE_EXPORT ImageAdaptor:public ImageBase< TImage::ImageDimension * entire dataset. It is also used to determine boundary * conditions. * \sa ImageRegion, SetBufferedRegion(), SetRequestedRegion() */ - virtual void SetLargestPossibleRegion(const RegionType & region) ITK_OVERRIDE; + void SetLargestPossibleRegion(const RegionType & region) override; /** Set the region object that defines the size and starting index * of the region of the image currently load in memory. * \sa ImageRegion, SetLargestPossibleRegion(), SetRequestedRegion() */ - virtual void SetBufferedRegion(const RegionType & region) ITK_OVERRIDE; + void SetBufferedRegion(const RegionType & region) override; /** Set the region object that defines the size and starting index * for the region of the image requested. * \sa ImageRegion, SetLargestPossibleRegion(), SetBufferedRegion() */ - virtual void SetRequestedRegion(const RegionType & region) ITK_OVERRIDE; + void SetRequestedRegion(const RegionType & region) override; /** Set the requested region from this data object to match the requested * region of the data object passed in as a parameter. This method * implements the API from DataObject. The data object parameter must be * castable to an ImageBase. */ - virtual void SetRequestedRegion(const DataObject *data) ITK_OVERRIDE; + void SetRequestedRegion(const DataObject *data) override; /** Get the region object that defines the size and starting index * for the region of the image requested (i.e., the region of the @@ -167,7 +167,7 @@ class ITK_TEMPLATE_EXPORT ImageAdaptor:public ImageBase< TImage::ImageDimension * This method overloads the one in ImageBase in order to delegate * to the adapted image. * \sa ImageRegion, SetLargestPossibleRegion(), SetBufferedRegion() */ - virtual const RegionType & GetRequestedRegion() const ITK_OVERRIDE; + const RegionType & GetRequestedRegion() const override; /** Get the region object that defines the size and starting index * for the largest possible region this image could represent. This @@ -177,21 +177,21 @@ class ITK_TEMPLATE_EXPORT ImageAdaptor:public ImageBase< TImage::ImageDimension * This method overloads the one in ImageBase in order to delegate * to the adapted image. * \sa ImageRegion, GetBufferedRegion(), GetRequestedRegion() */ - virtual const RegionType & GetLargestPossibleRegion() const ITK_OVERRIDE; + const RegionType & GetLargestPossibleRegion() const override; /** Get the region object that defines the size and starting index * of the region of the image currently loaded in memory. * This method overloads the one in ImageBase in order to delegate * to the adapted image. * \sa ImageRegion, SetLargestPossibleRegion(), SetRequestedRegion() */ - virtual const RegionType & GetBufferedRegion() const ITK_OVERRIDE; + const RegionType & GetBufferedRegion() const override; /** Allocate the image memory. Dimension and Size must be set a priori. */ - virtual void Allocate(bool initialize = false) ITK_OVERRIDE; + void Allocate(bool initialize = false) override; /** Restore the data object to its initial state. This means releasing * memory. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Set a pixel. */ void SetPixel(const IndexType & index, const PixelType & value) @@ -250,45 +250,45 @@ class ITK_TEMPLATE_EXPORT ImageAdaptor:public ImageBase< TImage::ImageDimension const InternalPixelType * GetBufferPointer() const; /** Set the spacing (size of a pixel) of the image. */ - virtual void SetSpacing(const SpacingType & values) ITK_OVERRIDE; + void SetSpacing(const SpacingType & values) override; - virtual void SetSpacing(const double *values /*[ImageDimension]*/) ITK_OVERRIDE; + void SetSpacing(const double *values /*[ImageDimension]*/) override; - virtual void SetSpacing(const float *values /*[ImageDimension]*/) ITK_OVERRIDE; + void SetSpacing(const float *values /*[ImageDimension]*/) override; /** Get the spacing (size of a pixel) of the image. The * spacing is the geometric distance between image samples. * \sa SetSpacing() */ - virtual const SpacingType & GetSpacing() const ITK_OVERRIDE; + const SpacingType & GetSpacing() const override; /** Get the origin of the image. The origin is the geometric * coordinates of the image origin. * \sa SetOrigin() */ - virtual const PointType & GetOrigin() const ITK_OVERRIDE; + const PointType & GetOrigin() const override; /** Set the origin of the image. */ - virtual void SetOrigin(const PointType values) ITK_OVERRIDE; + void SetOrigin(const PointType values) override; - virtual void SetOrigin(const double *values /*[ImageDimension]*/) ITK_OVERRIDE; + void SetOrigin(const double *values /*[ImageDimension]*/) override; - virtual void SetOrigin(const float *values /*[ImageDimension]*/) ITK_OVERRIDE; + void SetOrigin(const float *values /*[ImageDimension]*/) override; /** Set the direction of the image. */ - virtual void SetDirection(const DirectionType & direction) ITK_OVERRIDE; + void SetDirection(const DirectionType & direction) override; /** Get the direction cosines of the image. The direction cosines * are vectors that point from one pixel to the next. * For ImageBase and Image, the default direction is identity. */ - virtual const DirectionType & GetDirection() const ITK_OVERRIDE; + const DirectionType & GetDirection() const override; /** Set Internal Image */ virtual void SetImage(TImage *); /** Delegate Modified to the Internal Image */ - virtual void Modified() const ITK_OVERRIDE; + void Modified() const override; /** Delegate GetMTime to the Internal Image */ - virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE; + ModifiedTimeType GetMTime() const override; /** Return the Data Accesor object */ AccessorType & GetPixelAccessor(void) @@ -303,21 +303,21 @@ class ITK_TEMPLATE_EXPORT ImageAdaptor:public ImageBase< TImage::ImageDimension { m_PixelAccessor = accessor; } /** Return the Data Accesor object */ - virtual void Update() ITK_OVERRIDE; + void Update() override; - virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override; /** Methods to update the pipeline. Called internally by the * pipeline mechanism. */ - virtual void UpdateOutputInformation() ITK_OVERRIDE; + void UpdateOutputInformation() override; - virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE; + void SetRequestedRegionToLargestPossibleRegion() override; - virtual void PropagateRequestedRegion() ITK_OVERRIDE; + void PropagateRequestedRegion() override; - virtual void UpdateOutputData() ITK_OVERRIDE; + void UpdateOutputData() override; - virtual bool VerifyRequestedRegion() ITK_OVERRIDE; + bool VerifyRequestedRegion() override; /** \brief Get the continuous index from a physical point * @@ -393,9 +393,9 @@ class ITK_TEMPLATE_EXPORT ImageAdaptor:public ImageBase< TImage::ImageDimension protected: ImageAdaptor(); - virtual ~ImageAdaptor() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; - virtual void Graft(const DataObject *data) ITK_OVERRIDE; + ~ImageAdaptor() override; + void PrintSelf(std::ostream & os, Indent indent) const override; + void Graft(const DataObject *data) override; using Superclass::Graft; private: diff --git a/Modules/Core/ImageAdaptors/include/itkLog10ImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkLog10ImageAdaptor.h index 27a145f7c85..67632635b87 100644 --- a/Modules/Core/ImageAdaptors/include/itkLog10ImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkLog10ImageAdaptor.h @@ -90,7 +90,7 @@ class Log10ImageAdaptor:public protected: Log10ImageAdaptor() {} - virtual ~Log10ImageAdaptor() ITK_OVERRIDE {} + ~Log10ImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(Log10ImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkLogImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkLogImageAdaptor.h index d646120fa68..ad772a4d79f 100644 --- a/Modules/Core/ImageAdaptors/include/itkLogImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkLogImageAdaptor.h @@ -92,7 +92,7 @@ class LogImageAdaptor:public protected: LogImageAdaptor() {} - virtual ~LogImageAdaptor() ITK_OVERRIDE {} + ~LogImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(LogImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkNthElementImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkNthElementImageAdaptor.h index 5b3d7eb5a0f..a19a4580828 100644 --- a/Modules/Core/ImageAdaptors/include/itkNthElementImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkNthElementImageAdaptor.h @@ -81,7 +81,7 @@ class NthElementImageAdaptor: protected: NthElementImageAdaptor() {} - virtual ~NthElementImageAdaptor() ITK_OVERRIDE {} + ~NthElementImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(NthElementImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkRGBToLuminanceImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkRGBToLuminanceImageAdaptor.h index 4f166924f73..e1ddc35c630 100644 --- a/Modules/Core/ImageAdaptors/include/itkRGBToLuminanceImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkRGBToLuminanceImageAdaptor.h @@ -91,7 +91,7 @@ class RGBToLuminanceImageAdaptor:public protected: RGBToLuminanceImageAdaptor() {} - virtual ~RGBToLuminanceImageAdaptor() ITK_OVERRIDE {} + ~RGBToLuminanceImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(RGBToLuminanceImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkRGBToVectorImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkRGBToVectorImageAdaptor.h index 74898dbea87..afb00cc1ef0 100644 --- a/Modules/Core/ImageAdaptors/include/itkRGBToVectorImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkRGBToVectorImageAdaptor.h @@ -67,7 +67,7 @@ class RGBToVectorImageAdaptor:public protected: RGBToVectorImageAdaptor() {} - virtual ~RGBToVectorImageAdaptor() ITK_OVERRIDE {} + ~RGBToVectorImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(RGBToVectorImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkSinImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkSinImageAdaptor.h index 51293aa9f5b..05dc6835acf 100644 --- a/Modules/Core/ImageAdaptors/include/itkSinImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkSinImageAdaptor.h @@ -90,7 +90,7 @@ class SinImageAdaptor:public protected: SinImageAdaptor() {} - virtual ~SinImageAdaptor() ITK_OVERRIDE {} + ~SinImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SinImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkSqrtImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkSqrtImageAdaptor.h index f18824655f5..613574e767b 100644 --- a/Modules/Core/ImageAdaptors/include/itkSqrtImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkSqrtImageAdaptor.h @@ -89,7 +89,7 @@ class SqrtImageAdaptor:public protected: SqrtImageAdaptor() {} - virtual ~SqrtImageAdaptor() ITK_OVERRIDE {} + ~SqrtImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SqrtImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkTanImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkTanImageAdaptor.h index 5c79471fae1..c10603dee6c 100644 --- a/Modules/Core/ImageAdaptors/include/itkTanImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkTanImageAdaptor.h @@ -91,7 +91,7 @@ class TanImageAdaptor:public protected: TanImageAdaptor() {} - virtual ~TanImageAdaptor() ITK_OVERRIDE {} + ~TanImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(TanImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkVectorImageToImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkVectorImageToImageAdaptor.h index d72659cc456..09512556551 100644 --- a/Modules/Core/ImageAdaptors/include/itkVectorImageToImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkVectorImageToImageAdaptor.h @@ -183,7 +183,7 @@ class VectorImageToImageAdaptor:public protected: VectorImageToImageAdaptor() {} - virtual ~VectorImageToImageAdaptor() ITK_OVERRIDE {} + ~VectorImageToImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorImageToImageAdaptor); diff --git a/Modules/Core/ImageAdaptors/include/itkVectorToRGBImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkVectorToRGBImageAdaptor.h index 9472e6eaece..20c948bb0fb 100644 --- a/Modules/Core/ImageAdaptors/include/itkVectorToRGBImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkVectorToRGBImageAdaptor.h @@ -63,7 +63,7 @@ class VectorToRGBImageAdaptor:public protected: VectorToRGBImageAdaptor() {} - virtual ~VectorToRGBImageAdaptor() ITK_OVERRIDE {} + ~VectorToRGBImageAdaptor() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorToRGBImageAdaptor); diff --git a/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.h b/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.h index df3afb06840..e70642a6095 100644 --- a/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.h +++ b/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.h @@ -131,16 +131,16 @@ class ITK_TEMPLATE_EXPORT BSplineDecompositionImageFilter: protected: BSplineDecompositionImageFilter(); - virtual ~BSplineDecompositionImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BSplineDecompositionImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** This filter requires all of the input image. */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This filter must produce all of its output at once. */ - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; private: typedef std::vector< CoeffType > CoefficientsVectorType; diff --git a/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h index 44c91f5cc93..21f2815c8fb 100644 --- a/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h @@ -141,7 +141,7 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE + OutputType Evaluate(const PointType & point) const override { ContinuousIndexType index; @@ -161,8 +161,8 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction: return ( this->EvaluateAtContinuousIndex(index, threadId) ); } - virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType & - index) const ITK_OVERRIDE + OutputType EvaluateAtContinuousIndex(const ContinuousIndexType & + index) const override { // Don't know thread information, make evaluateIndex, weights on the stack. // Slower, but safer. @@ -296,7 +296,7 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction: itkGetConstMacro(NumberOfThreads, ThreadIdType); /** Set the input image. This must be set by the user. */ - virtual void SetInputImage(const TImageType *inputData) ITK_OVERRIDE; + void SetInputImage(const TImageType *inputData) override; /** The UseImageDirection flag determines whether image derivatives are * computed with respect to the image grid or with respect to the physical @@ -351,8 +351,8 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction: ) const; BSplineInterpolateImageFunction(); - ~BSplineInterpolateImageFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BSplineInterpolateImageFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; // These are needed by the smoothing spline routine. // temp storage for processing of Coefficients diff --git a/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx index 3743661904c..a53ee1e52f8 100644 --- a/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx @@ -47,9 +47,9 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType > ::BSplineInterpolateImageFunction() { m_NumberOfThreads = 1; - m_ThreadedEvaluateIndex = ITK_NULLPTR; - m_ThreadedWeights = ITK_NULLPTR; - m_ThreadedWeightsDerivative = ITK_NULLPTR; + m_ThreadedEvaluateIndex = nullptr; + m_ThreadedWeights = nullptr; + m_ThreadedWeightsDerivative = nullptr; m_CoefficientFilter = CoefficientFilter::New(); m_Coefficients = CoefficientImageType::New(); @@ -65,13 +65,13 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType > ::~BSplineInterpolateImageFunction() { delete[] m_ThreadedEvaluateIndex; - m_ThreadedEvaluateIndex = ITK_NULLPTR; + m_ThreadedEvaluateIndex = nullptr; delete[] m_ThreadedWeights; - m_ThreadedWeights = ITK_NULLPTR; + m_ThreadedWeights = nullptr; delete[] m_ThreadedWeightsDerivative; - m_ThreadedWeightsDerivative = ITK_NULLPTR; + m_ThreadedWeightsDerivative = nullptr; } /** @@ -111,7 +111,7 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType > } else { - m_Coefficients = ITK_NULLPTR; + m_Coefficients = nullptr; } } diff --git a/Modules/Core/ImageFunction/include/itkBSplineResampleImageFunction.h b/Modules/Core/ImageFunction/include/itkBSplineResampleImageFunction.h index 82663f9d888..860a90602f5 100644 --- a/Modules/Core/ImageFunction/include/itkBSplineResampleImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkBSplineResampleImageFunction.h @@ -74,7 +74,7 @@ class BSplineResampleImageFunction: itkNewMacro(Self); /** Set the input image representing the BSplineCoefficients */ - virtual void SetInputImage(const TImageType *inputData) ITK_OVERRIDE + void SetInputImage(const TImageType *inputData) override { // bypass my superclass this->InterpolateImageFunction< TImageType, TCoordRep >::SetInputImage(inputData); @@ -87,7 +87,7 @@ class BSplineResampleImageFunction: protected: BSplineResampleImageFunction() {} - virtual ~BSplineResampleImageFunction() ITK_OVERRIDE {} + ~BSplineResampleImageFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineResampleImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkBinaryThresholdImageFunction.h b/Modules/Core/ImageFunction/include/itkBinaryThresholdImageFunction.h index 585524c5942..0d2274ded65 100644 --- a/Modules/Core/ImageFunction/include/itkBinaryThresholdImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkBinaryThresholdImageFunction.h @@ -83,7 +83,7 @@ class ITK_TEMPLATE_EXPORT BinaryThresholdImageFunction: * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual bool Evaluate(const PointType & point) const ITK_OVERRIDE + bool Evaluate(const PointType & point) const override { IndexType index; @@ -99,8 +99,8 @@ class ITK_TEMPLATE_EXPORT BinaryThresholdImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual bool EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE + bool EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override { IndexType nindex; @@ -116,7 +116,7 @@ class ITK_TEMPLATE_EXPORT BinaryThresholdImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual bool EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE + bool EvaluateAtIndex(const IndexType & index) const override { PixelType value = this->GetInputImage()->GetPixel(index); @@ -140,8 +140,8 @@ class ITK_TEMPLATE_EXPORT BinaryThresholdImageFunction: protected: BinaryThresholdImageFunction(); - ~BinaryThresholdImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryThresholdImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryThresholdImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.h b/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.h index cdbf936d47c..1f6e1c745e2 100644 --- a/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.h @@ -137,7 +137,7 @@ class ITK_TEMPLATE_EXPORT CentralDifferenceImageFunction: typedef typename InterpolatorType::Pointer InterpolatorPointer; /** Set the input image. This must be set by the user. */ - virtual void SetInputImage(const TInputImage *inputData) ITK_OVERRIDE; + void SetInputImage(const TInputImage *inputData) override; /** Set interpolator. The interpolator is used in the methods * \c Evaluate and \c EvaluateAtContinuousIndex. */ @@ -156,7 +156,7 @@ class ITK_TEMPLATE_EXPORT CentralDifferenceImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtIndex(const IndexType & index) const override; /** Evalulate the image derivative by central differencing at non-integer * point. @@ -171,7 +171,7 @@ class ITK_TEMPLATE_EXPORT CentralDifferenceImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE; + OutputType Evaluate(const PointType & point) const override; /** Evalulate the image derivative by central differencing at non-integer * index. @@ -184,7 +184,7 @@ class ITK_TEMPLATE_EXPORT CentralDifferenceImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtContinuousIndex( const ContinuousIndexType & cindex) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex( const ContinuousIndexType & cindex) const override; /** The UseImageDirection flag determines whether image derivatives are * computed with respect to the image grid or with respect to the physical @@ -206,8 +206,8 @@ class ITK_TEMPLATE_EXPORT CentralDifferenceImageFunction: protected: CentralDifferenceImageFunction(); - ~CentralDifferenceImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CentralDifferenceImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CentralDifferenceImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx b/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx index c67c3ddeda1..d93848dbe80 100644 --- a/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx @@ -54,7 +54,7 @@ CentralDifferenceImageFunction< TInputImage, TCoordRep, TOutputType > // Verify the output vector is the right size. // OutputType of VariablelengthVector will have size 0 until allocated, so this // case can't be tested. - if( inputData != ITK_NULLPTR ) + if( inputData != nullptr ) { SizeValueType nComponents = OutputConvertType::GetNumberOfComponents(); if( nComponents > 0 ) @@ -81,7 +81,7 @@ CentralDifferenceImageFunction< TInputImage, TCoordRep, TOutputType > if ( interpolator != this->m_Interpolator ) { this->m_Interpolator = interpolator; - if( this->GetInputImage() != ITK_NULLPTR ) + if( this->GetInputImage() != nullptr ) { this->m_Interpolator->SetInputImage( this->GetInputImage() ); } diff --git a/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.h b/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.h index 36aec3d69aa..be82624b208 100644 --- a/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.h @@ -90,10 +90,10 @@ class ITK_TEMPLATE_EXPORT CovarianceImageFunction: RealType; /** Evalulate the function at specified index */ - virtual RealType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + RealType EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at non-integer positions */ - virtual RealType Evaluate(const PointType & point) const ITK_OVERRIDE + RealType Evaluate(const PointType & point) const override { IndexType index; @@ -101,8 +101,8 @@ class ITK_TEMPLATE_EXPORT CovarianceImageFunction: return this->EvaluateAtIndex(index); } - virtual RealType EvaluateAtContinuousIndex( - const ContinuousIndexType & cindex) const ITK_OVERRIDE + RealType EvaluateAtContinuousIndex( + const ContinuousIndexType & cindex) const override { IndexType index; @@ -117,8 +117,8 @@ class ITK_TEMPLATE_EXPORT CovarianceImageFunction: protected: CovarianceImageFunction(); - ~CovarianceImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CovarianceImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CovarianceImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkExtrapolateImageFunction.h b/Modules/Core/ImageFunction/include/itkExtrapolateImageFunction.h index a19c584d77e..e9bba64a731 100644 --- a/Modules/Core/ImageFunction/include/itkExtrapolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkExtrapolateImageFunction.h @@ -83,7 +83,7 @@ class ExtrapolateImageFunction: * Returns the extrapolated image intensity at a * specified point position. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE + OutputType Evaluate(const PointType & point) const override { ContinuousIndexType index; @@ -96,21 +96,21 @@ class ExtrapolateImageFunction: * Returns the extrapolated image intensity at a * specified point position. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE = 0; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override = 0; /** Extrapolate the image at an index position. * * Returns the extrapolated image intensity at a * specified point position. */ - virtual OutputType EvaluateAtIndex( - const IndexType & index) const ITK_OVERRIDE = 0; + OutputType EvaluateAtIndex( + const IndexType & index) const override = 0; protected: ExtrapolateImageFunction(){} - ~ExtrapolateImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~ExtrapolateImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.h b/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.h index 2944829caae..61f6c06b0d2 100644 --- a/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.h @@ -96,14 +96,14 @@ class ITK_TEMPLATE_EXPORT GaussianBlurImageFunction: typedef typename Superclass::PointType PointType; /** Evalutate the in the given dimension at specified point */ - virtual TOutput Evaluate(const PointType & point) const ITK_OVERRIDE; + TOutput Evaluate(const PointType & point) const override; /** Evaluate the function at specified Index position */ - virtual TOutput EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + TOutput EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at specified ContinuousIndex position. */ - virtual TOutput EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE; + TOutput EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override; /** The standard deviation for the discrete Gaussian kernel. Sets the * standard deviation independently for each dimension. @@ -124,7 +124,7 @@ class ITK_TEMPLATE_EXPORT GaussianBlurImageFunction: * \warning this method caches BufferedRegion information. * If the BufferedRegion has changed, user must call * SetInputImage again to update cached values. */ - virtual void SetInputImage(const InputImageType *ptr) ITK_OVERRIDE; + void SetInputImage(const InputImageType *ptr) override; /** Set/Get the Extent of the array holding the coefficients * of the Gaussian kernel computed by the GaussianOperator. @@ -161,11 +161,11 @@ class ITK_TEMPLATE_EXPORT GaussianBlurImageFunction: GaussianBlurImageFunction(); GaussianBlurImageFunction(const Self &); - ~GaussianBlurImageFunction() ITK_OVERRIDE {} + ~GaussianBlurImageFunction() override {} void operator=(const Self &); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void RecomputeGaussianKernel(); diff --git a/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.h b/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.h index 99edb24db7c..ee341995d4b 100644 --- a/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.h @@ -89,14 +89,14 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeImageFunction: typedef typename InputImageType::PointType PointType; /** Evaluate the function at the specifed point. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE; + OutputType Evaluate(const PointType & point) const override; /** Evaluate the function at specified Index position. */ - virtual OutputType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at specified ContinuousIndex position. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override; /** * UseImageSpacing controls the extent of the computations. @@ -135,17 +135,17 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeImageFunction: * \warning this method caches BufferedRegion information. * If the BufferedRegion has changed, user must call * SetInputImage again to update cached values. */ - virtual void SetInputImage(const InputImageType *ptr) ITK_OVERRIDE; + void SetInputImage(const InputImageType *ptr) override; protected: GaussianDerivativeImageFunction(); GaussianDerivativeImageFunction(const Self &); - ~GaussianDerivativeImageFunction() ITK_OVERRIDE {} + ~GaussianDerivativeImageFunction() override {} void operator=(const Self &); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Recompute the Gaussian kernel used to evaluate indexes. This should use * a fastest Derivative Gaussian operator. */ diff --git a/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h index e67ab67a077..84d1d1c5506 100644 --- a/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h @@ -90,7 +90,7 @@ class ITK_TEMPLATE_EXPORT GaussianInterpolateImageFunction : typedef FixedArray ArrayType; /** Set input image. */ - virtual void SetInputImage( const TInputImage *image ) ITK_OVERRIDE + void SetInputImage( const TInputImage *image ) override { Superclass::SetInputImage( image ); this->ComputeBoundingBox(); @@ -137,16 +137,16 @@ class ITK_TEMPLATE_EXPORT GaussianInterpolateImageFunction : } /** Evaluate at the given index. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & cindex ) const ITK_OVERRIDE + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & cindex ) const override { - return this->EvaluateAtContinuousIndex( cindex, ITK_NULLPTR ); + return this->EvaluateAtContinuousIndex( cindex, nullptr ); } protected: GaussianInterpolateImageFunction(); - ~GaussianInterpolateImageFunction() ITK_OVERRIDE {}; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~GaussianInterpolateImageFunction() override {}; + void PrintSelf( std::ostream& os, Indent indent ) const override; virtual void ComputeBoundingBox(); diff --git a/Modules/Core/ImageFunction/include/itkImageFunction.h b/Modules/Core/ImageFunction/include/itkImageFunction.h index 499fc684a6c..6c9d812e413 100644 --- a/Modules/Core/ImageFunction/include/itkImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkImageFunction.h @@ -115,7 +115,7 @@ class ITK_TEMPLATE_EXPORT ImageFunction: /** Evaluate the function at specified Point position. * Subclasses must provide this method. */ - virtual TOutput Evaluate(const PointType & point) const ITK_OVERRIDE = 0; + TOutput Evaluate(const PointType & point) const override = 0; /** Evaluate the function at specified Index position. * Subclasses must provide this method. */ @@ -212,8 +212,8 @@ class ITK_TEMPLATE_EXPORT ImageFunction: protected: ImageFunction(); - ~ImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Const pointer to the input image. */ InputImageConstPointer m_Image; diff --git a/Modules/Core/ImageFunction/include/itkImageFunction.hxx b/Modules/Core/ImageFunction/include/itkImageFunction.hxx index 931f018bfe0..4747cfdfbf5 100644 --- a/Modules/Core/ImageFunction/include/itkImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkImageFunction.hxx @@ -29,7 +29,7 @@ template< typename TInputImage, typename TOutput, typename TCoordRep > ImageFunction< TInputImage, TOutput, TCoordRep > ::ImageFunction() { - 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/ImageFunction/include/itkInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h index ec23407d99b..ba00b22e22d 100644 --- a/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h @@ -89,7 +89,7 @@ class ITK_TEMPLATE_EXPORT InterpolateImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE + OutputType Evaluate(const PointType & point) const override { ContinuousIndexType index; @@ -107,8 +107,8 @@ class ITK_TEMPLATE_EXPORT InterpolateImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE = 0; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override = 0; /** Interpolate the image at an index position. * @@ -118,15 +118,15 @@ class ITK_TEMPLATE_EXPORT InterpolateImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE + OutputType EvaluateAtIndex(const IndexType & index) const override { return ( static_cast< RealType >( this->GetInputImage()->GetPixel(index) ) ); } protected: InterpolateImageFunction(){} - ~InterpolateImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~InterpolateImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.h index ef8c05610a4..bfd30754df9 100644 --- a/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.h @@ -103,15 +103,15 @@ class ITK_TEMPLATE_EXPORT LabelImageGaussianInterpolateImageFunction : /** * Evaluate at the given index */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & cindex ) const ITK_OVERRIDE + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & cindex ) const override { - return this->EvaluateAtContinuousIndex( cindex, ITK_NULLPTR ); + return this->EvaluateAtContinuousIndex( cindex, nullptr ); } protected: LabelImageGaussianInterpolateImageFunction(); - ~LabelImageGaussianInterpolateImageFunction() ITK_OVERRIDE {}; + ~LabelImageGaussianInterpolateImageFunction() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelImageGaussianInterpolateImageFunction); @@ -119,8 +119,8 @@ class ITK_TEMPLATE_EXPORT LabelImageGaussianInterpolateImageFunction : /** * Evaluate function value at the given index */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType &, OutputType * ) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType &, OutputType * ) const override; }; } // end namespace itk diff --git a/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h index 104e7f31716..333cecc80cb 100644 --- a/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h @@ -92,17 +92,17 @@ class ITK_TEMPLATE_EXPORT LinearInterpolateImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtContinuousIndex(const + OutputType EvaluateAtContinuousIndex(const ContinuousIndexType & - index) const ITK_OVERRIDE + index) const override { return this->EvaluateOptimized(Dispatch< ImageDimension >(), index); } protected: LinearInterpolateImageFunction(); - ~LinearInterpolateImageFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LinearInterpolateImageFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LinearInterpolateImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.h b/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.h index 9f7860a7500..ec1fa2a66aa 100644 --- a/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.h @@ -94,7 +94,7 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceThresholdImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual bool Evaluate(const PointType & point) const ITK_OVERRIDE; + bool Evaluate(const PointType & point) const override; /** BinaryThreshold the image at a continuous index position * @@ -104,8 +104,8 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceThresholdImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual bool EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE; + bool EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override; /** BinaryThreshold the image at an index position. * @@ -115,7 +115,7 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceThresholdImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual bool EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + bool EvaluateAtIndex(const IndexType & index) const override; /** Returns the actual value of the MahalanobisDistance at that point. * The point is assumed to lie within the image buffer. @@ -151,8 +151,8 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceThresholdImageFunction: protected: MahalanobisDistanceThresholdImageFunction(); - ~MahalanobisDistanceThresholdImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MahalanobisDistanceThresholdImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MahalanobisDistanceThresholdImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkMeanImageFunction.h b/Modules/Core/ImageFunction/include/itkMeanImageFunction.h index ea62a852eac..4a7bcb4fa3e 100644 --- a/Modules/Core/ImageFunction/include/itkMeanImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkMeanImageFunction.h @@ -87,10 +87,10 @@ class ITK_TEMPLATE_EXPORT MeanImageFunction: RealType; /** Evalulate the function at specified index */ - virtual RealType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + RealType EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at non-integer positions */ - virtual RealType Evaluate(const PointType & point) const ITK_OVERRIDE + RealType Evaluate(const PointType & point) const override { IndexType index; @@ -98,8 +98,8 @@ class ITK_TEMPLATE_EXPORT MeanImageFunction: return this->EvaluateAtIndex(index); } - virtual RealType EvaluateAtContinuousIndex( - const ContinuousIndexType & cindex) const ITK_OVERRIDE + RealType EvaluateAtContinuousIndex( + const ContinuousIndexType & cindex) const override { IndexType index; @@ -114,8 +114,8 @@ class ITK_TEMPLATE_EXPORT MeanImageFunction: protected: MeanImageFunction(); - ~MeanImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MeanImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MeanImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkMedianImageFunction.h b/Modules/Core/ImageFunction/include/itkMedianImageFunction.h index 8083f222232..fdea960c8cb 100644 --- a/Modules/Core/ImageFunction/include/itkMedianImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkMedianImageFunction.h @@ -84,10 +84,10 @@ class ITK_TEMPLATE_EXPORT MedianImageFunction: InputImageType::ImageDimension); /** Evalulate the function at specified index */ - virtual OutputType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at non-integer positions */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE + OutputType Evaluate(const PointType & point) const override { IndexType index; @@ -95,8 +95,8 @@ class ITK_TEMPLATE_EXPORT MedianImageFunction: return this->EvaluateAtIndex(index); } - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & cindex) const ITK_OVERRIDE + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & cindex) const override { IndexType index; @@ -111,8 +111,8 @@ class ITK_TEMPLATE_EXPORT MedianImageFunction: protected: MedianImageFunction(); - ~MedianImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MedianImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MedianImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkNearestNeighborExtrapolateImageFunction.h b/Modules/Core/ImageFunction/include/itkNearestNeighborExtrapolateImageFunction.h index 99a16fe301e..6e19bb50f59 100644 --- a/Modules/Core/ImageFunction/include/itkNearestNeighborExtrapolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkNearestNeighborExtrapolateImageFunction.h @@ -77,8 +77,8 @@ class NearestNeighborExtrapolateImageFunction: * nearest neighbor within the image buffer. * */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override { IndexType nindex; @@ -104,8 +104,8 @@ class NearestNeighborExtrapolateImageFunction: * nearest neighbor within the image buffer. * */ - virtual OutputType EvaluateAtIndex( - const IndexType & index) const ITK_OVERRIDE + OutputType EvaluateAtIndex( + const IndexType & index) const override { IndexType nindex; @@ -129,8 +129,8 @@ class NearestNeighborExtrapolateImageFunction: protected: NearestNeighborExtrapolateImageFunction(){} - ~NearestNeighborExtrapolateImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~NearestNeighborExtrapolateImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Core/ImageFunction/include/itkNearestNeighborInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkNearestNeighborInterpolateImageFunction.h index 36db40efd79..8574e765287 100644 --- a/Modules/Core/ImageFunction/include/itkNearestNeighborInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkNearestNeighborInterpolateImageFunction.h @@ -75,8 +75,8 @@ class ITK_TEMPLATE_EXPORT NearestNeighborInterpolateImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override { IndexType nindex; @@ -86,8 +86,8 @@ class ITK_TEMPLATE_EXPORT NearestNeighborInterpolateImageFunction: protected: NearestNeighborInterpolateImageFunction(){} - ~NearestNeighborInterpolateImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~NearestNeighborInterpolateImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Core/ImageFunction/include/itkNeighborhoodBinaryThresholdImageFunction.h b/Modules/Core/ImageFunction/include/itkNeighborhoodBinaryThresholdImageFunction.h index adcef013c54..f8fdf304322 100644 --- a/Modules/Core/ImageFunction/include/itkNeighborhoodBinaryThresholdImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkNeighborhoodBinaryThresholdImageFunction.h @@ -87,10 +87,10 @@ class ITK_TEMPLATE_EXPORT NeighborhoodBinaryThresholdImageFunction: itkGetConstReferenceMacro(Radius, InputSizeType); /** Evalulate the function at specified index */ - virtual bool EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + bool EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at non-integer positions */ - virtual bool Evaluate(const PointType & point) const ITK_OVERRIDE + bool Evaluate(const PointType & point) const override { IndexType index; @@ -98,8 +98,8 @@ class ITK_TEMPLATE_EXPORT NeighborhoodBinaryThresholdImageFunction: return this->EvaluateAtIndex(index); } - virtual bool EvaluateAtContinuousIndex( - const ContinuousIndexType & cindex) const ITK_OVERRIDE + bool EvaluateAtContinuousIndex( + const ContinuousIndexType & cindex) const override { IndexType index; @@ -109,8 +109,8 @@ class ITK_TEMPLATE_EXPORT NeighborhoodBinaryThresholdImageFunction: protected: NeighborhoodBinaryThresholdImageFunction(); - ~NeighborhoodBinaryThresholdImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NeighborhoodBinaryThresholdImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NeighborhoodBinaryThresholdImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkNeighborhoodOperatorImageFunction.h b/Modules/Core/ImageFunction/include/itkNeighborhoodOperatorImageFunction.h index b6a1db79fcb..2ac528cb942 100644 --- a/Modules/Core/ImageFunction/include/itkNeighborhoodOperatorImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkNeighborhoodOperatorImageFunction.h @@ -88,7 +88,7 @@ class ITK_TEMPLATE_EXPORT NeighborhoodOperatorImageFunction: /** Evalutate the in the given dimension at specified point * Subclasses should override this method. */ - virtual TOutput Evaluate(const PointType &) const ITK_OVERRIDE + TOutput Evaluate(const PointType &) const override { std::cout << "NeighborhoodOperatorImageFunction::Evaluate(): Not implemented!" << std::endl; TOutput out; @@ -97,12 +97,12 @@ class ITK_TEMPLATE_EXPORT NeighborhoodOperatorImageFunction: } /** Evaluate the function at specified Index position */ - virtual TOutput EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + TOutput EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at specified ContinuousIndex position. * Subclasses should override this method. */ - virtual TOutput EvaluateAtContinuousIndex( - const ContinuousIndexType &) const ITK_OVERRIDE + TOutput EvaluateAtContinuousIndex( + const ContinuousIndexType &) const override { std::cout << "NeighborhoodOperatorImageFunction::EvaluateAtContinuousIndex():Not implemented!" << std::endl; TOutput out; @@ -114,10 +114,10 @@ class ITK_TEMPLATE_EXPORT NeighborhoodOperatorImageFunction: NeighborhoodOperatorImageFunction(); NeighborhoodOperatorImageFunction(const Self &){} - ~NeighborhoodOperatorImageFunction() ITK_OVERRIDE {} + ~NeighborhoodOperatorImageFunction() override {} void operator=(const Self &){} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.h index 1aa981d5a1e..e96d8d7101e 100644 --- a/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.h @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT RayCastInterpolateImageFunction: * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE; + OutputType Evaluate(const PointType & point) const override; /** Interpolate the image at a continuous index position * @@ -123,8 +123,8 @@ class ITK_TEMPLATE_EXPORT RayCastInterpolateImageFunction: * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override; /** Connect the Transform. * This Transformation is used to calculate the new focal point position. @@ -148,26 +148,26 @@ class ITK_TEMPLATE_EXPORT RayCastInterpolateImageFunction: /** Check if a point is inside the image buffer. * \warning For efficiency, no validity checking of * the input image pointer is done. */ - bool IsInsideBuffer(const PointType &) const ITK_OVERRIDE + bool IsInsideBuffer(const PointType &) const override { return true; } - bool IsInsideBuffer(const ContinuousIndexType &) const ITK_OVERRIDE + bool IsInsideBuffer(const ContinuousIndexType &) const override { return true; } - bool IsInsideBuffer(const IndexType &) const ITK_OVERRIDE + bool IsInsideBuffer(const IndexType &) const override { return true; } protected: RayCastInterpolateImageFunction(); - virtual ~RayCastInterpolateImageFunction() ITK_OVERRIDE {} + ~RayCastInterpolateImageFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; TransformPointer m_Transform; InputPointType m_FocalPoint; diff --git a/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx index 325f9db1f13..7676a1d792c 100644 --- a/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx @@ -1049,7 +1049,7 @@ RayCastHelper< TInputImage, TCoordRep > for ( i = 0; i < 4; i++ ) { - m_RayIntersectionVoxels[i] = ITK_NULLPTR; + m_RayIntersectionVoxels[i] = nullptr; } for ( i = 0; i < 3; i++ ) { @@ -1108,7 +1108,7 @@ RayCastHelper< TInputImage, TCoordRep > m_RayIntersectionVoxels[0] = m_RayIntersectionVoxels[1] = m_RayIntersectionVoxels[2] = - m_RayIntersectionVoxels[3] = ITK_NULLPTR; + m_RayIntersectionVoxels[3] = nullptr; } break; } @@ -1140,7 +1140,7 @@ RayCastHelper< TInputImage, TCoordRep > m_RayIntersectionVoxels[0] = m_RayIntersectionVoxels[1] = m_RayIntersectionVoxels[2] = - m_RayIntersectionVoxels[3] = ITK_NULLPTR; + m_RayIntersectionVoxels[3] = nullptr; } break; } @@ -1172,7 +1172,7 @@ RayCastHelper< TInputImage, TCoordRep > m_RayIntersectionVoxels[0] = m_RayIntersectionVoxels[1] = m_RayIntersectionVoxels[2] = - m_RayIntersectionVoxels[3] = ITK_NULLPTR; + m_RayIntersectionVoxels[3] = nullptr; } break; } @@ -1372,7 +1372,7 @@ RayCastHelper< TInputImage, TCoordRep > for ( i = 0; i < 4; i++ ) { - m_RayIntersectionVoxels[i] = ITK_NULLPTR; + m_RayIntersectionVoxels[i] = nullptr; } for ( i = 0; i < 3; i++ ) { diff --git a/Modules/Core/ImageFunction/include/itkScatterMatrixImageFunction.h b/Modules/Core/ImageFunction/include/itkScatterMatrixImageFunction.h index 5ed77a5c7b9..b44306b9e04 100644 --- a/Modules/Core/ImageFunction/include/itkScatterMatrixImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkScatterMatrixImageFunction.h @@ -90,10 +90,10 @@ class ITK_TEMPLATE_EXPORT ScatterMatrixImageFunction: RealType; /** Evalulate the function at specified index */ - virtual RealType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + RealType EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at non-integer positions */ - virtual RealType Evaluate(const PointType & point) const ITK_OVERRIDE + RealType Evaluate(const PointType & point) const override { IndexType index; @@ -101,8 +101,8 @@ class ITK_TEMPLATE_EXPORT ScatterMatrixImageFunction: return this->EvaluateAtIndex(index); } - virtual RealType EvaluateAtContinuousIndex( - const ContinuousIndexType & cindex) const ITK_OVERRIDE + RealType EvaluateAtContinuousIndex( + const ContinuousIndexType & cindex) const override { IndexType index; @@ -117,8 +117,8 @@ class ITK_TEMPLATE_EXPORT ScatterMatrixImageFunction: protected: ScatterMatrixImageFunction(); - ~ScatterMatrixImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ScatterMatrixImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ScatterMatrixImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkSumOfSquaresImageFunction.h b/Modules/Core/ImageFunction/include/itkSumOfSquaresImageFunction.h index 7628e33713c..a31da6731fd 100644 --- a/Modules/Core/ImageFunction/include/itkSumOfSquaresImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkSumOfSquaresImageFunction.h @@ -84,10 +84,10 @@ class ITK_TEMPLATE_EXPORT SumOfSquaresImageFunction: RealType; /** Evalulate the function at specified index */ - virtual RealType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + RealType EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at non-integer positions */ - virtual RealType Evaluate(const PointType & point) const ITK_OVERRIDE + RealType Evaluate(const PointType & point) const override { IndexType index; @@ -95,8 +95,8 @@ class ITK_TEMPLATE_EXPORT SumOfSquaresImageFunction: return this->EvaluateAtIndex(index); } - virtual RealType EvaluateAtContinuousIndex( - const ContinuousIndexType & cindex) const ITK_OVERRIDE + RealType EvaluateAtContinuousIndex( + const ContinuousIndexType & cindex) const override { IndexType index; @@ -124,8 +124,8 @@ class ITK_TEMPLATE_EXPORT SumOfSquaresImageFunction: protected: SumOfSquaresImageFunction(); - ~SumOfSquaresImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SumOfSquaresImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SumOfSquaresImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkVarianceImageFunction.h b/Modules/Core/ImageFunction/include/itkVarianceImageFunction.h index 3c8d726cddc..4193f84925a 100644 --- a/Modules/Core/ImageFunction/include/itkVarianceImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkVarianceImageFunction.h @@ -83,10 +83,10 @@ class ITK_TEMPLATE_EXPORT VarianceImageFunction: RealType; /** Evalulate the function at specified index */ - virtual RealType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + RealType EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at non-integer positions */ - virtual RealType Evaluate(const PointType & point) const ITK_OVERRIDE + RealType Evaluate(const PointType & point) const override { IndexType index; @@ -94,8 +94,8 @@ class ITK_TEMPLATE_EXPORT VarianceImageFunction: return this->EvaluateAtIndex(index); } - virtual RealType EvaluateAtContinuousIndex( - const ContinuousIndexType & cindex) const ITK_OVERRIDE + RealType EvaluateAtContinuousIndex( + const ContinuousIndexType & cindex) const override { IndexType index; @@ -110,8 +110,8 @@ class ITK_TEMPLATE_EXPORT VarianceImageFunction: protected: VarianceImageFunction(); - ~VarianceImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VarianceImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VarianceImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkVectorInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkVectorInterpolateImageFunction.h index 9b67bbdcabf..cdeb00a56ac 100644 --- a/Modules/Core/ImageFunction/include/itkVectorInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkVectorInterpolateImageFunction.h @@ -96,7 +96,7 @@ class ITK_TEMPLATE_EXPORT VectorInterpolateImageFunction: * The point is assume to lie within the image buffer. * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE + OutputType Evaluate(const PointType & point) const override { ContinuousIndexType index; @@ -114,8 +114,8 @@ class ITK_TEMPLATE_EXPORT VectorInterpolateImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE = 0; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override = 0; /** Interpolate the image at an index position. * Simply returns the image value at the @@ -124,7 +124,7 @@ class ITK_TEMPLATE_EXPORT VectorInterpolateImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE + OutputType EvaluateAtIndex(const IndexType & index) const override { OutputType output; PixelType input = this->GetInputImage()->GetPixel(index); @@ -139,8 +139,8 @@ class ITK_TEMPLATE_EXPORT VectorInterpolateImageFunction: protected: VectorInterpolateImageFunction() {} - ~VectorInterpolateImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~VectorInterpolateImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateImageFunction.h index c45e9115567..504114175f6 100644 --- a/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateImageFunction.h @@ -88,13 +88,13 @@ class ITK_TEMPLATE_EXPORT VectorLinearInterpolateImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override; protected: VectorLinearInterpolateImageFunction(); - ~VectorLinearInterpolateImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VectorLinearInterpolateImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorLinearInterpolateImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h b/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h index be3ed585563..cfd4dd68d74 100644 --- a/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h @@ -95,21 +95,21 @@ class ITK_TEMPLATE_EXPORT VectorLinearInterpolateNearestNeighborExtrapolateImage /** Should check if an index is inside the image buffer, however we * require that it answers true to use the extrapolation possibility. */ - virtual bool IsInsideBuffer(const IndexType &) const ITK_OVERRIDE + bool IsInsideBuffer(const IndexType &) const override { return true; } /** Should check if a point is inside the image buffer, however we * require that it answers true to use the extrapolation possibility. */ - virtual bool IsInsideBuffer(const PointType &) const ITK_OVERRIDE + bool IsInsideBuffer(const PointType &) const override { return true; } /** Should check if a continuous index is inside the image buffer, however we * require that it answers true to use the extrapolation possibility. */ - virtual bool IsInsideBuffer(const ContinuousIndexType &) const ITK_OVERRIDE + bool IsInsideBuffer(const ContinuousIndexType &) const override { return true; } @@ -119,21 +119,21 @@ class ITK_TEMPLATE_EXPORT VectorLinearInterpolateNearestNeighborExtrapolateImage * Returns the linearly interpolated image intensity at a * specified point position. If the point does not lie within the * image buffer a nearest neighbor interpolation is done. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override; /** Evaluate the function at an index position * * Simply returns the image value at the * specified index position. If the index does not lie within the * image buffer a nearest neighbor interpolation is done. */ - virtual OutputType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtIndex(const IndexType & index) const override; protected: VectorLinearInterpolateNearestNeighborExtrapolateImageFunction(); - virtual ~VectorLinearInterpolateNearestNeighborExtrapolateImageFunction() ITK_OVERRIDE {} + ~VectorLinearInterpolateNearestNeighborExtrapolateImageFunction() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: VectorLinearInterpolateNearestNeighborExtrapolateImageFunction(const Self &); //purposely diff --git a/Modules/Core/ImageFunction/include/itkVectorMeanImageFunction.h b/Modules/Core/ImageFunction/include/itkVectorMeanImageFunction.h index bd98ea5b87b..c58161fe76b 100644 --- a/Modules/Core/ImageFunction/include/itkVectorMeanImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkVectorMeanImageFunction.h @@ -86,10 +86,10 @@ class ITK_TEMPLATE_EXPORT VectorMeanImageFunction: typedef typename NumericTraits< typename TInputImage::PixelType >::RealType RealType; /** Evalulate the function at specified index */ - virtual RealType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + RealType EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at non-integer positions */ - virtual RealType Evaluate(const PointType & point) const ITK_OVERRIDE + RealType Evaluate(const PointType & point) const override { IndexType index; @@ -97,8 +97,8 @@ class ITK_TEMPLATE_EXPORT VectorMeanImageFunction: return this->EvaluateAtIndex(index); } - virtual RealType EvaluateAtContinuousIndex( - const ContinuousIndexType & cindex) const ITK_OVERRIDE + RealType EvaluateAtContinuousIndex( + const ContinuousIndexType & cindex) const override { IndexType index; @@ -113,8 +113,8 @@ class ITK_TEMPLATE_EXPORT VectorMeanImageFunction: protected: VectorMeanImageFunction(); - ~VectorMeanImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VectorMeanImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorMeanImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkVectorNearestNeighborInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkVectorNearestNeighborInterpolateImageFunction.h index 0d10a4ff7bf..8ec04a5d1c1 100644 --- a/Modules/Core/ImageFunction/include/itkVectorNearestNeighborInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkVectorNearestNeighborInterpolateImageFunction.h @@ -87,8 +87,8 @@ class VectorNearestNeighborInterpolateImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override { IndexType nindex; @@ -98,8 +98,8 @@ class VectorNearestNeighborInterpolateImageFunction: protected: VectorNearestNeighborInterpolateImageFunction(){} - ~VectorNearestNeighborInterpolateImageFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~VectorNearestNeighborInterpolateImageFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h index 2cbbf6b16e3..abecde9ae7d 100644 --- a/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h @@ -295,7 +295,7 @@ class WindowedSincInterpolateImageFunction: /** ContinuousIndex typedef support. */ typedef typename Superclass::ContinuousIndexType ContinuousIndexType; - virtual void SetInputImage(const ImageType *image) ITK_OVERRIDE; + void SetInputImage(const ImageType *image) override; /** Evaluate the function at a ContinuousIndex position * @@ -303,13 +303,13 @@ class WindowedSincInterpolateImageFunction: * specified point position. Bounds checking is based on the * type of the TBoundaryCondition specified. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override; protected: WindowedSincInterpolateImageFunction(); - virtual ~WindowedSincInterpolateImageFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~WindowedSincInterpolateImageFunction() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(WindowedSincInterpolateImageFunction); diff --git a/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx index 0ebcf74caec..3caf600152d 100644 --- a/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx @@ -123,7 +123,7 @@ WindowedSincInterpolateImageFunction< TInputImage, VRadius, // Call the parent implementation Superclass::SetInputImage(image); - if ( image == ITK_NULLPTR ) + if ( image == nullptr ) { return; } diff --git a/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx b/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx index 66c7671158c..22886dfa614 100644 --- a/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx +++ b/Modules/Core/ImageFunction/test/itkBSplineDecompositionImageFilterTest.cxx @@ -47,7 +47,7 @@ typename TFilter::SplinePolesVectorType ParseSplinePoles( char *splinePolesIn ) { (*splinePolesIn)++; } - else if( endPtr == NULL || *endPtr == 0 ) + else if( endPtr == nullptr || *endPtr == 0 ) { splinePolesOut.push_back( value ); break; diff --git a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionTest.cxx index a95dfa0b644..6803404a8b3 100644 --- a/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionTest.cxx @@ -281,7 +281,7 @@ int itkCentralDifferenceImageFunctionTest(int, char* [] ) function->SetUseImageDirection( true ); // first set to null and then reset image so that cached // info is recalculated - function->SetInputImage( ITK_NULLPTR ); + function->SetInputImage( nullptr ); function->SetInputImage( image ); OutputType directionOnDerivative = function->Evaluate( point ); std::cout << "Point: " << point << " directionOnDerivative: " @@ -317,7 +317,7 @@ int itkCentralDifferenceImageFunctionTest(int, char* [] ) function->SetUseImageDirection( true ); // first set to null and then reset image so that cached // info is recalculated - function->SetInputImage( ITK_NULLPTR ); + function->SetInputImage( nullptr ); function->SetInputImage( image ); OutputType directionOneNegDerivative = function->Evaluate( point ); std::cout << "Point: " << point << " directionOneNegDerivative: " << directionOneNegDerivative << std::endl; @@ -339,7 +339,7 @@ int itkCentralDifferenceImageFunctionTest(int, char* [] ) function->SetUseImageDirection( true ); // first set to null and then reset image so that cached // info is recalculated - function->SetInputImage( ITK_NULLPTR ); + function->SetInputImage( nullptr ); function->SetInputImage( image ); OutputType directionSwapDerivative = function->Evaluate( point ); std::cout << "Point: " << point << " directionSwapDerivative: " << directionSwapDerivative << std::endl; diff --git a/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx index 107155293d1..61795b8ae56 100644 --- a/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkVarianceImageFunctionTest.cxx @@ -16,7 +16,7 @@ * *=========================================================================*/ -#include +#include #include "itkVarianceImageFunction.h" #include "itkImage.h" diff --git a/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h b/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h index b3ba1bc2b22..98e71e14576 100644 --- a/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h +++ b/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h @@ -382,9 +382,9 @@ class ITK_TEMPLATE_EXPORT AutomaticTopologyMeshSource:public MeshSource< TOutput protected: AutomaticTopologyMeshSource(); - ~AutomaticTopologyMeshSource() ITK_OVERRIDE; + ~AutomaticTopologyMeshSource() override; - void GenerateData() ITK_OVERRIDE {} // GenerateData is a no-op, since the entries ITK_OVERRIDE + void GenerateData() override {} // GenerateData is a no-op, since the entries override // are controlled manually private: diff --git a/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h b/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h index 796cf037510..32dbb7ac505 100644 --- a/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h +++ b/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.h @@ -146,16 +146,16 @@ class ITK_TEMPLATE_EXPORT BinaryMask3DMeshSource:public ImageToMeshFilter< TInpu protected: BinaryMask3DMeshSource(); - ~BinaryMask3DMeshSource() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryMask3DMeshSource() override; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; bool m_RegionOfInterestProvidedByUser; RegionType m_RegionOfInterest; - virtual void GenerateOutputInformation() ITK_OVERRIDE {} // do nothing ITK_OVERRIDE + void GenerateOutputInformation() override {} // do nothing override private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryMask3DMeshSource); diff --git a/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx b/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx index e0f4a7f592e..4257a485cf6 100644 --- a/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx @@ -29,10 +29,10 @@ template< typename TInputImage, typename TOutputMesh > BinaryMask3DMeshSource< TInputImage, TOutputMesh > ::BinaryMask3DMeshSource() : m_RegionOfInterestProvidedByUser(false), - m_LastRow(ITK_NULLPTR), - m_LastFrame(ITK_NULLPTR), - m_CurrentRow(ITK_NULLPTR), - m_CurrentFrame(ITK_NULLPTR), + m_LastRow(nullptr), + m_LastFrame(nullptr), + m_CurrentRow(nullptr), + m_CurrentFrame(nullptr), m_CurrentRowIndex(0), m_CurrentFrameIndex(0), m_LastRowNum(0), @@ -54,8 +54,8 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > m_LastFrameIndex(0), m_PointFound(0), m_ObjectValue(NumericTraits< InputPixelType >::OneValue()), - m_OutputMesh(ITK_NULLPTR), - m_InputImage(ITK_NULLPTR) + m_OutputMesh(nullptr), + m_InputImage(nullptr) { // Modify superclass default values, can be overridden by subclasses this->SetNumberOfRequiredInputs(1); @@ -1061,12 +1061,12 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > m_LastFrameIndex = 0; m_CurrentRowIndex = 0; m_CurrentFrameIndex = 0; - m_CurrentFrame = ITK_NULLPTR; - m_CurrentRow = ITK_NULLPTR; - m_LastRow = ITK_NULLPTR; + m_CurrentFrame = nullptr; + m_CurrentRow = nullptr; + m_LastRow = nullptr; m_LastRowNum = 0; m_LastFrameNum = 0; - m_LastFrame = ITK_NULLPTR; + m_LastFrame = nullptr; m_CurrentRowNum = 200; m_CurrentFrameNum = 2000; m_OutputMesh = this->GetOutput(); @@ -1300,7 +1300,7 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > free (m_LastRow[i]); } free (m_LastRow); - m_LastRow = ITK_NULLPTR; + m_LastRow = nullptr; } m_LastRowNum = 0; } @@ -1347,7 +1347,7 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh > free (m_LastFrame[i]); } free (m_LastFrame); - m_LastFrame = ITK_NULLPTR; + m_LastFrame = nullptr; } } diff --git a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.h b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.h index 186161ceb1c..a35e52ab59d 100644 --- a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.h +++ b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.h @@ -226,11 +226,11 @@ class ITK_TEMPLATE_EXPORT ConnectedRegionsMeshFilter: protected: ConnectedRegionsMeshFilter(); - virtual ~ConnectedRegionsMeshFilter() ITK_OVERRIDE {} + ~ConnectedRegionsMeshFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; void PropagateConnectedWave(); diff --git a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx index 533a3835b8d..6606bffd161 100644 --- a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx @@ -45,8 +45,8 @@ ConnectedRegionsMeshFilter< TInputMesh, TOutputMesh > m_ExtractionMode(Self::LargestRegion), m_NumberOfCellsInRegion(NumericTraits< SizeValueType >::ZeroValue()), m_RegionNumber(NumericTraits< IdentifierType >::ZeroValue()), - m_Wave(ITK_NULLPTR), - m_Wave2(ITK_NULLPTR) + m_Wave(nullptr), + m_Wave2(nullptr) { m_ClosestPoint.Fill(0); } @@ -293,7 +293,7 @@ ConnectedRegionsMeshFilter< TInputMesh, TOutputMesh > delete m_Wave; delete m_Wave2; - m_Wave = m_Wave2 = ITK_NULLPTR; + m_Wave = m_Wave2 = nullptr; itkDebugMacro (<< "Extracted " << m_RegionNumber << " region(s)"); @@ -310,7 +310,7 @@ ConnectedRegionsMeshFilter< TInputMesh, TOutputMesh > cellId = 0; CellsContainerConstIterator cell; CellDataContainerConstIterator cellData; - bool CellDataPresent = ( ITK_NULLPTR != inCellData + bool CellDataPresent = ( nullptr != inCellData && 0 != inCellData->size() ); InputMeshCellPointer cellCopy; // need an autopointer to duplicate // a cell diff --git a/Modules/Core/Mesh/include/itkImageToMeshFilter.h b/Modules/Core/Mesh/include/itkImageToMeshFilter.h index 29a1b38c9c9..25d004eed30 100644 --- a/Modules/Core/Mesh/include/itkImageToMeshFilter.h +++ b/Modules/Core/Mesh/include/itkImageToMeshFilter.h @@ -48,7 +48,7 @@ class ITK_TEMPLATE_EXPORT ImageToMeshFilter:public MeshSource< TOutputMesh > /** Create a valid output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) override; /** Some Image related typedefs. */ typedef TInputImage InputImageType; @@ -80,11 +80,11 @@ class ITK_TEMPLATE_EXPORT ImageToMeshFilter:public MeshSource< TOutputMesh > OutputMeshType * GetOutput(); /** Prepare the output */ - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; protected: ImageToMeshFilter(); - ~ImageToMeshFilter() ITK_OVERRIDE; + ~ImageToMeshFilter() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageToMeshFilter); diff --git a/Modules/Core/Mesh/include/itkImageToParametricSpaceFilter.h b/Modules/Core/Mesh/include/itkImageToParametricSpaceFilter.h index a52d5e11e5f..b252c53e862 100644 --- a/Modules/Core/Mesh/include/itkImageToParametricSpaceFilter.h +++ b/Modules/Core/Mesh/include/itkImageToParametricSpaceFilter.h @@ -82,10 +82,10 @@ class ITK_TEMPLATE_EXPORT ImageToParametricSpaceFilter: TOutputMesh::PointDimension); /** Some typedefs associated with the output mesh. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Prepare the output. */ - void GenerateOutputInformation(void) ITK_OVERRIDE; + void GenerateOutputInformation(void) override; /** Select if the indices of input image pixels will be * stored as data at each one of the mesh points. @@ -96,8 +96,8 @@ class ITK_TEMPLATE_EXPORT ImageToParametricSpaceFilter: protected: ImageToParametricSpaceFilter(); - ~ImageToParametricSpaceFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageToParametricSpaceFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageToParametricSpaceFilter); diff --git a/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.h b/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.h index 235456e6290..e09d213b83c 100644 --- a/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.h +++ b/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.h @@ -83,11 +83,11 @@ class ITK_TEMPLATE_EXPORT InteriorExteriorMeshFilter: protected: InteriorExteriorMeshFilter(); - ~InteriorExteriorMeshFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~InteriorExteriorMeshFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate requested data. */ - virtual void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; /** Transform applied to all the mesh points. */ typename SpatialFunctionType::Pointer m_SpatialFunction; diff --git a/Modules/Core/Mesh/include/itkMesh.h b/Modules/Core/Mesh/include/itkMesh.h index dd8f6112529..9f2ec938670 100644 --- a/Modules/Core/Mesh/include/itkMesh.h +++ b/Modules/Core/Mesh/include/itkMesh.h @@ -257,7 +257,7 @@ class ITK_TEMPLATE_EXPORT Mesh:public PointSet< TPixelType, VDimension, TMeshTra CellsContainerPointer m_CellsContainer; /** An object containing data associated with the mesh's cells. - * Optionally, this can be ITK_NULLPTR, indicating that no data are associated + * Optionally, this can be nullptr, indicating that no data are associated * with the cells. The data for a cell can be accessed through its cell * identifier. */ CellDataContainerPointer m_CellDataContainer; @@ -284,12 +284,12 @@ class ITK_TEMPLATE_EXPORT Mesh:public PointSet< TPixelType, VDimension, TMeshTra void PassStructure(Self *inputMesh); - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Methods for managing Mesh filters that have internal mini-pipelines */ - virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override; - virtual void Graft(const DataObject *data) ITK_OVERRIDE; + void Graft(const DataObject *data) override; /** Get the bounding box of the mesh. The methods return a pointer to * the user-supplied bounding box as a convenience. */ @@ -314,7 +314,7 @@ class ITK_TEMPLATE_EXPORT Mesh:public PointSet< TPixelType, VDimension, TMeshTra const CellsContainer * GetCells() const; /** Access m_CellDataContainer, which contains data associated with - * the mesh's cells. Optionally, this can be ITK_NULLPTR, indicating that + * the mesh's cells. Optionally, this can be nullptr, indicating that * no data are associated with the cells. The data for a cell can * be accessed through its cell identifier. */ void SetCellData(CellDataContainer *); @@ -394,7 +394,7 @@ class ITK_TEMPLATE_EXPORT Mesh:public PointSet< TPixelType, VDimension, TMeshTra bool GetCellBoundaryFeature(int dimension, CellIdentifier, CellFeatureIdentifier, CellAutoPointer &) const; /** Get the set of cells neighboring the given cell across the given boundary - * feature. Returns the number of neighbors found. If cellSet is not ITK_NULLPTR, + * feature. Returns the number of neighbors found. If cellSet is not nullptr, * the set of cell pointers is filled in with identifiers of the neighboring * cells. */ CellIdentifier GetCellBoundaryFeatureNeighbors( @@ -403,7 +403,7 @@ class ITK_TEMPLATE_EXPORT Mesh:public PointSet< TPixelType, VDimension, TMeshTra /** Get the set of cells having the given cell as part of their * boundary. Returns the number of neighbors found. If cellSet is - * not ITK_NULLPTR, the set of cell pointers is filled in with identifiers + * not nullptr, the set of cell pointers is filled in with identifiers * of the neighboring cells. */ CellIdentifier GetCellNeighbors(CellIdentifier cellId, std::set< CellIdentifier > *cellSet); @@ -412,7 +412,7 @@ class ITK_TEMPLATE_EXPORT Mesh:public PointSet< TPixelType, VDimension, TMeshTra * Check if there is an explicitly assigned boundary feature for the * given dimension and cell- and cell-feature-identifiers. If there * is, a pointer to it is given back through \a boundary (if \a - * boundary != ITK_NULLPTR) and \c true is returned. Otherwise, \c false is + * boundary != nullptr) and \c true is returned. Otherwise, \c false is * returned. */ bool GetAssignedCellBoundaryIfOneExists(int dimension, CellIdentifier, @@ -437,8 +437,8 @@ class ITK_TEMPLATE_EXPORT Mesh:public PointSet< TPixelType, VDimension, TMeshTra protected: /** Constructor for use by New() method. */ Mesh(); - ~Mesh() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~Mesh() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Release the memory allocated for the cells pointers. This is done based on information provided by the user through the method diff --git a/Modules/Core/Mesh/include/itkMesh.hxx b/Modules/Core/Mesh/include/itkMesh.hxx index 1bd6ba5eefe..4d39ba341ad 100644 --- a/Modules/Core/Mesh/include/itkMesh.hxx +++ b/Modules/Core/Mesh/include/itkMesh.hxx @@ -48,7 +48,7 @@ Mesh< TPixelType, VDimension, TMeshTraits > os << indent << "Number Of Cells: " << ( ( m_CellsContainer ) ? m_CellsContainer->Size() : 0 ) << std::endl; os << indent << "Cell Data Container pointer: " - << ( ( m_CellDataContainer ) ? m_CellDataContainer.GetPointer() : ITK_NULLPTR ) << std::endl; + << ( ( m_CellDataContainer ) ? m_CellDataContainer.GetPointer() : nullptr ) << std::endl; os << indent << "Size of Cell Data Container: " << ( ( m_CellDataContainer ) ? m_CellDataContainer->Size() : 0 ) << std::endl; os << indent << "Number of explicit cell boundary assignments: " @@ -260,7 +260,7 @@ Mesh< TPixelType, VDimension, TMeshTraits > * Check if a cell exists for a given cell identifier. If a spot for * the cell identifier exists, "cell" is set, and true is returned. * Otherwise, false is returned, and "cell" is not modified. - * If "cell" is ITK_NULLPTR, then it is never set, but the existence of the cell + * If "cell" is nullptr, then it is never set, but the existence of the cell * is still returned. */ template< typename TPixelType, unsigned int VDimension, typename TMeshTraits > @@ -280,7 +280,7 @@ Mesh< TPixelType, VDimension, TMeshTraits > /** * Ask the container if the cell identifier exists. */ - CellType * cellptr = ITK_NULLPTR; + CellType * cellptr = nullptr; const bool found = m_CellsContainer->GetElementIfIndexExists(cellId, &cellptr); if ( found ) { @@ -322,7 +322,7 @@ Mesh< TPixelType, VDimension, TMeshTraits > * Check if cell data exists for a given cell identifier. If a spot for * the cell identifier exists, "data" is set, and true is returned. * Otherwise, false is returned, and "data" is not modified. - * If "data" is ITK_NULLPTR, then it is never set, but the existence of the cell + * If "data" is nullptr, then it is never set, but the existence of the cell * data is still returned. */ template< typename TPixelType, unsigned int VDimension, typename TMeshTraits > @@ -514,9 +514,9 @@ Mesh< TPixelType, VDimension, TMeshTraits > this->ReleaseCellsMemory(); - m_CellsContainer = ITK_NULLPTR; - m_CellDataContainer = ITK_NULLPTR; - m_CellLinksContainer = ITK_NULLPTR; + m_CellsContainer = nullptr; + m_CellDataContainer = nullptr; + m_CellLinksContainer = nullptr; } /** @@ -574,7 +574,7 @@ Mesh< TPixelType, VDimension, TMeshTraits > /** * Get the set of cells neighboring the given cell across the given boundary * feature. Returns the number of neighbors found. If cellSet is not - * ITK_NULLPTR, the set of cell pointers is filled in with identifiers of the + * nullptr, the set of cell pointers is filled in with identifiers of the * neighboring cells. * * NOTE: We would like to change this to use an "output iterator" @@ -613,7 +613,7 @@ Mesh< TPixelType, VDimension, TMeshTraits > * and put them in the output set except for the cell through which the * request was made. First we empty the output set. */ - if ( cellSet != ITK_NULLPTR ) + if ( cellSet != nullptr ) { cellSet->erase( cellSet->begin(), cellSet->end() ); @@ -720,7 +720,7 @@ Mesh< TPixelType, VDimension, TMeshTraits > */ currentCells->erase(cellId); CellIdentifier numberOfNeighboringCells = static_cast( currentCells->size() ); - if ( cellSet != ITK_NULLPTR ) + if ( cellSet != nullptr ) { *cellSet = *currentCells; } @@ -739,7 +739,7 @@ Mesh< TPixelType, VDimension, TMeshTraits > /** * Get the set of cells having the given cell as part of their * boundary. Returns the number of neighbors found. If cellSet is not - * ITK_NULLPTR, the set of cell pointers is filled in with identifiers of the + * nullptr, the set of cell pointers is filled in with identifiers of the * neighboring cells. * * NOTE: We would like to change this to use an "output iterator" @@ -783,7 +783,7 @@ Mesh< TPixelType, VDimension, TMeshTraits > * Loop through UsingCells and put them in the output set. First * we empty the output set. */ - if ( cellSet != ITK_NULLPTR ) + if ( cellSet != nullptr ) { cellSet->erase( cellSet->begin(), cellSet->end() ); @@ -869,7 +869,7 @@ Mesh< TPixelType, VDimension, TMeshTraits > * this set to the output cell set. */ CellIdentifier numberOfNeighboringCells = static_cast( currentCells->size() ); - if ( cellSet != ITK_NULLPTR ) + if ( cellSet != nullptr ) { *cellSet = *currentCells; } @@ -911,7 +911,7 @@ Mesh< TPixelType, VDimension, TMeshTraits > if ( m_BoundaryAssignmentsContainers[dimension]-> GetElementIfIndexExists(assignId, &boundaryId) ) { - CellType * boundaryptr = ITK_NULLPTR; + CellType * boundaryptr = nullptr; const bool found = m_CellsContainer-> GetElementIfIndexExists(boundaryId, &boundaryptr); if ( found ) diff --git a/Modules/Core/Mesh/include/itkMeshRegion.h b/Modules/Core/Mesh/include/itkMeshRegion.h index aa0f17198b0..4674b556099 100644 --- a/Modules/Core/Mesh/include/itkMeshRegion.h +++ b/Modules/Core/Mesh/include/itkMeshRegion.h @@ -65,10 +65,10 @@ class ITKMesh_EXPORT MeshRegion:public Region /** Destructor. MeshRegion is a lightweight object and is not reference * counted. */ - virtual ~MeshRegion() ITK_OVERRIDE; + ~MeshRegion() override; /** Return the region type. Meshes are described with unstructured regions. */ - virtual RegionType GetRegionType() const ITK_OVERRIDE + RegionType GetRegionType() const override { return Superclass::ITK_UNSTRUCTURED_REGION; } /** Get the number of regions. */ @@ -78,8 +78,8 @@ class ITKMesh_EXPORT MeshRegion:public Region /** Set the number of regions. */ void SetNumberOfRegions(SizeValueType num) { - if ( ( num >= 1 ) && ( num <= NumericTraits< SizeValueType >::max() ) ) - { m_NumberOfRegions = num; } } + if ( num >= 1 ) { m_NumberOfRegions = num; } + } /** Get the current region. */ SizeValueType GetRegion() const @@ -88,8 +88,8 @@ class ITKMesh_EXPORT MeshRegion:public Region /** Set the number of regions. */ void SetRegion(SizeValueType region) { - if ( ( region >= 1 ) && ( region <= NumericTraits< SizeValueType >::max() ) ) - { m_Region = region; } } + if ( region >= 1 ) { m_Region = region; } + } private: // The maximum number of regions possible. diff --git a/Modules/Core/Mesh/include/itkMeshSource.h b/Modules/Core/Mesh/include/itkMeshSource.h index 0451927e987..ad2df6b2b4b 100644 --- a/Modules/Core/Mesh/include/itkMeshSource.h +++ b/Modules/Core/Mesh/include/itkMeshSource.h @@ -139,17 +139,17 @@ class ITK_TEMPLATE_EXPORT MeshSource:public ProcessObject * an implementation of MakeOutput(). */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; protected: MeshSource(); - virtual ~MeshSource() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MeshSource() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Requested region of Mesh is specified as i of N unstructured regions. * Since all DataObjects should be able to set the requested region in * unstructured form, just copy output->RequestedRegion all inputs. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MeshSource); diff --git a/Modules/Core/Mesh/include/itkMeshSource.hxx b/Modules/Core/Mesh/include/itkMeshSource.hxx index 3e022c8678d..0bd9bf615f0 100644 --- a/Modules/Core/Mesh/include/itkMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkMeshSource.hxx @@ -121,7 +121,7 @@ MeshSource< TOutputMesh > { if ( !graft ) { - itkExceptionMacro(<< "Requested to graft output that is a ITK_NULLPTR pointer"); + itkExceptionMacro(<< "Requested to graft output that is a nullptr pointer"); } // we use the process object method since all out output may not be diff --git a/Modules/Core/Mesh/include/itkMeshToMeshFilter.h b/Modules/Core/Mesh/include/itkMeshToMeshFilter.h index 8f4bc861255..9f336d83ff2 100644 --- a/Modules/Core/Mesh/include/itkMeshToMeshFilter.h +++ b/Modules/Core/Mesh/include/itkMeshToMeshFilter.h @@ -76,7 +76,7 @@ class ITK_TEMPLATE_EXPORT MeshToMeshFilter:public MeshSource< TOutputMesh > protected: MeshToMeshFilter(); - ~MeshToMeshFilter() ITK_OVERRIDE {} + ~MeshToMeshFilter() override {} void CopyInputMeshToOutputMeshPoints(); diff --git a/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.h b/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.h index b2b37597ae4..af782582416 100644 --- a/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.h +++ b/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.h @@ -70,14 +70,14 @@ class ITK_TEMPLATE_EXPORT ParametricSpaceToImageSpaceMeshFilter: protected: ParametricSpaceToImageSpaceMeshFilter(); - ~ParametricSpaceToImageSpaceMeshFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ParametricSpaceToImageSpaceMeshFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate requested data. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Generate additional information in the output */ - virtual void GenerateOutputInformation(void) ITK_OVERRIDE; + void GenerateOutputInformation(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ParametricSpaceToImageSpaceMeshFilter); diff --git a/Modules/Core/Mesh/include/itkRegularSphereMeshSource.h b/Modules/Core/Mesh/include/itkRegularSphereMeshSource.h index 72a2e5fad5c..04d1e1d116c 100644 --- a/Modules/Core/Mesh/include/itkRegularSphereMeshSource.h +++ b/Modules/Core/Mesh/include/itkRegularSphereMeshSource.h @@ -92,10 +92,10 @@ class ITK_TEMPLATE_EXPORT RegularSphereMeshSource:public MeshSource< TOutputMesh protected: RegularSphereMeshSource(); - ~RegularSphereMeshSource() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, itk::Indent indent) const ITK_OVERRIDE; + ~RegularSphereMeshSource() override {} + void PrintSelf(std::ostream & os, itk::Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; PointType Divide(const PointType & p1, const PointType & p2) const; diff --git a/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx b/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx index 993990f9f67..77d68a8f82f 100644 --- a/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx @@ -299,7 +299,7 @@ RegularSphereMeshSource< TOutputMesh > // set output outputMesh->Graft(result); - result->SetCells(ITK_NULLPTR); + result->SetCells(nullptr); } } diff --git a/Modules/Core/Mesh/include/itkSimplexMesh.h b/Modules/Core/Mesh/include/itkSimplexMesh.h index cd05ba6cec0..356c1d2874a 100644 --- a/Modules/Core/Mesh/include/itkSimplexMesh.h +++ b/Modules/Core/Mesh/include/itkSimplexMesh.h @@ -137,7 +137,7 @@ class ITK_TEMPLATE_EXPORT SimplexMesh:public Mesh< TPixelType, VDimension, TMesh * copy all necessary information from passed object * to the mesh */ - virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override; /** * Add a new edge to the simplex mesh by specifying the ids of the start @@ -170,7 +170,7 @@ class ITK_TEMPLATE_EXPORT SimplexMesh:public Mesh< TPixelType, VDimension, TMesh /** * Get all neighbor points with a specified radius */ - NeighborListType * GetNeighbors(PointIdentifier pointId, unsigned int radius, NeighborListType *list = ITK_NULLPTR) const; + NeighborListType * GetNeighbors(PointIdentifier pointId, unsigned int radius, NeighborListType *list = nullptr) const; /** * Add a neighbor to a point. @@ -260,8 +260,8 @@ class ITK_TEMPLATE_EXPORT SimplexMesh:public Mesh< TPixelType, VDimension, TMesh protected: // /** Constructor for use by New() method. */ SimplexMesh(); - virtual ~SimplexMesh() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SimplexMesh() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** * The map stores a SimplexMeshGeometry object for each mesh point diff --git a/Modules/Core/Mesh/include/itkSimplexMesh.hxx b/Modules/Core/Mesh/include/itkSimplexMesh.hxx index 0aa447236fe..b54bbe07aec 100644 --- a/Modules/Core/Mesh/include/itkSimplexMesh.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMesh.hxx @@ -80,7 +80,7 @@ SimplexMesh< TPixelType, VDimension, TMeshTraits > mesh = dynamic_cast< const Superclass * >( data ); - if ( mesh == ITK_NULLPTR ) + if ( mesh == nullptr ) { // pointer could not be cast back down itkExceptionMacro( << "itk::Mesh::CopyInformation() cannot cast " @@ -286,7 +286,7 @@ typename SimplexMesh< TPixelType, VDimension, TMeshTraits >::NeighborListType * SimplexMesh< TPixelType, VDimension, TMeshTraits > ::GetNeighbors(PointIdentifier idx, unsigned int radius, NeighborListType *list) const { - if ( list == ITK_NULLPTR ) + if ( list == nullptr ) { list = new NeighborListType(); IndexArray neighborArray = GetNeighbors(idx); diff --git a/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h b/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h index 91ad44a476f..d845edefd3c 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h +++ b/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h @@ -247,14 +247,14 @@ class ITK_TEMPLATE_EXPORT SimplexMeshAdaptTopologyFilter:public MeshToMeshFilter protected: SimplexMeshAdaptTopologyFilter(); - ~SimplexMeshAdaptTopologyFilter() ITK_OVERRIDE; + ~SimplexMeshAdaptTopologyFilter() override; SimplexMeshAdaptTopologyFilter(const Self &) {} void operator=(const Self &) {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** * Initialize this filters containers diff --git a/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.h b/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.h index fdee23f5ac7..d2008f470cc 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.h +++ b/Modules/Core/Mesh/include/itkSimplexMeshToTriangleMeshFilter.h @@ -161,13 +161,13 @@ class ITK_TEMPLATE_EXPORT SimplexMeshToTriangleMeshFilter:public MeshToMeshFilte protected: SimplexMeshToTriangleMeshFilter(); - virtual ~SimplexMeshToTriangleMeshFilter() ITK_OVERRIDE; + ~SimplexMeshToTriangleMeshFilter() override; SimplexMeshToTriangleMeshFilter(const Self &) {} void operator=(const Self &) {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; void Initialize(); diff --git a/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h b/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h index e3b896ecb10..0617c1510be 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h +++ b/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h @@ -175,8 +175,8 @@ class ITK_TEMPLATE_EXPORT SimplexMeshVolumeCalculator:public Object protected: SimplexMeshVolumeCalculator(); - virtual ~SimplexMeshVolumeCalculator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SimplexMeshVolumeCalculator() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SimplexMeshVolumeCalculator); diff --git a/Modules/Core/Mesh/include/itkSphereMeshSource.h b/Modules/Core/Mesh/include/itkSphereMeshSource.h index 4d3e048346f..b2e4040c343 100644 --- a/Modules/Core/Mesh/include/itkSphereMeshSource.h +++ b/Modules/Core/Mesh/include/itkSphereMeshSource.h @@ -85,10 +85,10 @@ class ITK_TEMPLATE_EXPORT SphereMeshSource:public MeshSource< TOutputMesh > protected: SphereMeshSource(); - ~SphereMeshSource() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SphereMeshSource() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** model center */ OPointType m_Center; diff --git a/Modules/Core/Mesh/include/itkTransformMeshFilter.h b/Modules/Core/Mesh/include/itkTransformMeshFilter.h index ae7aed2715d..6abda21908d 100644 --- a/Modules/Core/Mesh/include/itkTransformMeshFilter.h +++ b/Modules/Core/Mesh/include/itkTransformMeshFilter.h @@ -72,11 +72,11 @@ class ITK_TEMPLATE_EXPORT TransformMeshFilter: protected: TransformMeshFilter(); - ~TransformMeshFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~TransformMeshFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate Requested Data */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Transform to apply to all the mesh points. */ typename TransformType::Pointer m_Transform; diff --git a/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx b/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx index 75907d88f1f..d38bf69fcb8 100644 --- a/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx @@ -30,7 +30,7 @@ template< typename TInputMesh, typename TOutputMesh, typename TTransform > TransformMeshFilter< TInputMesh, TOutputMesh, TTransform > ::TransformMeshFilter() { - m_Transform = ITK_NULLPTR; // has to be provided by the user. + m_Transform = nullptr; // has to be provided by the user. } /** diff --git a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.h b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.h index 3294c2cc9f7..79bdb95e4ef 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.h +++ b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.h @@ -202,10 +202,10 @@ class ITK_TEMPLATE_EXPORT TriangleMeshToBinaryImageFilter:public ImageSource< TO protected: TriangleMeshToBinaryImageFilter(); - ~TriangleMeshToBinaryImageFilter() ITK_OVERRIDE; + ~TriangleMeshToBinaryImageFilter() override; - virtual void GenerateOutputInformation() ITK_OVERRIDE {} // do nothing - virtual void GenerateData() ITK_OVERRIDE; + void GenerateOutputInformation() override {} // do nothing + void GenerateData() override; virtual void RasterizeTriangles(); @@ -230,7 +230,7 @@ class ITK_TEMPLATE_EXPORT TriangleMeshToBinaryImageFilter:public ImageSource< TO StencilIndexVector m_StencilIndex; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TriangleMeshToBinaryImageFilter); diff --git a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx index 66dd17d9b13..cb8f7456f99 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx +++ b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx @@ -46,7 +46,7 @@ TriangleMeshToBinaryImageFilter< TInputMesh, TOutputImage > m_Direction.GetVnlMatrix().set_identity(); m_Tolerance = 1e-5; - m_InfoImage = ITK_NULLPTR; + m_InfoImage = nullptr; } /** Destructor */ @@ -168,7 +168,7 @@ TriangleMeshToBinaryImageFilter< TInputMesh, TOutputImage > // Get the input and output pointers OutputImagePointer OutputImage = this->GetOutput(); - if ( m_InfoImage == ITK_NULLPTR ) + if ( m_InfoImage == nullptr ) { if ( m_Size[0] == 0 || m_Size[1] == 0 || m_Size[2] == 0 ) { diff --git a/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.h b/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.h index 98f270a024a..5a11addf22f 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.h +++ b/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.h @@ -114,17 +114,17 @@ class ITK_TEMPLATE_EXPORT TriangleMeshToSimplexMeshFilter:public MeshToMeshFilte protected: TriangleMeshToSimplexMeshFilter(); - ~TriangleMeshToSimplexMeshFilter() ITK_OVERRIDE; + ~TriangleMeshToSimplexMeshFilter() override; TriangleMeshToSimplexMeshFilter(const Self &) {} void operator=(const Self &) {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Override from ProcessObject */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** * Initializes all necessary datastructures diff --git a/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx b/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx index 3054c07dba4..12b75e39ae4 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx @@ -24,11 +24,11 @@ namespace itk template< typename TInputMesh, typename TOutputMesh > TriangleMeshToSimplexMeshFilter< TInputMesh, TOutputMesh > ::TriangleMeshToSimplexMeshFilter() : - m_FaceSet(ITK_NULLPTR), - m_Edges(ITK_NULLPTR), - m_EdgeNeighborList(ITK_NULLPTR), - m_VertexNeighborList(ITK_NULLPTR), - m_LineCellIndices(ITK_NULLPTR), + m_FaceSet(nullptr), + m_Edges(nullptr), + m_EdgeNeighborList(nullptr), + m_VertexNeighborList(nullptr), + m_LineCellIndices(nullptr), m_CellIdxOffset(0), m_IdOffset(0), m_EdgeCellId(0), diff --git a/Modules/Core/Mesh/include/itkVTKPolyDataReader.h b/Modules/Core/Mesh/include/itkVTKPolyDataReader.h index 9df15e6dfd5..8f3816168db 100644 --- a/Modules/Core/Mesh/include/itkVTKPolyDataReader.h +++ b/Modules/Core/Mesh/include/itkVTKPolyDataReader.h @@ -99,11 +99,11 @@ class ITK_TEMPLATE_EXPORT VTKPolyDataReader:public MeshSource< TOutputMesh > protected: VTKPolyDataReader(); - ~VTKPolyDataReader() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VTKPolyDataReader() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Reads the file */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Filename to read */ diff --git a/Modules/Core/Mesh/include/itkVTKPolyDataWriter.h b/Modules/Core/Mesh/include/itkVTKPolyDataWriter.h index 16cbd826c4a..241602f5164 100644 --- a/Modules/Core/Mesh/include/itkVTKPolyDataWriter.h +++ b/Modules/Core/Mesh/include/itkVTKPolyDataWriter.h @@ -93,7 +93,7 @@ class ITK_TEMPLATE_EXPORT VTKPolyDataWriter:public Object protected: VTKPolyDataWriter(); - virtual ~VTKPolyDataWriter() ITK_OVERRIDE; + ~VTKPolyDataWriter() override; virtual void GenerateData(); @@ -101,7 +101,7 @@ class ITK_TEMPLATE_EXPORT VTKPolyDataWriter:public Object InputMeshPointer m_Input; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VTKPolyDataWriter); diff --git a/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx b/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx index 79a2111dbe0..da3089496da 100644 --- a/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx +++ b/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx @@ -32,7 +32,7 @@ template< typename TInputMesh > VTKPolyDataWriter< TInputMesh > ::VTKPolyDataWriter() { - this->m_Input = ITK_NULLPTR; + this->m_Input = nullptr; this->m_FileName = ""; } diff --git a/Modules/Core/Mesh/include/itkWarpMeshFilter.h b/Modules/Core/Mesh/include/itkWarpMeshFilter.h index 1bb9832e369..eead37ac533 100644 --- a/Modules/Core/Mesh/include/itkWarpMeshFilter.h +++ b/Modules/Core/Mesh/include/itkWarpMeshFilter.h @@ -77,11 +77,11 @@ class ITK_TEMPLATE_EXPORT WarpMeshFilter: protected: WarpMeshFilter(); - ~WarpMeshFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~WarpMeshFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate Requested Data */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(WarpMeshFilter); diff --git a/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx b/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx index ef58a6c8c99..db568e44832 100644 --- a/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx +++ b/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx @@ -54,7 +54,7 @@ ::SimplexMeshGeometry() neighbors.Fill(p); meanCurvature = c; - neighborSet = ITK_NULLPTR; + neighborSet = nullptr; closestAttractorIndex = 0; } @@ -62,7 +62,7 @@ SimplexMeshGeometry ::~SimplexMeshGeometry() { delete this->neighborSet; - this->neighborSet = ITK_NULLPTR; + this->neighborSet = nullptr; } void @@ -162,7 +162,7 @@ ::CopyNeigborSet( const NeighborSetType * nset ) } else { - this->neighborSet = ITK_NULLPTR; + this->neighborSet = nullptr; } } diff --git a/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx b/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx index 558fc7d9cfe..16a627c8264 100644 --- a/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx +++ b/Modules/Core/Mesh/test/itkMeshSourceGraftOutputTest.cxx @@ -57,11 +57,11 @@ class MeshSourceGraftOutputFilter : protected: MeshSourceGraftOutputFilter(); - ~MeshSourceGraftOutputFilter() ITK_OVERRIDE {}; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~MeshSourceGraftOutputFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; /** Generate Requested Data */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Transform to apply to all the mesh points. */ typename TransformType::Pointer m_Transform; diff --git a/Modules/Core/Mesh/test/itkMeshTest.cxx b/Modules/Core/Mesh/test/itkMeshTest.cxx index bb718d5d478..3e12fd6e9af 100644 --- a/Modules/Core/Mesh/test/itkMeshTest.cxx +++ b/Modules/Core/Mesh/test/itkMeshTest.cxx @@ -116,7 +116,7 @@ class VisitCells CountClass* m_CountClass; VisitCells() { - m_CountClass = ITK_NULLPTR; + m_CountClass = nullptr; } }; @@ -253,7 +253,7 @@ int itkMeshTest(int, char* [] ) catch(...) { std::cout << "CellPointer cannot be down-cast to a QuadCellType" << std::endl; - quad = ITK_NULLPTR; + quad = nullptr; } if( quad ) { @@ -331,7 +331,7 @@ int itkMeshTest(int, char* [] ) 1, // Topological dimension of feature. 1, // CellIdentifier 1, // CellFeatureIdentifier - ITK_NULLPTR); // We don't want the neighbors themselves (yet) + nullptr); // We don't want the neighbors themselves (yet) std::cout << "Number of neighbors (hex edge 1): " << numberOfNeighbors << ". " << std::endl; @@ -443,7 +443,7 @@ int itkMeshTest(int, char* [] ) catch(...) { std::cout << "CellPointer cannot be down-cast to a VertexCellType" << std::endl; - vertex = ITK_NULLPTR; + vertex = nullptr; } if( vertex ) { @@ -522,7 +522,7 @@ int itkMeshTest(int, char* [] ) catch(...) { std::cout << "CellPointer cannot be down-cast to a VertexCellType" << std::endl; - vertex = ITK_NULLPTR; + vertex = nullptr; } if( vertex ) { @@ -562,7 +562,7 @@ int itkMeshTest(int, char* [] ) catch(...) { std::cout << "CellPointer cannot be down-cast to a VertexCellType" << std::endl; - edge = ITK_NULLPTR; + edge = nullptr; } if( edge ) { diff --git a/Modules/Core/Mesh/test/itkQuadrilateralCellTest.cxx b/Modules/Core/Mesh/test/itkQuadrilateralCellTest.cxx index c82a009963d..5218f13639f 100644 --- a/Modules/Core/Mesh/test/itkQuadrilateralCellTest.cxx +++ b/Modules/Core/Mesh/test/itkQuadrilateralCellTest.cxx @@ -52,7 +52,7 @@ int itkQuadrilateralCellTest(int, char* [] ) CoordRepType* closestPoint, CoordRepType pcoord [], double * distance, - InterpolationWeightType* weights) ITK_OVERRIDE + InterpolationWeightType* weights) override { return this->Superclass::EvaluatePosition( inputPoint, points, closestPoint, pcoord, distance, weights ); diff --git a/Modules/Core/Mesh/test/itkSimplexMeshTest.cxx b/Modules/Core/Mesh/test/itkSimplexMeshTest.cxx index 649d1617d0f..34ac107b369 100644 --- a/Modules/Core/Mesh/test/itkSimplexMeshTest.cxx +++ b/Modules/Core/Mesh/test/itkSimplexMeshTest.cxx @@ -35,7 +35,7 @@ int itkSimplexMeshTest(int , char *[] ) typedef SimplexMeshType::NeighborListType NeighborsListType; - NeighborsListType* neighbors = ITK_NULLPTR; + NeighborsListType* neighbors = nullptr; /** * Define the 3d geometric positions for 8 points in a cube. @@ -130,7 +130,7 @@ int itkSimplexMeshTest(int , char *[] ) { std::cout << "Rigidity: " << i << ", neighbor list size: " << neighbors->size() << std::endl; delete neighbors; - neighbors = ITK_NULLPTR; + neighbors = nullptr; } std::cout << ", Elapsed time (for getting neighbors): " << timeProbe.GetMean() << std::endl; diff --git a/Modules/Core/Mesh/test/itkSimplexMeshToTriangleMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkSimplexMeshToTriangleMeshFilterTest.cxx index e1391b24438..3a3dbccbc7d 100644 --- a/Modules/Core/Mesh/test/itkSimplexMeshToTriangleMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkSimplexMeshToTriangleMeshFilterTest.cxx @@ -71,8 +71,8 @@ int itkSimplexMeshToTriangleMeshFilterTest( int , char * [] ) std::cout << "Back filtered Triangle Mesh: " << triangleMesh << std::endl; std::cout << "[TEST DONE]" << std::endl; - originalTriangleMesh = ITK_NULLPTR; - simplexFilter = ITK_NULLPTR; + originalTriangleMesh = nullptr; + simplexFilter = nullptr; return EXIT_SUCCESS; } diff --git a/Modules/Core/Mesh/test/itkTriangleCellTest.cxx b/Modules/Core/Mesh/test/itkTriangleCellTest.cxx index 9287435337f..e055b725199 100644 --- a/Modules/Core/Mesh/test/itkTriangleCellTest.cxx +++ b/Modules/Core/Mesh/test/itkTriangleCellTest.cxx @@ -54,7 +54,7 @@ int itkTriangleCellTest(int, char* [] ) CoordRepType* closestPoint, CoordRepType pcoord [], double * distance, - InterpolationWeightType* weights) ITK_OVERRIDE + InterpolationWeightType* weights) override { return this->Superclass::EvaluatePosition( inputPoint, points, closestPoint, pcoord, distance, weights ); diff --git a/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilter2Test.cxx b/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilter2Test.cxx index b668afdaf78..67c49daecae 100644 --- a/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilter2Test.cxx +++ b/Modules/Core/Mesh/test/itkTriangleMeshToSimplexMeshFilter2Test.cxx @@ -62,7 +62,7 @@ int itkTriangleMeshToSimplexMeshFilter2Test(int , char *[] ) for (int i=0; i < 7; i++) { itk::TimeProbe timeProbe; - NeighborsListType* neighbors = ITK_NULLPTR; + NeighborsListType* neighbors = nullptr; timeProbe.Start(); const unsigned int lastIndex = simplexMesh->GetPoints()->Size(); diff --git a/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.h b/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.h index d43d4513503..b16d7a55748 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.h +++ b/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.h @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT GeometricalQuadEdge:public QuadEdge public: /** Memory creation methods. */ GeometricalQuadEdge(); - virtual ~GeometricalQuadEdge() {} + ~GeometricalQuadEdge() override {} /** Set methods. */ inline void SetOrigin(const OriginRefType v) @@ -215,10 +215,10 @@ class ITK_TEMPLATE_EXPORT GeometricalQuadEdge:public QuadEdge bool IsInLnextRing(Self *); - Self * GetNextBorderEdgeWithUnsetLeft(Self *edgeTest = 0); + Self * GetNextBorderEdgeWithUnsetLeft(Self *edgeTest = nullptr); bool InsertAfterNextBorderEdgeWithUnsetLeft(Self *isol, - Self *hint = 0); + Self *hint = nullptr); bool ReorderOnextRingBeforeAddFace(Self *second); diff --git a/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx b/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx index 89e4869f939..645e5bca669 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx @@ -309,7 +309,7 @@ GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual >::GetNext if ( this->IsOriginInternal() ) { itkQEDebugMacro("Internal point."); - return ( ITK_NULLPTR ); + return ( nullptr ); } // Update reference @@ -336,7 +336,7 @@ GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual >::GetNext // No border edge found itkQEDebugMacro("Unfound border edge."); - return ( ITK_NULLPTR ); + return ( nullptr ); } /** @@ -670,7 +670,7 @@ GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual > { const Self *p1 = this->GetSym(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { return false; // FIXME: Is this the right answer ? } @@ -687,7 +687,7 @@ GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual > { const DualType *p1 = this->GetRot(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { return false; // FIXME: Is this the right answer ? } @@ -704,7 +704,7 @@ GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual > { const DualType *p1 = this->GetInvRot(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { return false; // FIXME: Is this the right answer ? } diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h index 7392202b038..9d096b2d93a 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h @@ -371,11 +371,11 @@ class ITKQuadEdgeMesh_EXPORT QuadEdge return ( this->GetRot()->GetRot()->GetRot() ); #else Self *p1 = this->GetRot(); - if ( !p1 ) { return ITK_NULLPTR; } + if ( !p1 ) { return nullptr; } Self *p2 = p1->GetRot(); - if ( !p2 ) { return ITK_NULLPTR; } + if ( !p2 ) { return nullptr; } Self *p3 = p2->GetRot(); - if ( !p3 ) { return ITK_NULLPTR; } + if ( !p3 ) { return nullptr; } return p3; #endif } @@ -390,11 +390,11 @@ class ITKQuadEdgeMesh_EXPORT QuadEdge return ( this->GetRot()->GetRot()->GetRot() ); #else const Self *p1 = this->GetRot(); - if ( !p1 ) { return ITK_NULLPTR; } + if ( !p1 ) { return nullptr; } const Self *p2 = p1->GetRot(); - if ( !p2 ) { return ITK_NULLPTR; } + if ( !p2 ) { return nullptr; } const Self *p3 = p2->GetRot(); - if ( !p3 ) { return ITK_NULLPTR; } + if ( !p3 ) { return nullptr; } return p3; #endif } @@ -405,7 +405,7 @@ class ITKQuadEdgeMesh_EXPORT QuadEdge inline const Self * GetInvDnext() const { return this->GetDprev(); } /** Queries. */ - inline bool IsHalfEdge() const { return ( ( m_Onext == this ) || ( m_Rot == ITK_NULLPTR ) ); } + inline bool IsHalfEdge() const { return ( ( m_Onext == this ) || ( m_Rot == nullptr ) ); } inline bool IsIsolated() const { return ( this == this->GetOnext() ); } bool IsEdgeInOnextRing(Self *testEdge) const; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h index d5244349997..0a763727409 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h @@ -254,12 +254,12 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMesh:public Mesh< TPixel, VDimension, TTraits public: // Multithreading framework: not tested yet. - virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE + bool RequestedRegionIsOutsideOfTheBufferedRegion() override { return ( false ); } - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** another way of deleting all the cells */ virtual void Clear(); @@ -277,8 +277,8 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMesh:public Mesh< TPixel, VDimension, TTraits * and * http://public.kitware.com/pipermail/insight-users/2005-April/012613.html */ - virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE { (void)data; } - virtual void Graft(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override { (void)data; } + void Graft(const DataObject *data) override; /** squeeze the point container to be able to write the file properly */ void SqueezePointsIds(); @@ -307,7 +307,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMesh:public Mesh< TPixel, VDimension, TTraits int dimension) const { (void)dimension; - return ( (BoundaryAssignmentsContainerPointer)ITK_NULLPTR ); + return ( (BoundaryAssignmentsContainerPointer)nullptr ); } #endif @@ -500,7 +500,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMesh:public Mesh< TPixel, VDimension, TTraits protected: /** Constructor and Destructor. */ QuadEdgeMesh(); - virtual ~QuadEdgeMesh() ITK_OVERRIDE; + ~QuadEdgeMesh() override; /** Release the memory of each one of the cells independently. */ virtual void ClearCellsContainer(); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx index 2cc51104829..0b7c424f5d5 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx @@ -322,7 +322,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > /////////////////////////////////////////////////////////////// // Back to dealing with the geometrical references. First // make sure the oldOrigin's edge entry won't be used any more: - oldOrigin.SetEdge( (QEPrimal *)ITK_NULLPTR ); + oldOrigin.SetEdge( (QEPrimal *)nullptr ); this->SetPoint(oldOriginId, oldOrigin); // We need to inform the edges ranging from a->Onext() to b that @@ -662,7 +662,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > if ( orgPid == destPid ) { itkDebugMacro("Creating an edge between the same point."); - return ( (QEPrimal *)ITK_NULLPTR ); + return ( (QEPrimal *)nullptr ); } // Make sure the points are already in the QuadEdgeMesh container: @@ -670,12 +670,12 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > || !( this->GetPoints()->IndexExists(destPid) ) ) { itkDebugMacro("One of the points not in the PointSet."); - return ( (QEPrimal *)ITK_NULLPTR ); + return ( (QEPrimal *)nullptr ); } // Make sure the edge is not already in the container QEPrimal *e = this->FindEdge(orgPid, destPid); - if ( e != (QEPrimal *)ITK_NULLPTR ) + if ( e != (QEPrimal *)nullptr ) { itkDebugMacro("Edge already in QuadEdgeMesh."); return e; @@ -689,7 +689,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > if ( eOrigin->IsOriginInternal() ) { itkDebugMacro("No room for a new edge in the Origin() ring."); - return ( (QEPrimal *)ITK_NULLPTR ); + return ( (QEPrimal *)nullptr ); } } @@ -700,7 +700,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > if ( eDestination->IsOriginInternal() ) { itkDebugMacro("No room for a new edge in the Destination() ring."); - return ( (QEPrimal *)ITK_NULLPTR ); + return ( (QEPrimal *)nullptr ); } } @@ -784,7 +784,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > // Check if the edge exists QEPrimal *e = this->FindEdge(orgPid, destPid); - if ( e == (QEPrimal *)ITK_NULLPTR ) + if ( e == (QEPrimal *)nullptr ) { itkDebugMacro("Edge missing in mesh."); return; @@ -816,7 +816,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > } else { - pOrigin.SetEdge( (QEPrimal *)ITK_NULLPTR ); + pOrigin.SetEdge( (QEPrimal *)nullptr ); } } @@ -831,7 +831,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > } else { - pDestination.SetEdge( (QEPrimal *)ITK_NULLPTR ); + pDestination.SetEdge( (QEPrimal *)nullptr ); } } @@ -851,7 +851,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > { PolygonCellType *pcell = dynamic_cast< PolygonCellType * >( cit.Value() ); bool toDelete = false; - if ( pcell != (PolygonCellType *)ITK_NULLPTR ) + if ( pcell != (PolygonCellType *)nullptr ) { QEPrimal *edge = pcell->GetEdgeRingEntry(); typename QEPrimal::IteratorGeom it = edge->BeginGeomLnext(); @@ -956,7 +956,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > // Check if the Origin point's edge ring entry is the edge we are // trying to delete. When this is the case shift the Origin edge entry // to another edge and when no other edge is available leave it - // to ITK_NULLPTR. + // to nullptr. PointType& pOrigin = points->ElementAt(orgPid); if ( pOrigin.GetEdge() == e ) @@ -967,7 +967,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > } else { - pOrigin.SetEdge( (QEPrimal *)ITK_NULLPTR ); + pOrigin.SetEdge( (QEPrimal *)nullptr ); } } @@ -982,7 +982,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > } else { - pDestination.SetEdge( (QEPrimal *)ITK_NULLPTR ); + pDestination.SetEdge( (QEPrimal *)nullptr ); } } // ------------------------------------------------------------------ @@ -1116,7 +1116,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > { if ( this->GetEdgeCells()->size() == 0 ) { - return ( (QEPrimal *)ITK_NULLPTR ); + return ( (QEPrimal *)nullptr ); } const CellsContainer* edgeCells = this->GetEdgeCells(); @@ -1138,7 +1138,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > if( !this->GetEdgeCells()->GetElementIfIndexExists( eid, &c ) ) { itkDebugMacro("No such edge in container"); - return ( (QEPrimal *)ITK_NULLPTR ); + return ( (QEPrimal *)nullptr ); } EdgeCellType *e = dynamic_cast< EdgeCellType * >( c ); @@ -1179,7 +1179,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > ++it; } } - return ( static_cast< QEPrimal * >( ITK_NULLPTR ) ); + return ( static_cast< QEPrimal * >( nullptr ) ); } /** @@ -1189,10 +1189,10 @@ typename QuadEdgeMesh< TPixel, VDimension, TTraits >::EdgeCellType * QuadEdgeMesh< TPixel, VDimension, TTraits > ::FindEdgeCell(const PointIdentifier & pid0, const PointIdentifier & pid1) const { - EdgeCellType *result = (EdgeCellType *)ITK_NULLPTR; + EdgeCellType *result = (EdgeCellType *)nullptr; QEPrimal * EdgeGeom = FindEdge(pid0, pid1); - if ( EdgeGeom != (QEPrimal *)ITK_NULLPTR ) + if ( EdgeGeom != (QEPrimal *)nullptr ) { CellIdentifier LineIdent = EdgeGeom->GetIdent(); if ( LineIdent != m_NoPoint ) @@ -1233,7 +1233,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > if ( count != 1 ) { itkDebugMacro("Point " << i << " is duplicated"); - return ( (QEPrimal *)ITK_NULLPTR ); + return ( (QEPrimal *)nullptr ); } } @@ -1245,7 +1245,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > if ( !pointsContainer->IndexExists(points[i]) ) { itkDebugMacro("Point " << i << " is missing in the mesh"); - return (QEPrimal *)ITK_NULLPTR; + return (QEPrimal *)nullptr; } } #endif @@ -1264,7 +1264,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > { itkDebugMacro("Edge [" << i << " " << ( ( i + 1 ) % N ) << " has a left face."); - return (QEPrimal *)ITK_NULLPTR; + return (QEPrimal *)nullptr; } } } @@ -1292,7 +1292,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > const PointIdentifier numberOfPoints = static_cast< PointIdentifier >( points.size() ); typedef std::vector< QEPrimal * > QEList; - QEList FaceQEList( numberOfPoints, ITK_NULLPTR ); + QEList FaceQEList( numberOfPoints, nullptr ); // Now create edge list and create missing edges if needed. for ( PointIdentifier i = 0; i < numberOfPoints; i++ ) @@ -1304,7 +1304,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > if ( !edge && CheckEdges ) { QEPrimal *entry = this->AddEdgeWithSecurePointList(pid0, pid1); - if ( entry == (QEPrimal *)ITK_NULLPTR ) + if ( entry == (QEPrimal *)nullptr ) { return ( entry ); } @@ -1339,8 +1339,8 @@ QuadEdgeMesh< TPixel, VDimension, TTraits > if ( !entry ) { // FIXME throw exception here instead - itkDebugMacro("entry == ITK_NULLPTR"); - return (QEPrimal *)ITK_NULLPTR; + itkDebugMacro("entry == nullptr"); + return (QEPrimal *)nullptr; } this->AddFace(entry); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h index ffe8b9f1215..2f176ff5627 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h @@ -258,7 +258,7 @@ class QuadEdgeMeshIterator: bool start = true): Superclass(e, op, start) {} - virtual ~QuadEdgeMeshIterator() {} + ~QuadEdgeMeshIterator() override {} QuadEdgeType * Value() { return ( this->m_Iterator ); } const QuadEdgeType * Value() const { return ( this->m_Iterator ); } @@ -283,7 +283,7 @@ class QuadEdgeMeshIteratorGeom: typedef typename QuadEdgeType::OriginRefType OriginRefType; public: - QuadEdgeMeshIteratorGeom(QuadEdgeType *e = (QuadEdgeType *)0, + QuadEdgeMeshIteratorGeom(QuadEdgeType *e = (QuadEdgeType *)nullptr, int op = Superclass::OperatorOnext, bool start = true): Superclass(e, op, start) {} @@ -314,7 +314,7 @@ class QuadEdgeMeshConstIterator: bool start = true): Superclass(const_cast< QuadEdgeType * >( e ), op, start) {} - virtual ~QuadEdgeMeshConstIterator() {} + ~QuadEdgeMeshConstIterator() override {} Self & operator=(const NoConstType & r) { @@ -354,7 +354,7 @@ class QuadEdgeMeshConstIteratorGeom: bool start = true): Superclass(e, op, start) {} - virtual ~QuadEdgeMeshConstIteratorGeom() {} + ~QuadEdgeMeshConstIteratorGeom() override {} Self & operator=(const NoConstType & r) { diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.h index b524842bb9f..e22f1a029a1 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.h @@ -58,7 +58,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshBoundaryEdgesMeshFunction: itkTypeMacro(QuadEdgeMeshBoundaryEdgesMeshFunction, FunctionBase); itkNewMacro(Self); - virtual OutputType Evaluate(const InputType & mesh) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & mesh) const override; protected: QuadEdgeMeshBoundaryEdgesMeshFunction() {} diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx index 3c8881e7525..a21cd241389 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx @@ -67,7 +67,7 @@ const { itkWarningMacro("Entry edge has not face adjacency."); delete ResultList; - return ( (OutputType)ITK_NULLPTR ); + return ( (OutputType)nullptr ); } // Store this edge as representative of it's Lnext() ring i.e. diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.h index a42e94ecbef..6f19633618e 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.h @@ -69,7 +69,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshEulerOperatorCreateCenterVertexFunction: this->m_NewPointID = (PointIdentifier)0; } - ~QuadEdgeMeshEulerOperatorCreateCenterVertexFunction() ITK_OVERRIDE {} + ~QuadEdgeMeshEulerOperatorCreateCenterVertexFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(QuadEdgeMeshEulerOperatorCreateCenterVertexFunction); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.h index 178d389dd22..66c3691c3e9 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.h @@ -64,7 +64,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction: protected: QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction() : m_OldPointID(0) {} - ~QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction() ITK_OVERRIDE {} + ~QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx index 541802aacc8..11d84653636 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx @@ -29,19 +29,19 @@ QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction< TMesh, TQEType >::Evaluate( if ( !g ) { itkDebugMacro("Input is not an edge."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } if ( !this->m_Mesh ) { itkDebugMacro("No mesh present."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } if ( !g->IsInternal() ) { itkDebugMacro("The edge is either border or wire."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } // None of the incident facets of g->GetDestination() is a hole. @@ -58,7 +58,7 @@ QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction< TMesh, TQEType >::Evaluate( if ( !one_edge->IsInternal() ) { itkDebugMacro("DeleteVertex requires a full one-ring, i.e. no holes."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } pList.push_back( one_edge->GetDestination() ); } @@ -91,7 +91,7 @@ QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction< TMesh, TQEType >::Evaluate( itkDebugMacro( "DeleteVertex requires at least two distinct \ facets incident to the facets that are incident to g->GetDestination()." ); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } // let's do the job now. diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.h index a9131670ede..dd454401419 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.h @@ -74,9 +74,9 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshEulerOperatorFlipEdgeFunction: protected: QuadEdgeMeshEulerOperatorFlipEdgeFunction(); - ~QuadEdgeMeshEulerOperatorFlipEdgeFunction() ITK_OVERRIDE {} + ~QuadEdgeMeshEulerOperatorFlipEdgeFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; EdgeStatusType m_EdgeStatus; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx index e28c506fa44..50a9f49d1d9 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx @@ -98,7 +98,7 @@ QuadEdgeMeshEulerOperatorFlipEdgeFunction< TMesh, TQEType >::CheckStatus(QEType } if ( this->m_Mesh->FindEdge( h->GetOnext()->GetDestination(), - h->GetSym()->GetOnext()->GetDestination() ) != ITK_NULLPTR ) + h->GetSym()->GetOnext()->GetDestination() ) != nullptr ) { m_EdgeStatus = EXISTING_OPPOSITE_EDGE; return; @@ -134,22 +134,22 @@ QuadEdgeMeshEulerOperatorFlipEdgeFunction< TMesh, TQEType >::Evaluate(QEType *h) return Process(h); case EDGE_NULL: itkDebugMacro("No Edge to flip."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); case MESH_NULL: itkDebugMacro("No mesh present."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); case NON_INTERNAL_EDGE: itkDebugMacro("Can only flip internal edge."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); case NON_TRIANGULAR_LEFT_FACE: itkDebugMacro("Can only flip edge for triangles."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); case NON_TRIANGULAR_RIGHT_FACE: itkDebugMacro("Can only flip edge for triangles."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); case EXISTING_OPPOSITE_EDGE: itkDebugMacro("The opposite edge already exists."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } } diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.h index 9522e1efbc7..8d50987c393 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.h @@ -55,7 +55,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshEulerOperatorJoinFacetFunction: protected: QuadEdgeMeshEulerOperatorJoinFacetFunction(){} - ~QuadEdgeMeshEulerOperatorJoinFacetFunction() ITK_OVERRIDE {} + ~QuadEdgeMeshEulerOperatorJoinFacetFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(QuadEdgeMeshEulerOperatorJoinFacetFunction); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx index 17537ef57c1..94f1c6f7fdd 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx @@ -43,7 +43,7 @@ QuadEdgeMeshEulerOperatorJoinFacetFunction< TMesh, TQEType >::Evaluate(QEType *e if ( !e->IsInternal() ) { itkDebugMacro("The edge is either border or wire."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } // Initial state Final state // diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h index 3daa477b242..1cce199241f 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h @@ -100,9 +100,9 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshEulerOperatorJoinVertexFunction: protected: QuadEdgeMeshEulerOperatorJoinVertexFunction(); - ~QuadEdgeMeshEulerOperatorJoinVertexFunction() ITK_OVERRIDE {} + ~QuadEdgeMeshEulerOperatorJoinVertexFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; PointIdentifier m_OldPointID; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx index 98aba5d62b3..6c742e7ab35 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx @@ -120,9 +120,9 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction< TMesh, TQEType >::Evaluate(QEType * case SAMOSA_CONFIG: // Eye case case EYE_CONFIG: - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); case EDGE_JOINING_DIFFERENT_BORDERS: - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } } @@ -197,7 +197,7 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction< TMesh, TQEType >::Process(QEType *e if ( QEType::m_NoPoint != zip->Evaluate(leftZip) ) { itkDebugMacro("Zip must return NoPoint (left)."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } } else @@ -217,7 +217,7 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction< TMesh, TQEType >::Process(QEType *e if ( QEType::m_NoPoint != zip->Evaluate(riteZip) ) { itkDebugMacro("Zip must return NoPoint (right)."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } } else @@ -281,9 +281,9 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction< TMesh, TQEType >::ProcessIsolatedFa } // it now retuns one edge from NewDest or NewOrg if there are any - // else ITK_NULLPTR + // else nullptr QEType *temp = this->m_Mesh->FindEdge(dest); - if ( temp != ITK_NULLPTR ) + if ( temp != nullptr ) { return temp; } diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h index ea57da6a286..5953a88682a 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h @@ -61,13 +61,13 @@ class QuadEdgeMeshEulerOperatorSplitEdgeFunction: if ( !e ) { itkDebugMacro("Input is not an edge."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } if ( !this->m_Mesh ) { itkDebugMacro("No mesh present."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } m_SplitVertex->SetInput(this->m_Mesh); @@ -85,7 +85,7 @@ class QuadEdgeMeshEulerOperatorSplitEdgeFunction: m_SplitVertex = SplitVertex::New(); } - ~QuadEdgeMeshEulerOperatorSplitEdgeFunction() ITK_OVERRIDE {} + ~QuadEdgeMeshEulerOperatorSplitEdgeFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(QuadEdgeMeshEulerOperatorSplitEdgeFunction); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.h index a5812b635f1..aa52a8b44a3 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.h @@ -58,7 +58,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshEulerOperatorSplitFacetFunction: protected: QuadEdgeMeshEulerOperatorSplitFacetFunction(){} - ~QuadEdgeMeshEulerOperatorSplitFacetFunction() ITK_OVERRIDE {} + ~QuadEdgeMeshEulerOperatorSplitFacetFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(QuadEdgeMeshEulerOperatorSplitFacetFunction); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx index 5da49adde67..3a7ddcdafdc 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx @@ -45,32 +45,32 @@ QuadEdgeMeshEulerOperatorSplitFacetFunction< TMesh, TQEType >::Evaluate(QEType * if ( !h || !g ) { itkDebugMacro("At least one of the Input is not an edge."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } if ( !this->m_Mesh ) { itkDebugMacro("No mesh present."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } if ( h == g ) { itkDebugMacro("Provided edges should be different."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } if ( h->GetLeft() != g->GetLeft() ) { itkDebugMacro("The edges are not around the same face."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } if ( ( h->GetLnext() == g ) || ( g->GetLnext() == h ) ) { itkDebugMacro("Provided edges should NOT be consecutive."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } typedef typename MeshType::VertexRefType VertexRefType; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.h index 3e8d6979a9d..9cb6c419446 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.h @@ -73,7 +73,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshEulerOperatorSplitVertexFunction: m_NewPoint = (PointIdentifier)0; } - ~QuadEdgeMeshEulerOperatorSplitVertexFunction() ITK_OVERRIDE {} + ~QuadEdgeMeshEulerOperatorSplitVertexFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(QuadEdgeMeshEulerOperatorSplitVertexFunction); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx index 663172a89e8..4dc4d9b7fb9 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx @@ -29,25 +29,25 @@ QuadEdgeMeshEulerOperatorSplitVertexFunction< TMesh, TQEType >::Evaluate(QEType if ( !this->m_Mesh ) { itkDebugMacro("No mesh present."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } - if ( ( h == (QEType *)ITK_NULLPTR ) || ( g == (QEType *)ITK_NULLPTR ) ) + if ( ( h == (QEType *)nullptr ) || ( g == (QEType *)nullptr ) ) { itkDebugMacro("One or more argument(s) is(are) null."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } if ( h == g ) { itkDebugMacro("The two half-edges are the same. No antenna allowed."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } if ( h->GetDestination() != g->GetDestination() ) { itkDebugMacro("The two half-edges must be incident to the same vertex."); - return ( (QEType *)ITK_NULLPTR ); + return ( (QEType *)nullptr ); } // delete the faces diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.h index 9a9f3aab910..279bd2bf92c 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.h @@ -147,9 +147,9 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshFrontBaseIterator public: /** Object creation methods. */ - QuadEdgeMeshFrontBaseIterator(MeshType *mesh = (MeshType *)0, + QuadEdgeMeshFrontBaseIterator(MeshType *mesh = (MeshType *)nullptr, bool start = true, - QEType *seed = (QEType *)0); + QEType *seed = (QEType *)nullptr); virtual ~QuadEdgeMeshFrontBaseIterator(); Self & operator=(const Self & r) @@ -240,9 +240,9 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshFrontIterator: /** Object creation methods. */ QuadEdgeMeshFrontIterator(MeshType *mesh = (MeshType *)0, bool start = true, - QEType *seed = (QEType *)0): + QEType *seed = (QEType *)nullptr): Superclass(mesh, start, seed) {} - virtual ~QuadEdgeMeshFrontIterator() {} + ~QuadEdgeMeshFrontIterator() override {} QEType * Value() { return ( this->m_CurrentEdge ); } }; @@ -268,7 +268,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshConstFrontIterator: /** Object creation methods. */ QuadEdgeMeshConstFrontIterator(const MeshType *mesh = (MeshType *)0, bool start = true, - QEType *seed = (QEType *)0) + QEType *seed = (QEType *)nullptr) { (void)mesh; (void)start; @@ -276,7 +276,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshConstFrontIterator: } /** \todo do we need here a : Superclass( mesh, start, seed ) { } */ - virtual ~QuadEdgeMeshConstFrontIterator() {} + ~QuadEdgeMeshConstFrontIterator() override {} Self & operator=(const NoConstType & r) { this->m_Mesh = r.GetMesh(); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx index f07bdfea04e..b30a4dcbf45 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx @@ -29,8 +29,8 @@ QuadEdgeMeshFrontBaseIterator(MeshType *mesh, bool start, QEType *seed) : m_Mesh(mesh), m_Seed(seed), m_Start(start), - m_Front(ITK_NULLPTR), - m_CurrentEdge(ITK_NULLPTR) + m_Front(nullptr), + m_CurrentEdge(nullptr) { if ( !mesh ) { @@ -125,7 +125,7 @@ QuadEdgeMeshFrontBaseIterator< TMesh, TQE >::operator++() // All the edge->Origin() neighbours were already visited. Remove // the edge from the front, and move to next edge... m_Front->pop_front(); - m_CurrentEdge = (QEType *)ITK_NULLPTR; + m_CurrentEdge = (QEType *)nullptr; return ( this->operator++() ); } @@ -146,7 +146,7 @@ QuadEdgeMeshFrontBaseIterator< TMesh, TQE >::FindDefaultSeed() { return edge->GetRot(); } - return (QEType *)ITK_NULLPTR; + return (QEType *)nullptr; } } #endif diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFunctionBase.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFunctionBase.h index 268232dd7aa..399a227ee75 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFunctionBase.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFunctionBase.h @@ -86,10 +86,10 @@ class QuadEdgeMeshFunctionBase:public Object protected: QuadEdgeMeshFunctionBase() { - m_Mesh = (MeshType *)ITK_NULLPTR; + m_Mesh = (MeshType *)nullptr; } - ~QuadEdgeMeshFunctionBase() ITK_OVERRIDE {} + ~QuadEdgeMeshFunctionBase() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(QuadEdgeMeshFunctionBase); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h index 00609b2b3e3..7d66561a42f 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshLineCell: public: /** Object memory management methods. */ QuadEdgeMeshLineCell(); - virtual ~QuadEdgeMeshLineCell() ITK_OVERRIDE; + ~QuadEdgeMeshLineCell() override; /** Accessors for m_Identifier. */ void SetIdent(CellIdentifier cid); @@ -107,25 +107,25 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshLineCell: CellIdentifier GetIdent(); /** TCellInterface abstract methods definition. */ - virtual void Accept(CellIdentifier cellId, MultiVisitor *mv) ITK_OVERRIDE; + void Accept(CellIdentifier cellId, MultiVisitor *mv) override; - virtual CellGeometry GetType() const ITK_OVERRIDE; + CellGeometry GetType() const override; /** Topology related methods. */ static int GetTopologyId(); - virtual unsigned int GetDimension() const ITK_OVERRIDE; + unsigned int GetDimension() const override; - virtual unsigned int GetNumberOfPoints() const ITK_OVERRIDE; + unsigned int GetNumberOfPoints() const override; - virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE; + CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override; - virtual bool GetBoundaryFeature(int dimension, + bool GetBoundaryFeature(int dimension, CellFeatureIdentifier cellId, - CellAutoPointer & cell) ITK_OVERRIDE; + CellAutoPointer & cell) override; /** Useless methods. */ - virtual void MakeCopy(CellAutoPointer & cell) const ITK_OVERRIDE + void MakeCopy(CellAutoPointer & cell) const override { cell.TakeOwnership(new Self); cell->SetPointId( 0, this->GetQEGeom()->GetOrigin() ); @@ -136,38 +136,38 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshLineCell: * The Set methods will work, not the Get. * Hopefully never used ... */ - virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first) override; - virtual void SetPointIds(PointIdConstIterator first, - PointIdConstIterator last) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first, + PointIdConstIterator last) override; - virtual void SetPointId(int localId, PointIdentifier pId) ITK_OVERRIDE; + void SetPointId(int localId, PointIdentifier pId) override; - virtual PointIdIterator PointIdsBegin() ITK_OVERRIDE + PointIdIterator PointIdsBegin() override { SynchronizePointsAPI(); return &m_PointIds[0]; } - virtual PointIdIterator PointIdsEnd() ITK_OVERRIDE + PointIdIterator PointIdsEnd() override { SynchronizePointsAPI(); return ( &m_PointIds[1] + 1 ); } - virtual PointIdConstIterator GetPointIds() const ITK_OVERRIDE + PointIdConstIterator GetPointIds() const override { SynchronizePointsAPI(); return &m_PointIds[0]; } - virtual PointIdConstIterator PointIdsBegin() const ITK_OVERRIDE + PointIdConstIterator PointIdsBegin() const override { SynchronizePointsAPI(); return &m_PointIds[0]; } - virtual PointIdConstIterator PointIdsEnd() const ITK_OVERRIDE + PointIdConstIterator PointIdsEnd() const override { SynchronizePointsAPI(); return ( &m_PointIds[1] + 1 ); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.hxx index 85251711e8a..99a3ef1e037 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.hxx @@ -28,7 +28,7 @@ void QuadEdgeMeshPoint< TCoordRep, VPointDimension, TQuadEdge > ::Initialize() { - m_Edge = static_cast< TQuadEdge * >( ITK_NULLPTR ); + m_Edge = static_cast< TQuadEdge * >( nullptr ); } // --------------------------------------------------------------------- diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h index 67d19387775..b4772c42667 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h @@ -97,7 +97,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshPolygonCell:public TCellInterface /** Object memory management methods. */ QuadEdgeMeshPolygonCell(PointIdentifier nPoints = 0); QuadEdgeMeshPolygonCell(QuadEdgeType *e); - virtual ~QuadEdgeMeshPolygonCell() ITK_OVERRIDE; + ~QuadEdgeMeshPolygonCell() override; /** Accessors for m_Ident. */ void SetIdent(CellIdentifier cid) { m_Ident = cid; } @@ -111,9 +111,9 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshPolygonCell:public TCellInterface SelfAutoPointer New(); /** TCellInterface abstract methods definition. */ - virtual void Accept(CellIdentifier cellId, MultiVisitor *mv) ITK_OVERRIDE; + void Accept(CellIdentifier cellId, MultiVisitor *mv) override; - virtual CellGeometry GetType() const ITK_OVERRIDE { return ( Superclass::POLYGON_CELL ); } + CellGeometry GetType() const override { return ( Superclass::POLYGON_CELL ); } /** itk topology related methods. */ static int GetTopologyId() @@ -121,21 +121,21 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshPolygonCell:public TCellInterface return ( Superclass::POLYGON_CELL ); } - virtual unsigned int GetDimension() const ITK_OVERRIDE + unsigned int GetDimension() const override { return ( Self::CellDimension ); } - virtual unsigned int GetNumberOfPoints() const ITK_OVERRIDE; + unsigned int GetNumberOfPoints() const override; - virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE; + CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override; - virtual bool GetBoundaryFeature(int dimension, + bool GetBoundaryFeature(int dimension, CellFeatureIdentifier cellId, - CellAutoPointer & cell) ITK_OVERRIDE; + CellAutoPointer & cell) override; /** Useless methods. */ - virtual void MakeCopy(CellAutoPointer & cell) const ITK_OVERRIDE + void MakeCopy(CellAutoPointer & cell) const override { const PointIdentifier numberOfPoints = this->GetNumberOfPoints(); Self * newPolygonCell = new Self(numberOfPoints); @@ -158,22 +158,22 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshPolygonCell:public TCellInterface } /** ITK Cell API - Iterator-related methods. */ - virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first) override; - virtual void SetPointIds(PointIdConstIterator first, - PointIdConstIterator last) ITK_OVERRIDE; + void SetPointIds(PointIdConstIterator first, + PointIdConstIterator last) override; - virtual void SetPointId(int localId, PointIdentifier pId) ITK_OVERRIDE; + void SetPointId(int localId, PointIdentifier pId) override; virtual PointIdentifier GetPointId(int localId) const; - virtual PointIdIterator PointIdsBegin() ITK_OVERRIDE + PointIdIterator PointIdsBegin() override { // NOTE ALEX: should update the array on the fly to make it faster MakePointIds(); if ( m_PointIds.size() == 0 ) { - return ( static_cast< PointIdIterator >( ITK_NULLPTR ) ); + return ( static_cast< PointIdIterator >( nullptr ) ); } else { @@ -181,12 +181,12 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshPolygonCell:public TCellInterface } } - virtual PointIdIterator PointIdsEnd() ITK_OVERRIDE + PointIdIterator PointIdsEnd() override { // NOTE ALEX: should update the array on the fly to make it faster if ( m_PointIds.size() == 0 ) { - return ( static_cast< PointIdIterator >( ITK_NULLPTR ) ); + return ( static_cast< PointIdIterator >( nullptr ) ); } else { @@ -194,13 +194,13 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshPolygonCell:public TCellInterface } } - virtual PointIdConstIterator PointIdsBegin() const ITK_OVERRIDE + PointIdConstIterator PointIdsBegin() const override { // NOTE ALEX: should update the array on the fly to make it faster MakePointIds(); if ( m_PointIds.size() == 0 ) { - return ( static_cast< PointIdIterator >( ITK_NULLPTR ) ); + return ( static_cast< PointIdIterator >( nullptr ) ); } else { @@ -208,12 +208,12 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshPolygonCell:public TCellInterface } } - virtual PointIdConstIterator PointIdsEnd() const ITK_OVERRIDE + PointIdConstIterator PointIdsEnd() const override { // NOTE ALEX: should update the array on the fly to make it faster if ( m_PointIds.size() == 0 ) { - return ( static_cast< PointIdIterator >( ITK_NULLPTR ) ); + return ( static_cast< PointIdIterator >( nullptr ) ); } else { diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshScalarDataVTKPolyDataWriter.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshScalarDataVTKPolyDataWriter.h index 4369355759c..28e1020e82a 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshScalarDataVTKPolyDataWriter.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshScalarDataVTKPolyDataWriter.h @@ -81,12 +81,12 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshScalarDataVTKPolyDataWriter:public VTKPoly protected: QuadEdgeMeshScalarDataVTKPolyDataWriter(); - ~QuadEdgeMeshScalarDataVTKPolyDataWriter() ITK_OVERRIDE; + ~QuadEdgeMeshScalarDataVTKPolyDataWriter() override; std::string m_CellDataName; std::string m_PointDataName; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; void WriteCellData(); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h index 38703559f97..795a3d9af7c 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h @@ -102,7 +102,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshToQuadEdgeMeshFilter: protected: QuadEdgeMeshToQuadEdgeMeshFilter(); - virtual ~QuadEdgeMeshToQuadEdgeMeshFilter() ITK_OVERRIDE {} + ~QuadEdgeMeshToQuadEdgeMeshFilter() override {} virtual void CopyInputMeshToOutputMesh(); @@ -183,7 +183,7 @@ void CopyMeshToMeshPointData(const TInputMesh *in, TOutputMesh *out) const InputPointDataContainer *inputPointData = in->GetPointData(); - if ( inputPointData == ITK_NULLPTR ) + if ( inputPointData == nullptr ) { // There is nothing to copy return; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h index f97e28b07d7..092b24fb10e 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h @@ -75,8 +75,8 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshTopologyChecker:public Object protected: QuadEdgeMeshTopologyChecker(); - ~QuadEdgeMeshTopologyChecker() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~QuadEdgeMeshTopologyChecker() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(QuadEdgeMeshTopologyChecker); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx index ece2c92c62f..2fb62254efa 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx @@ -31,7 +31,7 @@ QuadEdgeMeshTopologyChecker< TMesh > m_ExpectedNumberOfFaces = NumericTraits< CellIdentifier >::ZeroValue(); m_ExpectedNumberOfBoundaries = NumericTraits< CellIdentifier >::ZeroValue(); m_ExpectedGenus = NumericTraits< OffsetValueType >::ZeroValue(); - m_Mesh = ITK_NULLPTR; + m_Mesh = nullptr; } template< typename TMesh > @@ -113,7 +113,7 @@ QuadEdgeMeshTopologyChecker< TMesh > } } } - else // cell->GetQEGEom( ) == ITK_NULLPTR + else // cell->GetQEGEom( ) == nullptr { // supposely impossible, throw exception } diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.h index 22536e37817..4373b079254 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.h @@ -60,7 +60,7 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshZipMeshFunction: protected: QuadEdgeMeshZipMeshFunction(){} - ~QuadEdgeMeshZipMeshFunction() ITK_OVERRIDE {} + ~QuadEdgeMeshZipMeshFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(QuadEdgeMeshZipMeshFunction); diff --git a/Modules/Core/QuadEdgeMesh/src/itkQuadEdge.cxx b/Modules/Core/QuadEdgeMesh/src/itkQuadEdge.cxx index b873831d191..ed3216d35a3 100644 --- a/Modules/Core/QuadEdgeMesh/src/itkQuadEdge.cxx +++ b/Modules/Core/QuadEdgeMesh/src/itkQuadEdge.cxx @@ -24,15 +24,15 @@ QuadEdge ::QuadEdge() { this->m_Onext = this; - this->m_Rot = ITK_NULLPTR; + this->m_Rot = nullptr; } // --------------------------------------------------------------------- QuadEdge ::~QuadEdge() { - this->m_Onext = ITK_NULLPTR; - this->m_Rot = ITK_NULLPTR; + this->m_Onext = nullptr; + this->m_Rot = nullptr; } // --------------------------------------------------------------------- @@ -44,21 +44,21 @@ ::GetLnext() return this->GetInvRot()->GetOnext()->GetRot(); #else Self *p1 = this->GetInvRot(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p3 = p2->GetRot(); - if ( p3 == ITK_NULLPTR ) + if ( p3 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p3; @@ -74,21 +74,21 @@ ::GetLnext() const return this->GetInvRot()->GetOnext()->GetRot(); #else const Self *p1 = this->GetInvRot(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p3 = p2->GetRot(); - if ( p3 == ITK_NULLPTR ) + if ( p3 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p3; @@ -104,21 +104,21 @@ ::GetRnext() return this->GetRot()->GetOnext()->GetInvRot(); #else Self *p1 = this->GetRot(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p3 = p2->GetInvRot(); - if ( p3 == ITK_NULLPTR ) + if ( p3 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p3; @@ -134,21 +134,21 @@ ::GetRnext() const return this->GetRot()->GetOnext()->GetInvRot(); #else const Self *p1 = this->GetRot(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p3 = p2->GetInvRot(); - if ( p3 == ITK_NULLPTR ) + if ( p3 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p3; @@ -164,21 +164,21 @@ ::GetDnext() return this->GetSym()->GetOnext()->GetSym(); #else Self *p1 = this->GetSym(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p3 = p2->GetSym(); - if ( p3 == ITK_NULLPTR ) + if ( p3 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p3; @@ -194,21 +194,21 @@ ::GetDnext() const return this->GetSym()->GetOnext()->GetSym(); #else const Self *p1 = this->GetSym(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p3 = p2->GetSym(); - if ( p3 == ITK_NULLPTR ) + if ( p3 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p3; @@ -224,21 +224,21 @@ ::GetOprev() return this->GetRot()->GetOnext()->GetRot(); #else Self *p1 = this->GetRot(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p3 = p2->GetRot(); - if ( p3 == ITK_NULLPTR ) + if ( p3 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p3; @@ -254,21 +254,21 @@ ::GetOprev() const return this->GetRot()->GetOnext()->GetRot(); #else const Self *p1 = this->GetRot(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p3 = p2->GetRot(); - if ( p3 == ITK_NULLPTR ) + if ( p3 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p3; @@ -284,15 +284,15 @@ ::GetLprev() return this->GetOnext()->GetSym(); #else Self *p1 = this->GetOnext(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p2 = p1->GetSym(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p2; @@ -308,15 +308,15 @@ ::GetLprev() const return this->GetOnext()->GetSym(); #else const Self *p1 = this->GetOnext(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p2 = p1->GetSym(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p2; @@ -332,15 +332,15 @@ ::GetRprev() return this->GetSym()->GetOnext(); #else Self *p1 = this->GetSym(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p2; @@ -356,15 +356,15 @@ ::GetRprev() const return this->GetSym()->GetOnext(); #else const Self *p1 = this->GetSym(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p2; @@ -380,21 +380,21 @@ ::GetDprev() return this->GetInvRot()->GetOnext()->GetInvRot(); #else Self *p1 = this->GetInvRot(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } Self *p3 = p2->GetInvRot(); - if ( p3 == ITK_NULLPTR ) + if ( p3 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p3; @@ -410,21 +410,21 @@ ::GetDprev() const return this->GetInvRot()->GetOnext()->GetInvRot(); #else const Self *p1 = this->GetInvRot(); - if ( p1 == ITK_NULLPTR ) + if ( p1 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p2 = p1->GetOnext(); - if ( p2 == ITK_NULLPTR ) + if ( p2 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } const Self *p3 = p2->GetInvRot(); - if ( p3 == ITK_NULLPTR ) + if ( p3 == nullptr ) { - return ITK_NULLPTR; + return nullptr; } return p3; @@ -440,7 +440,7 @@ ::IsEdgeInOnextRing(Self *testEdge) const ConstIterator it = this->BeginOnext(); while ( it != this->EndOnext() ) { - if ( it.Value() == ITK_NULLPTR ) + if ( it.Value() == nullptr ) { return false; } diff --git a/Modules/Core/QuadEdgeMesh/test/itkGeometricalQuadEdgeTest1.cxx b/Modules/Core/QuadEdgeMesh/test/itkGeometricalQuadEdgeTest1.cxx index e83d3d6aa7f..c3f8dcc2bce 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkGeometricalQuadEdgeTest1.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkGeometricalQuadEdgeTest1.cxx @@ -86,7 +86,7 @@ int itkGeometricalQuadEdgeTest1( int , char* [] ) qe->GetInvLnext(); qe->GetInvRnext(); qe->GetInvDnext(); - qe->IsInLnextRing( ITK_NULLPTR ); + qe->IsInLnextRing( nullptr ); delete qe->GetRot()->GetRot()->GetRot(); delete qe->GetRot()->GetRot(); diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx index 01b964a1ae2..ce8bf269f4a 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx @@ -101,7 +101,7 @@ int itkQuadEdgeMeshBasicLayerTest( int , char* [] ) { if ( ! e[i]->IsOriginSet() ) { - std::cout << "IsOriginSet() ITK_NULLPTR value failed for edge number " + std::cout << "IsOriginSet() nullptr value failed for edge number " << i << ". Failed" << std::endl; return EXIT_FAILURE; } //fi diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshCellInterfaceTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshCellInterfaceTest.cxx index bb42f8fff53..f027cbcdce6 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshCellInterfaceTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshCellInterfaceTest.cxx @@ -435,25 +435,25 @@ int itkQuadEdgeMeshCellInterfaceTest(int, char* [] ) QELineCellType* test = new QELineCellType(); QEType* m_QuadEdgeGeom = test->GetQEGeom( ); delete m_QuadEdgeGeom->GetRot( )->GetRot( )->GetRot( ); - m_QuadEdgeGeom->GetRot( )->GetRot( )->SetRot( ITK_NULLPTR ); + m_QuadEdgeGeom->GetRot( )->GetRot( )->SetRot( nullptr ); delete test; test = new QELineCellType(); m_QuadEdgeGeom = test->GetQEGeom( ); delete m_QuadEdgeGeom->GetRot( )->GetRot( )->GetRot( ); - m_QuadEdgeGeom->GetRot( )->GetRot( )->SetRot( ITK_NULLPTR ); + m_QuadEdgeGeom->GetRot( )->GetRot( )->SetRot( nullptr ); delete m_QuadEdgeGeom->GetRot( )->GetRot( ); - m_QuadEdgeGeom->GetRot( )->SetRot( ITK_NULLPTR ); + m_QuadEdgeGeom->GetRot( )->SetRot( nullptr ); delete test; test = new QELineCellType(); m_QuadEdgeGeom = test->GetQEGeom( ); delete m_QuadEdgeGeom->GetRot( )->GetRot( )->GetRot( ); - m_QuadEdgeGeom->GetRot( )->GetRot( )->SetRot( ITK_NULLPTR ); + m_QuadEdgeGeom->GetRot( )->GetRot( )->SetRot( nullptr ); delete m_QuadEdgeGeom->GetRot( )->GetRot( ); - m_QuadEdgeGeom->GetRot( )->SetRot( ITK_NULLPTR ); + m_QuadEdgeGeom->GetRot( )->SetRot( nullptr ); delete m_QuadEdgeGeom->GetRot( ); - m_QuadEdgeGeom->SetRot( ITK_NULLPTR ); + m_QuadEdgeGeom->SetRot( nullptr ); delete test; return status; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest.cxx index dc9242b3986..9f14ac6eef7 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest.cxx @@ -86,7 +86,7 @@ int itkQuadEdgeMeshEulerOperatorDeleteCenterVertexTest(int argc, char* argv[] ) deleteCenterVertex->SetInput( mesh ); std::cout << " " << "Test No QE Input"; - if( deleteCenterVertex->Evaluate( (QEType*)ITK_NULLPTR ) ) + if( deleteCenterVertex->Evaluate( (QEType*)nullptr ) ) { std::cout << "FAILED." << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorJoinVertexTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorJoinVertexTest.cxx index 1d9ded6e30e..fa8c41123f6 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorJoinVertexTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorJoinVertexTest.cxx @@ -241,7 +241,7 @@ int itkQuadEdgeMeshEulerOperatorJoinVertexTest( int argc, char * argv[] ) typedef itk::QuadEdgeMeshTopologyChecker< MeshType > CheckerType; CheckerType::Pointer check = CheckerType::New(); - while( qe != ITK_NULLPTR ) + while( qe != nullptr ) { joinVertex->SetInput( mesh ); PointIdentifier id_org = qe->GetOrigin(); diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitEdgeTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitEdgeTest.cxx index 2d3776d0502..9142e92dc9a 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitEdgeTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitEdgeTest.cxx @@ -51,7 +51,7 @@ int itkQuadEdgeMeshEulerOperatorSplitEdgeTest( int, char * [] ) splitEdge->SetInput( mesh ); std::cout << " " << "Test No QE Input"; - if( splitEdge->Evaluate( (QEType*)ITK_NULLPTR ) ) + if( splitEdge->Evaluate( (QEType*)nullptr ) ) { std::cout << "FAILED." << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitFaceTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitFaceTest.cxx index 6128c18b0f6..43bcd4952a8 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitFaceTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitFaceTest.cxx @@ -58,7 +58,7 @@ int itkQuadEdgeMeshEulerOperatorSplitFaceTest( int, char * [] ) splitFacet->SetInput( mesh ); std::cout << " " << "Test No QE Input"; - if( splitFacet->Evaluate( (QEType*)ITK_NULLPTR, (QEType*)ITK_NULLPTR ) ) + if( splitFacet->Evaluate( (QEType*)nullptr, (QEType*)nullptr ) ) { std::cout << "FAILED." << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitVertexTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitVertexTest.cxx index 56b337e36b7..72b543becf6 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitVertexTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitVertexTest.cxx @@ -55,7 +55,7 @@ int itkQuadEdgeMeshEulerOperatorSplitVertexTest( int , char * [] ) splitVertex->SetInput( mesh ); std::cout << " " << "Test No QE Input"; - if( splitVertex->Evaluate( (QEType*)ITK_NULLPTR, (QEType*)ITK_NULLPTR ) ) + if( splitVertex->Evaluate( (QEType*)nullptr, (QEType*)nullptr ) ) { std::cout << "FAILED." << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest1.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest1.cxx index f973794b747..3753c8dc48a 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest1.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshTest1.cxx @@ -33,8 +33,8 @@ int itkQuadEdgeMeshTest1( int , char* [] ) MeshType::Pointer mesh = MeshType::New(); - mesh->GetCellBoundaryFeatureNeighbors( 0, 0, 0, ITK_NULLPTR ); - mesh->GetCellNeighbors( 0, ITK_NULLPTR ); + mesh->GetCellBoundaryFeatureNeighbors( 0, 0, 0, nullptr ); + mesh->GetCellNeighbors( 0, nullptr ); // test ComputeNumberOfPoints( ) failsafe { @@ -162,7 +162,7 @@ int itkQuadEdgeMeshTest1( int , char* [] ) // LightWeightDeleteEdge QELineCellType * qeLineCell = new QELineCellType; - mesh->LightWeightDeleteEdge( (QEType *)ITK_NULLPTR ); + mesh->LightWeightDeleteEdge( (QEType *)nullptr ); mesh->LightWeightDeleteEdge( qeLineCell->GetQEGeom( ) ); mesh->LightWeightDeleteEdge( qeLineCell ); } diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeTest1.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeTest1.cxx index a4d75886283..a02e426f838 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeTest1.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeTest1.cxx @@ -255,7 +255,7 @@ int itkQuadEdgeTest1( int , char* [] ) #ifndef NDEBUG // testing second fail case - quadEdge4->SetOnext( ITK_NULLPTR ); + quadEdge4->SetOnext( nullptr ); if( quadEdge1->GetLnext() || quadEdge1c->GetLnext() ) { std::cerr << "Error in GetLnext()" << std::endl; @@ -337,7 +337,7 @@ int itkQuadEdgeTest1( int , char* [] ) #ifndef NDEBUG - quadEdge2->SetOnext( ITK_NULLPTR ); + quadEdge2->SetOnext( nullptr ); if( quadEdge1->GetRnext() || quadEdge1c->GetRnext( ) ) { std::cerr << "Error in GetRnext()" << std::endl; @@ -422,7 +422,7 @@ int itkQuadEdgeTest1( int , char* [] ) quadEdge4->SetRot( quadEdge1 ); #ifndef NDEBUG - quadEdge3->SetOnext( ITK_NULLPTR ); + quadEdge3->SetOnext( nullptr ); if( quadEdge1->GetDnext() || quadEdge1c->GetDnext( ) ) { std::cerr << "Error 2 in GetDnext()" << std::endl; @@ -511,7 +511,7 @@ int itkQuadEdgeTest1( int , char* [] ) quadEdge4->SetRot( quadEdge1 ); #ifndef NDEBUG - quadEdge2->SetOnext( ITK_NULLPTR ); + quadEdge2->SetOnext( nullptr ); if( quadEdge1->GetOprev() || quadEdge1c->GetOprev( ) ) { std::cerr << "Error in GetOprev()" << std::endl; @@ -575,7 +575,7 @@ int itkQuadEdgeTest1( int , char* [] ) const QuadEdgeType * quadEdge1c = quadEdge1; #ifndef NDEBUG - quadEdge1->SetOnext( ITK_NULLPTR ); + quadEdge1->SetOnext( nullptr ); if( quadEdge1->GetLprev() || quadEdge1c->GetLprev( ) ) { std::cerr << "Error in GetLprev()" << std::endl; @@ -679,7 +679,7 @@ int itkQuadEdgeTest1( int , char* [] ) quadEdge4->SetRot( quadEdge1 ); #ifndef NDEBUG - quadEdge3->SetOnext( ITK_NULLPTR ); + quadEdge3->SetOnext( nullptr ); if( quadEdge1->GetRprev() || quadEdge1c->GetRprev( ) ) { std::cerr << "Error in GetRprev()" << std::endl; @@ -761,7 +761,7 @@ int itkQuadEdgeTest1( int , char* [] ) quadEdge4->SetRot( quadEdge1 ); #ifndef NDEBUG - quadEdge4->SetOnext( ITK_NULLPTR ); + quadEdge4->SetOnext( nullptr ); if( quadEdge1->GetDprev() || quadEdge1c->GetDprev( ) ) { std::cerr << "Error in GetDprev()" << std::endl; @@ -1168,7 +1168,7 @@ int itkQuadEdgeTest1( int , char* [] ) return EXIT_FAILURE; } - quadEdge1->SetRot( ITK_NULLPTR ); + quadEdge1->SetRot( nullptr ); if( quadEdge1c->IsHalfEdge() != true ) { @@ -1232,8 +1232,8 @@ int itkQuadEdgeTest1( int , char* [] ) const QuadEdgeType * quadEdge1c = quadEdge1; - quadEdge1->SetOnext( ITK_NULLPTR ); - quadEdge1c->IsEdgeInOnextRing( ITK_NULLPTR ); + quadEdge1->SetOnext( nullptr ); + quadEdge1c->IsEdgeInOnextRing( nullptr ); if( quadEdge1c->IsEdgeInOnextRing( quadEdge6 ) == true ) { diff --git a/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.h b/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.h index 698a80bfd72..aedbcb26b4c 100644 --- a/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.h +++ b/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.h @@ -92,13 +92,13 @@ class ITK_TEMPLATE_EXPORT AffineGeometryFrame:public Object virtual void Initialize(); /** Clone the geometry frame */ - virtual LightObject::Pointer InternalClone() const ITK_OVERRIDE; + LightObject::Pointer InternalClone() const override; protected: AffineGeometryFrame(); - virtual ~AffineGeometryFrame() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~AffineGeometryFrame() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** used in clone to initialize the newly created geometry */ virtual void InitializeGeometry(Self *newGeometry) const; diff --git a/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.hxx b/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.hxx index 830d234f1ad..dbe5f2fa02e 100644 --- a/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.hxx +++ b/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.hxx @@ -27,14 +27,14 @@ template< typename TScalar, unsigned int NDimensions > AffineGeometryFrame< TScalar, NDimensions > ::AffineGeometryFrame() { - m_BoundingBox = ITK_NULLPTR; + m_BoundingBox = nullptr; m_IndexToObjectTransform = TransformType::New(); m_IndexToObjectTransform->SetIdentity(); m_ObjectToNodeTransform = TransformType::New(); m_ObjectToNodeTransform->SetIdentity(); m_IndexToNodeTransform = TransformType::New(); m_IndexToNodeTransform->SetIdentity(); - m_IndexToWorldTransform = ITK_NULLPTR; + m_IndexToWorldTransform = nullptr; } /** Destructor */ diff --git a/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.h b/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.h index eff5f245987..48b54c63edf 100644 --- a/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.h @@ -110,11 +110,11 @@ class ITK_TEMPLATE_EXPORT ArrowSpatialObject: itkGetConstReferenceMacro(Length, double); /** Compute the local bounding box */ - bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; /** Returns true if the point is inside the line, false otherwise. */ bool IsInside(const PointType & point, - unsigned int depth, char *name) const ITK_OVERRIDE; + unsigned int depth, char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -124,13 +124,13 @@ class ITK_TEMPLATE_EXPORT ArrowSpatialObject: protected: ArrowSpatialObject(); - virtual ~ArrowSpatialObject() ITK_OVERRIDE; + ~ArrowSpatialObject() override; /** Update the transformation given the position and the direction */ void UpdateTransform(); /** Method to print the object.*/ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ArrowSpatialObject); diff --git a/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx index 0c677dd4a0d..38b454eec4b 100644 --- a/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx @@ -104,7 +104,7 @@ ArrowSpatialObject< TDimension > { itkDebugMacro("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/itkBlobSpatialObject.h b/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.h index 97030c8a163..ad6bf499d25 100644 --- a/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.h @@ -78,16 +78,16 @@ class ITK_TEMPLATE_EXPORT BlobSpatialObject: void SetPoints(PointListType & newPoints); /** Return a point in the list given the index */ - const SpatialObjectPointType * GetPoint(IdentifierType id) const ITK_OVERRIDE + const SpatialObjectPointType * GetPoint(IdentifierType id) const override { return &( m_Points[id] ); } /** Return a point in the list given the index */ - SpatialObjectPointType * GetPoint(IdentifierType id) ITK_OVERRIDE { return &( m_Points[id] ); } + SpatialObjectPointType * GetPoint(IdentifierType id) override { return &( m_Points[id] ); } /** Return the number of points in the list */ - SizeValueType GetNumberOfPoints(void) const ITK_OVERRIDE + SizeValueType GetNumberOfPoints(void) const override { return static_cast( m_Points.size() ); } @@ -95,18 +95,18 @@ class ITK_TEMPLATE_EXPORT BlobSpatialObject: /** Returns true if the Blob is evaluable at the requested point, * false otherwise. */ bool IsEvaluableAt(const PointType & point, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns the value of the Blob at that point. * Currently this function returns a binary value, * but it might want to return a degree of membership * in case of fuzzy Blobs. */ bool ValueAt(const PointType & point, double & value, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns true if the point is inside the Blob, false otherwise. */ bool IsInside(const PointType & point, - unsigned int depth, char *name) const ITK_OVERRIDE; + unsigned int depth, char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -114,7 +114,7 @@ class ITK_TEMPLATE_EXPORT BlobSpatialObject: bool IsInside(const PointType & point) const; /** Compute the boundaries of the Blob. */ - bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; protected: ITK_DISALLOW_COPY_AND_ASSIGN(BlobSpatialObject); @@ -122,10 +122,10 @@ class ITK_TEMPLATE_EXPORT BlobSpatialObject: PointListType m_Points; BlobSpatialObject(); - virtual ~BlobSpatialObject() ITK_OVERRIDE; + ~BlobSpatialObject() override; /** Method to print the object. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx index 52dbdb5600b..7ea450ba3cb 100644 --- a/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx @@ -193,7 +193,7 @@ BlobSpatialObject< TDimension > ::IsInside(const PointType & point, unsigned int depth, char *name) const { itkDebugMacro("Checking the point [" << point << "] is inside the blob"); - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { diff --git a/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h b/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h index 77e3578e929..3b8e62b058a 100644 --- a/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h @@ -59,20 +59,20 @@ class ITK_TEMPLATE_EXPORT BoxSpatialObject: /** Returns a degree of membership to the object. * That's useful for fuzzy objects. */ - virtual bool ValueAt(const PointType & point, double & value, + bool ValueAt(const PointType & point, double & value, unsigned int depth = 0, - char *name = ITK_NULLPTR) const ITK_OVERRIDE; + char *name = nullptr) const override; /** Return true if the object provides a method to evaluate the value * at the specified point, false otherwise. */ - virtual bool IsEvaluableAt(const PointType & point, + bool IsEvaluableAt(const PointType & point, unsigned int depth = 0, - char *name = ITK_NULLPTR) const ITK_OVERRIDE; + char *name = nullptr) const override; /** Test whether a point is inside or outside the object */ - virtual bool IsInside(const PointType & point, + bool IsInside(const PointType & point, unsigned int depth, - char *) const ITK_OVERRIDE; + char *) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -82,18 +82,18 @@ class ITK_TEMPLATE_EXPORT BoxSpatialObject: /** Get the boundaries of a specific object. This function needs to * be called every time one of the object's components is * changed. */ - virtual bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; protected: ITK_DISALLOW_COPY_AND_ASSIGN(BoxSpatialObject); BoxSpatialObject(); - ~BoxSpatialObject() ITK_OVERRIDE; + ~BoxSpatialObject() override; SizeType m_Size; /** Print the object informations in a stream. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx index 3f0369b5343..6c18767c4b4 100644 --- a/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx @@ -91,7 +91,7 @@ BoxSpatialObject< TDimension > itkDebugMacro("Checking the point [" << point << "] is inside the AxisAlignedBox"); - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { diff --git a/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h b/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h index 3fabc8fbbf8..af10124b60b 100644 --- a/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h @@ -135,18 +135,18 @@ class ITK_TEMPLATE_EXPORT ContourSpatialObject: * Note: For this class, this will always return false. -GH */ bool IsEvaluableAt(const PointType & point, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns the value of the Contour at that point. * Currently this function returns a binary value, * but it might want to return a degree of membership * in case of fuzzy Contours. */ bool ValueAt(const PointType & point, double & value, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns true if the point is inside the Contour, false otherwise. */ bool IsInside(const PointType & point, - unsigned int depth, char *name) const ITK_OVERRIDE; + unsigned int depth, char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -154,7 +154,7 @@ class ITK_TEMPLATE_EXPORT ContourSpatialObject: virtual bool IsInside(const PointType & point) const; /** Compute the boundaries of the Contour. */ - bool ComputeLocalBoundingBox(void) const ITK_OVERRIDE; + bool ComputeLocalBoundingBox(void) const override; protected: ITK_DISALLOW_COPY_AND_ASSIGN(ContourSpatialObject); @@ -167,10 +167,10 @@ class ITK_TEMPLATE_EXPORT ContourSpatialObject: int m_AttachedToSlice; ContourSpatialObject(); - virtual ~ContourSpatialObject() ITK_OVERRIDE; + ~ContourSpatialObject() override; /** Method to print the object. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.h b/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.h index 68563d8f8cc..010f751e6b1 100644 --- a/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.h +++ b/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.h @@ -49,7 +49,7 @@ class ITK_TEMPLATE_EXPORT ContourSpatialObjectPoint: ContourSpatialObjectPoint(); /** Default destructor. */ - virtual ~ContourSpatialObjectPoint() ITK_OVERRIDE; + ~ContourSpatialObjectPoint() override; /** Get the picked point. */ const PointType & GetPickedPoint() const; @@ -82,7 +82,7 @@ class ITK_TEMPLATE_EXPORT ContourSpatialObjectPoint: protected: - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Core/SpatialObjects/include/itkCylinderSpatialObject.h b/Modules/Core/SpatialObjects/include/itkCylinderSpatialObject.h index 56dfa8d7781..43835d05e66 100644 --- a/Modules/Core/SpatialObjects/include/itkCylinderSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkCylinderSpatialObject.h @@ -62,20 +62,20 @@ class CylinderSpatialObject: /** Returns a degree of membership to the object. * That's useful for fuzzy objects. */ - virtual bool ValueAt(const PointType & point, double & value, + bool ValueAt(const PointType & point, double & value, unsigned int depth = 0, - char *name = ITK_NULLPTR) const ITK_OVERRIDE; + char *name = nullptr) const override; /** Return true if the object provides a method to evaluate the value * at the specified point, false otherwise. */ - virtual bool IsEvaluableAt(const PointType & point, + bool IsEvaluableAt(const PointType & point, unsigned int depth = 0, - char *name = ITK_NULLPTR) const ITK_OVERRIDE; + char *name = nullptr) const override; /** Test whether a point is inside or outside the object */ - virtual bool IsInside(const PointType & point, + bool IsInside(const PointType & point, unsigned int depth, - char *) const ITK_OVERRIDE; + char *) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -85,19 +85,19 @@ class CylinderSpatialObject: /** Get the boundaries of a specific object. This function needs to * be called every time one of the object's components is * changed. */ - virtual bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; protected: ITK_DISALLOW_COPY_AND_ASSIGN(CylinderSpatialObject); CylinderSpatialObject(); - ~CylinderSpatialObject() ITK_OVERRIDE; + ~CylinderSpatialObject() override; double m_Radius; double m_Height; /** Print the object informations in a stream. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObject.h b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObject.h index 1d9e334bc24..a72fa3b7f78 100644 --- a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObject.h @@ -70,10 +70,10 @@ class ITK_TEMPLATE_EXPORT DTITubeSpatialObject: protected: DTITubeSpatialObject(); - virtual ~DTITubeSpatialObject() ITK_OVERRIDE; + ~DTITubeSpatialObject() override; /** Method to print the object.*/ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DTITubeSpatialObject); diff --git a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h index 7124582bee5..894ecda2bab 100644 --- a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h +++ b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h @@ -56,7 +56,7 @@ class ITK_TEMPLATE_EXPORT DTITubeSpatialObjectPoint: DTITubeSpatialObjectPoint(); /** Default destructor. */ - virtual ~DTITubeSpatialObjectPoint() ITK_OVERRIDE; + ~DTITubeSpatialObjectPoint() override; /** Set/Get the tensor matrix */ void SetTensorMatrix(const DiffusionTensor3D< double > & matrix) @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT DTITubeSpatialObjectPoint: FieldListType m_Fields; /** Print the object */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Translate the enum to char */ std::string TranslateEnumToChar(FieldEnumType name) const; diff --git a/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.h b/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.h index 527055c7c04..87158e4b26f 100644 --- a/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.h @@ -71,20 +71,20 @@ class ITK_TEMPLATE_EXPORT EllipseSpatialObject: /** Returns a degree of membership to the object. * That's useful for fuzzy objects. */ - virtual bool ValueAt(const PointType & point, double & value, + bool ValueAt(const PointType & point, double & value, unsigned int depth = 0, - char *name = ITK_NULLPTR) const ITK_OVERRIDE; + char *name = nullptr) const override; /** Return true if the object provides a method to evaluate the value * at the specified point, false otherwise. */ - virtual bool IsEvaluableAt(const PointType & point, + bool IsEvaluableAt(const PointType & point, unsigned int depth = 0, - char *name = ITK_NULLPTR) const ITK_OVERRIDE; + char *name = nullptr) const override; /** Test whether a point is inside or outside the object */ - virtual bool IsInside(const PointType & point, + bool IsInside(const PointType & point, unsigned int depth, - char *) const ITK_OVERRIDE; + char *) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -94,21 +94,21 @@ class ITK_TEMPLATE_EXPORT EllipseSpatialObject: /** Get the boundaries of a specific object. This function needs to * be called every time one of the object's components is * changed. */ - virtual bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; /** Copy the information from another SpatialObject */ - void CopyInformation(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override; protected: ITK_DISALLOW_COPY_AND_ASSIGN(EllipseSpatialObject); EllipseSpatialObject(); - ~EllipseSpatialObject() ITK_OVERRIDE; + ~EllipseSpatialObject() override; ArrayType m_Radius; /** Print the object informations in a stream. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx index def4e545119..66e218c6a7f 100644 --- a/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx @@ -96,7 +96,7 @@ EllipseSpatialObject< TDimension > { itkDebugMacro("Checking the point [" << point << "] is inside the Ellipse"); - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { diff --git a/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h b/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h index e5f4bcaffca..e0ad842fca9 100644 --- a/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h @@ -83,20 +83,20 @@ class ITK_TEMPLATE_EXPORT GaussianSpatialObject: ScalarType SquaredZScore(const PointType & point) const; /** Returns the value of the Gaussian at the given point. */ - virtual bool ValueAt(const PointType & point, ScalarType & value, + bool ValueAt(const PointType & point, ScalarType & value, unsigned int depth = 0, - char *name = ITK_NULLPTR) const ITK_OVERRIDE; + char *name = nullptr) const override; /** Return true if the object provides a method to evaluate the value * at the specified point, false otherwise. */ - virtual bool IsEvaluableAt(const PointType & point, + bool IsEvaluableAt(const PointType & point, unsigned int depth = 0, - char *name = ITK_NULLPTR) const ITK_OVERRIDE; + char *name = nullptr) const override; /** Test whether a point is inside or outside the object */ - virtual bool IsInside(const PointType & point, + bool IsInside(const PointType & point, unsigned int depth, - char *name) const ITK_OVERRIDE; + char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT GaussianSpatialObject: /** This function needs to be called every time one of the object's * components is changed. */ - virtual bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; /** Returns the sigma=m_Radius level set of the Gaussian function, as an * EllipseSpatialObject. */ @@ -115,14 +115,14 @@ class ITK_TEMPLATE_EXPORT GaussianSpatialObject: ITK_DISALLOW_COPY_AND_ASSIGN(GaussianSpatialObject); GaussianSpatialObject(); - ~GaussianSpatialObject() ITK_OVERRIDE; + ~GaussianSpatialObject() override; ScalarType m_Maximum; ScalarType m_Radius; ScalarType m_Sigma; /** Print the object information in a stream. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx index 43109cf77c8..4f4a254d5bb 100644 --- a/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx @@ -117,7 +117,7 @@ GaussianSpatialObject< TDimension > itkDebugMacro("Checking the point [" << point << "] is inside the GaussianSpatialObject"); - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { diff --git a/Modules/Core/SpatialObjects/include/itkGroupSpatialObject.h b/Modules/Core/SpatialObjects/include/itkGroupSpatialObject.h index ae73a374e23..3a2b565ca49 100644 --- a/Modules/Core/SpatialObjects/include/itkGroupSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkGroupSpatialObject.h @@ -56,16 +56,16 @@ class ITK_TEMPLATE_EXPORT GroupSpatialObject: itkTypeMacro(GroupSpatialObject, SpatialObject); /** */ - bool ComputeLocalBoundingBox() const ITK_OVERRIDE { return false; } + bool ComputeLocalBoundingBox() const override { return false; } protected: ITK_DISALLOW_COPY_AND_ASSIGN(GroupSpatialObject); GroupSpatialObject(); - virtual ~GroupSpatialObject() ITK_OVERRIDE; + ~GroupSpatialObject() override; /** Method to print the object.*/ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h index f2593c71d18..0109d716a80 100644 --- a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h @@ -68,7 +68,7 @@ class ITK_TEMPLATE_EXPORT ImageMaskSpatialObject: /** Returns true if the point is inside, false otherwise. */ bool IsInside(const PointType & point, - unsigned int depth, char *name) const ITK_OVERRIDE; + unsigned int depth, char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -87,15 +87,15 @@ class ITK_TEMPLATE_EXPORT ImageMaskSpatialObject: /** Get the boundaries of a specific object. This function needs to * be called every time one of the object's components is * changed. */ - virtual bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; protected: ITK_DISALLOW_COPY_AND_ASSIGN(ImageMaskSpatialObject); ImageMaskSpatialObject(); - virtual ~ImageMaskSpatialObject() ITK_OVERRIDE; + ~ImageMaskSpatialObject() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end of namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx index 85062ca04ff..263ef696bcc 100644 --- a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx @@ -86,7 +86,7 @@ bool ImageMaskSpatialObject< TDimension > ::IsInside(const PointType & point, unsigned int depth, char *name) const { - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { diff --git a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h index 72ce4ff27cd..faa3d15e26e 100644 --- a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h @@ -79,17 +79,17 @@ class ITK_TEMPLATE_EXPORT ImageSpatialObject: /** Return true if the object is evaluable at the requested point, * and else otherwise. */ bool IsEvaluableAt(const PointType & point, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns the value of the image at the requested point. * If the point is not inside the object, then an exception is thrown. * \sa ExceptionObject */ bool ValueAt(const PointType & point, double & value, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns true if the point is inside, false otherwise. */ bool IsInside(const PointType & point, - unsigned int depth, char *name) const ITK_OVERRIDE; + unsigned int depth, char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -97,10 +97,10 @@ class ITK_TEMPLATE_EXPORT ImageSpatialObject: bool IsInside(const PointType & point) const; /** Compute the boundaries of the iamge spatial object. */ - bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; /** Returns the latest modified time of the object and its component. */ - ModifiedTimeType GetMTime(void) const ITK_OVERRIDE; + ModifiedTimeType GetMTime(void) const override; /** Set the slice position */ void SetSlicePosition(unsigned int dimension, int position); @@ -124,9 +124,9 @@ class ITK_TEMPLATE_EXPORT ImageSpatialObject: ImagePointer m_Image; ImageSpatialObject(); - virtual ~ImageSpatialObject() ITK_OVERRIDE; + ~ImageSpatialObject() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; int * m_SlicePosition; std::string m_PixelType; diff --git a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx index 23e6176d0d6..f65f7a8946c 100644 --- a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx @@ -38,7 +38,7 @@ ImageSpatialObject< TDimension, PixelType > } this->ComputeBoundingBox(); - this->InternalSetPixelType(static_cast(ITK_NULLPTR)); + this->InternalSetPixelType(static_cast(nullptr)); m_Interpolator = NNInterpolatorType::New(); } @@ -123,7 +123,7 @@ bool ImageSpatialObject< TDimension, PixelType > ::IsInside(const PointType & point, unsigned int depth, char *name) const { - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { diff --git a/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.h b/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.h index c6d15f98c65..687e938863c 100644 --- a/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.h @@ -70,16 +70,16 @@ class ITK_TEMPLATE_EXPORT LandmarkSpatialObject: void SetPoints(PointListType & newPoints); /** Return a point in the list given the index */ - const SpatialObjectPointType * GetPoint(IdentifierType id) const ITK_OVERRIDE + const SpatialObjectPointType * GetPoint(IdentifierType id) const override { return &( m_Points[id] ); } /** Return a point in the list given the index */ - SpatialObjectPointType * GetPoint(IdentifierType id) ITK_OVERRIDE { return &( m_Points[id] ); } + SpatialObjectPointType * GetPoint(IdentifierType id) override { return &( m_Points[id] ); } /** Return the number of points in the list */ - SizeValueType GetNumberOfPoints(void) const ITK_OVERRIDE + SizeValueType GetNumberOfPoints(void) const override { return static_cast( m_Points.size() ); } @@ -87,18 +87,18 @@ class ITK_TEMPLATE_EXPORT LandmarkSpatialObject: /** Returns true if the Landmark is evaluable at the requested point, * false otherwise. */ bool IsEvaluableAt(const PointType & point, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns the value of the Landmark at that point. * Currently this function returns a binary value, * but it might want to return a degree of membership * in case of fuzzy Landmarks. */ bool ValueAt(const PointType & point, double & value, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns true if the point is inside the Landmark, false otherwise. */ bool IsInside(const PointType & point, - unsigned int depth, char *name) const ITK_OVERRIDE; + unsigned int depth, char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -106,7 +106,7 @@ class ITK_TEMPLATE_EXPORT LandmarkSpatialObject: virtual bool IsInside(const PointType & point) const; /** Compute the boundaries of the Landmark. */ - bool ComputeLocalBoundingBox(void) const ITK_OVERRIDE; + bool ComputeLocalBoundingBox(void) const override; protected: ITK_DISALLOW_COPY_AND_ASSIGN(LandmarkSpatialObject); @@ -114,10 +114,10 @@ class ITK_TEMPLATE_EXPORT LandmarkSpatialObject: PointListType m_Points; LandmarkSpatialObject(); - virtual ~LandmarkSpatialObject() ITK_OVERRIDE; + ~LandmarkSpatialObject() override; /** Method to print the object. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx index 2d8d7ae6e09..43ed5bd143c 100644 --- a/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx @@ -180,7 +180,7 @@ LandmarkSpatialObject< TDimension > { itkDebugMacro("Checking the point [" << point << "] is inside the blob"); - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { diff --git a/Modules/Core/SpatialObjects/include/itkLineSpatialObject.h b/Modules/Core/SpatialObjects/include/itkLineSpatialObject.h index 79dee499156..1824bec8875 100644 --- a/Modules/Core/SpatialObjects/include/itkLineSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkLineSpatialObject.h @@ -74,16 +74,16 @@ class ITK_TEMPLATE_EXPORT LineSpatialObject: void SetPoints(PointListType & newPoints); /** Return a point in the list given the index */ - const SpatialObjectPointType * GetPoint(IdentifierType id) const ITK_OVERRIDE + const SpatialObjectPointType * GetPoint(IdentifierType id) const override { return &( m_Points[id] ); } /** Return a point in the list given the index */ - SpatialObjectPointType * GetPoint(IdentifierType id) ITK_OVERRIDE { return &( m_Points[id] ); } + SpatialObjectPointType * GetPoint(IdentifierType id) override { return &( m_Points[id] ); } /** Return the number of points in the list */ - SizeValueType GetNumberOfPoints(void) const ITK_OVERRIDE + SizeValueType GetNumberOfPoints(void) const override { return static_cast( m_Points.size() ); } @@ -91,18 +91,18 @@ class ITK_TEMPLATE_EXPORT LineSpatialObject: /** 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 ITK_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 ITK_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, - unsigned int depth, char *name) const ITK_OVERRIDE; + unsigned int depth, char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT LineSpatialObject: virtual bool IsInside(const PointType & point) const; /** Compute the boundaries of the line. */ - bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; protected: ITK_DISALLOW_COPY_AND_ASSIGN(LineSpatialObject); @@ -118,10 +118,10 @@ class ITK_TEMPLATE_EXPORT LineSpatialObject: PointListType m_Points; LineSpatialObject(); - virtual ~LineSpatialObject() ITK_OVERRIDE; + ~LineSpatialObject() override; /** Method to print the object. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx index c7e2d8020c6..4c3a659e0ea 100644 --- a/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx @@ -160,7 +160,7 @@ LineSpatialObject< TDimension > { itkDebugMacro("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/itkLineSpatialObjectPoint.h b/Modules/Core/SpatialObjects/include/itkLineSpatialObjectPoint.h index de470c65f0d..df1d2757fc5 100644 --- a/Modules/Core/SpatialObjects/include/itkLineSpatialObjectPoint.h +++ b/Modules/Core/SpatialObjects/include/itkLineSpatialObjectPoint.h @@ -54,7 +54,7 @@ class ITK_TEMPLATE_EXPORT LineSpatialObjectPoint: LineSpatialObjectPoint(); /** Destructor */ - virtual ~LineSpatialObjectPoint() ITK_OVERRIDE; + ~LineSpatialObjectPoint() override; /** Get Normal */ const VectorType & GetNormal(unsigned int index) const; @@ -70,7 +70,7 @@ class ITK_TEMPLATE_EXPORT LineSpatialObjectPoint: NormalArrayType m_NormalArray; /** Method to print the object. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end of namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.h b/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.h index 22b45e707bd..cd3978340a0 100644 --- a/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.h @@ -73,17 +73,17 @@ class ITK_TEMPLATE_EXPORT MeshSpatialObject: /** Return true if the object is evaluable at the requested point, * and else otherwise. */ bool IsEvaluableAt(const PointType & point, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns the value of the Mesh at the requested point. * If the point is not inside the object, then an exception is thrown. * \sa ExceptionObject */ bool ValueAt(const PointType & point, double & value, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns true if the point is inside, false otherwise. */ bool IsInside(const PointType & point, - unsigned int depth, char *name) const ITK_OVERRIDE; + unsigned int depth, char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -91,10 +91,10 @@ class ITK_TEMPLATE_EXPORT MeshSpatialObject: virtual bool IsInside(const PointType & point) const; /** Compute the boundaries of the iamge spatial object. */ - bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; /** Returns the latest modified time of the object and its component. */ - ModifiedTimeType GetMTime(void) const ITK_OVERRIDE; + ModifiedTimeType GetMTime(void) const override; /** Return the type of pixel used */ const char * GetPixelType() @@ -118,9 +118,9 @@ class ITK_TEMPLATE_EXPORT MeshSpatialObject: double m_IsInsidePrecision; MeshSpatialObject(); - virtual ~MeshSpatialObject() ITK_OVERRIDE; + ~MeshSpatialObject() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end of namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx index d844ef37120..85b58c652cf 100644 --- a/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx @@ -85,7 +85,7 @@ MeshSpatialObject< TMesh > { double minDist = 0.0; const bool pointIsInside = it.Value()->EvaluatePosition( - position, m_Mesh->GetPoints(), ITK_NULLPTR, ITK_NULLPTR, &minDist, ITK_NULLPTR); + position, m_Mesh->GetPoints(), nullptr, nullptr, &minDist, nullptr); if ( pointIsInside && minDist <= this->m_IsInsidePrecision ) { @@ -95,7 +95,7 @@ MeshSpatialObject< TMesh > else { if ( it.Value()->EvaluatePosition(position, m_Mesh->GetPoints(), - ITK_NULLPTR, ITK_NULLPTR, ITK_NULLPTR, ITK_NULLPTR) ) + nullptr, nullptr, nullptr, nullptr) ) { return true; } @@ -112,7 +112,7 @@ bool MeshSpatialObject< TMesh > ::IsInside(const PointType & point, unsigned int depth, char *name) const { - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { diff --git a/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.h b/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.h index a11fa07e41b..ac504443d64 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.h @@ -58,17 +58,17 @@ class ITK_TEMPLATE_EXPORT MetaArrowConverter : typedef MetaArrow ArrowMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaArrowConverter(); - ~MetaArrowConverter() ITK_OVERRIDE {} + ~MetaArrowConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaArrowConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx index b038c4fa64f..40149ad70db 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx @@ -44,7 +44,7 @@ MetaArrowConverter< NDimensions > ::MetaObjectToSpatialObject( const MetaObjectType *mo ) { const ArrowMetaObjectType *metaArrow = dynamic_cast(mo); - if(metaArrow == ITK_NULLPTR) + if(metaArrow == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaArrow"); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.h b/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.h index e530fa07088..edbba58dcc3 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.h @@ -59,17 +59,17 @@ class ITK_TEMPLATE_EXPORT MetaBlobConverter : /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaBlobConverter(); - ~MetaBlobConverter() ITK_OVERRIDE {} + ~MetaBlobConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaBlobConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx index 8efea7454da..d77b9e73d2f 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx @@ -43,7 +43,7 @@ MetaBlobConverter< NDimensions > ::MetaObjectToSpatialObject(const MetaObjectType *mo) { const BlobMetaObjectType *Blob = dynamic_cast(mo); - if(Blob == ITK_NULLPTR) + if(Blob == nullptr) { itkExceptionMacro(<< "Can't downcast MetaObject to BlobMetaObject"); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaContourConverter.h b/Modules/Core/SpatialObjects/include/itkMetaContourConverter.h index 88b2e5fd26d..21014c55846 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaContourConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaContourConverter.h @@ -59,17 +59,17 @@ class ITK_TEMPLATE_EXPORT MetaContourConverter : typedef MetaContour ContourMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaContourConverter(); - ~MetaContourConverter() ITK_OVERRIDE {} + ~MetaContourConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaContourConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx index 901cdf32a9e..df30368dc44 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx @@ -44,7 +44,7 @@ MetaContourConverter< NDimensions > ::MetaObjectToSpatialObject(const MetaObjectType *mo) { const ContourMetaObjectType *contourMO = dynamic_cast(mo); - if(contourMO == ITK_NULLPTR) + if(contourMO == nullptr) { itkExceptionMacro(<< "Can't downcast MetaObject to MetaContour"); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.h b/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.h index 0eb309d7ab8..8792cc16f82 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.h @@ -58,17 +58,17 @@ class ITK_TEMPLATE_EXPORT MetaDTITubeConverter : typedef MetaDTITube DTITubeMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaDTITubeConverter(); - ~MetaDTITubeConverter() ITK_OVERRIDE {} + ~MetaDTITubeConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaDTITubeConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx index 9c87c620076..01ecd05839c 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx @@ -44,7 +44,7 @@ MetaDTITubeConverter< NDimensions > ::MetaObjectToSpatialObject(const MetaObjectType *mo) { const MetaDTITube *tube = dynamic_cast(mo); - if(tube == ITK_NULLPTR) + if(tube == nullptr) { itkExceptionMacro(<< "Can't downcast MetaObject to MetaDTITube"); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.h b/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.h index 95267fb7c76..9b944c342b3 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.h @@ -58,17 +58,17 @@ class ITK_TEMPLATE_EXPORT MetaEllipseConverter : typedef MetaEllipse EllipseMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaEllipseConverter(); - ~MetaEllipseConverter() ITK_OVERRIDE {} + ~MetaEllipseConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaEllipseConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx index 2ea68be17df..2c681686ed3 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx @@ -43,7 +43,7 @@ MetaEllipseConverter< NDimensions > ::MetaObjectToSpatialObject(const MetaObjectType *mo) { const EllipseMetaObjectType *ellipseMO = dynamic_cast(mo); - if(ellipseMO == ITK_NULLPTR) + if(ellipseMO == nullptr) { itkExceptionMacro(<< "Can't downcast MetaObject to EllipseMetaObject"); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaEvent.h b/Modules/Core/SpatialObjects/include/itkMetaEvent.h index 2be8e68e8cd..f81ee8277ed 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaEvent.h +++ b/Modules/Core/SpatialObjects/include/itkMetaEvent.h @@ -39,7 +39,7 @@ class MetaEvent : public ::MetaEvent { public: MetaEvent(); - virtual ~MetaEvent(); + ~MetaEvent() override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.h b/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.h index 0e8ea2eaf3a..06dee1c8325 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.h @@ -58,17 +58,17 @@ class ITK_TEMPLATE_EXPORT MetaGaussianConverter : typedef MetaGaussian GaussianMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaGaussianConverter(); - ~MetaGaussianConverter() ITK_OVERRIDE {} + ~MetaGaussianConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaGaussianConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx index cac45dbcdd7..7f1e27320c6 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx @@ -44,7 +44,7 @@ MetaGaussianConverter< NDimensions > { const GaussianMetaObjectType *metaGaussian = dynamic_cast(mo); - if(metaGaussian == ITK_NULLPTR) + if(metaGaussian == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaGaussian" ); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.h b/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.h index 8c5ead7e833..801b33c98a0 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.h @@ -58,17 +58,17 @@ class ITK_TEMPLATE_EXPORT MetaGroupConverter : typedef MetaGroup GroupMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaGroupConverter(); - ~MetaGroupConverter() ITK_OVERRIDE {} + ~MetaGroupConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaGroupConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx index 1a55af2b982..2539d9eb365 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx @@ -43,7 +43,7 @@ MetaGroupConverter< NDimensions > ::MetaObjectToSpatialObject(const MetaObjectType *mo) { const GroupMetaObjectType *group = dynamic_cast(mo); - if(group == ITK_NULLPTR) + if(group == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaGroup" ); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.h b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.h index 46b87e2d551..af6e7497dc1 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.h @@ -63,20 +63,20 @@ class ITK_TEMPLATE_EXPORT MetaImageConverter : typedef MetaImage ImageMetaObjectType; typedef Image ImageType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; virtual const char *GetMetaObjectSubType(); typename ImageType::Pointer AllocateImage(const ImageMetaObjectType *image); MetaImageConverter(); - ~MetaImageConverter() ITK_OVERRIDE {} + ~MetaImageConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaImageConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx index dae5562c1c2..54ddd139d09 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx @@ -96,7 +96,7 @@ MetaImageConverter< NDimensions, PixelType, TSpatialObjectType > const ImageMetaObjectType *imageMO = dynamic_cast(mo); - if(imageMO == ITK_NULLPTR) + if(imageMO == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaImage" ); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaImageMaskConverter.h b/Modules/Core/SpatialObjects/include/itkMetaImageMaskConverter.h index 97d8552121b..5bc6f65a957 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaImageMaskConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaImageMaskConverter.h @@ -51,12 +51,12 @@ class MetaImageMaskConverter : itkTypeMacro(MetaImageMaskConverter, MetaImageConverter); protected: - virtual const char *GetMetaObjectSubType() ITK_OVERRIDE + const char *GetMetaObjectSubType() override { return "Mask"; } MetaImageMaskConverter() {} - ~MetaImageMaskConverter() ITK_OVERRIDE {} + ~MetaImageMaskConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaImageMaskConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.h b/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.h index 8eda35640f4..a5e6bc3979b 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.h @@ -58,17 +58,17 @@ class ITK_TEMPLATE_EXPORT MetaLandmarkConverter : typedef MetaLandmark LandmarkMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaLandmarkConverter(); - ~MetaLandmarkConverter() ITK_OVERRIDE {} + ~MetaLandmarkConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaLandmarkConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx index e09e763442f..403e09f6f7c 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx @@ -44,7 +44,7 @@ MetaLandmarkConverter< NDimensions > { const LandmarkMetaObjectType *landmarkMO = dynamic_cast(mo); - if(landmarkMO == ITK_NULLPTR) + if(landmarkMO == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaLandmark"); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaLineConverter.h b/Modules/Core/SpatialObjects/include/itkMetaLineConverter.h index 474a879dc4e..579f49da9ee 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaLineConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaLineConverter.h @@ -58,17 +58,17 @@ class ITK_TEMPLATE_EXPORT MetaLineConverter : typedef MetaLine LineMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaLineConverter(); - ~MetaLineConverter() ITK_OVERRIDE {} + ~MetaLineConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaLineConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx index 6de4854fadd..16f518e0e88 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx @@ -44,7 +44,7 @@ MetaLineConverter< NDimensions > { const LineMetaObjectType *lineMO = dynamic_cast(mo); - if(lineMO == ITK_NULLPTR) + if(lineMO == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaLine" ); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.h b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.h index 91fc3bae2e6..6e51a76ba79 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.h @@ -63,17 +63,17 @@ class ITK_TEMPLATE_EXPORT MetaMeshConverter : typedef MetaMesh MeshMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaMeshConverter(); - ~MetaMeshConverter() ITK_OVERRIDE {} + ~MetaMeshConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaMeshConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx index 87783056344..3a3c26b35e1 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx @@ -49,7 +49,7 @@ MetaMeshConverter< NDimensions, PixelType, TMeshTraits > { const MeshMetaObjectType *_mesh = dynamic_cast(mo); - if(_mesh == ITK_NULLPTR) + if(_mesh == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaMesh"); } @@ -242,9 +242,9 @@ MetaMeshConverter< NDimensions, PixelType, TMeshTraits > if ( !mesh ) { - std::cout << "MetaMeshConverter : GetMesh() returned a ITK_NULLPTR Pointer" + std::cout << "MetaMeshConverter : GetMesh() returned a nullptr Pointer" << std::endl; - return ITK_NULLPTR; + return nullptr; } // fill in the Mesh information diff --git a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h index 1f43968a5b7..ede46b3fd77 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h @@ -67,7 +67,7 @@ class ITK_TEMPLATE_EXPORT MetaSceneConverter /** write out a Scene SpatialObject */ bool WriteMeta(SceneType *scene, const char *fileName, unsigned int depth = MaximumDepth, - char *spatialObjectTypeName = ITK_NULLPTR); + char *spatialObjectTypeName = nullptr); const MetaEvent * GetEvent() const { return m_Event; } void SetEvent(MetaEvent *event) { m_Event = event; } @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT MetaSceneConverter MetaScene * CreateMetaScene(SceneType *scene, unsigned int depth = MaximumDepth, - char *name = ITK_NULLPTR); + char *name = nullptr); ScenePointer CreateSpatialObjectScene(MetaScene *scene); diff --git a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx index 1b1919b88cb..de5eb211130 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx @@ -47,7 +47,7 @@ MetaSceneConverter< NDimensions, PixelType, TMeshTraits > { // default behaviour of scene converter is not to save transform // with each spatial object. - m_Event = ITK_NULLPTR; + m_Event = nullptr; m_BinaryPoints = false; m_TransformPrecision = 6; m_WriteImagesInSeparateFile = false; diff --git a/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.h b/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.h index 78cca0e09e8..0b389412899 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.h @@ -58,17 +58,17 @@ class ITK_TEMPLATE_EXPORT MetaSurfaceConverter : typedef MetaSurface SurfaceMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaSurfaceConverter(); - ~MetaSurfaceConverter() ITK_OVERRIDE {} + ~MetaSurfaceConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaSurfaceConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx index 849ef9447f2..987a9784963 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx @@ -43,7 +43,7 @@ MetaSurfaceConverter< NDimensions > ::MetaObjectToSpatialObject(const MetaObjectType *mo) { const SurfaceMetaObjectType *surfaceMO = dynamic_cast(mo); - if(surfaceMO == ITK_NULLPTR) + if(surfaceMO == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaSurface"); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.h b/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.h index aea9249e17e..ac3e518311b 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.h @@ -58,17 +58,17 @@ class ITK_TEMPLATE_EXPORT MetaTubeConverter : typedef MetaTube TubeMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaTubeConverter(); - ~MetaTubeConverter() ITK_OVERRIDE {} + ~MetaTubeConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaTubeConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx index 062b31f334c..e0039e08f16 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx @@ -44,7 +44,7 @@ MetaTubeConverter< NDimensions > { const TubeMetaObjectType *tubeMO = dynamic_cast(mo); - if(tubeMO == ITK_NULLPTR) + if(tubeMO == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaTube" ); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.h b/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.h index 3851cb9664b..fc93b6443c5 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.h +++ b/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.h @@ -58,17 +58,17 @@ class ITK_TEMPLATE_EXPORT MetaVesselTubeConverter : typedef MetaVesselTube VesselTubeMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaVesselTubeConverter(); - ~MetaVesselTubeConverter() ITK_OVERRIDE {} + ~MetaVesselTubeConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaVesselTubeConverter); diff --git a/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx index 9e18efc69ae..2cfd6a3c166 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx @@ -44,7 +44,7 @@ MetaVesselTubeConverter< NDimensions > { const VesselTubeMetaObjectType *vesselTubeMO = dynamic_cast(mo); - if(vesselTubeMO == ITK_NULLPTR) + if(vesselTubeMO == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaVesselTube" ); } diff --git a/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.h b/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.h index 6d36367deb4..8963a3497d5 100644 --- a/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.h @@ -60,17 +60,17 @@ class ITK_TEMPLATE_EXPORT PlaneSpatialObject: /** Returns a degree of membership to the object. * That's useful for fuzzy objects. */ - virtual bool ValueAt(const PointType & point, double & value, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + bool ValueAt(const PointType & point, double & value, + unsigned int depth = 0, char *name = nullptr) const override; /** return ture if the object provides a method to evaluate the value * at the specified point, else otherwise. */ - virtual bool IsEvaluableAt(const PointType & point, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + bool IsEvaluableAt(const PointType & point, + unsigned int depth = 0, char *name = nullptr) const override; /** Test whether a point is inside or outside the object */ - virtual bool IsInside(const PointType & point, - unsigned int depth, char *name) const ITK_OVERRIDE; + bool IsInside(const PointType & point, + unsigned int depth, char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -80,7 +80,7 @@ class ITK_TEMPLATE_EXPORT PlaneSpatialObject: /** provide a method to get the boundaries of * a specific object. Basically, this function need to be called * every time one of the object component is changed. */ - virtual bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; itkSetMacro(LowerPoint, PointType); itkSetMacro(UpperPoint, PointType); @@ -91,13 +91,13 @@ class ITK_TEMPLATE_EXPORT PlaneSpatialObject: ITK_DISALLOW_COPY_AND_ASSIGN(PlaneSpatialObject); PlaneSpatialObject(); - ~PlaneSpatialObject() ITK_OVERRIDE; + ~PlaneSpatialObject() override; PointType m_LowerPoint; PointType m_UpperPoint; /** Print the object informations in a stream. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.hxx index cdcee12835f..e7c3069cc2b 100644 --- a/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.hxx @@ -81,7 +81,7 @@ PlaneSpatialObject< TDimension > { itkDebugMacro("Checking the point [" << point << "is inside the plane"); - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { diff --git a/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.h b/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.h index c19da6119af..00f9907e9a7 100644 --- a/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.h @@ -62,7 +62,7 @@ class ITK_TEMPLATE_EXPORT PointBasedSpatialObject: { itkWarningMacro(<< "PointBasedSpatialObject::GetPoint() is not implemented" << " in the base class" << std::endl); - return ITK_NULLPTR; + return nullptr; } virtual SpatialObjectPointType * @@ -70,7 +70,7 @@ class ITK_TEMPLATE_EXPORT PointBasedSpatialObject: { itkWarningMacro(<< "PointBasedSpatialObject::GetPoint() is not implemented" << " in the base class" << std::endl); - return ITK_NULLPTR; + return nullptr; } /** Return the number of points in the list */ @@ -82,7 +82,7 @@ class ITK_TEMPLATE_EXPORT PointBasedSpatialObject: } /** */ - bool ComputeLocalBoundingBox() const ITK_OVERRIDE + bool ComputeLocalBoundingBox() const override { itkWarningMacro(<< "PointBasedSpatialObject::ComputeLocalBoundingBox() is" << " not implemented in the base class" << std::endl); @@ -93,10 +93,10 @@ class ITK_TEMPLATE_EXPORT PointBasedSpatialObject: ITK_DISALLOW_COPY_AND_ASSIGN(PointBasedSpatialObject); PointBasedSpatialObject(); - virtual ~PointBasedSpatialObject() ITK_OVERRIDE; + ~PointBasedSpatialObject() override; /** Method to print the object.*/ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.h b/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.h index fbd0c0ce0b2..fa8cde6aae0 100644 --- a/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.h @@ -95,15 +95,15 @@ class ITK_TEMPLATE_EXPORT PolygonGroupSpatialObject: double MeasureVolume(); /** Test whether a point is inside or outside the object. */ - virtual bool IsInside(const PointType & point, + bool IsInside(const PointType & point, unsigned int depth = 0, - char *name = ITK_NULLPTR) const ITK_OVERRIDE; + char *name = nullptr) const override; protected: ITK_DISALLOW_COPY_AND_ASSIGN(PolygonGroupSpatialObject); PolygonGroupSpatialObject(void) {} - ~PolygonGroupSpatialObject(void) ITK_OVERRIDE {} + ~PolygonGroupSpatialObject(void) override {} }; } #ifndef ITK_MANUAL_INSTANTIATION diff --git a/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.hxx index 7a5a928bed0..eb07b8de2dd 100644 --- a/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.hxx @@ -70,7 +70,7 @@ bool PolygonGroupSpatialObject< TDimension >::IsClosed() { PolygonSpatialObject< TDimension > *curstrand = dynamic_cast< PolygonSpatialObject< TDimension > * >( ( *it ).GetPointer() ); - if ( curstrand != ITK_NULLPTR ) + if ( curstrand != nullptr ) { if ( !curstrand->IsClosed() ) { diff --git a/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.h b/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.h index ad69b63ef33..4533c337f16 100644 --- a/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.h @@ -100,9 +100,9 @@ class ITK_TEMPLATE_EXPORT PolygonSpatialObject: bool RemoveSegment(const PointType & startpoint, const PointType & endPoint); /** Test whether a point is inside or outside the object. */ - virtual bool IsInside(const PointType & point, + bool IsInside(const PointType & point, unsigned int depth, - char *name) const ITK_OVERRIDE; + char *name) const override; /** Test whether a point is inside or outside the object For * computational speed purposes, it is faster if the method does not @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT PolygonSpatialObject: virtual bool IsInside(const PointType & point) const; protected: - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PolygonSpatialObject); diff --git a/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx index 091d43587bf..89173028697 100644 --- a/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx @@ -412,7 +412,7 @@ bool PolygonSpatialObject< TDimension > ::IsInside(const PointType & point) const { - return this->IsInside(point, 0, ITK_NULLPTR); + return this->IsInside(point, 0, nullptr); } template< unsigned int TDimension > diff --git a/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.h b/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.h index 299ede9a137..154cda334cc 100644 --- a/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.h @@ -71,12 +71,12 @@ class ITK_TEMPLATE_EXPORT SceneSpatialObject: * \warning This function creates a new list therefore * the user is responsible for the deletion of the list. */ ObjectListType * GetObjects(unsigned int depth = MaximumDepth, - char *name = ITK_NULLPTR); + char *name = nullptr); /** Returns the number of children currently assigned to * the SceneSpatialObject object. */ unsigned int GetNumberOfObjects(unsigned int depth = MaximumDepth, - char *name = ITK_NULLPTR); + char *name = nullptr); /** Set the list of pointers to children to the list passed as * argument. */ @@ -84,7 +84,7 @@ class ITK_TEMPLATE_EXPORT SceneSpatialObject: /** Returns the latest modified time of all the objects contained * in this SceneSpatialObject object. */ - virtual ModifiedTimeType GetMTime(void) const ITK_OVERRIDE; + ModifiedTimeType GetMTime(void) const override; /** Get/Set the ParentID */ void SetParentId(int parentid) { m_ParentId = parentid; } @@ -118,10 +118,10 @@ class ITK_TEMPLATE_EXPORT SceneSpatialObject: SceneSpatialObject(); /** destructor */ - virtual ~SceneSpatialObject() ITK_OVERRIDE; + ~SceneSpatialObject() override; /** Print the object informations in a stream. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Parent ID : default = -1 */ int m_ParentId; diff --git a/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.hxx index f03e46d6da6..427b8a0f01b 100644 --- a/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.hxx @@ -106,7 +106,7 @@ SceneSpatialObject< TSpaceDimension > while ( it != itEnd ) { - if ( name == ITK_NULLPTR || strstr(typeid( **it ).name(), name) ) + if ( name == nullptr || strstr(typeid( **it ).name(), name) ) { newList->push_back(*it); } @@ -155,7 +155,7 @@ SceneSpatialObject< TSpaceDimension > unsigned int cnt = 0; while ( it != itEnd ) { - if ( name == ITK_NULLPTR || strstr(typeid( **it ).name(), name) ) + if ( name == nullptr || strstr(typeid( **it ).name(), name) ) { cnt++; } @@ -247,7 +247,7 @@ SceneSpatialObject< TSpaceDimension > it++; } - return ITK_NULLPTR; + return nullptr; } template< unsigned int TSpaceDimension > @@ -268,7 +268,7 @@ SceneSpatialObject< TSpaceDimension > SpatialObject< TSpaceDimension > *parentObject = static_cast< SpatialObject< TSpaceDimension > * > ( this->GetObjectById(parentId) ); - if ( parentObject == ITK_NULLPTR ) + if ( parentObject == nullptr ) { ret = false; ++it; diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObject.h b/Modules/Core/SpatialObjects/include/itkSpatialObject.h index 13c0fa8d553..e8d5b247e31 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObject.h @@ -168,7 +168,7 @@ class ITK_TEMPLATE_EXPORT SpatialObject: /** Returns the value at a point */ virtual bool ValueAt(const PointType & point, double & value, unsigned int depth = 0, - char *name = ITK_NULLPTR) const; + char *name = nullptr) const; /** Returns true if the object can provide a "meaningful" value at * a point. Often defaults to returning same answer as IsInside, but @@ -178,12 +178,12 @@ class ITK_TEMPLATE_EXPORT SpatialObject: */ virtual bool IsEvaluableAt(const PointType & point, unsigned int depth = 0, - char *name = ITK_NULLPTR) const; + char *name = nullptr) const; /** Returns true if a point is inside the object. */ virtual bool IsInside(const PointType & point, unsigned int depth = 0, - char *name = ITK_NULLPTR) const; + char *name = nullptr) const; /** Returns true if a point is inside the object - provided * to make spatial objects compatible with spatial functions @@ -199,11 +199,11 @@ class ITK_TEMPLATE_EXPORT SpatialObject: short unsigned int order, OutputVectorType & value, unsigned int depth = 0, - char *name = ITK_NULLPTR); + char *name = nullptr); /** Returns the latest modified time of the spatial object, and * any of its components. */ - virtual ModifiedTimeType GetMTime(void) const ITK_OVERRIDE; + ModifiedTimeType GetMTime(void) const override; /** Returns the latest modified time of the spatial object, but not * the modification time of the children */ @@ -250,7 +250,7 @@ class ITK_TEMPLATE_EXPORT SpatialObject: * region of the data object passed in as a parameter. This method * implements the API from DataObject. The data object parameter must be * castable to an ImageBase. */ - virtual void SetRequestedRegion(const DataObject *data) ITK_OVERRIDE; + void SetRequestedRegion(const DataObject *data) override; /** Get the region object that defines the size and starting index * for the region of the image requested (i.e., the region of the @@ -316,7 +316,7 @@ class ITK_TEMPLATE_EXPORT SpatialObject: * ImageBase has more meta-data than its DataObject. Thus, it must * provide its own version of CopyInformation() in order to copy the * LargestPossibleRegion from the input parameter. */ - virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override; /** Update the information for this DataObject so that it can be used * as an output of a ProcessObject. This method is used the pipeline @@ -325,12 +325,12 @@ class ITK_TEMPLATE_EXPORT SpatialObject: * ProcessObject::UpdateOutputInformation() which determines modified * times, LargestPossibleRegions, and any extra meta data like spacing, * origin, etc. */ - virtual void UpdateOutputInformation() ITK_OVERRIDE; + void UpdateOutputInformation() override; /** Set the RequestedRegion to the LargestPossibleRegion. This * forces a filter to produce all of the output in one execution * (i.e. not streaming) on the next call to Update(). */ - virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE; + void SetRequestedRegionToLargestPossibleRegion() override; /** Determine whether the RequestedRegion is outside of the * BufferedRegion. This method returns true if the RequestedRegion @@ -341,7 +341,7 @@ class ITK_TEMPLATE_EXPORT SpatialObject: * inside the BufferedRegion from the previous execution (and the * current filter is up to date), then a given filter does not need * to re-execute */ - virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE; + bool RequestedRegionIsOutsideOfTheBufferedRegion() override; /** Verify that the RequestedRegion is within the * LargestPossibleRegion. If the RequestedRegion is not within the @@ -351,7 +351,7 @@ class ITK_TEMPLATE_EXPORT SpatialObject: * used by PropagateRequestedRegion(). PropagateRequestedRegion() * throws a InvalidRequestedRegionError exception is the requested * region is not within the LargestPossibleRegion. */ - virtual bool VerifyRequestedRegion() ITK_OVERRIDE; + bool VerifyRequestedRegion() override; /** Returns a pointer to the property object applied to this class. */ PropertyType * GetProperty(); @@ -370,7 +370,7 @@ class ITK_TEMPLATE_EXPORT SpatialObject: itkGetConstReferenceMacro(ParentId, int); /** Specify that the object has been updated */ - virtual void Update(void) ITK_OVERRIDE; + void Update(void) override; /** Set the tree container */ itkSetObjectMacro(TreeNode, TreeNodeType) @@ -450,11 +450,11 @@ class ITK_TEMPLATE_EXPORT SpatialObject: * \warning User is responsible for freeing the list, but not the elements of * the list. */ virtual ChildrenListType * GetChildren(unsigned int depth = 0, - char *name = ITK_NULLPTR) const; + char *name = nullptr) const; /** Returns the number of children currently assigned to the object. */ unsigned int GetNumberOfChildren(unsigned int depth = 0, - char *name = ITK_NULLPTR) const; + char *name = nullptr) const; /** Set the list of pointers to children to the list passed as argument. */ void SetChildren(ChildrenListType & children); @@ -538,9 +538,9 @@ class ITK_TEMPLATE_EXPORT SpatialObject: SpatialObject(); /** Destructor. */ - virtual ~SpatialObject() ITK_OVERRIDE; + ~SpatialObject() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Calculate the offsets needed to move from one pixel to the next * along a row, column, slice, volume, etc. These offsets are based diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx index 7ee4245dfb4..c7d9a4dc6b7 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx @@ -36,7 +36,7 @@ SpatialObject< TDimension > m_Bounds = BoundingBoxType::New(); m_BoundsMTime = 0; m_Property = PropertyType::New(); - m_TreeNode = ITK_NULLPTR; + m_TreeNode = nullptr; m_ObjectToWorldTransform = TransformType::New(); m_ObjectToWorldTransform->SetIdentity(); @@ -363,7 +363,7 @@ SpatialObject< TDimension > // handle internal inverse if(!this->GetIndexToWorldTransform()->GetInverse( const_cast< TransformType *>( this->GetInternalInverseTransform() ) )) { - this->m_InternalInverseTransform = ITK_NULLPTR; + this->m_InternalInverseTransform = nullptr; } delete children; } @@ -483,7 +483,7 @@ SpatialObject< TDimension > // handle internal inverse if(!this->GetIndexToWorldTransform()->GetInverse( const_cast< TransformType *>( this->GetInternalInverseTransform() ) )) { - this->m_InternalInverseTransform = ITK_NULLPTR; + this->m_InternalInverseTransform = nullptr; } } @@ -614,7 +614,7 @@ SpatialObject< TDimension > { if ( !m_TreeNode ) { - return ITK_NULLPTR; + return nullptr; } typename TreeNodeType::ChildrenListType * children = @@ -689,7 +689,7 @@ SpatialObject< TDimension > { return m_TreeNode->GetParent()->Get(); } - return ITK_NULLPTR; + return nullptr; } /** Get the parent of the spatial object */ @@ -702,7 +702,7 @@ SpatialObject< TDimension > { return m_TreeNode->GetParent()->Get(); } - return ITK_NULLPTR; + return nullptr; } /** Set the parent of the spatial object */ @@ -713,7 +713,7 @@ SpatialObject< TDimension > { if ( !parent ) { - m_TreeNode->SetParent(ITK_NULLPTR); + m_TreeNode->SetParent(nullptr); } else { @@ -866,7 +866,7 @@ SpatialObject< TDimension > { const SpatialObject *imgData = dynamic_cast< const SpatialObject * >( data ); - if ( imgData == ITK_NULLPTR) + if ( imgData == nullptr) { // pointer could not be cast back down itkExceptionMacro( @@ -954,7 +954,7 @@ SpatialObject< TDimension > return static_cast< TreeNodeType * >( m_TreeNode.GetPointer() )->GetNodeToParentNodeTransform(); } - return ITK_NULLPTR; + return nullptr; } template< unsigned int TDimension > @@ -967,7 +967,7 @@ SpatialObject< TDimension > return static_cast< TreeNodeType * >( m_TreeNode.GetPointer() )->GetNodeToParentNodeTransform(); } - return ITK_NULLPTR; + return nullptr; } /** Return the type of the spatial object as a string @@ -997,7 +997,7 @@ void SpatialObject< TDimension > imgData = dynamic_cast< const SpatialObject * >( data ); - if ( imgData == ITK_NULLPTR ) + if ( imgData == nullptr ) { // pointer could not be cast back down itkExceptionMacro( << "itk::SpatialObject::CopyInformation() cannot cast " diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h index 05d240df819..aacc0919224 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h @@ -83,8 +83,8 @@ class ITK_TEMPLATE_EXPORT SpatialObjectDuplicator:public Object protected: SpatialObjectDuplicator(); - virtual ~SpatialObjectDuplicator() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SpatialObjectDuplicator() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Recursive function to copy the objects */ void CopyObject(const InternalSpatialObjectType *source, diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx index d3b53d3a475..61fdd045063 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx @@ -27,8 +27,8 @@ template< typename TInputSpatialObject > SpatialObjectDuplicator< TInputSpatialObject > ::SpatialObjectDuplicator() { - m_Input = ITK_NULLPTR; - m_DuplicateSpatialObject = ITK_NULLPTR; + m_Input = nullptr; + m_DuplicateSpatialObject = nullptr; m_InternalSpatialObjectTime = 0; SpatialObjectFactoryBase::RegisterDefaultSpatialObjects(); } @@ -67,7 +67,7 @@ SpatialObjectDuplicator< TInputSpatialObject > typedef itk::SpatialObject< TInputSpatialObject::ObjectDimension > SOType; SOType *newSO = dynamic_cast< SOType * >( i.GetPointer() ); - if ( newSO == ITK_NULLPTR ) + if ( newSO == nullptr ) { WarnAndPrintFactories(value); return; diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h index c9b131ff2ee..64f4fd5863e 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h @@ -48,9 +48,9 @@ class SpatialObjectFactoryBase:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Run-time type information (and related methods). */ itkTypeMacro(SpatialObjectFactoryBase, ObjectFactoryBase); @@ -64,7 +64,7 @@ class SpatialObjectFactoryBase:public ObjectFactoryBase /** Register this SpatialObject */ static SpatialObjectFactoryBase * GetFactory() { - if ( m_Factory == ITK_NULLPTR ) + if ( m_Factory == nullptr ) { // Make and register the factory SpatialObjectFactoryBase::Pointer p = SpatialObjectFactoryBase::New(); @@ -87,7 +87,7 @@ class SpatialObjectFactoryBase:public ObjectFactoryBase protected: SpatialObjectFactoryBase(); - virtual ~SpatialObjectFactoryBase() ITK_OVERRIDE; + ~SpatialObjectFactoryBase() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SpatialObjectFactoryBase); diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h index 11c63191f73..363b62a7b61 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h @@ -71,7 +71,7 @@ class ITK_TEMPLATE_EXPORT SpatialObjectProperty: TComponentType GetAlpha() const; SpatialObjectProperty(); - virtual ~SpatialObjectProperty() ITK_OVERRIDE; + ~SpatialObjectProperty() override; void SetName(const char *name); @@ -81,7 +81,7 @@ class ITK_TEMPLATE_EXPORT SpatialObjectProperty: protected: - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void Modified(void){ m_MTime++; } diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.h index 3151bd63506..7e836b58df1 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.h @@ -152,10 +152,10 @@ class ITK_TEMPLATE_EXPORT SpatialObjectToImageFilter:public ImageSource< TOutput protected: SpatialObjectToImageFilter(); - ~SpatialObjectToImageFilter() ITK_OVERRIDE; + ~SpatialObjectToImageFilter() override; - virtual void GenerateOutputInformation() ITK_OVERRIDE {} // do nothing - virtual void GenerateData() ITK_OVERRIDE; + void GenerateOutputInformation() override {} // do nothing + void GenerateData() override; SizeType m_Size; double m_Spacing[OutputImageDimension]; @@ -169,7 +169,7 @@ class ITK_TEMPLATE_EXPORT SpatialObjectToImageFilter:public ImageSource< TOutput bool m_UseObjectValue; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h index 953987f5b9c..a99f6b2ab17 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h @@ -110,8 +110,8 @@ class ITK_TEMPLATE_EXPORT SpatialObjectToImageStatisticsCalculator:public Object protected: SpatialObjectToImageStatisticsCalculator(); - virtual ~SpatialObjectToImageStatisticsCalculator() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SpatialObjectToImageStatisticsCalculator() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; bool ComputeStatistics(); diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx index 47760c5a113..e7721bb5c88 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx @@ -32,8 +32,8 @@ template< typename TInputImage, typename TInputSpatialObject, unsigned int TSamp SpatialObjectToImageStatisticsCalculator< TInputImage, TInputSpatialObject, TSampleDimension > ::SpatialObjectToImageStatisticsCalculator() { - m_Image = ITK_NULLPTR; - m_SpatialObject = ITK_NULLPTR; + m_Image = nullptr; + m_SpatialObject = nullptr; m_Mean.Fill(0); m_CovarianceMatrix.SetIdentity(); m_SampleDirection = TSampleDimension - 1; diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.h index 1c0b8f88c3d..b6897431d09 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.h @@ -89,12 +89,12 @@ class ITK_TEMPLATE_EXPORT SpatialObjectToPointSetFilter:public MeshSource< TOutp protected: SpatialObjectToPointSetFilter(); - ~SpatialObjectToPointSetFilter() ITK_OVERRIDE; + ~SpatialObjectToPointSetFilter() override; - virtual void GenerateOutputInformation() ITK_OVERRIDE {} // do nothing - virtual void GenerateData() ITK_OVERRIDE; + void GenerateOutputInformation() override {} // do nothing + void GenerateData() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SpatialObjectToPointSetFilter); diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeContainer.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeContainer.h index f0dad2dbd07..07282a65660 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeContainer.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeContainer.h @@ -70,15 +70,15 @@ class ITK_TEMPLATE_EXPORT SpatialObjectTreeContainer: itkTypeMacro(SpatialObjectTreeContainer, TreeContainer); /** Set the root */ - bool SetRoot(const SpatialObjectPointer element) ITK_OVERRIDE; + bool SetRoot(const SpatialObjectPointer element) override; - bool SetRoot(typename Superclass::TreeNodeType *node) ITK_OVERRIDE + bool SetRoot(typename Superclass::TreeNodeType *node) override { return Superclass::SetRoot(node); } protected: SpatialObjectTreeContainer(); - virtual ~SpatialObjectTreeContainer() ITK_OVERRIDE; + ~SpatialObjectTreeContainer() override; }; } // namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.h b/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.h index 9067e570048..51e37697ccf 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.h +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.h @@ -70,8 +70,8 @@ class ITK_TEMPLATE_EXPORT SpatialObjectTreeNode:public TreeNode< SpatialObject< /** Return a list of children (the list should be deleted by the user */ #if !defined( ITK_WRAPPING_PARSER ) - virtual ChildrenListType * GetChildren(unsigned int depth = 0, - char *name = ITK_NULLPTR) const ITK_OVERRIDE; + ChildrenListType * GetChildren(unsigned int depth = 0, + char *name = nullptr) const override; #endif @@ -79,8 +79,8 @@ class ITK_TEMPLATE_EXPORT SpatialObjectTreeNode:public TreeNode< SpatialObject< /** Constructor */ SpatialObjectTreeNode(); - virtual ~SpatialObjectTreeNode() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SpatialObjectTreeNode() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; TransformPointer m_NodeToParentNodeTransform; TransformPointer m_NodeToWorldTransform; diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.hxx index 68161ff4036..fa1c89bb52c 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.hxx @@ -32,7 +32,7 @@ SpatialObjectTreeNode< TDimension > m_NodeToParentNodeTransform->SetIdentity(); m_NodeToWorldTransform = TransformType::New(); m_NodeToWorldTransform->SetIdentity(); - this->m_Parent = ITK_NULLPTR; + this->m_Parent = nullptr; } template< unsigned int TDimension > @@ -88,7 +88,7 @@ SpatialObjectTreeNode< TDimension > while ( childrenListIt != childrenListEnd ) { - if ( name == ITK_NULLPTR || strstr(typeid( *( ( *childrenListIt )->Get() ) ).name(), + if ( name == nullptr || strstr(typeid( *( ( *childrenListIt )->Get() ) ).name(), name) ) { children->push_back(*childrenListIt); diff --git a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.h b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.h index cebcaceea1c..7181d1535e6 100644 --- a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.h @@ -67,16 +67,16 @@ class ITK_TEMPLATE_EXPORT SurfaceSpatialObject: const PointListType & GetPoints() const; /** Return a point in the list given the index */ - const SpatialObjectPointType * GetPoint(IdentifierType id) const ITK_OVERRIDE + const SpatialObjectPointType * GetPoint(IdentifierType id) const override { return &( m_Points[id] ); } /** Return a point in the list given the index */ - SpatialObjectPointType * GetPoint(IdentifierType id) ITK_OVERRIDE { return &( m_Points[id] ); } + SpatialObjectPointType * GetPoint(IdentifierType id) override { return &( m_Points[id] ); } /** Return the number of points in the list */ - SizeValueType GetNumberOfPoints(void) const ITK_OVERRIDE + SizeValueType GetNumberOfPoints(void) const override { return static_cast( m_Points.size() ); } @@ -87,18 +87,18 @@ class ITK_TEMPLATE_EXPORT SurfaceSpatialObject: /** Returns true if the Surface is evaluable at the requested point, * false otherwise. */ bool IsEvaluableAt(const PointType & point, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns the value of the Surface at that point. * Currently this function returns a binary value, * but it might want to return a degree of membership * in case of fuzzy Surfaces. */ bool ValueAt(const PointType & point, double & value, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns true if the point is inside the Surface, false otherwise. */ bool IsInside(const PointType & point, - unsigned int depth, char *name) const ITK_OVERRIDE; + unsigned int depth, char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -106,7 +106,7 @@ class ITK_TEMPLATE_EXPORT SurfaceSpatialObject: virtual bool IsInside(const PointType & point) const; /** Compute the boundaries of the Surface. */ - bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; /** Compute the normals to the surface from neighboring points */ bool Approximate3DNormals(); @@ -117,10 +117,10 @@ class ITK_TEMPLATE_EXPORT SurfaceSpatialObject: PointListType m_Points; SurfaceSpatialObject(); - virtual ~SurfaceSpatialObject() ITK_OVERRIDE; + ~SurfaceSpatialObject() override; /** Method to print the object.*/ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx index e7ffc5cb931..32a12522063 100644 --- a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx @@ -177,7 +177,7 @@ SurfaceSpatialObject< TDimension > { itkDebugMacro("Checking the point [" << point << "is on the surface"); - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { diff --git a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.h b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.h index 6e32978052d..4638b599b8a 100644 --- a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.h +++ b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.h @@ -49,7 +49,7 @@ class ITK_TEMPLATE_EXPORT SurfaceSpatialObjectPoint: SurfaceSpatialObjectPoint(); /** Destructor */ - virtual ~SurfaceSpatialObjectPoint() ITK_OVERRIDE; + ~SurfaceSpatialObjectPoint() override; /** Get Normal */ const VectorType & GetNormal() const; @@ -70,7 +70,7 @@ class ITK_TEMPLATE_EXPORT SurfaceSpatialObjectPoint: VectorType m_Normal; /** Method to print the object. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end of namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h b/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h index 8bf1b189288..4ba5151304f 100644 --- a/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h @@ -78,11 +78,11 @@ class ITK_TEMPLATE_EXPORT TubeSpatialObject: virtual void SetPoints(PointListType & newPoints); /** Return a point in the list given the index. */ - virtual const SpatialObjectPointType * GetPoint(IdentifierType ind) const ITK_OVERRIDE + const SpatialObjectPointType * GetPoint(IdentifierType ind) const override { return &( m_Points[ind] ); } /** Return a point in the list given the index */ - virtual SpatialObjectPointType * GetPoint(IdentifierType ind) ITK_OVERRIDE + SpatialObjectPointType * GetPoint(IdentifierType ind) override { return &( m_Points[ind] ); } /** Set a point in the list at the specified index */ @@ -94,7 +94,7 @@ class ITK_TEMPLATE_EXPORT TubeSpatialObject: { m_Points.erase(m_Points.begin() + ind); } /** Return the number of points in the list */ - virtual SizeValueType GetNumberOfPoints(void) const ITK_OVERRIDE + SizeValueType GetNumberOfPoints(void) const override { return static_cast(m_Points.size()); } @@ -104,7 +104,7 @@ class ITK_TEMPLATE_EXPORT TubeSpatialObject: itkGetConstMacro(EndType, unsigned int); /** Remove the list of tube points */ - void Clear(void) ITK_OVERRIDE; + void Clear(void) override; /** Calculate the normalized tangent */ bool ComputeTangentAndNormals(); @@ -115,18 +115,18 @@ class ITK_TEMPLATE_EXPORT TubeSpatialObject: /** Returns true if the tube is evaluable at the requested point, * false otherwise. */ bool IsEvaluableAt(const PointType & point, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns the value of the tube at that point. * Currently this function returns a binary value, * but it might want to return a degree of membership * in case of fuzzy tubes. */ bool ValueAt(const PointType & point, double & value, - unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE; + unsigned int depth = 0, char *name = nullptr) const override; /** Returns true if the point is inside the tube, false otherwise. */ bool IsInside(const PointType & point, - unsigned int depth, char *name) const ITK_OVERRIDE; + unsigned int depth, char *name) const override; /** Test whether a point is inside or outside the object * For computational speed purposes, it is faster if the method does not @@ -134,7 +134,7 @@ class ITK_TEMPLATE_EXPORT TubeSpatialObject: virtual bool IsInside(const PointType & point) const; /** Compute the boundaries of the tube. */ - bool ComputeLocalBoundingBox() const ITK_OVERRIDE; + bool ComputeLocalBoundingBox() const override; /** Set/Get the parent point which corresponds to the * position of the point in the parent's points list */ @@ -151,7 +151,7 @@ class ITK_TEMPLATE_EXPORT TubeSpatialObject: itkGetConstMacro(Artery, bool); /** Copy the information from another SpatialObject */ - void CopyInformation(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override; protected: PointListType m_Points; @@ -164,10 +164,10 @@ class ITK_TEMPLATE_EXPORT TubeSpatialObject: bool m_Artery; TubeSpatialObject(); - virtual ~TubeSpatialObject() ITK_OVERRIDE; + ~TubeSpatialObject() override; /** Method to print the object. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** TimeStamps */ mutable ModifiedTimeType m_OldMTime; diff --git a/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx index a5f9e0112ae..517490e8e62 100644 --- a/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx @@ -315,7 +315,7 @@ TubeSpatialObject< TDimension, TTubePointType > { itkDebugMacro("Checking the point [" << point << "] is inside the tube"); - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { @@ -546,7 +546,7 @@ TubeSpatialObject< TDimension, TTubePointType > // check if we are the same type const Self *source = dynamic_cast< const Self * >( data ); - if ( source == ITK_NULLPTR ) + if ( source == nullptr ) { std::cout << "CopyInformation: objects are not of the same type" << std::endl; diff --git a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h index 89a6fe59956..1fa146b3436 100644 --- a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h +++ b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.h @@ -51,7 +51,7 @@ class ITK_TEMPLATE_EXPORT TubeSpatialObjectPoint: TubeSpatialObjectPoint(); /** Default destructor. */ - virtual ~TubeSpatialObjectPoint() ITK_OVERRIDE; + ~TubeSpatialObjectPoint() override; /** Get the tangent */ const VectorType & GetTangent() const; @@ -108,7 +108,7 @@ class ITK_TEMPLATE_EXPORT TubeSpatialObjectPoint: unsigned short int m_NumDimensions; /** Print the object */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end of namespace itk diff --git a/Modules/Core/SpatialObjects/include/itkVesselTubeSpatialObject.h b/Modules/Core/SpatialObjects/include/itkVesselTubeSpatialObject.h index 03dac8697f2..1f5e12d78bb 100644 --- a/Modules/Core/SpatialObjects/include/itkVesselTubeSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/itkVesselTubeSpatialObject.h @@ -70,10 +70,10 @@ class ITK_TEMPLATE_EXPORT VesselTubeSpatialObject: protected: VesselTubeSpatialObject(); - virtual ~VesselTubeSpatialObject() ITK_OVERRIDE; + ~VesselTubeSpatialObject() override; /** Method to print the object.*/ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VesselTubeSpatialObject); diff --git a/Modules/Core/SpatialObjects/include/itkVesselTubeSpatialObjectPoint.h b/Modules/Core/SpatialObjects/include/itkVesselTubeSpatialObjectPoint.h index 923566447b7..9971bf996ff 100644 --- a/Modules/Core/SpatialObjects/include/itkVesselTubeSpatialObjectPoint.h +++ b/Modules/Core/SpatialObjects/include/itkVesselTubeSpatialObjectPoint.h @@ -50,7 +50,7 @@ class ITK_TEMPLATE_EXPORT VesselTubeSpatialObjectPoint: VesselTubeSpatialObjectPoint(); /** Default destructor. */ - virtual ~VesselTubeSpatialObjectPoint() ITK_OVERRIDE; + ~VesselTubeSpatialObjectPoint() override; /** Get Medialness */ float GetMedialness() const; @@ -121,7 +121,7 @@ class ITK_TEMPLATE_EXPORT VesselTubeSpatialObjectPoint: bool m_Mark; /** Print the object */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end of namespace itk diff --git a/Modules/Core/SpatialObjects/src/itkCylinderSpatialObject.cxx b/Modules/Core/SpatialObjects/src/itkCylinderSpatialObject.cxx index 99f750ccc41..3ab153dc973 100644 --- a/Modules/Core/SpatialObjects/src/itkCylinderSpatialObject.cxx +++ b/Modules/Core/SpatialObjects/src/itkCylinderSpatialObject.cxx @@ -68,7 +68,7 @@ ::IsInside(const PointType & point, unsigned int depth, char *name) const { itkDebugMacro("Checking the point [" << point << "] is inside the Cylinder"); - if ( name == ITK_NULLPTR ) + if ( name == nullptr ) { if ( IsInside(point) ) { diff --git a/Modules/Core/SpatialObjects/src/itkSpatialObjectFactoryBase.cxx b/Modules/Core/SpatialObjects/src/itkSpatialObjectFactoryBase.cxx index cf56156b8c6..6c60447db3e 100644 --- a/Modules/Core/SpatialObjects/src/itkSpatialObjectFactoryBase.cxx +++ b/Modules/Core/SpatialObjects/src/itkSpatialObjectFactoryBase.cxx @@ -24,7 +24,7 @@ namespace itk { -SpatialObjectFactoryBase *SpatialObjectFactoryBase:: m_Factory = ITK_NULLPTR; +SpatialObjectFactoryBase *SpatialObjectFactoryBase:: m_Factory = nullptr; SpatialObjectFactoryBase::SpatialObjectFactoryBase() {} diff --git a/Modules/Core/SpatialObjects/test/itkAffineGeometryFrameTest.cxx b/Modules/Core/SpatialObjects/test/itkAffineGeometryFrameTest.cxx index 200991832bf..29225034ab7 100644 --- a/Modules/Core/SpatialObjects/test/itkAffineGeometryFrameTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkAffineGeometryFrameTest.cxx @@ -36,7 +36,7 @@ int itkAffineGeometryFrameTest(int, char* []) std::cout<<"[DONE]"<GetBoundingBox() == ITK_NULLPTR) + if(geometryFrame1->GetBoundingBox() == nullptr) { std::cerr << "not initialized [FAILED]" << std::endl; return EXIT_FAILURE; @@ -44,7 +44,7 @@ int itkAffineGeometryFrameTest(int, char* []) std::cout<<"[PASSED]"<GetIndexToObjectTransform() == ITK_NULLPTR) + if(geometryFrame1->GetIndexToObjectTransform() == nullptr) { std::cerr << "not initialized [FAILED]" << std::endl; return EXIT_FAILURE; @@ -52,7 +52,7 @@ int itkAffineGeometryFrameTest(int, char* []) std::cout<<"[PASSED]"<GetObjectToNodeTransform() == ITK_NULLPTR) + if(geometryFrame1->GetObjectToNodeTransform() == nullptr) { std::cerr << "not initialized [FAILED]" << std::endl; return EXIT_FAILURE; @@ -92,7 +92,7 @@ int itkAffineGeometryFrameTest(int, char* []) std::cout<<"[DONE]"<GetBoundingBox() == ITK_NULLPTR) + if(clonedGeometryFrame1->GetBoundingBox() == nullptr) { std::cerr << "not initialized [FAILED]" << std::endl; return EXIT_FAILURE; @@ -100,7 +100,7 @@ int itkAffineGeometryFrameTest(int, char* []) std::cout<<"[PASSED]"<GetIndexToObjectTransform() == ITK_NULLPTR) + if(clonedGeometryFrame1->GetIndexToObjectTransform() == nullptr) { std::cerr << "not initialized [FAILED]" << std::endl; return EXIT_FAILURE; @@ -108,7 +108,7 @@ int itkAffineGeometryFrameTest(int, char* []) std::cout<<"[PASSED]"<GetObjectToNodeTransform() == ITK_NULLPTR) + if(clonedGeometryFrame1->GetObjectToNodeTransform() == nullptr) { std::cerr << "not initialized [FAILED]" << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/SpatialObjects/test/itkLandmarkSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkLandmarkSpatialObjectTest.cxx index 8d08b2fa3be..9922fa47a84 100644 --- a/Modules/Core/SpatialObjects/test/itkLandmarkSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkLandmarkSpatialObjectTest.cxx @@ -100,13 +100,13 @@ int itkLandmarkSpatialObjectTest(int, char* []) itk::Point out; out[0]=0;out[1]=0;out[2]=0; - if(!landmark->IsInside(in,9999,ITK_NULLPTR)) + if(!landmark->IsInside(in,9999,nullptr)) { std::cout<<"[FAILED]"<IsInside(out,9999,ITK_NULLPTR)) + if(landmark->IsInside(out,9999,nullptr)) { std::cout<<"[FAILED]"<IsEvaluableAt(in,9999,ITK_NULLPTR)) + if(!landmark->IsEvaluableAt(in,9999,nullptr)) { std::cout<<"[FAILED]"<ValueAt(in,val,9999,ITK_NULLPTR)) + if(!landmark->ValueAt(in,val,9999,nullptr)) { std::cout<<"[FAILED]"<(converter->SpatialObjectToMetaObject(itkArrow)); - if(newMetaArrow == ITK_NULLPTR) + if(newMetaArrow == nullptr) { itkGenericExceptionMacro(<< "Failed to downcast from MetaObject to MetaArrow"); } diff --git a/Modules/Core/SpatialObjects/test/itkMetaGaussianConverterTest.cxx b/Modules/Core/SpatialObjects/test/itkMetaGaussianConverterTest.cxx index 5e9c67399f1..498249d77d0 100644 --- a/Modules/Core/SpatialObjects/test/itkMetaGaussianConverterTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkMetaGaussianConverterTest.cxx @@ -102,7 +102,7 @@ int itkMetaGaussianConverterTest(int argc, char* argv[]) // MetaGaussian* newMetaGaussian = dynamic_cast( converter->SpatialObjectToMetaObject(GaussianSpatialObj)); - if(newMetaGaussian == ITK_NULLPTR) + if(newMetaGaussian == nullptr) { itkGenericExceptionMacro( << "Failed to downcast from GaussianSpatialObject to MetaGaussian"); diff --git a/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx b/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx index b6fc600f32a..8102fcf667c 100644 --- a/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkNewMetaObjectTypeTest.cxx @@ -32,7 +32,7 @@ class MetaDummy : public MetaObject void SetValue(float val) { m_Value = val; } protected: - virtual void M_SetupReadFields(void) ITK_OVERRIDE + void M_SetupReadFields(void) override { MetaObject::M_SetupReadFields(); MET_FieldRecordType *mf = new MET_FieldRecordType; @@ -40,7 +40,7 @@ class MetaDummy : public MetaObject mf->terminateRead = false; m_Fields.push_back(mf); } - virtual void M_SetupWriteFields(void) ITK_OVERRIDE + void M_SetupWriteFields(void) override { strcpy(m_ObjectTypeName,"Dummy"); MetaObject::M_SetupWriteFields(); @@ -49,7 +49,7 @@ class MetaDummy : public MetaObject MET_InitWriteField(mf, "Value", MET_FLOAT, m_Value); m_Fields.push_back(mf); } - virtual bool M_Read(void) ITK_OVERRIDE + bool M_Read(void) override { if(!MetaObject::M_Read()) { @@ -105,7 +105,7 @@ class DummySpatialObject : this->GetProperty()->SetBlue(0); this->GetProperty()->SetAlpha(1); } - ~DummySpatialObject() ITK_OVERRIDE {} + ~DummySpatialObject() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(DummySpatialObject); @@ -143,10 +143,10 @@ class MetaDummyConverter : typedef MetaDummy DummyMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override { const DummyMetaObjectType *dummyMO = dynamic_cast(mo); - if(dummyMO == ITK_NULLPTR) + if(dummyMO == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaDummy"); } @@ -165,7 +165,7 @@ class MetaDummyConverter : } /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override { DummySpatialObjectConstPointer dummySO = dynamic_cast(spatialObject); @@ -187,13 +187,13 @@ class MetaDummyConverter : protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE + MetaObjectType *CreateMetaObject() override { return dynamic_cast(new DummyMetaObjectType); } MetaDummyConverter() {} - ~MetaDummyConverter() ITK_OVERRIDE {} + ~MetaDummyConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaDummyConverter); diff --git a/Modules/Core/SpatialObjects/test/itkSpatialObjectTreeContainerTest.cxx b/Modules/Core/SpatialObjects/test/itkSpatialObjectTreeContainerTest.cxx index c5b37222637..4199f412eb6 100644 --- a/Modules/Core/SpatialObjects/test/itkSpatialObjectTreeContainerTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkSpatialObjectTreeContainerTest.cxx @@ -99,7 +99,7 @@ int itkSpatialObjectTreeContainerTest(int, char* []) std::cout << "Testing node type of SpatialObject added to tree by iterator (PreOrderTreeIterator): " << std::endl; const itk::SpatialObjectTreeNode<2>* spatialObjectTreeNode = dynamic_cast*>(preIt.GetNode()); - if(spatialObjectTreeNode==ITK_NULLPTR) + if(spatialObjectTreeNode==nullptr) { std::cout << "[FAILED]" << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.h b/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.h index aeb92d765a9..0f191adc08a 100644 --- a/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.h +++ b/Modules/Core/TestKernel/include/itkPipelineMonitorImageFilter.h @@ -167,11 +167,11 @@ namespace itk /** Standard pipeline methods are overloaded to call superclass's * implementation and record information. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; - virtual void PropagateRequestedRegion(DataObject *output) ITK_OVERRIDE; - virtual void EnlargeOutputRequestedRegion( DataObject *output) ITK_OVERRIDE; - virtual void GenerateInputRequestedRegion(void) ITK_OVERRIDE; - virtual void GenerateData(void) ITK_OVERRIDE; + void GenerateOutputInformation() override; + void PropagateRequestedRegion(DataObject *output) override; + void EnlargeOutputRequestedRegion( DataObject *output) override; + void GenerateInputRequestedRegion(void) override; + void GenerateData(void) override; protected: @@ -179,7 +179,7 @@ namespace itk // ~PipelineMonitorImageFilter() { } default implementation OK - void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream &os, Indent indent) const override; private: PipelineMonitorImageFilter(const PipelineMonitorImageFilter &); // not implemented diff --git a/Modules/Core/TestKernel/include/itkRandomImageSource.h b/Modules/Core/TestKernel/include/itkRandomImageSource.h index 4e01367a8d9..cb3c7fc6a67 100644 --- a/Modules/Core/TestKernel/include/itkRandomImageSource.h +++ b/Modules/Core/TestKernel/include/itkRandomImageSource.h @@ -126,14 +126,14 @@ class ITK_TEMPLATE_EXPORT RandomImageSource:public ImageSource< TOutputImage > protected: RandomImageSource(); - ~RandomImageSource() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RandomImageSource() override; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void + void ThreadedGenerateData(const OutputImageRegionType & - outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + outputRegionForThread, ThreadIdType threadId) override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RandomImageSource); diff --git a/Modules/Core/TestKernel/include/itkTestDriverBeforeTest.inc b/Modules/Core/TestKernel/include/itkTestDriverBeforeTest.inc index 8e043a28f0a..8e13ec47828 100644 --- a/Modules/Core/TestKernel/include/itkTestDriverBeforeTest.inc +++ b/Modules/Core/TestKernel/include/itkTestDriverBeforeTest.inc @@ -23,7 +23,7 @@ try { std::ofstream redirectStream; - std::streambuf *redirectBuf, *oldCoutBuf = ITK_NULLPTR; + std::streambuf *redirectBuf, *oldCoutBuf = nullptr; if (redirectOutputParameters.redirect) { std::cout << "Test output has been redirected to: " << redirectOutputParameters.fileName << std::endl; diff --git a/Modules/Core/TestKernel/include/itkTestDriverInclude.h b/Modules/Core/TestKernel/include/itkTestDriverInclude.h index 8fe17dfdc1c..3b94ea38a73 100644 --- a/Modules/Core/TestKernel/include/itkTestDriverInclude.h +++ b/Modules/Core/TestKernel/include/itkTestDriverInclude.h @@ -207,7 +207,7 @@ static char my_to_lower(const char c) return static_cast( ::tolower(c)); } -int ProcessArguments(int *ac, ArgumentStringType *av, ProcessedOutputType * processedOutput = ITK_NULLPTR ) +int ProcessArguments(int *ac, ArgumentStringType *av, ProcessedOutputType * processedOutput = nullptr ) { #if defined(LINUX) && !defined(__MINGW32__) && defined(ITK_HAS_FEENABLEEXCEPT) itk::FloatingPointExceptions::Enable(); diff --git a/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.h b/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.h index 061427db0bf..97bc309ac2a 100644 --- a/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.h +++ b/Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.h @@ -102,9 +102,9 @@ class ITK_TEMPLATE_EXPORT ComparisonImageFilter: protected: ComparisonImageFilter(); - virtual ~ComparisonImageFilter() ITK_OVERRIDE {} + ~ComparisonImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** ComparisonImageFilter can be implemented as a multithreaded * filter. Therefore, this implementation provides a @@ -116,13 +116,13 @@ class ITK_TEMPLATE_EXPORT ComparisonImageFilter: * "outputRegionForThread" */ void ThreadedGenerateData(const OutputImageRegionType & threadRegion, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; - void VerifyInputInformation() ITK_OVERRIDE; + void VerifyInputInformation() override; OutputPixelType m_DifferenceThreshold; diff --git a/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.h b/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.h index 7ae95deb367..1b8a970f63e 100644 --- a/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.h +++ b/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.h @@ -227,8 +227,8 @@ class ITK_TEMPLATE_EXPORT ExtractSliceImageFilter: protected: ExtractSliceImageFilter(); - ~ExtractSliceImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ExtractSliceImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** ExtractSliceImageFilter can produce an image which is a different * resolution than its input image. As such, ExtractSliceImageFilter @@ -238,7 +238,7 @@ class ITK_TEMPLATE_EXPORT ExtractSliceImageFilter: * below. * * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** This function calls the actual region copier to do the mapping from * output image space to input image space. It uses a @@ -261,7 +261,7 @@ class ITK_TEMPLATE_EXPORT ExtractSliceImageFilter: * parameter "outputRegionForThread" */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; InputImageRegionType m_ExtractionRegion; diff --git a/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx b/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx index 5054833a464..ab2a86d681a 100644 --- a/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx @@ -127,7 +127,7 @@ ExtractSliceImageFilter< TInputImage, TOutputImage > phyData = dynamic_cast< const ImageBase< InputImageDimension > * >( this->GetInput() ); - if ( phyData == ITK_NULLPTR ) + if ( phyData == nullptr ) { // pointer could not be cast back down itkExceptionMacro( << "itk::ExtractSliceImageFilter::GenerateOutputInformation " diff --git a/Modules/Core/TestKernel/include/itkTestingHashImageFilter.h b/Modules/Core/TestKernel/include/itkTestingHashImageFilter.h index b007892b51f..988dc06a3cf 100644 --- a/Modules/Core/TestKernel/include/itkTestingHashImageFilter.h +++ b/Modules/Core/TestKernel/include/itkTestingHashImageFilter.h @@ -78,7 +78,7 @@ class ITK_TEMPLATE_EXPORT HashImageFilter: * output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; enum HashFunction { MD5 }; @@ -94,22 +94,22 @@ class ITK_TEMPLATE_EXPORT HashImageFilter: // virtual ~HashImageFilter(); // implementation not needed - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; + - virtual void ThreadedGenerateData(const typename Superclass::OutputImageRegionType &, - ThreadIdType) ITK_OVERRIDE {} + ThreadIdType) override {} // See superclass for doxygen documentation // // This method is to do work after the superclass potential threaded // copy. - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; // See superclass for doxygen documentation // // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion(DataObject *data) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *data) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HashImageFilter); diff --git a/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx b/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx index a86dd11b8ad..1c6d01f5bed 100644 --- a/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx @@ -118,7 +118,7 @@ HashImageFilter::AfterThreadedGenerateData() } //////// - // NOTE: THIS IS NOT A ITK_NULLPTR TERMINATED STRING!!! + // NOTE: THIS IS NOT A nullptr TERMINATED STRING!!! //////// const size_t DigestSize = 32u; char Digest[DigestSize]; diff --git a/Modules/Core/TestKernel/include/itkTestingMacros.h b/Modules/Core/TestKernel/include/itkTestingMacros.h index 5abdc56c08f..b68600d9b21 100644 --- a/Modules/Core/TestKernel/include/itkTestingMacros.h +++ b/Modules/Core/TestKernel/include/itkTestingMacros.h @@ -179,11 +179,11 @@ CLANG_PRAGMA_POP \ } #define TEST_SET_GET_NULL_VALUE( command ) \ - if( ITK_NULLPTR != command ) \ + if( nullptr != command ) \ { \ std::cerr << "Error in " << #command << std::endl; \ std::cerr << " In " __FILE__ ", line " << __LINE__ << std::endl; \ - std::cerr << "Expected " << "ITK_NULLPTR" << std::endl; \ + std::cerr << "Expected " << "nullptr" << std::endl; \ std::cerr << "but got " << command << std::endl; \ return EXIT_FAILURE; \ } diff --git a/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.h b/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.h index 2f725508d66..50197c354e7 100644 --- a/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.h +++ b/Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.h @@ -93,13 +93,13 @@ class ITK_TEMPLATE_EXPORT StretchIntensityImageFilter: public ImageSource< TOutp protected: StretchIntensityImageFilter(); - virtual ~StretchIntensityImageFilter() ITK_OVERRIDE {} + ~StretchIntensityImageFilter() override {} /** Process to execute before entering the multithreaded section */ - void BeforeThreadedGenerateData(void) ITK_OVERRIDE; + void BeforeThreadedGenerateData(void) override; /** Print internal ivars */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef typename Superclass::OutputImageRegionType OutputImageRegionType; typedef typename TInputImage::RegionType InputImageRegionType; @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT StretchIntensityImageFilter: public ImageSource< TOutp * portion of the output image specified by the parameter * "outputRegionForThread" */ - void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StretchIntensityImageFilter); diff --git a/Modules/Core/TestKernel/src/itkTestDriver.cxx b/Modules/Core/TestKernel/src/itkTestDriver.cxx index 162cff2d2ca..44aef2740ac 100644 --- a/Modules/Core/TestKernel/src/itkTestDriver.cxx +++ b/Modules/Core/TestKernel/src/itkTestDriver.cxx @@ -176,20 +176,20 @@ void AddEntriesBeforeEnvironmentWithSeparator( const ArgumentsList & args ) int TestDriverInvokeProcess( const ArgumentsList & args ) { - // a ITK_NULLPTR is required at the end of the table + // a nullptr is required at the end of the table char ** argv = new char *[args.size() + 1]; for ( unsigned int i = 0; i < args.size(); i++ ) { argv[i] = args[i]; } - argv[args.size()] = ITK_NULLPTR; + argv[args.size()] = nullptr; itksysProcess *process = itksysProcess_New(); itksysProcess_SetCommand(process, 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); delete[] argv; diff --git a/Modules/Core/TestKernel/test/itkGoogleTest.cxx b/Modules/Core/TestKernel/test/itkGoogleTest.cxx index 3b7f896c2d7..c2bf42af0f9 100644 --- a/Modules/Core/TestKernel/test/itkGoogleTest.cxx +++ b/Modules/Core/TestKernel/test/itkGoogleTest.cxx @@ -21,9 +21,9 @@ // Minimal test to verify Google Test works TEST(GoogleTest,t1) { - void *ptr = NULL; - ASSERT_TRUE((ptr == ITK_NULLPTR)); - EXPECT_TRUE((ptr == ITK_NULLPTR)); + void *ptr = nullptr; + ASSERT_TRUE((ptr == nullptr)); + EXPECT_TRUE((ptr == nullptr)); } // cover ITK Google testing utilities diff --git a/Modules/Core/TestKernel/test/itkGoogleTestFixture.cxx b/Modules/Core/TestKernel/test/itkGoogleTestFixture.cxx index bb8750d6acd..35a74dd6bee 100644 --- a/Modules/Core/TestKernel/test/itkGoogleTestFixture.cxx +++ b/Modules/Core/TestKernel/test/itkGoogleTestFixture.cxx @@ -28,11 +28,11 @@ class GoogleTestFixture { public: GoogleTestFixture() : m_C(1) {} - ~GoogleTestFixture() {} + ~GoogleTestFixture() override {} protected: - void SetUp() {} - void TearDown() {} + void SetUp() override {} + void TearDown() override {} int m_C; }; diff --git a/Modules/Core/Transform/include/itkAffineTransform.h b/Modules/Core/Transform/include/itkAffineTransform.h index 8b1d9737585..9cb8236cd0c 100644 --- a/Modules/Core/Transform/include/itkAffineTransform.h +++ b/Modules/Core/Transform/include/itkAffineTransform.h @@ -236,7 +236,7 @@ class ITK_TEMPLATE_EXPORT AffineTransform: bool GetInverse(Self *inverse) const; /** Return an inverse of this transform. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; /** Compute distance between two affine transformations * @@ -270,10 +270,10 @@ class ITK_TEMPLATE_EXPORT AffineTransform: AffineTransform(); /** Destroy an AffineTransform object */ - virtual ~AffineTransform() ITK_OVERRIDE; + ~AffineTransform() override; /** Print contents of an AffineTransform */ - void PrintSelf(std::ostream & s, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & s, Indent indent) const override; private: diff --git a/Modules/Core/Transform/include/itkAffineTransform.hxx b/Modules/Core/Transform/include/itkAffineTransform.hxx index 0d4ffbb5db7..0e8fd1226d9 100644 --- a/Modules/Core/Transform/include/itkAffineTransform.hxx +++ b/Modules/Core/Transform/include/itkAffineTransform.hxx @@ -297,7 +297,7 @@ AffineTransform { Pointer inv = New(); - return this->GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR; + return this->GetInverse(inv) ? inv.GetPointer() : nullptr; } /** Compute a distance between two affine transforms */ diff --git a/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h b/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h index 4fce08536c0..a395d54acc8 100644 --- a/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h +++ b/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h @@ -137,7 +137,7 @@ class ITK_TEMPLATE_EXPORT AzimuthElevationToCartesianTransform: const long maxElevation); /** Transform from azimuth-elevation to cartesian. */ - OutputPointType TransformPoint(const InputPointType & point) const ITK_OVERRIDE; + OutputPointType TransformPoint(const InputPointType & point) const override; /** Back transform from cartesian to azimuth-elevation. */ inline InputPointType BackTransform(const OutputPointType & point) const @@ -163,7 +163,7 @@ class ITK_TEMPLATE_EXPORT AzimuthElevationToCartesianTransform: /** Overrides the TransformCategoryType to UnknownTransformCategory. Even though this class derives from AffineTransform, its not a linear transform */ - virtual TransformCategoryType GetTransformCategory() const ITK_OVERRIDE + TransformCategoryType GetTransformCategory() const override { return Self::UnknownTransformCategory; } @@ -219,10 +219,10 @@ class ITK_TEMPLATE_EXPORT AzimuthElevationToCartesianTransform: AzimuthElevationToCartesianTransform(); /** Destroy an AzimuthElevationToCartesianTransform object. */ - virtual ~AzimuthElevationToCartesianTransform() ITK_OVERRIDE; + ~AzimuthElevationToCartesianTransform() override; /** Print contents of an AzimuthElevationTransform. */ - void PrintSelf(std::ostream & s, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & s, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(AzimuthElevationToCartesianTransform); diff --git a/Modules/Core/Transform/include/itkBSplineBaseTransform.h b/Modules/Core/Transform/include/itkBSplineBaseTransform.h index 6373c397e55..7a695152d1f 100644 --- a/Modules/Core/Transform/include/itkBSplineBaseTransform.h +++ b/Modules/Core/Transform/include/itkBSplineBaseTransform.h @@ -106,7 +106,7 @@ class ITK_TEMPLATE_EXPORT BSplineBaseTransform : * NOTE: The transform domain must be set first. * */ - void SetParameters( const ParametersType & parameters ) ITK_OVERRIDE; + void SetParameters( const ParametersType & parameters ) override; /** This method sets the fixed parameters of the transform. * For a BSpline deformation transform, the fixed parameters are the @@ -130,7 +130,7 @@ class ITK_TEMPLATE_EXPORT BSplineBaseTransform : * itkTransformReader/Writer I/O filters. * */ - virtual void SetFixedParameters( const FixedParametersType & parameters ) ITK_OVERRIDE = 0; + void SetFixedParameters( const FixedParametersType & parameters ) override = 0; /** This method sets the parameters of the transform. * For a BSpline deformation transform, the parameters are the BSpline @@ -148,7 +148,7 @@ class ITK_TEMPLATE_EXPORT BSplineBaseTransform : * fixed parameters. * NOTE: The fixed parameters must be set first. */ - void SetParametersByValue( const ParametersType & parameters ) ITK_OVERRIDE; + void SetParametersByValue( const ParametersType & parameters ) override; /** This method can ONLY be invoked AFTER calling SetParameters(). * This restriction is due to the fact that the BSplineBaseTransform @@ -161,10 +161,10 @@ class ITK_TEMPLATE_EXPORT BSplineBaseTransform : void SetIdentity(); /** Get the Transformation Parameters. */ - virtual const ParametersType & GetParameters() const ITK_OVERRIDE; + const ParametersType & GetParameters() const override; /** Get the Transformation Fixed Parameters. */ - virtual const FixedParametersType & GetFixedParameters() const ITK_OVERRIDE; + const FixedParametersType & GetFixedParameters() const override; /** Parameters as SpaceDimension number of images. */ typedef typename ParametersType::ValueType ParametersValueType; @@ -203,7 +203,7 @@ class ITK_TEMPLATE_EXPORT BSplineBaseTransform : * a converion to member variables for use in TransformPoint. * Derived classes should override to provide specialized behavior. */ - virtual void UpdateTransformParameters( const DerivativeType & update, TParametersValueType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, TParametersValueType factor = 1.0 ) override; /** Typedefs for specifying the extent of the grid. */ typedef ImageRegion RegionType; @@ -215,7 +215,7 @@ class ITK_TEMPLATE_EXPORT BSplineBaseTransform : typedef typename ImageType::PointType OriginType; /** Transform points by a BSpline deformable transformation. */ - OutputPointType TransformPoint( const InputPointType & point ) const ITK_OVERRIDE; + OutputPointType TransformPoint( const InputPointType & point ) const override; /** Interpolation weights function type. */ typedef BSplineInterpolationWeightFunctionGetNameOfClass() ); } /** Return the number of parameters that completely define the Transfom */ - virtual NumberOfParametersType GetNumberOfParameters() const ITK_OVERRIDE = 0; + NumberOfParametersType GetNumberOfParameters() const override = 0; /** Return the number of parameters per dimension */ virtual NumberOfParametersType GetNumberOfParametersPerDimension() const = 0; - virtual TransformCategoryType GetTransformCategory() const ITK_OVERRIDE + TransformCategoryType GetTransformCategory() const override { return Self::BSpline; } @@ -300,17 +300,17 @@ class ITK_TEMPLATE_EXPORT BSplineBaseTransform : typedef SizeType MeshSizeType; /** Return the number of local parameters */ - virtual NumberOfParametersType GetNumberOfLocalParameters() const ITK_OVERRIDE + NumberOfParametersType GetNumberOfLocalParameters() const override { return this->GetNumberOfParameters(); } protected: /** Print contents of an BSplineBaseTransform. */ - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; BSplineBaseTransform(); - virtual ~BSplineBaseTransform() ITK_OVERRIDE; + ~BSplineBaseTransform() override; /** Get/Set to allow subclasses to access and manipulate the weights function. */ itkSetObjectMacro( WeightsFunction, WeightsFunctionType ); diff --git a/Modules/Core/Transform/include/itkBSplineDeformableTransform.h b/Modules/Core/Transform/include/itkBSplineDeformableTransform.h index 8895404f439..7e3fa062814 100644 --- a/Modules/Core/Transform/include/itkBSplineDeformableTransform.h +++ b/Modules/Core/Transform/include/itkBSplineDeformableTransform.h @@ -128,7 +128,7 @@ class ITK_TEMPLATE_EXPORT BSplineDeformableTransform : // explicitly. // TODO: shouldn't it be done with the Clone() method? itkSimpleNewMacro(Self); - virtual ::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE + ::itk::LightObject::Pointer CreateAnother(void) const override { ::itk::LightObject::Pointer smartPtr; Pointer copyPtr = Self::New().GetPointer(); @@ -198,7 +198,7 @@ class ITK_TEMPLATE_EXPORT BSplineDeformableTransform : * itkTransformReader/Writer I/O filters. * */ - virtual void SetFixedParameters( const FixedParametersType & parameters ) ITK_OVERRIDE; + void SetFixedParameters( const FixedParametersType & parameters ) override; /** Parameters as SpaceDimension number of images. */ typedef typename Superclass::ImageType ImageType; @@ -216,7 +216,7 @@ class ITK_TEMPLATE_EXPORT BSplineDeformableTransform : * Warning: use either the SetParameters() or SetCoefficientImages() * API. Mixing the two modes may results in unexpected results. */ - virtual void SetCoefficientImages( const CoefficientImageArray & images ) ITK_OVERRIDE; + void SetCoefficientImages( const CoefficientImageArray & images ) override; /** Typedefs for specifying the extent of the grid. */ typedef typename Superclass::RegionType RegionType; @@ -245,16 +245,16 @@ class ITK_TEMPLATE_EXPORT BSplineDeformableTransform : * ( i * this->GetNumberOfParametersPerDimension() ) to the indices array. */ using Superclass::TransformPoint; - virtual void TransformPoint( const InputPointType & inputPoint, OutputPointType & outputPoint, - WeightsType & weights, ParameterIndexArrayType & indices, bool & inside ) const ITK_OVERRIDE; + void TransformPoint( const InputPointType & inputPoint, OutputPointType & outputPoint, + WeightsType & weights, ParameterIndexArrayType & indices, bool & inside ) const override; - virtual void ComputeJacobianWithRespectToParameters( const InputPointType &, JacobianType & ) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType &, JacobianType & ) const override; /** Return the number of parameters that completely define the Transfom */ - virtual NumberOfParametersType GetNumberOfParameters() const ITK_OVERRIDE; + NumberOfParametersType GetNumberOfParameters() const override; /** Return the number of parameters per dimension */ - NumberOfParametersType GetNumberOfParametersPerDimension() const ITK_OVERRIDE; + NumberOfParametersType GetNumberOfParametersPerDimension() const override; typedef typename Superclass::SpacingType PhysicalDimensionsType; typedef typename Superclass::PixelType PixelType; @@ -300,32 +300,32 @@ class ITK_TEMPLATE_EXPORT BSplineDeformableTransform : protected: /** Print contents of an BSplineDeformableTransform. */ - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; BSplineDeformableTransform(); - virtual ~BSplineDeformableTransform() ITK_OVERRIDE; + ~BSplineDeformableTransform() override; private: /** Construct control point grid size from transform domain information */ - virtual void SetFixedParametersGridSizeFromTransformDomainInformation() const ITK_OVERRIDE; + void SetFixedParametersGridSizeFromTransformDomainInformation() const override; /** Construct control point grid origin from transform domain information */ - virtual void SetFixedParametersGridOriginFromTransformDomainInformation() const ITK_OVERRIDE; + void SetFixedParametersGridOriginFromTransformDomainInformation() const override; /** Construct control point grid spacing from transform domain information */ - virtual void SetFixedParametersGridSpacingFromTransformDomainInformation() const ITK_OVERRIDE; + void SetFixedParametersGridSpacingFromTransformDomainInformation() const override; /** Construct control point grid direction from transform domain information */ - virtual void SetFixedParametersGridDirectionFromTransformDomainInformation() const ITK_OVERRIDE; + void SetFixedParametersGridDirectionFromTransformDomainInformation() const override; /** Construct control point grid size from transform domain information */ - virtual void SetCoefficientImageInformationFromFixedParameters() ITK_OVERRIDE; + void SetCoefficientImageInformationFromFixedParameters() override; ITK_DISALLOW_COPY_AND_ASSIGN(BSplineDeformableTransform); /** Check if a continuous index is inside the valid region. */ - virtual bool InsideValidRegion( ContinuousIndexType & ) const ITK_OVERRIDE; + bool InsideValidRegion( ContinuousIndexType & ) const override; /** The variables defining the coefficient grid domain for the * InternalParametersBuffer are taken from the m_CoefficientImages[0] diff --git a/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx b/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx index 2861100df5e..aa3595e9020 100644 --- a/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx +++ b/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx @@ -506,7 +506,7 @@ BSplineDeformableTransform } // if no coefficients are set, this isn't a proper BSpline Transform - if( this->m_CoefficientImages[0]->GetBufferPointer() == ITK_NULLPTR) + if( this->m_CoefficientImages[0]->GetBufferPointer() == nullptr) { itkExceptionMacro( "B-spline coefficients have not been set" ); } diff --git a/Modules/Core/Transform/include/itkBSplineTransform.h b/Modules/Core/Transform/include/itkBSplineTransform.h index 6f5d968c444..13367d6d60e 100644 --- a/Modules/Core/Transform/include/itkBSplineTransform.h +++ b/Modules/Core/Transform/include/itkBSplineTransform.h @@ -162,7 +162,7 @@ class ITK_TEMPLATE_EXPORT BSplineTransform : typedef typename Superclass::OutputPointType OutputPointType; - virtual std::string GetTransformTypeAsString() const ITK_OVERRIDE; + std::string GetTransformTypeAsString() const override; /** This method sets the fixed parameters of the transform. * For a BSpline deformation transform, the fixed parameters are the @@ -186,7 +186,7 @@ class ITK_TEMPLATE_EXPORT BSplineTransform : * itkTransformReader/Writer I/O filters. * */ - virtual void SetFixedParameters( const FixedParametersType & parameters ) ITK_OVERRIDE; + void SetFixedParameters( const FixedParametersType & parameters ) override; /** Parameters as SpaceDimension number of images. */ typedef typename Superclass::ImageType ImageType; @@ -204,7 +204,7 @@ class ITK_TEMPLATE_EXPORT BSplineTransform : * Warning: use either the SetParameters() or SetCoefficientImages() * API. Mixing the two modes may results in unexpected results. */ - virtual void SetCoefficientImages( const CoefficientImageArray & images ) ITK_OVERRIDE; + void SetCoefficientImages( const CoefficientImageArray & images ) override; /** Typedefs for specifying the extent of the grid. */ typedef typename Superclass::RegionType RegionType; @@ -233,17 +233,17 @@ class ITK_TEMPLATE_EXPORT BSplineTransform : * ( i * this->GetNumberOfParametersPerDimension() ) to the indices array. */ using Superclass::TransformPoint; - virtual void TransformPoint( const InputPointType & inputPoint, OutputPointType & outputPoint, - WeightsType & weights, ParameterIndexArrayType & indices, bool & inside ) const ITK_OVERRIDE; + void TransformPoint( const InputPointType & inputPoint, OutputPointType & outputPoint, + WeightsType & weights, ParameterIndexArrayType & indices, bool & inside ) const override; /** Compute the Jacobian in one position. */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType &, JacobianType & ) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType &, JacobianType & ) const override; /** Return the number of parameters that completely define the Transfom. */ - virtual NumberOfParametersType GetNumberOfParameters() const ITK_OVERRIDE; + NumberOfParametersType GetNumberOfParameters() const override; /** Return the number of parameters per dimension. */ - NumberOfParametersType GetNumberOfParametersPerDimension() const ITK_OVERRIDE; + NumberOfParametersType GetNumberOfParametersPerDimension() const override; typedef typename Superclass::SpacingType PhysicalDimensionsType; typedef typename Superclass::PixelType PixelType; @@ -276,32 +276,32 @@ class ITK_TEMPLATE_EXPORT BSplineTransform : protected: /** Print contents of an BSplineTransform. */ - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; BSplineTransform(); - virtual ~BSplineTransform() ITK_OVERRIDE; + ~BSplineTransform() override; private: /** Construct control point grid size from transform domain information. */ - virtual void SetFixedParametersGridSizeFromTransformDomainInformation() const ITK_OVERRIDE; + void SetFixedParametersGridSizeFromTransformDomainInformation() const override; /** Construct control point grid origin from transform domain information. */ - virtual void SetFixedParametersGridOriginFromTransformDomainInformation() const ITK_OVERRIDE; + void SetFixedParametersGridOriginFromTransformDomainInformation() const override; /** Construct control point grid spacing from transform domain information. */ - virtual void SetFixedParametersGridSpacingFromTransformDomainInformation() const ITK_OVERRIDE; + void SetFixedParametersGridSpacingFromTransformDomainInformation() const override; /** Construct control point grid direction from transform domain information. */ - virtual void SetFixedParametersGridDirectionFromTransformDomainInformation() const ITK_OVERRIDE; + void SetFixedParametersGridDirectionFromTransformDomainInformation() const override; /** Construct control point grid size from transform domain information. */ - virtual void SetCoefficientImageInformationFromFixedParameters() ITK_OVERRIDE; + void SetCoefficientImageInformationFromFixedParameters() override; ITK_DISALLOW_COPY_AND_ASSIGN(BSplineTransform); /** Check if a continuous index is inside the valid region. */ - virtual bool InsideValidRegion( ContinuousIndexType & ) const ITK_OVERRIDE; + bool InsideValidRegion( ContinuousIndexType & ) const override; private: diff --git a/Modules/Core/Transform/include/itkBSplineTransformInitializer.h b/Modules/Core/Transform/include/itkBSplineTransformInitializer.h index 188d127a8df..4f607f4420d 100644 --- a/Modules/Core/Transform/include/itkBSplineTransformInitializer.h +++ b/Modules/Core/Transform/include/itkBSplineTransformInitializer.h @@ -99,9 +99,9 @@ class ITK_TEMPLATE_EXPORT BSplineTransformInitializer protected: BSplineTransformInitializer(); - ~BSplineTransformInitializer() ITK_OVERRIDE; + ~BSplineTransformInitializer() override; - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineTransformInitializer); diff --git a/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx b/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx index 9aeba74d396..14b2d93cf61 100644 --- a/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx +++ b/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx @@ -30,7 +30,7 @@ namespace itk template BSplineTransformInitializer ::BSplineTransformInitializer() : - m_Transform( ITK_NULLPTR ), + m_Transform( nullptr ), m_SetTransformDomainMeshSizeViaInitializer( false ) { this->m_TransformDomainMeshSize.Fill( 1 ); diff --git a/Modules/Core/Transform/include/itkCenteredAffineTransform.h b/Modules/Core/Transform/include/itkCenteredAffineTransform.h index fba19b83087..a06c34187c1 100644 --- a/Modules/Core/Transform/include/itkCenteredAffineTransform.h +++ b/Modules/Core/Transform/include/itkCenteredAffineTransform.h @@ -89,9 +89,9 @@ class ITK_TEMPLATE_EXPORT CenteredAffineTransform : public AffineTransform { Pointer inv = New(); - return this->GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR; + return this->GetInverse(inv) ? inv.GetPointer() : nullptr; } } // namespace diff --git a/Modules/Core/Transform/include/itkCenteredEuler3DTransform.h b/Modules/Core/Transform/include/itkCenteredEuler3DTransform.h index ce9e8402fc3..08842efcbf5 100644 --- a/Modules/Core/Transform/include/itkCenteredEuler3DTransform.h +++ b/Modules/Core/Transform/include/itkCenteredEuler3DTransform.h @@ -89,7 +89,7 @@ class ITK_TEMPLATE_EXPORT CenteredEuler3DTransform : * axes (X,Y,Z), the next three parameters represent the coordinates of the * center of rotation and the last three parameters represent the * translation. */ - void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; /** Get the parameters that uniquely define the transform * This is typically used by optimizers. There are nine parameters. The first @@ -97,30 +97,30 @@ class ITK_TEMPLATE_EXPORT CenteredEuler3DTransform : * axes (X,Y,Z), the next three parameters represent the coordinates of the * center of rotation and the last three parameters represent the * translation. */ - const ParametersType & GetParameters(void) const ITK_OVERRIDE; + const ParametersType & GetParameters(void) const override; /** This method computes the Jacobian matrix of the transformation. * given point or vector, returning the transformed point or * vector. The rank of the Jacobian will also indicate if the * transform is invertible at this point. */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; /** Get an inverse of this transform. */ bool GetInverse(Self *inverse) const; /** Return an inverse of this transform. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; protected: CenteredEuler3DTransform(); CenteredEuler3DTransform(const MatrixType & matrix, const OutputPointType & offset); CenteredEuler3DTransform(unsigned int ParametersDimension); - ~CenteredEuler3DTransform() ITK_OVERRIDE; + ~CenteredEuler3DTransform() override; /** * Print contents of an CenteredEuler3DTransform */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CenteredEuler3DTransform); diff --git a/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx b/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx index 384d6957f5b..a300e5b1246 100644 --- a/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx +++ b/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx @@ -216,7 +216,7 @@ CenteredEuler3DTransform { Pointer inv = New(); - return this->GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR; + return this->GetInverse(inv) ? inv.GetPointer() : nullptr; } // Print self diff --git a/Modules/Core/Transform/include/itkCenteredRigid2DTransform.h b/Modules/Core/Transform/include/itkCenteredRigid2DTransform.h index b6d33919e02..be251deb7c5 100644 --- a/Modules/Core/Transform/include/itkCenteredRigid2DTransform.h +++ b/Modules/Core/Transform/include/itkCenteredRigid2DTransform.h @@ -116,7 +116,7 @@ class ITK_TEMPLATE_EXPORT CenteredRigid2DTransform : * * \sa Transform::SetParameters() * \sa Transform::SetFixedParameters() */ - virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; /** Get the parameters that uniquely define the transform * This is typically used by optimizers. @@ -126,20 +126,20 @@ class ITK_TEMPLATE_EXPORT CenteredRigid2DTransform : * * \sa Transform::GetParameters() * \sa Transform::GetFixedParameters() */ - virtual const ParametersType & GetParameters() const ITK_OVERRIDE; + const ParametersType & GetParameters() const override; /** This method computes the Jacobian matrix of the transformation * at a given input point. */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; /** Set the fixed parameters and update internal transformation. * This is a null function as there are no fixed parameters. */ - virtual void SetFixedParameters(const FixedParametersType &) ITK_OVERRIDE; + void SetFixedParameters(const FixedParametersType &) override; /** Get the Fixed Parameters. An empty array is returned * as there are no fixed parameters. */ - virtual const FixedParametersType & GetFixedParameters() const ITK_OVERRIDE; + const FixedParametersType & GetFixedParameters() const override; /** * This method creates and returns a new CenteredRigid2DTransform object @@ -150,7 +150,7 @@ class ITK_TEMPLATE_EXPORT CenteredRigid2DTransform : bool GetInverse(Self *inverse) const; /** Return an inverse of this transform. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; /** * This method creates and returns a new CenteredRigid2DTransform object @@ -159,11 +159,11 @@ class ITK_TEMPLATE_EXPORT CenteredRigid2DTransform : protected: CenteredRigid2DTransform(); - ~CenteredRigid2DTransform() ITK_OVERRIDE {} + ~CenteredRigid2DTransform() override {} CenteredRigid2DTransform(unsigned int outputSpaceDimension, unsigned int parametersDimension); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CenteredRigid2DTransform); diff --git a/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx b/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx index fe2e7025119..bd837027424 100644 --- a/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx +++ b/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx @@ -213,7 +213,7 @@ CenteredRigid2DTransform { Pointer inv = New(); - return GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR; + return GetInverse(inv) ? inv.GetPointer() : nullptr; } diff --git a/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.h b/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.h index 52c41d3b30f..da80aea200f 100644 --- a/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.h +++ b/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.h @@ -123,7 +123,7 @@ class ITK_TEMPLATE_EXPORT CenteredSimilarity2DTransform : * * \sa Transform::SetParameters() * \sa Transform::SetFixedParameters() */ - virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; /** Get the parameters that uniquely define the transform * This is typically used by optimizers. @@ -134,18 +134,18 @@ class ITK_TEMPLATE_EXPORT CenteredSimilarity2DTransform : * * \sa Transform::GetParameters() * \sa Transform::GetFixedParameters() */ - virtual const ParametersType & GetParameters() const ITK_OVERRIDE; + const ParametersType & GetParameters() const override; /** Compute the Jacobian Matrix of the transformation at one point */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; /** Set the fixed parameters and update internal transformation. * This is a null function as there are no fixed parameters. */ - virtual void SetFixedParameters(const FixedParametersType &) ITK_OVERRIDE; + void SetFixedParameters(const FixedParametersType &) override; /** Get the Fixed Parameters. An empty array is returned * as there are no fixed parameters. */ - virtual const FixedParametersType & GetFixedParameters() const ITK_OVERRIDE; + const FixedParametersType & GetFixedParameters() const override; /** * This method creates and returns a new Rigid2DTransform object @@ -156,7 +156,7 @@ class ITK_TEMPLATE_EXPORT CenteredSimilarity2DTransform : bool GetInverse(Self *inverse) const; /** Return an inverse of this transform. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; /** * This method creates and returns a new Rigid2DTransform object @@ -167,8 +167,8 @@ class ITK_TEMPLATE_EXPORT CenteredSimilarity2DTransform : CenteredSimilarity2DTransform(); CenteredSimilarity2DTransform(unsigned int spaceDimension, unsigned int parametersDimension); - virtual ~CenteredSimilarity2DTransform() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CenteredSimilarity2DTransform() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CenteredSimilarity2DTransform); diff --git a/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx b/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx index a626ef751ac..ad75c94a84f 100644 --- a/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx +++ b/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx @@ -232,7 +232,7 @@ CenteredSimilarity2DTransform { return inv.GetPointer(); } - return ITK_NULLPTR; + return nullptr; } diff --git a/Modules/Core/Transform/include/itkCompositeTransform.h b/Modules/Core/Transform/include/itkCompositeTransform.h index 07b7abf873b..15fb6803f26 100644 --- a/Modules/Core/Transform/include/itkCompositeTransform.h +++ b/Modules/Core/Transform/include/itkCompositeTransform.h @@ -212,7 +212,7 @@ class ITK_TEMPLATE_EXPORT CompositeTransform : return this->m_TransformsToOptimizeFlags; } - virtual void ClearTransformQueue() ITK_OVERRIDE + void ClearTransformQueue() override { Superclass::ClearTransformQueue(); this->m_TransformsToOptimizeFlags.clear(); @@ -225,7 +225,7 @@ class ITK_TEMPLATE_EXPORT CompositeTransform : * of the forward transforms. */ bool GetInverse( Self *inverse ) const; - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; /** Compute the position of point in the new space. * @@ -241,74 +241,74 @@ class ITK_TEMPLATE_EXPORT CompositeTransform : * image, the transforms are applied in reverse order of addition, i.e. from * the back of the queue, and thus, DF then Affine. */ - virtual OutputPointType TransformPoint( const InputPointType & inputPoint ) const ITK_OVERRIDE; + OutputPointType TransformPoint( const InputPointType & inputPoint ) const override; /** Method to transform a vector. */ using Superclass::TransformVector; - virtual OutputVectorType TransformVector(const InputVectorType &) const ITK_OVERRIDE; + OutputVectorType TransformVector(const InputVectorType &) const override; - virtual OutputVnlVectorType TransformVector(const InputVnlVectorType & inputVector) const ITK_OVERRIDE; + OutputVnlVectorType TransformVector(const InputVnlVectorType & inputVector) const override; - virtual OutputVectorPixelType TransformVector(const InputVectorPixelType & inputVector ) const ITK_OVERRIDE; + OutputVectorPixelType TransformVector(const InputVectorPixelType & inputVector ) const override; - virtual OutputVectorType TransformVector(const InputVectorType & inputVector, - const InputPointType & inputPoint ) const ITK_OVERRIDE; + OutputVectorType TransformVector(const InputVectorType & inputVector, + const InputPointType & inputPoint ) const override; - virtual OutputVnlVectorType TransformVector(const InputVnlVectorType & inputVector, - const InputPointType & inputPoint ) const ITK_OVERRIDE; + OutputVnlVectorType TransformVector(const InputVnlVectorType & inputVector, + const InputPointType & inputPoint ) const override; - virtual OutputVectorPixelType TransformVector(const InputVectorPixelType & inputVector, - const InputPointType & inputPoint ) const ITK_OVERRIDE; + OutputVectorPixelType TransformVector(const InputVectorPixelType & inputVector, + const InputPointType & inputPoint ) const override; /** Method to transform a CovariantVector. */ using Superclass::TransformCovariantVector; - virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const ITK_OVERRIDE; + OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override; - virtual OutputVectorPixelType TransformCovariantVector(const InputVectorPixelType &) const ITK_OVERRIDE; + OutputVectorPixelType TransformCovariantVector(const InputVectorPixelType &) const override; - virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType & inputVector, - const InputPointType & inputPoint ) const ITK_OVERRIDE; + OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType & inputVector, + const InputPointType & inputPoint ) const override; - virtual OutputVectorPixelType TransformCovariantVector(const InputVectorPixelType & inputVector, - const InputPointType & inputPoint ) const ITK_OVERRIDE; + OutputVectorPixelType TransformCovariantVector(const InputVectorPixelType & inputVector, + const InputPointType & inputPoint ) const override; /** Method to transform a DiffusionTensor3D */ using Superclass::TransformDiffusionTensor3D; - virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D( - const InputDiffusionTensor3DType & inputTensor) const ITK_OVERRIDE; + OutputDiffusionTensor3DType TransformDiffusionTensor3D( + const InputDiffusionTensor3DType & inputTensor) const override; - virtual OutputVectorPixelType TransformDiffusionTensor3D( - const InputVectorPixelType & inputTensor) const ITK_OVERRIDE; + OutputVectorPixelType TransformDiffusionTensor3D( + const InputVectorPixelType & inputTensor) const override; - virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D( + OutputDiffusionTensor3DType TransformDiffusionTensor3D( const InputDiffusionTensor3DType & inputTensor, - const InputPointType & inputPoint ) const ITK_OVERRIDE; + const InputPointType & inputPoint ) const override; - virtual OutputVectorPixelType TransformDiffusionTensor3D( + OutputVectorPixelType TransformDiffusionTensor3D( const InputVectorPixelType & inputTensor, - const InputPointType & inputPoint ) const ITK_OVERRIDE; + const InputPointType & inputPoint ) const override; /** Method to transform a SymmetricSecondRankTensor */ using Superclass::TransformSymmetricSecondRankTensor; - virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor( - const InputSymmetricSecondRankTensorType & inputTensor) const ITK_OVERRIDE; + OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor( + const InputSymmetricSecondRankTensorType & inputTensor) const override; - virtual OutputVectorPixelType TransformSymmetricSecondRankTensor( - const InputVectorPixelType & inputTensor) const ITK_OVERRIDE; + OutputVectorPixelType TransformSymmetricSecondRankTensor( + const InputVectorPixelType & inputTensor) const override; - virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor( + OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor( const InputSymmetricSecondRankTensorType & inputTensor, - const InputPointType & inputPoint ) const ITK_OVERRIDE; + const InputPointType & inputPoint ) const override; - virtual OutputVectorPixelType TransformSymmetricSecondRankTensor( + OutputVectorPixelType TransformSymmetricSecondRankTensor( const InputVectorPixelType & inputTensor, - const InputPointType & inputPoint ) const ITK_OVERRIDE; + const InputPointType & inputPoint ) const override; /** Special handling for composite transform. If all transforms * are linear, then return category Linear. Otherwise if all * transforms set to optimize are DisplacementFields, then * return DisplacementField category. */ - virtual TransformCategoryType GetTransformCategory() const ITK_OVERRIDE; + TransformCategoryType GetTransformCategory() const override; /** Get/Set Parameter functions work on the current list of transforms that are set to be optimized (active) using the @@ -320,35 +320,35 @@ class ITK_TEMPLATE_EXPORT CompositeTransform : the last sub-transform to be added is returned first in the parameter array. This is the opposite of what's done in the parent MultiTransform class. */ - virtual const ParametersType & GetParameters() const ITK_OVERRIDE; + const ParametersType & GetParameters() const override; /* SetParameters only for transforms that are set to be optimized * See GetParameters() for parameter ordering. */ - virtual void SetParameters(const ParametersType & p) ITK_OVERRIDE; + void SetParameters(const ParametersType & p) override; /* GetFixedParameters only for transforms that are set to be optimized * See GetParameters() for parameter ordering. */ - virtual const FixedParametersType & GetFixedParameters() const ITK_OVERRIDE; + const FixedParametersType & GetFixedParameters() const override; /* SetFixedParameters only for transforms that are set to be optimized. * See GetParameters() for parameter ordering. */ - virtual void SetFixedParameters(const FixedParametersType & fixedParameters) ITK_OVERRIDE; + void SetFixedParameters(const FixedParametersType & fixedParameters) override; /* Get total number of parameters for transforms that are set to be * optimized */ - virtual NumberOfParametersType GetNumberOfParameters(void) const ITK_OVERRIDE; + NumberOfParametersType GetNumberOfParameters(void) const override; /* Get total number of local parameters for transforms that are set * to be optimized */ - virtual NumberOfParametersType GetNumberOfLocalParameters(void) const ITK_OVERRIDE; + NumberOfParametersType GetNumberOfLocalParameters(void) const override; /* Get total number of fixed parameters for transforms that are set * to be optimized */ - virtual NumberOfParametersType GetNumberOfFixedParameters(void) const ITK_OVERRIDE; + NumberOfParametersType GetNumberOfFixedParameters(void) const override; /** Update the transform's parameters by the values in \c update. * See GetParameters() for parameter ordering. */ - virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override; /** * Flatten the transform queue such that there are no nested composite transforms. @@ -359,7 +359,7 @@ class ITK_TEMPLATE_EXPORT CompositeTransform : * Compute the Jacobian with respect to the parameters for the compositie * transform using Jacobian rule. See comments in the implementation. */ - virtual void ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & j) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & j) const override; /** * Expanded interface to Compute the Jacobian with respect to the parameters for the compositie @@ -370,37 +370,37 @@ class ITK_TEMPLATE_EXPORT CompositeTransform : * [NDimensions, this->GetNumberOfLocalParameters() ] * jacobianWithRespectToPosition size == [ NDimensions, NDimensions ] */ - virtual void ComputeJacobianWithRespectToParametersCachedTemporaries( const InputPointType & p, JacobianType & outJacobian, JacobianType & jacobianWithRespectToPosition ) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParametersCachedTemporaries( const InputPointType & p, JacobianType & outJacobian, JacobianType & jacobianWithRespectToPosition ) const override; protected: CompositeTransform(); - virtual ~CompositeTransform() ITK_OVERRIDE; - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~CompositeTransform() override; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** Clone the current transform */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; - virtual void PushFrontTransform( TransformTypePointer t ) ITK_OVERRIDE + void PushFrontTransform( TransformTypePointer t ) override { Superclass::PushFrontTransform( t ); /* Add element to list of flags, and set true by default */ this->m_TransformsToOptimizeFlags.push_front( true ); } - virtual void PushBackTransform( TransformTypePointer t ) ITK_OVERRIDE + void PushBackTransform( TransformTypePointer t ) override { Superclass::PushBackTransform( t ); /* Add element to list of flags, and set true by default */ this->m_TransformsToOptimizeFlags.push_back( true ); } - virtual void PopFrontTransform() ITK_OVERRIDE + void PopFrontTransform() override { Superclass::PopFrontTransform(); this->m_TransformsToOptimizeFlags.pop_front(); } - virtual void PopBackTransform() ITK_OVERRIDE + void PopBackTransform() override { Superclass::PopBackTransform(); this->m_TransformsToOptimizeFlags.pop_back(); diff --git a/Modules/Core/Transform/include/itkCompositeTransform.hxx b/Modules/Core/Transform/include/itkCompositeTransform.hxx index feed3b3284c..3eb5201e51c 100644 --- a/Modules/Core/Transform/include/itkCompositeTransform.hxx +++ b/Modules/Core/Transform/include/itkCompositeTransform.hxx @@ -584,7 +584,7 @@ CompositeTransform } else { - return ITK_NULLPTR; + return nullptr; } } diff --git a/Modules/Core/Transform/include/itkElasticBodyReciprocalSplineKernelTransform.h b/Modules/Core/Transform/include/itkElasticBodyReciprocalSplineKernelTransform.h index db8f7f22263..b859152c7a0 100644 --- a/Modules/Core/Transform/include/itkElasticBodyReciprocalSplineKernelTransform.h +++ b/Modules/Core/Transform/include/itkElasticBodyReciprocalSplineKernelTransform.h @@ -84,8 +84,8 @@ class ITK_TEMPLATE_EXPORT ElasticBodyReciprocalSplineKernelTransform: protected: ElasticBodyReciprocalSplineKernelTransform(); - virtual ~ElasticBodyReciprocalSplineKernelTransform() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ElasticBodyReciprocalSplineKernelTransform() override; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef typename Superclass::GMatrixType GMatrixType; /** Compute G(x) @@ -98,7 +98,7 @@ class ITK_TEMPLATE_EXPORT ElasticBodyReciprocalSplineKernelTransform: * r(x) = Euclidean norm = sqrt[x1^2 + x2^2 + x3^2] * \f[ r(x) = \sqrt{ x_1^2 + x_2^2 + x_3^2 } \f] * I = identity matrix */ - virtual void ComputeG(const InputVectorType & landmarkVector, GMatrixType & gmatrix) const ITK_OVERRIDE; + void ComputeG(const InputVectorType & landmarkVector, GMatrixType & gmatrix) const override; /** alpha, Poisson's ratio */ TParametersValueType m_Alpha; diff --git a/Modules/Core/Transform/include/itkElasticBodySplineKernelTransform.h b/Modules/Core/Transform/include/itkElasticBodySplineKernelTransform.h index 630a3a0f772..727a433ad88 100644 --- a/Modules/Core/Transform/include/itkElasticBodySplineKernelTransform.h +++ b/Modules/Core/Transform/include/itkElasticBodySplineKernelTransform.h @@ -86,8 +86,8 @@ class ITK_TEMPLATE_EXPORT ElasticBodySplineKernelTransform: protected: ElasticBodySplineKernelTransform(); - virtual ~ElasticBodySplineKernelTransform() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ElasticBodySplineKernelTransform() override; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef typename Superclass::GMatrixType GMatrixType; /** Compute G(x) @@ -101,7 +101,7 @@ class ITK_TEMPLATE_EXPORT ElasticBodySplineKernelTransform: * \f[ r(x) = \sqrt{ x_1^2 + x_2^2 + x_3^2 } \f] * I = identity matrix */ - virtual void ComputeG(const InputVectorType & landmarkVector, GMatrixType & gmatrix) const ITK_OVERRIDE; + void ComputeG(const InputVectorType & landmarkVector, GMatrixType & gmatrix) const override; /** alpha, Alpha is related to Poisson's Ratio (\f$\nu\f$) as * \f$ \alpha = 12 ( 1 - \nu ) - 1\f$ diff --git a/Modules/Core/Transform/include/itkEuler2DTransform.h b/Modules/Core/Transform/include/itkEuler2DTransform.h index 9f00fdb14f2..6208c7a3745 100644 --- a/Modules/Core/Transform/include/itkEuler2DTransform.h +++ b/Modules/Core/Transform/include/itkEuler2DTransform.h @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT Euler2DTransform: bool GetInverse(Self *inverse) const; /** Return an inverse of this transform. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; /** * This method creates and returns a new Euler2DTransform object @@ -117,9 +117,9 @@ class ITK_TEMPLATE_EXPORT Euler2DTransform: protected: Euler2DTransform(unsigned int parametersDimension); Euler2DTransform(); - ~Euler2DTransform() ITK_OVERRIDE {} + ~Euler2DTransform() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Euler2DTransform); diff --git a/Modules/Core/Transform/include/itkEuler2DTransform.hxx b/Modules/Core/Transform/include/itkEuler2DTransform.hxx index 90890935036..73a2610d77d 100644 --- a/Modules/Core/Transform/include/itkEuler2DTransform.hxx +++ b/Modules/Core/Transform/include/itkEuler2DTransform.hxx @@ -70,7 +70,7 @@ Euler2DTransform { Pointer inv = New(); - return GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR; + return GetInverse(inv) ? inv.GetPointer() : nullptr; } // Create and return an inverse transformation diff --git a/Modules/Core/Transform/include/itkEuler3DTransform.h b/Modules/Core/Transform/include/itkEuler3DTransform.h index 19707ba536d..a2d5a0260c3 100644 --- a/Modules/Core/Transform/include/itkEuler3DTransform.h +++ b/Modules/Core/Transform/include/itkEuler3DTransform.h @@ -91,12 +91,12 @@ class ITK_TEMPLATE_EXPORT Euler3DTransform : * This is typically used by optimizers. There are 6 parameters. The first * three represent the angles to rotate around the coordinate axis, and the * last three represents the offset. */ - void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; - const ParametersType & GetParameters(void) const ITK_OVERRIDE; + const ParametersType & GetParameters(void) const override; - const FixedParametersType & GetFixedParameters() const ITK_OVERRIDE; - virtual void SetFixedParameters(const FixedParametersType & parameters) ITK_OVERRIDE; + const FixedParametersType & GetFixedParameters() const override; + void SetFixedParameters(const FixedParametersType & parameters) override; /** Set the rotational part of the transform. */ void SetRotation(ScalarType angleX, ScalarType angleY, ScalarType angleZ); @@ -109,7 +109,7 @@ class ITK_TEMPLATE_EXPORT Euler3DTransform : * given point or vector, returning the transformed point or * vector. The rank of the Jacobian will also indicate if the * transform is invertible at this point. */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; /** The Euler angle representation of a rotation is not unique and * depends on the order of rotations. In general there are 12 @@ -120,24 +120,24 @@ class ITK_TEMPLATE_EXPORT Euler3DTransform : virtual void SetComputeZYX (const bool flag); itkGetConstMacro(ComputeZYX, bool); - virtual void SetIdentity(void) ITK_OVERRIDE; + void SetIdentity(void) override; protected: Euler3DTransform(const MatrixType & matrix, const OutputPointType & offset); Euler3DTransform(unsigned int paramsSpaceDims); Euler3DTransform(); - ~Euler3DTransform() ITK_OVERRIDE {} + ~Euler3DTransform() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Set values of angles directly without recomputing other parameters. */ void SetVarRotation(ScalarType angleX, ScalarType angleY, ScalarType angleZ); /** Compute the components of the rotation matrix in the superclass. */ - void ComputeMatrix(void) ITK_OVERRIDE; + void ComputeMatrix(void) override; - void ComputeMatrixParameters(void) ITK_OVERRIDE; + void ComputeMatrixParameters(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Euler3DTransform); diff --git a/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.h b/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.h index 60d920fd262..d1707ac36d9 100644 --- a/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.h +++ b/Modules/Core/Transform/include/itkFixedCenterOfRotationAffineTransform.h @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT FixedCenterOfRotationAffineTransform: FixedCenterOfRotationAffineTransform(); /** Destroy an FixedCenterOfRotationAffineTransform object */ - virtual ~FixedCenterOfRotationAffineTransform() ITK_OVERRIDE; + ~FixedCenterOfRotationAffineTransform() override; private: FixedCenterOfRotationAffineTransform(const Self & other); diff --git a/Modules/Core/Transform/include/itkIdentityTransform.h b/Modules/Core/Transform/include/itkIdentityTransform.h index ff616569a00..b833db22acd 100644 --- a/Modules/Core/Transform/include/itkIdentityTransform.h +++ b/Modules/Core/Transform/include/itkIdentityTransform.h @@ -111,35 +111,35 @@ class ITK_TEMPLATE_EXPORT IdentityTransform : public Transformm_IdentityJacobian; } @@ -183,8 +183,8 @@ class ITK_TEMPLATE_EXPORT IdentityTransform : public TransformNew().GetPointer(); } @@ -212,30 +212,30 @@ class ITK_TEMPLATE_EXPORT IdentityTransform : public Transformm_FixedParameters; } /** Set the fixed parameters and update internal transformation. */ - virtual void SetFixedParameters(const FixedParametersType &) ITK_OVERRIDE + void SetFixedParameters(const FixedParametersType &) override { } /** Get the Parameters. */ - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return this->m_Parameters; } /** Set the fixed parameters and update internal transformation. */ - virtual void SetParameters(const ParametersType &) ITK_OVERRIDE + void SetParameters(const ParametersType &) override { } @@ -248,7 +248,7 @@ class ITK_TEMPLATE_EXPORT IdentityTransform : public Transformm_IdentityJacobian.Fill(0.0); } - virtual ~IdentityTransform() ITK_OVERRIDE {} + ~IdentityTransform() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(IdentityTransform); diff --git a/Modules/Core/Transform/include/itkKernelTransform.h b/Modules/Core/Transform/include/itkKernelTransform.h index 324b8c3bc15..8e374fb8893 100644 --- a/Modules/Core/Transform/include/itkKernelTransform.h +++ b/Modules/Core/Transform/include/itkKernelTransform.h @@ -141,23 +141,23 @@ class ITK_TEMPLATE_EXPORT KernelTransform : void ComputeWMatrix(); /** Compute the position of point in the new space */ - virtual OutputPointType TransformPoint(const InputPointType & thisPoint) const ITK_OVERRIDE; + OutputPointType TransformPoint(const InputPointType & thisPoint) const override; /** These vector transforms are not implemented for this transform */ using Superclass::TransformVector; - virtual OutputVectorType TransformVector(const InputVectorType &) const ITK_OVERRIDE + OutputVectorType TransformVector(const InputVectorType &) const override { itkExceptionMacro( << "TransformVector(const InputVectorType &) is not implemented for KernelTransform"); } - virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &) const ITK_OVERRIDE + OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override { itkExceptionMacro( << "TransformVector(const InputVnlVectorType &) is not implemented for KernelTransform"); } /** Method to transform a CovariantVector. */ using Superclass::TransformCovariantVector; - virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const ITK_OVERRIDE + OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override { itkExceptionMacro( << "TransformCovariantVector(const InputCovariantVectorType &) is not implemented for KernelTransform"); } @@ -166,10 +166,10 @@ class ITK_TEMPLATE_EXPORT KernelTransform : typedef vnl_matrix_fixed IMatrixType; /** Compute the Jacobian Matrix of the transformation at one point */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; - virtual void ComputeJacobianWithRespectToPosition(const InputPointType &, - JacobianType &) const ITK_OVERRIDE + void ComputeJacobianWithRespectToPosition(const InputPointType &, + JacobianType &) const override { itkExceptionMacro( "ComputeJacobianWithRespectToPosition not yet implemented " "for " << this->GetNameOfClass() ); @@ -179,28 +179,28 @@ class ITK_TEMPLATE_EXPORT KernelTransform : * The parameters represent the source landmarks. Each landmark point is * represented by NDimensions doubles. All the landmarks are concatenated to * form one flat Array. */ - virtual void SetParameters(const ParametersType &) ITK_OVERRIDE; + void SetParameters(const ParametersType &) override; /** Set Transform Fixed Parameters: * To support the transform file writer this function was * added to set the target landmarks similar to the * SetParameters function setting the source landmarks */ - virtual void SetFixedParameters(const FixedParametersType &) ITK_OVERRIDE; + void SetFixedParameters(const FixedParametersType &) override; /** Update the Parameters array from the landmarks corrdinates. */ virtual void UpdateParameters() const; /** Get the Transformation Parameters - Gets the Source Landmarks */ - virtual const ParametersType & GetParameters() const ITK_OVERRIDE; + const ParametersType & GetParameters() const override; /** Get Transform Fixed Parameters - Gets the Target Landmarks */ - virtual const FixedParametersType & GetFixedParameters() const ITK_OVERRIDE; + const FixedParametersType & GetFixedParameters() const override; /** This transform is not linear, because the transformation of a linear * combination of points is not equal to the linear combination of the * transformations of individual points */ - virtual TransformCategoryType GetTransformCategory() const ITK_OVERRIDE + TransformCategoryType GetTransformCategory() const override { return Self::Spline; } @@ -220,8 +220,8 @@ class ITK_TEMPLATE_EXPORT KernelTransform : protected: KernelTransform(); - virtual ~KernelTransform() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~KernelTransform() override; + void PrintSelf(std::ostream & os, Indent indent) const override; public: /** 'G' matrix typedef. */ diff --git a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h index a98724d3e22..9e99a4942ea 100644 --- a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h +++ b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.h @@ -220,7 +220,7 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase : /** Indicates the category transform. * e.g. an affine transform, or a local one, e.g. a deformation field. */ - virtual TransformCategoryType GetTransformCategory() const ITK_OVERRIDE + TransformCategoryType GetTransformCategory() const override { return Self::Linear; } @@ -345,16 +345,16 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase : * The first (NOutputDimension x NInputDimension) parameters define the * matrix and the last NOutputDimension parameters the translation. * Offset is updated based on current center. */ - void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; /** Get the Transformation Parameters. */ - const ParametersType & GetParameters() const ITK_OVERRIDE; + const ParametersType & GetParameters() const override; /** Set the fixed parameters and update internal transformation. */ - virtual void SetFixedParameters(const FixedParametersType &) ITK_OVERRIDE; + void SetFixedParameters(const FixedParametersType &) override; /** Get the Fixed Parameters. */ - virtual const FixedParametersType & GetFixedParameters() const ITK_OVERRIDE; + const FixedParametersType & GetFixedParameters() const override; /** Compose with another MatrixOffsetTransformBase * @@ -377,32 +377,32 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase : * an affine point, whereas the TransformVector method transforms * its argument as a vector. */ - OutputPointType TransformPoint(const InputPointType & point) const ITK_OVERRIDE; + OutputPointType TransformPoint(const InputPointType & point) const override; using Superclass::TransformVector; - OutputVectorType TransformVector(const InputVectorType & vector) const ITK_OVERRIDE; + OutputVectorType TransformVector(const InputVectorType & vector) const override; - OutputVnlVectorType TransformVector(const InputVnlVectorType & vector) const ITK_OVERRIDE; + OutputVnlVectorType TransformVector(const InputVnlVectorType & vector) const override; - OutputVectorPixelType TransformVector(const InputVectorPixelType & vector) const ITK_OVERRIDE; + OutputVectorPixelType TransformVector(const InputVectorPixelType & vector) const override; using Superclass::TransformCovariantVector; - OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType & vector) const ITK_OVERRIDE; + OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType & vector) const override; - OutputVectorPixelType TransformCovariantVector(const InputVectorPixelType & vector) const ITK_OVERRIDE; + OutputVectorPixelType TransformCovariantVector(const InputVectorPixelType & vector) const override; using Superclass::TransformDiffusionTensor3D; - OutputDiffusionTensor3DType TransformDiffusionTensor3D(const InputDiffusionTensor3DType & tensor) const ITK_OVERRIDE; + OutputDiffusionTensor3DType TransformDiffusionTensor3D(const InputDiffusionTensor3DType & tensor) const override; - OutputVectorPixelType TransformDiffusionTensor3D(const InputVectorPixelType & tensor ) const ITK_OVERRIDE; + OutputVectorPixelType TransformDiffusionTensor3D(const InputVectorPixelType & tensor ) const override; using Superclass::TransformSymmetricSecondRankTensor; - OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor( const InputSymmetricSecondRankTensorType & tensor ) const ITK_OVERRIDE; + OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor( const InputSymmetricSecondRankTensorType & tensor ) const override; - OutputVectorPixelType TransformSymmetricSecondRankTensor( const InputVectorPixelType & tensor ) const ITK_OVERRIDE; + OutputVectorPixelType TransformSymmetricSecondRankTensor( const InputVectorPixelType & tensor ) const override; /** Compute the Jacobian of the transformation * @@ -413,17 +413,17 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase : * Get local Jacobian for the given point * \c j will sized properly as needed. */ - virtual void ComputeJacobianWithRespectToParameters(const InputPointType & x, JacobianType & j) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters(const InputPointType & x, JacobianType & j) const override; /** Get the jacobian with respect to position. This simply returns * the current Matrix. jac will be resized as needed, but it's * more efficient if it's already properly sized. */ - virtual void ComputeJacobianWithRespectToPosition(const InputPointType & x, JacobianType & jac) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToPosition(const InputPointType & x, JacobianType & jac) const override; /** Get the jacobian with respect to position. This simply returns * the inverse of the current Matrix. jac will be resized as needed, but it's * more efficient if it's already properly sized. */ - virtual void ComputeInverseJacobianWithRespectToPosition(const InputPointType & x, JacobianType & jac) const ITK_OVERRIDE; + void ComputeInverseJacobianWithRespectToPosition(const InputPointType & x, JacobianType & jac) const override; /** Create inverse of an affine transformation * @@ -446,14 +446,14 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase : bool GetInverse(Self *inverse) const; /** Return an inverse of this transform. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; /** Indicates that this transform is linear. That is, given two * points P and Q, and scalar coefficients a and b, then * * T( a*P + b*Q ) = a * T(P) + b * T(Q) */ - virtual bool IsLinear() const ITK_OVERRIDE + bool IsLinear() const override { return true; } @@ -476,10 +476,10 @@ class ITK_TEMPLATE_EXPORT MatrixOffsetTransformBase : MatrixOffsetTransformBase(); /** Destroy an MatrixOffsetTransformBase object */ - virtual ~MatrixOffsetTransformBase() ITK_OVERRIDE; + ~MatrixOffsetTransformBase() override; /** Print contents of an MatrixOffsetTransformBase */ - virtual void PrintSelf(std::ostream & s, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & s, Indent indent) const override; const InverseMatrixType & GetVarInverseMatrix() const { diff --git a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx index 237701224fc..ef727fcc80f 100644 --- a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx +++ b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx @@ -525,7 +525,7 @@ MatrixOffsetTransformBase { Pointer inv = New(); - return GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR; + return GetInverse(inv) ? inv.GetPointer() : nullptr; } diff --git a/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.h b/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.h index 26e224c1bdf..d156d131519 100644 --- a/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.h +++ b/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.h @@ -127,14 +127,14 @@ class ITK_TEMPLATE_EXPORT Rigid3DPerspectiveTransform : * This is typically used by optimizers. * There are 6 parameters. The first three represent the * versor and the last three represents the offset. */ - void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; - const ParametersType & GetParameters() const ITK_OVERRIDE; + const ParametersType & GetParameters() const override; /** Set the fixed parameters and update internal * transformation. This transform has no fixed paramaters */ - virtual void SetFixedParameters(const FixedParametersType &) ITK_OVERRIDE + void SetFixedParameters(const FixedParametersType &) override { } @@ -172,18 +172,18 @@ class ITK_TEMPLATE_EXPORT Rigid3DPerspectiveTransform : /** Transform by a Rigid3DPerspectiveTransform. This method * applies the transform given by self to a * given point, returning the transformed point. */ - OutputPointType TransformPoint(const InputPointType & point) const ITK_OVERRIDE; + OutputPointType TransformPoint(const InputPointType & point) const override; /** These vector transforms are not implemented for this transform */ using Superclass::TransformVector; - virtual OutputVectorType TransformVector(const InputVectorType &) const ITK_OVERRIDE + OutputVectorType TransformVector(const InputVectorType &) const override { itkExceptionMacro( << "TransformVector(const InputVectorType &) is not implemented for Rigid3DPerspectiveTransform"); } - virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &) const ITK_OVERRIDE + OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override { itkExceptionMacro( << "TransformVector(const InputVnlVectorType &) is not implemented for Rigid3DPerspectiveTransform"); @@ -191,7 +191,7 @@ class ITK_TEMPLATE_EXPORT Rigid3DPerspectiveTransform : using Superclass::TransformCovariantVector; - virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const ITK_OVERRIDE + OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override { itkExceptionMacro( << @@ -209,10 +209,10 @@ class ITK_TEMPLATE_EXPORT Rigid3DPerspectiveTransform : /** Compute the Jacobian Matrix of the transformation at one point, * allowing for thread-safety. */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; - virtual void ComputeJacobianWithRespectToPosition(const InputPointType &, - JacobianType &) const ITK_OVERRIDE + void ComputeJacobianWithRespectToPosition(const InputPointType &, + JacobianType &) const override { itkExceptionMacro( "ComputeJacobianWithRespectToPosition not yet implemented " "for " << this->GetNameOfClass() ); @@ -228,8 +228,8 @@ class ITK_TEMPLATE_EXPORT Rigid3DPerspectiveTransform : protected: Rigid3DPerspectiveTransform(); - ~Rigid3DPerspectiveTransform() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~Rigid3DPerspectiveTransform() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Rigid3DPerspectiveTransform); diff --git a/Modules/Core/Transform/include/itkRigid3DTransform.h b/Modules/Core/Transform/include/itkRigid3DTransform.h index dd7b8d5e10c..5b5b4d7156f 100644 --- a/Modules/Core/Transform/include/itkRigid3DTransform.h +++ b/Modules/Core/Transform/include/itkRigid3DTransform.h @@ -115,14 +115,14 @@ class ITK_TEMPLATE_EXPORT Rigid3DTransform: * * \sa Transform::SetParameters() * \sa Transform::SetFixedParameters() */ - virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; /** Directly set the rotation matrix of the transform. * \warning The input matrix must be orthogonal to within a specified tolerance, * else an exception is thrown. * * \sa MatrixOffsetTransformBase::SetMatrix() */ - virtual void SetMatrix(const MatrixType & matrix) ITK_OVERRIDE; + void SetMatrix(const MatrixType & matrix) override; /** Directly set the rotation matrix of the transform. * \warning The input matrix must be orthogonal to within the specified tolerance, @@ -169,12 +169,12 @@ class ITK_TEMPLATE_EXPORT Rigid3DTransform: const OutputVectorType & offset); Rigid3DTransform(unsigned int paramDim); Rigid3DTransform(); - ~Rigid3DTransform() ITK_OVERRIDE; + ~Rigid3DTransform() override; /** * Print contents of an Rigid3DTransform */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Rigid3DTransform); diff --git a/Modules/Core/Transform/include/itkScalableAffineTransform.h b/Modules/Core/Transform/include/itkScalableAffineTransform.h index 1ecd9274b5e..2a51a58886d 100644 --- a/Modules/Core/Transform/include/itkScalableAffineTransform.h +++ b/Modules/Core/Transform/include/itkScalableAffineTransform.h @@ -86,7 +86,7 @@ class ITK_TEMPLATE_EXPORT ScalableAffineTransform: /** Set the transformation to an Identity * * This sets the matrix to identity and the Offset to null. */ - void SetIdentity(void) ITK_OVERRIDE; + void SetIdentity(void) override; /** Set the scale of the transform */ virtual void SetScale(const InputVectorType & scale); @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT ScalableAffineTransform: bool GetInverse(Self *inverse) const; /** Return an inverse of this transform. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; protected: /** Construct an ScalableAffineTransform object @@ -127,13 +127,13 @@ class ITK_TEMPLATE_EXPORT ScalableAffineTransform: ScalableAffineTransform(unsigned int parametersDimension); ScalableAffineTransform(); - void ComputeMatrix() ITK_OVERRIDE; + void ComputeMatrix() override; /** Destroy an ScalableAffineTransform object */ - virtual ~ScalableAffineTransform() ITK_OVERRIDE; + ~ScalableAffineTransform() override; /** Print contents of an ScalableAffineTransform */ - void PrintSelf(std::ostream & s, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & s, Indent indent) const override; void SetVarScale(const double *scale) { for ( int i = 0; i < InputSpaceDimension; i++ ) { m_Scale[i] = scale[i]; } } diff --git a/Modules/Core/Transform/include/itkScalableAffineTransform.hxx b/Modules/Core/Transform/include/itkScalableAffineTransform.hxx index 4818bc7e5e6..c92655f2f0e 100644 --- a/Modules/Core/Transform/include/itkScalableAffineTransform.hxx +++ b/Modules/Core/Transform/include/itkScalableAffineTransform.hxx @@ -172,7 +172,7 @@ ScalableAffineTransform { Pointer inv = New(); - return this->GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR; + return this->GetInverse(inv) ? inv.GetPointer() : nullptr; } /** Set the scale of the transformation */ diff --git a/Modules/Core/Transform/include/itkScaleLogarithmicTransform.h b/Modules/Core/Transform/include/itkScaleLogarithmicTransform.h index 0895a46a854..a14c1e895c9 100644 --- a/Modules/Core/Transform/include/itkScaleLogarithmicTransform.h +++ b/Modules/Core/Transform/include/itkScaleLogarithmicTransform.h @@ -88,28 +88,28 @@ class ITK_TEMPLATE_EXPORT ScaleLogarithmicTransform : /** Set parameters. * This method sets the parameters for the transform * value specified by the user. */ - void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; /** Get the parameters that uniquely define the transform * This is typically used by optimizers. * There are 4 parameters. The first one represents the * rotation, the second one the scale and the last * two represent the offset. */ - const ParametersType & GetParameters(void) const ITK_OVERRIDE; + const ParametersType & GetParameters(void) const override; /** Compute the Jacobian Matrix of the transformation at one point, * allowing for thread-safety. */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; protected: /** Construct an ScaleLogarithmicTransform object. */ ScaleLogarithmicTransform(); /** Destroy an ScaleLogarithmicTransform object. */ - ~ScaleLogarithmicTransform() ITK_OVERRIDE; + ~ScaleLogarithmicTransform() override; /** Print contents of an ScaleLogarithmicTransform */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ScaleLogarithmicTransform); diff --git a/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.h b/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.h index 1f444b55fc4..f6c4e7cafcf 100644 --- a/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.h +++ b/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.h @@ -111,8 +111,8 @@ class ITK_TEMPLATE_EXPORT ScaleSkewVersor3DTransform : * Orthogonality testing is bypassed in this case. * * \sa MatrixOffsetTransformBase::SetMatrix() */ - virtual void SetMatrix(const MatrixType & matrix) ITK_OVERRIDE; - virtual void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) ITK_OVERRIDE; + void SetMatrix(const MatrixType & matrix) override; + void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) override; /** Set the transformation from a container of parameters * This is typically used by optimizers. @@ -122,9 +122,9 @@ class ITK_TEMPLATE_EXPORT ScaleSkewVersor3DTransform : * 6-8 Scale * 9-14 Skew ** */ - virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; - virtual const ParametersType & GetParameters(void) const ITK_OVERRIDE; + const ParametersType & GetParameters(void) const override; void SetScale(const ScaleVectorType & scale); @@ -134,21 +134,21 @@ class ITK_TEMPLATE_EXPORT ScaleSkewVersor3DTransform : itkGetConstReferenceMacro(Skew, SkewVectorType); - void SetIdentity() ITK_OVERRIDE; + void SetIdentity() override; /** This method computes the Jacobian matrix of the transformation. * given point or vector, returning the transformed point or * vector. The rank of the Jacobian will also indicate if the * transform is invertible at this point. */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; protected: ScaleSkewVersor3DTransform(); ScaleSkewVersor3DTransform(const MatrixType & matrix, const OutputVectorType & offset); ScaleSkewVersor3DTransform(unsigned int paramDims); - ~ScaleSkewVersor3DTransform() ITK_OVERRIDE {} + ~ScaleSkewVersor3DTransform() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void SetVarScale(const ScaleVectorType & scale) { @@ -161,9 +161,9 @@ class ITK_TEMPLATE_EXPORT ScaleSkewVersor3DTransform : } /** Compute the components of the rotation matrix in the superclass. */ - void ComputeMatrix(void) ITK_OVERRIDE; + void ComputeMatrix(void) override; - void ComputeMatrixParameters(void) ITK_OVERRIDE; + void ComputeMatrixParameters(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ScaleSkewVersor3DTransform); diff --git a/Modules/Core/Transform/include/itkScaleTransform.h b/Modules/Core/Transform/include/itkScaleTransform.h index a9162b00ca2..27d01db47d3 100644 --- a/Modules/Core/Transform/include/itkScaleTransform.h +++ b/Modules/Core/Transform/include/itkScaleTransform.h @@ -100,22 +100,22 @@ class ITK_TEMPLATE_EXPORT ScaleTransform : public MatrixOffsetTransformBase { return inv.GetPointer(); } - return ITK_NULLPTR; + return nullptr; } template diff --git a/Modules/Core/Transform/include/itkScaleVersor3DTransform.h b/Modules/Core/Transform/include/itkScaleVersor3DTransform.h index 479df53f0c1..ef35af8f5ee 100644 --- a/Modules/Core/Transform/include/itkScaleVersor3DTransform.h +++ b/Modules/Core/Transform/include/itkScaleVersor3DTransform.h @@ -97,8 +97,8 @@ class ITK_TEMPLATE_EXPORT ScaleVersor3DTransform : public VersorRigid3DTransform * Orthogonality testing is bypassed in this case. * * \sa MatrixOffsetTransformBase::SetMatrix() */ - virtual void SetMatrix(const MatrixType & matrix) ITK_OVERRIDE; - virtual void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) ITK_OVERRIDE; + void SetMatrix(const MatrixType & matrix) override; + void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) override; /** Set the transformation from a container of parameters * This is typically used by optimizers. @@ -107,9 +107,9 @@ class ITK_TEMPLATE_EXPORT ScaleVersor3DTransform : public VersorRigid3DTransform * 3-5 translation * 6-8 Scale ** */ - virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; - virtual const ParametersType & GetParameters(void) const ITK_OVERRIDE; + const ParametersType & GetParameters(void) const override; /** Set/Get the scale vector. These scale factors are associated to the axis * of coordinates. */ @@ -119,21 +119,21 @@ class ITK_TEMPLATE_EXPORT ScaleVersor3DTransform : public VersorRigid3DTransform /** Set the internal parameters of the transform in order to represent an * Identity transform. */ - void SetIdentity() ITK_OVERRIDE; + void SetIdentity() override; /** This method computes the Jacobian matrix of the transformation. * given point or vector, returning the transformed point or * vector. The rank of the Jacobian will also indicate if the * transform is invertible at this point. */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; protected: ScaleVersor3DTransform(); ScaleVersor3DTransform(const MatrixType & matrix, const OutputVectorType & offset); ScaleVersor3DTransform(unsigned int paramDims); - ~ScaleVersor3DTransform() ITK_OVERRIDE; + ~ScaleVersor3DTransform() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void SetVarScale(const ScaleVectorType & scale) { @@ -141,9 +141,9 @@ class ITK_TEMPLATE_EXPORT ScaleVersor3DTransform : public VersorRigid3DTransform } /** Compute the components of the rotation matrix in the superclass. */ - void ComputeMatrix(void) ITK_OVERRIDE; + void ComputeMatrix(void) override; - void ComputeMatrixParameters(void) ITK_OVERRIDE; + void ComputeMatrixParameters(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ScaleVersor3DTransform); diff --git a/Modules/Core/Transform/include/itkSimilarity2DTransform.h b/Modules/Core/Transform/include/itkSimilarity2DTransform.h index 1d0065e443b..08a7e2d3ac8 100644 --- a/Modules/Core/Transform/include/itkSimilarity2DTransform.h +++ b/Modules/Core/Transform/include/itkSimilarity2DTransform.h @@ -136,7 +136,7 @@ class ITK_TEMPLATE_EXPORT Similarity2DTransform : * * \sa Transform::SetParameters() * \sa Transform::SetFixedParameters() */ - virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; /** Get the parameters that uniquely define the transform * This is typically used by optimizers. @@ -147,15 +147,15 @@ class ITK_TEMPLATE_EXPORT Similarity2DTransform : * * \sa Transform::GetParameters() * \sa Transform::GetFixedParameters() */ - virtual const ParametersType & GetParameters() const ITK_OVERRIDE; + const ParametersType & GetParameters() const override; /** This method computes the Jacobian matrix of the transformation * at a given input point. */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; /** Set the transformation to an identity. */ - virtual void SetIdentity() ITK_OVERRIDE; + void SetIdentity() override; /** * This method creates and returns a new Similarity2DTransform object @@ -167,7 +167,7 @@ class ITK_TEMPLATE_EXPORT Similarity2DTransform : bool GetInverse(Self *inverse) const; /** Return an inverse of this transform. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; /** * This method creates and returns a new Similarity2DTransform object @@ -188,7 +188,7 @@ class ITK_TEMPLATE_EXPORT Similarity2DTransform : * \sa MatrixOffsetTransformBase::SetMatrix() * */ - virtual void SetMatrix(const MatrixType & matrix) ITK_OVERRIDE; + void SetMatrix(const MatrixType & matrix) override; /** * Set the rotation Matrix of a Similarity 2D Transform @@ -203,26 +203,26 @@ class ITK_TEMPLATE_EXPORT Similarity2DTransform : * \sa MatrixOffsetTransformBase::SetMatrix() * */ - virtual void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) ITK_OVERRIDE; + void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) override; protected: Similarity2DTransform(unsigned int outputSpaceDimension, unsigned int parametersDimension); Similarity2DTransform(unsigned int parametersDimension); Similarity2DTransform(); - ~Similarity2DTransform() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~Similarity2DTransform() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Compute matrix from angle and scale. This is used in Set methods * to update the underlying matrix whenever a transform parameter * is changed. */ - virtual void ComputeMatrix(void) ITK_OVERRIDE; + void ComputeMatrix(void) override; /** Compute the angle and scale from the matrix. This is used to compute * transform parameters from a given matrix. This is used in * MatrixOffsetTransformBase::Compose() and * MatrixOffsetTransformBase::GetInverse(). */ - virtual void ComputeMatrixParameters(void) ITK_OVERRIDE; + void ComputeMatrixParameters(void) override; /** Set the scale without updating underlying variables. */ void SetVarScale(ScaleType scale) diff --git a/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx b/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx index 3a4cc8b709c..15c81ac87af 100644 --- a/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx +++ b/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx @@ -268,7 +268,7 @@ Similarity2DTransform { return inv.GetPointer(); } - return ITK_NULLPTR; + return nullptr; } diff --git a/Modules/Core/Transform/include/itkSimilarity3DTransform.h b/Modules/Core/Transform/include/itkSimilarity3DTransform.h index d8c5d64908b..c107cebe0a7 100644 --- a/Modules/Core/Transform/include/itkSimilarity3DTransform.h +++ b/Modules/Core/Transform/include/itkSimilarity3DTransform.h @@ -92,7 +92,7 @@ class ITK_TEMPLATE_EXPORT Similarity3DTransform : typedef TParametersValueType ScaleType; /** Set the parameters to the IdentityTransform */ - virtual void SetIdentity(void) ITK_OVERRIDE; + void SetIdentity(void) override; /** Directly set the rotation matrix of the transform. * @@ -100,7 +100,7 @@ class ITK_TEMPLATE_EXPORT Similarity3DTransform : * to within a specified tolerance, else an exception is thrown. * * \sa MatrixOffsetTransformBase::SetMatrix() */ - virtual void SetMatrix(const MatrixType & matrix) ITK_OVERRIDE; + void SetMatrix(const MatrixType & matrix) override; /** Directly set the rotation matrix of the transform. * @@ -108,15 +108,15 @@ class ITK_TEMPLATE_EXPORT Similarity3DTransform : * to within the specified tolerance, else an exception is thrown. * * \sa MatrixOffsetTransformBase::SetMatrix() */ - virtual void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) ITK_OVERRIDE; + void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) override; /** Set the transformation from a container of parameters This is typically * used by optimizers. There are 7 parameters. The first three represent the * versor, the next three represent the translation and the last one * represents the scaling factor. */ - void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; - virtual const ParametersType & GetParameters(void) const ITK_OVERRIDE; + const ParametersType & GetParameters(void) const override; /** Set/Get the value of the isotropic scaling factor */ void SetScale(ScaleType scale); @@ -127,22 +127,22 @@ class ITK_TEMPLATE_EXPORT Similarity3DTransform : * given point or vector, returning the transformed point or * vector. The rank of the Jacobian will also indicate if the * transform is invertible at this point. */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; protected: Similarity3DTransform(const MatrixType & matrix, const OutputVectorType & offset); Similarity3DTransform(unsigned int paramDim); Similarity3DTransform(); - ~Similarity3DTransform() ITK_OVERRIDE {} + ~Similarity3DTransform() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Recomputes the matrix by calling the Superclass::ComputeMatrix() and then * applying the scale factor. */ - void ComputeMatrix() ITK_OVERRIDE; + void ComputeMatrix() override; /** Computes the parameters from an input matrix. */ - void ComputeMatrixParameters() ITK_OVERRIDE; + void ComputeMatrixParameters() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Similarity3DTransform); diff --git a/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.h b/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.h index 548d8079189..dd0b5950d77 100644 --- a/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.h +++ b/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.h @@ -74,7 +74,7 @@ class ITK_TEMPLATE_EXPORT ThinPlateR2LogRSplineKernelTransform: protected: ThinPlateR2LogRSplineKernelTransform() {} - virtual ~ThinPlateR2LogRSplineKernelTransform() ITK_OVERRIDE {} + ~ThinPlateR2LogRSplineKernelTransform() override {} typedef typename Superclass::GMatrixType GMatrixType; /** Compute G(x) @@ -85,12 +85,12 @@ class ITK_TEMPLATE_EXPORT ThinPlateR2LogRSplineKernelTransform: * r(x) = Euclidean norm = sqrt[x1^2 + x2^2 + x3^2] * \f[ r(x) = \sqrt{ x_1^2 + x_2^2 + x_3^2 } \f] * I = identity matrix. */ - virtual void ComputeG(const InputVectorType & landmarkVector, GMatrixType & gmatrix) const ITK_OVERRIDE; + void ComputeG(const InputVectorType & landmarkVector, GMatrixType & gmatrix) const override; /** Compute the contribution of the landmarks weighted by the kernel funcion to the global deformation of the space */ - virtual void ComputeDeformationContribution(const InputPointType & inputPoint, - OutputPointType & result) const ITK_OVERRIDE; + void ComputeDeformationContribution(const InputPointType & inputPoint, + OutputPointType & result) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ThinPlateR2LogRSplineKernelTransform); diff --git a/Modules/Core/Transform/include/itkThinPlateSplineKernelTransform.h b/Modules/Core/Transform/include/itkThinPlateSplineKernelTransform.h index 6b8db41edde..aaaa9f6cfcd 100644 --- a/Modules/Core/Transform/include/itkThinPlateSplineKernelTransform.h +++ b/Modules/Core/Transform/include/itkThinPlateSplineKernelTransform.h @@ -73,7 +73,7 @@ class ITK_TEMPLATE_EXPORT ThinPlateSplineKernelTransform: protected: ThinPlateSplineKernelTransform() {} - virtual ~ThinPlateSplineKernelTransform() ITK_OVERRIDE {} + ~ThinPlateSplineKernelTransform() override {} /** These (rather redundant) typedefs are needed because typedefs are not inherited. */ typedef typename Superclass::GMatrixType GMatrixType; @@ -86,12 +86,12 @@ class ITK_TEMPLATE_EXPORT ThinPlateSplineKernelTransform: * r(x) = Euclidean norm = sqrt[x1^2 + x2^2 + x3^2] * \f[ r(x) = \sqrt{ x_1^2 + x_2^2 + x_3^2 } \f] * I = identity matrix. */ - virtual void ComputeG(const InputVectorType & landmarkVector, GMatrixType & gmatrix) const ITK_OVERRIDE; + void ComputeG(const InputVectorType & landmarkVector, GMatrixType & gmatrix) const override; /** Compute the contribution of the landmarks weighted by the kernel funcion to the global deformation of the space */ - virtual void ComputeDeformationContribution(const InputPointType & inputPoint, - OutputPointType & result) const ITK_OVERRIDE; + void ComputeDeformationContribution(const InputPointType & inputPoint, + OutputPointType & result) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ThinPlateSplineKernelTransform); diff --git a/Modules/Core/Transform/include/itkTransform.h b/Modules/Core/Transform/include/itkTransform.h index 6baa913d3bb..3e8e9c38295 100644 --- a/Modules/Core/Transform/include/itkTransform.h +++ b/Modules/Core/Transform/include/itkTransform.h @@ -99,13 +99,13 @@ class ITK_TEMPLATE_EXPORT Transform : public TransformBaseTemplateSetParameters(p); } @@ -361,27 +361,27 @@ class ITK_TEMPLATE_EXPORT Transform : public TransformBaseTemplatem_Parameters.Size(); } @@ -435,25 +435,25 @@ class ITK_TEMPLATE_EXPORT Transform : public TransformBaseTemplate n << GetNameOfClass(); n << "_"; - n << this->GetTransformTypeAsString(static_cast(ITK_NULLPTR) ); + n << this->GetTransformTypeAsString(static_cast(nullptr) ); n << "_" << this->GetInputSpaceDimension() << "_" << this->GetOutputSpaceDimension(); return n.str(); } diff --git a/Modules/Core/Transform/include/itkTransformBase.h b/Modules/Core/Transform/include/itkTransformBase.h index a32ea4a3796..d5baccdd447 100644 --- a/Modules/Core/Transform/include/itkTransformBase.h +++ b/Modules/Core/Transform/include/itkTransformBase.h @@ -126,7 +126,7 @@ class TransformBaseTemplate:public Object protected: TransformBaseTemplate(){} - virtual ~TransformBaseTemplate() ITK_OVERRIDE {} + ~TransformBaseTemplate() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(TransformBaseTemplate); diff --git a/Modules/Core/Transform/include/itkTranslationTransform.h b/Modules/Core/Transform/include/itkTranslationTransform.h index 9e49acc1df4..7b2d38255a4 100644 --- a/Modules/Core/Transform/include/itkTranslationTransform.h +++ b/Modules/Core/Transform/include/itkTranslationTransform.h @@ -108,10 +108,10 @@ class ITK_TEMPLATE_EXPORT TranslationTransform : /** This method sets the parameters for the transform * value specified by the user. */ - virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; /** Get the Transformation Parameters. */ - virtual const ParametersType & GetParameters() const ITK_OVERRIDE; + const ParametersType & GetParameters() const override; /** Set offset of an Translation Transform. * This method sets the offset of an TranslationTransform to a @@ -134,15 +134,15 @@ class ITK_TEMPLATE_EXPORT TranslationTransform : * This method applies the affine transform given by self to a * given point or vector, returning the transformed point or * vector. */ - OutputPointType TransformPoint(const InputPointType & point) const ITK_OVERRIDE; + OutputPointType TransformPoint(const InputPointType & point) const override; using Superclass::TransformVector; - OutputVectorType TransformVector(const InputVectorType & vector) const ITK_OVERRIDE; + OutputVectorType TransformVector(const InputVectorType & vector) const override; - OutputVnlVectorType TransformVector(const InputVnlVectorType & vector) const ITK_OVERRIDE; + OutputVnlVectorType TransformVector(const InputVnlVectorType & vector) const override; using Superclass::TransformCovariantVector; - OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType & vector) const ITK_OVERRIDE; + OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType & vector) const override; /** This method finds the point or vector that maps to a given * point or vector under the affine transformation defined by @@ -162,22 +162,22 @@ class ITK_TEMPLATE_EXPORT TranslationTransform : bool GetInverse(Self *inverse) const; /** Return an inverse of this transform. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; /** Compute the Jacobian Matrix of the transformation at one point */ - virtual void ComputeJacobianWithRespectToParameters(const InputPointType & point, JacobianType & j) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters(const InputPointType & point, JacobianType & j) const override; /** Get the jacobian with respect to position, which simply is an identity * jacobian because the transform is position-invariant. * jac will be resized as needed, but it will be more efficient if * it is already properly sized. */ - virtual void ComputeJacobianWithRespectToPosition(const InputPointType & x, JacobianType & jac) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToPosition(const InputPointType & x, JacobianType & jac) const override; /** Set the parameters to the IdentityTransform */ void SetIdentity(); /** Return the number of parameters that completely define the Transfom */ - virtual NumberOfParametersType GetNumberOfParameters() const ITK_OVERRIDE + NumberOfParametersType GetNumberOfParameters() const override { return NDimensions; } @@ -187,7 +187,7 @@ class ITK_TEMPLATE_EXPORT TranslationTransform : * * \f[ T( a*P + b*Q ) = a * T(P) + b * T(Q) \f] */ - virtual bool IsLinear() const ITK_OVERRIDE + bool IsLinear() const override { return true; } @@ -195,7 +195,7 @@ class ITK_TEMPLATE_EXPORT TranslationTransform : /** Indicates the category transform. * e.g. an affine transform, or a local one, e.g. a deformation field. */ - virtual TransformCategoryType GetTransformCategory() const ITK_OVERRIDE + TransformCategoryType GetTransformCategory() const override { return Self::Linear; } @@ -203,14 +203,14 @@ class ITK_TEMPLATE_EXPORT TranslationTransform : /** Set the fixed parameters and update internal transformation. * The Translation Transform does not require fixed parameters, * therefore the implementation of this method is a null operation. */ - virtual void SetFixedParameters(const FixedParametersType &) ITK_OVERRIDE + void SetFixedParameters(const FixedParametersType &) override { } /** Get the Fixed Parameters. The TranslationTransform does not * require Fixed parameters, therefore this method returns an * parameters array of size zero. */ - virtual const FixedParametersType & GetFixedParameters() const ITK_OVERRIDE + const FixedParametersType & GetFixedParameters() const override { this->m_FixedParameters.SetSize(0); return this->m_FixedParameters; @@ -218,9 +218,9 @@ class ITK_TEMPLATE_EXPORT TranslationTransform : protected: TranslationTransform(); - ~TranslationTransform() ITK_OVERRIDE; + ~TranslationTransform() override; /** Print contents of an TranslationTransform. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TranslationTransform); diff --git a/Modules/Core/Transform/include/itkTranslationTransform.hxx b/Modules/Core/Transform/include/itkTranslationTransform.hxx index b231c8d0e68..d163a8da14c 100644 --- a/Modules/Core/Transform/include/itkTranslationTransform.hxx +++ b/Modules/Core/Transform/include/itkTranslationTransform.hxx @@ -184,7 +184,7 @@ TranslationTransform { Pointer inv = New(); - return GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR; + return GetInverse(inv) ? inv.GetPointer() : nullptr; } diff --git a/Modules/Core/Transform/include/itkVersorRigid3DTransform.h b/Modules/Core/Transform/include/itkVersorRigid3DTransform.h index 5de9250c131..c615e44708d 100644 --- a/Modules/Core/Transform/include/itkVersorRigid3DTransform.h +++ b/Modules/Core/Transform/include/itkVersorRigid3DTransform.h @@ -101,9 +101,9 @@ class ITK_TEMPLATE_EXPORT VersorRigid3DTransform : * This is typically used by optimizers. * There are 6 parameters. The first three represent the * versor, the last three represent the translation. */ - void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; - virtual const ParametersType & GetParameters(void) const ITK_OVERRIDE; + const ParametersType & GetParameters(void) const override; /** Update the transform's parameters by the values in \c update. * \param update must be of the same length as returned by @@ -112,21 +112,21 @@ class ITK_TEMPLATE_EXPORT VersorRigid3DTransform : * SetParameters is called at the end of this method, to allow the transform * to perform any required operations on the updated parameters - typically * a conversion to member variables for use in TransformPoint. */ - virtual void UpdateTransformParameters( const DerivativeType & update, TParametersValueType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, TParametersValueType factor = 1.0 ) override; /** This method computes the Jacobian matrix of the transformation. * given point or vector, returning the transformed point or * vector. The rank of the Jacobian will also indicate if the * transform is invertible at this point. */ - virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override; protected: VersorRigid3DTransform(const MatrixType & matrix, const OutputVectorType & offset); VersorRigid3DTransform(unsigned int paramDim); VersorRigid3DTransform(); - ~VersorRigid3DTransform() ITK_OVERRIDE {} + ~VersorRigid3DTransform() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VersorRigid3DTransform); diff --git a/Modules/Core/Transform/include/itkVersorTransform.h b/Modules/Core/Transform/include/itkVersorTransform.h index b4de2bb4df7..a1fa0cd62c5 100644 --- a/Modules/Core/Transform/include/itkVersorTransform.h +++ b/Modules/Core/Transform/include/itkVersorTransform.h @@ -101,10 +101,10 @@ class ITK_TEMPLATE_EXPORT VersorTransform : public Rigid3DTransformSetBulkTransform( ITK_NULLPTR ); + // set bulk transform to nullptr + transform->SetBulkTransform( nullptr ); // use the other version of TransformPoint typedef TransformType::WeightsType WeightsType; @@ -402,7 +402,7 @@ int itkBSplineDeformableTransformTest1() /** * Parameters should remain even when the transform has been destroyed */ - transform = ITK_NULLPTR; + transform = nullptr; if( outParametersCopy != parameters ) { diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx index e0ade606169..c2c2bfc79c2 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx @@ -40,12 +40,12 @@ class CommandProgressUpdate : public itk::Command CommandProgressUpdate() {}; public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const itk::ProcessObject * filter = dynamic_cast< const itk::ProcessObject * >( object ); if( ! itk::ProgressEvent().CheckEvent( &event ) ) diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx index 4bb7fa031d1..e8d24ff8755 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx @@ -41,12 +41,12 @@ class CommandProgressUpdate : public itk::Command CommandProgressUpdate() {}; public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const itk::ProcessObject * filter = dynamic_cast< const itk::ProcessObject * >( object ); if( ! itk::ProgressEvent().CheckEvent( &event ) ) diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest.cxx index b9b45e6d075..b279e370a93 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest.cxx @@ -439,7 +439,7 @@ int itkBSplineTransformTest1() /** * Parameters should remain even when the transform has been destroyed */ - transform = ITK_NULLPTR; + transform = nullptr; if( outParametersCopy != parameters ) { diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx index c63ad4490f0..5910076c45a 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx @@ -40,12 +40,12 @@ class CommandProgressUpdate : public itk::Command CommandProgressUpdate() {}; public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const itk::ProcessObject * filter = dynamic_cast< const itk::ProcessObject * >( object ); if( ! itk::ProgressEvent().CheckEvent( &event ) ) diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx index 185ae260324..e30bf470034 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx @@ -40,12 +40,12 @@ class CommandProgressUpdate : public itk::Command CommandProgressUpdate() {}; public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const itk::ProcessObject * filter = dynamic_cast< const itk::ProcessObject * >( object ); if( ! itk::ProgressEvent().CheckEvent( &event ) ) diff --git a/Modules/Core/Transform/test/itkIdentityTransformTest.cxx b/Modules/Core/Transform/test/itkIdentityTransformTest.cxx index 527c023db62..9b5e63ddf97 100644 --- a/Modules/Core/Transform/test/itkIdentityTransformTest.cxx +++ b/Modules/Core/Transform/test/itkIdentityTransformTest.cxx @@ -171,7 +171,7 @@ int itkIdentityTransformTest(int, char *[] ) IdentityTransformType::Pointer inv = IdentityTransformType::New(); TEST_EXPECT_TRUE(transform->GetInverse(inv.GetPointer())); - TEST_EXPECT_TRUE(!transform->GetInverse(ITK_NULLPTR)); + TEST_EXPECT_TRUE(!transform->GetInverse(nullptr)); return EXIT_SUCCESS; diff --git a/Modules/Core/Transform/test/itkMultiTransformTest.cxx b/Modules/Core/Transform/test/itkMultiTransformTest.cxx index 859bc653715..3f63688084a 100644 --- a/Modules/Core/Transform/test/itkMultiTransformTest.cxx +++ b/Modules/Core/Transform/test/itkMultiTransformTest.cxx @@ -114,12 +114,12 @@ class MultiTransformTestTransform : typedef typename Superclass::InputPointType InputPointType; typedef typename Superclass::JacobianType JacobianType; - typename Superclass::OutputPointType TransformPoint( const InputPointType & point ) const ITK_OVERRIDE + typename Superclass::OutputPointType TransformPoint( const InputPointType & point ) const override { return point; } - virtual void ComputeJacobianWithRespectToParameters(const InputPointType & itkNotUsed(p), JacobianType & itkNotUsed(jacobian) ) const ITK_OVERRIDE + void ComputeJacobianWithRespectToParameters(const InputPointType & itkNotUsed(p), JacobianType & itkNotUsed(jacobian) ) const override { itkExceptionMacro( "ComputeJacobianWithRespectToParamters( InputPointType, JacobianType" @@ -127,7 +127,7 @@ class MultiTransformTestTransform : } protected: MultiTransformTestTransform(){}; - virtual ~MultiTransformTestTransform() ITK_OVERRIDE {}; + ~MultiTransformTestTransform() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(MultiTransformTestTransform); diff --git a/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx b/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx index 1df2a989af2..b7e1f474c95 100644 --- a/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkRigid3DTransformTest.cxx @@ -39,14 +39,14 @@ class Rigid3DTransformSurrogate : public Rigid3DTransform < TScalar > typedef typename Superclass::InverseTransformBaseType InverseTransformBaseType; typedef typename InverseTransformBaseType::Pointer InverseTransformBasePointer; - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE + InverseTransformBasePointer GetInverseTransform() const override { itkExceptionMacro( << "This is never called." ); } private: Rigid3DTransformSurrogate() {} - ~Rigid3DTransformSurrogate() ITK_OVERRIDE {} + ~Rigid3DTransformSurrogate() override {} }; diff --git a/Modules/Core/Transform/test/itkTransformTest.cxx b/Modules/Core/Transform/test/itkTransformTest.cxx index b6a7a3bb1f0..e56869f98bf 100644 --- a/Modules/Core/Transform/test/itkTransformTest.cxx +++ b/Modules/Core/Transform/test/itkTransformTest.cxx @@ -62,7 +62,7 @@ class TransformTestHelper : typedef typename Superclass::OutputSymmetricSecondRankTensorType OutputSymmetricSecondRankTensorType; - virtual OutputPointType TransformPoint(const InputPointType & itkNotUsed(inputPoint) ) const ITK_OVERRIDE + OutputPointType TransformPoint(const InputPointType & itkNotUsed(inputPoint) ) const override { OutputPointType outPoint; outPoint.Fill( 22.0 ); @@ -70,20 +70,20 @@ class TransformTestHelper : } using Superclass::TransformVector; - virtual OutputVectorType TransformVector(const InputVectorType & itkNotUsed(inputVector) ) const ITK_OVERRIDE + OutputVectorType TransformVector(const InputVectorType & itkNotUsed(inputVector) ) const override { OutputVectorType outVector; outVector.Fill( 12.2 ); return outVector; } - virtual OutputVnlVectorType TransformVector(const InputVnlVectorType & itkNotUsed(inputVector) ) const ITK_OVERRIDE + OutputVnlVectorType TransformVector(const InputVnlVectorType & itkNotUsed(inputVector) ) const override { OutputVnlVectorType outVector( 15.0 ); return outVector; } - virtual OutputVectorPixelType TransformVector(const InputVectorPixelType & itkNotUsed(inputVector) ) const ITK_OVERRIDE + OutputVectorPixelType TransformVector(const InputVectorPixelType & itkNotUsed(inputVector) ) const override { OutputVectorPixelType outVector; outVector.Fill( 88.8 ); @@ -91,14 +91,14 @@ class TransformTestHelper : } using Superclass::TransformCovariantVector; - virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType & itkNotUsed(inputVector) ) const ITK_OVERRIDE + OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType & itkNotUsed(inputVector) ) const override { OutputCovariantVectorType outVector; outVector.Fill( 8.9 ); return outVector; } - virtual OutputVectorPixelType TransformCovariantVector(const InputVectorPixelType & itkNotUsed(inputVector) ) const ITK_OVERRIDE + OutputVectorPixelType TransformCovariantVector(const InputVectorPixelType & itkNotUsed(inputVector) ) const override { OutputVectorPixelType outVector; outVector.Fill( 6.9 ); @@ -106,14 +106,14 @@ class TransformTestHelper : } using Superclass::TransformDiffusionTensor3D; - virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D( const InputDiffusionTensor3DType & itkNotUsed( tensor ) ) const ITK_OVERRIDE + OutputDiffusionTensor3DType TransformDiffusionTensor3D( const InputDiffusionTensor3DType & itkNotUsed( tensor ) ) const override { OutputDiffusionTensor3DType outTensor; outTensor.Fill( 2.1 ); return outTensor; } - virtual OutputVectorPixelType TransformDiffusionTensor3D( const InputVectorPixelType & itkNotUsed( tensor ) ) const ITK_OVERRIDE + OutputVectorPixelType TransformDiffusionTensor3D( const InputVectorPixelType & itkNotUsed( tensor ) ) const override { OutputVectorPixelType outTensor; outTensor.Fill( 29.1 ); @@ -121,40 +121,40 @@ class TransformTestHelper : } using Superclass::TransformSymmetricSecondRankTensor; - virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor( - const InputSymmetricSecondRankTensorType & itkNotUsed( tensor ) ) const ITK_OVERRIDE + OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor( + const InputSymmetricSecondRankTensorType & itkNotUsed( tensor ) ) const override { OutputSymmetricSecondRankTensorType outTensor; outTensor.Fill( 10.0 ); return outTensor; } - virtual OutputVectorPixelType TransformSymmetricSecondRankTensor( - const InputVectorPixelType & itkNotUsed( tensor ) ) const ITK_OVERRIDE + OutputVectorPixelType TransformSymmetricSecondRankTensor( + const InputVectorPixelType & itkNotUsed( tensor ) ) const override { OutputVectorPixelType outTensor; outTensor.Fill( 55.9 ); return outTensor; } - virtual void SetParameters(const ParametersType &) ITK_OVERRIDE + void SetParameters(const ParametersType &) override { } - virtual void SetFixedParameters(const ParametersType &) ITK_OVERRIDE + void SetFixedParameters(const ParametersType &) override { } - virtual void ComputeJacobianWithRespectToParameters(const InputPointType &, - JacobianType & jacobian) const ITK_OVERRIDE + void ComputeJacobianWithRespectToParameters(const InputPointType &, + JacobianType & jacobian) const override { jacobian.SetSize(3, 6); jacobian.Fill(1); } - virtual void ComputeJacobianWithRespectToPosition( + void ComputeJacobianWithRespectToPosition( const InputPointType &, - JacobianType & jacobian ) const ITK_OVERRIDE + JacobianType & jacobian ) const override { jacobian.SetSize(NOutputDimensions, NInputDimensions); jacobian.Fill(1); diff --git a/Modules/Core/Transform/test/itkTransformsSetParametersTest.cxx b/Modules/Core/Transform/test/itkTransformsSetParametersTest.cxx index 638377bdaf9..c95cb452881 100644 --- a/Modules/Core/Transform/test/itkTransformsSetParametersTest.cxx +++ b/Modules/Core/Transform/test/itkTransformsSetParametersTest.cxx @@ -444,26 +444,26 @@ int itkTransformsSetParametersTest( int , char *[] ) TestKernelTransform ("ElasticBodyReciprocalSplineKernelTransform->SetParameters() -", - static_cast *>(ITK_NULLPTR)); + static_cast *>(nullptr)); TestKernelTransform ("ElasticBodySplineKernelTransform->SetParameters() - ", - static_cast *>(ITK_NULLPTR)); + static_cast *>(nullptr)); TestKernelTransform ("KernelTransform->SetParameters() - ", - static_cast *>(ITK_NULLPTR)); + static_cast *>(nullptr)); TestKernelTransform ("ThinPlateR2LogRSplineKernelTransform->SetParameters() - ", - static_cast *>(ITK_NULLPTR)); + static_cast *>(nullptr)); TestKernelTransform ("ThinPlateSplineKernelTransform->SetParameters() - ", - static_cast *>(ITK_NULLPTR)); + static_cast *>(nullptr)); TestKernelTransform ("VolumeSplineKernelTransform->SetParameters() - ", - static_cast *>(ITK_NULLPTR)); + static_cast *>(nullptr)); std::cout << std::endl << "Done." << std::endl; diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h index c9efd9b1a49..366cad56785 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h @@ -205,20 +205,20 @@ class ITK_TEMPLATE_EXPORT AnisotropicDiffusionFunction: /** Returns the time step supplied by the user. We don't need to use the * global data supplied since we are returning a fixed value. */ - virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE + TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const override { return this->GetTimeStep(); } /** The anisotropic diffusion classes don't use this particular parameter * so it's safe to return a null value. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { - return ITK_NULLPTR; + return nullptr; } /** Does nothing. No global data is used in this class of equations. */ - virtual void ReleaseGlobalDataPointer( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE + void ReleaseGlobalDataPointer( void *itkNotUsed(GlobalData) ) const override { /* do nothing */ } @@ -231,9 +231,9 @@ class ITK_TEMPLATE_EXPORT AnisotropicDiffusionFunction: m_TimeStep = 0.125f; // default value } - ~AnisotropicDiffusionFunction() ITK_OVERRIDE {} + ~AnisotropicDiffusionFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "TimeStep: " << m_TimeStep << std::endl; diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.h b/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.h index 2d824c789e5..4b64d42de65 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.h @@ -135,15 +135,15 @@ class ITK_TEMPLATE_EXPORT AnisotropicDiffusionImageFilter: protected: AnisotropicDiffusionImageFilter(); - ~AnisotropicDiffusionImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~AnisotropicDiffusionImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Supplies the halting criteria for this class of filters. The * algorithm will stop after a user-specified number of iterations. */ // virtual bool Halt(); /** Prepare for the iteration process. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; bool m_GradientMagnitudeIsFixed; diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureAnisotropicDiffusionImageFilter.h b/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureAnisotropicDiffusionImageFilter.h index ba06d1b23eb..0d216b41827 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureAnisotropicDiffusionImageFilter.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureAnisotropicDiffusionImageFilter.h @@ -95,9 +95,9 @@ class CurvatureAnisotropicDiffusionImageFilter: this->SetDifferenceFunction(q); } - ~CurvatureAnisotropicDiffusionImageFilter() ITK_OVERRIDE {} + ~CurvatureAnisotropicDiffusionImageFilter() override {} - virtual void InitializeIteration() ITK_OVERRIDE + void InitializeIteration() override { Superclass::InitializeIteration(); if ( this->GetTimeStep() > 0.5 / std::pow( 2.0, static_cast< double >( ImageDimension ) ) ) diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.h index 722aff3376f..0ff9b52070c 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.h @@ -103,13 +103,13 @@ class ITK_TEMPLATE_EXPORT CurvatureNDAnisotropicDiffusionFunction: itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension); /** Compute incremental update. */ - virtual PixelType ComputeUpdate(const NeighborhoodType & neighborhood, + PixelType ComputeUpdate(const NeighborhoodType & neighborhood, void *globalData, const FloatOffsetType & offset = FloatOffsetType(0.0) - ) ITK_OVERRIDE; + ) override; /** This method is called prior to each iteration of the solver. */ - virtual void InitializeIteration() ITK_OVERRIDE + void InitializeIteration() override { m_K = static_cast< PixelType >( this->GetAverageGradientMagnitudeSquared() * this->GetConductanceParameter() @@ -118,7 +118,7 @@ class ITK_TEMPLATE_EXPORT CurvatureNDAnisotropicDiffusionFunction: protected: CurvatureNDAnisotropicDiffusionFunction(); - ~CurvatureNDAnisotropicDiffusionFunction() ITK_OVERRIDE {} + ~CurvatureNDAnisotropicDiffusionFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(CurvatureNDAnisotropicDiffusionFunction); diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkGradientAnisotropicDiffusionImageFilter.h b/Modules/Filtering/AnisotropicSmoothing/include/itkGradientAnisotropicDiffusionImageFilter.h index ff6b59350f4..41fea99e153 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkGradientAnisotropicDiffusionImageFilter.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkGradientAnisotropicDiffusionImageFilter.h @@ -86,7 +86,7 @@ class ITK_TEMPLATE_EXPORT GradientAnisotropicDiffusionImageFilter: this->SetDifferenceFunction(p); } - ~GradientAnisotropicDiffusionImageFilter() ITK_OVERRIDE {} + ~GradientAnisotropicDiffusionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(GradientAnisotropicDiffusionImageFilter); diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.h index e2f7d1aff67..165f27fb27f 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.h @@ -90,13 +90,13 @@ class ITK_TEMPLATE_EXPORT GradientNDAnisotropicDiffusionFunction: itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension); /** Compute the equation value. */ - virtual PixelType ComputeUpdate(const NeighborhoodType & neighborhood, + PixelType ComputeUpdate(const NeighborhoodType & neighborhood, void *globalData, const FloatOffsetType & offset = FloatOffsetType(0.0) - ) ITK_OVERRIDE; + ) override; /** This method is called prior to each iteration of the solver. */ - virtual void InitializeIteration() ITK_OVERRIDE + void InitializeIteration() override { m_K = static_cast< PixelType >( this->GetAverageGradientMagnitudeSquared() * this->GetConductanceParameter() * this->GetConductanceParameter() * -2.0f ); @@ -104,7 +104,7 @@ class ITK_TEMPLATE_EXPORT GradientNDAnisotropicDiffusionFunction: protected: GradientNDAnisotropicDiffusionFunction(); - ~GradientNDAnisotropicDiffusionFunction() ITK_OVERRIDE {} + ~GradientNDAnisotropicDiffusionFunction() override {} /** Inner product function. */ NeighborhoodInnerProduct< ImageType > m_InnerProduct; diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkScalarAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkScalarAnisotropicDiffusionFunction.h index e4a95f23e22..ac4970b82ee 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkScalarAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkScalarAnisotropicDiffusionFunction.h @@ -64,11 +64,11 @@ class ITK_TEMPLATE_EXPORT ScalarAnisotropicDiffusionFunction: itkTypeMacro(ScalarAnisotropicDiffusionFunction, AnisotropicDiffusionFunction); - virtual void CalculateAverageGradientMagnitudeSquared(TImage *) ITK_OVERRIDE; + void CalculateAverageGradientMagnitudeSquared(TImage *) override; protected: ScalarAnisotropicDiffusionFunction() {} - ~ScalarAnisotropicDiffusionFunction() ITK_OVERRIDE {} + ~ScalarAnisotropicDiffusionFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarAnisotropicDiffusionFunction); diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorAnisotropicDiffusionFunction.h index ea23c7d62ee..238cb129b19 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorAnisotropicDiffusionFunction.h @@ -77,12 +77,12 @@ class ITK_TEMPLATE_EXPORT VectorAnisotropicDiffusionFunction: itkStaticConstMacro(VectorDimension, unsigned int, PixelType::Dimension); /** Compute the average gradient magnitude squared. */ - virtual void CalculateAverageGradientMagnitudeSquared(TImage *) ITK_OVERRIDE; + void CalculateAverageGradientMagnitudeSquared(TImage *) override; protected: VectorAnisotropicDiffusionFunction() {} - ~VectorAnisotropicDiffusionFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~VectorAnisotropicDiffusionFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureAnisotropicDiffusionImageFilter.h b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureAnisotropicDiffusionImageFilter.h index 0174f6ed47f..e35a06054c8 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureAnisotropicDiffusionImageFilter.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureAnisotropicDiffusionImageFilter.h @@ -102,9 +102,9 @@ class VectorCurvatureAnisotropicDiffusionImageFilter: this->SetDifferenceFunction(q); } - ~VectorCurvatureAnisotropicDiffusionImageFilter() ITK_OVERRIDE {} + ~VectorCurvatureAnisotropicDiffusionImageFilter() override {} - virtual void InitializeIteration() ITK_OVERRIDE + void InitializeIteration() override { Superclass::InitializeIteration(); if ( this->GetTimeStep() > 0.5 / std::pow( 2.0, static_cast< double >( ImageDimension ) ) ) diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.h index 5766dc867da..b4c3ab261e5 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.h @@ -74,13 +74,13 @@ class ITK_TEMPLATE_EXPORT VectorCurvatureNDAnisotropicDiffusionFunction: Superclass::VectorDimension); /** Compute the equation value. */ - virtual PixelType ComputeUpdate(const NeighborhoodType & neighborhood, + PixelType ComputeUpdate(const NeighborhoodType & neighborhood, void *globalData, const FloatOffsetType & offset = FloatOffsetType(0.0) - ) ITK_OVERRIDE; + ) override; /** This method is called prior to each iteration of the solver. */ - virtual void InitializeIteration() ITK_OVERRIDE + void InitializeIteration() override { m_K = this->GetAverageGradientMagnitudeSquared() * this->GetConductanceParameter() * this->GetConductanceParameter() * -2.0f; @@ -88,8 +88,8 @@ class ITK_TEMPLATE_EXPORT VectorCurvatureNDAnisotropicDiffusionFunction: protected: VectorCurvatureNDAnisotropicDiffusionFunction(); - ~VectorCurvatureNDAnisotropicDiffusionFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~VectorCurvatureNDAnisotropicDiffusionFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientAnisotropicDiffusionImageFilter.h b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientAnisotropicDiffusionImageFilter.h index b39e62550bb..1dbbcba8aa0 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientAnisotropicDiffusionImageFilter.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientAnisotropicDiffusionImageFilter.h @@ -100,7 +100,7 @@ class VectorGradientAnisotropicDiffusionImageFilter: this->SetDifferenceFunction(p); } - ~VectorGradientAnisotropicDiffusionImageFilter() ITK_OVERRIDE {} + ~VectorGradientAnisotropicDiffusionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorGradientAnisotropicDiffusionImageFilter); diff --git a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.h b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.h index 502c13d18c5..660f4f77591 100644 --- a/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.h @@ -76,13 +76,13 @@ class ITK_TEMPLATE_EXPORT VectorGradientNDAnisotropicDiffusionFunction: typedef typename PixelType::ValueType ScalarValueType; /** Compute the equation value. */ - virtual PixelType ComputeUpdate(const NeighborhoodType & neighborhood, + PixelType ComputeUpdate(const NeighborhoodType & neighborhood, void *globalData, const FloatOffsetType & offset = FloatOffsetType(0.0) - ) ITK_OVERRIDE; + ) override; /** This method is called prior to each iteration of the solver. */ - virtual void InitializeIteration() ITK_OVERRIDE + void InitializeIteration() override { m_K = this->GetAverageGradientMagnitudeSquared() * this->GetConductanceParameter() * this->GetConductanceParameter() * -2.0f; @@ -90,7 +90,7 @@ class ITK_TEMPLATE_EXPORT VectorGradientNDAnisotropicDiffusionFunction: protected: VectorGradientNDAnisotropicDiffusionFunction(); - ~VectorGradientNDAnisotropicDiffusionFunction() ITK_OVERRIDE {} + ~VectorGradientNDAnisotropicDiffusionFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorGradientNDAnisotropicDiffusionFunction); diff --git a/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.h b/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.h index 75d065ce081..5c27240f5f5 100644 --- a/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.h +++ b/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.h @@ -162,19 +162,19 @@ class ITK_TEMPLATE_EXPORT AntiAliasBinaryImageFilter: protected: AntiAliasBinaryImageFilter(); - ~AntiAliasBinaryImageFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~AntiAliasBinaryImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Overridden from the parent class to indroduce a constraint on * surface flow under certain conditions. */ - virtual ValueType CalculateUpdateValue(const IndexType & idx, + ValueType CalculateUpdateValue(const IndexType & idx, const TimeStepType & dt, const ValueType & value, - const ValueType & change) ITK_OVERRIDE; + const ValueType & change) override; /** Overridden from ProcessObject to set certain values before starting the * finite difference solver and then create an appropriate output */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(AntiAliasBinaryImageFilter); diff --git a/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx b/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx index f533d81a2ba..8e75f5c6e1a 100644 --- a/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx +++ b/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx @@ -30,7 +30,7 @@ AntiAliasBinaryImageFilter< TInputImage, TOutputImage > ::AntiAliasBinaryImageFilter() : m_UpperBinaryValue( NumericTraits< BinaryValueType >::OneValue() ), m_LowerBinaryValue( NumericTraits< BinaryValueType >::ZeroValue() ), - m_InputImage( ITK_NULLPTR ) + m_InputImage( nullptr ) { m_CurvatureFunction = CurvatureFunctionType::New(); this->SetDifferenceFunction(m_CurvatureFunction); @@ -117,7 +117,7 @@ AntiAliasBinaryImageFilter< TInputImage, TOutputImage > Superclass::GenerateData(); // Release the pointer - m_InputImage = ITK_NULLPTR; + m_InputImage = nullptr; } template< typename TInputImage, typename TOutputImage > diff --git a/Modules/Filtering/BiasCorrection/include/itkCompositeValleyFunction.h b/Modules/Filtering/BiasCorrection/include/itkCompositeValleyFunction.h index 8897b99029d..77b943055d8 100644 --- a/Modules/Filtering/BiasCorrection/include/itkCompositeValleyFunction.h +++ b/Modules/Filtering/BiasCorrection/include/itkCompositeValleyFunction.h @@ -109,7 +109,7 @@ class ITKBiasCorrection_EXPORT CompositeValleyFunction:public CacheableScalarFun const MeasureArrayType & classSigmas); /** Destructor. */ - virtual ~CompositeValleyFunction() ITK_OVERRIDE; + ~CompositeValleyFunction() override; /** Get energy table's higher bound. */ double GetUpperBound() { return m_UpperBound; } @@ -137,7 +137,7 @@ class ITKBiasCorrection_EXPORT CompositeValleyFunction:public CacheableScalarFun } /** Evalaute the function at point x. */ - virtual MeasureType Evaluate(MeasureType x) ITK_OVERRIDE; + MeasureType Evaluate(MeasureType x) override; /** Get an energy value for the valley. */ inline MeasureType valley(MeasureType d) diff --git a/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h b/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h index 0156b6e5f45..9eb9a5ae1bd 100644 --- a/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h +++ b/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h @@ -123,8 +123,8 @@ class ITK_TEMPLATE_EXPORT MRASlabIdentifier:public Object protected: MRASlabIdentifier(); - virtual ~MRASlabIdentifier() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MRASlabIdentifier() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MRASlabIdentifier); diff --git a/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx b/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx index 5016d899a62..e01428164b2 100644 --- a/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx +++ b/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx @@ -31,7 +31,7 @@ template< typename TInputImage > MRASlabIdentifier< TInputImage > ::MRASlabIdentifier() { - m_Image = ITK_NULLPTR; + m_Image = nullptr; m_NumberOfSamples = 10; m_BackgroundMinimumThreshold = NumericTraits< ImagePixelType >::min(); m_Tolerance = 0.0; diff --git a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h index 23a30d356d2..958df18e1f7 100644 --- a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h +++ b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h @@ -122,12 +122,12 @@ class ITK_TEMPLATE_EXPORT MRIBiasEnergyFunction : public SingleValuedCostFunctio /** Gets the total energy value of an image or a slice using the * given parameters. */ - virtual MeasureType GetValue(const ParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const ParametersType & parameters) const override; /** Dummy implementation to confirm to the SingleValuedCostFunction * interfaces. It is pure virtual in the superclass. */ void GetDerivative( const ParametersType & itkNotUsed(parameters), - DerivativeType & itkNotUsed(derivative) ) const ITK_OVERRIDE + DerivativeType & itkNotUsed(derivative) ) const override {} /** Set Mean and Sigma for the normal distributions @@ -137,14 +137,14 @@ class ITK_TEMPLATE_EXPORT MRIBiasEnergyFunction : public SingleValuedCostFunctio void InitializeDistributions(Array< double > classMeans, Array< double > classSigmas); - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE; + unsigned int GetNumberOfParameters(void) const override; protected: /** Constructor. */ MRIBiasEnergyFunction(); /** Destructor. */ - virtual ~MRIBiasEnergyFunction() ITK_OVERRIDE; + ~MRIBiasEnergyFunction() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MRIBiasEnergyFunction); @@ -477,8 +477,8 @@ class ITK_TEMPLATE_EXPORT MRIBiasFieldCorrectionFilter : protected: MRIBiasFieldCorrectionFilter(); - virtual ~MRIBiasFieldCorrectionFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MRIBiasFieldCorrectionFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Checks if the mask image's dimensionality and size matches with * those of the input image. */ @@ -533,7 +533,7 @@ class ITK_TEMPLATE_EXPORT MRIBiasFieldCorrectionFilter : void AdjustSlabRegions(SlabRegionVectorType & slabs, OutputImageRegionType requestedRegion); - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MRIBiasFieldCorrectionFilter); diff --git a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx index 2ae18330868..0bf393aa1f7 100644 --- a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx +++ b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx @@ -26,9 +26,9 @@ namespace itk template< typename TImage, typename TImageMask, typename TBiasField > MRIBiasEnergyFunction< TImage, TImageMask, TBiasField > ::MRIBiasEnergyFunction() : - m_BiasField( ITK_NULLPTR ), - m_Image( ITK_NULLPTR ), - m_Mask( ITK_NULLPTR ) + m_BiasField( nullptr ), + m_Image( nullptr ), + m_Mask( nullptr ) { for ( unsigned int i = 0; i < SpaceDimension; i++ ) { @@ -51,7 +51,7 @@ MRIBiasEnergyFunction< TImage, TImageMask, TBiasField > ::~MRIBiasEnergyFunction() { delete m_InternalEnergyFunction; - m_InternalEnergyFunction = ITK_NULLPTR; + m_InternalEnergyFunction = nullptr; } template< typename TImage, typename TImageMask, typename TBiasField > @@ -59,7 +59,7 @@ unsigned int MRIBiasEnergyFunction< TImage, TImageMask, TBiasField > ::GetNumberOfParameters(void) const { - if ( m_BiasField == ITK_NULLPTR ) + if ( m_BiasField == nullptr ) { return 0; } @@ -81,7 +81,7 @@ MRIBiasEnergyFunction< TImage, TImageMask, TBiasField > itkExceptionMacro(<< "EnergyFunction is null"); } - if ( m_BiasField == ITK_NULLPTR ) + if ( m_BiasField == nullptr ) { itkExceptionMacro(<< "BiasField is null"); } @@ -205,10 +205,10 @@ MRIBiasEnergyFunction< TImage, TImageMask, TBiasField > template< typename TInputImage, typename TOutputImage, typename TMaskImage > MRIBiasFieldCorrectionFilter< TInputImage, TOutputImage, TMaskImage > ::MRIBiasFieldCorrectionFilter() : - m_EnergyFunction( ITK_NULLPTR ), + m_EnergyFunction( nullptr ), m_NormalVariateGenerator( NormalVariateGeneratorType::New() ), - m_InputMask( ITK_NULLPTR ), - m_OutputMask( ITK_NULLPTR ), + m_InputMask( nullptr ), + m_OutputMask( nullptr ), m_InternalInput( InternalImageType::New() ), m_BiasFieldMultiplicative( true ), m_UsingSlabIdentification( false ), @@ -225,7 +225,7 @@ MRIBiasFieldCorrectionFilter< TInputImage, TOutputImage, TMaskImage > m_OptimizerGrowthFactor( 1.05 ), m_OptimizerShrinkFactor( std::pow(m_OptimizerGrowthFactor, -0.25) ) { - m_NormalVariateGenerator->Initialize( time(ITK_NULLPTR) ); + m_NormalVariateGenerator->Initialize( time(nullptr) ); if ( ImageDimension == 3 ) { diff --git a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h index 3c0fd65c3a0..634ab7435d1 100644 --- a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h +++ b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.h @@ -375,10 +375,10 @@ class N4BiasFieldCorrectionImageFilter : protected: N4BiasFieldCorrectionImageFilter(); - ~N4BiasFieldCorrectionImageFilter() ITK_OVERRIDE {} - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~N4BiasFieldCorrectionImageFilter() override {} + void PrintSelf( std::ostream& os, Indent indent ) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(N4BiasFieldCorrectionImageFilter); diff --git a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx index f87ea393f8b..c01b3456540 100644 --- a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx +++ b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx @@ -58,7 +58,7 @@ N4BiasFieldCorrectionImageFilter { this->SetNumberOfRequiredInputs( 1 ); - this->m_LogBiasFieldControlPointLattice = ITK_NULLPTR; + this->m_LogBiasFieldControlPointLattice = nullptr; this->m_NumberOfFittingLevels.Fill( 1 ); this->m_NumberOfControlPoints.Fill( 4 ); diff --git a/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx b/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx index 94fd5e2eba1..faeb60d91bb 100644 --- a/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx +++ b/Modules/Filtering/BiasCorrection/test/itkMRIBiasFieldCorrectionFilterTest.cxx @@ -247,9 +247,9 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) //TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); //timing - long int t1 = time(ITK_NULLPTR); + long int t1 = time(nullptr); filter->Update(); - long int t2 = time(ITK_NULLPTR); + long int t2 = time(nullptr); std::cout << "Run time (in s)" << t2-t1 << std::endl; sumOfError = 0.0; @@ -315,9 +315,9 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) filter->SetInitialBiasFieldCoefficients( initCoefficients ); //TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); - t1 = time(ITK_NULLPTR); + t1 = time(nullptr); filter->Update(); - t2 = time(ITK_NULLPTR); + t2 = time(nullptr); std::cout << "Run time (in s)" << t2-t1 << std::endl; sumOfError = 0.0; @@ -383,9 +383,9 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) filter->SetInitialBiasFieldCoefficients( initCoefficients ); //TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); - t1 = time(ITK_NULLPTR); + t1 = time(nullptr); filter->Update(); - t2 = time(ITK_NULLPTR); + t2 = time(nullptr); std::cout << "Run time (in s)" << t2-t1 << std::endl; sumOfError = 0.0; @@ -443,9 +443,9 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) filter->SetInitialBiasFieldCoefficients( initCoefficients ); //TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); - t1 = time(ITK_NULLPTR); + t1 = time(nullptr); filter->Update(); - t2 = time(ITK_NULLPTR); + t2 = time(nullptr); std::cout << "Run time (in s)" << t2-t1 << std::endl; sumOfError = 0.0; @@ -486,9 +486,9 @@ int itkMRIBiasFieldCorrectionFilterTest( int , char* [] ) filter->SetInitialBiasFieldCoefficients( initCoefficients ); //TEST_SET_GET_VALUE( initCoefficients, filter->GetInitialBiasFieldCoefficients() ); - t1 = time(ITK_NULLPTR); + t1 = time(nullptr); filter->Update(); - t2 = time(ITK_NULLPTR); + t2 = time(nullptr); std::cout << "Run time (in s)" << t2-t1 << std::endl; double sumOfErrorFinal = 0.0; diff --git a/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx b/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx index 67a7262cb05..91f04012866 100644 --- a/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx +++ b/Modules/Filtering/BiasCorrection/test/itkN4BiasFieldCorrectionImageFilterTest.cxx @@ -36,12 +36,12 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const TFilter * filter = dynamic_cast< const TFilter * >( object ); @@ -132,7 +132,7 @@ int N4( int argc, char *argv[] ) // handle the mask image typedef itk::Image MaskImageType; - typename MaskImageType::Pointer maskImage = ITK_NULLPTR; + typename MaskImageType::Pointer maskImage = nullptr; if( argc > 6 ) { @@ -147,7 +147,7 @@ int N4( int argc, char *argv[] ) } catch( ... ) { - maskImage = ITK_NULLPTR; + maskImage = nullptr; } } diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.h index ac1be55fde1..d5aa50629f1 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.h @@ -96,19 +96,19 @@ class ITK_TEMPLATE_EXPORT BinaryClosingByReconstructionImageFilter : protected: BinaryClosingByReconstructionImageFilter(); - ~BinaryClosingByReconstructionImageFilter() ITK_OVERRIDE {}; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~BinaryClosingByReconstructionImageFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; /** BinaryClosingByReconstructionImageFilter need to make sure they request enough of an * input image to account for the structuring element size. The input * requested region is expanded by the radius of the structuring element. * If the request extends past the LargestPossibleRegion for the input, * the request is cropped by the LargestPossibleRegion. */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleDilateImageFilter GrayscaleErodeImageFilter. */ - void GenerateData () ITK_OVERRIDE; + void GenerateData () override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryClosingByReconstructionImageFilter); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.h index 02fcd9b7edb..1af54394442 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.h @@ -124,10 +124,10 @@ class ITK_TEMPLATE_EXPORT BinaryDilateImageFilter: protected: BinaryDilateImageFilter(); - virtual ~BinaryDilateImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryDilateImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; // type inherited from the superclass typedef typename Superclass::NeighborIndexContainer NeighborIndexContainer; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.h index 6949c58fb45..24fb5500946 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.h @@ -125,10 +125,10 @@ class ITK_TEMPLATE_EXPORT BinaryErodeImageFilter: protected: BinaryErodeImageFilter(); - virtual ~BinaryErodeImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryErodeImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; // type inherited from the superclass typedef typename Superclass::NeighborIndexContainer NeighborIndexContainer; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.h index 3f51597dfa7..05213fdf28b 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.h @@ -97,12 +97,12 @@ class ITK_TEMPLATE_EXPORT BinaryMorphologicalClosingImageFilter: protected: BinaryMorphologicalClosingImageFilter(); - ~BinaryMorphologicalClosingImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryMorphologicalClosingImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleDilateImageFilter GrayscaleErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryMorphologicalClosingImageFilter); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.h index a8c1dc8a8b4..e406d87264e 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.h @@ -96,12 +96,12 @@ class ITK_TEMPLATE_EXPORT BinaryMorphologicalOpeningImageFilter: protected: BinaryMorphologicalOpeningImageFilter(); - ~BinaryMorphologicalOpeningImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryMorphologicalOpeningImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleDilateImageFilter GrayscaleErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryMorphologicalOpeningImageFilter); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.h index be9f009b59b..903f2d02d67 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.h @@ -182,12 +182,12 @@ class ITK_TEMPLATE_EXPORT BinaryMorphologyImageFilter: itkBooleanMacro(BoundaryToForeground); /** Set kernel (structuring element). */ - void SetKernel(const KernelType & kernel) ITK_OVERRIDE; + void SetKernel(const KernelType & kernel) override; protected: BinaryMorphologyImageFilter(); - virtual ~BinaryMorphologyImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryMorphologyImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Analyze kernel and prepare data for GenerateData() function */ diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.h index 657824af097..796c4a432b2 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.h @@ -101,19 +101,19 @@ class ITK_TEMPLATE_EXPORT BinaryOpeningByReconstructionImageFilter : protected: BinaryOpeningByReconstructionImageFilter(); - ~BinaryOpeningByReconstructionImageFilter() ITK_OVERRIDE {}; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~BinaryOpeningByReconstructionImageFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; /** BinaryOpeningByReconstructionImageFilter need to make sure they request enough of an * input image to account for the structuring element size. The input * requested region is expanded by the radius of the structuring element. * If the request extends past the LargestPossibleRegion for the input, * the request is cropped by the LargestPossibleRegion. */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleDilateImageFilter GrayscaleErodeImageFilter. */ - void GenerateData () ITK_OVERRIDE; + void GenerateData () override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryOpeningByReconstructionImageFilter); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.h index 63ad19aa883..93ab8e2a8e1 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.h @@ -125,7 +125,7 @@ class ITK_TEMPLATE_EXPORT BinaryPruningImageFilter: protected: BinaryPruningImageFilter(); virtual ~BinaryPruningImageFilter() {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Compute thinning Image. */ void GenerateData() ITK_OVERRIDE; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.h index 305927b051a..a76c9a6318e 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.h @@ -130,10 +130,10 @@ class ITK_TEMPLATE_EXPORT BinaryThinningImageFilter: protected: BinaryThinningImageFilter(); - virtual ~BinaryThinningImageFilter() ITK_OVERRIDE {} + ~BinaryThinningImageFilter() override {} /** Compute thinning Image. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Prepare data. */ void PrepareData(); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkDilateObjectMorphologyImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkDilateObjectMorphologyImageFilter.h index fc60b8d1f42..529bb821561 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkDilateObjectMorphologyImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkDilateObjectMorphologyImageFilter.h @@ -87,15 +87,15 @@ class ITK_TEMPLATE_EXPORT DilateObjectMorphologyImageFilter: protected: DilateObjectMorphologyImageFilter(); - ~DilateObjectMorphologyImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DilateObjectMorphologyImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Apply the kernel to the neighborhood given. * * All values in neighborhood covered by the kernel will be set to the * object value. */ void Evaluate(OutputNeighborhoodIteratorType & nit, - const KernelType & kernel) ITK_OVERRIDE; + const KernelType & kernel) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DilateObjectMorphologyImageFilter); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.h index 8d7ece61a91..b2eec693209 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.h @@ -106,15 +106,15 @@ class ITK_TEMPLATE_EXPORT ErodeObjectMorphologyImageFilter: protected: ErodeObjectMorphologyImageFilter(); - ~ErodeObjectMorphologyImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ErodeObjectMorphologyImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Apply the kernel to the neighborhood given. * * All values in neighborhood covered by the kernel will be set to the * background value. */ void Evaluate(OutputNeighborhoodIteratorType & nit, - const KernelType & kernel) ITK_OVERRIDE; + const KernelType & kernel) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ErodeObjectMorphologyImageFilter); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkFastIncrementalBinaryDilateImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkFastIncrementalBinaryDilateImageFilter.h index af37d2dfe50..df39da1cefc 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkFastIncrementalBinaryDilateImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkFastIncrementalBinaryDilateImageFilter.h @@ -83,7 +83,7 @@ class FastIncrementalBinaryDilateImageFilter: protected: FastIncrementalBinaryDilateImageFilter() {} - virtual ~FastIncrementalBinaryDilateImageFilter() ITK_OVERRIDE {} + ~FastIncrementalBinaryDilateImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(FastIncrementalBinaryDilateImageFilter); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.h index f0b8205f80a..604197e8e46 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.h @@ -140,7 +140,7 @@ class ITK_TEMPLATE_EXPORT ObjectMorphologyImageFilter: * requested region is expanded by the radius of the structuring element. * If the request extends past the LargestPossibleRegion for the input, * the request is cropped by the LargestPossibleRegion. */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Allows a user to override the internal boundary condition. Care should be * be taken to ensure that the overriding boundary condition is a persistent @@ -192,13 +192,13 @@ class ITK_TEMPLATE_EXPORT ObjectMorphologyImageFilter: protected: ObjectMorphologyImageFilter(); - ~ObjectMorphologyImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ObjectMorphologyImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** Evaluate image neighborhood with kernel to find the new value * for the center pixel value. */ @@ -226,7 +226,7 @@ class ITK_TEMPLATE_EXPORT ObjectMorphologyImageFilter: /** Pixel value that indicates the object be operated upon */ PixelType m_ObjectValue; - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ObjectMorphologyImageFilter); diff --git a/Modules/Filtering/Colormap/include/itkAutumnColormapFunction.h b/Modules/Filtering/Colormap/include/itkAutumnColormapFunction.h index f1e73801cff..d1fd83ed9bc 100644 --- a/Modules/Filtering/Colormap/include/itkAutumnColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkAutumnColormapFunction.h @@ -58,11 +58,11 @@ class ITK_TEMPLATE_EXPORT AutumnColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: AutumnColormapFunction() {} - ~AutumnColormapFunction() ITK_OVERRIDE {} + ~AutumnColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AutumnColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkBlueColormapFunction.h b/Modules/Filtering/Colormap/include/itkBlueColormapFunction.h index 9da2657c34f..ee8c5eeff5b 100644 --- a/Modules/Filtering/Colormap/include/itkBlueColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkBlueColormapFunction.h @@ -58,11 +58,11 @@ class ITK_TEMPLATE_EXPORT BlueColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: BlueColormapFunction() {} - ~BlueColormapFunction() ITK_OVERRIDE {} + ~BlueColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(BlueColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkColormapFunction.h b/Modules/Filtering/Colormap/include/itkColormapFunction.h index 6906e5097c5..51294bca418 100644 --- a/Modules/Filtering/Colormap/include/itkColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkColormapFunction.h @@ -93,7 +93,7 @@ class ColormapFunction:public Object this->m_MaximumRGBComponentValue = NumericTraits< RGBComponentType >::max(); } - ~ColormapFunction() ITK_OVERRIDE {} + ~ColormapFunction() override {} /** * Map [min, max] input values to [0, 1]. @@ -127,7 +127,7 @@ class ColormapFunction:public Object return rescaled; } - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/Colormap/include/itkCoolColormapFunction.h b/Modules/Filtering/Colormap/include/itkCoolColormapFunction.h index 45cad8dadd5..96ab67a3858 100644 --- a/Modules/Filtering/Colormap/include/itkCoolColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkCoolColormapFunction.h @@ -58,11 +58,11 @@ class ITK_TEMPLATE_EXPORT CoolColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: CoolColormapFunction() {} - ~CoolColormapFunction() ITK_OVERRIDE {} + ~CoolColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(CoolColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkCopperColormapFunction.h b/Modules/Filtering/Colormap/include/itkCopperColormapFunction.h index e9e275424d0..75fdeeed21b 100644 --- a/Modules/Filtering/Colormap/include/itkCopperColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkCopperColormapFunction.h @@ -58,11 +58,11 @@ class ITK_TEMPLATE_EXPORT CopperColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: CopperColormapFunction() {} - ~CopperColormapFunction() ITK_OVERRIDE {} + ~CopperColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(CopperColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkCustomColormapFunction.h b/Modules/Filtering/Colormap/include/itkCustomColormapFunction.h index 1b0cdd368b7..019c3718073 100644 --- a/Modules/Filtering/Colormap/include/itkCustomColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkCustomColormapFunction.h @@ -61,7 +61,7 @@ class ITK_TEMPLATE_EXPORT CustomColormapFunction: typedef std::vector< RealType > ChannelType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; void SetRedChannel(ChannelType red) { @@ -95,7 +95,7 @@ class ITK_TEMPLATE_EXPORT CustomColormapFunction: protected: CustomColormapFunction() {} - ~CustomColormapFunction() ITK_OVERRIDE {} + ~CustomColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(CustomColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkGreenColormapFunction.h b/Modules/Filtering/Colormap/include/itkGreenColormapFunction.h index e00fd730535..4f93cc4d149 100644 --- a/Modules/Filtering/Colormap/include/itkGreenColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkGreenColormapFunction.h @@ -58,11 +58,11 @@ class ITK_TEMPLATE_EXPORT GreenColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: GreenColormapFunction() {} - ~GreenColormapFunction() ITK_OVERRIDE {} + ~GreenColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(GreenColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkGreyColormapFunction.h b/Modules/Filtering/Colormap/include/itkGreyColormapFunction.h index 8e08ff7342e..072787c73cf 100644 --- a/Modules/Filtering/Colormap/include/itkGreyColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkGreyColormapFunction.h @@ -59,11 +59,11 @@ class ITK_TEMPLATE_EXPORT GreyColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: GreyColormapFunction() {} - ~GreyColormapFunction() ITK_OVERRIDE {} + ~GreyColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(GreyColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkHSVColormapFunction.h b/Modules/Filtering/Colormap/include/itkHSVColormapFunction.h index e51cd0f8d32..a3d3380a23f 100644 --- a/Modules/Filtering/Colormap/include/itkHSVColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkHSVColormapFunction.h @@ -59,11 +59,11 @@ class ITK_TEMPLATE_EXPORT HSVColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: HSVColormapFunction() {} - ~HSVColormapFunction() ITK_OVERRIDE {} + ~HSVColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(HSVColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkHotColormapFunction.h b/Modules/Filtering/Colormap/include/itkHotColormapFunction.h index 2b6dc856942..d4a9543bfaf 100644 --- a/Modules/Filtering/Colormap/include/itkHotColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkHotColormapFunction.h @@ -59,11 +59,11 @@ class ITK_TEMPLATE_EXPORT HotColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: HotColormapFunction() {} - ~HotColormapFunction() ITK_OVERRIDE {} + ~HotColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(HotColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkJetColormapFunction.h b/Modules/Filtering/Colormap/include/itkJetColormapFunction.h index f330b3946c2..07b16cf2c26 100644 --- a/Modules/Filtering/Colormap/include/itkJetColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkJetColormapFunction.h @@ -59,11 +59,11 @@ class ITK_TEMPLATE_EXPORT JetColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: JetColormapFunction() {} - ~JetColormapFunction() ITK_OVERRIDE {} + ~JetColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(JetColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkOverUnderColormapFunction.h b/Modules/Filtering/Colormap/include/itkOverUnderColormapFunction.h index 652bd565a19..341f2c711da 100644 --- a/Modules/Filtering/Colormap/include/itkOverUnderColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkOverUnderColormapFunction.h @@ -59,11 +59,11 @@ class ITK_TEMPLATE_EXPORT OverUnderColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: OverUnderColormapFunction() {} - ~OverUnderColormapFunction() ITK_OVERRIDE {} + ~OverUnderColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(OverUnderColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkRedColormapFunction.h b/Modules/Filtering/Colormap/include/itkRedColormapFunction.h index 2a74cc2c853..9773162b822 100644 --- a/Modules/Filtering/Colormap/include/itkRedColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkRedColormapFunction.h @@ -59,11 +59,11 @@ class ITK_TEMPLATE_EXPORT RedColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: RedColormapFunction() {} - ~RedColormapFunction() ITK_OVERRIDE {} + ~RedColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(RedColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.h b/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.h index 709750c490c..a2def291ecb 100644 --- a/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.h +++ b/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.h @@ -122,13 +122,13 @@ class ITK_TEMPLATE_EXPORT ScalarToRGBColormapImageFilter: protected: ScalarToRGBColormapImageFilter(); - virtual ~ScalarToRGBColormapImageFilter() ITK_OVERRIDE {} + ~ScalarToRGBColormapImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Overloaded method so that if the output image is a VectorImage, then * the correct number of components are set. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE + void GenerateOutputInformation() override { Superclass::GenerateOutputInformation(); OutputImageType* output = this->GetOutput(); @@ -156,10 +156,10 @@ class ITK_TEMPLATE_EXPORT ScalarToRGBColormapImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** Process to execute before entering the multithreaded section. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarToRGBColormapImageFilter); diff --git a/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.hxx b/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.hxx index b3cd35c5e0d..aaaad038a24 100644 --- a/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.hxx +++ b/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.hxx @@ -267,7 +267,7 @@ ScalarToRGBColormapImageFilter< TInputImage, TOutputImage > } else { - os << indent << "Colormap is ITK_NULLPTR " << std::endl; + os << indent << "Colormap is nullptr " << std::endl; } os << indent << "Use Input Image Extrema for Scaling " << this->m_UseInputImageExtremaForScaling << std::endl; } diff --git a/Modules/Filtering/Colormap/include/itkSpringColormapFunction.h b/Modules/Filtering/Colormap/include/itkSpringColormapFunction.h index 2266938c4a2..8bd54285b30 100644 --- a/Modules/Filtering/Colormap/include/itkSpringColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkSpringColormapFunction.h @@ -59,11 +59,11 @@ class ITK_TEMPLATE_EXPORT SpringColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: SpringColormapFunction() {} - ~SpringColormapFunction() ITK_OVERRIDE {} + ~SpringColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SpringColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkSummerColormapFunction.h b/Modules/Filtering/Colormap/include/itkSummerColormapFunction.h index 874e5c8b539..4c32a7ef72f 100644 --- a/Modules/Filtering/Colormap/include/itkSummerColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkSummerColormapFunction.h @@ -59,11 +59,11 @@ class ITK_TEMPLATE_EXPORT SummerColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: SummerColormapFunction() {} - ~SummerColormapFunction() ITK_OVERRIDE {} + ~SummerColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SummerColormapFunction); diff --git a/Modules/Filtering/Colormap/include/itkWinterColormapFunction.h b/Modules/Filtering/Colormap/include/itkWinterColormapFunction.h index 9825962eb64..e95814bf2e5 100644 --- a/Modules/Filtering/Colormap/include/itkWinterColormapFunction.h +++ b/Modules/Filtering/Colormap/include/itkWinterColormapFunction.h @@ -59,11 +59,11 @@ class ITK_TEMPLATE_EXPORT WinterColormapFunction: typedef typename Superclass::ScalarType ScalarType; typedef typename Superclass::RealType RealType; - virtual RGBPixelType operator()(const TScalar &) const ITK_OVERRIDE; + RGBPixelType operator()(const TScalar &) const override; protected: WinterColormapFunction() {} - ~WinterColormapFunction() ITK_OVERRIDE {} + ~WinterColormapFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(WinterColormapFunction); diff --git a/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.h b/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.h index 22cbf18068d..3fd27b0391c 100644 --- a/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.h +++ b/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.h @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT ConvolutionImageFilter : protected: ConvolutionImageFilter(); - ~ConvolutionImageFilter() ITK_OVERRIDE {} + ~ConvolutionImageFilter() override {} /** ConvolutionImageFilter needs the entire image kernel, which in * general is going to be a different size then the output requested @@ -108,10 +108,10 @@ class ITK_TEMPLATE_EXPORT ConvolutionImageFilter : * pipeline execution model. * * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This filter uses a minipipeline to compute the output. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** The kernel needs padding if any of the sizes of its dimensions is * even. This method checks for this condition. */ diff --git a/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h b/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h index 18e454fc3e9..d70d4f08883 100644 --- a/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h +++ b/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h @@ -106,20 +106,20 @@ class ITK_TEMPLATE_EXPORT ConvolutionImageFilterBase : protected: ConvolutionImageFilterBase(); - ~ConvolutionImageFilterBase() ITK_OVERRIDE {} + ~ConvolutionImageFilterBase() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** The largest possible output region may differ from the largest * possible input region. */ - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** Get the valid region of the convolution. */ OutputRegionType GetValidRegion() const; /** Default superclass implementation ensures that input images * occupy same physical space. This is not needed for this filter. */ - virtual void VerifyInputInformation() ITK_OVERRIDE {}; + void VerifyInputInformation() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(ConvolutionImageFilterBase); diff --git a/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.h b/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.h index e6a91eb21ff..0706d5a2e37 100644 --- a/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.h +++ b/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.h @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT FFTConvolutionImageFilter : protected: FFTConvolutionImageFilter(); - ~FFTConvolutionImageFilter() ITK_OVERRIDE {} + ~FFTConvolutionImageFilter() override {} /** Because the inputs are real, we can use the specialized filters * for real-to-complex Fourier transforms. */ @@ -125,10 +125,10 @@ class ITK_TEMPLATE_EXPORT FFTConvolutionImageFilter : * pipeline execution model. * * \sa ProcessObject::GenerateInputRequestedRegion() */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This filter uses a minipipeline to compute the output. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Prepare the input images for operations in the Fourier * domain. This includes resizing the input and kernel images, @@ -187,7 +187,7 @@ class ITK_TEMPLATE_EXPORT FFTConvolutionImageFilter : /** Get whether the X dimension has an odd size. */ bool GetXDimensionIsOdd() const; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FFTConvolutionImageFilter); diff --git a/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx b/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx index a3b4101c374..3261b5c9f4d 100644 --- a/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx +++ b/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx @@ -78,8 +78,8 @@ FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPre const KernelImageType* kernelImage = this->GetKernelImage(); - InternalComplexImagePointerType input = ITK_NULLPTR; - InternalComplexImagePointerType kernel = ITK_NULLPTR; + InternalComplexImagePointerType input = nullptr; + InternalComplexImagePointerType kernel = nullptr; this->PrepareInputs( localInput, kernelImage, input, kernel, progress, 0.7f ); typedef MultiplyImageFilter< InternalComplexImageType, @@ -92,8 +92,8 @@ FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPre progress->RegisterInternalFilter( multiplyFilter, 0.1 ); // Free up the memory for the prepared inputs - input = ITK_NULLPTR; - kernel = ITK_NULLPTR; + input = nullptr; + kernel = nullptr; this->ProduceOutput( multiplyFilter->GetOutput(), progress, 0.2 ); } @@ -194,8 +194,8 @@ FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPre transformedInput = imageFFTFilter->GetOutput(); transformedInput->DisconnectPipeline(); - imageFFTFilter->SetInput( ITK_NULLPTR ); - imageFFTFilter = ITK_NULLPTR; + imageFFTFilter->SetInput( nullptr ); + imageFFTFilter = nullptr; } template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision > @@ -215,7 +215,7 @@ FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPre kernelUpperBound[i] = padSize[i] - kernelSize[i]; } - InternalImagePointerType paddedKernelImage = ITK_NULLPTR; + InternalImagePointerType paddedKernelImage = nullptr; float paddingWeight = 0.2f; if ( this->GetNormalize() ) diff --git a/Modules/Filtering/Convolution/include/itkFFTNormalizedCorrelationImageFilter.h b/Modules/Filtering/Convolution/include/itkFFTNormalizedCorrelationImageFilter.h index 469a80d2cf8..61ef0a77ee0 100644 --- a/Modules/Filtering/Convolution/include/itkFFTNormalizedCorrelationImageFilter.h +++ b/Modules/Filtering/Convolution/include/itkFFTNormalizedCorrelationImageFilter.h @@ -132,11 +132,11 @@ class ITK_TEMPLATE_EXPORT FFTNormalizedCorrelationImageFilter : Self::RemoveInput("MovingImageMask"); Self::RemoveInput("FixedImageMask"); } - virtual ~FFTNormalizedCorrelationImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~FFTNormalizedCorrelationImageFilter() override {} + void PrintSelf(std::ostream& os, Indent indent) const override; /** Standard pipeline method.*/ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FFTNormalizedCorrelationImageFilter); diff --git a/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.h b/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.h index 3c8e2b247b0..363c84ea58d 100644 --- a/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.h +++ b/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.h @@ -237,29 +237,29 @@ class ITK_TEMPLATE_EXPORT MaskedFFTNormalizedCorrelationImageFilter : m_MaximumNumberOfOverlappingPixels = 0; m_AccumulatedProgress = 0.0; } - virtual ~MaskedFFTNormalizedCorrelationImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~MaskedFFTNormalizedCorrelationImageFilter() override {} + void PrintSelf(std::ostream& os, Indent indent) const override; /** Overlap the VerifyInputInformation method */ - void VerifyInputInformation() ITK_OVERRIDE; + void VerifyInputInformation() override; /** Standard pipeline method.*/ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** This filter needs a different input requested region than the output * requested region. As such, it needs to provide an * implementation for GenerateInputRequestedRegion() in order to inform the * pipeline execution model. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Since the output of this filter is a different * size than the input, it must provide an implementation of * GenerateOutputInformation. * \sa ProcessObject::GenerateOutputRequestedRegion() */ - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - void EnlargeOutputRequestedRegion( DataObject *output ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *output ) override; typename TMaskImage::Pointer PreProcessMask( const InputImageType * inputImage, const MaskImageType * inputMask ); diff --git a/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx b/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx index e58f3f97288..5e7de9eb8b7 100644 --- a/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx +++ b/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx @@ -119,14 +119,14 @@ void MaskedFFTNormalizedCorrelationImageFilterGraft( this->GetMovingImage() ); - MaskImagePointer fixedMask = ITK_NULLPTR; + MaskImagePointer fixedMask = nullptr; if( this->GetFixedImageMask() ) { fixedMask = MaskImageType::New(); fixedMask->Graft( this->GetFixedImageMask() ); } - MaskImagePointer movingMask = ITK_NULLPTR; + MaskImagePointer movingMask = nullptr; if( this->GetMovingImageMask() ) { movingMask = MaskImageType::New(); @@ -146,9 +146,9 @@ void MaskedFFTNormalizedCorrelationImageFilterPreProcessImage( movingImage,movingMask ); InputImagePointer rotatedMovingImage = this->RotateImage( movingImage ); - movingImage = ITK_NULLPTR; + movingImage = nullptr; MaskImagePointer rotatedMovingMask = this->RotateImage( movingMask); - movingMask = ITK_NULLPTR; + movingMask = nullptr; // The combinedImageSize is the size resulting from the correlation of the two images. RealSizeType combinedImageSize; @@ -168,10 +168,10 @@ void MaskedFFTNormalizedCorrelationImageFilterCalculateForwardFFT( fixedImage, FFTImageSize ); FFTImagePointer fixedMaskFFT = this->CalculateForwardFFT( fixedMask, FFTImageSize ); - fixedMask = ITK_NULLPTR; + fixedMask = nullptr; FFTImagePointer rotatedMovingFFT = this->CalculateForwardFFT( rotatedMovingImage, FFTImageSize ); FFTImagePointer rotatedMovingMaskFFT = this->CalculateForwardFFT( rotatedMovingMask, FFTImageSize ); - rotatedMovingMask = ITK_NULLPTR; + rotatedMovingMask = nullptr; // Only 6 IFFTs are needed. // Compute and save some of these rather than computing them multiple times. @@ -188,31 +188,31 @@ void MaskedFFTNormalizedCorrelationImageFilterElementSubtraction( this->CalculateInverseFFT(this->ElementProduct(fixedFFT,rotatedMovingFFT),combinedImageSize), this->ElementQuotient(this->ElementProduct(fixedCumulativeSumImage,rotatedMovingCumulativeSumImage),numberOfOverlapPixels)); - fixedFFT = ITK_NULLPTR; // No longer needed - rotatedMovingFFT = ITK_NULLPTR; // No longer needed + fixedFFT = nullptr; // No longer needed + rotatedMovingFFT = nullptr; // No longer needed // Calculate the fixed part of the masked FFT NCC denominator. FFTImagePointer fixedSquaredFFT = this->CalculateForwardFFT( this->ElementProduct(fixedImage,fixedImage), FFTImageSize ); - fixedImage = ITK_NULLPTR; // No longer needed + fixedImage = nullptr; // No longer needed RealImagePointer fixedDenom = this->ElementSubtraction( this->CalculateInverseFFT(this->ElementProduct(fixedSquaredFFT,rotatedMovingMaskFFT),combinedImageSize), this->ElementQuotient(this->ElementProduct(fixedCumulativeSumImage,fixedCumulativeSumImage),numberOfOverlapPixels)); - fixedSquaredFFT = ITK_NULLPTR; // No longer needed - rotatedMovingMaskFFT = ITK_NULLPTR; // No longer needed - fixedCumulativeSumImage = ITK_NULLPTR; // No longer needed + fixedSquaredFFT = nullptr; // No longer needed + rotatedMovingMaskFFT = nullptr; // No longer needed + fixedCumulativeSumImage = nullptr; // No longer needed // Ensure that the result is positive. fixedDenom = this->ElementPositive(fixedDenom); // Calculate the moving part of the masked FFT NCC denominator. FFTImagePointer rotatedMovingSquaredFFT = this->CalculateForwardFFT( this->ElementProduct(rotatedMovingImage,rotatedMovingImage), FFTImageSize ); - rotatedMovingImage = ITK_NULLPTR; // No longer needed + rotatedMovingImage = nullptr; // No longer needed RealImagePointer rotatedMovingDenom = this->ElementSubtraction( this->CalculateInverseFFT(this->ElementProduct(fixedMaskFFT,rotatedMovingSquaredFFT),combinedImageSize), this->ElementQuotient(this->ElementProduct(rotatedMovingCumulativeSumImage,rotatedMovingCumulativeSumImage),numberOfOverlapPixels)); - rotatedMovingSquaredFFT = ITK_NULLPTR; // No longer needed - fixedMaskFFT = ITK_NULLPTR; // No longer needed - rotatedMovingCumulativeSumImage = ITK_NULLPTR; // No longer needed + rotatedMovingSquaredFFT = nullptr; // No longer needed + fixedMaskFFT = nullptr; // No longer needed + rotatedMovingCumulativeSumImage = nullptr; // No longer needed // Ensure that the result is positive. rotatedMovingDenom = this->ElementPositive(rotatedMovingDenom); @@ -221,14 +221,14 @@ void MaskedFFTNormalizedCorrelationImageFilterSetInput( this->ElementProduct(fixedDenom,rotatedMovingDenom) ); sqrtFilter->Update(); RealImagePointer denominator = sqrtFilter->GetOutput(); - fixedDenom = ITK_NULLPTR; // No longer needed - rotatedMovingDenom = ITK_NULLPTR; // No longer needed + fixedDenom = nullptr; // No longer needed + rotatedMovingDenom = nullptr; // No longer needed // Determine a tolerance on the precision of the denominator values. const double precisionTolerance = CalculatePrecisionTolerance( denominator ); RealImagePointer NCC = this->ElementQuotient(numerator,denominator); - numerator = ITK_NULLPTR; // No longer needed + numerator = nullptr; // No longer needed // Given the numberOfOverlapPixels, we can check that the m_RequiredNumberOfOverlappingPixels is not set higher than // the actual maximum overlap voxels. If it is, we set m_RequiredNumberOfOverlappingPixels to be this maximum. diff --git a/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.h b/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.h index 0e63183b7c9..73ddeec4ac4 100644 --- a/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.h +++ b/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.h @@ -135,14 +135,14 @@ class ITK_TEMPLATE_EXPORT NormalizedCorrelationImageFilter: protected: NormalizedCorrelationImageFilter() {} - virtual ~NormalizedCorrelationImageFilter() ITK_OVERRIDE {} + ~NormalizedCorrelationImageFilter() override {} /** NormalizedCorrelationImageFilter needs to request enough of an * input image to account for template size. The input requested * region is expanded by the radius of the template. If the request * extends past the LargestPossibleRegion for the input, the request * is cropped by the LargestPossibleRegion. */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** NormalizedCorrelationImageFilter can be implemented as a * multithreaded filter. Therefore, this implementation provides a @@ -156,10 +156,10 @@ class ITK_TEMPLATE_EXPORT NormalizedCorrelationImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** Standard PrintSelf method */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.h b/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.h index f475d35e01e..7d3cec2b376 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.h +++ b/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowFunction.h @@ -74,14 +74,14 @@ class ITK_TEMPLATE_EXPORT BinaryMinMaxCurvatureFlowFunction: /** This method computes the solution update for each pixel that does not * lie on a the data set boundary. */ - virtual PixelType ComputeUpdate(const NeighborhoodType & neighborhood, + PixelType ComputeUpdate(const NeighborhoodType & neighborhood, void *globalData, const FloatOffsetType & offset = FloatOffsetType(0.0) - ) ITK_OVERRIDE; + ) override; protected: BinaryMinMaxCurvatureFlowFunction(); - ~BinaryMinMaxCurvatureFlowFunction() ITK_OVERRIDE {} + ~BinaryMinMaxCurvatureFlowFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryMinMaxCurvatureFlowFunction); diff --git a/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowImageFilter.h b/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowImageFilter.h index 4182ca1c172..6821609ce3e 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowImageFilter.h +++ b/Modules/Filtering/CurvatureFlow/include/itkBinaryMinMaxCurvatureFlowImageFilter.h @@ -116,12 +116,12 @@ class ITK_TEMPLATE_EXPORT BinaryMinMaxCurvatureFlowImageFilter: protected: BinaryMinMaxCurvatureFlowImageFilter(); - ~BinaryMinMaxCurvatureFlowImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryMinMaxCurvatureFlowImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Initialize the state of filter and equation before each iteration. * Progress feeback is implemented as part of this method. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryMinMaxCurvatureFlowImageFilter); diff --git a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.h b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.h index 02def36c4ff..2b1ba376203 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.h +++ b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.h @@ -81,14 +81,14 @@ class ITK_TEMPLATE_EXPORT CurvatureFlowFunction: * Currently, this function returns the user specified constant time step. * \todo compute timestep based on CFL condition. */ - virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const ITK_OVERRIDE; + TimeStepType ComputeGlobalTimeStep(void *GlobalData) const override; /** Returns a pointer to a global data structure that is passed to this * object from the solver at each calculation. The idea is that the solver * holds the state of any global values needed to calculate the time step, * while the equation object performs the actual calculations. The global * data should also be initialized in this method. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { GlobalDataStruct *ans = new GlobalDataStruct(); @@ -100,7 +100,7 @@ class ITK_TEMPLATE_EXPORT CurvatureFlowFunction: * data pointer, it passes it to this method, which frees the memory. * The solver cannot free the memory because it does not know the type * to which the pointer points. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE + void ReleaseGlobalDataPointer(void *GlobalData) const override { delete (GlobalDataStruct *)GlobalData; } /** Set the time step parameter */ @@ -113,10 +113,10 @@ class ITK_TEMPLATE_EXPORT CurvatureFlowFunction: /** This method computes the solution update for each pixel that does not * lie on a the data set boundary. */ - virtual PixelType ComputeUpdate(const NeighborhoodType & neighborhood, + PixelType ComputeUpdate(const NeighborhoodType & neighborhood, void *globalData, const FloatOffsetType & offset = FloatOffsetType(0.0) - ) ITK_OVERRIDE; + ) override; protected: @@ -137,7 +137,7 @@ class ITK_TEMPLATE_EXPORT CurvatureFlowFunction: /// @endcond CurvatureFlowFunction(); - ~CurvatureFlowFunction() ITK_OVERRIDE {} + ~CurvatureFlowFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(CurvatureFlowFunction); diff --git a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.h b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.h index dfe150a6e7a..0365bec649c 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.h +++ b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowImageFilter.h @@ -157,12 +157,12 @@ class ITK_TEMPLATE_EXPORT CurvatureFlowImageFilter: protected: CurvatureFlowImageFilter(); - ~CurvatureFlowImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CurvatureFlowImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Supplies the halting criteria for this class of filters. The * algorithm will stop after a user-specified number of iterations. */ - virtual bool Halt() ITK_OVERRIDE + bool Halt() override { if ( this->GetElapsedIterations() == this->GetNumberOfIterations() ) { @@ -176,17 +176,17 @@ class ITK_TEMPLATE_EXPORT CurvatureFlowImageFilter: /** Initialize the state of filter and equation before each iteration. * Progress feeback is implemented as part of this method. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** To support streaming, this filter produces a output which is * larger than the original requested region. The output is padding * by m_NumberOfIterations pixels on edge. */ - virtual void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *) override; /** Edge effects are taken care of by padding the output requested * region. As such, the input requested region needs to at * minimum the same size as the output requested region. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CurvatureFlowImageFilter); diff --git a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.h b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.h index 626765b04df..980c2b298ff 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.h +++ b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.h @@ -82,14 +82,14 @@ class ITK_TEMPLATE_EXPORT MinMaxCurvatureFlowFunction: /** This method computes the solution update for each pixel that does not * lie on a the data set boundary. */ - virtual PixelType ComputeUpdate(const NeighborhoodType & neighborhood, + PixelType ComputeUpdate(const NeighborhoodType & neighborhood, void *globalData, const FloatOffsetType & offset = FloatOffsetType(0.0) - ) ITK_OVERRIDE; + ) override; protected: MinMaxCurvatureFlowFunction(); - ~MinMaxCurvatureFlowFunction() ITK_OVERRIDE {} + ~MinMaxCurvatureFlowFunction() override {} typedef Neighborhood< PixelType, itkGetStaticConstMacro(ImageDimension) > StencilOperatorType; StencilOperatorType m_StencilOperator; diff --git a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowImageFilter.h b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowImageFilter.h index 0c7943f68fe..48f8e0672f4 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowImageFilter.h +++ b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowImageFilter.h @@ -135,12 +135,12 @@ class ITK_TEMPLATE_EXPORT MinMaxCurvatureFlowImageFilter: protected: MinMaxCurvatureFlowImageFilter(); - ~MinMaxCurvatureFlowImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MinMaxCurvatureFlowImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Initialize the state of filter and equation before each iteration. * Progress feeback is implemented as part of this method. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MinMaxCurvatureFlowImageFilter); diff --git a/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx b/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx index 32674cdd82f..a7dc7e54c14 100644 --- a/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx +++ b/Modules/Filtering/CurvatureFlow/test/itkCurvatureFlowTest.cxx @@ -59,21 +59,21 @@ class DummyFunction : public FiniteDifferenceFunction typedef typename Superclass::PixelType PixelType; typedef typename Superclass::TimeStepType TimeStepType; - virtual PixelType ComputeUpdate( const NeighborhoodType &, void *, - const FloatOffsetType & ) ITK_OVERRIDE + PixelType ComputeUpdate( const NeighborhoodType &, void *, + const FloatOffsetType & ) override { return 0; } - virtual TimeStepType ComputeGlobalTimeStep( void * ) const ITK_OVERRIDE + TimeStepType ComputeGlobalTimeStep( void * ) const override { return 0; } - virtual void *GetGlobalDataPointer() const ITK_OVERRIDE - { return ITK_NULLPTR; } + void *GetGlobalDataPointer() const override + { return nullptr; } - virtual void ReleaseGlobalDataPointer(void *) const ITK_OVERRIDE {} + void ReleaseGlobalDataPointer(void *) const override {} protected: DummyFunction() {} - ~DummyFunction() ITK_OVERRIDE {} + ~DummyFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(DummyFunction); @@ -104,12 +104,12 @@ int itkCurvatureFlowTest(int argc, char* argv[] ) std::cout << "Test error handling." << std::endl; typedef itk::CurvatureFlowImageFilter FilterType; FilterType::Pointer filter = FilterType::New(); - filter->SetInput( ITK_NULLPTR ); + filter->SetInput( nullptr ); bool passed = false; try { - std::cout << "Test when input is ITK_NULLPTR." << std::endl; + std::cout << "Test when input is nullptr." << std::endl; filter->Update(); } catch( itk::ExceptionObject& err ) diff --git a/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.h index 21b53594c34..40d9edf4155 100644 --- a/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.h @@ -105,12 +105,12 @@ class ITK_TEMPLATE_EXPORT InverseDeconvolutionImageFilter : protected: InverseDeconvolutionImageFilter(); - ~InverseDeconvolutionImageFilter() ITK_OVERRIDE {} + ~InverseDeconvolutionImageFilter() override {} /** This filter uses a minipipeline to compute the output. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(InverseDeconvolutionImageFilter); diff --git a/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx index f41b33a9608..989ebbc2e74 100644 --- a/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx @@ -47,8 +47,8 @@ InverseDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInter const KernelImageType* kernelImage = this->GetKernelImage(); - InternalComplexImagePointerType input = ITK_NULLPTR; - InternalComplexImagePointerType kernel = ITK_NULLPTR; + InternalComplexImagePointerType input = nullptr; + InternalComplexImagePointerType kernel = nullptr; this->PrepareInputs( localInput, kernelImage, input, kernel, progress, 0.7 ); @@ -68,8 +68,8 @@ InverseDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInter progress->RegisterInternalFilter( inverseFilter, 0.1 ); // Free up the memory for the prepared inputs - input = ITK_NULLPTR; - kernel = ITK_NULLPTR; + input = nullptr; + kernel = nullptr; this->ProduceOutput( inverseFilter->GetOutput(), progress, 0.2 ); } diff --git a/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.h index 77bda44ed6e..7f0929bb30f 100644 --- a/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.h @@ -97,7 +97,7 @@ class ITK_TEMPLATE_EXPORT IterativeDeconvolutionImageFilter : protected: IterativeDeconvolutionImageFilter(); - virtual ~IterativeDeconvolutionImageFilter() ITK_OVERRIDE; + ~IterativeDeconvolutionImageFilter() override; /** Runs before iterating . */ virtual void Initialize(ProgressAccumulator * progress, @@ -119,11 +119,11 @@ class ITK_TEMPLATE_EXPORT IterativeDeconvolutionImageFilter : * execution model. * * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Generate the output image data. Uses a minipipeline, so * ThreadedGenerateData is not overridden. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Discrete Fourier transform of the padded kernel. */ InternalComplexImagePointerType m_TransferFunction; @@ -134,7 +134,7 @@ class ITK_TEMPLATE_EXPORT IterativeDeconvolutionImageFilter : typedef typename Superclass::FFTFilterType FFTFilterType; typedef typename Superclass::IFFTFilterType IFFTFilterType; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(IterativeDeconvolutionImageFilter); diff --git a/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx index 2211456919a..b1de2570d44 100644 --- a/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx @@ -31,8 +31,8 @@ IterativeDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInt m_NumberOfIterations = 1; m_Iteration = 0; m_StopIteration = false; - m_TransferFunction = ITK_NULLPTR; - m_CurrentEstimate = ITK_NULLPTR; + m_TransferFunction = nullptr; + m_CurrentEstimate = nullptr; m_InputMTime = 0L; m_KernelMTime = 0L; } @@ -41,8 +41,8 @@ template< typename TInputImage, typename TKernelImage, typename TOutputImage, ty IterativeDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision > ::~IterativeDeconvolutionImageFilter() { - m_TransferFunction = ITK_NULLPTR; - m_CurrentEstimate = ITK_NULLPTR; + m_TransferFunction = nullptr; + m_CurrentEstimate = nullptr; } template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision > @@ -82,8 +82,8 @@ IterativeDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInt { this->CropOutput( m_CurrentEstimate, progress, progressWeight ); - m_CurrentEstimate = ITK_NULLPTR; - m_TransferFunction = ITK_NULLPTR; + m_CurrentEstimate = nullptr; + m_TransferFunction = nullptr; } template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision > diff --git a/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.h index f035146fca3..c6412ecd5a0 100644 --- a/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.h @@ -136,21 +136,21 @@ class ITK_TEMPLATE_EXPORT LandweberDeconvolutionImageFilter : protected: LandweberDeconvolutionImageFilter(); - virtual ~LandweberDeconvolutionImageFilter() ITK_OVERRIDE; + ~LandweberDeconvolutionImageFilter() override; - virtual void Initialize(ProgressAccumulator * progress, + void Initialize(ProgressAccumulator * progress, float progressWeight, - float iterationProgressWeight) ITK_OVERRIDE; + float iterationProgressWeight) override; - virtual void Iteration(ProgressAccumulator * progress, - float iterationProgressWeight) ITK_OVERRIDE; + void Iteration(ProgressAccumulator * progress, + float iterationProgressWeight) override; - virtual void Finish(ProgressAccumulator *progress, float progressWeight) ITK_OVERRIDE; + void Finish(ProgressAccumulator *progress, float progressWeight) override; typedef typename Superclass::FFTFilterType FFTFilterType; typedef typename Superclass::IFFTFilterType IFFTFilterType; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LandweberDeconvolutionImageFilter); diff --git a/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx index a5a0828ab77..1d764c7c51c 100644 --- a/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx @@ -28,14 +28,14 @@ LandweberDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInt ::LandweberDeconvolutionImageFilter() { m_Alpha = 0.1; - m_TransformedInput = ITK_NULLPTR; + m_TransformedInput = nullptr; } template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision > LandweberDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision > ::~LandweberDeconvolutionImageFilter() { - m_TransformedInput = ITK_NULLPTR; + m_TransformedInput = nullptr; } template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision > @@ -99,8 +99,8 @@ LandweberDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInt { this->Superclass::Finish( progress, progressWeight ); - m_LandweberFilter = ITK_NULLPTR; - m_IFFTFilter = ITK_NULLPTR; + m_LandweberFilter = nullptr; + m_IFFTFilter = nullptr; } template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision > diff --git a/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.h index 977a37e94ae..4943d76b3d0 100644 --- a/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.h @@ -106,18 +106,18 @@ class ITK_TEMPLATE_EXPORT ParametricBlindLeastSquaresDeconvolutionImageFilter : protected: ParametricBlindLeastSquaresDeconvolutionImageFilter(); - virtual ~ParametricBlindLeastSquaresDeconvolutionImageFilter() ITK_OVERRIDE; + ~ParametricBlindLeastSquaresDeconvolutionImageFilter() override; - virtual void Initialize(ProgressAccumulator * progress, + void Initialize(ProgressAccumulator * progress, float progressWeight, - float iterationProgressWeight) ITK_OVERRIDE; + float iterationProgressWeight) override; - virtual void Iteration(ProgressAccumulator * progress, - float iterationProgressWeight) ITK_OVERRIDE; + void Iteration(ProgressAccumulator * progress, + float iterationProgressWeight) override; - virtual void Finish(ProgressAccumulator *progress, float progressWeight) ITK_OVERRIDE; + void Finish(ProgressAccumulator *progress, float progressWeight) override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ParametricBlindLeastSquaresDeconvolutionImageFilter); diff --git a/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx index 76849547a57..023ddd622f5 100644 --- a/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx @@ -103,7 +103,7 @@ ParametricBlindLeastSquaresDeconvolutionImageFilter< TInputImage, TKernelImage, { // Compute the new padded, shifted, and transformed kernel m_KernelSource->UpdateLargestPossibleRegion(); - InternalComplexImagePointerType preparedKernel = ITK_NULLPTR; + InternalComplexImagePointerType preparedKernel = nullptr; this->PrepareKernel( m_KernelSource->GetOutput(), preparedKernel, progress, 0.0 ); m_DifferenceFilter->SetInput1( m_TransformedCurrentEstimate ); @@ -266,10 +266,10 @@ ParametricBlindLeastSquaresDeconvolutionImageFilter< TInputImage, TKernelImage, this->Superclass::Finish( progress, progressWeight ); - m_TransformedInput = ITK_NULLPTR; - m_TransformedCurrentEstimate = ITK_NULLPTR; - m_DifferenceFilter = ITK_NULLPTR; - m_ImageUpdateFilter = ITK_NULLPTR; + m_TransformedInput = nullptr; + m_TransformedCurrentEstimate = nullptr; + m_DifferenceFilter = nullptr; + m_ImageUpdateFilter = nullptr; } template< typename TInputImage, typename TKernelImage, typename TOutputImage > diff --git a/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.h index 201c4dfb97f..864e41d5cb2 100644 --- a/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.h @@ -72,14 +72,14 @@ class ITK_TEMPLATE_EXPORT ProjectedIterativeDeconvolutionImageFilter : public TS protected: ProjectedIterativeDeconvolutionImageFilter(); - virtual ~ProjectedIterativeDeconvolutionImageFilter() ITK_OVERRIDE; + ~ProjectedIterativeDeconvolutionImageFilter() override; - virtual void Initialize(ProgressAccumulator * progress, + void Initialize(ProgressAccumulator * progress, float progressWeight, - float iterationProgressWeight) ITK_OVERRIDE; + float iterationProgressWeight) override; - virtual void Iteration(ProgressAccumulator * progress, - float iterationProgressWeight) ITK_OVERRIDE; + void Iteration(ProgressAccumulator * progress, + float iterationProgressWeight) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ProjectedIterativeDeconvolutionImageFilter); diff --git a/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx index e057cf62348..061d1042a1f 100644 --- a/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx @@ -27,14 +27,14 @@ template< typename TSuperclass > ProjectedIterativeDeconvolutionImageFilter< TSuperclass > ::ProjectedIterativeDeconvolutionImageFilter() { - m_ProjectionFilter = ITK_NULLPTR; + m_ProjectionFilter = nullptr; } template< typename TSuperclass > ProjectedIterativeDeconvolutionImageFilter< TSuperclass > ::~ProjectedIterativeDeconvolutionImageFilter() { - m_ProjectionFilter = ITK_NULLPTR; + m_ProjectionFilter = nullptr; } template< typename TSuperclass > diff --git a/Modules/Filtering/Deconvolution/include/itkProjectedLandweberDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkProjectedLandweberDeconvolutionImageFilter.h index 0b2b486cf40..2a8de79547c 100644 --- a/Modules/Filtering/Deconvolution/include/itkProjectedLandweberDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkProjectedLandweberDeconvolutionImageFilter.h @@ -77,7 +77,7 @@ class ITK_TEMPLATE_EXPORT ProjectedLandweberDeconvolutionImageFilter : protected: ProjectedLandweberDeconvolutionImageFilter(); - virtual ~ProjectedLandweberDeconvolutionImageFilter() ITK_OVERRIDE; + ~ProjectedLandweberDeconvolutionImageFilter() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ProjectedLandweberDeconvolutionImageFilter); diff --git a/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.h index ad97eb887e5..af4461e2a24 100644 --- a/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.h @@ -90,21 +90,21 @@ class ITK_TEMPLATE_EXPORT RichardsonLucyDeconvolutionImageFilter : protected: RichardsonLucyDeconvolutionImageFilter(); - virtual ~RichardsonLucyDeconvolutionImageFilter() ITK_OVERRIDE; + ~RichardsonLucyDeconvolutionImageFilter() override; - virtual void Initialize(ProgressAccumulator * progress, + void Initialize(ProgressAccumulator * progress, float progressWeight, - float iterationProgressWeight) ITK_OVERRIDE; + float iterationProgressWeight) override; - virtual void Iteration(ProgressAccumulator * progress, - float iterationProgressWeight) ITK_OVERRIDE; + void Iteration(ProgressAccumulator * progress, + float iterationProgressWeight) override; - virtual void Finish(ProgressAccumulator *progress, float progressWeight) ITK_OVERRIDE; + void Finish(ProgressAccumulator *progress, float progressWeight) override; typedef typename Superclass::FFTFilterType FFTFilterType; typedef typename Superclass::IFFTFilterType IFFTFilterType; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RichardsonLucyDeconvolutionImageFilter); diff --git a/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx index 25c8c2ae3d7..b6c8da3139d 100644 --- a/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx @@ -27,14 +27,14 @@ template< typename TInputImage, typename TKernelImage, typename TOutputImage, ty RichardsonLucyDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision > ::RichardsonLucyDeconvolutionImageFilter() { - m_PaddedInput = ITK_NULLPTR; + m_PaddedInput = nullptr; } template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision > RichardsonLucyDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision > ::~RichardsonLucyDeconvolutionImageFilter() { - m_PaddedInput = ITK_NULLPTR; + m_PaddedInput = nullptr; } template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision > @@ -146,14 +146,14 @@ RichardsonLucyDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, { this->Superclass::Finish( progress, progressWeight ); - m_ComplexMultiplyFilter1 = ITK_NULLPTR; - m_IFFTFilter1 = ITK_NULLPTR; - m_DivideFilter = ITK_NULLPTR; - m_FFTFilter = ITK_NULLPTR; - m_ConjugateAdaptor = ITK_NULLPTR; - m_ComplexMultiplyFilter2 = ITK_NULLPTR; - m_IFFTFilter2 = ITK_NULLPTR; - m_MultiplyFilter = ITK_NULLPTR; + m_ComplexMultiplyFilter1 = nullptr; + m_IFFTFilter1 = nullptr; + m_DivideFilter = nullptr; + m_FFTFilter = nullptr; + m_ConjugateAdaptor = nullptr; + m_ComplexMultiplyFilter2 = nullptr; + m_IFFTFilter2 = nullptr; + m_MultiplyFilter = nullptr; } template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision > diff --git a/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.h index 2e028ccedc4..d293bd5b99d 100644 --- a/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.h @@ -102,12 +102,12 @@ class ITK_TEMPLATE_EXPORT TikhonovDeconvolutionImageFilter : protected: TikhonovDeconvolutionImageFilter(); - ~TikhonovDeconvolutionImageFilter() ITK_OVERRIDE {} + ~TikhonovDeconvolutionImageFilter() override {} /** This filter uses a minipipeline to compute the output. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TikhonovDeconvolutionImageFilter); diff --git a/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx index 14ca7a52878..e327ca82235 100644 --- a/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx @@ -47,8 +47,8 @@ TikhonovDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInte const KernelImageType* kernelImage = this->GetKernelImage(); - InternalComplexImagePointerType input = ITK_NULLPTR; - InternalComplexImagePointerType kernel = ITK_NULLPTR; + InternalComplexImagePointerType input = nullptr; + InternalComplexImagePointerType kernel = nullptr; this->PrepareInputs( localInput, kernelImage, input, kernel, progress, 0.7 ); @@ -69,8 +69,8 @@ TikhonovDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInte progress->RegisterInternalFilter( tikhonovFilter, 0.1 ); // Free up the memory for the prepared inputs - input = ITK_NULLPTR; - kernel = ITK_NULLPTR; + input = nullptr; + kernel = nullptr; this->ProduceOutput( tikhonovFilter->GetOutput(), progress, 0.2 ); } diff --git a/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.h b/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.h index f094101ad3e..94cd4bef2f3 100644 --- a/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.h +++ b/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.h @@ -125,12 +125,12 @@ class ITK_TEMPLATE_EXPORT WienerDeconvolutionImageFilter : protected: WienerDeconvolutionImageFilter(); - ~WienerDeconvolutionImageFilter() ITK_OVERRIDE {} + ~WienerDeconvolutionImageFilter() override {} /** This filter uses a minipipeline to compute the output. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(WienerDeconvolutionImageFilter); diff --git a/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx b/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx index eaa5378f6c2..dd64934f622 100644 --- a/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx +++ b/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx @@ -47,8 +47,8 @@ WienerDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TIntern const KernelImageType* kernelImage = this->GetKernelImage(); - InternalComplexImagePointerType input = ITK_NULLPTR; - InternalComplexImagePointerType kernel = ITK_NULLPTR; + InternalComplexImagePointerType input = nullptr; + InternalComplexImagePointerType kernel = nullptr; this->PrepareInputs( localInput, kernelImage, input, kernel, progress, 0.7 ); @@ -68,8 +68,8 @@ WienerDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TIntern progress->RegisterInternalFilter( wienerFilter, 0.1 ); // Free up the memory for the prepared inputs - input = ITK_NULLPTR; - kernel = ITK_NULLPTR; + input = nullptr; + kernel = nullptr; this->ProduceOutput( wienerFilter->GetOutput(), progress, 0.2 ); } diff --git a/Modules/Filtering/Deconvolution/test/itkDeconvolutionIterationCommand.h b/Modules/Filtering/Deconvolution/test/itkDeconvolutionIterationCommand.h index e112814e97d..615a0a1c84e 100644 --- a/Modules/Filtering/Deconvolution/test/itkDeconvolutionIterationCommand.h +++ b/Modules/Filtering/Deconvolution/test/itkDeconvolutionIterationCommand.h @@ -33,12 +33,12 @@ class DeconvolutionIterationCommand : public itk::Command typedef itk::SmartPointer< Self > Pointer; itkNewMacro( Self ); - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { this->Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object *object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object *object, const itk::EventObject & event) override { m_NumberOfIterations++; if ( ! itk::IterationEvent().CheckEvent( &event ) ) @@ -49,9 +49,9 @@ class DeconvolutionIterationCommand : public itk::Command << m_NumberOfIterations << std::endl; const TFilterType * filter = static_cast< const TFilterType * >( object ); - if ( filter->GetCurrentEstimate() == ITK_NULLPTR ) + if ( filter->GetCurrentEstimate() == nullptr ) { - itkExceptionMacro(<< "CurrentEstimate is ITK_NULLPTR, but should not be."); + itkExceptionMacro(<< "CurrentEstimate is nullptr, but should not be."); } } diff --git a/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx index 1b20c1b2a95..28ed6e7a163 100644 --- a/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkParametricBlindLeastSquaresDeconvolutionImageFilterTest.cxx @@ -68,7 +68,7 @@ class ExampleImageSource : public GaussianImageSource< TOutputImage > * not mark the image source as modified; subclasses should override * this method to forward parameters through setters that call * Modified(). */ - virtual void SetParameters( const ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( const ParametersType & parameters ) override { ParametersType gaussianParameters = this->Superclass::GetParameters(); for ( unsigned int i = 0; i < OutputImageDimension; ++i ) @@ -80,7 +80,7 @@ class ExampleImageSource : public GaussianImageSource< TOutputImage > } /** Get the parameters for this source. */ - virtual ParametersType GetParameters() const ITK_OVERRIDE + ParametersType GetParameters() const override { ParametersType gaussianParameters = this->Superclass::GetParameters(); ParametersType parameters(OutputImageDimension); @@ -93,14 +93,14 @@ class ExampleImageSource : public GaussianImageSource< TOutputImage > } /** Get the number of parameters. */ - virtual unsigned int GetNumberOfParameters() const ITK_OVERRIDE + unsigned int GetNumberOfParameters() const override { return OutputImageDimension; } protected: ExampleImageSource() {}; - virtual ~ExampleImageSource() ITK_OVERRIDE {}; + ~ExampleImageSource() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(ExampleImageSource); diff --git a/Modules/Filtering/Deconvolution/test/itkRichardsonLucyDeconvolutionImageFilterTest.cxx b/Modules/Filtering/Deconvolution/test/itkRichardsonLucyDeconvolutionImageFilterTest.cxx index 74601507fe4..d255a775add 100644 --- a/Modules/Filtering/Deconvolution/test/itkRichardsonLucyDeconvolutionImageFilterTest.cxx +++ b/Modules/Filtering/Deconvolution/test/itkRichardsonLucyDeconvolutionImageFilterTest.cxx @@ -96,9 +96,9 @@ int itkRichardsonLucyDeconvolutionImageFilterTest(int argc, char* argv[]) const DeconvolutionFilterType::InternalImageType * estimate = deconvolutionFilter->GetCurrentEstimate(); - if ( estimate != ITK_NULLPTR ) + if ( estimate != nullptr ) { - std::cerr << "Estimate should be ITK_NULLPTR after the last iteration." << std::endl; + std::cerr << "Estimate should be nullptr after the last iteration." << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h index 04862f890a4..c4687aa1e56 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h @@ -247,13 +247,13 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingBaseImageFilter : protected: PatchBasedDenoisingBaseImageFilter(); - ~PatchBasedDenoisingBaseImageFilter() ITK_OVERRIDE; + ~PatchBasedDenoisingBaseImageFilter() override; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; virtual void CopyInputToOutput() = 0; diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx index 910ecd39842..00ebe56aae2 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx @@ -41,8 +41,8 @@ PatchBasedDenoisingBaseImageFilter m_ManualReinitialization( false ), m_State( UNINITIALIZED ) { - m_InputImage = ITK_NULLPTR; - m_OutputImage = ITK_NULLPTR; + m_InputImage = nullptr; + m_OutputImage = nullptr; } template @@ -239,7 +239,7 @@ PatchBasedDenoisingBaseImageFilter thisPtr->Superclass::VerifyPreconditions(); // Cache input image, if it has not yet been set. - if( thisPtr->m_InputImage == ITK_NULLPTR ) + if( thisPtr->m_InputImage == nullptr ) { thisPtr->m_InputImage = this->GetInput(); } diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h index f6ac84e0d29..0d3599a8bbb 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h @@ -212,18 +212,18 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter : protected: PatchBasedDenoisingImageFilter(); - ~PatchBasedDenoisingImageFilter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~PatchBasedDenoisingImageFilter() override; + void PrintSelf(std::ostream& os, Indent indent) const override; /** Clean up Eigensystem caches */ virtual void EmptyCaches(); /** Allocate memory for a temporary update container in the subclass*/ - virtual void AllocateUpdateBuffer() ITK_OVERRIDE; + void AllocateUpdateBuffer() override; - virtual void CopyInputToOutput() ITK_OVERRIDE; + void CopyInputToOutput() override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** \brief A method to generically get a component. * @@ -386,17 +386,17 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter : virtual void EnforceConstraints(); - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; virtual void InitializeKernelSigma(); - virtual void InitializePatchWeights() ITK_OVERRIDE; + void InitializePatchWeights() override; virtual void InitializePatchWeightsSmoothDisc(); - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; - virtual void ComputeKernelBandwidthUpdate() ITK_OVERRIDE; // derived from base class; + void ComputeKernelBandwidthUpdate() override; // derived from base class; // define here @@ -406,7 +406,7 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter : virtual RealArrayType ResolveSigmaUpdate(); - virtual void ComputeImageUpdate() ITK_OVERRIDE; + void ComputeImageUpdate() override; virtual ThreadDataStruct ThreadedComputeImageUpdate(const InputImageRegionType& regionToProcess, const int threadId, @@ -417,12 +417,12 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter : BaseSamplerPointer& sampler, ThreadDataStruct& threadData); - virtual void ApplyUpdate() ITK_OVERRIDE; + void ApplyUpdate() override; virtual void ThreadedApplyUpdate(const InputImageRegionType& regionToProcess, const int itkNotUsed(threadId) ); - virtual void PostProcessOutput() ITK_OVERRIDE; + void PostProcessOutput() override; virtual void SetThreadData(int threadId, const ThreadDataStruct& data); diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx index 5e1c362f7f6..52bca6960d3 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx @@ -145,7 +145,7 @@ PatchBasedDenoisingImageFilter { if( !this->m_InputImage || !this->m_OutputImage ) { - itkExceptionMacro(<< "Input or Output image is ITK_NULLPTR."); + itkExceptionMacro(<< "Input or Output image is nullptr."); } InputImageRegionConstIteratorType inputIt( this->m_InputImage, this->m_InputImage->GetRequestedRegion() ); @@ -331,7 +331,7 @@ PatchBasedDenoisingImageFilter newStruct.minNorm[ic] = 0; newStruct.maxNorm[ic] = 0; } - newStruct.sampler = ITK_NULLPTR; + newStruct.sampler = nullptr; m_ThreadData.push_back( newStruct ); } @@ -2499,7 +2499,7 @@ PatchBasedDenoisingImageFilter << std::endl; os << indent << "PatchRadius (voxel space): "; - if( this->m_InputImage != ITK_NULLPTR ) + if( this->m_InputImage != nullptr ) { os << this->GetPatchRadiusInVoxels() << std::endl; } diff --git a/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx b/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx index e0a8710f65b..146abcbae8c 100644 --- a/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx +++ b/Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx @@ -50,7 +50,7 @@ typename TFilter::RealArrayType ParseKernelBandwithSigma( char* kernelBandwithSi { (*kernelBandwithSigmaIn)++; } - else if( endPtr == NULL || *endPtr == 0 ) + else if( endPtr == nullptr || *endPtr == 0 ) { kernelBandwithSigmaOut[i] = value; break; diff --git a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h index e3cefb42d36..44a1cb2bc40 100644 --- a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h +++ b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h @@ -278,17 +278,17 @@ class ITK_TEMPLATE_EXPORT DiffusionTensor3DReconstructionImageFilter: protected: DiffusionTensor3DReconstructionImageFilter(); - ~DiffusionTensor3DReconstructionImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DiffusionTensor3DReconstructionImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; void ComputeTensorBasis(); - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; void ThreadedGenerateData(const - OutputImageRegionType & outputRegionForThread, ThreadIdType) ITK_OVERRIDE; + OutputImageRegionType & outputRegionForThread, ThreadIdType) override; - void VerifyPreconditions() ITK_OVERRIDE; + void VerifyPreconditions() override; /** enum to indicate if the gradient image is specified as a single multi- * component image or as several separate images */ diff --git a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx index 0e67715a148..dc31b1f17a7 100644 --- a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx +++ b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx @@ -45,7 +45,7 @@ DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType, m_NumberOfBaselineImages = 1; m_Threshold = NumericTraits< ReferencePixelType >::min(); m_GradientImageTypeEnumeration = Else; - m_GradientDirectionContainer = ITK_NULLPTR; + m_GradientDirectionContainer = nullptr; m_TensorBasis.set_identity(); m_BValue = 1.0; m_MaskImagePresent = false; @@ -322,7 +322,7 @@ void DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType, GradientIteratorType; typedef typename GradientImagesType::PixelType GradientVectorType; - typename GradientImagesType::Pointer gradientImagePointer = ITK_NULLPTR; + typename GradientImagesType::Pointer gradientImagePointer = nullptr; // Would have liked a dynamic_cast here, but seems SGI doesn't like it // The enum will ensure that an inappropriate cast is not done diff --git a/Modules/Filtering/DiffusionTensorImage/include/itkTensorFractionalAnisotropyImageFilter.h b/Modules/Filtering/DiffusionTensorImage/include/itkTensorFractionalAnisotropyImageFilter.h index 42b9c8c1e9a..e42cfe85306 100644 --- a/Modules/Filtering/DiffusionTensorImage/include/itkTensorFractionalAnisotropyImageFilter.h +++ b/Modules/Filtering/DiffusionTensorImage/include/itkTensorFractionalAnisotropyImageFilter.h @@ -99,7 +99,7 @@ class TensorFractionalAnisotropyImageFilter: itkNewMacro(Self); /** Print internal ivars */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { this->Superclass::PrintSelf(os, indent); } #ifdef ITK_USE_CONCEPT_CHECKING @@ -111,7 +111,7 @@ class TensorFractionalAnisotropyImageFilter: protected: TensorFractionalAnisotropyImageFilter() {} - virtual ~TensorFractionalAnisotropyImageFilter() ITK_OVERRIDE {} + ~TensorFractionalAnisotropyImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(TensorFractionalAnisotropyImageFilter); diff --git a/Modules/Filtering/DiffusionTensorImage/include/itkTensorRelativeAnisotropyImageFilter.h b/Modules/Filtering/DiffusionTensorImage/include/itkTensorRelativeAnisotropyImageFilter.h index 43c8db688b7..7fb24704f62 100644 --- a/Modules/Filtering/DiffusionTensorImage/include/itkTensorRelativeAnisotropyImageFilter.h +++ b/Modules/Filtering/DiffusionTensorImage/include/itkTensorRelativeAnisotropyImageFilter.h @@ -98,7 +98,7 @@ class TensorRelativeAnisotropyImageFilter: itkNewMacro(Self); /** Print internal ivars */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { this->Superclass::PrintSelf(os, indent); } #ifdef ITK_USE_CONCEPT_CHECKING @@ -110,7 +110,7 @@ class TensorRelativeAnisotropyImageFilter: protected: TensorRelativeAnisotropyImageFilter() {} - virtual ~TensorRelativeAnisotropyImageFilter() ITK_OVERRIDE {} + ~TensorRelativeAnisotropyImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(TensorRelativeAnisotropyImageFilter); diff --git a/Modules/Filtering/DisplacementField/include/itkBSplineExponentialDiffeomorphicTransform.h b/Modules/Filtering/DisplacementField/include/itkBSplineExponentialDiffeomorphicTransform.h index 27060d7d10d..d00019f5ae5 100644 --- a/Modules/Filtering/DisplacementField/include/itkBSplineExponentialDiffeomorphicTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkBSplineExponentialDiffeomorphicTransform.h @@ -108,7 +108,7 @@ class ITK_TEMPLATE_EXPORT BSplineExponentialDiffeomorphicTransform : * base class implementation as we might want to smooth the update field before * adding it to the velocity field */ - virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override; /** * Smooth the constant velocity field in-place. @@ -159,9 +159,9 @@ class ITK_TEMPLATE_EXPORT BSplineExponentialDiffeomorphicTransform : protected: BSplineExponentialDiffeomorphicTransform(); - virtual ~BSplineExponentialDiffeomorphicTransform() ITK_OVERRIDE; + ~BSplineExponentialDiffeomorphicTransform() override; - void PrintSelf( std::ostream &, Indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream &, Indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineExponentialDiffeomorphicTransform); diff --git a/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h b/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h index d9c668fd83d..1ddb175ed49 100644 --- a/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h @@ -102,7 +102,7 @@ class ITK_TEMPLATE_EXPORT BSplineSmoothingOnUpdateDisplacementFieldTransform : * added to the field. * See base class for more details. */ - virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override; /** * Set the spline order defining the bias field estimate. Default = 3. @@ -175,12 +175,12 @@ class ITK_TEMPLATE_EXPORT BSplineSmoothingOnUpdateDisplacementFieldTransform : protected: BSplineSmoothingOnUpdateDisplacementFieldTransform(); - virtual ~BSplineSmoothingOnUpdateDisplacementFieldTransform() ITK_OVERRIDE; + ~BSplineSmoothingOnUpdateDisplacementFieldTransform() override; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** Clone the current transform */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; /** * Smooth the displacement field using B-splines. diff --git a/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.h b/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.h index 62b43fd86b5..879128a0ad8 100644 --- a/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.h @@ -126,16 +126,16 @@ class ITK_TEMPLATE_EXPORT ComposeDisplacementFieldsImageFilter ComposeDisplacementFieldsImageFilter(); /** Deconstructor */ - virtual ~ComposeDisplacementFieldsImageFilter() ITK_OVERRIDE; + ~ComposeDisplacementFieldsImageFilter() override; /** Standard print self function **/ - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** preprocessing function */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Multithreaded function which generates the output field. */ - void ThreadedGenerateData( const RegionType &, ThreadIdType ) ITK_OVERRIDE; + void ThreadedGenerateData( const RegionType &, ThreadIdType ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ComposeDisplacementFieldsImageFilter); diff --git a/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.h b/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.h index e03f873c979..ba99fa49006 100644 --- a/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.h @@ -123,7 +123,7 @@ class ITK_TEMPLATE_EXPORT ConstantVelocityFieldTransform : virtual void SetConstantVelocityField( ConstantVelocityFieldType * ); itkGetModifiableObjectMacro(ConstantVelocityField, ConstantVelocityFieldType ); - virtual void SetFixedParameters( const FixedParametersType & ) ITK_OVERRIDE; + void SetFixedParameters( const FixedParametersType & ) override; /** Get/Set the interpolator. * Create out own set accessor that assigns the velocity field */ @@ -133,13 +133,13 @@ class ITK_TEMPLATE_EXPORT ConstantVelocityFieldTransform : /** Get the modification time of velocity field */ itkGetConstReferenceMacro( ConstantVelocityFieldSetTime, ModifiedTimeType ); - virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override; /** Return an inverse of this transform. */ bool GetInverse( Self *inverse ) const; /** Return an inverse of this transform. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; /** Trigger the computation of the displacement field by integrating * the constant velocity field. */ @@ -187,11 +187,11 @@ class ITK_TEMPLATE_EXPORT ConstantVelocityFieldTransform : protected: ConstantVelocityFieldTransform(); - virtual ~ConstantVelocityFieldTransform() ITK_OVERRIDE; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~ConstantVelocityFieldTransform() override; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** Clone the current transform */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; typename DisplacementFieldType::Pointer CopyDisplacementField( const DisplacementFieldType * ) const; diff --git a/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx index 0a60f2080b1..b1f544edccd 100644 --- a/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx @@ -34,7 +34,7 @@ namespace itk template ConstantVelocityFieldTransform ::ConstantVelocityFieldTransform() : - m_ConstantVelocityField( ITK_NULLPTR ), + m_ConstantVelocityField( nullptr ), m_CalculateNumberOfIntegrationStepsAutomatically( false ), m_ConstantVelocityFieldSetTime( 0 ) { @@ -119,7 +119,7 @@ ConstantVelocityFieldTransform } else { - return ITK_NULLPTR; + return nullptr; } } diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h index 59fe5891eb9..d1451f804b8 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h @@ -171,7 +171,7 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldJacobianDeterminantFilter: * pipeline execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Set the derivative weights according to the spacing of the input image (1/spacing). Use this option if you want to calculate the Jacobian @@ -201,12 +201,12 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldJacobianDeterminantFilter: protected: DisplacementFieldJacobianDeterminantFilter(); - virtual ~DisplacementFieldJacobianDeterminantFilter() ITK_OVERRIDE {} + ~DisplacementFieldJacobianDeterminantFilter() override {} /** Do any necessary casting/copying of the input data. Input pixel types whose value types are not real number types must be cast to real number types. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** DisplacementFieldJacobianDeterminantFilter can be implemented as a * multithreaded filter (we're only using vnl_det(), which is trivially @@ -221,9 +221,9 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldJacobianDeterminantFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef typename InputImageType::Superclass ImageBaseType; diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.h b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.h index cb4587106c7..a0bcfe1fe64 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.h @@ -254,13 +254,13 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldToBSplineImageFilter DisplacementFieldToBSplineImageFilter(); /** Deconstructor */ - virtual ~DisplacementFieldToBSplineImageFilter() ITK_OVERRIDE; + ~DisplacementFieldToBSplineImageFilter() override; /** Standard print self function **/ - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** preprocessing function */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DisplacementFieldToBSplineImageFilter); diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx index 97f04b353d0..7a9ec384d0d 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx @@ -45,7 +45,7 @@ DisplacementFieldToBSplineImageFilter this->m_NumberOfFittingLevels.Fill( 1 ); this->m_NumberOfControlPoints.Fill( 4 ); - this->m_PointWeights = ITK_NULLPTR; + this->m_PointWeights = nullptr; this->m_BSplineDomainOrigin.Fill( 0.0 ); this->m_BSplineDomainSpacing.Fill( 1.0 ); diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.h b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.h index 29feca5d0ee..3f6519e73af 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.h @@ -210,23 +210,23 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldTransform : /** Method to transform a point. Out-of-bounds points will * be returned with zero displacemnt. */ - virtual OutputPointType TransformPoint( const InputPointType& thisPoint ) const ITK_OVERRIDE; + OutputPointType TransformPoint( const InputPointType& thisPoint ) const override; /** Method to transform a vector. */ using Superclass::TransformVector; - virtual OutputVectorType TransformVector(const InputVectorType &) const ITK_OVERRIDE + OutputVectorType TransformVector(const InputVectorType &) const override { itkExceptionMacro( "TransformVector(Vector) unimplemented, use " "TransformVector(Vector,Point)" ); } - virtual OutputVectorPixelType TransformVector(const InputVectorPixelType &) const ITK_OVERRIDE + OutputVectorPixelType TransformVector(const InputVectorPixelType &) const override { itkExceptionMacro( "TransformVector(Vector) unimplemented, use " "TransformVector(Vector,Point)" ); } - virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &) const ITK_OVERRIDE + OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override { itkExceptionMacro( "TransformVector(Vector) unimplemented, use " "TransformVector(Vector,Point)" ); @@ -250,15 +250,15 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldTransform : /** Method to transform a CovariantVector. */ using Superclass::TransformCovariantVector; - virtual OutputCovariantVectorType TransformCovariantVector( - const InputCovariantVectorType &) const ITK_OVERRIDE + OutputCovariantVectorType TransformCovariantVector( + const InputCovariantVectorType &) const override { itkExceptionMacro( "TransformCovariantVector(CovariantVector) " "unimplemented, use TransformCovariantVector(CovariantVector,Point)" ); } - virtual OutputVectorPixelType TransformCovariantVector( - const InputVectorPixelType &) const ITK_OVERRIDE + OutputVectorPixelType TransformCovariantVector( + const InputVectorPixelType &) const override { itkExceptionMacro( "TransformCovariantVector(CovariantVector) " "unimplemented, use TransformCovariantVector(CovariantVector,Point)" ); @@ -266,7 +266,7 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldTransform : /** Set the transformation parameters. This sets the displacement * field image directly. */ - virtual void SetParameters(const ParametersType & params) ITK_OVERRIDE + void SetParameters(const ParametersType & params) override { if( &(this->m_Parameters) != ¶ms ) { @@ -291,7 +291,7 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldTransform : * creates a new one with zero displacement (identity transform). If * an inverse displacement field exists, a new one is also created. */ - virtual void SetFixedParameters( const FixedParametersType & ) ITK_OVERRIDE; + void SetFixedParameters( const FixedParametersType & ) override; /** * Compute the jacobian with respect to the parameters at a point. @@ -314,8 +314,8 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldTransform : * * TODO: format the above for doxygen formula. */ - virtual void ComputeJacobianWithRespectToParameters(const InputPointType &, - JacobianType & j) const ITK_OVERRIDE + void ComputeJacobianWithRespectToParameters(const InputPointType &, + JacobianType & j) const override { j = this->m_IdentityJacobian; } @@ -336,13 +336,13 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldTransform : * Compute the jacobian with respect to the position, by point. * \c j will be resized as needed. */ - virtual void ComputeJacobianWithRespectToPosition(const InputPointType & x, JacobianType & j ) const ITK_OVERRIDE; + void ComputeJacobianWithRespectToPosition(const InputPointType & x, JacobianType & j ) const override; /** * Compute the jacobian with respect to the position, by point. * \c j will be resized as needed. */ - virtual void ComputeInverseJacobianWithRespectToPosition(const InputPointType & x, JacobianType & j ) const ITK_OVERRIDE; + void ComputeInverseJacobianWithRespectToPosition(const InputPointType & x, JacobianType & j ) const override; /** * Compute the jacobian with respect to the position, by index. @@ -379,7 +379,7 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldTransform : virtual void GetInverseJacobianOfForwardFieldWithRespectToPosition(const IndexType & index, JacobianType & jacobian, bool useSVD = false ) const; - virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override; /** Return an inverse of this transform. * Note that the inverse displacement field must be set by the user. */ @@ -387,17 +387,17 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldTransform : /** Return an inverse of this transform. * Note that the inverse displacement field must be set by the user. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; virtual void SetIdentity(); /** This transform is not linear. */ - virtual TransformCategoryType GetTransformCategory() const ITK_OVERRIDE + TransformCategoryType GetTransformCategory() const override { return Self::DisplacementField; } - virtual NumberOfParametersType GetNumberOfLocalParameters(void) const ITK_OVERRIDE + NumberOfParametersType GetNumberOfLocalParameters(void) const override { return Dimension; } @@ -425,8 +425,8 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldTransform : protected: DisplacementFieldTransform(); - virtual ~DisplacementFieldTransform() ITK_OVERRIDE; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~DisplacementFieldTransform() override; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** The displacement field and its inverse (if it exists). */ typename DisplacementFieldType::Pointer m_DisplacementField; diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx index 61eea59c763..62380c9c127 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx @@ -138,7 +138,7 @@ DisplacementFieldTransform } else { - return ITK_NULLPTR; + return nullptr; } } @@ -371,7 +371,7 @@ void DisplacementFieldTransform if( !this->m_InverseDisplacementField.IsNull() ) { - this->m_InverseDisplacementField = ITK_NULLPTR; + this->m_InverseDisplacementField = nullptr; } this->Modified(); @@ -528,8 +528,8 @@ DisplacementFieldTransform } if ( nullState ) { - this->SetDisplacementField( ITK_NULLPTR ); - this->SetInverseDisplacementField( ITK_NULLPTR ); + this->SetDisplacementField( nullptr ); + this->SetInverseDisplacementField( nullptr ); return; } diff --git a/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.h b/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.h index 1aa6fd6452e..0dedd07835d 100644 --- a/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.h @@ -132,14 +132,14 @@ class ITK_TEMPLATE_EXPORT ExponentialDisplacementFieldImageFilter: protected: ExponentialDisplacementFieldImageFilter(); - virtual ~ExponentialDisplacementFieldImageFilter() ITK_OVERRIDE {} + ~ExponentialDisplacementFieldImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** * GenerateData() */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; typedef typename InputImageType::RegionType RegionType; diff --git a/Modules/Filtering/DisplacementField/include/itkGaussianExponentialDiffeomorphicTransform.h b/Modules/Filtering/DisplacementField/include/itkGaussianExponentialDiffeomorphicTransform.h index 075665fbaff..8524901a1bb 100644 --- a/Modules/Filtering/DisplacementField/include/itkGaussianExponentialDiffeomorphicTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkGaussianExponentialDiffeomorphicTransform.h @@ -92,7 +92,7 @@ class ITK_TEMPLATE_EXPORT GaussianExponentialDiffeomorphicTransform : * base class implementation as we might want to smooth the update field before * adding it to the velocity field */ - virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override; /** Smooth the velocity field in-place. * \warning Not thread safe. Does its own threading. @@ -113,7 +113,7 @@ class ITK_TEMPLATE_EXPORT GaussianExponentialDiffeomorphicTransform : protected: GaussianExponentialDiffeomorphicTransform(); - virtual ~GaussianExponentialDiffeomorphicTransform() ITK_OVERRIDE; + ~GaussianExponentialDiffeomorphicTransform() override; /** Type of Gaussian Operator used during smoothing. Define here * so we can use a member var during the operation. */ @@ -125,7 +125,7 @@ class ITK_TEMPLATE_EXPORT GaussianExponentialDiffeomorphicTransform : GaussianSmoothingOperatorType m_GaussianSmoothingOperator; - void PrintSelf( std::ostream &, Indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream &, Indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GaussianExponentialDiffeomorphicTransform); diff --git a/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.h b/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.h index 5a5f1321fea..1ea733bcaff 100644 --- a/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransform.h @@ -92,7 +92,7 @@ class ITK_TEMPLATE_EXPORT GaussianSmoothingOnUpdateDisplacementFieldTransform : * added to the field. * See base class for more details. */ - virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override; /** Smooth the displacement field in-place. * Uses m_GaussSmoothSigma to change the variance for the GaussianOperator. @@ -102,11 +102,11 @@ class ITK_TEMPLATE_EXPORT GaussianSmoothingOnUpdateDisplacementFieldTransform : protected: GaussianSmoothingOnUpdateDisplacementFieldTransform(); - virtual ~GaussianSmoothingOnUpdateDisplacementFieldTransform() ITK_OVERRIDE; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~GaussianSmoothingOnUpdateDisplacementFieldTransform() override; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** Clone the current transform */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; /** Used in GaussianSmoothDisplacementField as variance for the * GaussianOperator */ diff --git a/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.h b/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.h index ab9c683f684..ad31fa33059 100644 --- a/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.h @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTrans * added to the field. * See base class for more details. */ - virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override; /** Smooth the displacement field in-place. * Uses m_GaussSmoothSigma to change the variance for the GaussianOperator. @@ -115,8 +115,8 @@ class ITK_TEMPLATE_EXPORT GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTrans protected: GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform(); - virtual ~GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform() ITK_OVERRIDE; - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform() override; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** Track when the temporary displacement field used during smoothing * was last modified/initialized. We only want to change it if the diff --git a/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h b/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h index 3f396159ee0..a738ea2aff7 100644 --- a/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h @@ -153,17 +153,17 @@ class ITK_TEMPLATE_EXPORT InverseDisplacementFieldImageFilter: * for GenerateOutputInformation() in order to inform the pipeline * execution model. The original documentation of this method is * below. \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** InverseDisplacementFieldImageFilter needs a different input requested region than * the output requested region. As such, InverseDisplacementFieldImageFilter needs * to provide an implementation for GenerateInputRequestedRegion() * in order to inform the pipeline execution model. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Method Compute the Modified Time based on changed to the components. */ - ModifiedTimeType GetMTime(void) const ITK_OVERRIDE; + ModifiedTimeType GetMTime(void) const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -174,14 +174,14 @@ class ITK_TEMPLATE_EXPORT InverseDisplacementFieldImageFilter: protected: InverseDisplacementFieldImageFilter(); - ~InverseDisplacementFieldImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~InverseDisplacementFieldImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** * GenerateData() computes the internal KernelBase spline and resamples * the displacement field. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Subsample the input displacement field and generate the * landmarks for the kernel base spline diff --git a/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h b/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h index 362df1b18b0..a160a25d473 100644 --- a/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h @@ -139,16 +139,16 @@ class ITK_TEMPLATE_EXPORT InvertDisplacementFieldImageFilter InvertDisplacementFieldImageFilter(); /** Deconstructor */ - virtual ~InvertDisplacementFieldImageFilter() ITK_OVERRIDE; + ~InvertDisplacementFieldImageFilter() override; /** Standard print self function **/ - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** preprocessing function */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Multithreaded function which generates the output field. */ - void ThreadedGenerateData( const RegionType &, ThreadIdType ) ITK_OVERRIDE; + void ThreadedGenerateData( const RegionType &, ThreadIdType ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(InvertDisplacementFieldImageFilter); diff --git a/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.h b/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.h index 4ea63364d0c..d74d8fd0d4b 100644 --- a/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.h @@ -113,11 +113,11 @@ class ITK_TEMPLATE_EXPORT IterativeInverseDisplacementFieldImageFilter: protected: IterativeInverseDisplacementFieldImageFilter(); - ~IterativeInverseDisplacementFieldImageFilter() ITK_OVERRIDE {} + ~IterativeInverseDisplacementFieldImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; unsigned int m_NumberOfIterations; diff --git a/Modules/Filtering/DisplacementField/include/itkLandmarkDisplacementFieldSource.h b/Modules/Filtering/DisplacementField/include/itkLandmarkDisplacementFieldSource.h index 1167fc5e3ca..b50c241297d 100644 --- a/Modules/Filtering/DisplacementField/include/itkLandmarkDisplacementFieldSource.h +++ b/Modules/Filtering/DisplacementField/include/itkLandmarkDisplacementFieldSource.h @@ -135,21 +135,21 @@ class ITK_TEMPLATE_EXPORT LandmarkDisplacementFieldSource: * for GenerateOutputInformation() in order to inform the pipeline * execution model. The original documentation of this method is * below. \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** Method Compute the Modified Time based on changed to the components. */ - ModifiedTimeType GetMTime(void) const ITK_OVERRIDE; + ModifiedTimeType GetMTime(void) const override; protected: LandmarkDisplacementFieldSource(); - ~LandmarkDisplacementFieldSource() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LandmarkDisplacementFieldSource() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** * GenerateData() computes the internal KernelBase spline and resamples * the displacement field. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Subsample the input displacement field and generate the * landmarks for the kernel base spline diff --git a/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.h b/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.h index 1a4b91154f5..8805c2df517 100644 --- a/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.h @@ -144,10 +144,10 @@ class ITK_TEMPLATE_EXPORT TimeVaryingBSplineVelocityFieldTransform : * to perform any required operations on the update parameters, typically * a converion to member variables for use in TransformPoint. */ - virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override; /** Trigger the computation of the displacement field by integrating the time-varying velocity field. */ - virtual void IntegrateVelocityField() ITK_OVERRIDE; + void IntegrateVelocityField() override; /** Set/Get sampled velocity field origin */ itkSetMacro( VelocityFieldOrigin, VelocityFieldPointType ); @@ -171,8 +171,8 @@ class ITK_TEMPLATE_EXPORT TimeVaryingBSplineVelocityFieldTransform : protected: TimeVaryingBSplineVelocityFieldTransform(); - virtual ~TimeVaryingBSplineVelocityFieldTransform() ITK_OVERRIDE; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~TimeVaryingBSplineVelocityFieldTransform() override; + void PrintSelf( std::ostream& os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TimeVaryingBSplineVelocityFieldTransform); diff --git a/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.h b/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.h index 931fb4058ef..310784a756d 100644 --- a/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.h @@ -149,15 +149,15 @@ class ITK_TEMPLATE_EXPORT TimeVaryingVelocityFieldIntegrationImageFilter : protected: TimeVaryingVelocityFieldIntegrationImageFilter(); - ~TimeVaryingVelocityFieldIntegrationImageFilter() ITK_OVERRIDE; + ~TimeVaryingVelocityFieldIntegrationImageFilter() override; - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void ThreadedGenerateData( const OutputRegionType &, ThreadIdType ) ITK_OVERRIDE; + void ThreadedGenerateData( const OutputRegionType &, ThreadIdType ) override; VectorType IntegrateVelocityAtPoint( const PointType &initialSpatialPoint, const TimeVaryingVelocityFieldType * inputField ); diff --git a/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldTransform.h b/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldTransform.h index 396c143e410..bc9ccda2ab0 100644 --- a/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldTransform.h @@ -120,11 +120,11 @@ class ITK_TEMPLATE_EXPORT TimeVaryingVelocityFieldTransform : /** Trigger the computation of the displacement field by integrating * the time-varying velocity field. */ - virtual void IntegrateVelocityField() ITK_OVERRIDE; + void IntegrateVelocityField() override; protected: TimeVaryingVelocityFieldTransform(); - virtual ~TimeVaryingVelocityFieldTransform() ITK_OVERRIDE; + ~TimeVaryingVelocityFieldTransform() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TimeVaryingVelocityFieldTransform); diff --git a/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h b/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h index 0781d6cb3de..5db1083299b 100644 --- a/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h @@ -157,15 +157,15 @@ class ITK_TEMPLATE_EXPORT TransformToDisplacementFieldFilter: protected: TransformToDisplacementFieldFilter(); - virtual ~TransformToDisplacementFieldFilter() ITK_OVERRIDE {} + ~TransformToDisplacementFieldFilter() override {} /** Produces a Vector Image. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** TransformToDisplacementFieldFilter can be implemented as a multithreaded * filter. */ - virtual void ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId ) override; /** Default implementation for resampling that works for any * transformation type. @@ -177,7 +177,7 @@ class ITK_TEMPLATE_EXPORT TransformToDisplacementFieldFilter: */ void LinearThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId ); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TransformToDisplacementFieldFilter); diff --git a/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.h b/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.h index 47a8a15adf5..d9a5bc0de20 100644 --- a/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.h +++ b/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.h @@ -118,7 +118,7 @@ class ITK_TEMPLATE_EXPORT VelocityFieldTransform : virtual void SetVelocityField( VelocityFieldType * ); itkGetModifiableObjectMacro(VelocityField, VelocityFieldType ); - virtual void SetFixedParameters( const FixedParametersType & ) ITK_OVERRIDE; + void SetFixedParameters( const FixedParametersType & ) override; /** Get/Set the interpolator. * Create out own set accessor that assigns the velocity field */ @@ -133,7 +133,7 @@ class ITK_TEMPLATE_EXPORT VelocityFieldTransform : * implementation since we don't want to optimize over the deformation * field for this class but rather the time-varying velocity field */ - virtual void SetDisplacementField( DisplacementFieldType * displacementField) ITK_OVERRIDE + void SetDisplacementField( DisplacementFieldType * displacementField) override { itkDebugMacro("setting DisplacementField to " << displacementField); if ( this->m_DisplacementField != displacementField ) @@ -143,13 +143,13 @@ class ITK_TEMPLATE_EXPORT VelocityFieldTransform : } } - virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE; + void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override; /** Return an inverse of this transform. */ bool GetInverse( Self *inverse ) const; /** Return an inverse of this transform. */ - virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE; + InverseTransformBasePointer GetInverseTransform() const override; /** Trigger the computation of the displacement field by integrating the velocity field. */ virtual void IntegrateVelocityField() {}; @@ -191,11 +191,11 @@ class ITK_TEMPLATE_EXPORT VelocityFieldTransform : protected: VelocityFieldTransform(); - virtual ~VelocityFieldTransform() ITK_OVERRIDE; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~VelocityFieldTransform() override; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** Clone the current transform */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; typename DisplacementFieldType::Pointer CopyDisplacementField( const DisplacementFieldType * ) const; diff --git a/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx index ab6f296bda1..33b135b0fd0 100644 --- a/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx @@ -117,7 +117,7 @@ VelocityFieldTransform } else { - return ITK_NULLPTR; + return nullptr; } } diff --git a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx index 80c6a4c0f19..382d00b0aac 100644 --- a/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx +++ b/Modules/Filtering/DisplacementField/test/itkDisplacementFieldTransformTest.cxx @@ -628,7 +628,7 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) // The inverse displacement field for the inverse displacement transform must - // have been set to ITK_NULLPTR when calling SetDisplacementField(), so + // have been set to nullptr when calling SetDisplacementField(), so // 'false' should be returned here DisplacementTransformType::Pointer inverseTransform = DisplacementTransformType::New(); if( displacementTransform->GetInverse( inverseTransform ) ) @@ -648,8 +648,8 @@ int itkDisplacementFieldTransformTest( int argc, char* argv[] ) displacementTransform->SetIdentity(); - displacementTransform->SetDisplacementField( ITK_NULLPTR ); - displacementTransform->SetInverseDisplacementField( ITK_NULLPTR ); + displacementTransform->SetDisplacementField( nullptr ); + displacementTransform->SetInverseDisplacementField( nullptr ); // Check setting all zero for fixed parameters displacementTransform = DisplacementTransformType::New(); diff --git a/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.h b/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.h index 07c18bec33c..efc33e72a7a 100644 --- a/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.h @@ -130,10 +130,10 @@ class ITK_TEMPLATE_EXPORT ApproximateSignedDistanceMapImageFilter:public ImageTo protected: ApproximateSignedDistanceMapImageFilter(); - virtual ~ApproximateSignedDistanceMapImageFilter() ITK_OVERRIDE {} - virtual void GenerateData() ITK_OVERRIDE; + ~ApproximateSignedDistanceMapImageFilter() override {} + void GenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ApproximateSignedDistanceMapImageFilter); diff --git a/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.h b/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.h index e6981777491..aa110983870 100644 --- a/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.h @@ -126,30 +126,30 @@ class ITK_TEMPLATE_EXPORT ContourDirectedMeanDistanceImageFilter: protected: ContourDirectedMeanDistanceImageFilter(); - ~ContourDirectedMeanDistanceImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ContourDirectedMeanDistanceImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Pass the input through unmodified. Do this by Grafting in the AllocateOutputs method. */ - void AllocateOutputs() ITK_OVERRIDE; + void AllocateOutputs() override; /** Initialize some accumulators before the threads run. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Do final mean and variance computation from data accumulated in threads. */ - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const RegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion(DataObject *data) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *data) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ContourDirectedMeanDistanceImageFilter); diff --git a/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx index 6a877638e03..fcb4881796c 100644 --- a/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx @@ -40,7 +40,7 @@ ContourDirectedMeanDistanceImageFilter< TInputImage1, TInputImage2 > this->SetNumberOfRequiredInputs(2); m_UseImageSpacing = true; - m_DistanceMap = ITK_NULLPTR; + m_DistanceMap = nullptr; m_ContourDirectedMeanDistance = NumericTraits< RealType >::ZeroValue(); } diff --git a/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.h b/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.h index 9d166223e85..49940cbbde2 100644 --- a/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.h @@ -132,17 +132,17 @@ class ITK_TEMPLATE_EXPORT ContourMeanDistanceImageFilter: protected: ContourMeanDistanceImageFilter(); - ~ContourMeanDistanceImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ContourMeanDistanceImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** GenerateData. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion(DataObject *data) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *data) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ContourMeanDistanceImageFilter); diff --git a/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.h b/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.h index 3a1bcc3ec02..4a2336cea81 100644 --- a/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.h @@ -183,7 +183,7 @@ class ITK_TEMPLATE_EXPORT DanielssonDistanceMapImageFilter: /** Standard itk::ProcessObject subclass method. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType idx ) ITK_OVERRIDE; + DataObjectPointer MakeOutput( DataObjectPointerArraySizeType idx ) override; #ifdef ITK_USE_CONCEPT_CHECKING itkStaticConstMacro(OutputImageDimension, unsigned int, @@ -206,11 +206,11 @@ class ITK_TEMPLATE_EXPORT DanielssonDistanceMapImageFilter: protected: DanielssonDistanceMapImageFilter(); - virtual ~DanielssonDistanceMapImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DanielssonDistanceMapImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Compute Danielsson distance map and Voronoi Map. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Prepare data. */ void PrepareData(); diff --git a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.h b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.h index eb91062f5fa..74f0dad8b3a 100644 --- a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.h @@ -136,30 +136,30 @@ class ITK_TEMPLATE_EXPORT DirectedHausdorffDistanceImageFilter: protected: DirectedHausdorffDistanceImageFilter(); - ~DirectedHausdorffDistanceImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DirectedHausdorffDistanceImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Pass the input through unmodified. Do this by Grafting in the * AllocateOutputs method. */ - void AllocateOutputs() ITK_OVERRIDE; + void AllocateOutputs() override; /** Initialize some accumulators before the threads run. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Do final mean and variance computation from data accumulated in threads. */ - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const RegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion(DataObject *data) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *data) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DirectedHausdorffDistanceImageFilter); diff --git a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx index 5de0c752464..ad3cf2664c1 100644 --- a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx @@ -34,7 +34,7 @@ DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 > // this filter requires two input images this->SetNumberOfRequiredInputs(2); - m_DistanceMap = ITK_NULLPTR; + m_DistanceMap = nullptr; m_DirectedHausdorffDistance = NumericTraits< RealType >::ZeroValue(); m_AverageHausdorffDistance = NumericTraits< RealType >::ZeroValue(); m_UseImageSpacing = true; @@ -184,7 +184,7 @@ DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 > } // clean up - m_DistanceMap = ITK_NULLPTR; + m_DistanceMap = nullptr; } template< typename TInputImage1, typename TInputImage2 > diff --git a/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.h b/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.h index 966608a0f5a..5ace9fcfcbb 100644 --- a/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.h @@ -147,8 +147,8 @@ class ITK_TEMPLATE_EXPORT FastChamferDistanceImageFilter: protected: FastChamferDistanceImageFilter(); - virtual ~FastChamferDistanceImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FastChamferDistanceImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Compute a Signed Chamfer Distance Map up to the specified maximal distance in n dimensions */ @@ -156,7 +156,7 @@ class ITK_TEMPLATE_EXPORT FastChamferDistanceImageFilter: /** Compute a Signed Chamfer Distance Map up to the specified maximal distance */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FastChamferDistanceImageFilter); diff --git a/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx index 6664387c2ed..95306fcd7e6 100644 --- a/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx @@ -53,7 +53,7 @@ FastChamferDistanceImageFilter< TInputImage, TOutputImage > } m_MaximumDistance = 10.0; - m_NarrowBand = ITK_NULLPTR; + m_NarrowBand = nullptr; } template< typename TInputImage, typename TOutputImage > diff --git a/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.h b/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.h index 899b67bb590..07151f0e790 100644 --- a/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.h @@ -126,17 +126,17 @@ class ITK_TEMPLATE_EXPORT HausdorffDistanceImageFilter: protected: HausdorffDistanceImageFilter(); - ~HausdorffDistanceImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HausdorffDistanceImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** GenerateData. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion(DataObject *data) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *data) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HausdorffDistanceImageFilter); diff --git a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.h b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.h index 721aa0a466e..7625675dd4f 100644 --- a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.h @@ -151,11 +151,11 @@ class ITK_TEMPLATE_EXPORT IsoContourDistanceImageFilter: protected: IsoContourDistanceImageFilter(); - ~IsoContourDistanceImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~IsoContourDistanceImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; void ThreadedGenerateDataFull(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId); @@ -163,11 +163,11 @@ class ITK_TEMPLATE_EXPORT IsoContourDistanceImageFilter: void ThreadedGenerateDataBand(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId); - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - virtual void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *) override; typedef ConstNeighborhoodIterator< InputImageType > InputNeighbordIteratorType; typedef NeighborhoodIterator< OutputImageType > OutputNeighborhoodIteratorType; diff --git a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx index 435d36ca12e..d5d4106c003 100644 --- a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx @@ -36,7 +36,7 @@ IsoContourDistanceImageFilter< TInputImage, TOutputImage > m_FarValue = 10 * NumericTraits< PixelType >::OneValue(); m_NarrowBanding = false; - m_NarrowBand = ITK_NULLPTR; + m_NarrowBand = nullptr; m_Barrier = Barrier::New(); } diff --git a/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.h b/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.h index f72e0bd5242..9283160c580 100644 --- a/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.h +++ b/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.h @@ -94,7 +94,7 @@ class ITK_TEMPLATE_EXPORT ReflectiveImageRegionConstIterator:public ImageConstIt ReflectiveImageRegionConstIterator(); /** Default destructor. */ - ~ReflectiveImageRegionConstIterator() {} + ~ReflectiveImageRegionConstIterator() override {} /** Constructor establishes an iterator to walk a particular image and a * particular region of that image. */ diff --git a/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h b/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h index 30039e59c6e..050184eec94 100644 --- a/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h @@ -203,7 +203,7 @@ class ITK_TEMPLATE_EXPORT SignedDanielssonDistanceMapImageFilter: /** This is overloaded to create the VectorDistanceMap output image */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -216,11 +216,11 @@ class ITK_TEMPLATE_EXPORT SignedDanielssonDistanceMapImageFilter: protected: SignedDanielssonDistanceMapImageFilter(); - virtual ~SignedDanielssonDistanceMapImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SignedDanielssonDistanceMapImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Compute Danielsson distance map and Voronoi Map. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SignedDanielssonDistanceMapImageFilter); diff --git a/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.h b/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.h index 7f5f66783b8..7e3fbdc043a 100644 --- a/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.h @@ -156,17 +156,17 @@ class ITK_TEMPLATE_EXPORT SignedMaurerDistanceMapImageFilter: protected: SignedMaurerDistanceMapImageFilter(); - virtual ~SignedMaurerDistanceMapImageFilter() ITK_OVERRIDE; + ~SignedMaurerDistanceMapImageFilter() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - virtual unsigned int SplitRequestedRegion(unsigned int i, unsigned int num, - OutputImageRegionType & splitRegion) ITK_OVERRIDE; + unsigned int SplitRequestedRegion(unsigned int i, unsigned int num, + OutputImageRegionType & splitRegion) override; - virtual void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SignedMaurerDistanceMapImageFilter); diff --git a/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx index 6facb3c9306..8f5bb076700 100644 --- a/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx @@ -39,7 +39,7 @@ SignedMaurerDistanceMapImageFilter< TInputImage, TOutputImage > m_InsideIsPositive(false), m_UseImageSpacing(true), m_SquaredDistance(false), - m_InputCache(ITK_NULLPTR) + m_InputCache(nullptr) {} template< typename TInputImage, typename TOutputImage > diff --git a/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.h b/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.h index 528e4c2cfd9..79a44aa7ec0 100644 --- a/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.h @@ -97,7 +97,7 @@ class ITK_TEMPLATE_EXPORT ComplexToComplexFFTImageFilter: ComplexToComplexFFTImageFilter(): m_TransformDirection( FORWARD ) {} - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ComplexToComplexFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkFFTPadImageFilter.h b/Modules/Filtering/FFT/include/itkFFTPadImageFilter.h index 6c774c2c3cd..ac8dc4338c8 100644 --- a/Modules/Filtering/FFT/include/itkFFTPadImageFilter.h +++ b/Modules/Filtering/FFT/include/itkFFTPadImageFilter.h @@ -101,10 +101,10 @@ class ITK_TEMPLATE_EXPORT FFTPadImageFilter : protected: FFTPadImageFilter(); - ~FFTPadImageFilter() ITK_OVERRIDE {}; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~FFTPadImageFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: diff --git a/Modules/Filtering/FFT/include/itkFFTShiftImageFilter.h b/Modules/Filtering/FFT/include/itkFFTShiftImageFilter.h index a17aac6d8ee..cc6bdfc2de2 100644 --- a/Modules/Filtering/FFT/include/itkFFTShiftImageFilter.h +++ b/Modules/Filtering/FFT/include/itkFFTShiftImageFilter.h @@ -88,12 +88,12 @@ class ITK_TEMPLATE_EXPORT FFTShiftImageFilter : protected: FFTShiftImageFilter(); - ~FFTShiftImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FFTShiftImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Override GenerateData method to set some parameters in the * superclass. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FFTShiftImageFilter); diff --git a/Modules/Filtering/FFT/include/itkFFTWCommon.h b/Modules/Filtering/FFT/include/itkFFTWCommon.h index aae78c0ce36..57f6e300a10 100644 --- a/Modules/Filtering/FFT/include/itkFFTWCommon.h +++ b/Modules/Filtering/FFT/include/itkFFTWCommon.h @@ -133,7 +133,7 @@ class Proxy< float > roflags = flags | FFTW_WISDOM_ONLY; } PlanType plan = fftwf_plan_dft_c2r(rank,n,in,out,roflags); - if( plan == ITK_NULLPTR ) + if( plan == nullptr ) { // no wisdom available for that plan if( canDestroyInput ) @@ -157,7 +157,7 @@ class Proxy< float > } FFTWGlobalConfiguration::SetNewWisdomAvailable(true); } - itkAssertOrThrowMacro( plan != ITK_NULLPTR , "PLAN_CREATION_FAILED "); + itkAssertOrThrowMacro( plan != nullptr , "PLAN_CREATION_FAILED "); return plan; } @@ -225,7 +225,7 @@ class Proxy< float > roflags = flags | FFTW_WISDOM_ONLY; } PlanType plan = fftwf_plan_dft_r2c(rank,n,in,out,roflags); - if( plan == ITK_NULLPTR ) + if( plan == nullptr ) { // no wisdom available for that plan if( canDestroyInput ) @@ -249,7 +249,7 @@ class Proxy< float > } FFTWGlobalConfiguration::SetNewWisdomAvailable(true); } - itkAssertOrThrowMacro( plan != ITK_NULLPTR , "PLAN_CREATION_FAILED "); + itkAssertOrThrowMacro( plan != nullptr , "PLAN_CREATION_FAILED "); return plan; } @@ -319,7 +319,7 @@ class Proxy< float > roflags = flags | FFTW_WISDOM_ONLY; } PlanType plan = fftwf_plan_dft(rank,n,in,out,sign,roflags); - if( plan == ITK_NULLPTR ) + if( plan == nullptr ) { // no wisdom available for that plan if( canDestroyInput ) @@ -343,7 +343,7 @@ class Proxy< float > } FFTWGlobalConfiguration::SetNewWisdomAvailable(true); } - itkAssertOrThrowMacro( plan != ITK_NULLPTR , "PLAN_CREATION_FAILED "); + itkAssertOrThrowMacro( plan != nullptr , "PLAN_CREATION_FAILED "); return plan; } @@ -437,7 +437,7 @@ class Proxy< double > roflags = flags | FFTW_WISDOM_ONLY; } PlanType plan = fftw_plan_dft_c2r(rank,n,in,out,roflags); - if( plan == ITK_NULLPTR ) + if( plan == nullptr ) { // no wisdom available for that plan if( canDestroyInput ) @@ -461,7 +461,7 @@ class Proxy< double > } FFTWGlobalConfiguration::SetNewWisdomAvailable(true); } - itkAssertOrThrowMacro( plan != ITK_NULLPTR , "PLAN_CREATION_FAILED "); + itkAssertOrThrowMacro( plan != nullptr , "PLAN_CREATION_FAILED "); return plan; } @@ -528,7 +528,7 @@ class Proxy< double > roflags = flags | FFTW_WISDOM_ONLY; } PlanType plan = fftw_plan_dft_r2c(rank,n,in,out,roflags); - if( plan == ITK_NULLPTR ) + if( plan == nullptr ) { // no wisdom available for that plan if( canDestroyInput ) @@ -552,7 +552,7 @@ class Proxy< double > } FFTWGlobalConfiguration::SetNewWisdomAvailable(true); } - itkAssertOrThrowMacro( plan != ITK_NULLPTR , "PLAN_CREATION_FAILED "); + itkAssertOrThrowMacro( plan != nullptr , "PLAN_CREATION_FAILED "); return plan; } @@ -622,7 +622,7 @@ class Proxy< double > roflags = flags | FFTW_WISDOM_ONLY; } PlanType plan = fftw_plan_dft(rank,n,in,out,sign,roflags); - if( plan == ITK_NULLPTR ) + if( plan == nullptr ) { // no wisdom available for that plan if( canDestroyInput ) @@ -646,7 +646,7 @@ class Proxy< double > } FFTWGlobalConfiguration::SetNewWisdomAvailable(true); } - itkAssertOrThrowMacro( plan != ITK_NULLPTR , "PLAN_CREATION_FAILED "); + itkAssertOrThrowMacro( plan != nullptr , "PLAN_CREATION_FAILED "); return plan; } diff --git a/Modules/Filtering/FFT/include/itkFFTWComplexToComplexFFTImageFilter.h b/Modules/Filtering/FFT/include/itkFFTWComplexToComplexFFTImageFilter.h index 6309d8a77da..a91c12be0a4 100644 --- a/Modules/Filtering/FFT/include/itkFFTWComplexToComplexFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkFFTWComplexToComplexFFTImageFilter.h @@ -118,16 +118,16 @@ class ITK_TEMPLATE_EXPORT FFTWComplexToComplexFFTImageFilter: protected: FFTWComplexToComplexFFTImageFilter(); - virtual ~FFTWComplexToComplexFFTImageFilter() {} + ~FFTWComplexToComplexFFTImageFilter() override {} - virtual void UpdateOutputData(DataObject *output) ITK_OVERRIDE; + void UpdateOutputData(DataObject *output) override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, - ThreadIdType threadId ) ITK_OVERRIDE; + ThreadIdType threadId ) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FFTWComplexToComplexFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkFFTWForwardFFTImageFilter.h b/Modules/Filtering/FFT/include/itkFFTWForwardFFTImageFilter.h index b68e60046d8..cfcd4117999 100644 --- a/Modules/Filtering/FFT/include/itkFFTWForwardFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkFFTWForwardFFTImageFilter.h @@ -105,17 +105,17 @@ class ITK_TEMPLATE_EXPORT FFTWForwardFFTImageFilter: } itkGetConstReferenceMacro( PlanRigor, int ); - SizeValueType GetSizeGreatestPrimeFactor() const ITK_OVERRIDE; + SizeValueType GetSizeGreatestPrimeFactor() const override; protected: FFTWForwardFFTImageFilter(); - ~FFTWForwardFFTImageFilter() {} + ~FFTWForwardFFTImageFilter() override {} - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - virtual void UpdateOutputData(DataObject *output) ITK_OVERRIDE; + void UpdateOutputData(DataObject *output) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FFTWForwardFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h b/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h index e8467f447d9..0b9515a4dc6 100644 --- a/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h +++ b/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h @@ -82,7 +82,7 @@ class ITKFFT_EXPORT ManualWisdomFilenameGenerator: public: ManualWisdomFilenameGenerator(const std::string &wfn); void SetWisdomFilename(const std::string &wfn); - virtual std::string GenerateWisdomFilename(const std::string &baseCacheDirectory ) const ITK_OVERRIDE; + std::string GenerateWisdomFilename(const std::string &baseCacheDirectory ) const override; private: std::string m_WisdomFilename; }; @@ -90,13 +90,13 @@ class ITKFFT_EXPORT ManualWisdomFilenameGenerator: class ITKFFT_EXPORT SimpleWisdomFilenameGenerator: public WisdomFilenameGeneratorBase { public: - virtual std::string GenerateWisdomFilename(const std::string &baseCacheDirectory) const ITK_OVERRIDE; + std::string GenerateWisdomFilename(const std::string &baseCacheDirectory) const override; }; class ITKFFT_EXPORT HostnameWisdomFilenameGenerator: public WisdomFilenameGeneratorBase { public: - virtual std::string GenerateWisdomFilename(const std::string &baseCacheDirectory) const ITK_OVERRIDE; + std::string GenerateWisdomFilename(const std::string &baseCacheDirectory) const override; }; class ITKFFT_EXPORT HardwareWisdomFilenameGenerator: public WisdomFilenameGeneratorBase @@ -104,7 +104,7 @@ class ITKFFT_EXPORT HardwareWisdomFilenameGenerator: public WisdomFilenameGenera public: HardwareWisdomFilenameGenerator(); - virtual std::string GenerateWisdomFilename(const std::string &baseCacheDirectory) const ITK_OVERRIDE; + std::string GenerateWisdomFilename(const std::string &baseCacheDirectory) const override; void SetUseOSName(const bool flag); void SetUseOSRelease(const bool flag); @@ -286,7 +286,7 @@ class ITKFFT_EXPORT FFTWGlobalConfiguration private: FFTWGlobalConfiguration(); //This will process env variables - ~FFTWGlobalConfiguration(); //This will write cache file if requested. + ~FFTWGlobalConfiguration() override; //This will write cache file if requested. /** Return the singleton instance with no reference counting. */ static Pointer GetInstance(); diff --git a/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.h b/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.h index 7dd384465eb..fc165e78e13 100644 --- a/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.h @@ -105,20 +105,20 @@ class ITK_TEMPLATE_EXPORT FFTWHalfHermitianToRealInverseFFTImageFilter: this->SetPlanRigor( FFTWGlobalConfiguration::GetPlanRigorValue( name ) ); } - SizeValueType GetSizeGreatestPrimeFactor() const ITK_OVERRIDE; + SizeValueType GetSizeGreatestPrimeFactor() const override; protected: FFTWHalfHermitianToRealInverseFFTImageFilter(); - virtual ~FFTWHalfHermitianToRealInverseFFTImageFilter() {} + ~FFTWHalfHermitianToRealInverseFFTImageFilter() override {} - virtual void UpdateOutputData(DataObject *output) ITK_OVERRIDE; + void UpdateOutputData(DataObject *output) override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; void ThreadedGenerateData(const OutputRegionType& outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FFTWHalfHermitianToRealInverseFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkFFTWInverseFFTImageFilter.h b/Modules/Filtering/FFT/include/itkFFTWInverseFFTImageFilter.h index 3d81ac40d4f..3a2d5f4d7ca 100644 --- a/Modules/Filtering/FFT/include/itkFFTWInverseFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkFFTWInverseFFTImageFilter.h @@ -105,18 +105,18 @@ class ITK_TEMPLATE_EXPORT FFTWInverseFFTImageFilter: this->SetPlanRigor( FFTWGlobalConfiguration::GetPlanRigorValue( name ) ); } - SizeValueType GetSizeGreatestPrimeFactor() const ITK_OVERRIDE; + SizeValueType GetSizeGreatestPrimeFactor() const override; protected: FFTWInverseFFTImageFilter(); - virtual ~FFTWInverseFFTImageFilter() {} + ~FFTWInverseFFTImageFilter() override {} - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, - ThreadIdType threadId ) ITK_OVERRIDE; + ThreadIdType threadId ) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FFTWInverseFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkFFTWRealToHalfHermitianForwardFFTImageFilter.h b/Modules/Filtering/FFT/include/itkFFTWRealToHalfHermitianForwardFFTImageFilter.h index bb8d1564156..9382cfabd3f 100644 --- a/Modules/Filtering/FFT/include/itkFFTWRealToHalfHermitianForwardFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkFFTWRealToHalfHermitianForwardFFTImageFilter.h @@ -105,17 +105,17 @@ class ITK_TEMPLATE_EXPORT FFTWRealToHalfHermitianForwardFFTImageFilter: } itkGetConstReferenceMacro( PlanRigor, int ); - SizeValueType GetSizeGreatestPrimeFactor() const ITK_OVERRIDE; + SizeValueType GetSizeGreatestPrimeFactor() const override; protected: FFTWRealToHalfHermitianForwardFFTImageFilter(); - ~FFTWRealToHalfHermitianForwardFFTImageFilter() {} + ~FFTWRealToHalfHermitianForwardFFTImageFilter() override {} - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - virtual void UpdateOutputData(DataObject *output) ITK_OVERRIDE; + void UpdateOutputData(DataObject *output) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FFTWRealToHalfHermitianForwardFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkForwardFFTImageFilter.h b/Modules/Filtering/FFT/include/itkForwardFFTImageFilter.h index 8e7705d2b17..88471186c65 100644 --- a/Modules/Filtering/FFT/include/itkForwardFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkForwardFFTImageFilter.h @@ -80,13 +80,13 @@ class ITK_TEMPLATE_EXPORT ForwardFFTImageFilter: protected: ForwardFFTImageFilter() {} - virtual ~ForwardFFTImageFilter() {} + ~ForwardFFTImageFilter() override {} /** This class requires the entire input. */ - virtual void GenerateInputRequestedRegion(); + void GenerateInputRequestedRegion() override; /** This class produces the entire output. */ - virtual void EnlargeOutputRequestedRegion(DataObject *output); + void EnlargeOutputRequestedRegion(DataObject *output) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ForwardFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkFullToHalfHermitianImageFilter.h b/Modules/Filtering/FFT/include/itkFullToHalfHermitianImageFilter.h index 8b1bfd74417..478b9513738 100644 --- a/Modules/Filtering/FFT/include/itkFullToHalfHermitianImageFilter.h +++ b/Modules/Filtering/FFT/include/itkFullToHalfHermitianImageFilter.h @@ -84,16 +84,16 @@ class ITK_TEMPLATE_EXPORT FullToHalfHermitianImageFilter : protected: FullToHalfHermitianImageFilter(); - ~FullToHalfHermitianImageFilter() ITK_OVERRIDE {} + ~FullToHalfHermitianImageFilter() override {} void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** The output is a different size from the input. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** This class requires the entire input. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; itkSetDecoratedOutputMacro(ActualXDimensionIsOdd, bool); diff --git a/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.h b/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.h index d2577d62a87..71ef478d18e 100644 --- a/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.h @@ -88,18 +88,18 @@ class ITK_TEMPLATE_EXPORT HalfHermitianToRealInverseFFTImageFilter: protected: HalfHermitianToRealInverseFFTImageFilter(); - virtual ~HalfHermitianToRealInverseFFTImageFilter(){} + ~HalfHermitianToRealInverseFFTImageFilter() override {} /** The output may be a different size from the input if complex conjugate * symmetry is implicit. */ - virtual void GenerateOutputInformation(); + void GenerateOutputInformation() override; /** This class requires the entire input. */ - virtual void GenerateInputRequestedRegion(); + void GenerateInputRequestedRegion() override; /** Sets the output requested region to the largest possible output * region. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ); + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HalfHermitianToRealInverseFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkHalfToFullHermitianImageFilter.h b/Modules/Filtering/FFT/include/itkHalfToFullHermitianImageFilter.h index 2b0312d9a28..b9bf32b8162 100644 --- a/Modules/Filtering/FFT/include/itkHalfToFullHermitianImageFilter.h +++ b/Modules/Filtering/FFT/include/itkHalfToFullHermitianImageFilter.h @@ -84,16 +84,16 @@ class ITK_TEMPLATE_EXPORT HalfToFullHermitianImageFilter : protected: HalfToFullHermitianImageFilter(); - ~HalfToFullHermitianImageFilter() ITK_OVERRIDE {} + ~HalfToFullHermitianImageFilter() override {} void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** The output is a different size from the input. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** This class requires the entire input. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HalfToFullHermitianImageFilter); diff --git a/Modules/Filtering/FFT/include/itkInverseFFTImageFilter.h b/Modules/Filtering/FFT/include/itkInverseFFTImageFilter.h index 10e1531224e..f5b02834318 100644 --- a/Modules/Filtering/FFT/include/itkInverseFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkInverseFFTImageFilter.h @@ -74,14 +74,14 @@ class ITK_TEMPLATE_EXPORT InverseFFTImageFilter: protected: InverseFFTImageFilter() {} - virtual ~InverseFFTImageFilter(){} + ~InverseFFTImageFilter() override {} /** This class requires the entire input. */ - virtual void GenerateInputRequestedRegion(); + void GenerateInputRequestedRegion() override; /** Sets the output requested region to the largest possible output * region. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ); + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(InverseFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.h b/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.h index 79b1a564155..b1df3524aaf 100644 --- a/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.h @@ -88,17 +88,17 @@ class ITK_TEMPLATE_EXPORT RealToHalfHermitianForwardFFTImageFilter: protected: RealToHalfHermitianForwardFFTImageFilter(); - virtual ~RealToHalfHermitianForwardFFTImageFilter() {} + ~RealToHalfHermitianForwardFFTImageFilter() override {} /** The output is a different size from the input because of * Hermitian symmetry. */ - virtual void GenerateOutputInformation(); + void GenerateOutputInformation() override; /** This class requires the entire input. */ - virtual void GenerateInputRequestedRegion(); + void GenerateInputRequestedRegion() override; /** This class produces the entire output. */ - virtual void EnlargeOutputRequestedRegion(DataObject *output); + void EnlargeOutputRequestedRegion(DataObject *output) override; itkSetDecoratedOutputMacro(ActualXDimensionIsOdd, bool); diff --git a/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.h b/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.h index 597d5e48c0b..59c59d5c021 100644 --- a/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkVnlComplexToComplexFFTImageFilter.h @@ -65,10 +65,10 @@ class ITK_TEMPLATE_EXPORT VnlComplexToComplexFFTImageFilter: protected: VnlComplexToComplexFFTImageFilter(); - virtual ~VnlComplexToComplexFFTImageFilter() ITK_OVERRIDE {} + ~VnlComplexToComplexFFTImageFilter() override {} - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; - virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) ) ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VnlComplexToComplexFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.h b/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.h index 527eb6057de..eccbf6623ff 100644 --- a/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkVnlForwardFFTImageFilter.h @@ -74,7 +74,7 @@ class ITK_TEMPLATE_EXPORT VnlForwardFFTImageFilter: itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension); - SizeValueType GetSizeGreatestPrimeFactor() const ITK_OVERRIDE; + SizeValueType GetSizeGreatestPrimeFactor() const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -85,9 +85,9 @@ class ITK_TEMPLATE_EXPORT VnlForwardFFTImageFilter: protected: VnlForwardFFTImageFilter() {} - ~VnlForwardFFTImageFilter() ITK_OVERRIDE {} + ~VnlForwardFFTImageFilter() override {} - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VnlForwardFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.h b/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.h index 8404675e220..70795de7326 100644 --- a/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkVnlHalfHermitianToRealInverseFFTImageFilter.h @@ -77,7 +77,7 @@ class ITK_TEMPLATE_EXPORT VnlHalfHermitianToRealInverseFFTImageFilter: itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension); - SizeValueType GetSizeGreatestPrimeFactor() const ITK_OVERRIDE; + SizeValueType GetSizeGreatestPrimeFactor() const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -90,9 +90,9 @@ class ITK_TEMPLATE_EXPORT VnlHalfHermitianToRealInverseFFTImageFilter: protected: VnlHalfHermitianToRealInverseFFTImageFilter() {} - virtual ~VnlHalfHermitianToRealInverseFFTImageFilter() ITK_OVERRIDE {} + ~VnlHalfHermitianToRealInverseFFTImageFilter() override {} - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VnlHalfHermitianToRealInverseFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.h b/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.h index 337024efce8..35b9fbec935 100644 --- a/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkVnlInverseFFTImageFilter.h @@ -76,7 +76,7 @@ class ITK_TEMPLATE_EXPORT VnlInverseFFTImageFilter: itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension); - SizeValueType GetSizeGreatestPrimeFactor() const ITK_OVERRIDE; + SizeValueType GetSizeGreatestPrimeFactor() const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -89,9 +89,9 @@ class ITK_TEMPLATE_EXPORT VnlInverseFFTImageFilter: protected: VnlInverseFFTImageFilter() {} - virtual ~VnlInverseFFTImageFilter() ITK_OVERRIDE {} + ~VnlInverseFFTImageFilter() override {} - virtual void GenerateData() ITK_OVERRIDE; // generates output from input + void GenerateData() override; // generates output from input private: ITK_DISALLOW_COPY_AND_ASSIGN(VnlInverseFFTImageFilter); diff --git a/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.h b/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.h index 79d71e2a1c0..2fe2299fd6d 100644 --- a/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkVnlRealToHalfHermitianForwardFFTImageFilter.h @@ -72,7 +72,7 @@ class ITK_TEMPLATE_EXPORT VnlRealToHalfHermitianForwardFFTImageFilter: itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension); - SizeValueType GetSizeGreatestPrimeFactor() const ITK_OVERRIDE; + SizeValueType GetSizeGreatestPrimeFactor() const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -83,9 +83,9 @@ class ITK_TEMPLATE_EXPORT VnlRealToHalfHermitianForwardFFTImageFilter: protected: VnlRealToHalfHermitianForwardFFTImageFilter() {} - ~VnlRealToHalfHermitianForwardFFTImageFilter() ITK_OVERRIDE {} + ~VnlRealToHalfHermitianForwardFFTImageFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VnlRealToHalfHermitianForwardFFTImageFilter); diff --git a/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx b/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx index 89708f456f7..5f7fdc2fa49 100644 --- a/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx +++ b/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx @@ -136,7 +136,7 @@ static bool isDeclineString(std::string response) } itk::SimpleFastMutexLock itk::FFTWGlobalConfiguration::m_CreationLock; -itk::FFTWGlobalConfiguration::Pointer itk::FFTWGlobalConfiguration::m_Instance=ITK_NULLPTR; +itk::FFTWGlobalConfiguration::Pointer itk::FFTWGlobalConfiguration::m_Instance=nullptr; FFTWGlobalConfiguration::Pointer FFTWGlobalConfiguration @@ -654,7 +654,7 @@ ::ImportWisdomFileFloat( const std::string & int fd; if ( !_sopen_s( &fd, path.c_str(), _O_RDONLY, _SH_DENYNO, _S_IREAD)) { - if ( (f = _fdopen(fd, "r")) != ITK_NULLPTR ) + if ( (f = _fdopen(fd, "r")) != nullptr ) {// strange but seems ok under VC++ not so friendly with checking the return values of affectations ret = fftwf_import_wisdom_from_file( f ); } @@ -689,7 +689,7 @@ ::ImportWisdomFileDouble( const std::string & int fd; if ( !_sopen_s( &fd, path.c_str(), _O_RDONLY, _SH_DENYNO, _S_IREAD)) { - if ( (f = _fdopen(fd, "r")) != ITK_NULLPTR ) + if ( (f = _fdopen(fd, "r")) != nullptr ) {// strange but seems ok under VC++ ret = fftw_import_wisdom_from_file( f ); } @@ -731,7 +731,7 @@ ::ExportWisdomFileFloat( const std::string & if ( !_sopen_s( &fd, path.c_str(), _O_RDONLY, _SH_DENYNO, _S_IREAD)) { FILE *f; - if ( (f = _fdopen(fd, "r")) != ITK_NULLPTR ) + if ( (f = _fdopen(fd, "r")) != nullptr ) {// strange but seems ok under VC++ ret = fftwf_import_wisdom_from_file( f ); } @@ -767,7 +767,7 @@ ::ExportWisdomFileDouble( const std::string & int fd; if ( !_sopen_s( &fd, path.c_str(), _O_RDONLY, _SH_DENYNO, _S_IREAD)) { - if ( (f = _fdopen(fd, "r")) != ITK_NULLPTR ) + if ( (f = _fdopen(fd, "r")) != nullptr ) {// strange but seems ok under VC++ ret = fftw_import_wisdom_from_file( f ); } diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingBase.h b/Modules/Filtering/FastMarching/include/itkFastMarchingBase.h index f87c241bd43..9ef4b48d050 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingBase.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingBase.h @@ -211,7 +211,7 @@ class ITK_TEMPLATE_EXPORT FastMarchingBase : public FastMarchingTraitsProcessObject::SetNumberOfRequiredInputs(0); - m_TrialPoints = ITK_NULLPTR; - m_AlivePoints = ITK_NULLPTR; - m_ProcessedPoints = ITK_NULLPTR; - m_ForbiddenPoints = ITK_NULLPTR; + m_TrialPoints = nullptr; + m_AlivePoints = nullptr; + m_ProcessedPoints = nullptr; + m_ForbiddenPoints = nullptr; //m_Heap = PriorityQueueType::New(); m_SpeedConstant = 1.; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.h b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.h index 68b7292d60b..0a6c58fa131 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.h @@ -134,18 +134,18 @@ class ITK_TEMPLATE_EXPORT FastMarchingExtensionImageFilter: protected: FastMarchingExtensionImageFilter(); - ~FastMarchingExtensionImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FastMarchingExtensionImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void Initialize(LevelSetImageType *) ITK_OVERRIDE; + void Initialize(LevelSetImageType *) override; - virtual double UpdateValue(const IndexType & index, - const SpeedImageType *speed, LevelSetImageType *output) ITK_OVERRIDE; + double UpdateValue(const IndexType & index, + const SpeedImageType *speed, LevelSetImageType *output) override; /** Generate the output image meta information */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - virtual void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FastMarchingExtensionImageFilter); diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx index b4434758fd1..62a165f8a8d 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx @@ -27,8 +27,8 @@ template< typename TLevelSet, typename TAuxValue, unsigned int VAuxDimension, FastMarchingExtensionImageFilter< TLevelSet, TAuxValue, VAuxDimension, TSpeedImage > ::FastMarchingExtensionImageFilter() { - m_AuxAliveValues = ITK_NULLPTR; - m_AuxTrialValues = ITK_NULLPTR; + m_AuxAliveValues = nullptr; + m_AuxTrialValues = nullptr; this->ProcessObject::SetNumberOfRequiredOutputs(1 + AuxDimension); @@ -66,7 +66,7 @@ FastMarchingExtensionImageFilter< TLevelSet, TAuxValue, VAuxDimension, TSpeedIma { if ( idx >= AuxDimension || this->GetNumberOfIndexedOutputs() < idx + 2 ) { - return ITK_NULLPTR; + return nullptr; } return this->m_AuxImages[idx]; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.h b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.h index 36db88f5c81..f59457a2b5a 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.h @@ -130,17 +130,17 @@ class ITK_TEMPLATE_EXPORT FastMarchingExtensionImageFilterBase: protected: FastMarchingExtensionImageFilterBase(); - ~FastMarchingExtensionImageFilterBase() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FastMarchingExtensionImageFilterBase() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void InitializeOutput(OutputImageType *) ITK_OVERRIDE; + void InitializeOutput(OutputImageType *) override; - virtual void UpdateValue( OutputImageType* oImage, const NodeType& iValue ) ITK_OVERRIDE; + void UpdateValue( OutputImageType* oImage, const NodeType& iValue ) override; /** Generate the output image meta information */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - virtual void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; AuxValueContainerPointer m_AuxiliaryAliveValues; AuxValueContainerPointer m_AuxiliaryTrialValues; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx index 9dd98909ea0..6034ecf1c1a 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx @@ -28,8 +28,8 @@ template< typename TInput, typename TOutput, FastMarchingExtensionImageFilterBase< TInput, TOutput, TAuxValue, VAuxDimension > ::FastMarchingExtensionImageFilterBase() { - m_AuxiliaryAliveValues = ITK_NULLPTR; - m_AuxiliaryTrialValues = ITK_NULLPTR; + m_AuxiliaryAliveValues = nullptr; + m_AuxiliaryTrialValues = nullptr; this->ProcessObject::SetNumberOfRequiredOutputs(1 + AuxDimension); @@ -38,7 +38,7 @@ FastMarchingExtensionImageFilterBase< TInput, TOutput, TAuxValue, VAuxDimension { ptr = AuxImageType::New(); this->ProcessObject::SetNthOutput( k + 1, ptr.GetPointer() ); - this->m_AuxImages[k] = ITK_NULLPTR; + this->m_AuxImages[k] = nullptr; } } @@ -67,7 +67,7 @@ FastMarchingExtensionImageFilterBase< TInput, TOutput, TAuxValue, VAuxDimension { if ( idx >= AuxDimension || this->GetNumberOfIndexedOutputs() < idx + 2 ) { - return ITK_NULLPTR; + return nullptr; } return static_cast< AuxImageType * >( this->ProcessObject::GetOutput(idx + 1) ); diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h index 696e79166f8..3e42201a4ad 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h @@ -60,7 +60,7 @@ namespace itk * The speed function can be specified as a speed image or a * speed constant. The speed image is set using the method - * SetInput(). If the speed image is ITK_NULLPTR, a constant speed function + * SetInput(). If the speed image is nullptr, a constant speed function * is used and is specified using method the SetSpeedConstant(). * * If the speed function is constant and of value one, fast marching results @@ -78,10 +78,10 @@ namespace itk * are used if the user does not specify all the information. * * The output information is computed as follows. - * If the speed image is ITK_NULLPTR or if the OverrideOutputInformation is set to + * If the speed image is nullptr or if the OverrideOutputInformation is set to * true, the output information is set from user specified parameters. These * parameters can be specified using methods SetOutputRegion(), SetOutputSpacing(), SetOutputDirection(), - * and SetOutputOrigin(). Else if the speed image is not ITK_NULLPTR, the output information + * and SetOutputOrigin(). Else if the speed image is not nullptr, the output information * is copied from the input speed image. * * For an alternative implementation, see itk::FastMarchingImageFilter. @@ -252,7 +252,7 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageFilter: return m_LabelImage; } - /** Set the Speed Constant. If the Speed Image is ITK_NULLPTR, + /** Set the Speed Constant. If the Speed Image is nullptr, * the SpeedConstant value is used for the whole level set. * By default, the SpeedConstant is set to 1.0. */ void SetSpeedConstant(double value) @@ -300,10 +300,10 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageFilter: } /** The output largeset possible, spacing and origin is computed as follows. - * If the speed image is ITK_NULLPTR or if the OverrideOutputInformation is true, + * If the speed image is nullptr or if the OverrideOutputInformation is true, * the output information is set from user specified parameters. These * parameters can be specified using methods SetOutputRegion(), SetOutputSpacing(), SetOutputDirection(), - * and SetOutputOrigin(). Else if the speed image is not ITK_NULLPTR, the output information + * and SetOutputOrigin(). Else if the speed image is not nullptr, the output information * is copied from the input speed image. */ virtual void SetOutputSize(const OutputSizeType & size) { m_OutputRegion = size; } @@ -336,8 +336,8 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageFilter: protected: FastMarchingImageFilter(); - ~FastMarchingImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FastMarchingImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; virtual void Initialize(LevelSetImageType *); @@ -350,12 +350,12 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageFilter: const AxisNodeType & GetNodeUsedInCalculation(unsigned int idx) const { return m_NodesUsed[idx]; } - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Generate the output image meta information. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - virtual void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; /** Get Large Value. This value is used to represent the concept of infinity for the time assigned to pixels that diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx index 7cf9f1751b8..330c973b7c7 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx @@ -47,10 +47,10 @@ FastMarchingImageFilter< TLevelSet, TSpeedImage > m_OutputDirection.SetIdentity(); m_OverrideOutputInformation = false; - m_AlivePoints = ITK_NULLPTR; - m_OutsidePoints = ITK_NULLPTR; - m_TrialPoints = ITK_NULLPTR; - m_ProcessedPoints = ITK_NULLPTR; + m_AlivePoints = nullptr; + m_OutsidePoints = nullptr; + m_TrialPoints = nullptr; + m_ProcessedPoints = nullptr; m_SpeedConstant = 1.0; m_InverseSpeed = -1.0; @@ -95,7 +95,7 @@ FastMarchingImageFilter< TLevelSet, TSpeedImage > Superclass::GenerateOutputInformation(); // use user-specified output information - if ( this->GetInput() == ITK_NULLPTR || m_OverrideOutputInformation ) + if ( this->GetInput() == nullptr || m_OverrideOutputInformation ) { LevelSetPointer output = this->GetOutput(); output->SetLargestPossibleRegion(m_OutputRegion); diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h index b6467b3e143..c0d0519b1cd 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.h @@ -33,7 +33,7 @@ namespace itk * * The speed function can be specified as a speed image or a * speed constant. The speed image is set using the method - * SetInput(). If the speed image is ITK_NULLPTR, a constant speed function + * SetInput(). If the speed image is nullptr, a constant speed function * is used and is specified using method the SetSpeedConstant(). * * If the speed function is constant and of value one, fast marching results @@ -47,7 +47,7 @@ namespace itk * * The output information is computed as follows. * - * If the speed image is ITK_NULLPTR or if the OverrideOutputInformation is set to + * If the speed image is nullptr or if the OverrideOutputInformation is set to * true, the output information is set from user specified parameters. These * parameters can be specified using methods * \li FastMarchingImageFilterBase::SetOutputRegion(), @@ -132,11 +132,11 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageFilterBase : itkGetModifiableObjectMacro(LabelImage, LabelImageType ); /** The output largeset possible, spacing and origin is computed as follows. - * If the speed image is ITK_NULLPTR or if the OverrideOutputInformation is true, + * If the speed image is nullptr or if the OverrideOutputInformation is true, * the output information is set from user specified parameters. These * parameters can be specified using methods SetOutputRegion(), * SetOutputSpacing(), SetOutputDirection(), and SetOutputOrigin(). - * Else if the speed image is not ITK_NULLPTR, the output information + * Else if the speed image is not nullptr, the output information * is copied from the input speed image. */ virtual void SetOutputSize(const OutputSizeType & size) { m_OutputRegion = size; } @@ -158,9 +158,9 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageFilterBase : FastMarchingImageFilterBase(); - virtual ~FastMarchingImageFilterBase() ITK_OVERRIDE; + ~FastMarchingImageFilterBase() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; OutputRegionType m_BufferedRegion; NodeType m_StartIndex; @@ -173,43 +173,43 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageFilterBase : bool m_OverrideOutputInformation; /** Generate the output image meta information. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - virtual void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; LabelImagePointer m_LabelImage; ConnectedComponentImagePointer m_ConnectedComponentImage; - IdentifierType GetTotalNumberOfNodes() const ITK_OVERRIDE; + IdentifierType GetTotalNumberOfNodes() const override; void SetOutputValue( OutputImageType* oDomain, const NodeType& iNode, - const OutputPixelType& iValue ) ITK_OVERRIDE; + const OutputPixelType& iValue ) override; /** Returns the output value for a given node */ const OutputPixelType GetOutputValue( OutputImageType* oImage, - const NodeType& iNode ) const ITK_OVERRIDE; + const NodeType& iNode ) const override; /** Returns the label value for a given node */ unsigned char - GetLabelValueForGivenNode( const NodeType& iNode ) const ITK_OVERRIDE; + GetLabelValueForGivenNode( const NodeType& iNode ) const override; /** Set the label value for a given node */ void SetLabelValueForGivenNode( const NodeType& iNode, - const LabelType& iLabel ) ITK_OVERRIDE; + const LabelType& iLabel ) override; /** Update values for the neighbors of a given node */ - virtual void UpdateNeighbors( OutputImageType* oImage, - const NodeType& iNode ) ITK_OVERRIDE; + void UpdateNeighbors( OutputImageType* oImage, + const NodeType& iNode ) override; /** Update value for a given node */ - virtual void UpdateValue( OutputImageType* oImage, - const NodeType& iValue ) ITK_OVERRIDE; + void UpdateValue( OutputImageType* oImage, + const NodeType& iValue ) override; /** Make sure the given node does not violate any topological constraint*/ bool CheckTopology( OutputImageType* oImage, - const NodeType& iNode ) ITK_OVERRIDE; - void InitializeOutput( OutputImageType* oImage ) ITK_OVERRIDE; + const NodeType& iNode ) override; + void InitializeOutput( OutputImageType* oImage ) override; /** Find the nodes were the front will propagate given a node */ void GetInternalNodesUsed( OutputImageType* oImage, diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx index 20cca8a99c8..f089efdfed9 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx @@ -68,7 +68,7 @@ FastMarchingImageFilterBase() : m_OutputSpacing.Fill(1.0); m_OutputDirection.SetIdentity(); - m_InputCache = ITK_NULLPTR; + m_InputCache = nullptr; } template< typename TInput, typename TOutput > diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.h b/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.h index 9ac350f5b3c..f84d457505f 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.h @@ -124,7 +124,7 @@ class ITK_TEMPLATE_EXPORT FastMarchingImageToNodePairContainerAdaptor : FastMarchingImageToNodePairContainerAdaptor(); /** \brief Destructor */ - virtual ~FastMarchingImageToNodePairContainerAdaptor() ITK_OVERRIDE {} + ~FastMarchingImageToNodePairContainerAdaptor() override {} ImageConstPointer m_AliveImage; ImageConstPointer m_TrialImage; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx index 2b58f24c82d..359b6954d31 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx @@ -29,8 +29,8 @@ namespace itk template< typename TInput, typename TOutput, typename TImage > FastMarchingImageToNodePairContainerAdaptor< TInput, TOutput, TImage > ::FastMarchingImageToNodePairContainerAdaptor() : - m_AliveImage( ITK_NULLPTR ), m_TrialImage( ITK_NULLPTR ), m_ForbiddenImage( ITK_NULLPTR ), - m_AlivePoints( ITK_NULLPTR ), m_TrialPoints( ITK_NULLPTR ), m_ForbiddenPoints( ITK_NULLPTR ), + m_AliveImage( nullptr ), m_TrialImage( nullptr ), m_ForbiddenImage( nullptr ), + m_AlivePoints( nullptr ), m_TrialPoints( nullptr ), m_ForbiddenPoints( nullptr ), m_AliveValue( NumericTraits< OutputPixelType >::ZeroValue() ), m_TrialValue( NumericTraits< OutputPixelType >::ZeroValue() ), m_IsForbiddenImageBinaryMask( false ) diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingNumberOfElementsStoppingCriterion.h b/Modules/Filtering/FastMarching/include/itkFastMarchingNumberOfElementsStoppingCriterion.h index 406c9444c81..9c0265f0c43 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingNumberOfElementsStoppingCriterion.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingNumberOfElementsStoppingCriterion.h @@ -61,12 +61,12 @@ public FastMarchingStoppingCriterionBase< TInput, TOutput > itkSetMacro( TargetNumberOfElements, IdentifierType ); itkGetMacro( TargetNumberOfElements, IdentifierType ); - bool IsSatisfied() const ITK_OVERRIDE + bool IsSatisfied() const override { return ( this->m_CurrentNumberOfElements >= this->m_TargetNumberOfElements ); } - std::string GetDescription() const ITK_OVERRIDE + std::string GetDescription() const override { return "Current Number of Elements >= Target Number of Elements"; } @@ -77,17 +77,17 @@ public FastMarchingStoppingCriterionBase< TInput, TOutput > m_TargetNumberOfElements( NumericTraits< IdentifierType >::ZeroValue() ) {} - ~FastMarchingNumberOfElementsStoppingCriterion() ITK_OVERRIDE {} + ~FastMarchingNumberOfElementsStoppingCriterion() override {} IdentifierType m_CurrentNumberOfElements; IdentifierType m_TargetNumberOfElements; - void SetCurrentNode( const NodeType& ) ITK_OVERRIDE + void SetCurrentNode( const NodeType& ) override { ++this->m_CurrentNumberOfElements; } - void Reset() ITK_OVERRIDE + void Reset() override { this->m_CurrentNumberOfElements = NumericTraits< IdentifierType >::ZeroValue(); } diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h index 9af3a1f5b27..60f7a189504 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.h @@ -107,29 +107,29 @@ class ITK_TEMPLATE_EXPORT FastMarchingQuadEdgeMeshFilterBase : protected: FastMarchingQuadEdgeMeshFilterBase(); - virtual ~FastMarchingQuadEdgeMeshFilterBase() ITK_OVERRIDE; + ~FastMarchingQuadEdgeMeshFilterBase() override; NodeLabelMapType m_Label; - IdentifierType GetTotalNumberOfNodes() const ITK_OVERRIDE; + IdentifierType GetTotalNumberOfNodes() const override; void SetOutputValue( OutputMeshType* oMesh, const NodeType& iNode, - const OutputPixelType& iValue ) ITK_OVERRIDE; + const OutputPixelType& iValue ) override; const OutputPixelType GetOutputValue( OutputMeshType* oMesh, - const NodeType& iNode ) const ITK_OVERRIDE; + const NodeType& iNode ) const override; - unsigned char GetLabelValueForGivenNode( const NodeType& iNode ) const ITK_OVERRIDE; + unsigned char GetLabelValueForGivenNode( const NodeType& iNode ) const override; void SetLabelValueForGivenNode( const NodeType& iNode, - const LabelType& iLabel ) ITK_OVERRIDE; + const LabelType& iLabel ) override; void UpdateNeighbors( OutputMeshType* oMesh, - const NodeType& iNode ) ITK_OVERRIDE; + const NodeType& iNode ) override; void UpdateValue( OutputMeshType* oMesh, - const NodeType& iNode ) ITK_OVERRIDE; + const NodeType& iNode ) override; const OutputVectorRealType Solve( OutputMeshType* oMesh, @@ -160,9 +160,9 @@ class ITK_TEMPLATE_EXPORT FastMarchingQuadEdgeMeshFilterBase : OutputPointIdentifierType& oId ) const; bool CheckTopology( OutputMeshType* oMesh, - const NodeType& iNode ) ITK_OVERRIDE; + const NodeType& iNode ) override; - void InitializeOutput( OutputMeshType* oMesh ) ITK_OVERRIDE; + void InitializeOutput( OutputMeshType* oMesh ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FastMarchingQuadEdgeMeshFilterBase); diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx index 21a769ddd32..fd57c398cd1 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx @@ -31,7 +31,7 @@ template< typename TInput, typename TOutput > FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput > ::FastMarchingQuadEdgeMeshFilterBase() : Superclass() { - this->m_InputMesh = ITK_NULLPTR; + this->m_InputMesh = nullptr; } template< typename TInput, typename TOutput > @@ -128,7 +128,7 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput > } else { - itkGenericExceptionMacro( <<"qe_it is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"qe_it is nullptr" ); } qe_it = qe_it->GetOnext(); } @@ -136,7 +136,7 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput > } else { - itkGenericExceptionMacro( <<"qe is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"qe is nullptr" ); } } @@ -225,7 +225,7 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput > else { // throw one exception here - itkGenericExceptionMacro( << "qe_it2 is ITK_NULLPTR" ); + itkGenericExceptionMacro( << "qe_it2 is nullptr" ); } } while( qe_it != qe ); @@ -242,7 +242,7 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput > else { // throw one exception - itkGenericExceptionMacro( << "qe_it is ITK_NULLPTR" ); + itkGenericExceptionMacro( << "qe_it is nullptr" ); } } diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h b/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h index 6aa36cb4593..6c6dc08d7be 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h @@ -91,7 +91,7 @@ public FastMarchingStoppingCriterionBase< TInput, TOutput > } /** \brief Set the current node */ - void SetCurrentNode( const NodeType& iNode ) ITK_OVERRIDE + void SetCurrentNode( const NodeType& iNode ) override { if( !m_Initialized ) { @@ -133,13 +133,13 @@ public FastMarchingStoppingCriterionBase< TInput, TOutput > } /** \brief returns if the stopping condition is satisfied or not. */ - bool IsSatisfied() const ITK_OVERRIDE + bool IsSatisfied() const override { return m_Satisfied && ( this->m_CurrentValue >= m_StoppingValue ); } /** \brief Get a short description of the stopping criterion. */ - std::string GetDescription() const ITK_OVERRIDE + std::string GetDescription() const override { return "Target Nodes Reached with possible overshoot"; } @@ -159,7 +159,7 @@ public FastMarchingStoppingCriterionBase< TInput, TOutput > } /** Destructor */ - ~FastMarchingReachedTargetNodesStoppingCriterion() ITK_OVERRIDE {} + ~FastMarchingReachedTargetNodesStoppingCriterion() override {} TargetConditionType m_TargetCondition; std::vector< NodeType > m_TargetNodes; @@ -170,7 +170,7 @@ public FastMarchingStoppingCriterionBase< TInput, TOutput > bool m_Satisfied; bool m_Initialized; - void Reset() ITK_OVERRIDE + void Reset() override { this->Initialize(); } diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingStoppingCriterionBase.h b/Modules/Filtering/FastMarching/include/itkFastMarchingStoppingCriterionBase.h index 0a6957f97e5..dcbddc10e55 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingStoppingCriterionBase.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingStoppingCriterionBase.h @@ -70,14 +70,14 @@ class FastMarchingStoppingCriterionBase : public StoppingCriterionBase protected: /** Constructor */ - FastMarchingStoppingCriterionBase() : Superclass(), m_Domain( ITK_NULLPTR ) + FastMarchingStoppingCriterionBase() : Superclass(), m_Domain( nullptr ) { m_CurrentValue = NumericTraits< OutputPixelType >::ZeroValue(); m_PreviousValue = NumericTraits< OutputPixelType >::ZeroValue(); } /** Destructor */ - virtual ~FastMarchingStoppingCriterionBase() ITK_OVERRIDE {} + ~FastMarchingStoppingCriterionBase() override {} OutputDomainPointer m_Domain; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingThresholdStoppingCriterion.h b/Modules/Filtering/FastMarching/include/itkFastMarchingThresholdStoppingCriterion.h index 7fba9c71b81..eb221d2a038 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingThresholdStoppingCriterion.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingThresholdStoppingCriterion.h @@ -55,12 +55,12 @@ public FastMarchingStoppingCriterionBase< TInput, TOutput > itkSetMacro( Threshold, OutputPixelType ); itkGetMacro( Threshold, OutputPixelType ); - bool IsSatisfied() const ITK_OVERRIDE + bool IsSatisfied() const override { return ( this->m_CurrentValue >= this->m_Threshold ); } - std::string GetDescription() const ITK_OVERRIDE + std::string GetDescription() const override { return "Current Value >= Threshold"; } @@ -70,13 +70,13 @@ public FastMarchingStoppingCriterionBase< TInput, TOutput > m_Threshold( NumericTraits< OutputPixelType >::ZeroValue() ) {} - ~FastMarchingThresholdStoppingCriterion() ITK_OVERRIDE {} + ~FastMarchingThresholdStoppingCriterion() override {} OutputPixelType m_Threshold; - void SetCurrentNode( const NodeType& ) ITK_OVERRIDE {} + void SetCurrentNode( const NodeType& ) override {} - void Reset() ITK_OVERRIDE {} + void Reset() override {} private: FastMarchingThresholdStoppingCriterion( const Self& ); diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h index 3335db3118a..a2a51a8d142 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h @@ -189,15 +189,15 @@ class ITK_TEMPLATE_EXPORT FastMarchingUpwindGradientImageFilter: protected: FastMarchingUpwindGradientImageFilter(); - ~FastMarchingUpwindGradientImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FastMarchingUpwindGradientImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void Initialize(LevelSetImageType *) ITK_OVERRIDE; + void Initialize(LevelSetImageType *) override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - virtual void UpdateNeighbors(const IndexType & index, - const SpeedImageType *, LevelSetImageType *) ITK_OVERRIDE; + void UpdateNeighbors(const IndexType & index, + const SpeedImageType *, LevelSetImageType *) override; virtual void ComputeGradient(const IndexType & index, const LevelSetImageType *output, diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx index 28f42616cd7..8023eee1c8f 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx @@ -33,8 +33,8 @@ template< typename TLevelSet, typename TSpeedImage > FastMarchingUpwindGradientImageFilter< TLevelSet, TSpeedImage > ::FastMarchingUpwindGradientImageFilter() { - m_TargetPoints = ITK_NULLPTR; - m_ReachedTargetPoints = ITK_NULLPTR; + m_TargetPoints = nullptr; + m_ReachedTargetPoints = nullptr; m_GradientImage = GradientImageType::New(); m_GenerateGradientImage = false; m_TargetOffset = 1.0; diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.h b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.h index 4946f6da492..ebf1be37f94 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.h @@ -93,14 +93,14 @@ class ITK_TEMPLATE_EXPORT FastMarchingUpwindGradientImageFilterBase: protected: FastMarchingUpwindGradientImageFilterBase(); - ~FastMarchingUpwindGradientImageFilterBase() ITK_OVERRIDE {} + ~FastMarchingUpwindGradientImageFilterBase() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void InitializeOutput( OutputImageType* oImage ) ITK_OVERRIDE; + void InitializeOutput( OutputImageType* oImage ) override; - virtual void UpdateNeighbors( OutputImageType* oImage, - const NodeType& iNode ) ITK_OVERRIDE; + void UpdateNeighbors( OutputImageType* oImage, + const NodeType& iNode ) override; virtual void ComputeGradient(OutputImageType* oImage, const NodeType& iNode ); diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx index cb5ff45af4d..999da1e810a 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingBaseTest.cxx @@ -47,42 +47,42 @@ class FastMarchingBaseTestHelper : protected: FastMarchingBaseTestHelper() {} - ~FastMarchingBaseTestHelper() ITK_OVERRIDE {} + ~FastMarchingBaseTestHelper() override {} - IdentifierType GetTotalNumberOfNodes() const ITK_OVERRIDE + IdentifierType GetTotalNumberOfNodes() const override { return 1; } void SetOutputValue( OutputDomainType*, const NodeType&, - const OutputPixelType& ) ITK_OVERRIDE + const OutputPixelType& ) override { } const OutputPixelType GetOutputValue( OutputDomainType* , - const NodeType& ) const ITK_OVERRIDE + const NodeType& ) const override { return NumericTraits< OutputPixelType >::ZeroValue(); } - unsigned char GetLabelValueForGivenNode( const NodeType& ) const ITK_OVERRIDE + unsigned char GetLabelValueForGivenNode( const NodeType& ) const override { return Traits::Far; } void SetLabelValueForGivenNode( const NodeType& , - const LabelType& ) ITK_OVERRIDE + const LabelType& ) override {} - void UpdateNeighbors( OutputDomainType* , const NodeType& ) ITK_OVERRIDE + void UpdateNeighbors( OutputDomainType* , const NodeType& ) override {} - void UpdateValue( OutputDomainType* , const NodeType& ) ITK_OVERRIDE + void UpdateValue( OutputDomainType* , const NodeType& ) override {} - bool CheckTopology( OutputDomainType* , const NodeType& ) ITK_OVERRIDE + bool CheckTopology( OutputDomainType* , const NodeType& ) override { return true; } - void InitializeOutput( OutputDomainType* ) ITK_OVERRIDE {} + void InitializeOutput( OutputDomainType* ) override {} private: FastMarchingBaseTestHelper( const Self& ); diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx index 03387e5cfd7..bdc2a5484c8 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx @@ -299,7 +299,7 @@ int itkFastMarchingExtensionImageFilterTest(int, char* [] ) if ( marcher->GetAuxiliaryImage(2) ) { - std::cout << "GetAuxiliaryImage(2) should have returned ITK_NULLPTR"; + std::cout << "GetAuxiliaryImage(2) should have returned nullptr"; std::cout << std::endl; passed = false; } diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingStoppingCriterionBaseTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingStoppingCriterionBaseTest.cxx index 843711508f2..19c8abfaf34 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingStoppingCriterionBaseTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingStoppingCriterionBaseTest.cxx @@ -39,16 +39,16 @@ public FastMarchingStoppingCriterionBase< TInput, TOutput > itkTypeMacro(FastMarchingStoppingCriterionBaseHelperTest, FastMarchingStoppingCriterionBase ); - bool IsSatisfied() const ITK_OVERRIDE { return true; } - std::string GetDescription() const ITK_OVERRIDE { return "Description"; } + bool IsSatisfied() const override { return true; } + std::string GetDescription() const override { return "Description"; } protected: FastMarchingStoppingCriterionBaseHelperTest() : Superclass() {} - ~FastMarchingStoppingCriterionBaseHelperTest() ITK_OVERRIDE {} + ~FastMarchingStoppingCriterionBaseHelperTest() override {} - void SetCurrentNode( const NodeType& ) ITK_OVERRIDE {} + void SetCurrentNode( const NodeType& ) override {} - void Reset() ITK_OVERRIDE {} + void Reset() override {} private: FastMarchingStoppingCriterionBaseHelperTest( const Self& ); diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionFunction.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionFunction.h index e018d0b3472..48fd53b82b6 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionFunction.h @@ -104,20 +104,20 @@ class GPUAnisotropicDiffusionFunction : /** Returns the time step supplied by the user. We don't need to use the * global data supplied since we are returning a fixed value. */ - virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE + TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const override { return this->GetTimeStep(); } /** The anisotropic diffusion classes don't use this particular parameter * so it's safe to return a null value. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { - return ITK_NULLPTR; + return nullptr; } /** Does nothing. No global data is used in this class of equations. */ - virtual void ReleaseGlobalDataPointer( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE + void ReleaseGlobalDataPointer( void *itkNotUsed(GlobalData) ) const override { /* do nothing */ } @@ -130,9 +130,9 @@ class GPUAnisotropicDiffusionFunction : m_TimeStep = 0.125f; // default value } - ~GPUAnisotropicDiffusionFunction() ITK_OVERRIDE {} + ~GPUAnisotropicDiffusionFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "TimeStep: " << m_TimeStep << std::endl; diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionImageFilter.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionImageFilter.h index aa0ba15871f..244169a571b 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionImageFilter.h +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionImageFilter.h @@ -64,11 +64,11 @@ class ITK_TEMPLATE_EXPORT GPUAnisotropicDiffusionImageFilter : protected: GPUAnisotropicDiffusionImageFilter() {} - ~GPUAnisotropicDiffusionImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GPUAnisotropicDiffusionImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Prepare for the iteration process. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GPUAnisotropicDiffusionImageFilter); diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientAnisotropicDiffusionImageFilter.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientAnisotropicDiffusionImageFilter.h index ad8f54db33f..5adb5142f8f 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientAnisotropicDiffusionImageFilter.h +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientAnisotropicDiffusionImageFilter.h @@ -84,7 +84,7 @@ class GPUGradientAnisotropicDiffusionImageFilter : this->SetDifferenceFunction(p); } - ~GPUGradientAnisotropicDiffusionImageFilter() ITK_OVERRIDE {} + ~GPUGradientAnisotropicDiffusionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(GPUGradientAnisotropicDiffusionImageFilter); @@ -105,10 +105,10 @@ class GPUGradientAnisotropicDiffusionImageFilterFactory : public ObjectFactoryBa typedef SmartPointer ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char* GetITKSourceVersion() const ITK_OVERRIDE { + const char* GetITKSourceVersion() const override { return ITK_SOURCE_VERSION; } - const char* GetDescription() const ITK_OVERRIDE { + const char* GetDescription() const override { return "A Factory for GPUGradientAnisotropicDiffusionImageFilter"; } diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h index 746bff9ca16..55555474bd8 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h @@ -92,10 +92,10 @@ class ITK_TEMPLATE_EXPORT GPUGradientNDAnisotropicDiffusionFunction : /** Compute the equation value. */ virtual void GPUComputeUpdate( const typename TImage::Pointer output, typename TImage::Pointer buffer, - void *globalData ) ITK_OVERRIDE; + void *globalData ) override; /** This method is called prior to each iteration of the solver. */ - virtual void InitializeIteration() ITK_OVERRIDE + void InitializeIteration() override { m_K = static_cast< PixelType >( this->GetAverageGradientMagnitudeSquared() * this->GetConductanceParameter() * this->GetConductanceParameter() * -2.0f ); @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT GPUGradientNDAnisotropicDiffusionFunction : protected: GPUGradientNDAnisotropicDiffusionFunction(); - ~GPUGradientNDAnisotropicDiffusionFunction() ITK_OVERRIDE {} + ~GPUGradientNDAnisotropicDiffusionFunction() override {} /** Inner product function. */ NeighborhoodInnerProduct< ImageType > m_InnerProduct; diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h index 57edaa681f0..3f53e446823 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h @@ -63,11 +63,11 @@ class ITK_TEMPLATE_EXPORT GPUScalarAnisotropicDiffusionFunction : itkGetOpenCLSourceFromKernelMacro(GPUScalarAnisotropicDiffusionFunctionKernel); /** Compute average squared gradient of magnitude using the GPU */ - virtual void GPUCalculateAverageGradientMagnitudeSquared(TImage *) ITK_OVERRIDE; + void GPUCalculateAverageGradientMagnitudeSquared(TImage *) override; protected: GPUScalarAnisotropicDiffusionFunction(); - ~GPUScalarAnisotropicDiffusionFunction() ITK_OVERRIDE {} + ~GPUScalarAnisotropicDiffusionFunction() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(GPUScalarAnisotropicDiffusionFunction); diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.hxx b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.hxx index 0abdbc10b0b..4ce1095e05c 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.hxx +++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.hxx @@ -114,21 +114,21 @@ GPUScalarAnisotropicDiffusionFunction< TImage > // Set shared memory args if (ImageDim == 2) { - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[1], ITK_NULLPTR); - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0], ITK_NULLPTR); - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0], ITK_NULLPTR); - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[1], ITK_NULLPTR); - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[1], ITK_NULLPTR); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[1], nullptr); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0], nullptr); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0], nullptr); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[1], nullptr); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[1], nullptr); } else if (ImageDim == 3) { - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[1] * localSize[2], ITK_NULLPTR); - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[1], ITK_NULLPTR); - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[1], ITK_NULLPTR); - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[2], ITK_NULLPTR); - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[2], ITK_NULLPTR); - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[1] * localSize[2], ITK_NULLPTR); - kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[1] * localSize[2], ITK_NULLPTR); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[1] * localSize[2], nullptr); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[1], nullptr); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[1], nullptr); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[2], nullptr); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[0] * localSize[2], nullptr); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[1] * localSize[2], nullptr); + kernelManager->SetKernelArg(kernelHandle, argidx++, sizeof(float) * localSize[1] * localSize[2], nullptr); } else { diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx b/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx index 44b57d30689..b699815a8c8 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx +++ b/Modules/Filtering/GPUAnisotropicSmoothing/test/itkGPUGradientAnisotropicDiffusionImageFilterTest.cxx @@ -170,7 +170,7 @@ int runGPUGradientAnisotropicDiffusionImageFilterTest(const std::string& inFile, } - GPUFilter = ITK_NULLPTR; // explicit GPU object destruction test + GPUFilter = nullptr; // explicit GPU object destruction test itk::GPUContextManager::GetInstance()->DestroyInstance(); // GPUContextManager singleton destruction test return EXIT_SUCCESS; } diff --git a/Modules/Filtering/GPUImageFilterBase/include/itkGPUBoxImageFilter.h b/Modules/Filtering/GPUImageFilterBase/include/itkGPUBoxImageFilter.h index 34265b421ff..ee948744ca6 100644 --- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUBoxImageFilter.h +++ b/Modules/Filtering/GPUImageFilterBase/include/itkGPUBoxImageFilter.h @@ -72,9 +72,9 @@ class GPUBoxImageFilter : protected: GPUBoxImageFilter() { } - ~GPUBoxImageFilter() ITK_OVERRIDE {} + ~GPUBoxImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { GPUSuperclass::PrintSelf(os, indent); } diff --git a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h index b0793be74b0..c70bcb3b2d8 100644 --- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h +++ b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h @@ -150,7 +150,7 @@ class ITK_TEMPLATE_EXPORT GPUNeighborhoodOperatorImageFilter : protected: GPUNeighborhoodOperatorImageFilter(); - virtual ~GPUNeighborhoodOperatorImageFilter() ITK_OVERRIDE {} + ~GPUNeighborhoodOperatorImageFilter() override {} /** NeighborhoodOperatorImageFilter can be implemented as a * multithreaded filter. Therefore, this implementation provides a @@ -166,9 +166,9 @@ class ITK_TEMPLATE_EXPORT GPUNeighborhoodOperatorImageFilter : void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId);*/ - void GPUGenerateData() ITK_OVERRIDE; + void GPUGenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { GPUSuperclass::PrintSelf(os, indent); } diff --git a/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h b/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h index 1e0a0ee2d10..dcee4800f2e 100644 --- a/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h +++ b/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h @@ -96,16 +96,16 @@ class ITK_TEMPLATE_EXPORT GPUDiscreteGaussianImageFilter : typedef GPUNeighborhoodOperatorImageFilter< InputImageType, OutputImageType, RealOutputPixelValueType > SingleFilterType; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; protected: GPUDiscreteGaussianImageFilter(); - virtual ~GPUDiscreteGaussianImageFilter() ITK_OVERRIDE {} + ~GPUDiscreteGaussianImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Standard GPU pipeline method. */ - void GPUGenerateData() ITK_OVERRIDE; + void GPUGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GPUDiscreteGaussianImageFilter); diff --git a/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.h b/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.h index 5fd6b8dfd11..9958d3f5368 100644 --- a/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.h +++ b/Modules/Filtering/GPUSmoothing/include/itkGPUMeanImageFilter.h @@ -79,11 +79,11 @@ class ITK_TEMPLATE_EXPORT GPUMeanImageFilter : //public GPUImageToImageFilter< protected: GPUMeanImageFilter(); - ~GPUMeanImageFilter() ITK_OVERRIDE; + ~GPUMeanImageFilter() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GPUGenerateData() ITK_OVERRIDE; + void GPUGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GPUMeanImageFilter); @@ -105,11 +105,11 @@ class GPUMeanImageFilterFactory : public ObjectFactoryBase typedef SmartPointer ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char* GetITKSourceVersion() const ITK_OVERRIDE + const char* GetITKSourceVersion() const override { return ITK_SOURCE_VERSION; } - const char* GetDescription() const ITK_OVERRIDE + const char* GetDescription() const override { return "A Factory for GPUMeanImageFilter"; } diff --git a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h index 3a9bc129dcf..a84af5ede95 100644 --- a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h +++ b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h @@ -129,7 +129,7 @@ class ITK_TEMPLATE_EXPORT GPUBinaryThresholdImageFilter : protected: GPUBinaryThresholdImageFilter(); - virtual ~GPUBinaryThresholdImageFilter() ITK_OVERRIDE {} + ~GPUBinaryThresholdImageFilter() override {} /** This method is used to set the state of the filter before * multi-threading. */ @@ -137,7 +137,7 @@ class ITK_TEMPLATE_EXPORT GPUBinaryThresholdImageFilter : /** Unlike CPU version, GPU version of binary threshold filter is not multi-threaded */ - virtual void GPUGenerateData() ITK_OVERRIDE; + void GPUGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GPUBinaryThresholdImageFilter); @@ -159,11 +159,11 @@ class GPUBinaryThresholdImageFilterFactory : public ObjectFactoryBase typedef SmartPointer ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char* GetITKSourceVersion() const ITK_OVERRIDE + const char* GetITKSourceVersion() const override { return ITK_SOURCE_VERSION; } - const char* GetDescription() const ITK_OVERRIDE + const char* GetDescription() const override { return "A Factory for GPUBinaryThresholdImageFilter"; } diff --git a/Modules/Filtering/ImageCompare/include/itkAbsoluteValueDifferenceImageFilter.h b/Modules/Filtering/ImageCompare/include/itkAbsoluteValueDifferenceImageFilter.h index 1f95d4ef055..8fbbc6c4ac7 100644 --- a/Modules/Filtering/ImageCompare/include/itkAbsoluteValueDifferenceImageFilter.h +++ b/Modules/Filtering/ImageCompare/include/itkAbsoluteValueDifferenceImageFilter.h @@ -124,7 +124,7 @@ class AbsoluteValueDifferenceImageFilter: protected: AbsoluteValueDifferenceImageFilter() {} - virtual ~AbsoluteValueDifferenceImageFilter() ITK_OVERRIDE {} + ~AbsoluteValueDifferenceImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AbsoluteValueDifferenceImageFilter); diff --git a/Modules/Filtering/ImageCompare/include/itkCheckerBoardImageFilter.h b/Modules/Filtering/ImageCompare/include/itkCheckerBoardImageFilter.h index c2ef8d4820d..883594ac3f1 100644 --- a/Modules/Filtering/ImageCompare/include/itkCheckerBoardImageFilter.h +++ b/Modules/Filtering/ImageCompare/include/itkCheckerBoardImageFilter.h @@ -85,8 +85,8 @@ class ITK_TEMPLATE_EXPORT CheckerBoardImageFilter: protected: CheckerBoardImageFilter(); - ~CheckerBoardImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CheckerBoardImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** CheckerBoardImageFilter can be implemented as a multithreaded filter. Therefore, * this implementation provides a ThreadedGenerateData() routine which @@ -97,7 +97,7 @@ class ITK_TEMPLATE_EXPORT CheckerBoardImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const ImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CheckerBoardImageFilter); diff --git a/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h b/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h index c65255276af..fec9e386f9c 100644 --- a/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h +++ b/Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.h @@ -231,10 +231,10 @@ class ITK_TEMPLATE_EXPORT STAPLEImageFilter: m_ConfidenceWeight = 1.0; } - virtual ~STAPLEImageFilter() ITK_OVERRIDE {} - void GenerateData() ITK_OVERRIDE; + ~STAPLEImageFilter() override {} + void GenerateData() override; - void PrintSelf(std::ostream &, Indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream &, Indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(STAPLEImageFilter); diff --git a/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.h b/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.h index c7c78c8a75d..25f907b60a9 100644 --- a/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.h +++ b/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.h @@ -123,30 +123,30 @@ class ITK_TEMPLATE_EXPORT SimilarityIndexImageFilter: protected: SimilarityIndexImageFilter(); - ~SimilarityIndexImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SimilarityIndexImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Pass the input through unmodified. Do this by Grafting in the * AllocateOutputs method. */ - void AllocateOutputs() ITK_OVERRIDE; + void AllocateOutputs() override; /** Initialize some accumulators before the threads run. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Do final mean and variance computation from data accumulated in threads. */ - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const RegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion(DataObject *data) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *data) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SimilarityIndexImageFilter); diff --git a/Modules/Filtering/ImageCompare/include/itkSquaredDifferenceImageFilter.h b/Modules/Filtering/ImageCompare/include/itkSquaredDifferenceImageFilter.h index 4e982cb78c8..d2fec4b037c 100644 --- a/Modules/Filtering/ImageCompare/include/itkSquaredDifferenceImageFilter.h +++ b/Modules/Filtering/ImageCompare/include/itkSquaredDifferenceImageFilter.h @@ -123,7 +123,7 @@ class SquaredDifferenceImageFilter: protected: SquaredDifferenceImageFilter() {} - virtual ~SquaredDifferenceImageFilter() ITK_OVERRIDE {} + ~SquaredDifferenceImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SquaredDifferenceImageFilter); diff --git a/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx b/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx index 53b1cc4be0e..5e0ae92a672 100644 --- a/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompare/test/itkSTAPLEImageFilterTest.cxx @@ -80,27 +80,27 @@ class Stapler : public StaplerBase m_Stapler = StapleFilterType::New(); this->SetForeground(1); } - virtual ~Stapler() ITK_OVERRIDE {} + ~Stapler() override {} - virtual double GetConfidenceWeight( ) const ITK_OVERRIDE + double GetConfidenceWeight( ) const override { return m_Stapler->GetConfidenceWeight(); } - virtual void SetConfidenceWeight( double w ) ITK_OVERRIDE + void SetConfidenceWeight( double w ) override { m_Stapler->SetConfidenceWeight( w); } - virtual double GetSensitivity( unsigned int i ) ITK_OVERRIDE + double GetSensitivity( unsigned int i ) override { return m_Stapler->GetSensitivity(i); } - virtual double GetSpecificity( unsigned int i ) ITK_OVERRIDE + double GetSpecificity( unsigned int i ) override { return m_Stapler->GetSpecificity(i); } - virtual unsigned short GetForeground() const ITK_OVERRIDE + unsigned short GetForeground() const override { return m_Stapler->GetForegroundValue(); } - virtual void SetForeground( unsigned short l ) ITK_OVERRIDE + void SetForeground( unsigned short l ) override { m_Stapler->SetForegroundValue( l ); } - virtual unsigned int GetElapsedIterations() ITK_OVERRIDE + unsigned int GetElapsedIterations() override { return m_Stapler->GetElapsedIterations(); } - virtual int Execute() ITK_OVERRIDE; + int Execute() override; private: typename StapleFilterType::Pointer m_Stapler; diff --git a/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.h b/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.h index b55e2473804..0134b6b340f 100644 --- a/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.h +++ b/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.h @@ -89,11 +89,11 @@ class ITK_TEMPLATE_EXPORT ComposeImageFilter: protected: ComposeImageFilter(); - virtual void GenerateOutputInformation(void) ITK_OVERRIDE; + void GenerateOutputInformation(void) override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void ThreadedGenerateData(const RegionType & outputRegionForThread, ThreadIdType) ITK_OVERRIDE; + void ThreadedGenerateData(const RegionType & outputRegionForThread, ThreadIdType) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ComposeImageFilter); diff --git a/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h b/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h index 2ba65b78022..05db9cd6811 100644 --- a/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h +++ b/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h @@ -253,7 +253,7 @@ class JoinImageFilter: protected: JoinImageFilter() {} - virtual ~JoinImageFilter() ITK_OVERRIDE {} + ~JoinImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(JoinImageFilter); diff --git a/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.h b/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.h index d277ed98f83..17fecaeec8e 100644 --- a/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.h +++ b/Modules/Filtering/ImageCompose/include/itkJoinSeriesImageFilter.h @@ -95,32 +95,32 @@ class ITK_TEMPLATE_EXPORT JoinSeriesImageFilter: protected: JoinSeriesImageFilter(); - ~JoinSeriesImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~JoinSeriesImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Override VeriyInputInformation() to add the additional check * that all inputs have the same number of components. * * \sa ProcessObject::VerifyInputInformation */ - virtual void VerifyInputInformation() ITK_OVERRIDE; + void VerifyInputInformation() override; /** Overrides GenerateOutputInformation() in order to produce * an image which has a different information than the first input. * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** Overrides GenerateInputRequestedRegion() in order to inform * the pipeline execution model of different input requested regions * than the output requested region. * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** JoinSeriesImageFilter can be implemented as a multithreaded filter. * \sa ImageSource::ThreadedGenerateData(), * ImageSource::GenerateData() */ - virtual void ThreadedGenerateData(const OutputImageRegionType & - outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType & + outputRegionForThread, ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(JoinSeriesImageFilter); diff --git a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx index 5184e1f198a..5867388f436 100644 --- a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx @@ -208,7 +208,7 @@ int itkJoinSeriesImageFilterTest( int, char* [] ) passed = false; // Set the 2nd input null - joinSeriesImage->SetInput( 1, ITK_NULLPTR ); + joinSeriesImage->SetInput( 1, nullptr ); try { joinSeriesImage->Update(); diff --git a/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h b/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h index 88537ec3260..6008b7c8015 100644 --- a/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h @@ -181,18 +181,18 @@ class ITK_TEMPLATE_EXPORT BilateralImageFilter: BilateralImageFilter(); /** Destructor. */ - virtual ~BilateralImageFilter() ITK_OVERRIDE {} + ~BilateralImageFilter() override {} /** PrintSelf. */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Do some setup before the ThreadedGenerateData */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Standard pipeline method. This filter is implemented as a multi-threaded * filter. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** BilateralImageFilter needs a larger input requested region than * the output requested region (larger by the size of the domain @@ -200,7 +200,7 @@ class ITK_TEMPLATE_EXPORT BilateralImageFilter: * an implementation for GenerateInputRequestedRegion() in order to * inform the pipeline execution model. * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BilateralImageFilter); diff --git a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h index 2ae0ef687fa..7c8529076ed 100644 --- a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h @@ -207,7 +207,7 @@ class ITK_TEMPLATE_EXPORT CannyEdgeDetectionImageFilter: * pipeline execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -226,9 +226,9 @@ class ITK_TEMPLATE_EXPORT CannyEdgeDetectionImageFilter: protected: CannyEdgeDetectionImageFilter(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; typedef DiscreteGaussianImageFilter< InputImageType, OutputImageType > GaussianImageFilterType; @@ -238,7 +238,7 @@ class ITK_TEMPLATE_EXPORT CannyEdgeDetectionImageFilter: private: ITK_DISALLOW_COPY_AND_ASSIGN(CannyEdgeDetectionImageFilter); - virtual ~CannyEdgeDetectionImageFilter() ITK_OVERRIDE {} + ~CannyEdgeDetectionImageFilter() override {} /** Thread-Data structure. */ struct CannyThreadStruct diff --git a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx index c8051b01988..0bcfca5a25a 100644 --- a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx @@ -76,7 +76,7 @@ CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::CannyEdgeDetectionIm m_NodeStore = ListNodeStorageType::New(); m_NodeList = ListType::New(); - m_OutputImage = ITK_NULLPTR; + m_OutputImage = nullptr; } template< typename TInputImage, typename TOutputImage > @@ -113,7 +113,7 @@ CannyEdgeDetectionImageFilter< TInputImage, TOutputImage > ImageRegionIterator< TOutputImage > it; - void *globalData = ITK_NULLPTR; + void *globalData = nullptr; // Here input is the result from the gaussian filter output is the update // buffer @@ -313,7 +313,7 @@ CannyEdgeDetectionImageFilter< TInputImage, TOutputImage > this->HysteresisThresholding(); this->GraftOutput( output ); - this->m_OutputImage = ITK_NULLPTR; + this->m_OutputImage = nullptr; } template< typename TInputImage, typename TOutputImage > diff --git a/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.h b/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.h index e10390ac9bc..53d11d8ff69 100644 --- a/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.h @@ -113,7 +113,7 @@ class ITK_TEMPLATE_EXPORT DerivativeImageFilter: * inform the pipeline execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; protected: DerivativeImageFilter() @@ -123,15 +123,15 @@ class ITK_TEMPLATE_EXPORT DerivativeImageFilter: m_UseImageSpacing = true; } - virtual ~DerivativeImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DerivativeImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Standard pipeline method. While this class does not implement a * ThreadedGenerateData(), its GenerateData() delegates all * calculations to an NeighborhoodOperatorImageFilter. Since the * NeighborhoodOperatorImageFilter is multithreaded, this filter is * multithreaded by default. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DerivativeImageFilter); diff --git a/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h b/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h index 3efc7b873d3..b117fedb9b6 100644 --- a/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h @@ -122,10 +122,10 @@ class ITK_TEMPLATE_EXPORT GradientVectorFlowImageFilter:public ImageToImageFilte protected: GradientVectorFlowImageFilter(); - ~GradientVectorFlowImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GradientVectorFlowImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Precompute m_BImage and m_CImage[i] and allocate memory for all the various internal images */ void InitInterImage(); diff --git a/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.h b/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.h index c30171463c4..ace7b1fac80 100644 --- a/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.h @@ -130,11 +130,11 @@ class ITK_TEMPLATE_EXPORT Hessian3DToVesselnessMeasureImageFilter:public protected: Hessian3DToVesselnessMeasureImageFilter(); - ~Hessian3DToVesselnessMeasureImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~Hessian3DToVesselnessMeasureImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate Data */ - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Hessian3DToVesselnessMeasureImageFilter); diff --git a/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h b/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h index a2f26905ffb..342aa0bbb89 100644 --- a/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h @@ -140,7 +140,7 @@ class ITK_TEMPLATE_EXPORT HessianRecursiveGaussianImageFilter: * an implementation for GenerateInputRequestedRegion in order to inform * the pipeline execution model. * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -154,14 +154,14 @@ class ITK_TEMPLATE_EXPORT HessianRecursiveGaussianImageFilter: protected: HessianRecursiveGaussianImageFilter(); - virtual ~HessianRecursiveGaussianImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HessianRecursiveGaussianImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate Data */ - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; // Override since the filter produces the entire dataset - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; private: diff --git a/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.h b/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.h index 9fdbe82a472..3d63fb93a20 100644 --- a/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkHessianToObjectnessMeasureImageFilter.h @@ -129,12 +129,12 @@ class ITK_TEMPLATE_EXPORT HessianToObjectnessMeasureImageFilter:public protected: HessianToObjectnessMeasureImageFilter(); - ~HessianToObjectnessMeasureImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HessianToObjectnessMeasureImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void VerifyPreconditions() ITK_OVERRIDE; + void VerifyPreconditions() override; - void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HessianToObjectnessMeasureImageFilter); diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h index 842da8e2d84..827502610a4 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.h @@ -109,7 +109,7 @@ class ITK_TEMPLATE_EXPORT HoughTransform2DCirclesImageFilter: itkNewMacro(Self); /** Method for evaluating the implicit function over the image. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Set both Minimum and Maximum radius values. */ void SetRadius(double radius); @@ -174,20 +174,20 @@ class ITK_TEMPLATE_EXPORT HoughTransform2DCirclesImageFilter: protected: HoughTransform2DCirclesImageFilter(); - virtual ~HoughTransform2DCirclesImageFilter() ITK_OVERRIDE {} + ~HoughTransform2DCirclesImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** HoughTransform2DCirclesImageFilter needs the entire input. Therefore * it must provide an implementation GenerateInputRequestedRegion(). * \sa ProcessObject::GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** HoughTransform2DCirclesImageFilter's produces all the output. * Therefore, it must provide an implementation of * EnlargeOutputRequestedRegion. * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; private: diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h index c49ce5a07dc..c918e236d11 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h @@ -109,7 +109,7 @@ class ITK_TEMPLATE_EXPORT HoughTransform2DLinesImageFilter: itkNewMacro(Self); /** Method for evaluating the implicit function over the image. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Set the threshold above which the filter should consider the point as a valid point */ @@ -162,14 +162,14 @@ class ITK_TEMPLATE_EXPORT HoughTransform2DLinesImageFilter: protected: HoughTransform2DLinesImageFilter(); - virtual ~HoughTransform2DLinesImageFilter() ITK_OVERRIDE {} + ~HoughTransform2DLinesImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** HoughTransform2DLinesImageFilter needs the entire input. Therefore * it must provide an implementation GenerateInputRequestedRegion(). * \sa ProcessObject::GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** HoughTransform2DLinesImageFilter's output is the accumulator * array. The size of the output is a function of the size of the @@ -177,10 +177,10 @@ class ITK_TEMPLATE_EXPORT HoughTransform2DLinesImageFilter: * size than the input, it must provide an implementation of * GenerateOutputInformation. * \sa ProcessObject::GenerateOutputRequestedRegion() */ - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** HoughTransform2DLinesImageFilter must produce the entire output */ - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; private: diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx index 09fe1ac7dd6..a3958e0ffc6 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx @@ -38,7 +38,7 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType > m_DiscRadius = 10; m_Variance = 5; m_OldModifiedTime = 0; - m_SimplifyAccumulator = ITK_NULLPTR; + m_SimplifyAccumulator = nullptr; } template< typename TInputPixelType, typename TOutputPixelType > diff --git a/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.h b/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.h index cbe43cdfda0..725f09dbb68 100644 --- a/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.h @@ -100,7 +100,7 @@ class ITK_TEMPLATE_EXPORT LaplacianImageFilter: * inform the pipeline execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Enable/Disable using the image spacing information in * calculations. Use this option if you want derivatives in @@ -129,16 +129,16 @@ class ITK_TEMPLATE_EXPORT LaplacianImageFilter: m_UseImageSpacing = true; } - virtual ~LaplacianImageFilter() ITK_OVERRIDE {} + ~LaplacianImageFilter() override {} /** Standard pipeline method. While this class does not implement a * ThreadedGenerateData(), its GenerateData() delegates all * calculations to an NeighborhoodOperatorImageFilter. Since the * NeighborhoodOperatorImageFilter is multithreaded, this filter is * multithreaded by default. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream &, Indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream &, Indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LaplacianImageFilter); diff --git a/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.h b/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.h index 2a25eab1256..25ef0918a6b 100644 --- a/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.h @@ -119,14 +119,14 @@ class ITK_TEMPLATE_EXPORT LaplacianRecursiveGaussianImageFilter: protected: LaplacianRecursiveGaussianImageFilter(); - virtual ~LaplacianRecursiveGaussianImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LaplacianRecursiveGaussianImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate Data */ - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; // Override since the filter produces the entire dataset - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LaplacianRecursiveGaussianImageFilter); diff --git a/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.h b/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.h index 92c4e35c241..7ac15e9cb3f 100644 --- a/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.h @@ -91,7 +91,7 @@ class ITK_TEMPLATE_EXPORT LaplacianSharpeningImageFilter: * execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Enable/Disable using the image spacing information in * calculations. Use this option if you want derivatives in @@ -109,16 +109,16 @@ class ITK_TEMPLATE_EXPORT LaplacianSharpeningImageFilter: m_UseImageSpacing = true; } - virtual ~LaplacianSharpeningImageFilter() ITK_OVERRIDE {} + ~LaplacianSharpeningImageFilter() override {} /** Standard pipeline method. While this class does not implement a * ThreadedGenerateData(), its GenerateData() delegates all * calculations to an NeighborhoodOperatorImageFilter. Since the * NeighborhoodOperatorImageFilter is multithreaded, this filter is * multithreaded by default. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream &, Indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream &, Indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LaplacianSharpeningImageFilter); diff --git a/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.h b/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.h index 79d1ff79236..82d18d3d046 100644 --- a/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.h @@ -143,10 +143,10 @@ class ITK_TEMPLATE_EXPORT MaskFeaturePointSelectionFilter: public ImageToMeshFil protected: MaskFeaturePointSelectionFilter(); - ~MaskFeaturePointSelectionFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MaskFeaturePointSelectionFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Compute the connectivity offsets so that points can be excluded during * the execution of the filter. This method must be called after invoking diff --git a/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx b/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx index e024e7a1d60..0871a6a2be5 100644 --- a/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx @@ -149,7 +149,7 @@ MaskFeaturePointSelectionFilter< TImage, TMask, TFeatures > const TMask * mask = this->GetMaskImage(); - if ( mask == ITK_NULLPTR ) + if ( mask == nullptr ) { // create all 1s selectionMap selectionMap->FillBuffer( NumericTraits< MapPixelType >::OneValue() ); diff --git a/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.h b/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.h index bf6e34ece06..c8aaf3e2dde 100644 --- a/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkSimpleContourExtractorImageFilter.h @@ -126,8 +126,8 @@ class ITK_TEMPLATE_EXPORT SimpleContourExtractorImageFilter: protected: SimpleContourExtractorImageFilter(); - virtual ~SimpleContourExtractorImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SimpleContourExtractorImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** SimpleContourExtractorImageFilter can be implemented as a * multithreaded filter. Therefore, this implementation provides a @@ -143,7 +143,7 @@ class ITK_TEMPLATE_EXPORT SimpleContourExtractorImageFilter: * */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SimpleContourExtractorImageFilter); diff --git a/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.h b/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.h index cc3382bebce..34baffb1e79 100644 --- a/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.h @@ -102,7 +102,7 @@ class ITK_TEMPLATE_EXPORT SobelEdgeDetectionImageFilter: * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -121,7 +121,7 @@ class ITK_TEMPLATE_EXPORT SobelEdgeDetectionImageFilter: protected: SobelEdgeDetectionImageFilter() {} - virtual ~SobelEdgeDetectionImageFilter() ITK_OVERRIDE {} + ~SobelEdgeDetectionImageFilter() override {} /** * Standard pipeline method. While this class does not implement a @@ -130,9 +130,9 @@ class ITK_TEMPLATE_EXPORT SobelEdgeDetectionImageFilter: * NeighborhoodOperatorImageFilter is multithreaded, this filter is * multithreaded by default. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } diff --git a/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h b/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h index 67ca7068b9d..626f5d3bec0 100644 --- a/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h @@ -145,7 +145,7 @@ class ITK_TEMPLATE_EXPORT UnsharpMaskImageFilter: protected: UnsharpMaskImageFilter(); - virtual ~UnsharpMaskImageFilter() ITK_OVERRIDE {} + ~UnsharpMaskImageFilter() override {} /** * UnsharpMaskImageFilter needs a larger input requested region than @@ -154,12 +154,12 @@ class ITK_TEMPLATE_EXPORT UnsharpMaskImageFilter: * provide an implementation for GenerateInputRequestedRegion() in * order to inform the pipeline execution model. * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - virtual void VerifyPreconditions() ITK_OVERRIDE; - virtual void GenerateData() ITK_OVERRIDE; + void VerifyPreconditions() override; + void GenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(UnsharpMaskImageFilter); diff --git a/Modules/Filtering/ImageFeature/include/itkZeroCrossingBasedEdgeDetectionImageFilter.h b/Modules/Filtering/ImageFeature/include/itkZeroCrossingBasedEdgeDetectionImageFilter.h index a977627e3fb..e6fdc8e889b 100644 --- a/Modules/Filtering/ImageFeature/include/itkZeroCrossingBasedEdgeDetectionImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkZeroCrossingBasedEdgeDetectionImageFilter.h @@ -158,8 +158,8 @@ class ITK_TEMPLATE_EXPORT ZeroCrossingBasedEdgeDetectionImageFilter: m_ForegroundValue = NumericTraits< OutputImagePixelType >::OneValue(); } - ~ZeroCrossingBasedEdgeDetectionImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ZeroCrossingBasedEdgeDetectionImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Standard pipeline method. While this class does not implement a * ThreadedGenerateData(), its GenerateData() delegates all @@ -167,7 +167,7 @@ class ITK_TEMPLATE_EXPORT ZeroCrossingBasedEdgeDetectionImageFilter: * a LaplacianImageFilter and a ZeroCrossingImageFilter. Since these * filters are multithreaded, this filter is multithreaded by default. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ZeroCrossingBasedEdgeDetectionImageFilter); diff --git a/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.h b/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.h index e584d69c929..48bc9ba58e1 100644 --- a/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.h @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT ZeroCrossingImageFilter: * pipeline execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Set/Get the label value for zero-crossing pixels. */ itkSetMacro(ForegroundValue, OutputImagePixelType); @@ -133,8 +133,8 @@ class ITK_TEMPLATE_EXPORT ZeroCrossingImageFilter: m_BackgroundValue = NumericTraits< OutputImagePixelType >::ZeroValue(); } - ~ZeroCrossingImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ZeroCrossingImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; OutputImagePixelType m_BackgroundValue; OutputImagePixelType m_ForegroundValue; @@ -151,7 +151,7 @@ class ITK_TEMPLATE_EXPORT ZeroCrossingImageFilter: * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ZeroCrossingImageFilter); diff --git a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx index 0f1ca91383a..424a27e423f 100644 --- a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx @@ -152,7 +152,7 @@ namespace const FilterType1::RadiusImageType* const radiusImage1 = filter1->GetRadiusImage(); const FilterType2::RadiusImageType* const radiusImage2 = filter2->GetRadiusImage(); - if ( (radiusImage1 == ITK_NULLPTR) || (radiusImage2 == ITK_NULLPTR) ) + if ( (radiusImage1 == nullptr) || (radiusImage2 == nullptr) ) { std::cout << "GetRadiusImage() should not return NULL!" << std::endl; return false; @@ -162,7 +162,7 @@ namespace const OutputPixelType* const radiusBufferPointer1 = radiusImage1->GetBufferPointer(); const double* const radiusBufferPointer2 = radiusImage2->GetBufferPointer(); - if ( (radiusBufferPointer1 == ITK_NULLPTR) || (radiusBufferPointer2 == ITK_NULLPTR) ) + if ( (radiusBufferPointer1 == nullptr) || (radiusBufferPointer2 == nullptr) ) { std::cout << "A GetBufferPointer() call appears to fail!" << std::endl; return false; @@ -192,7 +192,7 @@ namespace const CircleType* const circle1 = circles1.front().GetPointer(); const CircleType* const circle2 = circles2.front().GetPointer(); - if ( (circle1 == ITK_NULLPTR) || (circle2 == ITK_NULLPTR) ) + if ( (circle1 == nullptr) || (circle2 == nullptr) ) { std::cout << "A Circle pointer appears to be incorrect!" << std::endl; return false; @@ -201,7 +201,7 @@ namespace const CircleType::TransformType* const transform1 = circle1->GetObjectToParentTransform(); const CircleType::TransformType* const transform2 = circle2->GetObjectToParentTransform(); - if ( (transform1 == ITK_NULLPTR) || (transform2 == ITK_NULLPTR) ) + if ( (transform1 == nullptr) || (transform2 == nullptr) ) { std::cout << "A GetObjectToParentTransform() call appears to be incorrect!" << std::endl; return false; diff --git a/Modules/Filtering/ImageFeature/test/itkLaplacianImageFilterTest.cxx b/Modules/Filtering/ImageFeature/test/itkLaplacianImageFilterTest.cxx index 6c0b5824c6c..ab7b1f692bb 100644 --- a/Modules/Filtering/ImageFeature/test/itkLaplacianImageFilterTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkLaplacianImageFilterTest.cxx @@ -51,7 +51,7 @@ int itkLaplacianImageFilterTest(int , char * [] ) // verify the fix for Bug: 788 // The following code should throw an exception and not crash. - filter->SetInput(ITK_NULLPTR); + filter->SetInput(nullptr); bool exceptionSeen = false; try { diff --git a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.h index 8235cae6f02..8ee9e281385 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.h @@ -168,7 +168,7 @@ class ITK_TEMPLATE_EXPORT BinaryFunctorImageFilter: protected: BinaryFunctorImageFilter(); - virtual ~BinaryFunctorImageFilter() ITK_OVERRIDE {} + ~BinaryFunctorImageFilter() override {} /** BinaryFunctorImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() routine @@ -181,11 +181,11 @@ class ITK_TEMPLATE_EXPORT BinaryFunctorImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; // Needed to take the image information from the 2nd input, if the first one is // a simple decorated object. - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryFunctorImageFilter); diff --git a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx index 3ec565021f5..a6af7b9d1a2 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx @@ -83,7 +83,7 @@ BinaryFunctorImageFilter< TInputImage1, TInputImage2, TOutputImage, TFunction > { const DecoratedInput1ImagePixelType *input = dynamic_cast< const DecoratedInput1ImagePixelType * >( this->ProcessObject::GetInput(0) ); - if( input == ITK_NULLPTR ) + if( input == nullptr ) { itkExceptionMacro(<<"Constant 1 is not set"); } @@ -138,7 +138,7 @@ BinaryFunctorImageFilter< TInputImage1, TInputImage2, TOutputImage, TFunction > { const DecoratedInput2ImagePixelType *input = dynamic_cast< const DecoratedInput2ImagePixelType * >( this->ProcessObject::GetInput(1) ); - if( input == ITK_NULLPTR ) + if( input == nullptr ) { itkExceptionMacro(<<"Constant 2 is not set"); } @@ -151,7 +151,7 @@ void BinaryFunctorImageFilter< TInputImage1, TInputImage2, TOutputImage, TFunction > ::GenerateOutputInformation() { - const DataObject * input = ITK_NULLPTR; + const DataObject * input = nullptr; Input1ImagePointer inputPtr1 = dynamic_cast< const TInputImage1 * >( ProcessObject::GetInput(0) ); Input2ImagePointer inputPtr2 = diff --git a/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.h index b1f1e77ce0e..90b00c07a82 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.h @@ -81,11 +81,11 @@ class ITK_TEMPLATE_EXPORT BoxImageFilter: protected: BoxImageFilter(); - ~BoxImageFilter() ITK_OVERRIDE {} + ~BoxImageFilter() override {} - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BoxImageFilter); diff --git a/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.h index 5db61884fbf..e43a2df0c76 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkCastImageFilter.h @@ -127,11 +127,11 @@ class ITK_TEMPLATE_EXPORT CastImageFilter: CastImageFilter(); // virtual ~CastImageFilter() {} default OK - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CastImageFilter); diff --git a/Modules/Filtering/ImageFilterBase/include/itkKernelImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkKernelImageFilter.h index b7c5feeb03d..96671e7d2ee 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkKernelImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkKernelImageFilter.h @@ -83,9 +83,9 @@ class ITK_TEMPLATE_EXPORT KernelImageFilter: itkGetConstReferenceMacro(Kernel, KernelType); /** Set the kernel to a box kernel of given radius. */ - virtual void SetRadius(const RadiusType & radius) ITK_OVERRIDE; + void SetRadius(const RadiusType & radius) override; - virtual void SetRadius(const SizeValueType & radius) ITK_OVERRIDE + void SetRadius(const SizeValueType & radius) override { // needed because of the overloading of the method Superclass::SetRadius(radius); @@ -93,9 +93,9 @@ class ITK_TEMPLATE_EXPORT KernelImageFilter: protected: KernelImageFilter(); - ~KernelImageFilter() ITK_OVERRIDE {} + ~KernelImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** kernel or structuring element to use. */ KernelType m_Kernel; diff --git a/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h index 9afba566d88..0bf6781e55d 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h @@ -153,15 +153,15 @@ class ITK_TEMPLATE_EXPORT MaskNeighborhoodOperatorImageFilter: protected: MaskNeighborhoodOperatorImageFilter():m_DefaultValue(NumericTraits< OutputPixelType >::ZeroValue()), m_UseDefaultValue(true) {} - virtual ~MaskNeighborhoodOperatorImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MaskNeighborhoodOperatorImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** MaskNeighborhoodOperatorImageFilter needs to request enough of an * input image to account for template size. The input requested * region is expanded by the radius of the template. If the request * extends past the LargestPossibleRegion for the input, the request * is cropped by the LargestPossibleRegion. */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** MaskNeighborhoodOperatorImageFilter can be implemented as a * multithreaded filter. Therefore, this implementation provides a @@ -175,7 +175,7 @@ class ITK_TEMPLATE_EXPORT MaskNeighborhoodOperatorImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MaskNeighborhoodOperatorImageFilter); diff --git a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.h index 58ac690075f..4ed11edf636 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilter.h @@ -135,12 +135,12 @@ class ITK_TEMPLATE_EXPORT MovingHistogramImageFilter: protected: MovingHistogramImageFilter(); - ~MovingHistogramImageFilter() ITK_OVERRIDE {} + ~MovingHistogramImageFilter() override {} /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; // declare the type used to store the histogram typedef THistogram HistogramType; diff --git a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.h b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.h index d6757900a26..f10c2db7ea4 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.h +++ b/Modules/Filtering/ImageFilterBase/include/itkMovingHistogramImageFilterBase.h @@ -133,15 +133,15 @@ class ITK_TEMPLATE_EXPORT MovingHistogramImageFilterBase: typedef typename std::map< OffsetType, OffsetListType, typename OffsetType::LexicographicCompare > OffsetMapType; /** Set kernel (structuring element). */ - void SetKernel(const KernelType & kernel) ITK_OVERRIDE; + void SetKernel(const KernelType & kernel) override; itkGetConstMacro(PixelsPerTranslation, SizeValueType); protected: MovingHistogramImageFilterBase(); - ~MovingHistogramImageFilterBase() ITK_OVERRIDE {} + ~MovingHistogramImageFilterBase() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void GetDirAndOffset(const IndexType LineStart, const IndexType PrevLineStart, diff --git a/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.h index 5772eeb2d56..1efffb648c9 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.h @@ -133,7 +133,7 @@ class ITK_TEMPLATE_EXPORT NeighborhoodOperatorImageFilter: * execution model. * * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -153,7 +153,7 @@ class ITK_TEMPLATE_EXPORT NeighborhoodOperatorImageFilter: protected: NeighborhoodOperatorImageFilter() { m_BoundsCondition = static_cast< ImageBoundaryConditionPointerType >( &m_DefaultBoundaryCondition ); } - virtual ~NeighborhoodOperatorImageFilter() ITK_OVERRIDE {} + ~NeighborhoodOperatorImageFilter() override {} /** NeighborhoodOperatorImageFilter can be implemented as a * multithreaded filter. Therefore, this implementation provides a @@ -167,9 +167,9 @@ class ITK_TEMPLATE_EXPORT NeighborhoodOperatorImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.h index 4b7cde3e5ef..f6659c4c760 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.h @@ -93,7 +93,7 @@ class ITK_TEMPLATE_EXPORT NoiseImageFilter: protected: NoiseImageFilter(); - virtual ~NoiseImageFilter() ITK_OVERRIDE {} + ~NoiseImageFilter() override {} /** NoiseImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() @@ -106,7 +106,7 @@ class ITK_TEMPLATE_EXPORT NoiseImageFilter: * \sa BoxImageFilter::ThreadedGenerateData(), * BoxImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NoiseImageFilter); diff --git a/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx b/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx index ecfe66ae3ce..58ad678683d 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx @@ -49,7 +49,7 @@ class NullImageToImageFilterDriver { public: NullImageToImageFilterDriver(): - m_Filter( ITK_NULLPTR ) + m_Filter( nullptr ) {}; typedef typename TInputImage::SizeType ImageSizeType; diff --git a/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.h index 5f020f0e656..5315cb63d19 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.h @@ -97,16 +97,16 @@ class ITK_TEMPLATE_EXPORT RecursiveSeparableImageFilter: protected: RecursiveSeparableImageFilter(); - virtual ~RecursiveSeparableImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RecursiveSeparableImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** GenerateData (apply) the filter. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; - virtual const ImageRegionSplitterBase* GetImageRegionSplitter(void) const ITK_OVERRIDE; + const ImageRegionSplitterBase* GetImageRegionSplitter(void) const override; /** RecursiveSeparableImageFilter needs all of the input only in the * "Direction" dimension. Therefore we enlarge the output's @@ -116,7 +116,7 @@ class ITK_TEMPLATE_EXPORT RecursiveSeparableImageFilter: * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; /** Set up the coefficients of the filter to approximate a specific kernel. * Typically it can be used to approximate a Gaussian or one of its diff --git a/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx index 15dff5355af..9d9755dde72 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx @@ -275,9 +275,9 @@ RecursiveSeparableImageFilter< TInputImage, TOutputImage > const SizeValueType ln = region.GetSize(this->m_Direction); - RealType *inps = ITK_NULLPTR; - RealType *outs = ITK_NULLPTR; - RealType *scratch = ITK_NULLPTR; + RealType *inps = nullptr; + RealType *outs = nullptr; + RealType *scratch = nullptr; try { @@ -323,7 +323,7 @@ RecursiveSeparableImageFilter< TInputImage, TOutputImage > // is aborted. // release locally allocated memory, if memory allocation fails - // then we will delete a ITK_NULLPTR pointer, which is a valid operation + // then we will delete a nullptr pointer, which is a valid operation delete[] outs; delete[] inps; delete[] scratch; diff --git a/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.h index 7e3ec5a1532..de4e1d79bf9 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.h @@ -134,11 +134,11 @@ class ITK_TEMPLATE_EXPORT TernaryFunctorImageFilter: protected: TernaryFunctorImageFilter(); - virtual ~TernaryFunctorImageFilter() ITK_OVERRIDE {} + ~TernaryFunctorImageFilter() override {} /** Validate the presence of all three inputs. If one or more inputs * are missing, throw an exception. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** TernaryFunctorImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() routine @@ -151,7 +151,7 @@ class ITK_TEMPLATE_EXPORT TernaryFunctorImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TernaryFunctorImageFilter); diff --git a/Modules/Filtering/ImageFilterBase/include/itkVectorCastImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkVectorCastImageFilter.h index b8d720c1115..4112f8cdd35 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkVectorCastImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkVectorCastImageFilter.h @@ -110,7 +110,7 @@ class VectorCastImageFilter: protected: VectorCastImageFilter() {} - virtual ~VectorCastImageFilter() ITK_OVERRIDE {} + ~VectorCastImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorCastImageFilter); diff --git a/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.h b/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.h index 581c79a2362..4455d3c0123 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.h +++ b/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.h @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT VectorNeighborhoodOperatorImageFilter: * execution model. * * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -133,10 +133,10 @@ class ITK_TEMPLATE_EXPORT VectorNeighborhoodOperatorImageFilter: protected: VectorNeighborhoodOperatorImageFilter() : - m_BoundsCondition(ITK_NULLPTR) + m_BoundsCondition(nullptr) {} - virtual ~VectorNeighborhoodOperatorImageFilter() ITK_OVERRIDE {} + ~VectorNeighborhoodOperatorImageFilter() override {} /** VectorNeighborhoodOperatorImageFilter can be implemented as a * multithreaded filter. Therefore, this implementation provides a @@ -149,9 +149,9 @@ class ITK_TEMPLATE_EXPORT VectorNeighborhoodOperatorImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx b/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx index 726fa92b7ad..5edac7a8910 100644 --- a/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx +++ b/Modules/Filtering/ImageFilterBase/test/itkCastImageFilterTest.cxx @@ -41,7 +41,7 @@ std::string GetCastTypeName() #ifdef GCC_USEDEMANGLE char const *mangledName = typeid( T ).name(); int status; - char * unmangled = abi::__cxa_demangle(mangledName, ITK_NULLPTR, ITK_NULLPTR, &status); + char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); name = unmangled; free(unmangled); #else diff --git a/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h b/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h index f3790a9a24d..f8bf945f321 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h @@ -191,27 +191,27 @@ class ITK_TEMPLATE_EXPORT LabelMapContourOverlayImageFilter : protected: LabelMapContourOverlayImageFilter(); - ~LabelMapContourOverlayImageFilter() ITK_OVERRIDE {}; + ~LabelMapContourOverlayImageFilter() override {}; /** LabelMapContourOverlayImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelMapContourOverlayImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) override; - virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject ) ITK_OVERRIDE; + void ThreadedProcessLabelObject( LabelObjectType * labelObject ) override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; - virtual LabelMapType * GetLabelMap() ITK_OVERRIDE + LabelMapType * GetLabelMap() override { return m_TempImage; } diff --git a/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h b/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h index fe1a253803c..beaea9d24ae 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h @@ -149,25 +149,25 @@ class ITK_TEMPLATE_EXPORT LabelMapOverlayImageFilter : protected: LabelMapOverlayImageFilter(); - ~LabelMapOverlayImageFilter() ITK_OVERRIDE {}; + ~LabelMapOverlayImageFilter() override {}; /** LabelMapOverlayImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelMapOverlayImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) override; - virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject ) ITK_OVERRIDE; + void ThreadedProcessLabelObject( LabelObjectType * labelObject ) override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelMapOverlayImageFilter); diff --git a/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.h b/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.h index 58ad27562db..a4add49bc05 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.h @@ -97,13 +97,13 @@ class ITK_TEMPLATE_EXPORT LabelMapToRGBImageFilter : protected: LabelMapToRGBImageFilter(); - ~LabelMapToRGBImageFilter() ITK_OVERRIDE {}; + ~LabelMapToRGBImageFilter() override {}; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject ) ITK_OVERRIDE; + void ThreadedProcessLabelObject( LabelObjectType * labelObject ) override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelMapToRGBImageFilter); diff --git a/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.h b/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.h index df29b8d7b00..1dde01918ce 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.h @@ -129,15 +129,15 @@ class ITK_TEMPLATE_EXPORT LabelOverlayImageFilter: protected: LabelOverlayImageFilter(); - virtual ~LabelOverlayImageFilter() ITK_OVERRIDE {} + ~LabelOverlayImageFilter() override {} /** Process to execute before entering the multithreaded section */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Print internal ivars */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelOverlayImageFilter); diff --git a/Modules/Filtering/ImageFusion/include/itkLabelToRGBImageFilter.h b/Modules/Filtering/ImageFusion/include/itkLabelToRGBImageFilter.h index 78f37d3d2fc..86594129224 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelToRGBImageFilter.h +++ b/Modules/Filtering/ImageFusion/include/itkLabelToRGBImageFilter.h @@ -100,15 +100,15 @@ class ITK_TEMPLATE_EXPORT LabelToRGBImageFilter: protected: LabelToRGBImageFilter(); - virtual ~LabelToRGBImageFilter() ITK_OVERRIDE {} + ~LabelToRGBImageFilter() override {} /** Process to execute before entering the multithreaded section */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Print internal ivars */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelToRGBImageFilter); diff --git a/Modules/Filtering/ImageGradient/include/itkDifferenceOfGaussiansGradientImageFilter.h b/Modules/Filtering/ImageGradient/include/itkDifferenceOfGaussiansGradientImageFilter.h index 5b88c457309..e8cd03aa0ac 100644 --- a/Modules/Filtering/ImageGradient/include/itkDifferenceOfGaussiansGradientImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkDifferenceOfGaussiansGradientImageFilter.h @@ -85,11 +85,11 @@ class ITK_TEMPLATE_EXPORT DifferenceOfGaussiansGradientImageFilter: protected: DifferenceOfGaussiansGradientImageFilter(); - virtual ~DifferenceOfGaussiansGradientImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DifferenceOfGaussiansGradientImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Method for evaluating the implicit function over the image. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DifferenceOfGaussiansGradientImageFilter); diff --git a/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h b/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h index 12764d483e9..0131f759345 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h @@ -101,7 +101,7 @@ class ITK_TEMPLATE_EXPORT GradientImageFilter: * in order to inform the pipeline execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Use the image spacing information in calculations. Use this option if you * want derivatives in physical space. Default is UseImageSpacingOn. */ @@ -146,8 +146,8 @@ class ITK_TEMPLATE_EXPORT GradientImageFilter: protected: GradientImageFilter(); - virtual ~GradientImageFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GradientImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** GradientImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() @@ -160,12 +160,12 @@ class ITK_TEMPLATE_EXPORT GradientImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GradientImageFilter); - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; // An overloaded method which may transform the gradient to a // physical vector and converts to the correct output pixel type. diff --git a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.h b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.h index a1a00b00497..70f7477a177 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.h @@ -82,7 +82,7 @@ class ITK_TEMPLATE_EXPORT GradientMagnitudeImageFilter: * pipeline execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Use the image spacing information in calculations. Use this option if you * want derivatives in physical space. Default is UseImageSpacingOn. */ @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT GradientMagnitudeImageFilter: m_UseImageSpacing = true; } - virtual ~GradientMagnitudeImageFilter() ITK_OVERRIDE {} + ~GradientMagnitudeImageFilter() override {} /** GradientMagnitudeImageFilter can be implemented as a * multithreaded filter. Therefore, this implementation provides a @@ -126,9 +126,9 @@ class ITK_TEMPLATE_EXPORT GradientMagnitudeImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; - void PrintSelf(std::ostream &, Indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream &, Indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GradientMagnitudeImageFilter); diff --git a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h index fdbbec68d3f..b603340de6b 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h @@ -131,7 +131,7 @@ class ITK_TEMPLATE_EXPORT GradientMagnitudeRecursiveGaussianImageFilter: void SetNormalizeAcrossScale(bool normalizeInScaleSpace); itkGetConstMacro(NormalizeAcrossScale, bool); - void SetNumberOfThreads(ThreadIdType nb) ITK_OVERRIDE; + void SetNumberOfThreads(ThreadIdType nb) override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -142,11 +142,11 @@ class ITK_TEMPLATE_EXPORT GradientMagnitudeRecursiveGaussianImageFilter: protected: GradientMagnitudeRecursiveGaussianImageFilter(); - virtual ~GradientMagnitudeRecursiveGaussianImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GradientMagnitudeRecursiveGaussianImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate Data */ - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; /** GradientMagnitudeRecursiveGaussianImageFilter needs all of the * input to produce an output. Therefore, @@ -154,12 +154,12 @@ class ITK_TEMPLATE_EXPORT GradientMagnitudeRecursiveGaussianImageFilter: * implementation for GenerateInputRequestedRegion in order to * inform the pipeline execution model. \sa * ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** GradientMagnitudeRecursiveGaussianImageFilter produces all of * the output. Therefore, it needs to provide an implementation of * EnlargeOutputRequestedRegion(). */ - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GradientMagnitudeRecursiveGaussianImageFilter); diff --git a/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h b/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h index 18f5c934e12..41cd6b3e10b 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h @@ -155,7 +155,7 @@ class ITK_TEMPLATE_EXPORT GradientRecursiveGaussianImageFilter: * an implementation for GenerateInputRequestedRegion in order to inform * the pipeline execution model. * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** The UseImageDirection flag determines whether the gradients are * computed with respect to the image grid or with respect to the physical @@ -181,16 +181,16 @@ class ITK_TEMPLATE_EXPORT GradientRecursiveGaussianImageFilter: protected: GradientRecursiveGaussianImageFilter(); - virtual ~GradientRecursiveGaussianImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GradientRecursiveGaussianImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate Data */ - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; // Override since the filter produces the entire dataset - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: diff --git a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h index 209e2426743..d2f11b848ce 100644 --- a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h @@ -194,7 +194,7 @@ class ITK_TEMPLATE_EXPORT VectorGradientMagnitudeImageFilter: * pipeline execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Set the derivative weights according to the spacing of the input image (1/spacing). Use this option if you want to calculate the gradient in the @@ -259,12 +259,12 @@ class ITK_TEMPLATE_EXPORT VectorGradientMagnitudeImageFilter: protected: VectorGradientMagnitudeImageFilter(); - virtual ~VectorGradientMagnitudeImageFilter() ITK_OVERRIDE {} + ~VectorGradientMagnitudeImageFilter() override {} /** Do any necessary casting/copying of the input data. Input pixel types whose value types are not real number types must be cast to real number types. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** VectorGradientMagnitudeImageFilter can be implemented as a * multithreaded filter. Therefore, this implementation provides a @@ -278,9 +278,9 @@ class ITK_TEMPLATE_EXPORT VectorGradientMagnitudeImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef typename InputImageType::Superclass ImageBaseType; diff --git a/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest3.cxx b/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest3.cxx index 0c613d8cf63..79700351a9e 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest3.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientRecursiveGaussianFilterTest3.cxx @@ -201,7 +201,7 @@ int itkGradientRecursiveGaussianFilterTest3(int argc, char *argv[] ) typedef itk::Vector myVector1DType; typedef itk::Image myImageVector1DType; - myGradImage1DType::Pointer vector1DGradImage = ITK_NULLPTR; + myGradImage1DType::Pointer vector1DGradImage = nullptr; myVector1DType vector1Dborder; myVector1DType vector1Dfill; vector1Dborder.Fill( 0.0 ); @@ -217,7 +217,7 @@ int itkGradientRecursiveGaussianFilterTest3(int argc, char *argv[] ) typedef float myScalarPixelType; typedef itk::Image myImageScalarType; - myGradImage1DType::Pointer scalarPixelGradImage = ITK_NULLPTR; + myGradImage1DType::Pointer scalarPixelGradImage = nullptr; myScalarPixelType pixelBorder; myScalarPixelType pixelFill; pixelBorder = itk::NumericTraits::ZeroValue(); @@ -238,7 +238,7 @@ int itkGradientRecursiveGaussianFilterTest3(int argc, char *argv[] ) typedef itk::VariableLengthVector myVarVector2DType; typedef itk::Image myImageVar2DType; - myGradImage2DType::Pointer vector2DGradImage = ITK_NULLPTR; + myGradImage2DType::Pointer vector2DGradImage = nullptr; myVector2DType vector2Dborder; myVector2DType vector2Dfill; vector2Dborder.Fill( pixelBorder ); @@ -260,7 +260,7 @@ int itkGradientRecursiveGaussianFilterTest3(int argc, char *argv[] ) } // Test with Image of 2D VariableLengthVector - myGradImage2DType::Pointer varVector2DGradImage = ITK_NULLPTR; + myGradImage2DType::Pointer varVector2DGradImage = nullptr; myVarVector2DType varVector2Dborder; myVarVector2DType varVector2Dfill; varVector2Dborder.SetSize( myComponents2D ); @@ -277,7 +277,7 @@ int itkGradientRecursiveGaussianFilterTest3(int argc, char *argv[] ) // Test with 2D VectorImage typedef itk::VectorImage myVecImageType; - myGradImage2DType::Pointer vectorImage2DGradImage = ITK_NULLPTR; + myGradImage2DType::Pointer vectorImage2DGradImage = nullptr; runResult = itkGradientRecursiveGaussianFilterTest3Run( varVector2Dborder, varVector2Dfill, vectorImage2DGradImage, argv[5] ); if( runResult == EXIT_FAILURE ) { @@ -292,7 +292,7 @@ int itkGradientRecursiveGaussianFilterTest3(int argc, char *argv[] ) typedef itk::Vector myVector3DType; typedef itk::Image myImage3DType; - myGradImage3DType::Pointer vector3DGradImage = ITK_NULLPTR; + myGradImage3DType::Pointer vector3DGradImage = nullptr; myVector3DType vector3Dborder; myVector3DType vector3Dfill; vector3Dborder.Fill( pixelBorder ); @@ -317,7 +317,7 @@ int itkGradientRecursiveGaussianFilterTest3(int argc, char *argv[] ) // Test with 3D VectorImage typedef itk::VectorImage myVecImageType; typedef itk::VariableLengthVector myVarVector3DType; - myGradImage3DType::Pointer vectorImage3DGradImage = ITK_NULLPTR; + myGradImage3DType::Pointer vectorImage3DGradImage = nullptr; myVarVector3DType varVector3Dborder; myVarVector3DType varVector3Dfill; varVector3Dborder.SetSize( myComponents3D ); diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineCenteredL2ResampleImageFilterBase.h b/Modules/Filtering/ImageGrid/include/itkBSplineCenteredL2ResampleImageFilterBase.h index 4b82500dbae..b95ad06dc37 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineCenteredL2ResampleImageFilterBase.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineCenteredL2ResampleImageFilterBase.h @@ -95,11 +95,11 @@ class ITK_TEMPLATE_EXPORT BSplineCenteredL2ResampleImageFilterBase: protected: - virtual void InitializePyramidSplineFilter(int SplineOrder) ITK_OVERRIDE; + void InitializePyramidSplineFilter(int SplineOrder) override; BSplineCenteredL2ResampleImageFilterBase(); - virtual ~BSplineCenteredL2ResampleImageFilterBase() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BSplineCenteredL2ResampleImageFilterBase() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineCenteredL2ResampleImageFilterBase); diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.h b/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.h index af2b362fdd6..ebfc8257c14 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.h @@ -85,26 +85,26 @@ class ITK_TEMPLATE_EXPORT BSplineCenteredResampleImageFilterBase: protected: - virtual void InitializePyramidSplineFilter(int SplineOrder) ITK_OVERRIDE; + void InitializePyramidSplineFilter(int SplineOrder) override; - virtual void Reduce1DImage( + void Reduce1DImage( const std::vector< double > & In, OutputImageIterator & Iter, unsigned int traverseSize, ProgressReporter & progress - ) ITK_OVERRIDE; + ) override; - virtual void Expand1DImage( + void Expand1DImage( const std::vector< double > & In, OutputImageIterator & Iter, unsigned int traverseSize, ProgressReporter & progress - ) ITK_OVERRIDE; + ) override; protected: BSplineCenteredResampleImageFilterBase(); - virtual ~BSplineCenteredResampleImageFilterBase() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BSplineCenteredResampleImageFilterBase() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineCenteredResampleImageFilterBase); diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.h b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.h index e5c59ca9e65..ccc5b090281 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.h @@ -205,13 +205,13 @@ class ITK_TEMPLATE_EXPORT BSplineControlPointImageFilter protected: BSplineControlPointImageFilter(); - virtual ~BSplineControlPointImageFilter() ITK_OVERRIDE; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~BSplineControlPointImageFilter() override; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** * Multi-threaded function which generates the output sampled B-spline object. */ - void ThreadedGenerateData( const OutputImageRegionType &, ThreadIdType ) ITK_OVERRIDE; + void ThreadedGenerateData( const OutputImageRegionType &, ThreadIdType ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineControlPointImageFilter); @@ -221,13 +221,13 @@ class ITK_TEMPLATE_EXPORT BSplineControlPointImageFilter * Before splitting, we need to allocate memory for the output sampled * B-spline object based on the multi-threading functionality */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** * Based on the way CollapsePhiLattice() is written, we want to split on the * the last dimension. */ - virtual unsigned int SplitRequestedRegion( unsigned int, unsigned int, OutputImageRegionType & ) ITK_OVERRIDE; + unsigned int SplitRequestedRegion( unsigned int, unsigned int, OutputImageRegionType & ) override; /** * Sub-function used by GenerateOutputImageFast() to generate the sampled diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.h b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.h index f3a8d691426..d950fe52dd9 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.h @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT BSplineControlPointImageFunction * Set the input image. Note that the size, spacing, origin, and spline * order must be called prior to setting the input image. */ - virtual void SetInputImage( const InputImageType * ) ITK_OVERRIDE; + void SetInputImage( const InputImageType * ) override; /** * Set the spline order of the B-spline object for all parametric dimensions. @@ -192,21 +192,21 @@ class ITK_TEMPLATE_EXPORT BSplineControlPointImageFunction * Evaluate the resulting B-spline object at a specified index in the * parametric domain. */ - virtual OutputType EvaluateAtIndex( const IndexType & ) const ITK_OVERRIDE; + OutputType EvaluateAtIndex( const IndexType & ) const override; /** * Evaluate the resulting B-spline object at a specified continuous index in * the parametric domain. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & ) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & ) const override; /** * Evaluate the resulting B-spline object at a specified internal parameteric * point. Note that the internal parameterization over each dimension of the * B-spline object is [0, 1). */ - virtual OutputType Evaluate( const PointType & ) const ITK_OVERRIDE; + OutputType Evaluate( const PointType & ) const override; /** * Evaluate the gradient of the resulting B-spline object at a specified point @@ -268,8 +268,8 @@ class ITK_TEMPLATE_EXPORT BSplineControlPointImageFunction protected: BSplineControlPointImageFunction(); - virtual ~BSplineControlPointImageFunction() ITK_OVERRIDE; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~BSplineControlPointImageFunction() override; + void PrintSelf( std::ostream& os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineControlPointImageFunction); diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx index 109ae39c5e2..859e020e3eb 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx @@ -48,7 +48,7 @@ BSplineControlPointImageFunction this->m_CloseDimension.Fill( 0 ); - this->m_NeighborhoodWeightImage = ITK_NULLPTR; + this->m_NeighborhoodWeightImage = nullptr; this->m_BSplineEpsilon = 1e-3; } diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.h b/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.h index 4b17124cc6d..2df3a3d7651 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.h @@ -116,10 +116,10 @@ class ITK_TEMPLATE_EXPORT BSplineDownsampleImageFilter: /** Creates an image half the size of the input image with spacing twice the * input image. */ - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** This filter requires all of the input image */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -130,12 +130,12 @@ class ITK_TEMPLATE_EXPORT BSplineDownsampleImageFilter: protected: - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; BSplineDownsampleImageFilter(); - virtual ~BSplineDownsampleImageFilter() ITK_OVERRIDE {} + ~BSplineDownsampleImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineDownsampleImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineL2ResampleImageFilterBase.h b/Modules/Filtering/ImageGrid/include/itkBSplineL2ResampleImageFilterBase.h index 7800845f915..1ec33f9ede9 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineL2ResampleImageFilterBase.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineL2ResampleImageFilterBase.h @@ -95,11 +95,11 @@ class ITK_TEMPLATE_EXPORT BSplineL2ResampleImageFilterBase: protected: - virtual void InitializePyramidSplineFilter(int SplineOrder) ITK_OVERRIDE; + void InitializePyramidSplineFilter(int SplineOrder) override; BSplineL2ResampleImageFilterBase(); - virtual ~BSplineL2ResampleImageFilterBase() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BSplineL2ResampleImageFilterBase() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineL2ResampleImageFilterBase); diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h b/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h index af2a7893924..9c9a57e7965 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h @@ -158,8 +158,8 @@ class ITK_TEMPLATE_EXPORT BSplineResampleImageFilterBase: ); BSplineResampleImageFilterBase(); - virtual ~BSplineResampleImageFilterBase() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BSplineResampleImageFilterBase() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; int m_SplineOrder; // User specified spline order int m_GSize; // downsampling filter size diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.h b/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.h index 94a6913cfd2..adf4a4ef7d7 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.h @@ -280,19 +280,19 @@ class ITK_TEMPLATE_EXPORT BSplineScatteredDataPointSetToImageFilter: protected: BSplineScatteredDataPointSetToImageFilter(); - virtual ~BSplineScatteredDataPointSetToImageFilter() ITK_OVERRIDE; + ~BSplineScatteredDataPointSetToImageFilter() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void ThreadedGenerateData( const RegionType &, ThreadIdType ) ITK_OVERRIDE; + void ThreadedGenerateData( const RegionType &, ThreadIdType ) override; - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; - unsigned int SplitRequestedRegion( unsigned int, unsigned int, RegionType & ) ITK_OVERRIDE; + unsigned int SplitRequestedRegion( unsigned int, unsigned int, RegionType & ) override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.h b/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.h index 8e8120aeb87..3e3b249d386 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.h @@ -111,10 +111,10 @@ class ITK_TEMPLATE_EXPORT BSplineUpsampleImageFilter: /** Creates an image twice the size of the input image with spacing half the * input image. */ - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** This filter requires all of the input image */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -125,13 +125,13 @@ class ITK_TEMPLATE_EXPORT BSplineUpsampleImageFilter: protected: - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; BSplineUpsampleImageFilter(); - virtual ~BSplineUpsampleImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BSplineUpsampleImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineUpsampleImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h b/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h index c40d0176b4e..f9398e31c64 100644 --- a/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h @@ -101,14 +101,14 @@ class ITK_TEMPLATE_EXPORT BinShrinkImageFilter : /** Get the shrink factors. */ itkGetConstReferenceMacro(ShrinkFactors, ShrinkFactorsType); - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** BinShrinkImageFilter needs a larger input requested region than the output * requested region. As such, BinShrinkImageFilter needs to provide an * implementation for GenerateInputRequestedRegion() in order to inform the * pipeline execution model. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING @@ -122,10 +122,10 @@ class ITK_TEMPLATE_EXPORT BinShrinkImageFilter : protected: BinShrinkImageFilter(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, - ThreadIdType threadId ) ITK_OVERRIDE; + ThreadIdType threadId ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinShrinkImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx index 1cb72a5edb4..2cc1897cede 100644 --- a/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx @@ -142,7 +142,7 @@ BinShrinkImageFilter // allocate acumulate line const size_t ln = outputRegionForThread.GetSize(0); - AccumulatePixelType *accBuffer = ITK_NULLPTR; + AccumulatePixelType *accBuffer = nullptr; accBuffer = new AccumulatePixelType[ln]; try @@ -244,7 +244,7 @@ BinShrinkImageFilter const_cast< InputImageType * >( this->GetInput() ); const OutputImageType * outputPtr = this->GetOutput(); - itkAssertInDebugAndIgnoreInReleaseMacro( inputPtr != ITK_NULLPTR ); + itkAssertInDebugAndIgnoreInReleaseMacro( inputPtr != nullptr ); itkAssertInDebugAndIgnoreInReleaseMacro( outputPtr ); // Compute the input requested region (size and start index) @@ -292,7 +292,7 @@ BinShrinkImageFilter OutputImageType * outputPtr = this->GetOutput(); itkAssertInDebugAndIgnoreInReleaseMacro( inputPtr ); - itkAssertInDebugAndIgnoreInReleaseMacro( outputPtr != ITK_NULLPTR ); + itkAssertInDebugAndIgnoreInReleaseMacro( outputPtr != nullptr ); // Compute the output spacing, the output image size, and the // output image start index diff --git a/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.h b/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.h index 6b54c55858d..edd6b816cb7 100644 --- a/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.h @@ -208,26 +208,26 @@ class ITK_TEMPLATE_EXPORT ChangeInformationImageFilter: itkGetConstMacro(CenterImage, bool); /** Apply changes to the output image information. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** Apply changes to the input image requested region. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Copy the input buffer. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; protected: ChangeInformationImageFilter(); //~ChangeInformationImageFilter() {} default implementation ok - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Override VeriyInputInformation() since this filter's inputs do * not need to occoupy the same physical space. * * \sa ProcessObject::VerifyInputInformation */ - virtual void VerifyInputInformation() ITK_OVERRIDE {} + void VerifyInputInformation() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ChangeInformationImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx index 842ea9c3229..419e10355d5 100644 --- a/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx @@ -32,7 +32,7 @@ template< typename TInputImage > ChangeInformationImageFilter< TInputImage > ::ChangeInformationImageFilter() { - m_ReferenceImage = ITK_NULLPTR; + m_ReferenceImage = nullptr; m_ChangeSpacing = false; m_ChangeOrigin = false; diff --git a/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.h b/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.h index f02d7a64543..9c05f262411 100644 --- a/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.h @@ -111,8 +111,8 @@ class ITK_TEMPLATE_EXPORT ConstantPadImageFilter: protected: ConstantPadImageFilter(); - ~ConstantPadImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ConstantPadImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ConstantPadImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h index 295c6a089c7..c6a15a348b8 100644 --- a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h +++ b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h @@ -83,7 +83,7 @@ class ITK_TEMPLATE_EXPORT CoxDeBoorBSplineKernelFunction: itkGetConstMacro( SplineOrder, unsigned int ); /** Evaluate the function. */ - TRealValueType Evaluate( const TRealValueType & ) const ITK_OVERRIDE; + TRealValueType Evaluate( const TRealValueType & ) const override; /** Evaluate the first derivative. */ TRealValueType EvaluateDerivative( const TRealValueType & ) const; @@ -106,8 +106,8 @@ class ITK_TEMPLATE_EXPORT CoxDeBoorBSplineKernelFunction: protected: CoxDeBoorBSplineKernelFunction(); - virtual ~CoxDeBoorBSplineKernelFunction() ITK_OVERRIDE; - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + ~CoxDeBoorBSplineKernelFunction() override; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CoxDeBoorBSplineKernelFunction); diff --git a/Modules/Filtering/ImageGrid/include/itkCropImageFilter.h b/Modules/Filtering/ImageGrid/include/itkCropImageFilter.h index 60c9b0d37dd..94f35bb571c 100644 --- a/Modules/Filtering/ImageGrid/include/itkCropImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkCropImageFilter.h @@ -106,10 +106,10 @@ class ITK_TEMPLATE_EXPORT CropImageFilter: m_LowerBoundaryCropSize.Fill(0); } - ~CropImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CropImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CropImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkCyclicShiftImageFilter.h b/Modules/Filtering/ImageGrid/include/itkCyclicShiftImageFilter.h index 0d52ab343f9..073047e8b41 100644 --- a/Modules/Filtering/ImageGrid/include/itkCyclicShiftImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkCyclicShiftImageFilter.h @@ -85,17 +85,17 @@ class ITK_TEMPLATE_EXPORT CyclicShiftImageFilter: protected: CyclicShiftImageFilter(); - ~CyclicShiftImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CyclicShiftImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** This filter needs the entire input be available so it needs to * provide an implementation of GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This filter can be threaded. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** Protected so that subclasses may set it without calling Modified(). */ diff --git a/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.h b/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.h index d3360c2ee43..1d933f6f465 100644 --- a/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.h @@ -123,14 +123,14 @@ class ITK_TEMPLATE_EXPORT ExpandImageFilter: * UpdateOutputInformation() in order to inform the pipeline execution model. * The original documentation of this method is below. * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** ExpandImageFilter needs a smaller input requested region than the output * requested region. As such, ShrinkImageFilter needs to provide an * implementation for GenerateInputRequestedRegion() in order to inform * the pipeline execution model. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -143,8 +143,8 @@ class ITK_TEMPLATE_EXPORT ExpandImageFilter: protected: ExpandImageFilter(); - ~ExpandImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ExpandImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** ExpandImageFilter is implemented as a multithreaded filter. Therefore, * this implementation provides a ThreadedGenerateData() routine which @@ -155,13 +155,13 @@ class ITK_TEMPLATE_EXPORT ExpandImageFilter: * * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ - virtual + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** This method is used to set the state of the filter before * multi-threading. */ - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ExpandImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx index 0090e446273..67ec6582d50 100644 --- a/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx @@ -196,7 +196,7 @@ ExpandImageFilter< TInputImage, TOutputImage > const_cast< InputImageType * >( this->GetInput() ); const OutputImageType * outputPtr = this->GetOutput(); - itkAssertInDebugAndIgnoreInReleaseMacro( inputPtr != ITK_NULLPTR ); + itkAssertInDebugAndIgnoreInReleaseMacro( inputPtr != nullptr ); itkAssertInDebugAndIgnoreInReleaseMacro( outputPtr ); // We need to compute the input requested region (size and start index) @@ -251,7 +251,7 @@ ExpandImageFilter< TInputImage, TOutputImage > OutputImageType * outputPtr = this->GetOutput(); itkAssertInDebugAndIgnoreInReleaseMacro( inputPtr ); - itkAssertInDebugAndIgnoreInReleaseMacro( outputPtr != ITK_NULLPTR ); + itkAssertInDebugAndIgnoreInReleaseMacro( outputPtr != nullptr ); // We need to compute the output spacing, the output image size, and the // output image start index diff --git a/Modules/Filtering/ImageGrid/include/itkFlipImageFilter.h b/Modules/Filtering/ImageGrid/include/itkFlipImageFilter.h index eef568efd22..dbdc0856d24 100644 --- a/Modules/Filtering/ImageGrid/include/itkFlipImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkFlipImageFilter.h @@ -102,7 +102,7 @@ class ITK_TEMPLATE_EXPORT FlipImageFilter: * image meta information. The original documentation of this method is * below. * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** FlipImageFilter needs different input requested region than the output * requested region. As such, FlipImageFilter needs to provide an @@ -111,12 +111,12 @@ class ITK_TEMPLATE_EXPORT FlipImageFilter: * The required input requested region is obtained by permuting the index and * size of the output requested region. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; protected: FlipImageFilter(); - ~FlipImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FlipImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** FlipImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() routine @@ -129,7 +129,7 @@ class ITK_TEMPLATE_EXPORT FlipImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FlipImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.h b/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.h index 84047d9083f..1ed791ec98b 100644 --- a/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.h @@ -97,10 +97,10 @@ class ITK_TEMPLATE_EXPORT InterpolateImageFilter: /** This method is used to set the state of the filter before * multi-threading. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** This method is used to run after multi-threading. */ - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -111,12 +111,12 @@ class ITK_TEMPLATE_EXPORT InterpolateImageFilter: protected: InterpolateImageFilter(); - ~InterpolateImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~InterpolateImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** InterpolateImageFilter can be implemented as a multithreaded filter. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(InterpolateImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx index 83056b56789..e6fcdea26c7 100644 --- a/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx @@ -46,7 +46,7 @@ InterpolateImageFilter< TInputImage, TOutputImage > // Set default distance to 0,5 m_Distance = 0.5; - m_IntermediateImage = ITK_NULLPTR; + m_IntermediateImage = nullptr; } /** @@ -164,7 +164,7 @@ InterpolateImageFilter< TInputImage, TOutputImage > ::AfterThreadedGenerateData() { // Clean up intermediate memory usage - m_IntermediateImage = ITK_NULLPTR; + m_IntermediateImage = nullptr; } /** diff --git a/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h b/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h index af55349a254..1a0f4c01d99 100644 --- a/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h @@ -142,10 +142,10 @@ class ITK_TEMPLATE_EXPORT InterpolateImagePointsFilter: /** Overloaded to ensure that output is sized the same as the coordinate inputs * and not the size of the input image. */ - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** Overloaded to set the input image to the largest possible region */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -158,7 +158,7 @@ class ITK_TEMPLATE_EXPORT InterpolateImagePointsFilter: InterpolateImagePointsFilter(); // ~InterpolateImagePointsFilter(){} default implemnetation ok - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Main function for calculating interpolated values at each coordinate * set. Access is through the update() call. */ @@ -166,16 +166,16 @@ class ITK_TEMPLATE_EXPORT InterpolateImagePointsFilter: /** TODO: This needs to be modified for a threaded implementation. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Override VeriyInputInformation() since this filter's inputs do * not need to occoupy the same physical space. * * \sa ProcessObject::VerifyInputInformation */ - virtual void VerifyInputInformation() ITK_OVERRIDE {} + void VerifyInputInformation() override {} private: diff --git a/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.h b/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.h index 924f6cb212a..1ac5299feb5 100644 --- a/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkMirrorPadImageFilter.h @@ -95,7 +95,7 @@ class ITK_TEMPLATE_EXPORT MirrorPadImageFilter: protected: MirrorPadImageFilter() {} - ~MirrorPadImageFilter() ITK_OVERRIDE {} + ~MirrorPadImageFilter() override {} /** Convert from the output index to the input index taking * into consideration mirrored and normal regions. */ @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT MirrorPadImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** Given an n dimensional list of input region breakpoints in indices * and size (where the current region and maximum region for each dimension @@ -197,7 +197,7 @@ class ITK_TEMPLATE_EXPORT MirrorPadImageFilter: * * \sa ProcessObject::GenerateInputRequestedRegion() * \sa PadImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MirrorPadImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h b/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h index 0351f023720..01136e9e148 100644 --- a/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkOrientImageFilter.h @@ -251,7 +251,7 @@ class ITK_TEMPLATE_EXPORT OrientImageFilter: * execution model. The original documentation of this method is * below. * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -267,16 +267,16 @@ class ITK_TEMPLATE_EXPORT OrientImageFilter: protected: OrientImageFilter(); - ~OrientImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~OrientImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** OrientImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** OrientImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /*** Member functions used by GenerateData: */ void DeterminePermutationsAndFlips(const SpatialOrientation::ValidCoordinateOrientationFlags fixed_orient, @@ -290,7 +290,7 @@ class ITK_TEMPLATE_EXPORT OrientImageFilter: /** Single-threaded version of GenerateData. This filter delegates * to PermuteAxesImageFilter and FlipImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(OrientImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkPadImageFilter.h b/Modules/Filtering/ImageGrid/include/itkPadImageFilter.h index e7656bd9c88..a44e5010aab 100644 --- a/Modules/Filtering/ImageGrid/include/itkPadImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkPadImageFilter.h @@ -101,8 +101,8 @@ class ITK_TEMPLATE_EXPORT PadImageFilter: protected: PadImageFilter(); - ~PadImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PadImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** PadImageFilter produces an image which is a different resolution * than its input image. As such, PadImageFilter needs to @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT PadImageFilter: * to inform the pipeline execution model. The original * documentation of this method is below. * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PadImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.h b/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.h index 3697ac61c60..e7814e8b845 100644 --- a/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.h +++ b/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.h @@ -90,19 +90,19 @@ class ITK_TEMPLATE_EXPORT PadImageFilterBase: protected: PadImageFilterBase(); - ~PadImageFilterBase() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PadImageFilterBase() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** PadImageFilterBase needs a smaller input requested region than * output requested region. As such, PadImageFilterBase needs to * provide an implementation for GenerateInputRequestedRegion() in * order to inform the pipeline execution model. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This class can be multithreaded. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** Method for subclasses to set the boundary condition. */ void InternalSetBoundaryCondition( const BoundaryConditionPointerType boundaryCondition ); diff --git a/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx b/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx index 55bb6efbed5..745a88e2321 100644 --- a/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx +++ b/Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.hxx @@ -33,7 +33,7 @@ template< typename TInputImage, typename TOutputImage > PadImageFilterBase< TInputImage, TOutputImage > ::PadImageFilterBase() { - m_BoundaryCondition = ITK_NULLPTR; + m_BoundaryCondition = nullptr; } template< typename TInputImage, typename TOutputImage > @@ -48,7 +48,7 @@ PadImageFilterBase< TInputImage, TOutputImage > } else { - os << "ITK_NULLPTR" << std::endl; + os << "nullptr" << std::endl; } } @@ -71,7 +71,7 @@ PadImageFilterBase< TInputImage, TOutputImage > // Ask the boundary condition for the input requested region. if ( !m_BoundaryCondition ) { - itkExceptionMacro( << "Boundary condition is ITK_NULLPTR so no request region can be generated."); + itkExceptionMacro( << "Boundary condition is nullptr so no request region can be generated."); } InputImageRegionType inputRequestedRegion = m_BoundaryCondition->GetInputRequestedRegion( inputLargestPossibleRegion, diff --git a/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.h b/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.h index 3c72852faf3..b59c93ad281 100644 --- a/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkPasteImageFilter.h @@ -128,7 +128,7 @@ class ITK_TEMPLATE_EXPORT PasteImageFilter: * then the first input is copied to the output. * * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Override VeriyInputInformation() since this filter's inputs do @@ -136,12 +136,12 @@ class ITK_TEMPLATE_EXPORT PasteImageFilter: * * \sa ProcessObject::VerifyInputInformation */ - virtual void VerifyInputInformation() ITK_OVERRIDE {} + void VerifyInputInformation() override {} protected: PasteImageFilter(); - ~PasteImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PasteImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** PasteImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() @@ -153,7 +153,7 @@ class ITK_TEMPLATE_EXPORT PasteImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; SourceImageRegionType m_SourceRegion; diff --git a/Modules/Filtering/ImageGrid/include/itkPermuteAxesImageFilter.h b/Modules/Filtering/ImageGrid/include/itkPermuteAxesImageFilter.h index 1fff890321d..879e58ee554 100644 --- a/Modules/Filtering/ImageGrid/include/itkPermuteAxesImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkPermuteAxesImageFilter.h @@ -94,18 +94,18 @@ class ITK_TEMPLATE_EXPORT PermuteAxesImageFilter: * the pipeline execution model. The original documentation of this * method is below. * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** PermuteAxesImageFilter needs different input requested region than the output * requested region. As such, PermuteAxesImageFilter needs to provide an * implementation for GenerateInputRequestedRegion() in order to inform the * pipeline execution model. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; PermuteAxesImageFilter(); - ~PermuteAxesImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PermuteAxesImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** PermuteAxesImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() routine @@ -118,7 +118,7 @@ class ITK_TEMPLATE_EXPORT PermuteAxesImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PermuteAxesImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkRegionOfInterestImageFilter.h b/Modules/Filtering/ImageGrid/include/itkRegionOfInterestImageFilter.h index 8e6ecf62543..4b22a51a925 100644 --- a/Modules/Filtering/ImageGrid/include/itkRegionOfInterestImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkRegionOfInterestImageFilter.h @@ -97,12 +97,12 @@ class ITK_TEMPLATE_EXPORT RegionOfInterestImageFilter: protected: RegionOfInterestImageFilter(); - ~RegionOfInterestImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RegionOfInterestImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - virtual void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; /** RegionOfInterestImageFilter can produce an image which is a different * size than its input image. As such, RegionOfInterestImageFilter @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT RegionOfInterestImageFilter: * execution model. * * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** RegionOfInterestImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() @@ -123,7 +123,7 @@ class ITK_TEMPLATE_EXPORT RegionOfInterestImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const RegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RegionOfInterestImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h index 6973a42edae..fe8e5a9c209 100644 --- a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h @@ -267,25 +267,25 @@ class ITK_TEMPLATE_EXPORT ResampleImageFilter : * for GenerateOutputInformation() in order to inform the pipeline * execution model. The original documentation of this method is * below. \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** ResampleImageFilter needs a different input requested region than * the output requested region. As such, ResampleImageFilter needs * to provide an implementation for GenerateInputRequestedRegion() * in order to inform the pipeline execution model. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Set up state of filter before multi-threading. * InterpolatorType::SetInputImage is not thread-safe and hence * has to be set up before ThreadedGenerateData */ - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Set the state of the filter after multi-threading. */ - virtual void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; /** Compute the Modified Time based on the changed components. */ - ModifiedTimeType GetMTime(void) const ITK_OVERRIDE; + ModifiedTimeType GetMTime(void) const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -296,15 +296,15 @@ class ITK_TEMPLATE_EXPORT ResampleImageFilter : protected: ResampleImageFilter(); - ~ResampleImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ResampleImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Override VeriyInputInformation() since this filter's inputs do * not need to occoupy the same physical space. * * \sa ProcessObject::VerifyInputInformation */ - virtual void VerifyInputInformation() ITK_OVERRIDE { } + void VerifyInputInformation() override { } /** ResampleImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() @@ -315,8 +315,8 @@ class ITK_TEMPLATE_EXPORT ResampleImageFilter : * specified by the parameter "outputRegionForThread" * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ - virtual void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, + ThreadIdType threadId) override; /** Default implementation for resampling that works for any * transformation type. */ diff --git a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx index 6f8bcf69ca0..caf9f2f9e28 100644 --- a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx @@ -36,7 +36,7 @@ template< typename TInputImage, typename TTransformPrecisionType > ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType > ::ResampleImageFilter() : - m_Extrapolator( ITK_NULLPTR ), + m_Extrapolator( nullptr ), m_OutputSpacing( 1.0 ), m_OutputOrigin( 0.0 ), m_UseReferenceImage( false ) @@ -161,11 +161,11 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra ::AfterThreadedGenerateData() { // Disconnect input image from the interpolator - m_Interpolator->SetInputImage(ITK_NULLPTR); + m_Interpolator->SetInputImage(nullptr); if( !m_Extrapolator.IsNull() ) { // Disconnect input image from the extrapolator - m_Extrapolator->SetInputImage(ITK_NULLPTR); + m_Extrapolator->SetInputImage(nullptr); } } diff --git a/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.h b/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.h index c5c70a0b238..02244cce217 100644 --- a/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.h @@ -118,14 +118,14 @@ class ITK_TEMPLATE_EXPORT ShrinkImageFilter: * the pipeline execution model. The original documentation of this * method is below. * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** ShrinkImageFilter needs a larger input requested region than the output * requested region. As such, ShrinkImageFilter needs to provide an * implementation for GenerateInputRequestedRegion() in order to inform the * pipeline execution model. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -138,8 +138,8 @@ class ITK_TEMPLATE_EXPORT ShrinkImageFilter: protected: ShrinkImageFilter(); - ~ShrinkImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ShrinkImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** ShrinkImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() routine @@ -152,7 +152,7 @@ class ITK_TEMPLATE_EXPORT ShrinkImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ShrinkImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx index f15bfc41fa6..6ac61f1a79f 100644 --- a/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx @@ -205,7 +205,7 @@ ShrinkImageFilter< TInputImage, TOutputImage > const_cast< InputImageType * >( this->GetInput() ); const OutputImageType * outputPtr = this->GetOutput(); - itkAssertInDebugAndIgnoreInReleaseMacro( inputPtr != ITK_NULLPTR ); + itkAssertInDebugAndIgnoreInReleaseMacro( inputPtr != nullptr ); itkAssertInDebugAndIgnoreInReleaseMacro( outputPtr ); // Compute the input requested region (size and start index) @@ -286,7 +286,7 @@ ShrinkImageFilter< TInputImage, TOutputImage > OutputImageType * outputPtr = this->GetOutput(); itkAssertInDebugAndIgnoreInReleaseMacro( inputPtr ); - itkAssertInDebugAndIgnoreInReleaseMacro( outputPtr != ITK_NULLPTR ); + itkAssertInDebugAndIgnoreInReleaseMacro( outputPtr != nullptr ); // Compute the output spacing, the output image size, and the // output image start index diff --git a/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.h b/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.h index 73b5051aa91..a9639589a2c 100644 --- a/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.h @@ -159,15 +159,15 @@ class ITK_TEMPLATE_EXPORT SliceBySliceImageFilter: protected: SliceBySliceImageFilter(); - ~SliceBySliceImageFilter() ITK_OVERRIDE {} + ~SliceBySliceImageFilter() override {} - void VerifyInputInformation() ITK_OVERRIDE; + void VerifyInputInformation() override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SliceBySliceImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx index 2e33e806c17..2e905464be0 100644 --- a/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx @@ -30,8 +30,8 @@ SliceBySliceImageFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalOutputImageType > ::SliceBySliceImageFilter() { - m_InputFilter = ITK_NULLPTR; - m_OutputFilter = ITK_NULLPTR; + m_InputFilter = nullptr; + m_OutputFilter = nullptr; this->m_Dimension = ImageDimension - 1; m_SliceIndex = 0; } @@ -113,7 +113,7 @@ SliceBySliceImageFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, { OutputFilterType *outputFilter = dynamic_cast< OutputFilterType * >( filter ); - if ( outputFilter == ITK_NULLPTR && filter != ITK_NULLPTR ) + if ( outputFilter == nullptr && filter != nullptr ) { // TODO: can it be replaced by a concept check ? itkExceptionMacro( @@ -132,7 +132,7 @@ SliceBySliceImageFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, { if ( !filter ) { - itkExceptionMacro("InputFilter cannot be ITK_NULLPTR."); + itkExceptionMacro("InputFilter cannot be nullptr."); } if ( m_InputFilter.GetPointer() != filter ) @@ -153,7 +153,7 @@ SliceBySliceImageFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, { if ( !filter ) { - itkExceptionMacro("OutputFilter cannot be ITK_NULLPTR."); + itkExceptionMacro("OutputFilter cannot be nullptr."); } if ( m_OutputFilter.GetPointer() != filter ) diff --git a/Modules/Filtering/ImageGrid/include/itkSliceImageFilter.h b/Modules/Filtering/ImageGrid/include/itkSliceImageFilter.h index e98d4f6e42d..e418491f4ff 100644 --- a/Modules/Filtering/ImageGrid/include/itkSliceImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkSliceImageFilter.h @@ -124,16 +124,16 @@ class ITK_TEMPLATE_EXPORT SliceImageFilter: protected: SliceImageFilter(); - ~SliceImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SliceImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** SliceImageFilter produces an image which is a different * resolution and with a different pixel spacing than its input * image. * \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** SliceImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() routine @@ -146,9 +146,9 @@ class ITK_TEMPLATE_EXPORT SliceImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; - void VerifyInputInformation() ITK_OVERRIDE; + void VerifyInputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SliceImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkTileImageFilter.h b/Modules/Filtering/ImageGrid/include/itkTileImageFilter.h index 1ac102099ed..739572d79c8 100644 --- a/Modules/Filtering/ImageGrid/include/itkTileImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkTileImageFilter.h @@ -131,20 +131,20 @@ class ITK_TEMPLATE_EXPORT TileImageFilter: TileImageFilter(); // ~TileImageFilter(){} default implementation ok - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Override VeriyInputInformation() since this filter's inputs do * not need to occoupy the same physical space. * * \sa ProcessObject::VerifyInputInformation */ - virtual void VerifyInputInformation() ITK_OVERRIDE {} + void VerifyInputInformation() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(TileImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.h b/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.h index 23c028bdb94..e119e3a2ad3 100644 --- a/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.h @@ -179,25 +179,25 @@ class ITK_TEMPLATE_EXPORT VectorResampleImageFilter: * for GenerateOutputInformation() in order to inform the pipeline * execution model. The original documentation of this method is * below. \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** VectorResampleImageFilter needs a different input requested region than * the output requested region. As such, VectorResampleImageFilter needs * to provide an implementation for GenerateInputRequestedRegion() * in order to inform the pipeline execution model. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Set the state of the filter before multi-threading. * Note that InterpolatorType::SetInputImage is not thread-safe and hence * has to be set up before ThreadedGenerateData. */ - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Set the state of the filter after multi-threading. */ - virtual void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; /** Compute the Modified Time based on changed to the components. */ - ModifiedTimeType GetMTime(void) const ITK_OVERRIDE; + ModifiedTimeType GetMTime(void) const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -210,8 +210,8 @@ class ITK_TEMPLATE_EXPORT VectorResampleImageFilter: protected: VectorResampleImageFilter(); - ~VectorResampleImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VectorResampleImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** VectorResampleImageFilter can be implemented as a multithreaded filter. Therefore, * this implementation provides a ThreadedGenerateData() routine which @@ -222,7 +222,7 @@ class ITK_TEMPLATE_EXPORT VectorResampleImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorResampleImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.hxx index 41662593233..09e5c0abcf8 100644 --- a/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.hxx @@ -94,7 +94,7 @@ VectorResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType ::AfterThreadedGenerateData() { // Disconnect input image from the interpolator - m_Interpolator->SetInputImage(ITK_NULLPTR); + m_Interpolator->SetInputImage(nullptr); } template< typename TInputImage, typename TOutputImage, typename TInterpolatorPrecisionType > diff --git a/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.h b/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.h index a5c3d201729..e172f5e4101 100644 --- a/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.h @@ -201,7 +201,7 @@ class ITK_TEMPLATE_EXPORT WarpImageFilter: * implementation for GenerateOutputInformation() which set * the output information according the OutputSpacing, OutputOrigin * and the displacement field's LargestPossibleRegion. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** It is difficult to compute in advance the input image region * required to compute the requested output region. Thus the safest @@ -209,15 +209,15 @@ class ITK_TEMPLATE_EXPORT WarpImageFilter: * * For the displacement field, the input requested region * set to be the same as that of the output requested region. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This method is used to set the state of the filter before * multi-threading. */ - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** This method is used to set the state of the filter after * multi-threading. */ - virtual void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -236,13 +236,13 @@ class ITK_TEMPLATE_EXPORT WarpImageFilter: WarpImageFilter(); // ~WarpImageFilter() {} default implementation is ok - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** WarpImageFilter is implemented as a multi-threaded filter. * As such, it needs to provide and implementation for * ThreadedGenerateData(). */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** Override VeriyInputInformation() since this filter's inputs do * not need to occoupy the same physical space. But check the that @@ -250,7 +250,7 @@ class ITK_TEMPLATE_EXPORT WarpImageFilter: * * \sa ProcessObject::VerifyInputInformation */ - virtual void VerifyInputInformation() ITK_OVERRIDE; + void VerifyInputInformation() override; /** This function should be in an interpolator but none of the ITK * interpolators at this point handle edge conditions properly diff --git a/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx index 192dce7de98..6f6b5dc24e9 100644 --- a/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx @@ -197,7 +197,7 @@ WarpImageFilter< TInputImage, TOutputImage, TDisplacementField > ::AfterThreadedGenerateData() { // Disconnect input image from interpolator - m_Interpolator->SetInputImage(ITK_NULLPTR); + m_Interpolator->SetInputImage(nullptr); } template< typename TInputImage, typename TOutputImage, typename TDisplacementField > @@ -420,7 +420,7 @@ WarpImageFilter< TInputImage, TOutputImage, TDisplacementField > DisplacementFieldType *fieldPtr = const_cast(this->GetDisplacementField()); const OutputImageType *outputPtr = this->GetOutput(); - if ( fieldPtr != ITK_NULLPTR ) + if ( fieldPtr != nullptr ) { // tolerance for origin and spacing depends on the size of pixel // tolerance for direction is a fraction of the unit cube. @@ -467,7 +467,7 @@ WarpImageFilter< TInputImage, TOutputImage, TDisplacementField > const DisplacementFieldType* fieldPtr = this->GetDisplacementField(); if ( this->m_OutputSize[0] == 0 - && fieldPtr != ITK_NULLPTR ) + && fieldPtr != nullptr ) { outputPtr->SetLargestPossibleRegion( fieldPtr-> GetLargestPossibleRegion() ); diff --git a/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.h b/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.h index 7c0f6044bd1..2e9065d30c8 100644 --- a/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.h @@ -189,7 +189,7 @@ class ITK_TEMPLATE_EXPORT WarpVectorImageFilter: * implementation for GenerateOutputInformation() which set * the output information according the OutputSpacing, OutputOrigin * and the displacement field's LargestPossibleRegion. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** It is difficult to compute in advance the input image region * required to compute the requested output region. Thus the safest @@ -197,11 +197,11 @@ class ITK_TEMPLATE_EXPORT WarpVectorImageFilter: * * For the displacement field, the input requested region * set to be the same as that of the output requested region. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This method is used to set the state of the filter before * multi-threading. */ - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -216,14 +216,14 @@ class ITK_TEMPLATE_EXPORT WarpVectorImageFilter: protected: WarpVectorImageFilter(); - ~WarpVectorImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~WarpVectorImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** WarpVectorImageFilter is implemented as a multi-threaded filter. * As such, it needs to provide and implementation for * ThreadedGenerateData(). */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(WarpVectorImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkWrapPadImageFilter.h b/Modules/Filtering/ImageGrid/include/itkWrapPadImageFilter.h index 7556f18d60a..2fb671eb894 100644 --- a/Modules/Filtering/ImageGrid/include/itkWrapPadImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkWrapPadImageFilter.h @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT WrapPadImageFilter: protected: WrapPadImageFilter(); - ~WrapPadImageFilter() ITK_OVERRIDE {} + ~WrapPadImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(WrapPadImageFilter); diff --git a/Modules/Filtering/ImageGrid/include/itkZeroFluxNeumannPadImageFilter.h b/Modules/Filtering/ImageGrid/include/itkZeroFluxNeumannPadImageFilter.h index b8e8510b60f..ca24dd4c975 100644 --- a/Modules/Filtering/ImageGrid/include/itkZeroFluxNeumannPadImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkZeroFluxNeumannPadImageFilter.h @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT ZeroFluxNeumannPadImageFilter : protected: ZeroFluxNeumannPadImageFilter(); - ~ZeroFluxNeumannPadImageFilter() ITK_OVERRIDE {}; + ~ZeroFluxNeumannPadImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(ZeroFluxNeumannPadImageFilter); diff --git a/Modules/Filtering/ImageGrid/test/itkBasicArchitectureTest.cxx b/Modules/Filtering/ImageGrid/test/itkBasicArchitectureTest.cxx index 488b5c1b0d0..1f18df08130 100644 --- a/Modules/Filtering/ImageGrid/test/itkBasicArchitectureTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBasicArchitectureTest.cxx @@ -49,7 +49,7 @@ class AllEvents public: void WatchEvents(itk::Object *caller, const itk::EventObject & event ) { - const char* eventName = ITK_NULLPTR; + const char* eventName = nullptr; if( typeid( event ) == typeid( itk::DeleteEvent ) ) { eventName = "DeleteEvent"; diff --git a/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx index 6d71031bc81..e13cb5e858c 100644 --- a/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx @@ -243,8 +243,8 @@ int itkExpandImageFilterTest(int, char* [] ) try { testPassed = false; - std::cout << "Setting Input to ITK_NULLPTR" << std::endl; - expander->SetInput( ITK_NULLPTR ); + std::cout << "Setting Input to nullptr" << std::endl; + expander->SetInput( nullptr ); expander->Update(); } catch( itk::ExceptionObject& err ) @@ -265,8 +265,8 @@ int itkExpandImageFilterTest(int, char* [] ) try { testPassed = false; - std::cout << "Setting Interpolator to ITK_NULLPTR" << std::endl; - expander->SetInterpolator( ITK_NULLPTR ); + std::cout << "Setting Interpolator to nullptr" << std::endl; + expander->SetInterpolator( nullptr ); expander->Update(); } catch( itk::ExceptionObject& err ) diff --git a/Modules/Filtering/ImageGrid/test/itkInterpolateImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkInterpolateImageFilterTest.cxx index a2bf62365dd..75bc5fd6ffc 100644 --- a/Modules/Filtering/ImageGrid/test/itkInterpolateImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkInterpolateImageFilterTest.cxx @@ -112,7 +112,7 @@ int itkInterpolateImageFilterTest(int, char* [] ) filter->GetDistance(); // set the interpolator to be null - filter->SetInterpolator( ITK_NULLPTR ); + filter->SetInterpolator( nullptr ); bool pass = false; try diff --git a/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx index cf55d0343b1..6dcc5b3a6cb 100644 --- a/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPadImageFilterTest.cxx @@ -80,9 +80,9 @@ int itkPadImageFilterTest( int, char* [] ) return EXIT_FAILURE; } - if ( padFilter->GetBoundaryCondition() != ITK_NULLPTR ) + if ( padFilter->GetBoundaryCondition() != nullptr ) { - std::cerr << "Default BoundaryCondition was not ITK_NULLPTR." << std::endl; + std::cerr << "Default BoundaryCondition was not nullptr." << std::endl; return EXIT_FAILURE; } @@ -143,19 +143,19 @@ int itkPadImageFilterTest( int, char* [] ) std::cout << std::endl; } - // Set the boundary condition back to ITK_NULLPTR and check that exception + // Set the boundary condition back to nullptr and check that exception // is thrown. - std::cout << "Testing that exception is thrown when boundary condition is ITK_NULLPTR." << std::endl; - padFilter->SetBoundaryCondition( ITK_NULLPTR ); + std::cout << "Testing that exception is thrown when boundary condition is nullptr." << std::endl; + padFilter->SetBoundaryCondition( nullptr ); try { padFilter->Update(); - std::cerr << "Failed to catch expected exception when boundary condition is ITK_NULLPTR." << std::endl; + std::cerr << "Failed to catch expected exception when boundary condition is nullptr." << std::endl; return EXIT_FAILURE; } catch ( itk::ExceptionObject & e ) { - std::cout << "Caught expected exception when boundary condition is ITK_NULLPTR." << std::endl; + std::cout << "Caught expected exception when boundary condition is nullptr." << std::endl; std::cout << e << std::endl; } catch (...) diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx index 6f0b3d2c019..f4363823539 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest.cxx @@ -141,9 +141,9 @@ int itkResampleImageTest(int, char* [] ) try { - std::cout << "Setting interpolator to ITK_NULLPTR" << std::endl; + std::cout << "Setting interpolator to nullptr" << std::endl; passed = false; - resample->SetInterpolator( ITK_NULLPTR ); + resample->SetInterpolator( nullptr ); resample->Update(); } catch( itk::ExceptionObject& err ) diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx index 09e18f4efd4..26f8184be0b 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest2.cxx @@ -50,7 +50,7 @@ class NonlinearAffineTransform: itkTypeMacro(NonlinearAffineTransform, AffineTransform); /** Override this. See test below. */ - virtual bool IsLinear() const ITK_OVERRIDE { return false; } + bool IsLinear() const override { return false; } }; } diff --git a/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx index 94aa96ee551..a6786d6fab9 100644 --- a/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkSliceBySliceImageFilterTest.cxx @@ -120,7 +120,7 @@ int itkSliceBySliceImageFilterTest(int argc, char * argv[]) std::cout << "Testing with requested region..." << std::endl; ImageType::Pointer temp = filter->GetOutput(); temp->DisconnectPipeline(); - temp = ITK_NULLPTR; + temp = nullptr; ImageType::RegionType rr = reader->GetOutput()->GetLargestPossibleRegion(); for (unsigned int i = 0; i < ImageType::ImageDimension; ++i) @@ -241,9 +241,9 @@ int itkSliceBySliceImageFilterTest(int argc, char * argv[]) return EXIT_FAILURE; } - // check ITK_NULLPTR input/output - TRY_EXPECT_EXCEPTION(badFilter->SetInputFilter(ITK_NULLPTR)); - TRY_EXPECT_EXCEPTION(badFilter->SetOutputFilter(ITK_NULLPTR)); + // check nullptr input/output + TRY_EXPECT_EXCEPTION(badFilter->SetInputFilter(nullptr)); + TRY_EXPECT_EXCEPTION(badFilter->SetOutputFilter(nullptr)); return EXIT_SUCCESS; } diff --git a/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx index 1a6ddbf0ca9..dae8d2b1419 100644 --- a/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx @@ -360,9 +360,9 @@ int itkWarpImageFilterTest(int, char* [] ) InterpolatorType::Pointer interp = warper->GetModifiableInterpolator(); try { - std::cout << "Setting interpolator to ITK_NULLPTR" << std::endl; + std::cout << "Setting interpolator to nullptr" << std::endl; testPassed = false; - warper->SetInterpolator( ITK_NULLPTR ); + warper->SetInterpolator( nullptr ); warper->Update(); } catch( itk::ExceptionObject& err ) diff --git a/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx index 01cb69e2faf..a01512594d3 100644 --- a/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx @@ -348,9 +348,9 @@ int itkWarpVectorImageFilterTest(int, char* [] ) try { - std::cout << "Setting interpolator to ITK_NULLPTR" << std::endl; + std::cout << "Setting interpolator to nullptr" << std::endl; testPassed = false; - warper->SetInterpolator( ITK_NULLPTR ); + warper->SetInterpolator( nullptr ); warper->Update(); } catch( itk::ExceptionObject& err ) diff --git a/Modules/Filtering/ImageIntensity/include/itkAbsImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkAbsImageFilter.h index 653ba96a885..a5cb57633eb 100644 --- a/Modules/Filtering/ImageIntensity/include/itkAbsImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkAbsImageFilter.h @@ -103,7 +103,7 @@ class AbsImageFilter: protected: AbsImageFilter() {} - virtual ~AbsImageFilter() ITK_OVERRIDE {} + ~AbsImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AbsImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkAcosImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkAcosImageFilter.h index e68eaa91af8..c23d84f89b1 100644 --- a/Modules/Filtering/ImageIntensity/include/itkAcosImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkAcosImageFilter.h @@ -111,7 +111,7 @@ class AcosImageFilter: protected: AcosImageFilter() {} - virtual ~AcosImageFilter() ITK_OVERRIDE {} + ~AcosImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AcosImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkAdaptImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkAdaptImageFilter.h index f26e2ff189e..16806b88a6e 100644 --- a/Modules/Filtering/ImageIntensity/include/itkAdaptImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkAdaptImageFilter.h @@ -166,7 +166,7 @@ class AdaptImageFilter: protected: AdaptImageFilter() {} - virtual ~AdaptImageFilter() ITK_OVERRIDE {} + ~AdaptImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AdaptImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkAddImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkAddImageFilter.h index 9992ebad6a7..113c7422955 100644 --- a/Modules/Filtering/ImageIntensity/include/itkAddImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkAddImageFilter.h @@ -115,7 +115,7 @@ class ITK_TEMPLATE_EXPORT AddImageFilter: protected: AddImageFilter() {} - virtual ~AddImageFilter() ITK_OVERRIDE {} + ~AddImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AddImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkAndImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkAndImageFilter.h index fb1a25684e8..db4f8a81712 100644 --- a/Modules/Filtering/ImageIntensity/include/itkAndImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkAndImageFilter.h @@ -89,7 +89,7 @@ class AndImageFilter: protected: AndImageFilter() {} - virtual ~AndImageFilter() ITK_OVERRIDE {} + ~AndImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AndImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkAsinImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkAsinImageFilter.h index 3cd44315fab..24a14b98e99 100644 --- a/Modules/Filtering/ImageIntensity/include/itkAsinImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkAsinImageFilter.h @@ -116,7 +116,7 @@ class AsinImageFilter: protected: AsinImageFilter() {} - virtual ~AsinImageFilter() ITK_OVERRIDE {} + ~AsinImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AsinImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkAtan2ImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkAtan2ImageFilter.h index 57651f25333..1495fb1fb3d 100644 --- a/Modules/Filtering/ImageIntensity/include/itkAtan2ImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkAtan2ImageFilter.h @@ -122,7 +122,7 @@ class Atan2ImageFilter: protected: Atan2ImageFilter() {} - virtual ~Atan2ImageFilter() ITK_OVERRIDE {} + ~Atan2ImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(Atan2ImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkAtanImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkAtanImageFilter.h index 0aa1001c6c3..13d240c6f49 100644 --- a/Modules/Filtering/ImageIntensity/include/itkAtanImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkAtanImageFilter.h @@ -109,7 +109,7 @@ class AtanImageFilter: protected: AtanImageFilter() {} - virtual ~AtanImageFilter() ITK_OVERRIDE {} + ~AtanImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(AtanImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkBinaryMagnitudeImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkBinaryMagnitudeImageFilter.h index cdb3965bd9c..7782ae1f774 100644 --- a/Modules/Filtering/ImageIntensity/include/itkBinaryMagnitudeImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkBinaryMagnitudeImageFilter.h @@ -121,7 +121,7 @@ class BinaryMagnitudeImageFilter: protected: BinaryMagnitudeImageFilter() {} - virtual ~BinaryMagnitudeImageFilter() ITK_OVERRIDE {} + ~BinaryMagnitudeImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryMagnitudeImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkBoundedReciprocalImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkBoundedReciprocalImageFilter.h index 26cb5fa454e..e5c5769f04e 100644 --- a/Modules/Filtering/ImageIntensity/include/itkBoundedReciprocalImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkBoundedReciprocalImageFilter.h @@ -104,7 +104,7 @@ class BoundedReciprocalImageFilter: protected: BoundedReciprocalImageFilter() {} - virtual ~BoundedReciprocalImageFilter() ITK_OVERRIDE {} + ~BoundedReciprocalImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(BoundedReciprocalImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkClampImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkClampImageFilter.h index 24038652b7e..e8bd8595f54 100644 --- a/Modules/Filtering/ImageIntensity/include/itkClampImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkClampImageFilter.h @@ -171,11 +171,11 @@ class ITK_TEMPLATE_EXPORT ClampImageFilter : protected: ClampImageFilter(); - virtual ~ClampImageFilter() ITK_OVERRIDE {} + ~ClampImageFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ClampImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkComplexToImaginaryImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkComplexToImaginaryImageFilter.h index 21dc563ffd6..02f3838990d 100644 --- a/Modules/Filtering/ImageIntensity/include/itkComplexToImaginaryImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkComplexToImaginaryImageFilter.h @@ -93,7 +93,7 @@ class ComplexToImaginaryImageFilter: protected: ComplexToImaginaryImageFilter() {} - virtual ~ComplexToImaginaryImageFilter() ITK_OVERRIDE {} + ~ComplexToImaginaryImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ComplexToImaginaryImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkComplexToModulusImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkComplexToModulusImageFilter.h index 273b89060cf..e13f45ba8a1 100644 --- a/Modules/Filtering/ImageIntensity/include/itkComplexToModulusImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkComplexToModulusImageFilter.h @@ -94,7 +94,7 @@ class ComplexToModulusImageFilter: protected: ComplexToModulusImageFilter() {} - virtual ~ComplexToModulusImageFilter() ITK_OVERRIDE {} + ~ComplexToModulusImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ComplexToModulusImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkComplexToPhaseImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkComplexToPhaseImageFilter.h index b17891ba957..34f7f6ad8ba 100644 --- a/Modules/Filtering/ImageIntensity/include/itkComplexToPhaseImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkComplexToPhaseImageFilter.h @@ -93,7 +93,7 @@ class ComplexToPhaseImageFilter: protected: ComplexToPhaseImageFilter() {} - virtual ~ComplexToPhaseImageFilter() ITK_OVERRIDE {} + ~ComplexToPhaseImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ComplexToPhaseImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkComplexToRealImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkComplexToRealImageFilter.h index 6b78ae884f9..2ccc6380222 100644 --- a/Modules/Filtering/ImageIntensity/include/itkComplexToRealImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkComplexToRealImageFilter.h @@ -93,7 +93,7 @@ class ComplexToRealImageFilter: protected: ComplexToRealImageFilter() {} - virtual ~ComplexToRealImageFilter() ITK_OVERRIDE {} + ~ComplexToRealImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ComplexToRealImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkConstrainedValueAdditionImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkConstrainedValueAdditionImageFilter.h index 2e4f59c7178..938943491af 100644 --- a/Modules/Filtering/ImageIntensity/include/itkConstrainedValueAdditionImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkConstrainedValueAdditionImageFilter.h @@ -134,7 +134,7 @@ class ConstrainedValueAdditionImageFilter: protected: ConstrainedValueAdditionImageFilter() {} - virtual ~ConstrainedValueAdditionImageFilter() ITK_OVERRIDE {} + ~ConstrainedValueAdditionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ConstrainedValueAdditionImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkConstrainedValueDifferenceImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkConstrainedValueDifferenceImageFilter.h index d11d9129465..f6ddbed13b7 100644 --- a/Modules/Filtering/ImageIntensity/include/itkConstrainedValueDifferenceImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkConstrainedValueDifferenceImageFilter.h @@ -129,7 +129,7 @@ class ConstrainedValueDifferenceImageFilter: protected: ConstrainedValueDifferenceImageFilter() {} - virtual ~ConstrainedValueDifferenceImageFilter() ITK_OVERRIDE {} + ~ConstrainedValueDifferenceImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ConstrainedValueDifferenceImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkCosImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkCosImageFilter.h index 279de550c85..8feca72548f 100644 --- a/Modules/Filtering/ImageIntensity/include/itkCosImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkCosImageFilter.h @@ -110,7 +110,7 @@ class CosImageFilter: protected: CosImageFilter() {} - virtual ~CosImageFilter() ITK_OVERRIDE {} + ~CosImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(CosImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h index a2c7336abf9..4cce750d182 100644 --- a/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h @@ -96,14 +96,14 @@ class ITK_TEMPLATE_EXPORT DivideImageFilter: protected: DivideImageFilter() {} - virtual ~DivideImageFilter() ITK_OVERRIDE {} + ~DivideImageFilter() override {} - void GenerateData() ITK_OVERRIDE + void GenerateData() override { const typename Superclass::DecoratedInput2ImagePixelType *input = dynamic_cast< const typename Superclass::DecoratedInput2ImagePixelType * >( this->ProcessObject::GetInput(1) ); - if( input != ITK_NULLPTR && itk::Math::AlmostEquals(input->Get(), itk::NumericTraits< typename TInputImage2::PixelType >::ZeroValue()) ) + if( input != nullptr && itk::Math::AlmostEquals(input->Get(), itk::NumericTraits< typename TInputImage2::PixelType >::ZeroValue()) ) { itkGenericExceptionMacro(<<"The constant value used as denominator should not be set to zero"); } diff --git a/Modules/Filtering/ImageIntensity/include/itkDivideOrZeroOutImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkDivideOrZeroOutImageFilter.h index 485d0a4e2d4..469b2998fc2 100644 --- a/Modules/Filtering/ImageIntensity/include/itkDivideOrZeroOutImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkDivideOrZeroOutImageFilter.h @@ -69,7 +69,7 @@ class DivideOrZeroOutImageFilter : itkTypeMacro(DivideOrZeroOutImageFilter, BinaryFunctorImageFilter); /** Print internal ivars */ - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "Threshold: " << GetThreshold() << std::endl; @@ -107,7 +107,7 @@ class DivideOrZeroOutImageFilter : protected: DivideOrZeroOutImageFilter() {}; - virtual ~DivideOrZeroOutImageFilter() ITK_OVERRIDE {}; + ~DivideOrZeroOutImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(DivideOrZeroOutImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkEdgePotentialImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkEdgePotentialImageFilter.h index 6795d9ea566..bce2525a13e 100644 --- a/Modules/Filtering/ImageIntensity/include/itkEdgePotentialImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkEdgePotentialImageFilter.h @@ -95,7 +95,7 @@ class EdgePotentialImageFilter: protected: EdgePotentialImageFilter() {} - virtual ~EdgePotentialImageFilter() ITK_OVERRIDE {} + ~EdgePotentialImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(EdgePotentialImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h index 46ea20cae7c..2a285c70e76 100644 --- a/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h @@ -99,7 +99,7 @@ class ExpImageFilter: protected: ExpImageFilter() {} - virtual ~ExpImageFilter() ITK_OVERRIDE {} + ~ExpImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ExpImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkExpNegativeImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkExpNegativeImageFilter.h index b58e022e2fc..5f870c7eefc 100644 --- a/Modules/Filtering/ImageIntensity/include/itkExpNegativeImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkExpNegativeImageFilter.h @@ -135,7 +135,7 @@ class ExpNegativeImageFilter: protected: ExpNegativeImageFilter() {} - virtual ~ExpNegativeImageFilter() ITK_OVERRIDE {} + ~ExpNegativeImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ExpNegativeImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.h index 2e0ab5dd189..02a476f557b 100644 --- a/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.h @@ -134,7 +134,7 @@ class ITK_TEMPLATE_EXPORT HistogramMatchingImageFilter: itkBooleanMacro(ThresholdAtMeanIntensity); /** This filter requires all of the input to be in the buffer. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Methods to get the histograms of the source, reference, and * output. Objects are only valid after Update() has been called @@ -164,22 +164,22 @@ class ITK_TEMPLATE_EXPORT HistogramMatchingImageFilter: protected: HistogramMatchingImageFilter(); - ~HistogramMatchingImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HistogramMatchingImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** Override VeriyInputInformation() since this filter does not expect * the input images to occupy the same physical space. * * \sa ProcessObject::VerifyInputInformation */ - virtual void VerifyInputInformation() ITK_OVERRIDE {} + void VerifyInputInformation() override {} /** Compute min, max and mean of an image. */ void ComputeMinMaxMean(const InputImageType *image, diff --git a/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h index 0e0299b3db5..b2ed3bb1816 100644 --- a/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h @@ -180,9 +180,9 @@ class ITK_TEMPLATE_EXPORT IntensityWindowingImageFilter: itkGetConstReferenceMacro(Shift, RealType); /** Process to execute before entering the multithreaded section. */ - void BeforeThreadedGenerateData(void) ITK_OVERRIDE; + void BeforeThreadedGenerateData(void) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -193,7 +193,7 @@ class ITK_TEMPLATE_EXPORT IntensityWindowingImageFilter: protected: IntensityWindowingImageFilter(); - virtual ~IntensityWindowingImageFilter() ITK_OVERRIDE {} + ~IntensityWindowingImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(IntensityWindowingImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkInvertIntensityImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkInvertIntensityImageFilter.h index 6670959a8c5..c3c833d23c8 100644 --- a/Modules/Filtering/ImageIntensity/include/itkInvertIntensityImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkInvertIntensityImageFilter.h @@ -118,10 +118,10 @@ class ITK_TEMPLATE_EXPORT InvertIntensityImageFilter: itkSetMacro(Maximum, InputPixelType); itkGetConstReferenceMacro(Maximum, InputPixelType); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Process to execute before entering the multithreaded section */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -132,7 +132,7 @@ class ITK_TEMPLATE_EXPORT InvertIntensityImageFilter: protected: InvertIntensityImageFilter(); - virtual ~InvertIntensityImageFilter() ITK_OVERRIDE {} + ~InvertIntensityImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(InvertIntensityImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkLog10ImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkLog10ImageFilter.h index 60fbf41a8c0..34d81044146 100644 --- a/Modules/Filtering/ImageIntensity/include/itkLog10ImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkLog10ImageFilter.h @@ -98,7 +98,7 @@ class Log10ImageFilter: protected: Log10ImageFilter() {} - virtual ~Log10ImageFilter() ITK_OVERRIDE {} + ~Log10ImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(Log10ImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkLogImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkLogImageFilter.h index b8934ad2b55..7d109beaf56 100644 --- a/Modules/Filtering/ImageIntensity/include/itkLogImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkLogImageFilter.h @@ -95,7 +95,7 @@ class LogImageFilter: protected: LogImageFilter() {} - virtual ~LogImageFilter() ITK_OVERRIDE {} + ~LogImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(LogImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkMagnitudeAndPhaseToComplexImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMagnitudeAndPhaseToComplexImageFilter.h index 012248c043f..51ccd80d58e 100644 --- a/Modules/Filtering/ImageIntensity/include/itkMagnitudeAndPhaseToComplexImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkMagnitudeAndPhaseToComplexImageFilter.h @@ -131,7 +131,7 @@ class MagnitudeAndPhaseToComplexImageFilter: protected: MagnitudeAndPhaseToComplexImageFilter() {} - virtual ~MagnitudeAndPhaseToComplexImageFilter() ITK_OVERRIDE {} + ~MagnitudeAndPhaseToComplexImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MagnitudeAndPhaseToComplexImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h index 81800768fb1..78305c38c0c 100644 --- a/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h @@ -41,7 +41,7 @@ class MaskInput MaskInput() { m_MaskingValue = NumericTraits< TMask >::ZeroValue(); - InitializeOutsideValue( static_cast( ITK_NULLPTR ) ); + InitializeOutsideValue( static_cast( nullptr ) ); } ~MaskInput() {} bool operator!=(const MaskInput &) const @@ -219,10 +219,10 @@ class MaskImageFilter: return this->GetFunctor().GetMaskingValue(); } - void BeforeThreadedGenerateData() ITK_OVERRIDE + void BeforeThreadedGenerateData() override { typedef typename TOutputImage::PixelType PixelType; - this->CheckOutsideValue( static_cast(ITK_NULLPTR) ); + this->CheckOutsideValue( static_cast(nullptr) ); } #ifdef ITK_USE_CONCEPT_CHECKING @@ -237,9 +237,9 @@ class MaskImageFilter: protected: MaskImageFilter() {} - virtual ~MaskImageFilter() ITK_OVERRIDE {} + ~MaskImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "OutsideValue: " << this->GetOutsideValue() << std::endl; diff --git a/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h index 247f83b288d..26a6ea13029 100644 --- a/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h @@ -217,9 +217,9 @@ class MaskNegatedImageFilter: protected: MaskNegatedImageFilter() {} - virtual ~MaskNegatedImageFilter() ITK_OVERRIDE {} + ~MaskNegatedImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "OutsideValue: " << this->GetOutsideValue() << std::endl; diff --git a/Modules/Filtering/ImageIntensity/include/itkMatrixIndexSelectionImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMatrixIndexSelectionImageFilter.h index b5013652709..9af26defa6b 100644 --- a/Modules/Filtering/ImageIntensity/include/itkMatrixIndexSelectionImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkMatrixIndexSelectionImageFilter.h @@ -121,7 +121,7 @@ class MatrixIndexSelectionImageFilter: protected: MatrixIndexSelectionImageFilter() {} - virtual ~MatrixIndexSelectionImageFilter() ITK_OVERRIDE {} + ~MatrixIndexSelectionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MatrixIndexSelectionImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkMaximumImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMaximumImageFilter.h index a0c43df0e74..f4df1eaec4e 100644 --- a/Modules/Filtering/ImageIntensity/include/itkMaximumImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkMaximumImageFilter.h @@ -121,7 +121,7 @@ class MaximumImageFilter: protected: MaximumImageFilter() {} - virtual ~MaximumImageFilter() ITK_OVERRIDE {} + ~MaximumImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MaximumImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkMinimumImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMinimumImageFilter.h index 1996aa1ce46..467aa822eec 100644 --- a/Modules/Filtering/ImageIntensity/include/itkMinimumImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkMinimumImageFilter.h @@ -113,7 +113,7 @@ class MinimumImageFilter: protected: MinimumImageFilter() {} - virtual ~MinimumImageFilter() ITK_OVERRIDE {} + ~MinimumImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MinimumImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkModulusImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkModulusImageFilter.h index 7b991b6fe71..7d57dea944e 100644 --- a/Modules/Filtering/ImageIntensity/include/itkModulusImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkModulusImageFilter.h @@ -83,7 +83,7 @@ class ITK_TEMPLATE_EXPORT ModulusImageFilter: protected: ModulusImageFilter(); - virtual ~ModulusImageFilter() ITK_OVERRIDE {} + ~ModulusImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ModulusImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkMultiplyImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkMultiplyImageFilter.h index 8d2b5a9a4b6..74c94dd4012 100644 --- a/Modules/Filtering/ImageIntensity/include/itkMultiplyImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkMultiplyImageFilter.h @@ -78,7 +78,7 @@ class ITK_TEMPLATE_EXPORT MultiplyImageFilter: protected: MultiplyImageFilter() {} - virtual ~MultiplyImageFilter() ITK_OVERRIDE {} + ~MultiplyImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MultiplyImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkNaryAddImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkNaryAddImageFilter.h index c8c14b1a589..2b5b267311b 100644 --- a/Modules/Filtering/ImageIntensity/include/itkNaryAddImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkNaryAddImageFilter.h @@ -129,7 +129,7 @@ class NaryAddImageFilter: protected: NaryAddImageFilter() {} - virtual ~NaryAddImageFilter() ITK_OVERRIDE {} + ~NaryAddImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(NaryAddImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkNaryFunctorImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkNaryFunctorImageFilter.h index f8270ab562a..2453006c774 100644 --- a/Modules/Filtering/ImageIntensity/include/itkNaryFunctorImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkNaryFunctorImageFilter.h @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT NaryFunctorImageFilter: protected: NaryFunctorImageFilter(); - virtual ~NaryFunctorImageFilter() ITK_OVERRIDE {} + ~NaryFunctorImageFilter() override {} /** NaryFunctorImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() routine @@ -118,7 +118,7 @@ class ITK_TEMPLATE_EXPORT NaryFunctorImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NaryFunctorImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkNaryMaximumImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkNaryMaximumImageFilter.h index 87be424cb7c..5903e640a20 100644 --- a/Modules/Filtering/ImageIntensity/include/itkNaryMaximumImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkNaryMaximumImageFilter.h @@ -139,7 +139,7 @@ class NaryMaximumImageFilter: protected: NaryMaximumImageFilter() {} - virtual ~NaryMaximumImageFilter() ITK_OVERRIDE {} + ~NaryMaximumImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(NaryMaximumImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.h index 03df11ab3cd..0c0f67fe801 100644 --- a/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.h @@ -67,16 +67,16 @@ class ITK_TEMPLATE_EXPORT NormalizeImageFilter: typedef typename TOutputImage::Pointer OutputImagePointer; /** NormalizeImageFilter must call modified on its internal filters */ - virtual void Modified() const ITK_OVERRIDE; + void Modified() const override; protected: NormalizeImageFilter(); /** GenerateData. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NormalizeImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.hxx index babae7afd9d..f2b56daf05f 100644 --- a/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.hxx @@ -28,7 +28,7 @@ template< typename TInputImage, typename TOutputImage > NormalizeImageFilter< TInputImage, TOutputImage > ::NormalizeImageFilter() { - m_StatisticsFilter = ITK_NULLPTR; + m_StatisticsFilter = nullptr; m_StatisticsFilter = StatisticsImageFilter< TInputImage >::New(); m_ShiftScaleFilter = ShiftScaleImageFilter< TInputImage, TOutputImage >::New(); } diff --git a/Modules/Filtering/ImageIntensity/include/itkNormalizeToConstantImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkNormalizeToConstantImageFilter.h index 97517014829..5dcc9f5858a 100644 --- a/Modules/Filtering/ImageIntensity/include/itkNormalizeToConstantImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkNormalizeToConstantImageFilter.h @@ -108,12 +108,12 @@ class ITK_TEMPLATE_EXPORT NormalizeToConstantImageFilter : protected: NormalizeToConstantImageFilter(); - virtual ~NormalizeToConstantImageFilter() ITK_OVERRIDE {}; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~NormalizeToConstantImageFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NormalizeToConstantImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkNotImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkNotImageFilter.h index e64ede6b557..304049de1b0 100644 --- a/Modules/Filtering/ImageIntensity/include/itkNotImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkNotImageFilter.h @@ -134,7 +134,7 @@ class NotImageFilter: this->GetFunctor().SetForegroundValue(true); this->GetFunctor().SetBackgroundValue(false); } - virtual ~NotImageFilter() ITK_OVERRIDE {} + ~NotImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(NotImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkOrImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkOrImageFilter.h index d4001c54ecb..71852cc04f4 100644 --- a/Modules/Filtering/ImageIntensity/include/itkOrImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkOrImageFilter.h @@ -91,7 +91,7 @@ class OrImageFilter: protected: OrImageFilter() {} - virtual ~OrImageFilter() ITK_OVERRIDE {} + ~OrImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(OrImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.h index 355f54ccb1f..81db03ccbbd 100644 --- a/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.h @@ -103,9 +103,9 @@ class ITK_TEMPLATE_EXPORT PolylineMask2DImageFilter:public ImageToImageFilter< T protected: PolylineMask2DImageFilter(); - virtual ~PolylineMask2DImageFilter() ITK_OVERRIDE {} + ~PolylineMask2DImageFilter() override {} - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PolylineMask2DImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.h index eae47893101..d0ae6ee94dd 100644 --- a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.h @@ -120,10 +120,10 @@ class ITK_TEMPLATE_EXPORT PolylineMaskImageFilter:public ImageToImageFilter< TIn protected: PolylineMaskImageFilter(); - virtual ~PolylineMaskImageFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PolylineMaskImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PolylineMaskImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkRGBToLuminanceImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkRGBToLuminanceImageFilter.h index 9ee43e17c2f..e5c5a2ae66f 100644 --- a/Modules/Filtering/ImageIntensity/include/itkRGBToLuminanceImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkRGBToLuminanceImageFilter.h @@ -94,7 +94,7 @@ class RGBToLuminanceImageFilter: protected: RGBToLuminanceImageFilter() {} - virtual ~RGBToLuminanceImageFilter() ITK_OVERRIDE {} + ~RGBToLuminanceImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(RGBToLuminanceImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.h index fa7f8716e2b..b40c2bdad64 100644 --- a/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkRescaleIntensityImageFilter.h @@ -180,10 +180,10 @@ class ITK_TEMPLATE_EXPORT RescaleIntensityImageFilter: itkGetConstReferenceMacro(InputMaximum, InputPixelType); /** Process to execute before entering the multithreaded section */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Print internal ivars */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -200,7 +200,7 @@ class ITK_TEMPLATE_EXPORT RescaleIntensityImageFilter: protected: RescaleIntensityImageFilter(); - virtual ~RescaleIntensityImageFilter() ITK_OVERRIDE {} + ~RescaleIntensityImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(RescaleIntensityImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkRoundImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkRoundImageFilter.h index 9a6f5a257b7..0b05e8bfb35 100644 --- a/Modules/Filtering/ImageIntensity/include/itkRoundImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkRoundImageFilter.h @@ -88,7 +88,7 @@ class RoundImageFilter: protected: RoundImageFilter() {} - virtual ~RoundImageFilter() ITK_OVERRIDE {} + ~RoundImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(RoundImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.h index 3dbda012b42..f946d798c60 100644 --- a/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.h @@ -106,19 +106,19 @@ class ITK_TEMPLATE_EXPORT ShiftScaleImageFilter: protected: ShiftScaleImageFilter(); - ~ShiftScaleImageFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ShiftScaleImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Initialize some accumulators before the threads run. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Tally accumulated in threads. */ - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ShiftScaleImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx index f9bee9b7003..e34bc6436cc 100644 --- a/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx @@ -35,8 +35,8 @@ ShiftScaleImageFilter< TInputImage, TOutputImage > m_OverflowCount = 0; m_ThreadUnderflow.SetSize(1); m_ThreadOverflow.SetSize(1); - m_InputImage = ITK_NULLPTR; - m_OutputImage = ITK_NULLPTR; + m_InputImage = nullptr; + m_OutputImage = nullptr; } template< typename TInputImage, typename TOutputImage > diff --git a/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h index 7dead2bb402..5df832790d0 100644 --- a/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h @@ -239,7 +239,7 @@ class SigmoidImageFilter: protected: SigmoidImageFilter() {} - virtual ~SigmoidImageFilter() ITK_OVERRIDE {} + ~SigmoidImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SigmoidImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkSinImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkSinImageFilter.h index 162f28cde2e..10e36147b78 100644 --- a/Modules/Filtering/ImageIntensity/include/itkSinImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkSinImageFilter.h @@ -100,7 +100,7 @@ class SinImageFilter: protected: SinImageFilter() {} - virtual ~SinImageFilter() ITK_OVERRIDE {} + ~SinImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SinImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkSqrtImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkSqrtImageFilter.h index b32c6007adf..9673f6a6fab 100644 --- a/Modules/Filtering/ImageIntensity/include/itkSqrtImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkSqrtImageFilter.h @@ -97,7 +97,7 @@ class SqrtImageFilter: protected: SqrtImageFilter() {} - virtual ~SqrtImageFilter() ITK_OVERRIDE {} + ~SqrtImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SqrtImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkSquareImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkSquareImageFilter.h index 72ed1f9d42a..2482a0c85ed 100644 --- a/Modules/Filtering/ImageIntensity/include/itkSquareImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkSquareImageFilter.h @@ -96,7 +96,7 @@ class SquareImageFilter: protected: SquareImageFilter() {} - virtual ~SquareImageFilter() ITK_OVERRIDE {} + ~SquareImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SquareImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkSubtractImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkSubtractImageFilter.h index 509a87994eb..8546b20bc01 100644 --- a/Modules/Filtering/ImageIntensity/include/itkSubtractImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkSubtractImageFilter.h @@ -102,7 +102,7 @@ class SubtractImageFilter: protected: SubtractImageFilter() {} - virtual ~SubtractImageFilter() ITK_OVERRIDE {} + ~SubtractImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SubtractImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkSymmetricEigenAnalysisImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkSymmetricEigenAnalysisImageFilter.h index f99440be14f..f82c8a6a48f 100644 --- a/Modules/Filtering/ImageIntensity/include/itkSymmetricEigenAnalysisImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkSymmetricEigenAnalysisImageFilter.h @@ -166,7 +166,7 @@ class SymmetricEigenAnalysisImageFilter: itkNewMacro(Self); /** Print internal ivars */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { this->Superclass::PrintSelf(os, indent); } /** Set the dimension of the tensor. (For example the SymmetricSecondRankTensor @@ -189,7 +189,7 @@ class SymmetricEigenAnalysisImageFilter: protected: SymmetricEigenAnalysisImageFilter() {} - virtual ~SymmetricEigenAnalysisImageFilter() ITK_OVERRIDE {} + ~SymmetricEigenAnalysisImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SymmetricEigenAnalysisImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkTanImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkTanImageFilter.h index 1a7a2d6c60d..b5369c26634 100644 --- a/Modules/Filtering/ImageIntensity/include/itkTanImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkTanImageFilter.h @@ -95,7 +95,7 @@ class TanImageFilter: protected: TanImageFilter() {} - virtual ~TanImageFilter() ITK_OVERRIDE {} + ~TanImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(TanImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeImageFilter.h index a890f84f632..902b96549c7 100644 --- a/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeImageFilter.h @@ -98,7 +98,7 @@ class TernaryMagnitudeImageFilter: protected: TernaryMagnitudeImageFilter() {} - virtual ~TernaryMagnitudeImageFilter() ITK_OVERRIDE {} + ~TernaryMagnitudeImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(TernaryMagnitudeImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeSquaredImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeSquaredImageFilter.h index 1ec6881552e..f36846624c0 100644 --- a/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeSquaredImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeSquaredImageFilter.h @@ -97,7 +97,7 @@ class TernaryMagnitudeSquaredImageFilter: protected: TernaryMagnitudeSquaredImageFilter() {} - virtual ~TernaryMagnitudeSquaredImageFilter() ITK_OVERRIDE {} + ~TernaryMagnitudeSquaredImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(TernaryMagnitudeSquaredImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkTernaryOperatorImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkTernaryOperatorImageFilter.h index 90039f738ed..c5f30a09b40 100644 --- a/Modules/Filtering/ImageIntensity/include/itkTernaryOperatorImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkTernaryOperatorImageFilter.h @@ -93,7 +93,7 @@ class TernaryOperatorImageFilter: protected: TernaryOperatorImageFilter() {} - virtual ~TernaryOperatorImageFilter() ITK_OVERRIDE {} + ~TernaryOperatorImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(TernaryOperatorImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.h index 9a6525ca5f9..e3e91ae7d5e 100644 --- a/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.h @@ -145,14 +145,14 @@ class ITK_TEMPLATE_EXPORT VectorExpandImageFilter: * UpdateOutputInformation() in order to inform the pipeline execution * model. The original documentation of this method is below. \sa * ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** VectorExpandImageFilter needs a smaller input requested region than the * output requested region. As such, ShrinkImageFilter needs to provide an * implementation for GenerateInputRequestedRegion() in order to inform the * pipeline execution model. \sa * ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -166,8 +166,8 @@ class ITK_TEMPLATE_EXPORT VectorExpandImageFilter: protected: VectorExpandImageFilter(); - ~VectorExpandImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VectorExpandImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** VectorExpandImageFilter is implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() routine @@ -177,13 +177,13 @@ class ITK_TEMPLATE_EXPORT VectorExpandImageFilter: * portion of the output image specified by the parameter * "outputRegionForThread" \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ - virtual + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** This method is used to set the state of the filter before * multi-threading. */ - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorExpandImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h index 9e3c9e25df6..2b08a541413 100644 --- a/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkVectorIndexSelectionCastImageFilter.h @@ -130,9 +130,9 @@ class VectorIndexSelectionCastImageFilter: protected: VectorIndexSelectionCastImageFilter() {} - virtual ~VectorIndexSelectionCastImageFilter() ITK_OVERRIDE {} + ~VectorIndexSelectionCastImageFilter() override {} - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE + void BeforeThreadedGenerateData() override { const unsigned int index = this->GetIndex(); const TInputImage *image = this->GetInput(); diff --git a/Modules/Filtering/ImageIntensity/include/itkVectorMagnitudeImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkVectorMagnitudeImageFilter.h index 53f6f78a6da..7a50da63962 100644 --- a/Modules/Filtering/ImageIntensity/include/itkVectorMagnitudeImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkVectorMagnitudeImageFilter.h @@ -101,7 +101,7 @@ class VectorMagnitudeImageFilter: protected: VectorMagnitudeImageFilter() {} - virtual ~VectorMagnitudeImageFilter() ITK_OVERRIDE {} + ~VectorMagnitudeImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorMagnitudeImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h index f779fcdc800..1df5fbac600 100644 --- a/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h @@ -139,9 +139,9 @@ class ITK_TEMPLATE_EXPORT VectorRescaleIntensityImageFilter: itkGetConstReferenceMacro(InputMaximumMagnitude, InputRealType); /** Process to execute before entering the multithreaded section. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -154,7 +154,7 @@ class ITK_TEMPLATE_EXPORT VectorRescaleIntensityImageFilter: protected: VectorRescaleIntensityImageFilter(); - virtual ~VectorRescaleIntensityImageFilter() ITK_OVERRIDE {} + ~VectorRescaleIntensityImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorRescaleIntensityImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkWeightedAddImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkWeightedAddImageFilter.h index 2bbd31dda1f..00d9fba5566 100644 --- a/Modules/Filtering/ImageIntensity/include/itkWeightedAddImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkWeightedAddImageFilter.h @@ -171,7 +171,7 @@ class WeightedAddImageFilter: protected: WeightedAddImageFilter() {} - virtual ~WeightedAddImageFilter() ITK_OVERRIDE {} + ~WeightedAddImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(WeightedAddImageFilter); diff --git a/Modules/Filtering/ImageIntensity/include/itkXorImageFilter.h b/Modules/Filtering/ImageIntensity/include/itkXorImageFilter.h index d83019e512a..dee92c0f5bd 100644 --- a/Modules/Filtering/ImageIntensity/include/itkXorImageFilter.h +++ b/Modules/Filtering/ImageIntensity/include/itkXorImageFilter.h @@ -92,7 +92,7 @@ class XorImageFilter: protected: XorImageFilter() {} - virtual ~XorImageFilter() ITK_OVERRIDE {} + ~XorImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(XorImageFilter); diff --git a/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx index 0fbbca26a7f..144630bf916 100644 --- a/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkClampImageFilterTest.cxx @@ -45,7 +45,7 @@ std::string GetClampTypeName() #ifdef GCC_USEDEMANGLE char const *mangledName = typeid( T ).name(); int status; - char * unmangled = abi::__cxa_demangle(mangledName, ITK_NULLPTR, ITK_NULLPTR, &status); + char * unmangled = abi::__cxa_demangle(mangledName, nullptr, nullptr, &status); name = unmangled; free(unmangled); #else diff --git a/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx index 20b6d2843a0..a82842b621d 100644 --- a/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkVectorExpandImageFilterTest.cxx @@ -272,8 +272,8 @@ int itkVectorExpandImageFilterTest(int, char* [] ) try { testPassed = false; - std::cout << "Setting Input to ITK_NULLPTR" << std::endl; - expander->SetInput( ITK_NULLPTR ); + std::cout << "Setting Input to nullptr" << std::endl; + expander->SetInput( nullptr ); expander->Update(); } catch( itk::ExceptionObject& err ) @@ -294,8 +294,8 @@ int itkVectorExpandImageFilterTest(int, char* [] ) try { testPassed = false; - std::cout << "Setting Interpolator to ITK_NULLPTR" << std::endl; - expander->SetInterpolator( ITK_NULLPTR ); + std::cout << "Setting Interpolator to nullptr" << std::endl; + expander->SetInterpolator( nullptr ); expander->Update(); } catch( itk::ExceptionObject& err ) diff --git a/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.h b/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.h index 95f000409ab..d703474c91f 100644 --- a/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.h +++ b/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.h @@ -134,30 +134,30 @@ class ITK_TEMPLATE_EXPORT BinaryContourImageFilter: protected: BinaryContourImageFilter(); - virtual ~BinaryContourImageFilter() ITK_OVERRIDE {} + ~BinaryContourImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Standard pipeline methods. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; void ThreadedGenerateData(const RegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** BinaryContourImageFilter needs the entire input. Therefore * it must provide an implementation GenerateInputRequestedRegion(). * \sa ProcessObject::GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryContourImageFilter will produce all of the output. * Therefore it must provide an implementation of * EnlargeOutputRequestedRegion(). * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) override; private: BinaryContourImageFilter(const Self &); //Purposefully not implemented diff --git a/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx b/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx index 2a33a23af3e..8b4b304c147 100644 --- a/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx +++ b/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx @@ -290,7 +290,7 @@ void BinaryContourImageFilter< TInputImage, TOutputImage > ::AfterThreadedGenerateData() { - m_Barrier = ITK_NULLPTR; + m_Barrier = nullptr; m_ForegroundLineMap.clear(); m_BackgroundLineMap.clear(); } diff --git a/Modules/Filtering/ImageLabel/include/itkChangeLabelImageFilter.h b/Modules/Filtering/ImageLabel/include/itkChangeLabelImageFilter.h index 196bf324a2e..db789ae88c8 100644 --- a/Modules/Filtering/ImageLabel/include/itkChangeLabelImageFilter.h +++ b/Modules/Filtering/ImageLabel/include/itkChangeLabelImageFilter.h @@ -160,8 +160,8 @@ class ITK_TEMPLATE_EXPORT ChangeLabelImageFilter: protected: ChangeLabelImageFilter(); - virtual ~ChangeLabelImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ChangeLabelImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ChangeLabelImageFilter); diff --git a/Modules/Filtering/ImageLabel/include/itkLabelContourImageFilter.h b/Modules/Filtering/ImageLabel/include/itkLabelContourImageFilter.h index 3d623dcad2d..9d5eec09cde 100644 --- a/Modules/Filtering/ImageLabel/include/itkLabelContourImageFilter.h +++ b/Modules/Filtering/ImageLabel/include/itkLabelContourImageFilter.h @@ -133,30 +133,30 @@ class ITK_TEMPLATE_EXPORT LabelContourImageFilter: protected: LabelContourImageFilter(); - virtual ~LabelContourImageFilter() ITK_OVERRIDE {} + ~LabelContourImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Standard pipeline methods. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; void ThreadedGenerateData(const OutputRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** LabelContourImageFilter needs the entire input. Therefore * it must provide an implementation GenerateInputRequestedRegion(). * \sa ProcessObject::GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelContourImageFilter will produce all of the output. * Therefore it must provide an implementation of * EnlargeOutputRequestedRegion(). * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) override; private: diff --git a/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.h b/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.h index 2078648cc0c..759469748ca 100644 --- a/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.h +++ b/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.h @@ -99,11 +99,11 @@ class ITK_TEMPLATE_EXPORT AdditiveGaussianNoiseImageFilter : protected: AdditiveGaussianNoiseImageFilter(); - virtual ~AdditiveGaussianNoiseImageFilter() ITK_OVERRIDE {} + ~AdditiveGaussianNoiseImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(AdditiveGaussianNoiseImageFilter); diff --git a/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.h b/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.h index 3227df4d3a0..f03459dc3e1 100644 --- a/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.h +++ b/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.h @@ -64,9 +64,9 @@ class ITK_TEMPLATE_EXPORT NoiseBaseImageFilter : protected: NoiseBaseImageFilter(); - virtual ~NoiseBaseImageFilter() ITK_OVERRIDE = 0; + ~NoiseBaseImageFilter() override = 0; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; inline static uint32_t Hash(uint32_t a, uint32_t b) { diff --git a/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.h b/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.h index 6dfe133b1b6..68a2e5746e5 100644 --- a/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.h +++ b/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.h @@ -101,12 +101,12 @@ class ITK_TEMPLATE_EXPORT SaltAndPepperNoiseImageFilter : protected: SaltAndPepperNoiseImageFilter(); - virtual ~SaltAndPepperNoiseImageFilter() ITK_OVERRIDE {} + ~SaltAndPepperNoiseImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, - ThreadIdType threadId ) ITK_OVERRIDE; + ThreadIdType threadId ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SaltAndPepperNoiseImageFilter); diff --git a/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.h b/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.h index e42af252d1b..cdcdbc7e16d 100644 --- a/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.h +++ b/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.h @@ -136,11 +136,11 @@ class ITK_TEMPLATE_EXPORT ShotNoiseImageFilter : protected: ShotNoiseImageFilter(); - virtual ~ShotNoiseImageFilter() ITK_OVERRIDE {} + ~ShotNoiseImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ShotNoiseImageFilter); diff --git a/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.h b/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.h index f043d0a4614..ed78f928960 100644 --- a/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.h +++ b/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.h @@ -95,11 +95,11 @@ class ITK_TEMPLATE_EXPORT SpeckleNoiseImageFilter : protected: SpeckleNoiseImageFilter(); - virtual ~SpeckleNoiseImageFilter() ITK_OVERRIDE {} + ~SpeckleNoiseImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SpeckleNoiseImageFilter); diff --git a/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.h b/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.h index b2b954e6cf1..6e753f94a17 100644 --- a/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.h +++ b/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.h @@ -87,9 +87,9 @@ class ITK_TEMPLATE_EXPORT PeakSignalToNoiseRatioCalculator : public Object protected: PeakSignalToNoiseRatioCalculator(); - virtual ~PeakSignalToNoiseRatioCalculator() ITK_OVERRIDE {} + ~PeakSignalToNoiseRatioCalculator() override {} - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PeakSignalToNoiseRatioCalculator); diff --git a/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx b/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx index 090fc074491..bc31fab28bc 100644 --- a/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx +++ b/Modules/Filtering/ImageNoise/test/itkPeakSignalToNoiseRatioCalculator.hxx @@ -31,8 +31,8 @@ PeakSignalToNoiseRatioCalculator ::PeakSignalToNoiseRatioCalculator(void) { m_Valid = false; - m_Image = ITK_NULLPTR; - m_NoisyImage = ITK_NULLPTR; + m_Image = nullptr; + m_NoisyImage = nullptr; m_Output = NumericTraits< InputPixelType >::ZeroValue(); } diff --git a/Modules/Filtering/ImageSources/include/itkGaborImageSource.h b/Modules/Filtering/ImageSources/include/itkGaborImageSource.h index 885055c8a66..26a07e6e959 100644 --- a/Modules/Filtering/ImageSources/include/itkGaborImageSource.h +++ b/Modules/Filtering/ImageSources/include/itkGaborImageSource.h @@ -100,9 +100,9 @@ class ITK_TEMPLATE_EXPORT GaborImageSource: protected: GaborImageSource(); // ~GaborImageSource(); default implementation ok - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GaborImageSource); diff --git a/Modules/Filtering/ImageSources/include/itkGaborKernelFunction.h b/Modules/Filtering/ImageSources/include/itkGaborKernelFunction.h index e910a88ed60..7e8aa3f870a 100644 --- a/Modules/Filtering/ImageSources/include/itkGaborKernelFunction.h +++ b/Modules/Filtering/ImageSources/include/itkGaborKernelFunction.h @@ -62,7 +62,7 @@ class GaborKernelFunction : public KernelFunctionBase< TRealValueType > itkTypeMacro(GaborKernelFunction, KernelFunctionBase); /** Evaluate the function. */ - TRealValueType Evaluate(const TRealValueType & u) const ITK_OVERRIDE + TRealValueType Evaluate(const TRealValueType & u) const override { TRealValueType parameter = itk::Math::sqr(u / this->m_Sigma); TRealValueType envelope = std::exp(static_cast< TRealValueType >(-0.5) * parameter); @@ -105,8 +105,8 @@ class GaborKernelFunction : public KernelFunctionBase< TRealValueType > this->m_Frequency = static_cast(0.4); this->m_PhaseOffset = NumericTraits< TRealValueType >::ZeroValue(); } - ~GaborKernelFunction() ITK_OVERRIDE {}; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~GaborKernelFunction() override {}; + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/ImageSources/include/itkGaussianImageSource.h b/Modules/Filtering/ImageSources/include/itkGaussianImageSource.h index cc3dcce7910..6f691e60442 100644 --- a/Modules/Filtering/ImageSources/include/itkGaussianImageSource.h +++ b/Modules/Filtering/ImageSources/include/itkGaussianImageSource.h @@ -116,20 +116,20 @@ class ITK_TEMPLATE_EXPORT GaussianImageSource : * values in the parameter array are the Sigma parameters in each * dimension, the next N values are the Mean parameters in each * dimension, and the last value is the Scale. */ - virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; - virtual ParametersType GetParameters() const ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; + ParametersType GetParameters() const override; /** Get the number of parameters for this image source. When this * source is templated over an N-dimensional output image type, the * number of parameters is 2*N+1. */ - virtual unsigned int GetNumberOfParameters() const ITK_OVERRIDE; + unsigned int GetNumberOfParameters() const override; protected: GaussianImageSource(); // ~GaussianImageSource(); default implementation ok - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GaussianImageSource); diff --git a/Modules/Filtering/ImageSources/include/itkGenerateImageSource.h b/Modules/Filtering/ImageSources/include/itkGenerateImageSource.h index fac2a96cc28..8e26bbf9620 100644 --- a/Modules/Filtering/ImageSources/include/itkGenerateImageSource.h +++ b/Modules/Filtering/ImageSources/include/itkGenerateImageSource.h @@ -124,9 +124,9 @@ class ITK_TEMPLATE_EXPORT GenerateImageSource protected: GenerateImageSource(); // virtual ~GenerateImageSource() default implementation ok - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GenerateImageSource); diff --git a/Modules/Filtering/ImageSources/include/itkGridImageSource.h b/Modules/Filtering/ImageSources/include/itkGridImageSource.h index 2c87ede318d..fb5c103f67d 100644 --- a/Modules/Filtering/ImageSources/include/itkGridImageSource.h +++ b/Modules/Filtering/ImageSources/include/itkGridImageSource.h @@ -122,13 +122,13 @@ class ITK_TEMPLATE_EXPORT GridImageSource protected: GridImageSource(); // ~GridImageSource(){} default implementation ok - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void + void ThreadedGenerateData(const ImageRegionType & - outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + outputRegionForThread, ThreadIdType threadId) override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GridImageSource); diff --git a/Modules/Filtering/ImageSources/include/itkParametricImageSource.h b/Modules/Filtering/ImageSources/include/itkParametricImageSource.h index afbd977c6b6..3d0447f5d9c 100644 --- a/Modules/Filtering/ImageSources/include/itkParametricImageSource.h +++ b/Modules/Filtering/ImageSources/include/itkParametricImageSource.h @@ -84,8 +84,8 @@ class ITK_TEMPLATE_EXPORT ParametricImageSource protected: ParametricImageSource() {}; - virtual ~ParametricImageSource() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~ParametricImageSource() override {} + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ParametricImageSource); diff --git a/Modules/Filtering/ImageSources/include/itkPhysicalPointImageSource.h b/Modules/Filtering/ImageSources/include/itkPhysicalPointImageSource.h index 7d9dabb6a34..020530cee95 100644 --- a/Modules/Filtering/ImageSources/include/itkPhysicalPointImageSource.h +++ b/Modules/Filtering/ImageSources/include/itkPhysicalPointImageSource.h @@ -65,9 +65,9 @@ class ITK_TEMPLATE_EXPORT PhysicalPointImageSource PhysicalPointImageSource( ) {}; // virtual ~PhysicalPointImageSource() default implementation ok - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - virtual void ThreadedGenerateData (const RegionType &outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData (const RegionType &outputRegionForThread, ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PhysicalPointImageSource); diff --git a/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.h index 8e69c2b3f4d..99d41110412 100644 --- a/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkAccumulateImageFilter.h @@ -110,20 +110,20 @@ class ITK_TEMPLATE_EXPORT AccumulateImageFilter:public ImageToImageFilter< TInpu protected: AccumulateImageFilter(); - virtual ~AccumulateImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~AccumulateImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Apply changes to the output image information. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** Apply changes to the input image requested region. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This method implements the actual accumulation of the image. * * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(AccumulateImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkAdaptiveHistogramEqualizationImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkAdaptiveHistogramEqualizationImageFilter.h index 122009545c5..93826abeb1b 100644 --- a/Modules/Filtering/ImageStatistics/include/itkAdaptiveHistogramEqualizationImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkAdaptiveHistogramEqualizationImageFilter.h @@ -136,7 +136,7 @@ class ITK_TEMPLATE_EXPORT AdaptiveHistogramEqualizationImageFilter: itkBooleanMacro(UseLookupTable); #endif - virtual void ConfigureHistogram( typename Superclass::HistogramType &h) ITK_OVERRIDE + void ConfigureHistogram( typename Superclass::HistogramType &h) override { h.SetAlpha( this->m_Alpha ); h.SetBeta( this->m_Beta ); @@ -165,13 +165,13 @@ class ITK_TEMPLATE_EXPORT AdaptiveHistogramEqualizationImageFilter: m_UseLookupTable = false; } - virtual ~AdaptiveHistogramEqualizationImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~AdaptiveHistogramEqualizationImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Standard pipeline method */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(AdaptiveHistogramEqualizationImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkBinaryProjectionImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkBinaryProjectionImageFilter.h index 71a5a9f77ba..a6c5af3c291 100644 --- a/Modules/Filtering/ImageStatistics/include/itkBinaryProjectionImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkBinaryProjectionImageFilter.h @@ -156,9 +156,9 @@ class BinaryProjectionImageFilter: m_BackgroundValue = NumericTraits< OutputPixelType >::NonpositiveMin(); } - virtual ~BinaryProjectionImageFilter() ITK_OVERRIDE {} + ~BinaryProjectionImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); @@ -177,7 +177,7 @@ class BinaryProjectionImageFilter: << std::endl; } - virtual AccumulatorType NewAccumulator( SizeValueType size ) const ITK_OVERRIDE + AccumulatorType NewAccumulator( SizeValueType size ) const override { AccumulatorType accumulator(size); diff --git a/Modules/Filtering/ImageStatistics/include/itkGetAverageSliceImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkGetAverageSliceImageFilter.h index eddfd2d845b..54cbcc3decf 100644 --- a/Modules/Filtering/ImageStatistics/include/itkGetAverageSliceImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkGetAverageSliceImageFilter.h @@ -66,8 +66,8 @@ class ITK_TEMPLATE_EXPORT GetAverageSliceImageFilter:public AccumulateImageFilte protected: GetAverageSliceImageFilter(); - virtual ~GetAverageSliceImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GetAverageSliceImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GetAverageSliceImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.h b/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.h index 8ab959eccd7..dc91e6754c8 100644 --- a/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.h +++ b/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.h @@ -77,8 +77,8 @@ class ITK_TEMPLATE_EXPORT HistogramAlgorithmBase:public Object protected: HistogramAlgorithmBase(); - virtual ~HistogramAlgorithmBase() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HistogramAlgorithmBase() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; virtual void Compute() = 0; diff --git a/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.hxx b/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.hxx index 119a09214a8..208747175f0 100644 --- a/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.hxx @@ -26,7 +26,7 @@ template< typename TInputHistogram > HistogramAlgorithmBase< TInputHistogram > ::HistogramAlgorithmBase() { - m_InputHistogram = ITK_NULLPTR; + m_InputHistogram = nullptr; } template< typename TInputHistogram > diff --git a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h index 59061b8123f..97eba369356 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h +++ b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h @@ -201,8 +201,8 @@ class ITK_TEMPLATE_EXPORT ImageMomentsCalculator:public Object protected: ImageMomentsCalculator(); - virtual ~ImageMomentsCalculator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageMomentsCalculator() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageMomentsCalculator); diff --git a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx index 2c0df4b5ba0..7334157c865 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx @@ -53,8 +53,8 @@ template< typename TImage > ImageMomentsCalculator< TImage >::ImageMomentsCalculator(void) { m_Valid = false; - m_Image = ITK_NULLPTR; - m_SpatialObjectMask = ITK_NULLPTR; + m_Image = nullptr; + m_SpatialObjectMask = nullptr; m_M0 = NumericTraits< ScalarType >::ZeroValue(); m_M1.Fill(NumericTraits< typename VectorType::ValueType >::ZeroValue()); m_M2.Fill(NumericTraits< typename MatrixType::ValueType >::ZeroValue()); diff --git a/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h b/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h index 2ba34940473..3d6186bae59 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h +++ b/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h @@ -128,8 +128,8 @@ class ITK_TEMPLATE_EXPORT ImagePCADecompositionCalculator:public Object protected: ImagePCADecompositionCalculator(); - virtual ~ImagePCADecompositionCalculator() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImagePCADecompositionCalculator() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; void CalculateBasisMatrix(); diff --git a/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx b/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx index 091149683bb..b10f7d19594 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx @@ -30,8 +30,8 @@ template< typename TInputImage, typename TBasisImage > ImagePCADecompositionCalculator< TInputImage, TBasisImage > ::ImagePCADecompositionCalculator() { - m_Image = ITK_NULLPTR; - m_MeanImage = ITK_NULLPTR; + m_Image = nullptr; + m_MeanImage = nullptr; m_BasisMatrixCalculated = false; m_NumPixels = 0; } diff --git a/Modules/Filtering/ImageStatistics/include/itkImagePCAShapeModelEstimator.h b/Modules/Filtering/ImageStatistics/include/itkImagePCAShapeModelEstimator.h index 5d6f11c3ced..83907423fe9 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImagePCAShapeModelEstimator.h +++ b/Modules/Filtering/ImageStatistics/include/itkImagePCAShapeModelEstimator.h @@ -140,22 +140,22 @@ class ITK_TEMPLATE_EXPORT ImagePCAShapeModelEstimator: protected: ImagePCAShapeModelEstimator(); - ~ImagePCAShapeModelEstimator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImagePCAShapeModelEstimator() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** This filter must produce all of the outputs at once, as such it * must override the EnlargeOutputRequestedRegion method to enlarge the * output request region. */ - virtual void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *) override; /** This filter requires all the input image at once, as such it * must override the GenerateInputRequestedRegion method. Additionally, * this filter assumes that the input images are at least the size as * the first input image. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Starts the image modelling process */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: @@ -178,7 +178,7 @@ class ITK_TEMPLATE_EXPORT ImagePCAShapeModelEstimator: * determine the cluster centers or the Shape model. This is the * the base function to call the K-means classifier. */ - virtual void EstimateShapeModels() ITK_OVERRIDE; + void EstimateShapeModels() override; void EstimatePCAShapeModelParameters(); diff --git a/Modules/Filtering/ImageStatistics/include/itkImageShapeModelEstimatorBase.h b/Modules/Filtering/ImageStatistics/include/itkImageShapeModelEstimatorBase.h index f635c0bd928..e508a1dd571 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImageShapeModelEstimatorBase.h +++ b/Modules/Filtering/ImageStatistics/include/itkImageShapeModelEstimatorBase.h @@ -65,10 +65,10 @@ class ITK_TEMPLATE_EXPORT ImageShapeModelEstimatorBase: protected: ImageShapeModelEstimatorBase(); - ~ImageShapeModelEstimatorBase() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageShapeModelEstimatorBase() override; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: diff --git a/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.h index 7dfeaabe91c..7d9299963b9 100644 --- a/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.h @@ -201,25 +201,25 @@ class ITK_TEMPLATE_EXPORT LabelOverlapMeasuresImageFilter : protected: LabelOverlapMeasuresImageFilter(); - ~LabelOverlapMeasuresImageFilter() ITK_OVERRIDE {}; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~LabelOverlapMeasuresImageFilter() override {}; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** * Pass the input through unmodified. Do this by setting the output to the * source this by setting the output to the source image in the * AllocateOutputs() method. */ - void AllocateOutputs() ITK_OVERRIDE; + void AllocateOutputs() override; - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; /** Multi-thread version GenerateData. */ - void ThreadedGenerateData( const RegionType&, ThreadIdType ) ITK_OVERRIDE; + void ThreadedGenerateData( const RegionType&, ThreadIdType ) override; // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion( DataObject *data ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *data ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelOverlapMeasuresImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h index b55704bd718..6ef2fb1b5fb 100644 --- a/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h @@ -140,7 +140,7 @@ class ITK_TEMPLATE_EXPORT LabelStatisticsImageFilter: m_BoundingBox[i] = NumericTraits< IndexValueType >::max(); m_BoundingBox[i + 1] = NumericTraits< IndexValueType >::NonpositiveMin(); } - m_Histogram = ITK_NULLPTR; + m_Histogram = nullptr; } // constructor with histogram enabled @@ -329,27 +329,27 @@ class ITK_TEMPLATE_EXPORT LabelStatisticsImageFilter: protected: LabelStatisticsImageFilter(); - ~LabelStatisticsImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LabelStatisticsImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Pass the input through unmodified. Do this by Grafting in the AllocateOutputs method. */ - void AllocateOutputs() ITK_OVERRIDE; + void AllocateOutputs() override; /** Initialize some accumulators before the threads run. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Do final mean and variance computation from data accumulated in threads. */ - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const RegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion(DataObject *data) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *data) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelStatisticsImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx b/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx index ad4a1dc7bd9..a75957ff209 100644 --- a/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx @@ -560,7 +560,7 @@ LabelStatisticsImageFilter< TInputImage, TLabelImage > if ( mapIt == m_LabelStatistics.end() ) { // label does not exist, return a default value - return ITK_NULLPTR; + return nullptr; } else { diff --git a/Modules/Filtering/ImageStatistics/include/itkMaximumProjectionImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkMaximumProjectionImageFilter.h index a6aa4ba821c..e8c1f2ffb98 100644 --- a/Modules/Filtering/ImageStatistics/include/itkMaximumProjectionImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkMaximumProjectionImageFilter.h @@ -104,7 +104,7 @@ class MaximumProjectionImageFilter: protected: MaximumProjectionImageFilter() {} - virtual ~MaximumProjectionImageFilter() ITK_OVERRIDE {} + ~MaximumProjectionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MaximumProjectionImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkMeanProjectionImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkMeanProjectionImageFilter.h index 02853e2bcdb..e659fec7de7 100644 --- a/Modules/Filtering/ImageStatistics/include/itkMeanProjectionImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkMeanProjectionImageFilter.h @@ -124,7 +124,7 @@ class MeanProjectionImageFilter:public protected: MeanProjectionImageFilter() {} - virtual ~MeanProjectionImageFilter() ITK_OVERRIDE {} + ~MeanProjectionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MeanProjectionImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkMedianProjectionImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkMedianProjectionImageFilter.h index 5dc576ad2d9..8f01b576cee 100644 --- a/Modules/Filtering/ImageStatistics/include/itkMedianProjectionImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkMedianProjectionImageFilter.h @@ -108,7 +108,7 @@ class MedianProjectionImageFilter:public protected: MedianProjectionImageFilter() {} - virtual ~MedianProjectionImageFilter() ITK_OVERRIDE {} + ~MedianProjectionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MedianProjectionImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkMinimumMaximumImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkMinimumMaximumImageFilter.h index 28ebe108e19..5b85b66eca5 100644 --- a/Modules/Filtering/ImageStatistics/include/itkMinimumMaximumImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkMinimumMaximumImageFilter.h @@ -98,7 +98,7 @@ class ITK_TEMPLATE_EXPORT MinimumMaximumImageFilter: * output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -113,30 +113,30 @@ class ITK_TEMPLATE_EXPORT MinimumMaximumImageFilter: protected: MinimumMaximumImageFilter(); - virtual ~MinimumMaximumImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MinimumMaximumImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Pass the input through unmodified. Do this by Grafting in the AllocateOutputs method. */ - void AllocateOutputs() ITK_OVERRIDE; + void AllocateOutputs() override; /** Initialize some accumulators before the threads run. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Do final mean and variance computation from data accumulated in threads. */ - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const RegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion(DataObject *data) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *data) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MinimumMaximumImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkMinimumProjectionImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkMinimumProjectionImageFilter.h index 62357abda42..60f34f7b7de 100644 --- a/Modules/Filtering/ImageStatistics/include/itkMinimumProjectionImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkMinimumProjectionImageFilter.h @@ -104,7 +104,7 @@ class MinimumProjectionImageFilter:public protected: MinimumProjectionImageFilter() {} - virtual ~MinimumProjectionImageFilter() ITK_OVERRIDE {} + ~MinimumProjectionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MinimumProjectionImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.h index 61da5937bf1..1aadc795ff1 100644 --- a/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkProjectionImageFilter.h @@ -106,17 +106,17 @@ class ITK_TEMPLATE_EXPORT ProjectionImageFilter: protected: ProjectionImageFilter(); - virtual ~ProjectionImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ProjectionImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Apply changes to the output image information. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** Apply changes to the input image requested region. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - virtual void ThreadedGenerateData( - const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData( + const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; virtual AccumulatorType NewAccumulator( SizeValueType ) const; diff --git a/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h index b43adcc94a3..704fffd04d3 100644 --- a/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h @@ -145,7 +145,7 @@ class StandardDeviationProjectionImageFilter: protected: StandardDeviationProjectionImageFilter() {} - virtual ~StandardDeviationProjectionImageFilter() ITK_OVERRIDE {} + ~StandardDeviationProjectionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(StandardDeviationProjectionImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.h index 1b0a75e7c78..e014e4da23b 100644 --- a/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.h @@ -130,7 +130,7 @@ class ITK_TEMPLATE_EXPORT StatisticsImageFilter: * output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -141,31 +141,31 @@ class ITK_TEMPLATE_EXPORT StatisticsImageFilter: protected: StatisticsImageFilter(); - ~StatisticsImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~StatisticsImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Pass the input through unmodified. Do this by Grafting in the * AllocateOutputs method. */ - void AllocateOutputs() ITK_OVERRIDE; + void AllocateOutputs() override; /** Initialize some accumulators before the threads run. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; /** Do final mean and variance computation from data accumulated in threads. */ - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const RegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion(DataObject *data) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *data) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StatisticsImageFilter); diff --git a/Modules/Filtering/ImageStatistics/include/itkSumProjectionImageFilter.h b/Modules/Filtering/ImageStatistics/include/itkSumProjectionImageFilter.h index 5a583a11048..77d78a07df4 100644 --- a/Modules/Filtering/ImageStatistics/include/itkSumProjectionImageFilter.h +++ b/Modules/Filtering/ImageStatistics/include/itkSumProjectionImageFilter.h @@ -114,7 +114,7 @@ class SumProjectionImageFilter: protected: SumProjectionImageFilter() {} - virtual ~SumProjectionImageFilter() ITK_OVERRIDE {} + ~SumProjectionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SumProjectionImageFilter); diff --git a/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest.cxx index 95a56b65c45..38e8e4759fb 100644 --- a/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest.cxx @@ -104,7 +104,7 @@ int itkImageToHistogramFilterTest( int , char * [] ) const InputHistogramMeasurementVectorObjectType * returnedHistogramBinMinimumObject = filter->GetHistogramBinMinimumInput(); - if( returnedHistogramBinMinimumObject == ITK_NULLPTR ) + if( returnedHistogramBinMinimumObject == nullptr ) { std::cerr << "SetHistogramSize() failed pointer consistency test" << std::endl; return EXIT_FAILURE; @@ -201,7 +201,7 @@ int itkImageToHistogramFilterTest( int , char * [] ) const InputHistogramMeasurementVectorObjectType * returnedHistogramBinMaximumObject = filter->GetHistogramBinMaximumInput(); - if( returnedHistogramBinMaximumObject == ITK_NULLPTR ) + if( returnedHistogramBinMaximumObject == nullptr ) { std::cerr << "SetHistogramSize() failed pointer consistency test" << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/LabelMap/include/itkAggregateLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAggregateLabelMapFilter.h index 76f277cf9f5..794770ccb74 100644 --- a/Modules/Filtering/LabelMap/include/itkAggregateLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAggregateLabelMapFilter.h @@ -81,11 +81,11 @@ class ITK_TEMPLATE_EXPORT AggregateLabelMapFilter: protected: AggregateLabelMapFilter() {} - ~AggregateLabelMapFilter() ITK_OVERRIDE {} + ~AggregateLabelMapFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(AggregateLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkAttributeKeepNObjectsLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAttributeKeepNObjectsLabelMapFilter.h index 80077bf46b0..7f612dee220 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeKeepNObjectsLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeKeepNObjectsLabelMapFilter.h @@ -100,11 +100,11 @@ class ITK_TEMPLATE_EXPORT AttributeKeepNObjectsLabelMapFilter : protected: AttributeKeepNObjectsLabelMapFilter(); - ~AttributeKeepNObjectsLabelMapFilter() ITK_OVERRIDE {}; + ~AttributeKeepNObjectsLabelMapFilter() override {}; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; class ReverseComparator { diff --git a/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h b/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h index e316364fce8..4d876ff9491 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h @@ -116,7 +116,7 @@ class AttributeLabelObject : public LabelObject< TLabel, VImageDimension > template< typename TSourceLabelObject > void CopyAttributesFrom( const TSourceLabelObject * src ) { - itkAssertOrThrowMacro ( ( src != ITK_NULLPTR ), "Null Pointer" ); + itkAssertOrThrowMacro ( ( src != nullptr ), "Null Pointer" ); Superclass::template CopyAttributesFrom( src ); m_Attribute = src->GetAttribute(); @@ -125,7 +125,7 @@ class AttributeLabelObject : public LabelObject< TLabel, VImageDimension > template< typename TSourceLabelObject > void CopyAllFrom(const TSourceLabelObject *src) { - itkAssertOrThrowMacro ( ( src != ITK_NULLPTR ), "Null Pointer" ); + itkAssertOrThrowMacro ( ( src != nullptr ), "Null Pointer" ); this->template CopyLinesFrom( src ); this->template CopyAttributesFrom( src ); } @@ -137,7 +137,7 @@ class AttributeLabelObject : public LabelObject< TLabel, VImageDimension > } - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& os, Indent indent) const override { Superclass::PrintSelf( os, indent ); diff --git a/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h index 35d48485a09..4078f23515a 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h @@ -103,11 +103,11 @@ class ITK_TEMPLATE_EXPORT AttributeOpeningLabelMapFilter : protected: AttributeOpeningLabelMapFilter(); - ~AttributeOpeningLabelMapFilter() ITK_OVERRIDE {}; + ~AttributeOpeningLabelMapFilter() override {}; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(AttributeOpeningLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkAttributePositionLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAttributePositionLabelMapFilter.h index 030d8c38212..2df698ac36d 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributePositionLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAttributePositionLabelMapFilter.h @@ -86,11 +86,11 @@ class ITK_TEMPLATE_EXPORT AttributePositionLabelMapFilter : protected: AttributePositionLabelMapFilter(); - ~AttributePositionLabelMapFilter() ITK_OVERRIDE {}; + ~AttributePositionLabelMapFilter() override {}; - virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject ) ITK_OVERRIDE; + void ThreadedProcessLabelObject( LabelObjectType * labelObject ) override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(AttributePositionLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkAttributeRelabelLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAttributeRelabelLabelMapFilter.h index 89a1f9742b2..485fb543e5b 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeRelabelLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeRelabelLabelMapFilter.h @@ -95,11 +95,11 @@ class ITK_TEMPLATE_EXPORT AttributeRelabelLabelMapFilter : protected: AttributeRelabelLabelMapFilter(); - ~AttributeRelabelLabelMapFilter() ITK_OVERRIDE {}; + ~AttributeRelabelLabelMapFilter() override {}; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; class ReverseComparator { diff --git a/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.h index f1b7127726a..42487287fca 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeSelectionLabelMapFilter.h @@ -142,11 +142,11 @@ class ITK_TEMPLATE_EXPORT AttributeSelectionLabelMapFilter : protected: AttributeSelectionLabelMapFilter(); - ~AttributeSelectionLabelMapFilter() ITK_OVERRIDE {}; + ~AttributeSelectionLabelMapFilter() override {}; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(AttributeSelectionLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.h index aa61561d2f3..bd1f9e28068 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeUniqueLabelMapFilter.h @@ -100,11 +100,11 @@ class ITK_TEMPLATE_EXPORT AttributeUniqueLabelMapFilter : protected: AttributeUniqueLabelMapFilter(); - ~AttributeUniqueLabelMapFilter() ITK_OVERRIDE {}; + ~AttributeUniqueLabelMapFilter() override {}; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; bool m_ReverseOrdering; diff --git a/Modules/Filtering/LabelMap/include/itkAutoCropLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAutoCropLabelMapFilter.h index d300a2950d0..eef26d0590a 100644 --- a/Modules/Filtering/LabelMap/include/itkAutoCropLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAutoCropLabelMapFilter.h @@ -100,11 +100,11 @@ class ITK_TEMPLATE_EXPORT AutoCropLabelMapFilter: protected: AutoCropLabelMapFilter(); - ~AutoCropLabelMapFilter() ITK_OVERRIDE {} + ~AutoCropLabelMapFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(AutoCropLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryFillholeImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryFillholeImageFilter.h index 933246797b4..9d69ccad1a9 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryFillholeImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryFillholeImageFilter.h @@ -104,20 +104,20 @@ class ITK_TEMPLATE_EXPORT BinaryFillholeImageFilter : protected: BinaryFillholeImageFilter(); - ~BinaryFillholeImageFilter() ITK_OVERRIDE {}; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~BinaryFillholeImageFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; /** BinaryFillholeImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryFillholeImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryFillholeImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryGrindPeakImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryGrindPeakImageFilter.h index c13480ddb7e..c78faf7ac3e 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryGrindPeakImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryGrindPeakImageFilter.h @@ -110,20 +110,20 @@ class ITK_TEMPLATE_EXPORT BinaryGrindPeakImageFilter : protected: BinaryGrindPeakImageFilter(); - ~BinaryGrindPeakImageFilter() ITK_OVERRIDE {}; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~BinaryGrindPeakImageFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; /** BinaryGrindPeakImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryGrindPeakImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryGrindPeakImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.h index 2a317f6ca58..7b768c50d56 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.h @@ -152,35 +152,35 @@ class ITK_TEMPLATE_EXPORT BinaryImageToLabelMapFilter: protected: BinaryImageToLabelMapFilter(); - virtual ~BinaryImageToLabelMapFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryImageToLabelMapFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; typedef SizeValueType InternalLabelType; /** * Standard pipeline method. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; - void ThreadedGenerateData(const RegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const RegionType & outputRegionForThread, ThreadIdType threadId) override; /** BinaryImageToLabelMapFilter needs the entire input. Therefore * it must provide an implementation GenerateInputRequestedRegion(). * \sa ProcessObject::GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryImageToLabelMapFilter will produce all of the output. * Therefore it must provide an implementation of * EnlargeOutputRequestedRegion(). * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Provide an ImageRegionSplitter that does not split along the first * dimension -- we assume the data is complete along this dimension when * threading. */ - virtual const ImageRegionSplitterBase* GetImageRegionSplitter() const ITK_OVERRIDE; + const ImageRegionSplitterBase* GetImageRegionSplitter() const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryImageToLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx index 8a1129140b5..15bdcc02612 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx @@ -375,7 +375,7 @@ BinaryImageToLabelMapFilter< TInputImage, TOutputImage > } this->m_NumberOfLabels.clear(); - this->m_Barrier = ITK_NULLPTR; + this->m_Barrier = nullptr; m_LineMap.clear(); } diff --git a/Modules/Filtering/LabelMap/include/itkBinaryImageToShapeLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryImageToShapeLabelMapFilter.h index e1557df37cf..c3f40a26288 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryImageToShapeLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryImageToShapeLabelMapFilter.h @@ -160,19 +160,19 @@ class ITK_TEMPLATE_EXPORT BinaryImageToShapeLabelMapFilter: protected: BinaryImageToShapeLabelMapFilter(); - ~BinaryImageToShapeLabelMapFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryImageToShapeLabelMapFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** BinaryImageToShapeLabelMapFilter needs the entire input be available. * Thus, it needs to provide an implementation of GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryImageToShapeLabelMapFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. * This filter delegates to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryImageToShapeLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.h index 882a8732259..53208497373 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryImageToStatisticsLabelMapFilter.h @@ -182,20 +182,20 @@ class ITK_TEMPLATE_EXPORT BinaryImageToStatisticsLabelMapFilter: protected: BinaryImageToStatisticsLabelMapFilter(); - ~BinaryImageToStatisticsLabelMapFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryImageToStatisticsLabelMapFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** BinaryImageToStatisticsLabelMapFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryImageToStatisticsLabelMapFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryImageToStatisticsLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryNotImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryNotImageFilter.h index e8bc344e23e..231a66a6f66 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryNotImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryNotImageFilter.h @@ -122,9 +122,9 @@ class BinaryNotImageFilter : m_ForegroundValue = NumericTraits::max(); m_BackgroundValue = NumericTraits::NonpositiveMin(); } - virtual ~BinaryNotImageFilter() ITK_OVERRIDE {} + ~BinaryNotImageFilter() override {} - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& os, Indent indent) const override { Superclass::PrintSelf(os,indent); @@ -140,7 +140,7 @@ class BinaryNotImageFilter : << std::endl; } - void GenerateData() ITK_OVERRIDE + void GenerateData() override { this->GetFunctor().m_ForegroundValue = m_ForegroundValue; this->GetFunctor().m_BackgroundValue = m_BackgroundValue; diff --git a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByDilationImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByDilationImageFilter.h index 2c5dedf56ac..bcb7d857315 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByDilationImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByDilationImageFilter.h @@ -145,20 +145,20 @@ class ITK_TEMPLATE_EXPORT BinaryReconstructionByDilationImageFilter : protected: BinaryReconstructionByDilationImageFilter(); - ~BinaryReconstructionByDilationImageFilter() ITK_OVERRIDE {}; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~BinaryReconstructionByDilationImageFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; /** BinaryReconstructionByDilationImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryReconstructionByDilationImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryReconstructionByDilationImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByErosionImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByErosionImageFilter.h index b71704fa98f..a676a3320b4 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByErosionImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionByErosionImageFilter.h @@ -145,20 +145,20 @@ class ITK_TEMPLATE_EXPORT BinaryReconstructionByErosionImageFilter : protected: BinaryReconstructionByErosionImageFilter(); - ~BinaryReconstructionByErosionImageFilter() ITK_OVERRIDE {}; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~BinaryReconstructionByErosionImageFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; /** BinaryReconstructionByErosionImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryReconstructionByErosionImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryReconstructionByErosionImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionLabelMapFilter.h index 1dfb00b70af..c16f24cde3c 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryReconstructionLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryReconstructionLabelMapFilter.h @@ -123,11 +123,11 @@ class ITK_TEMPLATE_EXPORT BinaryReconstructionLabelMapFilter : protected: BinaryReconstructionLabelMapFilter(); - ~BinaryReconstructionLabelMapFilter() ITK_OVERRIDE {}; + ~BinaryReconstructionLabelMapFilter() override {}; - virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject ) ITK_OVERRIDE; + void ThreadedProcessLabelObject( LabelObjectType * labelObject ) override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryReconstructionLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.h index 13b07d70402..722f3f33152 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.h @@ -156,20 +156,20 @@ class ITK_TEMPLATE_EXPORT BinaryShapeKeepNObjectsImageFilter: protected: BinaryShapeKeepNObjectsImageFilter(); - ~BinaryShapeKeepNObjectsImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryShapeKeepNObjectsImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** BinaryShapeKeepNObjectsImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryShapeKeepNObjectsImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryShapeKeepNObjectsImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryShapeOpeningImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryShapeOpeningImageFilter.h index 57d5bc31618..e83c6f9ed20 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryShapeOpeningImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryShapeOpeningImageFilter.h @@ -153,19 +153,19 @@ class ITK_TEMPLATE_EXPORT BinaryShapeOpeningImageFilter: protected: BinaryShapeOpeningImageFilter(); - ~BinaryShapeOpeningImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryShapeOpeningImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** BinaryShapeOpeningImageFilter needs the entire input to be available. * Thus, it needs to provide an implementation of GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryShapeOpeningImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryShapeOpeningImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.h index 6ba8d1ac939..d073e2b16eb 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.h @@ -183,20 +183,20 @@ class ITK_TEMPLATE_EXPORT BinaryStatisticsKeepNObjectsImageFilter: protected: BinaryStatisticsKeepNObjectsImageFilter(); - ~BinaryStatisticsKeepNObjectsImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryStatisticsKeepNObjectsImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** BinaryStatisticsKeepNObjectsImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryStatisticsKeepNObjectsImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryStatisticsKeepNObjectsImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkBinaryStatisticsOpeningImageFilter.h b/Modules/Filtering/LabelMap/include/itkBinaryStatisticsOpeningImageFilter.h index 80f9ea6ba14..4c4e95c1cf7 100644 --- a/Modules/Filtering/LabelMap/include/itkBinaryStatisticsOpeningImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkBinaryStatisticsOpeningImageFilter.h @@ -180,19 +180,19 @@ class ITK_TEMPLATE_EXPORT BinaryStatisticsOpeningImageFilter: protected: BinaryStatisticsOpeningImageFilter(); - ~BinaryStatisticsOpeningImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryStatisticsOpeningImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** BinaryStatisticsOpeningImageFilter needs the entire input to be available. * Thus, it needs to provide an implementation of GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** BinaryStatisticsOpeningImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryStatisticsOpeningImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.h index 989f3096829..4cd6b047dc5 100644 --- a/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.h @@ -99,11 +99,11 @@ class ITK_TEMPLATE_EXPORT ChangeLabelLabelMapFilter: protected: ChangeLabelLabelMapFilter(); - ~ChangeLabelLabelMapFilter() ITK_OVERRIDE {} + ~ChangeLabelLabelMapFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; ChangeMapType m_MapOfLabelToBeReplaced; diff --git a/Modules/Filtering/LabelMap/include/itkChangeRegionLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkChangeRegionLabelMapFilter.h index cb64d9a83cd..63b9c009697 100644 --- a/Modules/Filtering/LabelMap/include/itkChangeRegionLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkChangeRegionLabelMapFilter.h @@ -101,19 +101,19 @@ class ITK_TEMPLATE_EXPORT ChangeRegionLabelMapFilter:public InPlaceLabelMapFilte protected: ChangeRegionLabelMapFilter() {} - ~ChangeRegionLabelMapFilter() ITK_OVERRIDE {} + ~ChangeRegionLabelMapFilter() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void ThreadedProcessLabelObject(LabelObjectType *labelObject) ITK_OVERRIDE; + void ThreadedProcessLabelObject(LabelObjectType *labelObject) override; - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ChangeRegionLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkConvertLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkConvertLabelMapFilter.h index 30b8f98682a..9d5e36692a6 100644 --- a/Modules/Filtering/LabelMap/include/itkConvertLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkConvertLabelMapFilter.h @@ -78,9 +78,9 @@ class ITK_TEMPLATE_EXPORT ConvertLabelMapFilter: protected: ConvertLabelMapFilter() {} - ~ConvertLabelMapFilter() ITK_OVERRIDE {} + ~ConvertLabelMapFilter() override {} - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ConvertLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkCropLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkCropLabelMapFilter.h index f0bfc27b38d..f3d48fdb872 100644 --- a/Modules/Filtering/LabelMap/include/itkCropLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkCropLabelMapFilter.h @@ -112,11 +112,11 @@ class ITK_TEMPLATE_EXPORT CropLabelMapFilter:public ChangeRegionLabelMapFilter< m_LowerBoundaryCropSize.Fill(0); } - ~CropLabelMapFilter() ITK_OVERRIDE {} + ~CropLabelMapFilter() override {} - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CropLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.h index b83e9dff0a9..56e8a283c83 100644 --- a/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.h @@ -142,9 +142,9 @@ class ITK_TEMPLATE_EXPORT InPlaceLabelMapFilter:public LabelMapFilter< TInputIma protected: InPlaceLabelMapFilter(); - ~InPlaceLabelMapFilter() ITK_OVERRIDE; + ~InPlaceLabelMapFilter() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** The GenerateData method normally allocates the buffers for all * of the outputs of a filter. Since InPlaceLabelMapFilter's can use an @@ -158,13 +158,13 @@ class ITK_TEMPLATE_EXPORT InPlaceLabelMapFilter:public LabelMapFilter< TInputIma * an InPlaceFilter is not threaded (i.e. it provides an * implementation of GenerateData()), then this method (or * equivalent) must be called in GenerateData(). */ - virtual void AllocateOutputs() ITK_OVERRIDE; + void AllocateOutputs() override; /** * Return the output label collection image, instead of the input as in the default * implementation */ - virtual InputImageType * GetLabelMap() ITK_OVERRIDE + InputImageType * GetLabelMap() override { return this->GetOutput(); } diff --git a/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.hxx index 1bda165422c..8c467345663 100644 --- a/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkInPlaceLabelMapFilter.hxx @@ -116,8 +116,8 @@ InPlaceLabelMapFilter< TInputImage > // copy the content of the input image to the output image const TInputImage *input = this->GetInput(); TOutputImage * output = this->GetOutput(); - itkAssertInDebugAndIgnoreInReleaseMacro(input != ITK_NULLPTR); - itkAssertInDebugAndIgnoreInReleaseMacro(output != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(input != nullptr); + itkAssertInDebugAndIgnoreInReleaseMacro(output != nullptr); output->SetBackgroundValue( input->GetBackgroundValue() ); @@ -126,7 +126,7 @@ InPlaceLabelMapFilter< TInputImage > { const LabelObjectType *labelObject = it.GetLabelObject(); - itkAssertInDebugAndIgnoreInReleaseMacro(labelObject != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(labelObject != nullptr); itkAssertInDebugAndIgnoreInReleaseMacro(labelObject->GetLabel() == it.GetLabel()); typename LabelObjectType::Pointer newLabelObject = LabelObjectType::New(); diff --git a/Modules/Filtering/LabelMap/include/itkLabelImageToLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkLabelImageToLabelMapFilter.h index a9ff27a7c48..9f3bf014b95 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelImageToLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelImageToLabelMapFilter.h @@ -100,22 +100,22 @@ class ITK_TEMPLATE_EXPORT LabelImageToLabelMapFilter: protected: LabelImageToLabelMapFilter(); - ~LabelImageToLabelMapFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LabelImageToLabelMapFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** LabelImageToLabelMapFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelImageToLabelMapFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; - virtual void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelImageToLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelImageToShapeLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkLabelImageToShapeLabelMapFilter.h index 72a60eaf89d..763d67d6b51 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelImageToShapeLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelImageToShapeLabelMapFilter.h @@ -135,19 +135,19 @@ class ITK_TEMPLATE_EXPORT LabelImageToShapeLabelMapFilter: protected: LabelImageToShapeLabelMapFilter(); - ~LabelImageToShapeLabelMapFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LabelImageToShapeLabelMapFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** LabelImageToShapeLabelMapFilter needs the entire input be available. * Thus, it needs to provide an implementation of GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelImageToShapeLabelMapFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. * This filter delegates to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelImageToShapeLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.h index 80d714df4e0..76da5c83907 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelImageToStatisticsLabelMapFilter.h @@ -166,20 +166,20 @@ class ITK_TEMPLATE_EXPORT LabelImageToStatisticsLabelMapFilter: protected: LabelImageToStatisticsLabelMapFilter(); - ~LabelImageToStatisticsLabelMapFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LabelImageToStatisticsLabelMapFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** LabelImageToStatisticsLabelMapFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelImageToStatisticsLabelMapFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelImageToStatisticsLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelMap.h b/Modules/Filtering/LabelMap/include/itkLabelMap.h index dd0a3d28d9b..545cb582e5b 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMap.h +++ b/Modules/Filtering/LabelMap/include/itkLabelMap.h @@ -133,10 +133,10 @@ class ITK_TEMPLATE_EXPORT LabelMap:public ImageBase< TLabelObject::ImageDimensio /** Restore the data object to its initial state. This means releasing * memory. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** */ - virtual void Allocate(bool initialize = false) ITK_OVERRIDE; + void Allocate(bool initialize = false) override; virtual void Graft(const Self *imgData); @@ -447,9 +447,9 @@ class ITK_TEMPLATE_EXPORT LabelMap:public ImageBase< TLabelObject::ImageDimensio protected: LabelMap(); - virtual ~LabelMap() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; - virtual void Graft(const DataObject *data) ITK_OVERRIDE; + ~LabelMap() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; + void Graft(const DataObject *data) override; using Superclass::Graft; private: diff --git a/Modules/Filtering/LabelMap/include/itkLabelMap.hxx b/Modules/Filtering/LabelMap/include/itkLabelMap.hxx index 9e07a037b17..b9d5c671ad8 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMap.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelMap.hxx @@ -81,7 +81,7 @@ void LabelMap< TLabelObject > ::Graft(const Self *imgData) { - if(imgData == ITK_NULLPTR) + if(imgData == nullptr) { return; // nothing to do } @@ -103,7 +103,7 @@ void LabelMap< TLabelObject > ::Graft(const DataObject *data) { - if(data == ITK_NULLPTR) + if(data == nullptr) { return; // nothing to do } @@ -111,7 +111,7 @@ LabelMap< TLabelObject > // Attempt to cast data to an Image const Self *imgData = dynamic_cast< const Self * >( data ); - if ( imgData == ITK_NULLPTR ) + if ( imgData == nullptr ) { // pointer could not be cast back down itkExceptionMacro( << "itk::LabelMap::Graft() cannot cast " @@ -419,7 +419,7 @@ LabelMap< TLabelObject > } } itkExceptionMacro(<< "No label object at index " << idx << "."); -// return ITK_NULLPTR; +// return nullptr; } @@ -428,7 +428,7 @@ void LabelMap< TLabelObject > ::AddLabelObject(LabelObjectType *labelObject) { - itkAssertOrThrowMacro( ( labelObject != ITK_NULLPTR ), "Input LabelObject can't be Null" ); + itkAssertOrThrowMacro( ( labelObject != nullptr ), "Input LabelObject can't be Null" ); m_LabelObjectContainer[labelObject->GetLabel()] = labelObject; this->Modified(); @@ -440,7 +440,7 @@ void LabelMap< TLabelObject > ::PushLabelObject(LabelObjectType *labelObject) { - itkAssertOrThrowMacro( ( labelObject != ITK_NULLPTR ), "Input LabelObject can't be Null" ); + itkAssertOrThrowMacro( ( labelObject != nullptr ), "Input LabelObject can't be Null" ); if ( m_LabelObjectContainer.empty() ) { @@ -506,7 +506,7 @@ void LabelMap< TLabelObject > ::RemoveLabelObject(LabelObjectType *labelObject) { - itkAssertOrThrowMacro( ( labelObject != ITK_NULLPTR ), "Input LabelObject can't be Null" ); + itkAssertOrThrowMacro( ( labelObject != nullptr ), "Input LabelObject can't be Null" ); // modified is called in RemoveLabel() this->RemoveLabel( labelObject->GetLabel() ); } diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkLabelMapFilter.h index 46adaa89774..a565947ce33 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelMapFilter.h @@ -92,20 +92,20 @@ class ITK_TEMPLATE_EXPORT LabelMapFilter: /** LabelMapFilter requires the entire input to be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelMapFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) override; protected: LabelMapFilter(); - ~LabelMapFilter() ITK_OVERRIDE; + ~LabelMapFilter() override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; - virtual void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; virtual void ThreadedProcessLabelObject(LabelObjectType *labelObject); diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.h index a558330d7fb..87859ba31bf 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.h @@ -149,25 +149,25 @@ class ITK_TEMPLATE_EXPORT LabelMapMaskImageFilter : protected: LabelMapMaskImageFilter(); - ~LabelMapMaskImageFilter() ITK_OVERRIDE {}; + ~LabelMapMaskImageFilter() override {}; /** LabelMapMaskImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelMapMaskImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) override; - virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject ) ITK_OVERRIDE; + void ThreadedProcessLabelObject( LabelObjectType * labelObject ) override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelMapMaskImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.hxx b/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.hxx index b8887b0cc59..fb15a5b5d9d 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelMapMaskImageFilter.hxx @@ -79,7 +79,7 @@ LabelMapMaskImageFilter ProcessObject * upstream = input->GetSource(); if (upstream) { - // this->SetInput(ITK_NULLPTR); + // this->SetInput(nullptr); // std::cout << "Update the input (again?)." << std::endl; upstream->Update(); // this->SetInput(input); diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapToAttributeImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelMapToAttributeImageFilter.h index 1c3b2780e33..29b922d6a2f 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapToAttributeImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelMapToAttributeImageFilter.h @@ -90,20 +90,20 @@ class ITK_TEMPLATE_EXPORT LabelMapToAttributeImageFilter : protected: LabelMapToAttributeImageFilter(); - ~LabelMapToAttributeImageFilter() ITK_OVERRIDE {}; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~LabelMapToAttributeImageFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; /** LabelMapToAttributeImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelMapToAttributeImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelMapToAttributeImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapToBinaryImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelMapToBinaryImageFilter.h index 5236c117367..8234c1c2bd8 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapToBinaryImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelMapToBinaryImageFilter.h @@ -119,23 +119,23 @@ class ITK_TEMPLATE_EXPORT LabelMapToBinaryImageFilter: protected: LabelMapToBinaryImageFilter(); - ~LabelMapToBinaryImageFilter() ITK_OVERRIDE {} + ~LabelMapToBinaryImageFilter() override {} /** LabelMapToBinaryImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelMapToBinaryImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; - virtual void ThreadedProcessLabelObject(LabelObjectType *labelObject) ITK_OVERRIDE; + void ThreadedProcessLabelObject(LabelObjectType *labelObject) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelMapToBinaryImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.h index 5fcd31c8501..ebc0077a9ab 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.h @@ -85,11 +85,11 @@ class ITK_TEMPLATE_EXPORT LabelMapToLabelImageFilter: protected: LabelMapToLabelImageFilter(); - ~LabelMapToLabelImageFilter() ITK_OVERRIDE {} + ~LabelMapToLabelImageFilter() override {} - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void ThreadedProcessLabelObject(LabelObjectType *labelObject) ITK_OVERRIDE; + void ThreadedProcessLabelObject(LabelObjectType *labelObject) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelMapToLabelImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx b/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx index 28784956b27..0022411af1a 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx @@ -30,7 +30,7 @@ template< typename TInputImage, typename TOutputImage > LabelMapToLabelImageFilter< TInputImage, TOutputImage > ::LabelMapToLabelImageFilter() { - m_OutputImage = ITK_NULLPTR; + m_OutputImage = nullptr; } diff --git a/Modules/Filtering/LabelMap/include/itkLabelObject.h b/Modules/Filtering/LabelMap/include/itkLabelObject.h index 4330c351b2e..10afbf6bd7d 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelObject.h +++ b/Modules/Filtering/LabelMap/include/itkLabelObject.h @@ -368,7 +368,7 @@ class ITK_TEMPLATE_EXPORT LabelObject:public LightObject protected: LabelObject(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelObject); diff --git a/Modules/Filtering/LabelMap/include/itkLabelObject.hxx b/Modules/Filtering/LabelMap/include/itkLabelObject.hxx index 9fddb1a1292..9570ef964ee 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelObject.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelObject.hxx @@ -285,7 +285,7 @@ void LabelObject< TLabel, VImageDimension > ::CopyLinesFrom(const TSourceLabelObject *src) { - itkAssertOrThrowMacro ( ( src != ITK_NULLPTR ), "Null Pointer" ); + itkAssertOrThrowMacro ( ( src != nullptr ), "Null Pointer" ); // clear original lines and copy lines m_LineContainer.clear(); for( size_t i = 0; i < src->GetNumberOfLines(); ++i ) @@ -302,7 +302,7 @@ void LabelObject< TLabel, VImageDimension > ::CopyAttributesFrom(const TSourceLabelObject *src) { - itkAssertOrThrowMacro ( ( src != ITK_NULLPTR ), "Null Pointer" ); + itkAssertOrThrowMacro ( ( src != nullptr ), "Null Pointer" ); m_Label = src->GetLabel(); } @@ -313,7 +313,7 @@ void LabelObject< TLabel, VImageDimension > ::CopyAllFrom(const TSourceLabelObject *src) { - itkAssertOrThrowMacro ( ( src != ITK_NULLPTR ), "Null Pointer" ); + itkAssertOrThrowMacro ( ( src != nullptr ), "Null Pointer" ); // Basically all derived class just need to copy the following two // lines to copy all data members this->template CopyLinesFrom( src ); diff --git a/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx b/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx index c28e03e069e..f15f3c01021 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx @@ -91,7 +91,7 @@ bool LabelObjectLine< VImageDimension >::IsNextIndex(const IndexType & idx) cons /** * This function just calls the - * header/self/trailer virtual print methods, which can be overriden by + * header/self/trailer print methods, which can be overriden by * subclasses. */ template< unsigned int VImageDimension > diff --git a/Modules/Filtering/LabelMap/include/itkLabelSelectionLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkLabelSelectionLabelMapFilter.h index 271c4b17dc6..9e1a5196891 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelSelectionLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelSelectionLabelMapFilter.h @@ -123,7 +123,7 @@ class LabelSelectionLabelMapFilter : protected: LabelSelectionLabelMapFilter() {}; - ~LabelSelectionLabelMapFilter() ITK_OVERRIDE {}; + ~LabelSelectionLabelMapFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelSelectionLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelShapeKeepNObjectsImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelShapeKeepNObjectsImageFilter.h index 4f13a0e8ec6..cd1c449c3c5 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelShapeKeepNObjectsImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelShapeKeepNObjectsImageFilter.h @@ -142,20 +142,20 @@ class ITK_TEMPLATE_EXPORT LabelShapeKeepNObjectsImageFilter: protected: LabelShapeKeepNObjectsImageFilter(); - ~LabelShapeKeepNObjectsImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LabelShapeKeepNObjectsImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** LabelShapeKeepNObjectsImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelShapeKeepNObjectsImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelShapeKeepNObjectsImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelShapeOpeningImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelShapeOpeningImageFilter.h index 7c072fa585e..82ae231c1ac 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelShapeOpeningImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelShapeOpeningImageFilter.h @@ -138,20 +138,20 @@ class ITK_TEMPLATE_EXPORT LabelShapeOpeningImageFilter: protected: LabelShapeOpeningImageFilter(); - ~LabelShapeOpeningImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LabelShapeOpeningImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** LabelShapeOpeningImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelShapeOpeningImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelShapeOpeningImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelStatisticsKeepNObjectsImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelStatisticsKeepNObjectsImageFilter.h index 4bd8b3d5504..b40e0464eff 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelStatisticsKeepNObjectsImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelStatisticsKeepNObjectsImageFilter.h @@ -164,20 +164,20 @@ class ITK_TEMPLATE_EXPORT LabelStatisticsKeepNObjectsImageFilter: protected: LabelStatisticsKeepNObjectsImageFilter(); - ~LabelStatisticsKeepNObjectsImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LabelStatisticsKeepNObjectsImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** LabelStatisticsKeepNObjectsImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelStatisticsKeepNObjectsImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelStatisticsKeepNObjectsImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelStatisticsOpeningImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelStatisticsOpeningImageFilter.h index 52f1517c2c5..cfaa391701a 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelStatisticsOpeningImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelStatisticsOpeningImageFilter.h @@ -165,20 +165,20 @@ class ITK_TEMPLATE_EXPORT LabelStatisticsOpeningImageFilter: protected: LabelStatisticsOpeningImageFilter(); - ~LabelStatisticsOpeningImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LabelStatisticsOpeningImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** LabelStatisticsOpeningImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** LabelStatisticsOpeningImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelStatisticsOpeningImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkLabelUniqueLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkLabelUniqueLabelMapFilter.h index b3f4a2a8b3a..e46b54794f7 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelUniqueLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelUniqueLabelMapFilter.h @@ -88,7 +88,7 @@ class LabelUniqueLabelMapFilter : protected: LabelUniqueLabelMapFilter() {}; - ~LabelUniqueLabelMapFilter() ITK_OVERRIDE {}; + ~LabelUniqueLabelMapFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelUniqueLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.h index 47018ae068b..26536d64b80 100644 --- a/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkMergeLabelMapFilter.h @@ -105,11 +105,11 @@ class ITK_TEMPLATE_EXPORT MergeLabelMapFilter: protected: MergeLabelMapFilter(); - ~MergeLabelMapFilter() ITK_OVERRIDE {} + ~MergeLabelMapFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; MethodChoice m_Method; diff --git a/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h index 0457609d389..acb795c5694 100644 --- a/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.h @@ -200,10 +200,10 @@ class ITK_TEMPLATE_EXPORT ObjectByObjectLabelMapFilter : protected: ObjectByObjectLabelMapFilter(); - ~ObjectByObjectLabelMapFilter() ITK_OVERRIDE {}; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~ObjectByObjectLabelMapFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ObjectByObjectLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.hxx index 12410b0e72c..88f2165d892 100644 --- a/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.hxx @@ -42,8 +42,8 @@ ObjectByObjectLabelMapFilter::max(); - m_InputFilter = ITK_NULLPTR; - m_OutputFilter = ITK_NULLPTR; + m_InputFilter = nullptr; + m_OutputFilter = nullptr; m_Select = SelectType::New(); @@ -80,7 +80,7 @@ ObjectByObjectLabelMapFilter( filter ); - if( outputFilter == ITK_NULLPTR && filter != ITK_NULLPTR ) + if( outputFilter == nullptr && filter != nullptr ) { // TODO: can it be replaced by a concept check ? itkExceptionMacro("Wrong output filter type. Use SetOutputFilter() and SetInputFilter() instead of SetFilter() when input and output filter types are different."); diff --git a/Modules/Filtering/LabelMap/include/itkPadLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkPadLabelMapFilter.h index 18d0a674271..903d81269e4 100644 --- a/Modules/Filtering/LabelMap/include/itkPadLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkPadLabelMapFilter.h @@ -112,11 +112,11 @@ class ITK_TEMPLATE_EXPORT PadLabelMapFilter:public ChangeRegionLabelMapFilter< T m_LowerBoundaryPadSize.Fill(0); } - ~PadLabelMapFilter() ITK_OVERRIDE {} + ~PadLabelMapFilter() override {} - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PadLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkRegionFromReferenceLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkRegionFromReferenceLabelMapFilter.h index 31e9280b987..0835394ca30 100644 --- a/Modules/Filtering/LabelMap/include/itkRegionFromReferenceLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkRegionFromReferenceLabelMapFilter.h @@ -117,11 +117,11 @@ class ITK_TEMPLATE_EXPORT RegionFromReferenceLabelMapFilter:public ChangeRegionL this->SetNumberOfRequiredInputs(2); } - ~RegionFromReferenceLabelMapFilter() ITK_OVERRIDE {} + ~RegionFromReferenceLabelMapFilter() override {} - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RegionFromReferenceLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkRelabelLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkRelabelLabelMapFilter.h index 27b71361ebd..3a432b453ea 100644 --- a/Modules/Filtering/LabelMap/include/itkRelabelLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkRelabelLabelMapFilter.h @@ -88,7 +88,7 @@ class RelabelLabelMapFilter: { this->SetReverseOrdering( true ); } - ~RelabelLabelMapFilter() ITK_OVERRIDE {} + ~RelabelLabelMapFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(RelabelLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkShapeKeepNObjectsLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkShapeKeepNObjectsLabelMapFilter.h index bcf97579a8e..674c0e38260 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeKeepNObjectsLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkShapeKeepNObjectsLabelMapFilter.h @@ -110,9 +110,9 @@ class ITK_TEMPLATE_EXPORT ShapeKeepNObjectsLabelMapFilter: protected: ShapeKeepNObjectsLabelMapFilter(); - ~ShapeKeepNObjectsLabelMapFilter() ITK_OVERRIDE {} + ~ShapeKeepNObjectsLabelMapFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; template< typename TAttributeAccessor > void TemplatedGenerateData(const TAttributeAccessor &) @@ -171,7 +171,7 @@ class ITK_TEMPLATE_EXPORT ShapeKeepNObjectsLabelMapFilter: } } - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; bool m_ReverseOrdering; diff --git a/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.h index 6e1c165011b..82a898ec6b1 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.h @@ -132,15 +132,15 @@ class ITK_TEMPLATE_EXPORT ShapeLabelMapFilter: protected: ShapeLabelMapFilter(); - ~ShapeLabelMapFilter() ITK_OVERRIDE {} + ~ShapeLabelMapFilter() override {} - virtual void ThreadedProcessLabelObject(LabelObjectType *labelObject) ITK_OVERRIDE; + void ThreadedProcessLabelObject(LabelObjectType *labelObject) override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - virtual void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ShapeLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx index 04a5688933e..30477a19fe3 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx @@ -917,7 +917,7 @@ ShapeLabelMapFilter< TImage, TLabelImage > Superclass::AfterThreadedGenerateData(); // Release the label image - m_LabelImage = ITK_NULLPTR; + m_LabelImage = nullptr; } template< typename TImage, typename TLabelImage > diff --git a/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h b/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h index dd1cf1058ac..6435c2a51a1 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h +++ b/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h @@ -679,7 +679,7 @@ class ShapeLabelObject:public LabelObject< TLabel, VImageDimension > template< typename TSourceLabelObject > void CopyAllFrom(const TSourceLabelObject *src) { - itkAssertOrThrowMacro ( ( src != ITK_NULLPTR ), "Null Pointer" ); + itkAssertOrThrowMacro ( ( src != nullptr ), "Null Pointer" ); this->template CopyLinesFrom( src ); this->template CopyAttributesFrom( src ); } @@ -707,7 +707,7 @@ class ShapeLabelObject:public LabelObject< TLabel, VImageDimension > m_OrientedBoundingBoxOrigin.Fill(0); } - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/LabelMap/include/itkShapeOpeningLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkShapeOpeningLabelMapFilter.h index fe8fedf8351..488d0472e9b 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeOpeningLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkShapeOpeningLabelMapFilter.h @@ -115,9 +115,9 @@ class ITK_TEMPLATE_EXPORT ShapeOpeningLabelMapFilter: protected: ShapeOpeningLabelMapFilter(); - ~ShapeOpeningLabelMapFilter() ITK_OVERRIDE {} + ~ShapeOpeningLabelMapFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; template< typename TAttributeAccessor > void TemplatedGenerateData(const TAttributeAccessor & accessor) @@ -128,7 +128,7 @@ class ITK_TEMPLATE_EXPORT ShapeOpeningLabelMapFilter: ImageType *output = this->GetOutput(); ImageType *output2 = this->GetOutput(1); itkAssertInDebugAndIgnoreInReleaseMacro(this->GetNumberOfIndexedOutputs() == 2); - itkAssertInDebugAndIgnoreInReleaseMacro(output2 != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(output2 != nullptr); // set the background value for the second output - this is not done in the // superclasses @@ -160,7 +160,7 @@ class ITK_TEMPLATE_EXPORT ShapeOpeningLabelMapFilter: } } - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; double m_Lambda; diff --git a/Modules/Filtering/LabelMap/include/itkShapePositionLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkShapePositionLabelMapFilter.h index d966beaca2a..8432a7db4b2 100644 --- a/Modules/Filtering/LabelMap/include/itkShapePositionLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkShapePositionLabelMapFilter.h @@ -90,9 +90,9 @@ class ITK_TEMPLATE_EXPORT ShapePositionLabelMapFilter : protected: ShapePositionLabelMapFilter(); - ~ShapePositionLabelMapFilter() ITK_OVERRIDE {}; + ~ShapePositionLabelMapFilter() override {}; - virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject ) ITK_OVERRIDE; + void ThreadedProcessLabelObject( LabelObjectType * labelObject ) override; template< typename TAttributeAccessor > void TemplatedThreadedProcessLabelObject( const TAttributeAccessor & accessor, bool physical, LabelObjectType * labelObject ) @@ -130,7 +130,7 @@ class ITK_TEMPLATE_EXPORT ShapePositionLabelMapFilter : labelObject->AddIndex( idx ); } - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; AttributeType m_Attribute; diff --git a/Modules/Filtering/LabelMap/include/itkShapeRelabelImageFilter.h b/Modules/Filtering/LabelMap/include/itkShapeRelabelImageFilter.h index 325b20b18b5..c16ffa837e0 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeRelabelImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkShapeRelabelImageFilter.h @@ -129,20 +129,20 @@ class ITK_TEMPLATE_EXPORT ShapeRelabelImageFilter: protected: ShapeRelabelImageFilter(); - ~ShapeRelabelImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ShapeRelabelImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** ShapeRelabelImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** ShapeRelabelImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ShapeRelabelImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkShapeRelabelLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkShapeRelabelLabelMapFilter.h index 980f616ff5f..0ea770dd248 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeRelabelLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkShapeRelabelLabelMapFilter.h @@ -104,9 +104,9 @@ class ITK_TEMPLATE_EXPORT ShapeRelabelLabelMapFilter: protected: ShapeRelabelLabelMapFilter(); - ~ShapeRelabelLabelMapFilter() ITK_OVERRIDE {} + ~ShapeRelabelLabelMapFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; template< typename TAttributeAccessor > void TemplatedGenerateData(const TAttributeAccessor &) @@ -167,7 +167,7 @@ class ITK_TEMPLATE_EXPORT ShapeRelabelLabelMapFilter: } } - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; bool m_ReverseOrdering; diff --git a/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.h index 0229d9dff61..66f806aff06 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkShapeUniqueLabelMapFilter.h @@ -105,9 +105,9 @@ class ITK_TEMPLATE_EXPORT ShapeUniqueLabelMapFilter: protected: ShapeUniqueLabelMapFilter(); - ~ShapeUniqueLabelMapFilter() ITK_OVERRIDE {} + ~ShapeUniqueLabelMapFilter() override {} - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; template< typename TAttributeAccessor > void TemplatedGenerateData(const TAttributeAccessor & accessor) @@ -313,7 +313,7 @@ class ITK_TEMPLATE_EXPORT ShapeUniqueLabelMapFilter: } } - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; AttributeType m_Attribute; diff --git a/Modules/Filtering/LabelMap/include/itkShiftScaleLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkShiftScaleLabelMapFilter.h index d9c9a821f08..cb0b0e8941f 100644 --- a/Modules/Filtering/LabelMap/include/itkShiftScaleLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkShiftScaleLabelMapFilter.h @@ -90,11 +90,11 @@ class ITK_TEMPLATE_EXPORT ShiftScaleLabelMapFilter: protected: ShiftScaleLabelMapFilter(); - ~ShiftScaleLabelMapFilter() ITK_OVERRIDE {} + ~ShiftScaleLabelMapFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; double m_Shift; double m_Scale; diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsKeepNObjectsLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkStatisticsKeepNObjectsLabelMapFilter.h index 6b5f073c2fb..0ec4e2744a3 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsKeepNObjectsLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkStatisticsKeepNObjectsLabelMapFilter.h @@ -87,9 +87,9 @@ class ITK_TEMPLATE_EXPORT StatisticsKeepNObjectsLabelMapFilter: protected: StatisticsKeepNObjectsLabelMapFilter(); - ~StatisticsKeepNObjectsLabelMapFilter() ITK_OVERRIDE {} + ~StatisticsKeepNObjectsLabelMapFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StatisticsKeepNObjectsLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.h index fd0071f46da..0c33d6f367d 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.h @@ -132,13 +132,13 @@ class ITK_TEMPLATE_EXPORT StatisticsLabelMapFilter: protected: StatisticsLabelMapFilter(); - ~StatisticsLabelMapFilter() ITK_OVERRIDE {} + ~StatisticsLabelMapFilter() override {} - virtual void ThreadedProcessLabelObject(LabelObjectType *labelObject) ITK_OVERRIDE; + void ThreadedProcessLabelObject(LabelObjectType *labelObject) override; - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StatisticsLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h b/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h index f526d3006c0..d8bf2ef0cd2 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h +++ b/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h @@ -270,7 +270,7 @@ class StatisticsLabelObject:public ShapeLabelObject< TLabel, VImageDimension > template< typename TSourceLabelObject > void CopyAllFrom(const TSourceLabelObject *src) { - itkAssertOrThrowMacro ( ( src != ITK_NULLPTR ), "Null Pointer" ); + itkAssertOrThrowMacro ( ( src != nullptr ), "Null Pointer" ); this->template CopyLinesFrom( src ); this->template CopyAttributesFrom( src ); } @@ -531,11 +531,11 @@ class StatisticsLabelObject:public ShapeLabelObject< TLabel, VImageDimension > m_Kurtosis = 0; m_Skewness = 0; m_WeightedElongation = 0; - m_Histogram = ITK_NULLPTR; + m_Histogram = nullptr; m_WeightedFlatness = 0; } - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsOpeningLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkStatisticsOpeningLabelMapFilter.h index c755962e3f3..b55debdaeb6 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsOpeningLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkStatisticsOpeningLabelMapFilter.h @@ -86,9 +86,9 @@ class ITK_TEMPLATE_EXPORT StatisticsOpeningLabelMapFilter: protected: StatisticsOpeningLabelMapFilter(); - ~StatisticsOpeningLabelMapFilter() ITK_OVERRIDE {} + ~StatisticsOpeningLabelMapFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StatisticsOpeningLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsPositionLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkStatisticsPositionLabelMapFilter.h index d1e7c20b5c9..af40ea93e48 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsPositionLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkStatisticsPositionLabelMapFilter.h @@ -83,9 +83,9 @@ class ITK_TEMPLATE_EXPORT StatisticsPositionLabelMapFilter : protected: StatisticsPositionLabelMapFilter(); - ~StatisticsPositionLabelMapFilter() ITK_OVERRIDE {}; + ~StatisticsPositionLabelMapFilter() override {}; - virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject ) ITK_OVERRIDE; + void ThreadedProcessLabelObject( LabelObjectType * labelObject ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StatisticsPositionLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsRelabelImageFilter.h b/Modules/Filtering/LabelMap/include/itkStatisticsRelabelImageFilter.h index 223eae29e71..fadfb4d8faa 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsRelabelImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkStatisticsRelabelImageFilter.h @@ -156,20 +156,20 @@ class ITK_TEMPLATE_EXPORT StatisticsRelabelImageFilter: protected: StatisticsRelabelImageFilter(); - ~StatisticsRelabelImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~StatisticsRelabelImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** StatisticsRelabelImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** StatisticsRelabelImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StatisticsRelabelImageFilter); diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsRelabelLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkStatisticsRelabelLabelMapFilter.h index 390c9cb18dc..c6277556845 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsRelabelLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkStatisticsRelabelLabelMapFilter.h @@ -86,9 +86,9 @@ class ITK_TEMPLATE_EXPORT StatisticsRelabelLabelMapFilter: protected: StatisticsRelabelLabelMapFilter(); - ~StatisticsRelabelLabelMapFilter() ITK_OVERRIDE {} + ~StatisticsRelabelLabelMapFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StatisticsRelabelLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsUniqueLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkStatisticsUniqueLabelMapFilter.h index 20fc3eda82b..6ad99ea0899 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsUniqueLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkStatisticsUniqueLabelMapFilter.h @@ -81,9 +81,9 @@ class ITK_TEMPLATE_EXPORT StatisticsUniqueLabelMapFilter: protected: StatisticsUniqueLabelMapFilter(); - ~StatisticsUniqueLabelMapFilter() ITK_OVERRIDE {} + ~StatisticsUniqueLabelMapFilter() override {} - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StatisticsUniqueLabelMapFilter); diff --git a/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx index 7dc36185686..cf70b5d5e6a 100644 --- a/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkChangeRegionLabelMapFilterTest1.cxx @@ -76,7 +76,7 @@ int itkChangeRegionLabelMapFilterTest1(int argc, char * argv[]) TRY_EXPECT_NO_EXCEPTION( writer->Update() ); - change->SetInput( ITK_NULLPTR ); + change->SetInput( nullptr ); TRY_EXPECT_EXCEPTION( change->Update() ); return EXIT_SUCCESS; diff --git a/Modules/Filtering/LabelMap/test/itkLabelMapFilterTest.cxx b/Modules/Filtering/LabelMap/test/itkLabelMapFilterTest.cxx index e9630d1d058..555e2a6f72c 100644 --- a/Modules/Filtering/LabelMap/test/itkLabelMapFilterTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkLabelMapFilterTest.cxx @@ -70,7 +70,7 @@ int itkLabelMapFilterTest(int argc, char * argv[]) LabelMapFilterType::Pointer conversion = LabelMapFilterType::New(); conversion->SetInput( map ); conversion->GenerateInputRequestedRegion(); - conversion->EnlargeOutputRequestedRegion( ITK_NULLPTR ); + conversion->EnlargeOutputRequestedRegion( nullptr ); conversion->Update(); RegionType region; diff --git a/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx b/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx index fd15e7c420e..0218a9c0cf5 100644 --- a/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx +++ b/Modules/Filtering/LabelMap/test/itkPadLabelMapFilterTest1.cxx @@ -101,7 +101,7 @@ int itkPadLabelMapFilterTest1(int argc, char * argv[]) TRY_EXPECT_NO_EXCEPTION( writer->Update() ); - l2i->SetInput( ITK_NULLPTR ); + l2i->SetInput( nullptr ); TRY_EXPECT_EXCEPTION( l2i->Update() ); return EXIT_SUCCESS; diff --git a/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx b/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx index d690bb99646..4dbccb516f5 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx @@ -32,11 +32,11 @@ class ShapeLabelMapFixture { public: ShapeLabelMapFixture() {} - ~ShapeLabelMapFixture() {} + ~ShapeLabelMapFixture() override {} protected: - void SetUp() {} - void TearDown() {} + void SetUp() override {} + void TearDown() override {} template struct FixtureUtilities diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorCloseImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkAnchorCloseImageFilter.h index 4e64ec164ea..75c4e9a45e1 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorCloseImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorCloseImageFilter.h @@ -46,7 +46,7 @@ class AnchorCloseImageFilter: this->m_Boundary1 = NumericTraits< typename TImage::PixelType >::NonpositiveMin(); this->m_Boundary2 = NumericTraits< typename TImage::PixelType >::max(); } - virtual ~AnchorCloseImageFilter() ITK_OVERRIDE {} + ~AnchorCloseImageFilter() override {} private: diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkAnchorDilateImageFilter.h index 1cfe14ebd8e..27160b93c6e 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorDilateImageFilter.h @@ -51,7 +51,7 @@ class AnchorDilateImageFilter: { this->m_Boundary = NumericTraits< PixelType >::NonpositiveMin(); } - virtual ~AnchorDilateImageFilter() ITK_OVERRIDE {} + ~AnchorDilateImageFilter() override {} private: diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateImageFilter.h index fc7ffa89361..55c696dfcbc 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeDilateImageFilter.h @@ -79,12 +79,12 @@ class ITK_TEMPLATE_EXPORT AnchorErodeDilateImageFilter: protected: AnchorErodeDilateImageFilter(); - ~AnchorErodeDilateImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~AnchorErodeDilateImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const InputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; // should be set by the meta filter InputImagePixelType m_Boundary; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeImageFilter.h index face42961eb..56f981d0cc9 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorErodeImageFilter.h @@ -50,7 +50,7 @@ class AnchorErodeImageFilter: { this->m_Boundary = NumericTraits< PixelType >::max(); } - virtual ~AnchorErodeImageFilter() ITK_OVERRIDE {} + ~AnchorErodeImageFilter() override {} private: diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.h index 49527c9b88e..d5cca21db2e 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenCloseImageFilter.h @@ -85,12 +85,12 @@ class ITK_TEMPLATE_EXPORT AnchorOpenCloseImageFilter: protected: AnchorOpenCloseImageFilter(); - ~AnchorOpenCloseImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~AnchorOpenCloseImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const InputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; InputImagePixelType m_Boundary1; InputImagePixelType m_Boundary2; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenImageFilter.h index ceb1bd4825c..39a425192ac 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkAnchorOpenImageFilter.h @@ -45,7 +45,7 @@ class AnchorOpenImageFilter: this->m_Boundary1 = NumericTraits< typename TImage::PixelType >::max(); this->m_Boundary2 = NumericTraits< typename TImage::PixelType >::NonpositiveMin(); } - virtual ~AnchorOpenImageFilter() ITK_OVERRIDE {} + ~AnchorOpenImageFilter() override {} private: diff --git a/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.h index e6c27980a8f..f3ab3af1062 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkBasicDilateImageFilter.h @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT BasicDilateImageFilter: protected: BasicDilateImageFilter(); - ~BasicDilateImageFilter() ITK_OVERRIDE {} + ~BasicDilateImageFilter() override {} /** Evaluate image neighborhood with kernel to find the new value * for the center pixel value @@ -115,7 +115,7 @@ class ITK_TEMPLATE_EXPORT BasicDilateImageFilter: * Evaluate is used for non-boundary pixels. */ PixelType Evaluate(const NeighborhoodIteratorType & nit, const KernelIteratorType kernelBegin, - const KernelIteratorType kernelEnd) ITK_OVERRIDE; + const KernelIteratorType kernelEnd) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BasicDilateImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkBasicErodeImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkBasicErodeImageFilter.h index 179647d661e..9abb4c5f5b5 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkBasicErodeImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkBasicErodeImageFilter.h @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT BasicErodeImageFilter: protected: BasicErodeImageFilter(); - ~BasicErodeImageFilter() ITK_OVERRIDE {} + ~BasicErodeImageFilter() override {} /** Evaluate image neighborhood with kernel to find the new value * for the center pixel value. @@ -111,9 +111,9 @@ class ITK_TEMPLATE_EXPORT BasicErodeImageFilter: * It will return the minimum value of the image pixels whose corresponding * element in the structuring element is positive. This version of * Evaluate is used for non-boundary pixels. */ - virtual PixelType Evaluate(const NeighborhoodIteratorType & nit, + PixelType Evaluate(const NeighborhoodIteratorType & nit, const KernelIteratorType kernelBegin, - const KernelIteratorType kernelEnd) ITK_OVERRIDE; + const KernelIteratorType kernelEnd) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BasicErodeImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkBinaryBallStructuringElement.h b/Modules/Filtering/MathematicalMorphology/include/itkBinaryBallStructuringElement.h index 0a44279d1d0..9e71619f264 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkBinaryBallStructuringElement.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkBinaryBallStructuringElement.h @@ -97,7 +97,7 @@ class ITK_TEMPLATE_EXPORT BinaryBallStructuringElement: BinaryBallStructuringElement() {} /** Default destructor. */ - virtual ~BinaryBallStructuringElement() {} + ~BinaryBallStructuringElement() override {} /** Copy constructor. */ BinaryBallStructuringElement(const Self & other): diff --git a/Modules/Filtering/MathematicalMorphology/include/itkBinaryCrossStructuringElement.h b/Modules/Filtering/MathematicalMorphology/include/itkBinaryCrossStructuringElement.h index f5549d264ab..727892879b6 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkBinaryCrossStructuringElement.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkBinaryCrossStructuringElement.h @@ -97,7 +97,7 @@ class ITK_TEMPLATE_EXPORT BinaryCrossStructuringElement: } /** Default destructor. */ - virtual ~BinaryCrossStructuringElement() {} + ~BinaryCrossStructuringElement() override {} /** Copy constructor. */ BinaryCrossStructuringElement(const Self & other): diff --git a/Modules/Filtering/MathematicalMorphology/include/itkBlackTopHatImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkBlackTopHatImageFilter.h index 3edc214233d..2421d6092b2 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkBlackTopHatImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkBlackTopHatImageFilter.h @@ -101,10 +101,10 @@ class ITK_TEMPLATE_EXPORT BlackTopHatImageFilter: protected: BlackTopHatImageFilter(); - ~BlackTopHatImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BlackTopHatImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BlackTopHatImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.h index e0a6585a69a..63ee07d3fc6 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.h @@ -121,18 +121,18 @@ class ITK_TEMPLATE_EXPORT ClosingByReconstructionImageFilter: protected: ClosingByReconstructionImageFilter(); - ~ClosingByReconstructionImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ClosingByReconstructionImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** ClosingByReconstructionImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** ClosingByReconstructionImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ClosingByReconstructionImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkDoubleThresholdImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkDoubleThresholdImageFilter.h index fcdac898a2b..cc6f7597361 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkDoubleThresholdImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkDoubleThresholdImageFilter.h @@ -130,21 +130,21 @@ class ITK_TEMPLATE_EXPORT DoubleThresholdImageFilter: protected: DoubleThresholdImageFilter(); - virtual ~DoubleThresholdImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DoubleThresholdImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** DoubleThresholdImageFilter needs all of the input. So it must * provide an implementation of GenerateInputRequestedRegion() */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** DoubleThresholdImageFilter produces all of the output and must * provide an implementation of EnlargeOutputRequestedRegion() */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single threaded version of * GenerateData(). DoubleThresholdImageFilter delegates its * implementation to the GrayscaleGeodesicDilateImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DoubleThresholdImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.h b/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.h index 64d3b51a8be..9178c6836b2 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.h @@ -122,7 +122,7 @@ class ITK_TEMPLATE_EXPORT FlatStructuringElement:public Neighborhood< bool, VDim typedef typename itk::Image< PixelType, VDimension > ImageType; /** Default destructor. */ - virtual ~FlatStructuringElement() ITK_OVERRIDE {} + ~FlatStructuringElement() override {} /** Default constructor. */ FlatStructuringElement() @@ -211,7 +211,7 @@ class ITK_TEMPLATE_EXPORT FlatStructuringElement:public Neighborhood< bool, VDim protected: - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: bool m_Decomposable; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.h index d3d86d34a58..0d0603f2451 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedClosingImageFilter.h @@ -105,20 +105,20 @@ class ITK_TEMPLATE_EXPORT GrayscaleConnectedClosingImageFilter: protected: GrayscaleConnectedClosingImageFilter(); - ~GrayscaleConnectedClosingImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GrayscaleConnectedClosingImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** GrayscaleConnectedClosingImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** GrayscaleConnectedClosingImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicDilateImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleConnectedClosingImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.h index e47e687c560..1b04acf34c5 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleConnectedOpeningImageFilter.h @@ -106,20 +106,20 @@ class ITK_TEMPLATE_EXPORT GrayscaleConnectedOpeningImageFilter: protected: GrayscaleConnectedOpeningImageFilter(); - ~GrayscaleConnectedOpeningImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GrayscaleConnectedOpeningImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** GrayscaleConnectedOpeningImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** GrayscaleConnectedOpeningImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicDilateImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleConnectedOpeningImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.h index f53b49a5a08..511249f17e9 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.h @@ -104,7 +104,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleDilateImageFilter: // KernelSuperclass; /** Set kernel (structuring element). */ - void SetKernel(const KernelType & kernel) ITK_OVERRIDE; + void SetKernel(const KernelType & kernel) override; /** Set/Get the boundary value. */ void SetBoundary(const PixelType value); @@ -117,7 +117,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleDilateImageFilter: itkGetConstMacro(Algorithm, int); /** GrayscaleDilateImageFilter need to set its internal filters as modified */ - virtual void Modified() const ITK_OVERRIDE; + void Modified() const override; /** define values used to determine which algorithm to use */ enum AlgorithmType { @@ -127,14 +127,14 @@ class ITK_TEMPLATE_EXPORT GrayscaleDilateImageFilter: VHGW = 3 }; - void SetNumberOfThreads(ThreadIdType nb) ITK_OVERRIDE; + void SetNumberOfThreads(ThreadIdType nb) override; protected: GrayscaleDilateImageFilter(); - ~GrayscaleDilateImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GrayscaleDilateImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleDilateImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx index c462deb751e..07c38722cb9 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx @@ -57,7 +57,7 @@ GrayscaleDilateImageFilter< TInputImage, TOutputImage, TKernel > { const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &kernel ); - if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() ) + if ( flatKernel != nullptr && flatKernel->GetDecomposable() ) { m_AnchorFilter->SetKernel(*flatKernel); m_Algorithm = ANCHOR; @@ -124,11 +124,11 @@ GrayscaleDilateImageFilter< TInputImage, TOutputImage, TKernel > { m_HistogramFilter->SetKernel( this->GetKernel() ); } - else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == ANCHOR ) + else if ( flatKernel != nullptr && flatKernel->GetDecomposable() && algo == ANCHOR ) { m_AnchorFilter->SetKernel(*flatKernel); } - else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == VHGW ) + else if ( flatKernel != nullptr && flatKernel->GetDecomposable() && algo == VHGW ) { m_VHGWFilter->SetKernel(*flatKernel); } diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.h index f146d2e2436..309fada5530 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.h @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleErodeImageFilter: // KernelSuperclass; /** Set kernel (structuring element). */ - void SetKernel(const KernelType & kernel) ITK_OVERRIDE; + void SetKernel(const KernelType & kernel) override; /** Set/Get the boundary value. */ void SetBoundary(const PixelType value); @@ -125,16 +125,16 @@ class ITK_TEMPLATE_EXPORT GrayscaleErodeImageFilter: itkGetConstMacro(Algorithm, int); /** GrayscaleErodeImageFilter need to set its internal filters as modified */ - virtual void Modified() const ITK_OVERRIDE; + void Modified() const override; - void SetNumberOfThreads(ThreadIdType nb) ITK_OVERRIDE; + void SetNumberOfThreads(ThreadIdType nb) override; protected: GrayscaleErodeImageFilter(); - ~GrayscaleErodeImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GrayscaleErodeImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleErodeImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx index 2d154971736..0beb7cebf05 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx @@ -57,7 +57,7 @@ GrayscaleErodeImageFilter< TInputImage, TOutputImage, TKernel > { const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &kernel ); - if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() ) + if ( flatKernel != nullptr && flatKernel->GetDecomposable() ) { m_AnchorFilter->SetKernel(*flatKernel); m_Algorithm = ANCHOR; @@ -124,11 +124,11 @@ GrayscaleErodeImageFilter< TInputImage, TOutputImage, TKernel > { m_HistogramFilter->SetKernel( this->GetKernel() ); } - else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == ANCHOR ) + else if ( flatKernel != nullptr && flatKernel->GetDecomposable() && algo == ANCHOR ) { m_AnchorFilter->SetKernel(*flatKernel); } - else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == VHGW ) + else if ( flatKernel != nullptr && flatKernel->GetDecomposable() && algo == VHGW ) { m_VHGWFilter->SetKernel(*flatKernel); } diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFillholeImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFillholeImageFilter.h index f7d17b05ce2..9d0b15e5a2d 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFillholeImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFillholeImageFilter.h @@ -107,20 +107,20 @@ class ITK_TEMPLATE_EXPORT GrayscaleFillholeImageFilter: protected: GrayscaleFillholeImageFilter(); - ~GrayscaleFillholeImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GrayscaleFillholeImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** GrayscaleFillholeImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** GrayscaleFillholeImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to ReconstructionByErosionImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleFillholeImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.h index 6a427aea825..dcdd606d12a 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionDilateImageFilter.h @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleFunctionDilateImageFilter: protected: GrayscaleFunctionDilateImageFilter(); - ~GrayscaleFunctionDilateImageFilter() ITK_OVERRIDE {} + ~GrayscaleFunctionDilateImageFilter() override {} /** Evaluate image neighborhood with kernel to find the new value * for the center pixel value @@ -122,7 +122,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleFunctionDilateImageFilter: * for non-boundary pixels. */ PixelType Evaluate(const NeighborhoodIteratorType & nit, const KernelIteratorType kernelBegin, - const KernelIteratorType kernelEnd) ITK_OVERRIDE; + const KernelIteratorType kernelEnd) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleFunctionDilateImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.h index 80cbf20bc7e..f7fae6d8518 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleFunctionErodeImageFilter.h @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleFunctionErodeImageFilter: protected: GrayscaleFunctionErodeImageFilter(); - ~GrayscaleFunctionErodeImageFilter() ITK_OVERRIDE {} + ~GrayscaleFunctionErodeImageFilter() override {} /** Evaluate image neighborhood with kernel to find the new value * for the center pixel value @@ -122,7 +122,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleFunctionErodeImageFilter: * for non-boundary pixels. */ PixelType Evaluate(const NeighborhoodIteratorType & nit, const KernelIteratorType kernelBegin, - const KernelIteratorType kernelEnd) ITK_OVERRIDE; + const KernelIteratorType kernelEnd) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleFunctionErodeImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.h index 416174c3caf..9c7a8f23795 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.h @@ -151,8 +151,8 @@ class ITK_TEMPLATE_EXPORT GrayscaleGeodesicDilateImageFilter: protected: GrayscaleGeodesicDilateImageFilter(); - ~GrayscaleGeodesicDilateImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GrayscaleGeodesicDilateImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** GrayscaleGeodesicDilateImageFilter needs to request enough of the * marker image to account for the elementary structuring element. @@ -160,13 +160,13 @@ class ITK_TEMPLATE_EXPORT GrayscaleGeodesicDilateImageFilter: * the filter is configured to run a single iteration or until * convergence, this method may request all of the marker and mask * image be provided. */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This filter will enlarge the output requested region to produce * all of the output if the filter is configured to run to * convergence. * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This version is used * when the filter is configured to run to convergence. This method @@ -174,7 +174,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleGeodesicDilateImageFilter: * configured to run a single iteration. Otherwise, it will * delegate to a separate instance to run each iteration until the * filter converges. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Multi-thread version GenerateData. This version is used when the * filter is configured to run a single iteration. When the filter @@ -182,7 +182,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleGeodesicDilateImageFilter: * called. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleGeodesicDilateImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.h index 743ea625238..aa60658c920 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.h @@ -152,8 +152,8 @@ class ITK_TEMPLATE_EXPORT GrayscaleGeodesicErodeImageFilter: protected: GrayscaleGeodesicErodeImageFilter(); - ~GrayscaleGeodesicErodeImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GrayscaleGeodesicErodeImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** GrayscaleGeodesicErodeImageFilter needs to request enough of the * marker image to account for the elementary structuring element. @@ -161,13 +161,13 @@ class ITK_TEMPLATE_EXPORT GrayscaleGeodesicErodeImageFilter: * the filter is configured to run a single iteration or until * convergence, this method may request all of the marker and mask * image be provided. */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This filter will enlarge the output requested region to produce * all of the output if the filter is configured to run to * convergence. * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This version is used * when the filter is configured to run to convergence. This method @@ -175,7 +175,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleGeodesicErodeImageFilter: * configured to run a single iteration. Otherwise, it will * delegate to a separate instance to run each iteration until the * filter converges. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Multi-thread version GenerateData. This version is used when the * filter is configured to run a single iteration. When the filter @@ -183,7 +183,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleGeodesicErodeImageFilter: * called. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleGeodesicErodeImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGrindPeakImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGrindPeakImageFilter.h index 0180a393f1b..31b0569dd6a 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGrindPeakImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGrindPeakImageFilter.h @@ -121,20 +121,20 @@ class ITK_TEMPLATE_EXPORT GrayscaleGrindPeakImageFilter: protected: GrayscaleGrindPeakImageFilter(); - ~GrayscaleGrindPeakImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GrayscaleGrindPeakImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** GrayscaleGrindPeakImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** GrayscaleGrindPeakImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicDilateImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleGrindPeakImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.h index be0a8348486..36fd56d0ad3 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.h @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleMorphologicalClosingImageFilter: // KernelSuperclass; /** Set kernel (structuring element). */ - void SetKernel(const KernelType & kernel) ITK_OVERRIDE; + void SetKernel(const KernelType & kernel) override; /** Set/Get the backend filter class. */ void SetAlgorithm(int algo); @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleMorphologicalClosingImageFilter: /** GrayscaleMorphologicalClosingImageFilter need to set its internal filters as modified */ - virtual void Modified() const ITK_OVERRIDE; + void Modified() const override; /** A safe border is added to input image to avoid borders effects * and remove it once the closing is done */ @@ -130,10 +130,10 @@ class ITK_TEMPLATE_EXPORT GrayscaleMorphologicalClosingImageFilter: protected: GrayscaleMorphologicalClosingImageFilter(); - ~GrayscaleMorphologicalClosingImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GrayscaleMorphologicalClosingImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleMorphologicalClosingImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx index 894388a08ca..8cf9be53448 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx @@ -49,7 +49,7 @@ GrayscaleMorphologicalClosingImageFilter< TInputImage, TOutputImage, TKernel > { const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &kernel ); - if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() ) + if ( flatKernel != nullptr && flatKernel->GetDecomposable() ) { m_AnchorFilter->SetKernel(*flatKernel); m_Algorithm = ANCHOR; @@ -107,11 +107,11 @@ GrayscaleMorphologicalClosingImageFilter< TInputImage, TOutputImage, TKernel > m_HistogramErodeFilter->SetKernel( this->GetKernel() ); m_HistogramDilateFilter->SetKernel( this->GetKernel() ); } - else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == ANCHOR ) + else if ( flatKernel != nullptr && flatKernel->GetDecomposable() && algo == ANCHOR ) { m_AnchorFilter->SetKernel(*flatKernel); } - else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == VHGW ) + else if ( flatKernel != nullptr && flatKernel->GetDecomposable() && algo == VHGW ) { m_VanHerkGilWermanDilateFilter->SetKernel(*flatKernel); m_VanHerkGilWermanErodeFilter->SetKernel(*flatKernel); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.h index bafae082659..2c25636aa5f 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.h @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleMorphologicalOpeningImageFilter: // KernelSuperclass; /** Set kernel (structuring element). */ - void SetKernel(const KernelType & kernel) ITK_OVERRIDE; + void SetKernel(const KernelType & kernel) override; /** Set/Get the backend filter class. */ void SetAlgorithm(int algo); @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT GrayscaleMorphologicalOpeningImageFilter: /** GrayscaleMorphologicalOpeningImageFilter need to set its internal filters as modified */ - virtual void Modified() const ITK_OVERRIDE; + void Modified() const override; /** define values used to determine which algorithm to use */ enum AlgorithmType { @@ -130,10 +130,10 @@ class ITK_TEMPLATE_EXPORT GrayscaleMorphologicalOpeningImageFilter: protected: GrayscaleMorphologicalOpeningImageFilter(); - ~GrayscaleMorphologicalOpeningImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GrayscaleMorphologicalOpeningImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleMorphologicalOpeningImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx index 9e41dfa308f..09b904ca951 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx @@ -49,7 +49,7 @@ GrayscaleMorphologicalOpeningImageFilter< TInputImage, TOutputImage, TKernel > { const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &kernel ); - if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() ) + if ( flatKernel != nullptr && flatKernel->GetDecomposable() ) { m_AnchorFilter->SetKernel(*flatKernel); m_Algorithm = ANCHOR; @@ -107,11 +107,11 @@ GrayscaleMorphologicalOpeningImageFilter< TInputImage, TOutputImage, TKernel > m_HistogramDilateFilter->SetKernel( this->GetKernel() ); m_HistogramErodeFilter->SetKernel( this->GetKernel() ); } - else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == ANCHOR ) + else if ( flatKernel != nullptr && flatKernel->GetDecomposable() && algo == ANCHOR ) { m_AnchorFilter->SetKernel(*flatKernel); } - else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == VHGW ) + else if ( flatKernel != nullptr && flatKernel->GetDecomposable() && algo == VHGW ) { m_VanHerkGilWermanDilateFilter->SetKernel(*flatKernel); m_VanHerkGilWermanErodeFilter->SetKernel(*flatKernel); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkHConcaveImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkHConcaveImageFilter.h index 02d1116eb16..8b05867c0ce 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkHConcaveImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkHConcaveImageFilter.h @@ -107,20 +107,20 @@ class ITK_TEMPLATE_EXPORT HConcaveImageFilter: protected: HConcaveImageFilter(); - ~HConcaveImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HConcaveImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** HConcaveImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** HConcaveImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HConcaveImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkHConvexImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkHConvexImageFilter.h index 7284f9b71a5..ed419bfb7c3 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkHConvexImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkHConvexImageFilter.h @@ -107,20 +107,20 @@ class ITK_TEMPLATE_EXPORT HConvexImageFilter: protected: HConvexImageFilter(); - ~HConvexImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HConvexImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** HConvexImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** HConvexImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HConvexImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkHMaximaImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkHMaximaImageFilter.h index ca2670be3d9..b7e6fcaa6b1 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkHMaximaImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkHMaximaImageFilter.h @@ -119,19 +119,19 @@ class ITK_TEMPLATE_EXPORT HMaximaImageFilter: protected: HMaximaImageFilter(); - ~HMaximaImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HMaximaImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** HMaximaImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** HMaximaImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HMaximaImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkHMinimaImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkHMinimaImageFilter.h index 20f888638e6..e52bfb2007e 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkHMinimaImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkHMinimaImageFilter.h @@ -117,20 +117,20 @@ class ITK_TEMPLATE_EXPORT HMinimaImageFilter: protected: HMinimaImageFilter(); - ~HMinimaImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HMinimaImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** HMinimaImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** HMinimaImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HMinimaImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.h index a7c35fbdbe9..47ddef93785 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.h @@ -118,11 +118,11 @@ class ITK_TEMPLATE_EXPORT MaskedMovingHistogramImageFilter: /** Get the modified mask image */ MaskImageType * GetOutputMask(); - void AllocateOutputs() ITK_OVERRIDE; + void AllocateOutputs() override; typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) override; itkSetMacro(FillValue, OutputPixelType); itkGetConstMacro(FillValue, OutputPixelType); @@ -143,14 +143,14 @@ class ITK_TEMPLATE_EXPORT MaskedMovingHistogramImageFilter: protected: MaskedMovingHistogramImageFilter(); - ~MaskedMovingHistogramImageFilter() ITK_OVERRIDE {} + ~MaskedMovingHistogramImageFilter() override {} /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void pushHistogram(HistogramType & histogram, const OffsetListType *addedList, diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.hxx index 2dd2b76c8c0..e1f19987a56 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.hxx @@ -69,7 +69,7 @@ MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel else { this->SetNumberOfRequiredOutputs(1); - this->SetNthOutput(1, ITK_NULLPTR); + this->SetNthOutput(1, nullptr); } } } diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMaskedRankImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkMaskedRankImageFilter.h index fcabad5ad61..449539b0414 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMaskedRankImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMaskedRankImageFilter.h @@ -120,11 +120,11 @@ class ITK_TEMPLATE_EXPORT MaskedRankImageFilter: protected: MaskedRankImageFilter(); - ~MaskedRankImageFilter() ITK_OVERRIDE {} + ~MaskedRankImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void ConfigureHistogram( HistogramType & histogram ) ITK_OVERRIDE; + void ConfigureHistogram( HistogramType & histogram ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MaskedRankImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.h index 0453cd89606..6a3d63470e9 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.h @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT MorphologicalGradientImageFilter: // KernelSuperclass; /** Set kernel (structuring element). */ - void SetKernel(const KernelType & kernel) ITK_OVERRIDE; + void SetKernel(const KernelType & kernel) override; /** Set/Get the backend filter class. */ void SetAlgorithm(int algo); @@ -114,7 +114,7 @@ class ITK_TEMPLATE_EXPORT MorphologicalGradientImageFilter: /** MorphologicalGradientImageFilter need to set its internal filters as modified */ - virtual void Modified() const ITK_OVERRIDE; + void Modified() const override; /** define values used to determine which algorithm to use */ enum AlgorithmType { @@ -126,10 +126,10 @@ class ITK_TEMPLATE_EXPORT MorphologicalGradientImageFilter: protected: MorphologicalGradientImageFilter(); - ~MorphologicalGradientImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MorphologicalGradientImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MorphologicalGradientImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx index 9c28ddda125..847c4de995b 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx @@ -46,7 +46,7 @@ MorphologicalGradientImageFilter< TInputImage, TOutputImage, TKernel > { const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &kernel ); - if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() ) + if ( flatKernel != nullptr && flatKernel->GetDecomposable() ) { m_AnchorDilateFilter->SetKernel(*flatKernel); m_AnchorErodeFilter->SetKernel(*flatKernel); @@ -102,12 +102,12 @@ MorphologicalGradientImageFilter< TInputImage, TOutputImage, TKernel > { m_HistogramFilter->SetKernel( this->GetKernel() ); } - else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == ANCHOR ) + else if ( flatKernel != nullptr && flatKernel->GetDecomposable() && algo == ANCHOR ) { m_AnchorDilateFilter->SetKernel(*flatKernel); m_AnchorErodeFilter->SetKernel(*flatKernel); } - else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == VHGW ) + else if ( flatKernel != nullptr && flatKernel->GetDecomposable() && algo == VHGW ) { m_VanHerkGilWermanDilateFilter->SetKernel(*flatKernel); m_VanHerkGilWermanErodeFilter->SetKernel(*flatKernel); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMorphologyImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkMorphologyImageFilter.h index 2bb47f923e1..674ae7958a0 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMorphologyImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMorphologyImageFilter.h @@ -133,13 +133,13 @@ class ITK_TEMPLATE_EXPORT MorphologyImageFilter: protected: MorphologyImageFilter(); - ~MorphologyImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MorphologyImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** Evaluate image neighborhood with kernel to find the new value * for the center pixel value. */ diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramDilateImageFilter.h index 98ac0c5b02b..67f589ae36a 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramDilateImageFilter.h @@ -86,7 +86,7 @@ class MovingHistogramDilateImageFilter: this->m_Boundary = NumericTraits< PixelType >::NonpositiveMin(); } - ~MovingHistogramDilateImageFilter() ITK_OVERRIDE {} + ~MovingHistogramDilateImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MovingHistogramDilateImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramErodeImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramErodeImageFilter.h index d887312cf0d..f0c3bdf2a48 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramErodeImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramErodeImageFilter.h @@ -85,7 +85,7 @@ class MovingHistogramErodeImageFilter: this->m_Boundary = NumericTraits< PixelType >::max(); } - ~MovingHistogramErodeImageFilter() ITK_OVERRIDE {} + ~MovingHistogramErodeImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MovingHistogramErodeImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h index d6f75194e64..0d27c958f77 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologicalGradientImageFilter.h @@ -267,7 +267,7 @@ class MovingHistogramMorphologicalGradientImageFilter: protected: MovingHistogramMorphologicalGradientImageFilter() {} - ~MovingHistogramMorphologicalGradientImageFilter() ITK_OVERRIDE {} + ~MovingHistogramMorphologicalGradientImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MovingHistogramMorphologicalGradientImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologyImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologyImageFilter.h index 7969a6c452a..fb90fccad63 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologyImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramMorphologyImageFilter.h @@ -98,8 +98,8 @@ class ITK_TEMPLATE_EXPORT MovingHistogramMorphologyImageFilter: protected: MovingHistogramMorphologyImageFilter(); - ~MovingHistogramMorphologyImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MovingHistogramMorphologyImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Multi-thread version GenerateData. */ // void ThreadedGenerateData (const OutputImageRegionType& @@ -108,7 +108,7 @@ class ITK_TEMPLATE_EXPORT MovingHistogramMorphologyImageFilter: /** Configure the histogram. * Used by this class to pass the boundary value to the histogram object. */ - virtual void ConfigureHistogram(THistogram & histogram) ITK_OVERRIDE; + void ConfigureHistogram(THistogram & histogram) override; PixelType m_Boundary; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.h index ce83402f6c9..f871843961b 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkOpeningByReconstructionImageFilter.h @@ -123,18 +123,18 @@ class ITK_TEMPLATE_EXPORT OpeningByReconstructionImageFilter: protected: OpeningByReconstructionImageFilter(); - ~OpeningByReconstructionImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~OpeningByReconstructionImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** OpeningByReconstructionImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** OpeningByReconstructionImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(OpeningByReconstructionImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkRankImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkRankImageFilter.h index 3c94a5833ce..80d8ab01cf7 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkRankImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkRankImageFilter.h @@ -123,11 +123,11 @@ class ITK_TEMPLATE_EXPORT RankImageFilter: protected: RankImageFilter(); - ~RankImageFilter() ITK_OVERRIDE {} + ~RankImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void ConfigureHistogram( HistogramType & histogram ) ITK_OVERRIDE; + void ConfigureHistogram( HistogramType & histogram ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RankImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkReconstructionByDilationImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkReconstructionByDilationImageFilter.h index 8e70876c1d4..f430a7bd1a7 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkReconstructionByDilationImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkReconstructionByDilationImageFilter.h @@ -110,7 +110,7 @@ class ReconstructionByDilationImageFilter: this->m_MarkerValue = NumericTraits< typename TOutputImage::PixelType >::NonpositiveMin(); } - virtual ~ReconstructionByDilationImageFilter() ITK_OVERRIDE {} + ~ReconstructionByDilationImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ReconstructionByDilationImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkReconstructionByErosionImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkReconstructionByErosionImageFilter.h index 1142ff27a03..53949055632 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkReconstructionByErosionImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkReconstructionByErosionImageFilter.h @@ -108,7 +108,7 @@ class ReconstructionByErosionImageFilter: this->m_MarkerValue = NumericTraits< typename TOutputImage::PixelType >::max(); } - virtual ~ReconstructionByErosionImageFilter() ITK_OVERRIDE {} + ~ReconstructionByErosionImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ReconstructionByErosionImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.h index ae6378351b2..30342a19430 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkReconstructionImageFilter.h @@ -138,18 +138,18 @@ class ITK_TEMPLATE_EXPORT ReconstructionImageFilter: protected: ReconstructionImageFilter(); - ~ReconstructionImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ReconstructionImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** ValuedRegionalExtremaImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** ValuedRegionalExtremaImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** * the value of the border - used in boundary condition. diff --git a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.h index c5cd4499b1b..58ddbb2367b 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMaximaImageFilter.h @@ -128,20 +128,20 @@ class ITK_TEMPLATE_EXPORT RegionalMaximaImageFilter: protected: RegionalMaximaImageFilter(); - ~RegionalMaximaImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RegionalMaximaImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** RegionalMaximaImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** RegionalMaximaImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RegionalMaximaImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.h index 52fcc24cc4f..5513dcbd83c 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkRegionalMinimaImageFilter.h @@ -127,20 +127,20 @@ class ITK_TEMPLATE_EXPORT RegionalMinimaImageFilter: protected: RegionalMinimaImageFilter(); - ~RegionalMinimaImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RegionalMinimaImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** RegionalMinimaImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** RegionalMinimaImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RegionalMinimaImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalExtremaImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalExtremaImageFilter.h index fbb83f9992b..bd856d5061e 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalExtremaImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalExtremaImageFilter.h @@ -143,18 +143,18 @@ class ITK_TEMPLATE_EXPORT ValuedRegionalExtremaImageFilter: protected: ValuedRegionalExtremaImageFilter(); - ~ValuedRegionalExtremaImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ValuedRegionalExtremaImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** ValuedRegionalExtremaImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** ValuedRegionalExtremaImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ValuedRegionalExtremaImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalMaximaImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalMaximaImageFilter.h index 087203ea711..0a9c05052d6 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalMaximaImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalMaximaImageFilter.h @@ -99,7 +99,7 @@ class ValuedRegionalMaximaImageFilter: NumericTraits< typename TOutputImage::PixelType >::NonpositiveMin() ); } - virtual ~ValuedRegionalMaximaImageFilter() ITK_OVERRIDE {} + ~ValuedRegionalMaximaImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ValuedRegionalMaximaImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalMinimaImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalMinimaImageFilter.h index 2823bc301af..b11d5abd132 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalMinimaImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkValuedRegionalMinimaImageFilter.h @@ -96,7 +96,7 @@ class ValuedRegionalMinimaImageFilter: this->SetMarkerValue( NumericTraits< typename TOutputImage::PixelType >::max() ); } - virtual ~ValuedRegionalMinimaImageFilter() ITK_OVERRIDE {} + ~ValuedRegionalMinimaImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ValuedRegionalMinimaImageFilter); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanDilateImageFilter.h index 6865d1fa5fb..f913f665170 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanDilateImageFilter.h @@ -62,7 +62,7 @@ class VanHerkGilWermanDilateImageFilter: { this->m_Boundary = NumericTraits< PixelType >::NonpositiveMin(); } - virtual ~VanHerkGilWermanDilateImageFilter() ITK_OVERRIDE {} + ~VanHerkGilWermanDilateImageFilter() override {} private: diff --git a/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanErodeDilateImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanErodeDilateImageFilter.h index 0f4a49f9502..05df287a705 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanErodeDilateImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanErodeDilateImageFilter.h @@ -80,12 +80,12 @@ class ITK_TEMPLATE_EXPORT VanHerkGilWermanErodeDilateImageFilter: protected: VanHerkGilWermanErodeDilateImageFilter(); - ~VanHerkGilWermanErodeDilateImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VanHerkGilWermanErodeDilateImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const InputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; // should be set by the meta filter InputImagePixelType m_Boundary; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanErodeImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanErodeImageFilter.h index 0f5c1d54865..b75e7ae0890 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanErodeImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkVanHerkGilWermanErodeImageFilter.h @@ -63,7 +63,7 @@ class VanHerkGilWermanErodeImageFilter: { this->m_Boundary = NumericTraits< PixelType >::max(); } - virtual ~VanHerkGilWermanErodeImageFilter() ITK_OVERRIDE {} + ~VanHerkGilWermanErodeImageFilter() override {} private: diff --git a/Modules/Filtering/MathematicalMorphology/include/itkWhiteTopHatImageFilter.h b/Modules/Filtering/MathematicalMorphology/include/itkWhiteTopHatImageFilter.h index 0aaec959a77..ef58e5c72ed 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkWhiteTopHatImageFilter.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkWhiteTopHatImageFilter.h @@ -97,10 +97,10 @@ class ITK_TEMPLATE_EXPORT WhiteTopHatImageFilter: protected: WhiteTopHatImageFilter(); - ~WhiteTopHatImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~WhiteTopHatImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(WhiteTopHatImageFilter); diff --git a/Modules/Filtering/Path/include/itkChainCodePath.h b/Modules/Filtering/Path/include/itkChainCodePath.h index 86971e5cdfb..e6331f042af 100644 --- a/Modules/Filtering/Path/include/itkChainCodePath.h +++ b/Modules/Filtering/Path/include/itkChainCodePath.h @@ -78,22 +78,22 @@ class ITK_TEMPLATE_EXPORT ChainCodePath:public // Functions inherited from Path /** Evaluate the chaincode for the offset at the specified path-position. */ - virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE + OutputType Evaluate(const InputType & input) const override { return m_Chain[input]; } /** Like Evaluate(), but returns the index at the specified path-position. */ - virtual IndexType EvaluateToIndex(const InputType & input) const ITK_OVERRIDE; + IndexType EvaluateToIndex(const InputType & input) const override; /** Increment the input variable passed by reference and then return the * offset stored at the new path-position. If the chaincode is unable to be * incremented, input is not changed and an offset of zero is returned, which * may be used to check for the end of the chain code. */ - virtual OffsetType IncrementInput(InputType & input) const ITK_OVERRIDE; + OffsetType IncrementInput(InputType & input) const override; /** Where does the path end (what is the last valid input value)? */ - virtual InputType EndOfInput() const ITK_OVERRIDE + InputType EndOfInput() const override { return static_cast(NumberOfSteps()); // 0 is before the first step, 1 is after it } @@ -133,7 +133,7 @@ class ITK_TEMPLATE_EXPORT ChainCodePath:public } /** Needed for Pipelining */ - virtual void Initialize(void) ITK_OVERRIDE + void Initialize(void) override { m_Start = this->GetZeroIndex(); this->Clear(); @@ -141,8 +141,8 @@ class ITK_TEMPLATE_EXPORT ChainCodePath:public protected: ChainCodePath(); - ~ChainCodePath() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ChainCodePath() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ChainCodePath); diff --git a/Modules/Filtering/Path/include/itkChainCodePath2D.h b/Modules/Filtering/Path/include/itkChainCodePath2D.h index 4a15ca8381d..f9f6c066760 100644 --- a/Modules/Filtering/Path/include/itkChainCodePath2D.h +++ b/Modules/Filtering/Path/include/itkChainCodePath2D.h @@ -82,16 +82,16 @@ class ITK_TEMPLATE_EXPORT ChainCodePath2D:public // Functions inherited from Path /** Evaluate the chaincode for the offset at the specified path-position. */ - virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & input) const override; /** Like Evaluate(), but returns the index at the specified path-position. */ - virtual IndexType EvaluateToIndex(const InputType & input) const ITK_OVERRIDE; + IndexType EvaluateToIndex(const InputType & input) const override; /** Increment the input variable passed by reference and return the offset * stored at the previous path-position. If the chaincode is unable to be * incremented, input is not changed and an offset of zero is returned, which * may be used to check for the end of the chain code. */ - virtual OffsetType IncrementInput(InputType & input) const ITK_OVERRIDE; + OffsetType IncrementInput(InputType & input) const override; // Functions specific to ChainCodePath and its descendents @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT ChainCodePath2D:public itkNewMacro(Self); /** How many steps in the chaincode? */ - virtual ChainCodeSizeType NumberOfSteps() const ITK_OVERRIDE { return m_Chain2D.size(); } + ChainCodeSizeType NumberOfSteps() const override { return m_Chain2D.size(); } /** Insert a new step into the chaincode at a specified position */ inline void InsertStep(InputType position, int encodedStep) @@ -108,7 +108,7 @@ class ITK_TEMPLATE_EXPORT ChainCodePath2D:public this->Modified(); } - virtual void InsertStep(InputType position, OffsetType step) ITK_OVERRIDE + void InsertStep(InputType position, OffsetType step) override { m_Chain2D.insert( m_Chain2D.begin() + position, EncodeOffset(step) ); this->Modified(); @@ -121,14 +121,14 @@ class ITK_TEMPLATE_EXPORT ChainCodePath2D:public this->Modified(); } - virtual void ChangeStep(InputType position, OffsetType step) ITK_OVERRIDE + void ChangeStep(InputType position, OffsetType step) override { m_Chain2D[position] = EncodeOffset(step); this->Modified(); } /** Remove all steps from the chain code */ - virtual void Clear() ITK_OVERRIDE + void Clear() override { m_Chain2D.clear(); this->Modified(); @@ -138,8 +138,8 @@ class ITK_TEMPLATE_EXPORT ChainCodePath2D:public protected: ChainCodePath2D(); - ~ChainCodePath2D() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ChainCodePath2D() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Encode and Decode between an offset and a Freeman code */ inline int EncodeOffset(OffsetType step) const diff --git a/Modules/Filtering/Path/include/itkChainCodeToFourierSeriesPathFilter.h b/Modules/Filtering/Path/include/itkChainCodeToFourierSeriesPathFilter.h index e9fa41f7c36..7a93c270eb3 100644 --- a/Modules/Filtering/Path/include/itkChainCodeToFourierSeriesPathFilter.h +++ b/Modules/Filtering/Path/include/itkChainCodeToFourierSeriesPathFilter.h @@ -78,10 +78,10 @@ class ITK_TEMPLATE_EXPORT ChainCodeToFourierSeriesPathFilter:public protected: ChainCodeToFourierSeriesPathFilter(); - virtual ~ChainCodeToFourierSeriesPathFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ChainCodeToFourierSeriesPathFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ChainCodeToFourierSeriesPathFilter); diff --git a/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.h b/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.h index 60bd670d3e1..68c18550bba 100644 --- a/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.h +++ b/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.h @@ -113,7 +113,7 @@ class ITK_TEMPLATE_EXPORT ExtractOrthogonalSwath2DImageFilter:public // /** Request the largest possible region on all outputs. */ - virtual void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE + void EnlargeOutputRequestedRegion(DataObject *output) override { output->SetRequestedRegionToLargestPossibleRegion(); } @@ -131,24 +131,24 @@ class ITK_TEMPLATE_EXPORT ExtractOrthogonalSwath2DImageFilter:public m_Spacing[0] = m_Spacing[1] = 1.0; } - virtual ~ExtractOrthogonalSwath2DImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ExtractOrthogonalSwath2DImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; //-------------------------------------------------------------------------- // /** GenerateOutputInformation does not rely on input information */ - virtual void GenerateOutputInformation(void) ITK_OVERRIDE; + void GenerateOutputInformation(void) override; /** Request the largest possible region on all inputs. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE + void GenerateInputRequestedRegion() override { Superclass::GenerateInputRequestedRegion(); this->GetNonConstImageInput()->SetRequestedRegionToLargestPossibleRegion(); this->GetNonConstPathInput()->SetRequestedRegionToLargestPossibleRegion(); } - virtual void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; // //-------------------------------------------------------------------------- diff --git a/Modules/Filtering/Path/include/itkFourierSeriesPath.h b/Modules/Filtering/Path/include/itkFourierSeriesPath.h index dc43f5da088..8dc1d72ba75 100644 --- a/Modules/Filtering/Path/include/itkFourierSeriesPath.h +++ b/Modules/Filtering/Path/include/itkFourierSeriesPath.h @@ -83,11 +83,11 @@ class ITK_TEMPLATE_EXPORT FourierSeriesPath:public typedef typename CoefficientsType::Pointer CoefficientsPointer; /** Return the location of the parametric path at the specified location. */ - virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & input) const override; /** Evaluate the first derivative of the ND output with respect to the 1D * input. This is an exact, algebraic function. */ - virtual VectorType EvaluateDerivative(const InputType & input) const ITK_OVERRIDE; + VectorType EvaluateDerivative(const InputType & input) const override; /** Add another harmonic's frequency coefficients. */ void AddHarmonic(const VectorType & CosCoefficients, @@ -105,15 +105,15 @@ class ITK_TEMPLATE_EXPORT FourierSeriesPath:public itkNewMacro(Self); /** Needed for Pipelining */ - virtual void Initialize(void) ITK_OVERRIDE + void Initialize(void) override { this->Clear(); } protected: FourierSeriesPath(); - ~FourierSeriesPath() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FourierSeriesPath() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FourierSeriesPath); diff --git a/Modules/Filtering/Path/include/itkHilbertPath.h b/Modules/Filtering/Path/include/itkHilbertPath.h index d5142661b52..d66baea255f 100644 --- a/Modules/Filtering/Path/include/itkHilbertPath.h +++ b/Modules/Filtering/Path/include/itkHilbertPath.h @@ -85,12 +85,12 @@ class ITK_TEMPLATE_EXPORT HilbertPath // Functions inherited from Path /** Evaluate the hilbert path for the index at the specified path-position. */ - virtual OutputType Evaluate( const PathIndexType & input ) const ITK_OVERRIDE + OutputType Evaluate( const PathIndexType & input ) const override { return this->m_HilbertPath[input]; } - virtual OutputType EvaluateToIndex( const PathIndexType & input ) const ITK_OVERRIDE + OutputType EvaluateToIndex( const PathIndexType & input ) const override { return this->m_HilbertPath[input]; } @@ -102,7 +102,7 @@ class ITK_TEMPLATE_EXPORT HilbertPath } /** Where does the path end (what is the last valid input value)? */ - virtual InputType EndOfInput() const ITK_OVERRIDE + InputType EndOfInput() const override { return static_cast( this->NumberOfSteps() ); // 0 is before the first step, 1 is after it } @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT HilbertPath /** Increment the input variable passed by reference and then return the * index stored at the new path-position. */ - virtual OffsetType IncrementInput( InputType & itkNotUsed( input ) ) const ITK_OVERRIDE + OffsetType IncrementInput( InputType & itkNotUsed( input ) ) const override { itkExceptionMacro( "Not implemented." ); } @@ -129,7 +129,7 @@ class ITK_TEMPLATE_EXPORT HilbertPath } /** Needed for Pipelining */ - virtual void Initialize( void ) ITK_OVERRIDE + void Initialize( void ) override { this->Clear(); this->ConstructHilbertPath(); @@ -149,8 +149,8 @@ class ITK_TEMPLATE_EXPORT HilbertPath protected: HilbertPath(); - ~HilbertPath() ITK_OVERRIDE {} - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + ~HilbertPath() override {} + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HilbertPath); diff --git a/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.h b/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.h index 4e78fdf447e..b4afffb93f4 100644 --- a/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.h +++ b/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.h @@ -89,9 +89,9 @@ class ITK_TEMPLATE_EXPORT ImageAndPathToImageFilter: InputImageType * GetNonConstImageInput(); InputPathType * GetNonConstPathInput(); ImageAndPathToImageFilter(); - virtual ~ImageAndPathToImageFilter() ITK_OVERRIDE {} + ~ImageAndPathToImageFilter() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageAndPathToImageFilter); diff --git a/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx b/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx index bf05163a0c4..67de2e560fb 100644 --- a/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx +++ b/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx @@ -62,7 +62,7 @@ ImageAndPathToImageFilter< TInputImage, TInputPath, TOutputImage > ::GetNonConstImageInput(void) { TInputImage * temp_return=dynamic_cast< TInputImage * >( this->ProcessObject::GetInput(0) ); - if(temp_return == ITK_NULLPTR) + if(temp_return == nullptr) { itkExceptionMacro("Invalid type conversion in GetNonConstImageInput()") } @@ -94,7 +94,7 @@ ImageAndPathToImageFilter< TInputImage, TInputPath, TOutputImage > ::GetNonConstPathInput(void) { TInputPath * temp_return = dynamic_cast< TInputPath * >( this->ProcessObject::GetInput(1) ); - if(temp_return == ITK_NULLPTR) + if(temp_return == nullptr) { itkExceptionMacro("Invalid type conversion in GetNonConstPathInput()") } diff --git a/Modules/Filtering/Path/include/itkImageToPathFilter.h b/Modules/Filtering/Path/include/itkImageToPathFilter.h index 095b18c30eb..fcded34bf2c 100644 --- a/Modules/Filtering/Path/include/itkImageToPathFilter.h +++ b/Modules/Filtering/Path/include/itkImageToPathFilter.h @@ -75,9 +75,9 @@ class ITK_TEMPLATE_EXPORT ImageToPathFilter:public PathSource< TOutputPath > protected: ImageToPathFilter(); - virtual ~ImageToPathFilter(); + ~ImageToPathFilter() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageToPathFilter); diff --git a/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.h b/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.h index a7ce4050fa1..5ec61bf1f3c 100644 --- a/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.h +++ b/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.h @@ -88,10 +88,10 @@ class ITK_TEMPLATE_EXPORT OrthogonalSwath2DPathFilter:public protected: OrthogonalSwath2DPathFilter(); - virtual ~OrthogonalSwath2DPathFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~OrthogonalSwath2DPathFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(OrthogonalSwath2DPathFilter); diff --git a/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx b/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx index f943ba39349..b530fbd8a42 100644 --- a/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx +++ b/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx @@ -37,9 +37,9 @@ OrthogonalSwath2DPathFilter< TParametricPath, TSwathMeritImage > size[0] = 0; size[1] = 0; m_SwathSize = size; - m_StepValues = ITK_NULLPTR; - m_MeritValues = ITK_NULLPTR; - m_OptimumStepsValues = ITK_NULLPTR; + m_StepValues = nullptr; + m_MeritValues = nullptr; + m_OptimumStepsValues = nullptr; m_FinalOffsetValues = OrthogonalCorrectionTableType::New(); } diff --git a/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h b/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h index 37040c292dc..83bec7df684 100644 --- a/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h +++ b/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h @@ -74,7 +74,7 @@ class ITK_TEMPLATE_EXPORT typedef OrthogonalCorrectionTableType::ElementIdentifier OrthogonalCorrectionTableSizeType; /** Return the location of the parametric path at the specified location. */ - virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & input) const override; /** Set pointer to the original path. The path MUST be continuous in its * first derivative to prevent discontinuities in the corrected path. The @@ -91,27 +91,27 @@ class ITK_TEMPLATE_EXPORT itkNewMacro(Self); /** Needed for Pipelining */ - virtual void Initialize(void) ITK_OVERRIDE + void Initialize(void) override { - this->m_OriginalPath = ITK_NULLPTR; - this->m_OrthogonalCorrectionTable = ITK_NULLPTR; + this->m_OriginalPath = nullptr; + this->m_OrthogonalCorrectionTable = nullptr; } /** These are determined by the original path */ - virtual InputType StartOfInput() const ITK_OVERRIDE + InputType StartOfInput() const override { return m_OriginalPath->StartOfInput(); } - virtual InputType EndOfInput() const ITK_OVERRIDE + InputType EndOfInput() const override { return m_OriginalPath->EndOfInput(); } protected: OrthogonallyCorrected2DParametricPath(); - ~OrthogonallyCorrected2DParametricPath() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~OrthogonallyCorrected2DParametricPath() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(OrthogonallyCorrected2DParametricPath); diff --git a/Modules/Filtering/Path/include/itkParametricPath.h b/Modules/Filtering/Path/include/itkParametricPath.h index 7dc0c7c8ca4..cb26910fe91 100644 --- a/Modules/Filtering/Path/include/itkParametricPath.h +++ b/Modules/Filtering/Path/include/itkParametricPath.h @@ -86,7 +86,7 @@ class ITK_TEMPLATE_EXPORT ParametricPath:public /** Return the nearest index to the parametric path at the specified location. * This is a wrapper to Evaluate(). */ - virtual IndexType EvaluateToIndex(const InputType & input) const ITK_OVERRIDE; + IndexType EvaluateToIndex(const InputType & input) const override; /** Increment the input variable passed by reference such that the ND index of * the path moves to its next vertex-connected (8-connected in 2D) neighbor. @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT ParametricPath:public * WARNING: This default implementation REQUIRES that the ND endpoint of * the path be either unique or coincident only with the startpoint, since it * uses the endpoint as a stopping condition. */ - virtual OffsetType IncrementInput(InputType & input) const ITK_OVERRIDE; + OffsetType IncrementInput(InputType & input) const override; /** Evaluate the first derivative of the ND output with respect to the 1D * input. This is a very simple and naive numerical derivative, and it @@ -118,8 +118,8 @@ class ITK_TEMPLATE_EXPORT ParametricPath:public protected: ParametricPath(); - ~ParametricPath() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ParametricPath() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Default 1D input increment amount to trace along the path. Also, the * value used by the defualt implementation of EvaluateDerivative() for diff --git a/Modules/Filtering/Path/include/itkPath.h b/Modules/Filtering/Path/include/itkPath.h index 320f056169f..58c7868380d 100644 --- a/Modules/Filtering/Path/include/itkPath.h +++ b/Modules/Filtering/Path/include/itkPath.h @@ -109,9 +109,9 @@ class ITK_TEMPLATE_EXPORT Path: public DataObject protected: Path(); - ~Path() ITK_OVERRIDE {} + ~Path() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; itkGetConstMacro(ZeroOffset, OffsetType); itkGetConstMacro(ZeroIndex, IndexType); diff --git a/Modules/Filtering/Path/include/itkPathAndImageToPathFilter.h b/Modules/Filtering/Path/include/itkPathAndImageToPathFilter.h index cf3b37c5061..82550cb0b8f 100644 --- a/Modules/Filtering/Path/include/itkPathAndImageToPathFilter.h +++ b/Modules/Filtering/Path/include/itkPathAndImageToPathFilter.h @@ -86,9 +86,9 @@ class ITK_TEMPLATE_EXPORT PathAndImageToPathFilter: protected: PathAndImageToPathFilter(); - virtual ~PathAndImageToPathFilter() ITK_OVERRIDE {} + ~PathAndImageToPathFilter() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** What is the input requested region that is required to produce the output * requested region? Up till and including now, the base assumption is that @@ -97,7 +97,7 @@ class ITK_TEMPLATE_EXPORT PathAndImageToPathFilter: * its first step. * * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PathAndImageToPathFilter); diff --git a/Modules/Filtering/Path/include/itkPathIterator.h b/Modules/Filtering/Path/include/itkPathIterator.h index 8e212904a2e..1670017329b 100644 --- a/Modules/Filtering/Path/include/itkPathIterator.h +++ b/Modules/Filtering/Path/include/itkPathIterator.h @@ -125,7 +125,7 @@ class ITK_TEMPLATE_EXPORT PathIterator:public PathConstIterator< TImage, TPath > PathIterator(ImageType *imagePtr, const PathType *pathPtr); /** Default Destructor. */ - virtual ~PathIterator() ITK_OVERRIDE {} + ~PathIterator() override {} }; } // end namespace itk diff --git a/Modules/Filtering/Path/include/itkPathSource.h b/Modules/Filtering/Path/include/itkPathSource.h index 0973e2eca74..c0b51a051c8 100644 --- a/Modules/Filtering/Path/include/itkPathSource.h +++ b/Modules/Filtering/Path/include/itkPathSource.h @@ -168,12 +168,12 @@ class ITK_TEMPLATE_EXPORT PathSource:public ProcessObject * an implementation of MakeOutput(). */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; protected: PathSource(); - virtual ~PathSource() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PathSource() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; // Inherit the empty ProcessObject::GenerateData() diff --git a/Modules/Filtering/Path/include/itkPathToChainCodePathFilter.h b/Modules/Filtering/Path/include/itkPathToChainCodePathFilter.h index c000740b16b..1e6613a459a 100644 --- a/Modules/Filtering/Path/include/itkPathToChainCodePathFilter.h +++ b/Modules/Filtering/Path/include/itkPathToChainCodePathFilter.h @@ -68,10 +68,10 @@ class ITK_TEMPLATE_EXPORT PathToChainCodePathFilter:public protected: PathToChainCodePathFilter(); - virtual ~PathToChainCodePathFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PathToChainCodePathFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PathToChainCodePathFilter); diff --git a/Modules/Filtering/Path/include/itkPathToImageFilter.h b/Modules/Filtering/Path/include/itkPathToImageFilter.h index 8a582cb978e..71e37272efb 100644 --- a/Modules/Filtering/Path/include/itkPathToImageFilter.h +++ b/Modules/Filtering/Path/include/itkPathToImageFilter.h @@ -105,10 +105,10 @@ class ITK_TEMPLATE_EXPORT PathToImageFilter:public ImageSource< TOutputImage > protected: PathToImageFilter(); - ~PathToImageFilter() ITK_OVERRIDE; + ~PathToImageFilter() override; - virtual void GenerateOutputInformation() ITK_OVERRIDE {} // do nothing - virtual void GenerateData() ITK_OVERRIDE; + void GenerateOutputInformation() override {} // do nothing + void GenerateData() override; SizeType m_Size; double m_Spacing[OutputImageDimension]; @@ -116,7 +116,7 @@ class ITK_TEMPLATE_EXPORT PathToImageFilter:public ImageSource< TOutputImage > ValueType m_PathValue; ValueType m_BackgroundValue; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PathToImageFilter); diff --git a/Modules/Filtering/Path/include/itkPathToPathFilter.h b/Modules/Filtering/Path/include/itkPathToPathFilter.h index 09149bca9a0..37579b91f13 100644 --- a/Modules/Filtering/Path/include/itkPathToPathFilter.h +++ b/Modules/Filtering/Path/include/itkPathToPathFilter.h @@ -66,9 +66,9 @@ class ITK_TEMPLATE_EXPORT PathToPathFilter:public PathSource< TOutputPath > protected: PathToPathFilter(); - ~PathToPathFilter() ITK_OVERRIDE {} + ~PathToPathFilter() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** What is the input requested region that is required to produce the output * requested region? Up till and including now, the base assumption is that @@ -77,7 +77,7 @@ class ITK_TEMPLATE_EXPORT PathToPathFilter:public PathSource< TOutputPath > * its first step. * * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PathToPathFilter); diff --git a/Modules/Filtering/Path/include/itkPolyLineParametricPath.h b/Modules/Filtering/Path/include/itkPolyLineParametricPath.h index 471d6572558..00e5f8e5028 100644 --- a/Modules/Filtering/Path/include/itkPolyLineParametricPath.h +++ b/Modules/Filtering/Path/include/itkPolyLineParametricPath.h @@ -83,7 +83,7 @@ class ITK_TEMPLATE_EXPORT PolyLineParametricPath:public typedef typename VertexListType::Pointer VertexListPointer; /** Return the location of the parametric path at the specified location. */ - virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE; + OutputType Evaluate(const InputType & input) const override; ///** Evaluate the first derivative of the ND output with respect to the 1D // * input. This is an exact, algebraic function. */ @@ -102,7 +102,7 @@ class ITK_TEMPLATE_EXPORT PolyLineParametricPath:public /** Where does the path end? This value is necessary for IncrementInput() to * know how to go to the end of a path. Since each line segment covers one * unit of input, this is the number of verticies - 1. */ - virtual InputType EndOfInput() const ITK_OVERRIDE + InputType EndOfInput() const override { return m_VertexList->Size() - 1; } @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT PolyLineParametricPath:public itkNewMacro(Self); /** Needed for Pipelining */ - virtual void Initialize(void) ITK_OVERRIDE + void Initialize(void) override { m_VertexList->Initialize(); } @@ -123,17 +123,17 @@ class ITK_TEMPLATE_EXPORT PolyLineParametricPath:public * the next pixel along the path to visit by using the instantaneous * partial derivatives to calculate the timestep needed to move along the * path by one pixel */ - virtual OffsetType IncrementInput(InputType & input) const ITK_OVERRIDE; + OffsetType IncrementInput(InputType & input) const override; /** This function overrides the superclass EvaluateDerivative and instead * calculates the instantaneous derivative of input by taking the index * of the previous and next integral timepoints and subtracting them */ - virtual VectorType EvaluateDerivative(const InputType & input) const ITK_OVERRIDE; + VectorType EvaluateDerivative(const InputType & input) const override; protected: PolyLineParametricPath(); - ~PolyLineParametricPath() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PolyLineParametricPath() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PolyLineParametricPath); diff --git a/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx b/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx index 399267239de..549bec86779 100644 --- a/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx +++ b/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx @@ -91,7 +91,7 @@ ::SetOriginalPath(const OriginalPathType *originalPath) OrthogonallyCorrected2DParametricPath ::OrthogonallyCorrected2DParametricPath() { - m_OriginalPath = ITK_NULLPTR; + m_OriginalPath = nullptr; m_OrthogonalCorrectionTable = OrthogonalCorrectionTableType::New(); } diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h index 44f4c8e5ea4..d2ca2c02f49 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h @@ -139,9 +139,9 @@ class ITK_TEMPLATE_EXPORT BorderQuadEdgeMeshFilter: protected: BorderQuadEdgeMeshFilter(); - virtual ~BorderQuadEdgeMeshFilter() ITK_OVERRIDE {} + ~BorderQuadEdgeMeshFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; BorderTransformType m_TransformType; BorderPickType m_BorderPick; @@ -152,7 +152,7 @@ class ITK_TEMPLATE_EXPORT BorderQuadEdgeMeshFilter: MapPointIdentifier m_BoundaryPtMap; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; void ComputeBoundary(); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx index 0318918111a..b551db46d15 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx @@ -56,7 +56,7 @@ void BorderQuadEdgeMeshFilter< TInputMesh, TOutputMesh > ::ComputeBoundary() { - InputQEType *bdryEdge = ITK_NULLPTR; + InputQEType *bdryEdge = nullptr; switch( m_BorderPick ) { diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.h index 37551e63c7f..e12659790bf 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.h @@ -111,15 +111,15 @@ class ITK_TEMPLATE_EXPORT CleanQuadEdgeMeshFilter: protected: CleanQuadEdgeMeshFilter(); - virtual ~CleanQuadEdgeMeshFilter() ITK_OVERRIDE {} + ~CleanQuadEdgeMeshFilter() override {} - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; virtual void MergePoints( const InputCoordRepType absoluteToleranceSquared ); virtual void CleanPoints(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CleanQuadEdgeMeshFilter); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx index 7f8f2338fc2..fae565b57e3 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx @@ -142,7 +142,7 @@ CleanQuadEdgeMeshFilter< TInputMesh, TOutputMesh > while ( p_it != p_end ) { id = p_it->Index(); - if ( output->FindEdge(id) == ITK_NULLPTR ) + if ( output->FindEdge(id) == nullptr ) { output->DeletePoint(id); } diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h index 1e8bff2ab20..702bfaa7274 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h @@ -59,15 +59,15 @@ class DecimationQuadEdgeMeshFilter: DecimationQuadEdgeMeshFilter() { this->m_Iteration = 0; - this->m_OutputMesh = ITK_NULLPTR; + this->m_OutputMesh = nullptr; } - ~DecimationQuadEdgeMeshFilter() ITK_OVERRIDE {} + ~DecimationQuadEdgeMeshFilter() override {} CriterionPointer m_Criterion; SizeValueType m_Iteration; - void GenerateData() ITK_OVERRIDE + void GenerateData() override { this->CopyInputMeshToOutputMesh(); @@ -102,7 +102,7 @@ class DecimationQuadEdgeMeshFilter: virtual bool IsCriterionSatisfied() = 0; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { this->Superclass::PrintSelf(os, indent); os << indent << "Criterion: " << m_Criterion << std::endl; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h index 9cd7822af52..7322d2eda45 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h @@ -124,8 +124,8 @@ class ITK_TEMPLATE_EXPORT DelaunayConformingQuadEdgeMeshFilter: protected: DelaunayConformingQuadEdgeMeshFilter(); - virtual ~DelaunayConformingQuadEdgeMeshFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DelaunayConformingQuadEdgeMeshFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; OutputEdgeCellListType m_ListOfConstrainedEdges; PriorityQueuePointer m_PriorityQueue; @@ -134,7 +134,7 @@ class ITK_TEMPLATE_EXPORT DelaunayConformingQuadEdgeMeshFilter: SizeValueType m_NumberOfEdgeFlips; FlipEdgeFunctionPointer m_FlipEdge; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; void InitializePriorityQueue(); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx index b6b330a8a6d..60980ee5678 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx @@ -55,7 +55,7 @@ void DelaunayConformingQuadEdgeMeshFilter< TInputMesh, TOutputMesh >::Initialize { OutputMeshType *output = this->GetOutput(); - OutputEdgeCellType *edge = ITK_NULLPTR; + OutputEdgeCellType *edge = nullptr; CriterionValueType value = 0.; @@ -140,7 +140,7 @@ void DelaunayConformingQuadEdgeMeshFilter< TInputMesh, TOutputMesh >::Process() m_QueueMapper.erase(edge); qe = m_FlipEdge->Evaluate(qe); - if ( qe != ITK_NULLPTR ) + if ( qe != nullptr ) { ++this->m_NumberOfEdgeFlips; list_qe[4] = qe; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h index 2941eabc67a..39fc470dc2d 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h @@ -69,8 +69,8 @@ class DiscreteCurvatureQuadEdgeMeshFilter: #endif protected: - DiscreteCurvatureQuadEdgeMeshFilter() : m_OutputMesh(ITK_NULLPTR) {} - virtual ~DiscreteCurvatureQuadEdgeMeshFilter() ITK_OVERRIDE {} + DiscreteCurvatureQuadEdgeMeshFilter() : m_OutputMesh(nullptr) {} + ~DiscreteCurvatureQuadEdgeMeshFilter() override {} virtual OutputCurvatureType EstimateCurvature(const OutputPointType & iP) = 0; @@ -93,7 +93,7 @@ class DiscreteCurvatureQuadEdgeMeshFilter: return static_cast< OutputCurvatureType >( TriangleType::ComputeMixedArea( p[0], p[1], p[2] ) ); } - virtual void GenerateData() ITK_OVERRIDE + void GenerateData() override { this->CopyInputMeshToOutputMesh(); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h index 6db00839215..dd722a6ab9e 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h @@ -77,15 +77,15 @@ class DiscreteGaussianCurvatureQuadEdgeMeshFilter: protected: DiscreteGaussianCurvatureQuadEdgeMeshFilter() {} - ~DiscreteGaussianCurvatureQuadEdgeMeshFilter() ITK_OVERRIDE {} + ~DiscreteGaussianCurvatureQuadEdgeMeshFilter() override {} - virtual OutputCurvatureType EstimateCurvature(const OutputPointType & iP) ITK_OVERRIDE + OutputCurvatureType EstimateCurvature(const OutputPointType & iP) override { OutputMeshPointer output = this->GetOutput(); OutputQEType *qe = iP.GetEdge(); - if ( qe != ITK_NULLPTR ) + if ( qe != nullptr ) { OutputQEType *qe_it = qe; OutputQEType *qe_it2; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.h index 221f757ed03..543f7668c63 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.h @@ -73,9 +73,9 @@ class DiscreteMaximumCurvatureQuadEdgeMeshFilter: protected: DiscreteMaximumCurvatureQuadEdgeMeshFilter() {} - ~DiscreteMaximumCurvatureQuadEdgeMeshFilter() ITK_OVERRIDE {} + ~DiscreteMaximumCurvatureQuadEdgeMeshFilter() override {} - virtual OutputCurvatureType EstimateCurvature(const OutputPointType & iP) ITK_OVERRIDE + OutputCurvatureType EstimateCurvature(const OutputPointType & iP) override { this->ComputeMeanAndGaussianCurvatures(iP); return this->m_Mean + std::sqrt( this->ComputeDelta() ); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h index b8d51d0099f..5c7b74ff244 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h @@ -77,9 +77,9 @@ class DiscreteMeanCurvatureQuadEdgeMeshFilter: protected: DiscreteMeanCurvatureQuadEdgeMeshFilter() {} - ~DiscreteMeanCurvatureQuadEdgeMeshFilter() ITK_OVERRIDE {} + ~DiscreteMeanCurvatureQuadEdgeMeshFilter() override {} - virtual OutputCurvatureType EstimateCurvature(const OutputPointType & iP) ITK_OVERRIDE + OutputCurvatureType EstimateCurvature(const OutputPointType & iP) override { OutputMeshPointer output = this->GetOutput(); @@ -95,7 +95,7 @@ class DiscreteMeanCurvatureQuadEdgeMeshFilter: OutputVectorType normal; normal.Fill(0.); - if ( qe != ITK_NULLPTR ) + if ( qe != nullptr ) { if ( qe != qe->GetOnext() ) { diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.h index c3879d280e8..1ba969b5bb1 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.h @@ -73,9 +73,9 @@ class DiscreteMinimumCurvatureQuadEdgeMeshFilter: protected: DiscreteMinimumCurvatureQuadEdgeMeshFilter() {} - ~DiscreteMinimumCurvatureQuadEdgeMeshFilter() ITK_OVERRIDE {} + ~DiscreteMinimumCurvatureQuadEdgeMeshFilter() override {} - virtual OutputCurvatureType EstimateCurvature(const OutputPointType & iP) ITK_OVERRIDE + OutputCurvatureType EstimateCurvature(const OutputPointType & iP) override { this->ComputeMeanAndGaussianCurvatures(iP); return this->m_Mean - std::sqrt( this->ComputeDelta() ); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h index 3ffe8579192..4721473fef8 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h @@ -73,7 +73,7 @@ class DiscretePrincipalCurvaturesQuadEdgeMeshFilter: protected: DiscretePrincipalCurvaturesQuadEdgeMeshFilter(): m_Gaussian(0.0), m_Mean(0.0){} - ~DiscretePrincipalCurvaturesQuadEdgeMeshFilter() ITK_OVERRIDE {} + ~DiscretePrincipalCurvaturesQuadEdgeMeshFilter() override {} OutputCurvatureType m_Gaussian; OutputCurvatureType m_Mean; @@ -87,7 +87,7 @@ class DiscretePrincipalCurvaturesQuadEdgeMeshFilter: m_Mean = 0.; m_Gaussian = 0.; - if ( qe != ITK_NULLPTR ) + if ( qe != nullptr ) { OutputVectorType Laplace; Laplace.Fill(0.); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.h index c05054f43c3..7d3cb2aa2fe 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.h @@ -88,7 +88,7 @@ class ITK_TEMPLATE_EXPORT EdgeDecimationQuadEdgeMeshFilter: protected: EdgeDecimationQuadEdgeMeshFilter(); - virtual ~EdgeDecimationQuadEdgeMeshFilter() ITK_OVERRIDE; + ~EdgeDecimationQuadEdgeMeshFilter() override; bool m_Relocate; bool m_CheckOrientation; @@ -109,7 +109,7 @@ class ITK_TEMPLATE_EXPORT EdgeDecimationQuadEdgeMeshFilter: /** * \brief Fill the priority queue */ - void FillPriorityQueue() ITK_OVERRIDE; + void FillPriorityQueue() override; /** * \brief Push one edge in the priority queue @@ -127,7 +127,7 @@ class ITK_TEMPLATE_EXPORT EdgeDecimationQuadEdgeMeshFilter: /** * \brief Extract the edge to be processed */ - void Extract() ITK_OVERRIDE; + void Extract() override; /** * \brief Delete a given edge in the priority queue @@ -153,7 +153,7 @@ class ITK_TEMPLATE_EXPORT EdgeDecimationQuadEdgeMeshFilter: /** * \brief */ - virtual bool ProcessWithoutAnyTopologicalGuarantee() ITK_OVERRIDE; + bool ProcessWithoutAnyTopologicalGuarantee() override; /** * \brief @@ -165,7 +165,7 @@ class ITK_TEMPLATE_EXPORT EdgeDecimationQuadEdgeMeshFilter: * \brief * \return */ - virtual bool ProcessWithTopologicalGuarantee() ITK_OVERRIDE; + bool ProcessWithTopologicalGuarantee() override; /** * \brief @@ -296,7 +296,7 @@ class ITK_TEMPLATE_EXPORT EdgeDecimationQuadEdgeMeshFilter: * \brief * \return */ - bool IsCriterionSatisfied() ITK_OVERRIDE; + bool IsCriterionSatisfied() override; private: EdgeDecimationQuadEdgeMeshFilter(const Self &); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx index fd4ec781d32..cd33fc9594e 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx @@ -28,7 +28,7 @@ EdgeDecimationQuadEdgeMeshFilter() : Superclass(), m_Relocate(true), m_CheckOrientation(false), - m_Element(ITK_NULLPTR) + m_Element(nullptr) { m_JoinVertexFunction = OperatorType::New(); @@ -107,7 +107,7 @@ IsEdgeOKToBeProcessed(OutputQEType *) #endif { #ifdef NDEBUG - if ( iEdge == ITK_NULLPTR ) + if ( iEdge == nullptr ) { itkDebugMacro("iEdge == 0, at iteration: " << this->m_Iteration); return false; @@ -122,13 +122,13 @@ IsEdgeOKToBeProcessed(OutputQEType *) } OutputMeshPointer output = this->GetOutput(); - if ( output->FindEdge(id_org) == ITK_NULLPTR ) + if ( output->FindEdge(id_org) == nullptr ) { itkDebugMacro("output->FindEdge( id_org ) == 0, at iteration: " << this->m_Iteration); return false; } - if ( iEdge->GetSym() == ITK_NULLPTR ) + if ( iEdge->GetSym() == nullptr ) { itkDebugMacro("iEdge->GetSym() == 0, at iteration: " << this->m_Iteration); @@ -142,13 +142,13 @@ IsEdgeOKToBeProcessed(OutputQEType *) << this->m_Iteration); return false; } - if ( output->FindEdge(id_dest) == ITK_NULLPTR ) + if ( output->FindEdge(id_dest) == nullptr ) { itkDebugMacro("output->FindEdge( id_dest ) == 0, at iteration: " << this->m_Iteration); return false; } - if ( output->FindEdge(id_org, id_dest) == ITK_NULLPTR ) + if ( output->FindEdge(id_org, id_dest) == nullptr ) { itkDebugMacro("output->FindEdge( id_org, id_dest ) == 0, at iteration: " << this->m_Iteration); @@ -376,7 +376,7 @@ EdgeDecimationQuadEdgeMeshFilter< TInput, TOutput, TCriterion >::ProcessWithoutA DeletePoint(old_id, new_id); OutputQEType *edge = this->m_OutputMesh->FindEdge(new_id); - if ( edge == ITK_NULLPTR ) + if ( edge == nullptr ) { itkDebugMacro("edge == 0, at iteration " << this->m_Iteration); return false; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h index 7b211c78fc1..8ef652115a8 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h @@ -176,7 +176,7 @@ class ITK_TEMPLATE_EXPORT LaplacianDeformationQuadEdgeMeshFilter: /** Default constructor*/ LaplacianDeformationQuadEdgeMeshFilter(); - virtual ~LaplacianDeformationQuadEdgeMeshFilter() ITK_OVERRIDE {} + ~LaplacianDeformationQuadEdgeMeshFilter() override {} typedef itksys::hash_map< OutputPointIdentifier, OutputPointIdentifier > OutputMapPointIdentifier; typedef typename OutputMapPointIdentifier::iterator OutputMapPointIdentifierIterator; @@ -213,7 +213,7 @@ class ITK_TEMPLATE_EXPORT LaplacianDeformationQuadEdgeMeshFilter: unsigned int m_Order; AreaType m_AreaComputationType; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; OutputCoordRepType ComputeMixedAreaForGivenVertex(OutputPointIdentifier vId); OutputCoordRepType ComputeMixedArea(OutputQEPrimal *iQE1, OutputQEPrimal *iQE2); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.hxx index d6815b5f4a7..b896e6e093a 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.hxx @@ -25,7 +25,7 @@ namespace itk template< typename TInputMesh, typename TOutputMesh, typename TSolverTraits > LaplacianDeformationQuadEdgeMeshFilter< TInputMesh, TOutputMesh, TSolverTraits > ::LaplacianDeformationQuadEdgeMeshFilter(): - m_CoefficientsMethod( ITK_NULLPTR ), m_Order(1), m_AreaComputationType( NONE ) + m_CoefficientsMethod( nullptr ), m_Order(1), m_AreaComputationType( NONE ) {} template< typename TInputMesh, typename TOutputMesh, typename TSolverTraits > diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraints.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraints.h index 3efb5e7958d..dc4353e242f 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraints.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithHardConstraints.h @@ -74,8 +74,8 @@ class ITK_TEMPLATE_EXPORT LaplacianDeformationQuadEdgeMeshFilterWithHardConstrai protected: LaplacianDeformationQuadEdgeMeshFilterWithHardConstraints(); - virtual ~LaplacianDeformationQuadEdgeMeshFilterWithHardConstraints() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LaplacianDeformationQuadEdgeMeshFilterWithHardConstraints() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; typedef typename Superclass::OutputMapPointIdentifier OutputMapPointIdentifier; typedef typename Superclass::OutputMapPointIdentifierIterator OutputMapPointIdentifierIterator; @@ -88,7 +88,7 @@ class ITK_TEMPLATE_EXPORT LaplacianDeformationQuadEdgeMeshFilterWithHardConstrai typedef typename Superclass::RowConstIterator RowConstIterator; typedef typename Superclass::RowIterator RowIterator; - virtual void ComputeVertexIdMapping() ITK_OVERRIDE; + void ComputeVertexIdMapping() override; /** * \brief Fill matrix iM and vectors Bx and m_By depending on if one @@ -96,7 +96,7 @@ class ITK_TEMPLATE_EXPORT LaplacianDeformationQuadEdgeMeshFilterWithHardConstrai */ void FillMatrix(MatrixType & iM, VectorType & iBx, VectorType & iBy, VectorType & iBz); - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LaplacianDeformationQuadEdgeMeshFilterWithHardConstraints); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.h index d1a5d3c5d9d..e97685c6669 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.h @@ -80,8 +80,8 @@ class ITK_TEMPLATE_EXPORT LaplacianDeformationQuadEdgeMeshFilterWithSoftConstrai protected: LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints(); - virtual ~LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** * \brief Fill matrix iM and vectors Bx and m_By depending on if one @@ -89,7 +89,7 @@ class ITK_TEMPLATE_EXPORT LaplacianDeformationQuadEdgeMeshFilterWithSoftConstrai */ void FillMatrix(MatrixType & iM, VectorType & iBx, VectorType & iBy, VectorType & iBz); - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; typedef typename Superclass::ConstraintMapType ConstraintMapType; typedef typename Superclass::ConstraintMapConstIterator ConstraintMapConstIterator; @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT LaplacianDeformationQuadEdgeMeshFilterWithSoftConstrai typedef typename Superclass::RowConstIterator RowConstIterator; typedef typename Superclass::RowIterator RowIterator; - virtual void ComputeVertexIdMapping() ITK_OVERRIDE; + void ComputeVertexIdMapping() override; OutputCoordRepType m_Lambda; OutputCoordRepType m_LambdaSquare; diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.h index dbb8444f259..ebc8a7a05dd 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.h @@ -127,8 +127,8 @@ class ITK_TEMPLATE_EXPORT NormalQuadEdgeMeshFilter: protected: NormalQuadEdgeMeshFilter(); - ~NormalQuadEdgeMeshFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NormalQuadEdgeMeshFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; WeightType m_Weight; @@ -169,7 +169,7 @@ class ITK_TEMPLATE_EXPORT NormalQuadEdgeMeshFilter: * filter! Something must be done in the class * itkQuadEdgeMeshToQuadEdgeMeshFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: NormalQuadEdgeMeshFilter (const Self &); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx index 4aa96d202b1..909beb9ac50 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx @@ -73,7 +73,7 @@ NormalQuadEdgeMeshFilter< TInputMesh, TOutputMesh > { poly = dynamic_cast< OutputPolygonType * >( cell_it.Value() ); - if ( poly != ITK_NULLPTR ) + if ( poly != nullptr ) { if ( poly->GetNumberOfPoints() == 3 ) { @@ -146,7 +146,7 @@ NormalQuadEdgeMeshFilter< TInputMesh, TOutputMesh > OutputPolygonType *poly = dynamic_cast< OutputPolygonType * >( outputMesh->GetCells()->GetElement(iCId) ); - if ( poly != ITK_NULLPTR ) // this test should be removed... + if ( poly != nullptr ) // this test should be removed... { // this test should be removed... if ( poly->GetNumberOfPoints() == 3 ) diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.h index aeb66d9df46..709f447c027 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.h @@ -133,8 +133,8 @@ class ITK_TEMPLATE_EXPORT ParameterizationQuadEdgeMeshFilter: protected: ParameterizationQuadEdgeMeshFilter(); - virtual ~ParameterizationQuadEdgeMeshFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ParameterizationQuadEdgeMeshFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; CoefficientsComputation *m_CoefficientsMethod; @@ -188,7 +188,7 @@ class ITK_TEMPLATE_EXPORT ParameterizationQuadEdgeMeshFilter: VectorType & oX, VectorType & oY); - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx index c468fbc94aa..330c6a8c288 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx @@ -27,8 +27,8 @@ template< typename TInputMesh, typename TOutputMesh, typename TSolverTraits > ParameterizationQuadEdgeMeshFilter< TInputMesh, TOutputMesh, TSolverTraits > ::ParameterizationQuadEdgeMeshFilter() { - this->m_CoefficientsMethod = ITK_NULLPTR; - this->m_BorderTransform = ITK_NULLPTR; + this->m_CoefficientsMethod = nullptr; + this->m_BorderTransform = nullptr; } // --------------------------------------------------------------------- diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h index 708e4508a86..80cc1afa951 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h @@ -79,8 +79,8 @@ class QuadEdgeMeshDecimationCriterion:public Object this->m_MeasureBound = itk::NumericTraits< MeasureType >::ZeroValue(); } - ~QuadEdgeMeshDecimationCriterion() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + ~QuadEdgeMeshDecimationCriterion() override {} + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "TopologicalChange: " @@ -196,14 +196,14 @@ class NumberOfFacesCriterion: bool is_satisfied( MeshType *iMesh, const ElementType & itkNotUsed(iElement), - const MeasureType & itkNotUsed(iValue) ) const ITK_OVERRIDE + const MeasureType & itkNotUsed(iValue) ) const override { return ( iMesh->GetNumberOfFaces() <= this->m_NumberOfElements ); } protected: NumberOfFacesCriterion() {} - ~NumberOfFacesCriterion() ITK_OVERRIDE {} + ~NumberOfFacesCriterion() override {} private: NumberOfFacesCriterion(const Self &); @@ -247,14 +247,14 @@ class MaxMeasureBoundCriterion: bool is_satisfied(MeshType *itkNotUsed(iMesh), const ElementType & itkNotUsed(iElement), - const MeasureType & iValue) const ITK_OVERRIDE + const MeasureType & iValue) const override { return ( iValue <= this->m_MeasureBound ); } protected: MaxMeasureBoundCriterion():Superclass() {} - ~MaxMeasureBoundCriterion() ITK_OVERRIDE {} + ~MaxMeasureBoundCriterion() override {} private: MaxMeasureBoundCriterion(const Self &); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshParamMatrixCoefficients.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshParamMatrixCoefficients.h index fdff6be8407..8e71fe13233 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshParamMatrixCoefficients.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshParamMatrixCoefficients.h @@ -67,7 +67,7 @@ class OnesMatrixCoefficients:public MatrixCoefficients< TInputMesh > * \return \f$ 1 \f$ */ InputCoordRepType operator()( const InputMeshType *itkNotUsed(iMesh), - InputQEType *itkNotUsed(iEdge) ) const + InputQEType *itkNotUsed(iEdge) ) const override { return 1.0; } @@ -101,7 +101,7 @@ class InverseEuclideanDistanceMatrixCoefficients: * \param[in] iEdge * \return \f$ \frac{1}{\|\boldsymbol{p1} - \boldsymbol{p2} \|} \f$ */ - InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const + InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const override { InputPointIdentifier id1 = iEdge->GetOrigin(); InputPointIdentifier id2 = iEdge->GetDestination(); @@ -141,7 +141,7 @@ class ConformalMatrixCoefficients:public MatrixCoefficients< TInputMesh > * \param[in] iEdge * \return \f$ \cot \alpha_{ij} + \cot \beta_{ij} \f$ */ - InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const + InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const override { InputPointIdentifier id1 = iEdge->GetOrigin(); InputPointIdentifier id2 = iEdge->GetDestination(); @@ -195,7 +195,7 @@ class AuthalicMatrixCoefficients:public MatrixCoefficients< TInputMesh > * \return \f$ \frac{\cot \gamma_{ij} + \cot \delta_{ij}}{\|\boldsymbol{p1} - \boldsymbol{p2} \|^2} \f$ */ - InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const + InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const override { InputPointIdentifier id1 = iEdge->GetOrigin(); InputPointType pt1 = iMesh->GetPoint(id1); @@ -285,7 +285,7 @@ class HarmonicMatrixCoefficients:public MatrixCoefficients< TInputMesh > HarmonicMatrixCoefficients() {} - InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const + InputCoordRepType operator()(const InputMeshType *iMesh, InputQEType *iEdge) const override { InputPointIdentifier id1 = iEdge->GetOrigin(); InputPointIdentifier id2 = iEdge->GetDestination(); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.h index 9124e6bb03c..13746e3437f 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.h @@ -88,7 +88,7 @@ class ITK_TEMPLATE_EXPORT QuadricDecimationQuadEdgeMeshFilter: QuadricDecimationQuadEdgeMeshFilter(); /** \brief Destructor */ - virtual ~QuadricDecimationQuadEdgeMeshFilter() ITK_OVERRIDE; + ~QuadricDecimationQuadEdgeMeshFilter() override; /** \brief Compute the quadric error at the origin of the edge * \param[in] iEdge input edge @@ -117,7 +117,7 @@ class ITK_TEMPLATE_EXPORT QuadricDecimationQuadEdgeMeshFilter: * \param[in] iEdge input edge * \return measure value, here the corresponding quadric error */ - MeasureType MeasureEdge(OutputQEType *iEdge) ITK_OVERRIDE + MeasureType MeasureEdge(OutputQEType *iEdge) override { OutputPointIdentifier id_org = iEdge->GetOrigin(); OutputPointIdentifier id_dest = iEdge->GetDestination(); @@ -138,17 +138,17 @@ class ITK_TEMPLATE_EXPORT QuadricDecimationQuadEdgeMeshFilter: * \param[in] iIdToBeDeleted id of the point to be deleted * \param[in] iRemaining id of the point to be kept */ - virtual void DeletePoint(const OutputPointIdentifier & iIdToBeDeleted, - const OutputPointIdentifier & iRemaining) ITK_OVERRIDE; + void DeletePoint(const OutputPointIdentifier & iIdToBeDeleted, + const OutputPointIdentifier & iRemaining) override; /** \brief Compute the optimal position for a given edge iEdge * \param[in] iEdge * \return the optimal point location */ - OutputPointType Relocate(OutputQEType *iEdge) ITK_OVERRIDE; + OutputPointType Relocate(OutputQEType *iEdge) override; /** \brief Compute Quadric error for all edges */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(QuadricDecimationQuadEdgeMeshFilter); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx index 9794226bdc8..3b078a1873c 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx @@ -51,7 +51,7 @@ QuadricDecimationQuadEdgeMeshFilter< TInput, TOutput, TCriterion > p_id = it->Index(); qe = output->FindEdge(p_id); - if ( qe != ITK_NULLPTR ) + if ( qe != nullptr ) { qe_it = qe; do diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.h index d9219619dcc..6895b545e44 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.h @@ -107,8 +107,8 @@ class ITK_TEMPLATE_EXPORT SmoothingQuadEdgeMeshFilter: protected: SmoothingQuadEdgeMeshFilter(); - ~SmoothingQuadEdgeMeshFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SmoothingQuadEdgeMeshFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; CoefficientsComputation *m_CoefficientsMethod; @@ -128,7 +128,7 @@ class ITK_TEMPLATE_EXPORT SmoothingQuadEdgeMeshFilter: OutputCoordType m_RelaxationFactor; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: SmoothingQuadEdgeMeshFilter(const Self &); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx index bd51cc1a5ca..5227f857731 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx @@ -27,7 +27,7 @@ template< typename TInputMesh, typename TOutputMesh > SmoothingQuadEdgeMeshFilter< TInputMesh, TOutputMesh > ::SmoothingQuadEdgeMeshFilter() { - this->m_CoefficientsMethod = ITK_NULLPTR; + this->m_CoefficientsMethod = nullptr; this->m_DelaunayConforming = false; this->m_NumberOfIterations = 1; this->m_RelaxationFactor = static_cast< OutputCoordType >( 1.0 ); @@ -111,7 +111,7 @@ void SmoothingQuadEdgeMeshFilter< TInputMesh, TOutputMesh >::GenerateData() { p = it.Value(); qe = p.GetEdge(); - if ( qe != ITK_NULLPTR ) + if ( qe != nullptr ) { r = p; v.Fill(0.0); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h index 21798bfc3b6..72b63546ba4 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h @@ -71,7 +71,7 @@ class ITK_TEMPLATE_EXPORT SquaredEdgeLengthDecimationQuadEdgeMeshFilter: protected: SquaredEdgeLengthDecimationQuadEdgeMeshFilter(); - virtual ~SquaredEdgeLengthDecimationQuadEdgeMeshFilter() ITK_OVERRIDE; + ~SquaredEdgeLengthDecimationQuadEdgeMeshFilter() override; // keep the start of this documentation text on very first comment line, // it prevents a Doxygen bug @@ -80,7 +80,7 @@ class ITK_TEMPLATE_EXPORT SquaredEdgeLengthDecimationQuadEdgeMeshFilter: * \param[in] iEdge * \return measure value, here the squared edge length */ - MeasureType MeasureEdge(OutputQEType *iEdge) ITK_OVERRIDE + MeasureType MeasureEdge(OutputQEType *iEdge) override { OutputPointIdentifier id_org = iEdge->GetOrigin(); OutputPointIdentifier id_dest = iEdge->GetDestination(); @@ -98,7 +98,7 @@ class ITK_TEMPLATE_EXPORT SquaredEdgeLengthDecimationQuadEdgeMeshFilter: * \param[in] iEdge * \return the optimal point location */ - OutputPointType Relocate(OutputQEType *iEdge) ITK_OVERRIDE; + OutputPointType Relocate(OutputQEType *iEdge) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SquaredEdgeLengthDecimationQuadEdgeMeshFilter); diff --git a/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.h b/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.h index 037cfb9dae0..dce755536da 100644 --- a/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.h @@ -87,7 +87,7 @@ class ITK_TEMPLATE_EXPORT BinomialBlurImageFilter: * If this filter runs "Repetitions" iterations, then it needs an input * that is 2*Repetitions larger than the output. In other words, this * filter needs a border of "Repetitions" pixels. */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -103,11 +103,11 @@ class ITK_TEMPLATE_EXPORT BinomialBlurImageFilter: protected: BinomialBlurImageFilter(); - virtual ~BinomialBlurImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinomialBlurImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Method for evaluating the implicit function over the image. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinomialBlurImageFilter); diff --git a/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.h b/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.h index 0f963e618e7..a8443e14c3f 100644 --- a/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.h @@ -85,10 +85,10 @@ class ITK_TEMPLATE_EXPORT BoxMeanImageFilter: protected: BoxMeanImageFilter(); - ~BoxMeanImageFilter() ITK_OVERRIDE {} + ~BoxMeanImageFilter() override {} /** Multi-thread version GenerateData. */ - void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BoxMeanImageFilter); diff --git a/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.h b/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.h index 9a79d4d7d8c..6dd297c8eaf 100644 --- a/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.h @@ -82,12 +82,12 @@ class ITK_TEMPLATE_EXPORT BoxSigmaImageFilter: protected: BoxSigmaImageFilter(); - ~BoxSigmaImageFilter() ITK_OVERRIDE {} + ~BoxSigmaImageFilter() override {} /** Multi-thread version GenerateData. */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BoxSigmaImageFilter); diff --git a/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.h b/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.h index 9d6508090fa..5290bb804c4 100644 --- a/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.h @@ -218,7 +218,7 @@ class ITK_TEMPLATE_EXPORT DiscreteGaussianImageFilter: * provide an implementation for GenerateInputRequestedRegion() in * order to inform the pipeline execution model. * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -240,15 +240,15 @@ class ITK_TEMPLATE_EXPORT DiscreteGaussianImageFilter: m_InternalNumberOfStreamDivisions = ImageDimension * ImageDimension; } - virtual ~DiscreteGaussianImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DiscreteGaussianImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Standard pipeline method. While this class does not implement a * ThreadedGenerateData(), its GenerateData() delegates all * calculations to an NeighborhoodOperatorImageFilter. Since the * NeighborhoodOperatorImageFilter is multithreaded, this filter is * multithreaded by default. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DiscreteGaussianImageFilter); diff --git a/Modules/Filtering/Smoothing/include/itkMeanImageFilter.h b/Modules/Filtering/Smoothing/include/itkMeanImageFilter.h index 03d3f144657..b6c437a6223 100644 --- a/Modules/Filtering/Smoothing/include/itkMeanImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkMeanImageFilter.h @@ -90,7 +90,7 @@ class ITK_TEMPLATE_EXPORT MeanImageFilter: protected: MeanImageFilter(); - virtual ~MeanImageFilter() ITK_OVERRIDE {} + ~MeanImageFilter() override {} /** MeanImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT MeanImageFilter: * \sa BoxImageFilter::ThreadedGenerateData(), * BoxImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MeanImageFilter); diff --git a/Modules/Filtering/Smoothing/include/itkMedianImageFilter.h b/Modules/Filtering/Smoothing/include/itkMedianImageFilter.h index 7e7765b1b1c..d5236f0cf5c 100644 --- a/Modules/Filtering/Smoothing/include/itkMedianImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkMedianImageFilter.h @@ -97,7 +97,7 @@ class ITK_TEMPLATE_EXPORT MedianImageFilter: protected: MedianImageFilter(); - virtual ~MedianImageFilter() ITK_OVERRIDE {} + ~MedianImageFilter() override {} /** MedianImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT MedianImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MedianImageFilter); diff --git a/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.h b/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.h index f4ebee69ced..7a210e1cf20 100644 --- a/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.h @@ -155,18 +155,18 @@ class ITK_TEMPLATE_EXPORT RecursiveGaussianImageFilter: protected: RecursiveGaussianImageFilter(); - virtual ~RecursiveGaussianImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RecursiveGaussianImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Set up the coefficients of the filter to approximate a specific kernel. * Here it is used to approximate a Gaussian or one of its * derivatives. Parameter is the spacing along the dimension to * filter. */ - virtual void SetUp(ScalarRealType spacing) ITK_OVERRIDE; + void SetUp(ScalarRealType spacing) override; /* See superclass for doxygen. This method adds the additional check * that sigma is greater than zero. */ - virtual void VerifyPreconditions() ITK_OVERRIDE; + void VerifyPreconditions() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RecursiveGaussianImageFilter); diff --git a/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h b/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h index c9311991d35..2d757951fcf 100644 --- a/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h @@ -131,9 +131,9 @@ class ITK_TEMPLATE_EXPORT SmoothingRecursiveGaussianImageFilter: itkGetConstMacro(NormalizeAcrossScale, bool); itkBooleanMacro( NormalizeAcrossScale ); - void SetNumberOfThreads(ThreadIdType nb) ITK_OVERRIDE; + void SetNumberOfThreads(ThreadIdType nb) override; - virtual bool CanRunInPlace( void ) const ITK_OVERRIDE; + bool CanRunInPlace( void ) const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -145,10 +145,10 @@ class ITK_TEMPLATE_EXPORT SmoothingRecursiveGaussianImageFilter: protected: SmoothingRecursiveGaussianImageFilter(); - virtual ~SmoothingRecursiveGaussianImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SmoothingRecursiveGaussianImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; /** SmoothingRecursiveGaussianImageFilter needs all of the input to produce an * output. Therefore, SmoothingRecursiveGaussianImageFilter needs to provide @@ -156,10 +156,10 @@ class ITK_TEMPLATE_EXPORT SmoothingRecursiveGaussianImageFilter: * the pipeline execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces the entire dataset - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SmoothingRecursiveGaussianImageFilter); diff --git a/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.h b/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.h index 592b0eb2e45..05bd635d27d 100644 --- a/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.h +++ b/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.h @@ -87,10 +87,10 @@ class ITK_TEMPLATE_EXPORT SpatialFunctionImageEvaluatorFilter: protected: SpatialFunctionImageEvaluatorFilter(); - virtual ~SpatialFunctionImageEvaluatorFilter() ITK_OVERRIDE {} + ~SpatialFunctionImageEvaluatorFilter() override {} /** Method for evaluating the implicit function over the image. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SpatialFunctionImageEvaluatorFilter); diff --git a/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx b/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx index 943745b617f..cf9db7a189c 100644 --- a/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx +++ b/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx @@ -30,7 +30,7 @@ SpatialFunctionImageEvaluatorFilter< TSpatialFunction, TInputImage, TOutputImage itkDebugMacro(<< "SpatialFunctionImageEvaluatorFilter::SpatialFunctionImageEvaluatorFilter() called"); // Set the internal function to null - this->m_PixelFunction = ITK_NULLPTR; + this->m_PixelFunction = nullptr; } template< typename TSpatialFunction, typename TInputImage, typename TOutputImage > diff --git a/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.h index fc8fb09d11e..3eca542e2a6 100644 --- a/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.h @@ -205,12 +205,12 @@ class ITK_TEMPLATE_EXPORT BinaryThresholdImageFilter: protected: BinaryThresholdImageFilter(); - virtual ~BinaryThresholdImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryThresholdImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** This method is used to set the state of the filter before * multi-threading. */ - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkBinaryThresholdProjectionImageFilter.h b/Modules/Filtering/Thresholding/include/itkBinaryThresholdProjectionImageFilter.h index c7f164c3872..045e703f258 100644 --- a/Modules/Filtering/Thresholding/include/itkBinaryThresholdProjectionImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkBinaryThresholdProjectionImageFilter.h @@ -153,9 +153,9 @@ class BinaryThresholdProjectionImageFilter: m_ThresholdValue = NumericTraits< InputPixelType >::ZeroValue(); } - virtual ~BinaryThresholdProjectionImageFilter() ITK_OVERRIDE {} + ~BinaryThresholdProjectionImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); @@ -178,7 +178,7 @@ class BinaryThresholdProjectionImageFilter: << std::endl; } - virtual AccumulatorType NewAccumulator(SizeValueType size) const ITK_OVERRIDE + AccumulatorType NewAccumulator(SizeValueType size) const override { AccumulatorType accumulator(size); diff --git a/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h index de572823f81..42cf0567fc0 100644 --- a/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h @@ -75,7 +75,7 @@ class HistogramThresholdCalculator : public ProcessObject { if ( this->GetNumberOfInputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return static_cast< const HistogramType * >( this->ProcessObject::GetInput(0) ); } @@ -84,13 +84,13 @@ class HistogramThresholdCalculator : public ProcessObject { if ( this->GetNumberOfOutputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return static_cast< DecoratedOutputType * >( this->ProcessObject::GetOutput(0) ); } using Superclass::MakeOutput; - virtual typename DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE + typename DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType) override { return DecoratedOutputType::New().GetPointer(); } @@ -110,7 +110,7 @@ class HistogramThresholdCalculator : public ProcessObject this->ProcessObject::SetNumberOfRequiredOutputs(1); this->ProcessObject::SetNthOutput( 0, this->MakeOutput(0) ); } - virtual ~HistogramThresholdCalculator() ITK_OVERRIDE {}; + ~HistogramThresholdCalculator() override {}; using ProcessObject::SetInput; private: diff --git a/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h index 158b8eeb7c7..bbe366cb055 100644 --- a/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h @@ -191,11 +191,11 @@ class ITK_TEMPLATE_EXPORT HistogramThresholdImageFilter : protected: HistogramThresholdImageFilter(); - ~HistogramThresholdImageFilter() ITK_OVERRIDE {}; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~HistogramThresholdImageFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; - void GenerateInputRequestedRegion() ITK_OVERRIDE; - void GenerateData () ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; + void GenerateData () override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HistogramThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx b/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx index 403ef6c8b2e..7ea2717f223 100644 --- a/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx +++ b/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx @@ -136,7 +136,7 @@ HistogramThresholdImageFilter this->GraftOutput( thresholder->GetOutput() ); } m_Threshold = m_Calculator->GetThreshold(); - m_Calculator->SetInput( ITK_NULLPTR ); + m_Calculator->SetInput( nullptr ); } template diff --git a/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.h index d7f774a8341..e2cedcbca5b 100644 --- a/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.h @@ -70,10 +70,10 @@ class ITK_TEMPLATE_EXPORT HuangThresholdCalculator : public HistogramThresholdCa protected: HuangThresholdCalculator() { m_FirstBin = 0; m_LastBin = 0; m_Size = 0; } - virtual ~HuangThresholdCalculator() ITK_OVERRIDE {} - void GenerateData(void) ITK_OVERRIDE; + ~HuangThresholdCalculator() override {} + void GenerateData(void) override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; typedef typename HistogramType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType; typedef typename HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType; diff --git a/Modules/Filtering/Thresholding/include/itkHuangThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkHuangThresholdImageFilter.h index 76b87efe645..72c80fcd7ac 100644 --- a/Modules/Filtering/Thresholding/include/itkHuangThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkHuangThresholdImageFilter.h @@ -103,7 +103,7 @@ class HuangThresholdImageFilter : { this->SetCalculator( CalculatorType::New() ); } - ~HuangThresholdImageFilter() ITK_OVERRIDE {}; + ~HuangThresholdImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(HuangThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.h index 647720c721d..151e7452f10 100644 --- a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdCalculator.h @@ -90,10 +90,10 @@ class ITK_TEMPLATE_EXPORT IntermodesThresholdCalculator : public HistogramThresh m_UseInterMode = true; } - virtual ~IntermodesThresholdCalculator() ITK_OVERRIDE {} + ~IntermodesThresholdCalculator() override {} - void GenerateData(void) ITK_OVERRIDE; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void GenerateData(void) override; + void PrintSelf(std::ostream& os, Indent indent) const override; typedef typename HistogramType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType; typedef typename HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType; diff --git a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h index ca071062336..3dbc135ef17 100644 --- a/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkIntermodesThresholdImageFilter.h @@ -128,9 +128,9 @@ class IntermodesThresholdImageFilter : m_IntermodesCalculator->SetMaximumSmoothingIterations(10000); m_IntermodesCalculator->SetUseInterMode(true); } - ~IntermodesThresholdImageFilter() ITK_OVERRIDE {}; + ~IntermodesThresholdImageFilter() override {}; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); diff --git a/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.h index 609b3fa8ff4..ae87d79f097 100644 --- a/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkIsoDataThresholdCalculator.h @@ -72,8 +72,8 @@ class ITK_TEMPLATE_EXPORT IsoDataThresholdCalculator : public HistogramThreshold protected: IsoDataThresholdCalculator() {} - virtual ~IsoDataThresholdCalculator() ITK_OVERRIDE {} - void GenerateData(void) ITK_OVERRIDE; + ~IsoDataThresholdCalculator() override {} + void GenerateData(void) override; typedef typename HistogramType::SizeValueType SizeValueType; typedef typename HistogramType::InstanceIdentifier InstanceIdentifier; diff --git a/Modules/Filtering/Thresholding/include/itkIsoDataThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkIsoDataThresholdImageFilter.h index 0335627dcc7..4fce72461e7 100644 --- a/Modules/Filtering/Thresholding/include/itkIsoDataThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkIsoDataThresholdImageFilter.h @@ -103,7 +103,7 @@ class IsoDataThresholdImageFilter : { this->SetCalculator( CalculatorType::New() ); } - ~IsoDataThresholdImageFilter() ITK_OVERRIDE {}; + ~IsoDataThresholdImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(IsoDataThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.h b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.h index 0ad01dd14f1..95454fa9ed5 100644 --- a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.h @@ -110,8 +110,8 @@ class ITK_TEMPLATE_EXPORT KappaSigmaThresholdImageCalculator:public Object protected: KappaSigmaThresholdImageCalculator(); - virtual ~KappaSigmaThresholdImageCalculator() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~KappaSigmaThresholdImageCalculator() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(KappaSigmaThresholdImageCalculator); diff --git a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageFilter.h index b06d736d20f..b11bcd8f48c 100644 --- a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageFilter.h @@ -141,12 +141,12 @@ class ITK_TEMPLATE_EXPORT KappaSigmaThresholdImageFilter: protected: KappaSigmaThresholdImageFilter(); - ~KappaSigmaThresholdImageFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~KappaSigmaThresholdImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; typedef typename TInputImage::SizeType InputSizeType; typedef typename TInputImage::IndexType InputIndexType; diff --git a/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.h index cb7e0d59125..6ce9474a74a 100644 --- a/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.h @@ -69,9 +69,9 @@ class ITK_TEMPLATE_EXPORT KittlerIllingworthThresholdCalculator : public Histogr protected: KittlerIllingworthThresholdCalculator() {} - virtual ~KittlerIllingworthThresholdCalculator() ITK_OVERRIDE {} + ~KittlerIllingworthThresholdCalculator() override {} - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; typedef typename HistogramType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType; typedef typename HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType; diff --git a/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdImageFilter.h index 27d851bbfa5..776aa5e3360 100644 --- a/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdImageFilter.h @@ -103,7 +103,7 @@ class KittlerIllingworthThresholdImageFilter : { this->SetCalculator( CalculatorType::New() ); } - ~KittlerIllingworthThresholdImageFilter() ITK_OVERRIDE {}; + ~KittlerIllingworthThresholdImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(KittlerIllingworthThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.h index 862e26211c9..aeeb9306418 100644 --- a/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.h @@ -74,8 +74,8 @@ class ITK_TEMPLATE_EXPORT LiThresholdCalculator : public HistogramThresholdCalcu protected: LiThresholdCalculator() {}; - virtual ~LiThresholdCalculator() ITK_OVERRIDE {}; - void GenerateData(void) ITK_OVERRIDE; + ~LiThresholdCalculator() override {}; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LiThresholdCalculator); diff --git a/Modules/Filtering/Thresholding/include/itkLiThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkLiThresholdImageFilter.h index 573a395c059..4413697c531 100644 --- a/Modules/Filtering/Thresholding/include/itkLiThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkLiThresholdImageFilter.h @@ -103,7 +103,7 @@ class LiThresholdImageFilter : { this->SetCalculator( CalculatorType::New() ); } - ~LiThresholdImageFilter() ITK_OVERRIDE {}; + ~LiThresholdImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(LiThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.h index b0145e9dc72..363bec99463 100644 --- a/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.h @@ -70,8 +70,8 @@ class ITK_TEMPLATE_EXPORT MaximumEntropyThresholdCalculator : public HistogramTh protected: MaximumEntropyThresholdCalculator() {}; - virtual ~MaximumEntropyThresholdCalculator() ITK_OVERRIDE {}; - void GenerateData(void) ITK_OVERRIDE; + ~MaximumEntropyThresholdCalculator() override {}; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MaximumEntropyThresholdCalculator); diff --git a/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdImageFilter.h index eef899f804c..c476ba1a8ad 100644 --- a/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdImageFilter.h @@ -103,7 +103,7 @@ class MaximumEntropyThresholdImageFilter : { this->SetCalculator( CalculatorType::New() ); } - ~MaximumEntropyThresholdImageFilter() ITK_OVERRIDE {}; + ~MaximumEntropyThresholdImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(MaximumEntropyThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.h index 4825c1f4b2d..66f538ed03c 100644 --- a/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.h @@ -66,8 +66,8 @@ class ITK_TEMPLATE_EXPORT MomentsThresholdCalculator : public HistogramThreshold protected: MomentsThresholdCalculator() {}; - virtual ~MomentsThresholdCalculator() ITK_OVERRIDE {}; - void GenerateData(void) ITK_OVERRIDE; + ~MomentsThresholdCalculator() override {}; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MomentsThresholdCalculator); diff --git a/Modules/Filtering/Thresholding/include/itkMomentsThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkMomentsThresholdImageFilter.h index 3cb0cd41908..c426dccc5a1 100644 --- a/Modules/Filtering/Thresholding/include/itkMomentsThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkMomentsThresholdImageFilter.h @@ -103,7 +103,7 @@ class MomentsThresholdImageFilter : { this->SetCalculator( CalculatorType::New() ); } - ~MomentsThresholdImageFilter() ITK_OVERRIDE {}; + ~MomentsThresholdImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(MomentsThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h index d7dd3de3a6c..aaad038f4e2 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h @@ -85,7 +85,7 @@ class ITK_TEMPLATE_EXPORT OtsuMultipleThresholdsCalculator: itkGetConstMacro(NumberOfThresholds, SizeValueType); /** Calculates Otsu's thresholds and saves them. */ - void Compute() ITK_OVERRIDE; + void Compute() override; /** Set/Get the use of valley emphasis. Default is false. */ itkSetMacro(ValleyEmphasis, bool); @@ -94,8 +94,8 @@ class ITK_TEMPLATE_EXPORT OtsuMultipleThresholdsCalculator: protected: OtsuMultipleThresholdsCalculator(); - virtual ~OtsuMultipleThresholdsCalculator() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~OtsuMultipleThresholdsCalculator() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Increment the thresholds of one position along the histogram. */ bool IncrementThresholds(InstanceIdentifierVectorType & thresholdIds, diff --git a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h index 3e335282376..617da668052 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h @@ -131,12 +131,12 @@ class ITK_TEMPLATE_EXPORT OtsuMultipleThresholdsImageFilter: protected: OtsuMultipleThresholdsImageFilter(); - ~OtsuMultipleThresholdsImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~OtsuMultipleThresholdsImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(OtsuMultipleThresholdsImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h index a75e5240701..7eef2e5fe72 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h @@ -71,9 +71,9 @@ class ITK_TEMPLATE_EXPORT OtsuThresholdCalculator : public HistogramThresholdCal { m_OtsuMultipleThresholdsCalculator = OtsuMultipleThresholdsCalculator::New(); } - virtual ~OtsuThresholdCalculator() ITK_OVERRIDE {}; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; - void GenerateData(void) ITK_OVERRIDE; + ~OtsuThresholdCalculator() override {}; + void PrintSelf(std::ostream & os, Indent indent) const override; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(OtsuThresholdCalculator); diff --git a/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h index a59dd6d05bb..9338229ad52 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h @@ -106,7 +106,7 @@ class OtsuThresholdImageFilter : { this->SetCalculator( CalculatorType::New() ); } - ~OtsuThresholdImageFilter() ITK_OVERRIDE {}; + ~OtsuThresholdImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(OtsuThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.h index e555a9fd680..cc499886d8c 100644 --- a/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.h @@ -69,11 +69,11 @@ class ITK_TEMPLATE_EXPORT RenyiEntropyThresholdCalculator : public HistogramThre protected: RenyiEntropyThresholdCalculator() { m_FirstBin = 0; m_LastBin = 0; m_Size = 0; } - virtual ~RenyiEntropyThresholdCalculator() ITK_OVERRIDE {} + ~RenyiEntropyThresholdCalculator() override {} - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; typedef typename HistogramType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType; typedef typename HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType; diff --git a/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdImageFilter.h index 22ea19830d7..f448b25a55d 100644 --- a/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdImageFilter.h @@ -103,7 +103,7 @@ class RenyiEntropyThresholdImageFilter : { this->SetCalculator( CalculatorType::New() ); } - ~RenyiEntropyThresholdImageFilter() ITK_OVERRIDE {}; + ~RenyiEntropyThresholdImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(RenyiEntropyThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.h index 924f798c668..62e35d44469 100644 --- a/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.h @@ -66,8 +66,8 @@ class ITK_TEMPLATE_EXPORT ShanbhagThresholdCalculator : public HistogramThreshol protected: ShanbhagThresholdCalculator() {}; - virtual ~ShanbhagThresholdCalculator() ITK_OVERRIDE {}; - void GenerateData(void) ITK_OVERRIDE; + ~ShanbhagThresholdCalculator() override {}; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ShanbhagThresholdCalculator); diff --git a/Modules/Filtering/Thresholding/include/itkShanbhagThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkShanbhagThresholdImageFilter.h index 98607febf72..b4ff53a3bde 100644 --- a/Modules/Filtering/Thresholding/include/itkShanbhagThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkShanbhagThresholdImageFilter.h @@ -103,7 +103,7 @@ class ShanbhagThresholdImageFilter : { this->SetCalculator( CalculatorType::New() ); } - ~ShanbhagThresholdImageFilter() ITK_OVERRIDE {}; + ~ShanbhagThresholdImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(ShanbhagThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.h index b7bc203a6dc..96918f29bfb 100644 --- a/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.h @@ -133,8 +133,8 @@ class ITK_TEMPLATE_EXPORT ThresholdImageFilter:public InPlaceImageFilter< TImage protected: ThresholdImageFilter(); - ~ThresholdImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ThresholdImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** ThresholdImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() routine @@ -147,7 +147,7 @@ class ITK_TEMPLATE_EXPORT ThresholdImageFilter:public InPlaceImageFilter< TImage * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.h b/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.h index 3e440e523d0..a3a1b9d33ca 100644 --- a/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkThresholdLabelerImageFilter.h @@ -195,12 +195,12 @@ class ITK_TEMPLATE_EXPORT ThresholdLabelerImageFilter: protected: ThresholdLabelerImageFilter(); - virtual ~ThresholdLabelerImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ThresholdLabelerImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** This method is used to set the state of the filter before * multi-threading. */ - virtual void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ThresholdLabelerImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.h index 55fb661d279..b00e043795d 100644 --- a/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkTriangleThresholdCalculator.h @@ -70,8 +70,8 @@ class ITK_TEMPLATE_EXPORT TriangleThresholdCalculator : public HistogramThreshol protected: TriangleThresholdCalculator() {}; - virtual ~TriangleThresholdCalculator() ITK_OVERRIDE {}; - void GenerateData(void) ITK_OVERRIDE; + ~TriangleThresholdCalculator() override {}; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TriangleThresholdCalculator); diff --git a/Modules/Filtering/Thresholding/include/itkTriangleThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkTriangleThresholdImageFilter.h index 640b2d4989d..b622c6541a7 100644 --- a/Modules/Filtering/Thresholding/include/itkTriangleThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkTriangleThresholdImageFilter.h @@ -103,7 +103,7 @@ class TriangleThresholdImageFilter : { this->SetCalculator( CalculatorType::New() ); } - ~TriangleThresholdImageFilter() ITK_OVERRIDE {}; + ~TriangleThresholdImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(TriangleThresholdImageFilter); diff --git a/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.h index 1f219a034e0..b641c69a6ec 100644 --- a/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.h @@ -74,8 +74,8 @@ class ITK_TEMPLATE_EXPORT YenThresholdCalculator : public HistogramThresholdCalc protected: YenThresholdCalculator() {}; - virtual ~YenThresholdCalculator() ITK_OVERRIDE {}; - void GenerateData(void) ITK_OVERRIDE; + ~YenThresholdCalculator() override {}; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(YenThresholdCalculator); diff --git a/Modules/Filtering/Thresholding/include/itkYenThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkYenThresholdImageFilter.h index 6b70c52fd7c..98fbc22a18b 100644 --- a/Modules/Filtering/Thresholding/include/itkYenThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkYenThresholdImageFilter.h @@ -102,7 +102,7 @@ class YenThresholdImageFilter : { this->SetCalculator( CalculatorType::New() ); } - ~YenThresholdImageFilter() ITK_OVERRIDE {}; + ~YenThresholdImageFilter() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(YenThresholdImageFilter); diff --git a/Modules/IO/BMP/include/itkBMPImageIO.h b/Modules/IO/BMP/include/itkBMPImageIO.h index ec2cb72e3de..df50759b5d3 100644 --- a/Modules/IO/BMP/include/itkBMPImageIO.h +++ b/Modules/IO/BMP/include/itkBMPImageIO.h @@ -65,30 +65,30 @@ class ITKIOBMP_EXPORT BMPImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine the file type. Returns true if this ImageIO can write the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; BMPImageIO(); - ~BMPImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BMPImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BMPImageIO); diff --git a/Modules/IO/BMP/include/itkBMPImageIOFactory.h b/Modules/IO/BMP/include/itkBMPImageIOFactory.h index ca2dae6a328..d32bb23ead8 100644 --- a/Modules/IO/BMP/include/itkBMPImageIOFactory.h +++ b/Modules/IO/BMP/include/itkBMPImageIOFactory.h @@ -38,9 +38,9 @@ class ITKIOBMP_EXPORT BMPImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,7 +58,7 @@ class ITKIOBMP_EXPORT BMPImageIOFactory:public ObjectFactoryBase protected: BMPImageIOFactory(); - ~BMPImageIOFactory() ITK_OVERRIDE; + ~BMPImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BMPImageIOFactory); diff --git a/Modules/IO/BioRad/include/itkBioRadImageIO.h b/Modules/IO/BioRad/include/itkBioRadImageIO.h index 834ed4c5990..2f790d2ff1a 100644 --- a/Modules/IO/BioRad/include/itkBioRadImageIO.h +++ b/Modules/IO/BioRad/include/itkBioRadImageIO.h @@ -65,32 +65,32 @@ class ITKIOBioRad_EXPORT BioRadImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimesion information for the current filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Writes the spacing and dimensions of the image. * Assumes SetFileName has been called with a valid file name. */ - virtual void WriteImageInformation() ITK_OVERRIDE {} + void WriteImageInformation() override {} /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegion has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; protected: BioRadImageIO(); - ~BioRadImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BioRadImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; void InternalReadImageInformation(std::ifstream & file); diff --git a/Modules/IO/BioRad/include/itkBioRadImageIOFactory.h b/Modules/IO/BioRad/include/itkBioRadImageIOFactory.h index f3dd61c45eb..b41698d8b8f 100644 --- a/Modules/IO/BioRad/include/itkBioRadImageIOFactory.h +++ b/Modules/IO/BioRad/include/itkBioRadImageIOFactory.h @@ -48,9 +48,9 @@ class ITKIOBioRad_EXPORT BioRadImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class Methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion() const ITK_OVERRIDE; + const char * GetITKSourceVersion() const override; - virtual const char * GetDescription() const ITK_OVERRIDE; + const char * GetDescription() const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -68,7 +68,7 @@ class ITKIOBioRad_EXPORT BioRadImageIOFactory:public ObjectFactoryBase protected: BioRadImageIOFactory(); - ~BioRadImageIOFactory() ITK_OVERRIDE; + ~BioRadImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BioRadImageIOFactory); diff --git a/Modules/IO/Bruker/include/itkBruker2dseqImageIO.h b/Modules/IO/Bruker/include/itkBruker2dseqImageIO.h index f8574116832..b367ec56e92 100644 --- a/Modules/IO/Bruker/include/itkBruker2dseqImageIO.h +++ b/Modules/IO/Bruker/include/itkBruker2dseqImageIO.h @@ -92,38 +92,38 @@ class ITKIOBruker_EXPORT Bruker2dseqImageIO : public ImageIOBase /** Determine if the necessary files exist to read the specified 2dseq file. * Returns true if all required files exist. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /** Writing files has not been implemented for Bruker 2dseq. * This function will always return false. */ - virtual bool CanWriteFile( const char *itkNotUsed(FileNameToWrite) ) ITK_OVERRIDE + bool CanWriteFile( const char *itkNotUsed(FileNameToWrite) ) override { return false; } /** Not implemented. */ - virtual void WriteImageInformation() ITK_OVERRIDE + void WriteImageInformation() override { return; } /** Not implemented - does nothing */ - virtual void Write( const void *itkNotUsed(buffer) ) ITK_OVERRIDE + void Write( const void *itkNotUsed(buffer) ) override { return; } protected: Bruker2dseqImageIO(); - ~Bruker2dseqImageIO() ITK_OVERRIDE; + ~Bruker2dseqImageIO() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Bruker2dseqImageIO); diff --git a/Modules/IO/Bruker/include/itkBruker2dseqImageIOFactory.h b/Modules/IO/Bruker/include/itkBruker2dseqImageIOFactory.h index e04f232153b..5285b8b391e 100644 --- a/Modules/IO/Bruker/include/itkBruker2dseqImageIOFactory.h +++ b/Modules/IO/Bruker/include/itkBruker2dseqImageIOFactory.h @@ -45,9 +45,9 @@ class ITKIOBruker_EXPORT Bruker2dseqImageIOFactory : public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -66,7 +66,7 @@ class ITKIOBruker_EXPORT Bruker2dseqImageIOFactory : public ObjectFactoryBase protected: Bruker2dseqImageIOFactory(); - virtual ~Bruker2dseqImageIOFactory() ITK_OVERRIDE; + ~Bruker2dseqImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Bruker2dseqImageIOFactory); diff --git a/Modules/IO/CSV/include/itkCSVArray2DDataObject.h b/Modules/IO/CSV/include/itkCSVArray2DDataObject.h index eabb12fc483..a819c9ebd12 100644 --- a/Modules/IO/CSV/include/itkCSVArray2DDataObject.h +++ b/Modules/IO/CSV/include/itkCSVArray2DDataObject.h @@ -148,9 +148,9 @@ class ITK_TEMPLATE_EXPORT CSVArray2DDataObject:public DataObject protected: CSVArray2DDataObject(); - virtual ~CSVArray2DDataObject() ITK_OVERRIDE {} + ~CSVArray2DDataObject() override {} /** Print method */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: MatrixType m_Matrix; diff --git a/Modules/IO/CSV/include/itkCSVArray2DFileReader.h b/Modules/IO/CSV/include/itkCSVArray2DFileReader.h index 794b78f625a..53fc492a3cc 100644 --- a/Modules/IO/CSV/include/itkCSVArray2DFileReader.h +++ b/Modules/IO/CSV/include/itkCSVArray2DFileReader.h @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT CSVArray2DFileReader:public CSVFileReaderBase * column headers, if any, into std::vectors of strings and parses the numeric * data into an Array2D object. The vectors and the Array2D object are part of * the Array2DDataFrameobject. */ - virtual void Parse() ITK_OVERRIDE; + void Parse() override; /** Aliased to the Parse() method to be consistent with the rest of the * pipeline. */ @@ -118,10 +118,10 @@ class ITK_TEMPLATE_EXPORT CSVArray2DFileReader:public CSVFileReaderBase protected: CSVArray2DFileReader(); - virtual ~CSVArray2DFileReader () ITK_OVERRIDE {} + ~CSVArray2DFileReader () override {} /** Print the reader. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/IO/CSV/include/itkCSVFileReaderBase.h b/Modules/IO/CSV/include/itkCSVFileReaderBase.h index 8531af1f080..67c7825867c 100644 --- a/Modules/IO/CSV/include/itkCSVFileReaderBase.h +++ b/Modules/IO/CSV/include/itkCSVFileReaderBase.h @@ -171,9 +171,9 @@ class ITKIOCSV_EXPORT CSVFileReaderBase:public LightProcessObject std::string m_Line; CSVFileReaderBase(); - virtual ~CSVFileReaderBase() ITK_OVERRIDE {} + ~CSVFileReaderBase() override {} /** Print method */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Check that all essential components are present and plugged in. */ void PrepareForParsing(); diff --git a/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.h b/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.h index 0a8708f91a7..51b92d98075 100644 --- a/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.h +++ b/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.h @@ -113,8 +113,8 @@ class ITK_TEMPLATE_EXPORT CSVNumericObjectFileWriter:public LightProcessObject protected: CSVNumericObjectFileWriter(); - virtual ~CSVNumericObjectFileWriter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE; + ~CSVNumericObjectFileWriter() override {} + void PrintSelf(std::ostream &os, Indent indent) const override; private: std::string m_FileName; diff --git a/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx b/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx index ba1cf71f010..642958f9521 100644 --- a/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx +++ b/Modules/IO/CSV/include/itkCSVNumericObjectFileWriter.hxx @@ -32,7 +32,7 @@ CSVNumericObjectFileWriter ::CSVNumericObjectFileWriter() { this->m_FieldDelimiterCharacter = ','; - this->m_InputObject = ITK_NULLPTR; + this->m_InputObject = nullptr; } template @@ -110,7 +110,7 @@ CSVNumericObjectFileWriter } // throw an exception if no input object is provided - if ( this->m_InputObject == ITK_NULLPTR ) + if ( this->m_InputObject == nullptr ) { itkExceptionMacro( << "An input object was not specified!" ); } diff --git a/Modules/IO/DCMTK/include/itkDCMTKFileReader.h b/Modules/IO/DCMTK/include/itkDCMTKFileReader.h index 8bbee3768a8..4af272443f2 100644 --- a/Modules/IO/DCMTK/include/itkDCMTKFileReader.h +++ b/Modules/IO/DCMTK/include/itkDCMTKFileReader.h @@ -63,7 +63,7 @@ class ITK_FORWARD_EXPORT DCMTKSequence; class ITKIODCMTK_EXPORT DCMTKItem { public: - DCMTKItem() : m_DcmItem(ITK_NULLPTR) + DCMTKItem() : m_DcmItem(nullptr) { } void SetDcmItem(DcmItem *item); @@ -79,7 +79,7 @@ class ITKIODCMTK_EXPORT DCMTKItem class ITKIODCMTK_EXPORT DCMTKSequence { public: - DCMTKSequence() : m_DcmSequenceOfItems(ITK_NULLPTR) {} + DCMTKSequence() : m_DcmSequenceOfItems(nullptr) {} void SetDcmSequenceOfItems(DcmSequenceOfItems *seq); int card() const; int GetSequence(unsigned long index, @@ -188,7 +188,7 @@ class ITKIODCMTK_EXPORT DCMTKSequence } DcmDecimalString *dsItem = dynamic_cast(resultStack.top()); - if(dsItem == ITK_NULLPTR) + if(dsItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Can't get DecimalString Element at tag " << std::hex << group << " " @@ -238,8 +238,8 @@ class ITKIODCMTK_EXPORT DCMTKFileReader public: typedef DCMTKFileReader Self; - DCMTKFileReader() : m_DFile(ITK_NULLPTR), - m_Dataset(ITK_NULLPTR), + DCMTKFileReader() : m_DFile(nullptr), + m_Dataset(nullptr), m_Xfer(EXS_Unknown), m_FrameCount(0), m_FileNumber(-1L) @@ -280,7 +280,7 @@ class ITKIODCMTK_EXPORT DCMTKFileReader << element << std::dec); } DcmDecimalString *dsItem = dynamic_cast(el); - if(dsItem == ITK_NULLPTR) + if(dsItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex diff --git a/Modules/IO/DCMTK/include/itkDCMTKImageIO.h b/Modules/IO/DCMTK/include/itkDCMTKImageIO.h index 12c5e7fe81b..cb69ed6ba67 100644 --- a/Modules/IO/DCMTK/include/itkDCMTKImageIO.h +++ b/Modules/IO/DCMTK/include/itkDCMTKImageIO.h @@ -76,26 +76,26 @@ class ITKIODCMTK_EXPORT DCMTKImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine the file type. Returns true if this ImageIO can write the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; /** Set the DCMTK Message Logging Level */ void SetLogLevel(LogLevel level); @@ -103,8 +103,8 @@ class ITKIODCMTK_EXPORT DCMTKImageIO:public ImageIOBase LogLevel GetLogLevel() const; DCMTKImageIO(); - ~DCMTKImageIO(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DCMTKImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DCMTKImageIO); diff --git a/Modules/IO/DCMTK/include/itkDCMTKImageIOFactory.h b/Modules/IO/DCMTK/include/itkDCMTKImageIOFactory.h index 2dad5191e81..e80b0ec4484 100644 --- a/Modules/IO/DCMTK/include/itkDCMTKImageIOFactory.h +++ b/Modules/IO/DCMTK/include/itkDCMTKImageIOFactory.h @@ -38,9 +38,9 @@ class ITKIODCMTK_EXPORT DCMTKImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion() const ITK_OVERRIDE; + const char * GetITKSourceVersion() const override; - virtual const char * GetDescription() const ITK_OVERRIDE; + const char * GetDescription() const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); diff --git a/Modules/IO/DCMTK/include/itkDCMTKSeriesFileNames.h b/Modules/IO/DCMTK/include/itkDCMTKSeriesFileNames.h index aeec47f5c14..91eaa4bc493 100644 --- a/Modules/IO/DCMTK/include/itkDCMTKSeriesFileNames.h +++ b/Modules/IO/DCMTK/include/itkDCMTKSeriesFileNames.h @@ -168,8 +168,8 @@ class ITKIODCMTK_EXPORT DCMTKSeriesFileNames:public ProcessObject itkBooleanMacro(LoadPrivateTags); protected: DCMTKSeriesFileNames(); - ~DCMTKSeriesFileNames(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DCMTKSeriesFileNames() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DCMTKSeriesFileNames); diff --git a/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx b/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx index 6ba821f1cd0..183d7c38790 100644 --- a/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx +++ b/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx @@ -114,7 +114,7 @@ ::GetSequence(unsigned long index, DcmItem *item = this->m_DcmSequenceOfItems->getItem(index); DcmSequenceOfItems *sequence = dynamic_cast(item); - if(sequence == ITK_NULLPTR) + if(sequence == nullptr) { DCMTKExceptionOrErrorReturn(<< "Can't find DCMTKSequence at index " << index); } @@ -134,7 +134,7 @@ ::GetElementCS(const unsigned short group, this->GetStack(group,element,resultStack,throwException); DcmCodeString *codeStringElement = dynamic_cast(resultStack.top()); - if(codeStringElement == ITK_NULLPTR) + if(codeStringElement == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find CodeString Element " << std::hex @@ -169,7 +169,7 @@ ::GetElementOB(const unsigned short group, this->GetStack(group,element,resultStack,throwException); DcmOtherByteOtherWord *obItem = dynamic_cast(resultStack.top()); - if(obItem == ITK_NULLPTR) + if(obItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -216,7 +216,7 @@ GetElementFD(const unsigned short group, DcmStack resultStack; this->GetStack(group,element,resultStack); DcmFloatingPointDouble *fdItem = dynamic_cast(resultStack.top()); - if(fdItem == ITK_NULLPTR) + if(fdItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Can't get CodeString Element at tag " << std::hex << group << " " @@ -267,7 +267,7 @@ ::GetElementDS(const unsigned short group, DcmStack resultStack; this->GetStack(group,element,resultStack); DcmDecimalString *decimalStringElement = dynamic_cast(resultStack.top()); - if(decimalStringElement == ITK_NULLPTR) + if(decimalStringElement == nullptr) { DCMTKExceptionOrErrorReturn(<< "Can't get DecimalString Element at tag " << std::hex << group << " " @@ -300,7 +300,7 @@ ::GetElementSQ(const unsigned short group, this->GetStack(group,element,resultStack); DcmSequenceOfItems *seqElement = dynamic_cast(resultStack.top()); - if(seqElement == ITK_NULLPTR) + if(seqElement == nullptr) { DCMTKExceptionOrErrorReturn(<< "Can't get at tag " << std::hex << group << " " @@ -317,7 +317,7 @@ ::GetElementItem(unsigned short index, const bool throwException) const { DcmItem *itemElement = this->m_DcmSequenceOfItems->getItem(index); - if(itemElement == ITK_NULLPTR) + if(itemElement == nullptr) { DCMTKExceptionOrErrorReturn(<< "Can't get item " << index @@ -339,7 +339,7 @@ ::GetElementTM(const unsigned short group, this->GetStack(group,element,resultStack); DcmTime *dcmTime = dynamic_cast(resultStack.top()); - if(dcmTime == ITK_NULLPTR) + if(dcmTime == nullptr) { DCMTKExceptionOrErrorReturn(<< "Can't get at tag " << std::hex << group << " " @@ -464,7 +464,7 @@ ::GetElementLO(const unsigned short group, << element << std::dec); } DcmLongString *loItem = dynamic_cast(el); - if(loItem == ITK_NULLPTR) + if(loItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -501,7 +501,7 @@ ::GetElementLO(const unsigned short group, << element << std::dec); } DcmLongString *loItem = dynamic_cast(el); - if(loItem == ITK_NULLPTR) + if(loItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -539,7 +539,7 @@ ::GetElementDS(const unsigned short group, << element << std::dec); } DcmDecimalString *dsItem = dynamic_cast(el); - if(dsItem == ITK_NULLPTR) + if(dsItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -577,7 +577,7 @@ ::GetElementFD(const unsigned short group, << element << std::dec); } DcmFloatingPointDouble *fdItem = dynamic_cast(el); - if(fdItem == ITK_NULLPTR) + if(fdItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -634,7 +634,7 @@ ::GetElementFL(const unsigned short group, << element << std::dec); } DcmFloatingPointSingle *flItem = dynamic_cast(el); - if(flItem == ITK_NULLPTR) + if(flItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -701,7 +701,7 @@ ::GetElementUS(const unsigned short group, << element << std::dec); } DcmUnsignedShort *usItem = dynamic_cast(el); - if(usItem == ITK_NULLPTR) + if(usItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -731,7 +731,7 @@ ::GetElementUS(const unsigned short group, << element << std::dec); } DcmUnsignedShort *usItem = dynamic_cast(el); - if(usItem == ITK_NULLPTR) + if(usItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -763,7 +763,7 @@ ::GetElementCS(const unsigned short group, << element << std::dec); } DcmCodeString *csItem = dynamic_cast(el); - if(csItem == ITK_NULLPTR) + if(csItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -818,7 +818,7 @@ ::GetElementPN(const unsigned short group, << element << std::dec); } DcmPersonName *pnItem = dynamic_cast(el); - if(pnItem == ITK_NULLPTR) + if(pnItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -857,7 +857,7 @@ ::GetElementIS(const unsigned short group, << element << std::dec); } DcmIntegerString *isItem = dynamic_cast(el); - if(isItem == ITK_NULLPTR) + if(isItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -891,7 +891,7 @@ ::GetElementSL(const unsigned short group, << element << std::dec); } DcmSignedLong *isItem = dynamic_cast(el); - if(isItem == ITK_NULLPTR) + if(isItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -963,7 +963,7 @@ ::GetElementOB(const unsigned short group, << element << std::dec); } DcmOtherByteOtherWord *obItem = dynamic_cast(el); - if(obItem == ITK_NULLPTR) + if(obItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Cant find DecimalString element " << std::hex << group << " " << std::hex @@ -1017,7 +1017,7 @@ ::GetElementUI(const unsigned short group, << entry << std::dec); } DcmUniqueIdentifier *uiItem = dynamic_cast(el); - if(uiItem == ITK_NULLPTR) + if(uiItem == nullptr) { DCMTKExceptionOrErrorReturn(<< "Can't convert data item " << group << "," << entry); @@ -1052,7 +1052,7 @@ GetElementDA(const unsigned short group, << element << std::dec); } DcmDate *dcmDate = dynamic_cast(el); - if(dcmDate == ITK_NULLPTR) + if(dcmDate == nullptr) { DCMTKExceptionOrErrorReturn(<< "Can't get at tag " << std::hex << group << " " @@ -1081,7 +1081,7 @@ ::GetElementTM(const unsigned short group, << element << std::dec); } DcmTime *dcmTime = dynamic_cast(el); - if(dcmTime == ITK_NULLPTR) + if(dcmTime == nullptr) { DCMTKExceptionOrErrorReturn(<< "Can't get at tag " << std::hex << group << " " diff --git a/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx b/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx index ac1be956cb1..5b50aeed262 100644 --- a/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx +++ b/Modules/IO/DCMTK/src/itkDCMTKImageIO.cxx @@ -36,7 +36,7 @@ namespace itk /** Constructor */ DCMTKImageIO::DCMTKImageIO() { - m_DImage = ITK_NULLPTR; + m_DImage = nullptr; // standard ImageIOBase variables m_ByteOrder = BigEndian; @@ -202,21 +202,21 @@ void DCMTKImageIO ::OpenDicomImage() { - if(this->m_DImage != ITK_NULLPTR) + if(this->m_DImage != nullptr) { if( !this->m_DicomImageSetByUser && this->m_FileName != this->m_LastFileName) { delete m_DImage; - this->m_DImage = ITK_NULLPTR; + this->m_DImage = nullptr; } } - if( m_DImage == ITK_NULLPTR ) + if( m_DImage == nullptr ) { m_DImage = new DicomImage( m_FileName.c_str() ); this->m_LastFileName = this->m_FileName; } - if(this->m_DImage == ITK_NULLPTR) + if(this->m_DImage == nullptr) { itkExceptionMacro(<< "Can't create DicomImage for " << this->m_FileName) @@ -435,7 +435,7 @@ void DCMTKImageIO::ReadImageInformation() this->OpenDicomImage(); const DiPixel *interData = this->m_DImage->getInterData(); - if(interData == ITK_NULLPTR) + if(interData == nullptr) { itkExceptionMacro(<< "Missing Image Data in " << this->m_FileName); diff --git a/Modules/IO/DCMTK/src/itkDCMTKSeriesFileNames.cxx b/Modules/IO/DCMTK/src/itkDCMTKSeriesFileNames.cxx index e66976e8b0b..02e72ae5847 100644 --- a/Modules/IO/DCMTK/src/itkDCMTKSeriesFileNames.cxx +++ b/Modules/IO/DCMTK/src/itkDCMTKSeriesFileNames.cxx @@ -47,7 +47,7 @@ ::SetInputDirectory(const char *name) { if ( !name ) { - itkExceptionMacro(<< "SetInputDirectory() received a ITK_NULLPTR string"); + itkExceptionMacro(<< "SetInputDirectory() received a nullptr string"); } std::string fname = name; this->SetInputDirectory(fname); diff --git a/Modules/IO/GDCM/include/itkGDCMImageIO.h b/Modules/IO/GDCM/include/itkGDCMImageIO.h index 861d9aa3f2f..3bcfdf22bb9 100644 --- a/Modules/IO/GDCM/include/itkGDCMImageIO.h +++ b/Modules/IO/GDCM/include/itkGDCMImageIO.h @@ -93,13 +93,13 @@ class ITKIOGDCM_EXPORT GDCMImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimesion information for the current filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /** Set/Get the original component type of the image. This differs from * ComponentType which may change as a function of rescale slope and @@ -111,15 +111,15 @@ class ITKIOGDCM_EXPORT GDCMImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can write the * file specified. GDCM triggers on ".dcm" and ".dicom". */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Writes the spacing and dimensions of the image. * Assumes SetFileName has been called with a valid file name. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegion has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; /** Macro to access Rescale Slope and Rescale Intercept. Which are * needed to rescale properly image when needed. User then need to @@ -260,8 +260,8 @@ class ITKIOGDCM_EXPORT GDCMImageIO:public ImageIOBase protected: GDCMImageIO(); - ~GDCMImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GDCMImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; void InternalReadImageInformation(); diff --git a/Modules/IO/GDCM/include/itkGDCMImageIOFactory.h b/Modules/IO/GDCM/include/itkGDCMImageIOFactory.h index 9e19ee3b6a7..201137d283b 100644 --- a/Modules/IO/GDCM/include/itkGDCMImageIOFactory.h +++ b/Modules/IO/GDCM/include/itkGDCMImageIOFactory.h @@ -38,9 +38,9 @@ class ITKIOGDCM_EXPORT GDCMImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion() const ITK_OVERRIDE; + const char * GetITKSourceVersion() const override; - virtual const char * GetDescription() const ITK_OVERRIDE; + const char * GetDescription() const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,7 +58,7 @@ class ITKIOGDCM_EXPORT GDCMImageIOFactory:public ObjectFactoryBase protected: GDCMImageIOFactory(); - ~GDCMImageIOFactory() ITK_OVERRIDE; + ~GDCMImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GDCMImageIOFactory); diff --git a/Modules/IO/GDCM/include/itkGDCMSeriesFileNames.h b/Modules/IO/GDCM/include/itkGDCMSeriesFileNames.h index f8f93b436f2..1f7614fe1c4 100644 --- a/Modules/IO/GDCM/include/itkGDCMSeriesFileNames.h +++ b/Modules/IO/GDCM/include/itkGDCMSeriesFileNames.h @@ -170,8 +170,8 @@ class ITKIOGDCM_EXPORT GDCMSeriesFileNames:public ProcessObject protected: GDCMSeriesFileNames(); - ~GDCMSeriesFileNames() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GDCMSeriesFileNames() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GDCMSeriesFileNames); diff --git a/Modules/IO/GDCM/src/itkGDCMImageIO.cxx b/Modules/IO/GDCM/src/itkGDCMImageIO.cxx index 2ea3587a7b1..e8ec12f6b41 100644 --- a/Modules/IO/GDCM/src/itkGDCMImageIO.cxx +++ b/Modules/IO/GDCM/src/itkGDCMImageIO.cxx @@ -61,7 +61,7 @@ namespace itk class InternalHeader { public: - InternalHeader():m_Header(ITK_NULLPTR) {} + InternalHeader():m_Header(nullptr) {} ~InternalHeader() { delete m_Header; diff --git a/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx b/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx index d2d01fa31c3..a297ed3abf8 100644 --- a/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx +++ b/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx @@ -44,7 +44,7 @@ void GDCMSeriesFileNames::SetInputDirectory(const char *name) { if ( !name ) { - itkExceptionMacro(<< "SetInputDirectory() received a ITK_NULLPTR string"); + itkExceptionMacro(<< "SetInputDirectory() received a nullptr string"); } std::string fname = name; this->SetInputDirectory(fname); @@ -153,7 +153,7 @@ const GDCMSeriesFileNames::FileNamesContainerType & GDCMSeriesFileNames::GetFile gdcm::File *header = *it; if ( !header ) { - itkWarningMacro(<< "GDCMSeriesFileNames got ITK_NULLPTR header, " + itkWarningMacro(<< "GDCMSeriesFileNames got nullptr header, " "this is a serious bug"); continue; } diff --git a/Modules/IO/GE/include/itkGE4ImageIO.h b/Modules/IO/GE/include/itkGE4ImageIO.h index d93af8f4ce2..45ada45ab03 100644 --- a/Modules/IO/GE/include/itkGE4ImageIO.h +++ b/Modules/IO/GE/include/itkGE4ImageIO.h @@ -77,7 +77,7 @@ class ITKIOGE_EXPORT GE4ImageIO:public IPLCommonImageIO * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this ImageIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ // Implemented in superclass @@ -119,10 +119,10 @@ class ITKIOGE_EXPORT GE4ImageIO:public IPLCommonImageIO protected: GE4ImageIO(); - ~GE4ImageIO() ITK_OVERRIDE; + ~GE4ImageIO() override; // Implemented in Superclass // void PrintSelf(std::ostream& os, Indent indent) const; - virtual GEImageHeader * ReadHeader(const char *FileNameToRead) ITK_OVERRIDE; + GEImageHeader * ReadHeader(const char *FileNameToRead) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GE4ImageIO); diff --git a/Modules/IO/GE/include/itkGE4ImageIOFactory.h b/Modules/IO/GE/include/itkGE4ImageIOFactory.h index cccad85dbfe..cf16e61fa90 100644 --- a/Modules/IO/GE/include/itkGE4ImageIOFactory.h +++ b/Modules/IO/GE/include/itkGE4ImageIOFactory.h @@ -39,9 +39,9 @@ class ITKIOGE_EXPORT GE4ImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -59,8 +59,8 @@ class ITKIOGE_EXPORT GE4ImageIOFactory:public ObjectFactoryBase protected: GE4ImageIOFactory(); - ~GE4ImageIOFactory() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GE4ImageIOFactory() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GE4ImageIOFactory); diff --git a/Modules/IO/GE/include/itkGE5ImageIO.h b/Modules/IO/GE/include/itkGE5ImageIO.h index be7807f4f9f..110c541fa70 100644 --- a/Modules/IO/GE/include/itkGE5ImageIO.h +++ b/Modules/IO/GE/include/itkGE5ImageIO.h @@ -69,14 +69,14 @@ class ITKIOGE_EXPORT GE5ImageIO:public IPLCommonImageIO * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this ImageIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /* * Set the spacing and dimension information for the set filename. */ // Implemented in superclass // virtual void ReadImageInformation(); /** Modify Origin and direction */ - virtual void ModifyImageInformation() ITK_OVERRIDE; + void ModifyImageInformation() override; /* * Get the type of the pixel. */ // Implemented in superclass @@ -114,9 +114,9 @@ class ITKIOGE_EXPORT GE5ImageIO:public IPLCommonImageIO protected: GE5ImageIO(); - ~GE5ImageIO() ITK_OVERRIDE; + ~GE5ImageIO() override; - virtual GEImageHeader * ReadHeader(const char *FileNameToRead) ITK_OVERRIDE; + GEImageHeader * ReadHeader(const char *FileNameToRead) override; private: int CheckGE5xImages(char const *const imageFileTemplate, std::string & reason); diff --git a/Modules/IO/GE/include/itkGE5ImageIOFactory.h b/Modules/IO/GE/include/itkGE5ImageIOFactory.h index ec8f7d199ad..f8b94e8ca03 100644 --- a/Modules/IO/GE/include/itkGE5ImageIOFactory.h +++ b/Modules/IO/GE/include/itkGE5ImageIOFactory.h @@ -39,9 +39,9 @@ class ITKIOGE_EXPORT GE5ImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -59,8 +59,8 @@ class ITKIOGE_EXPORT GE5ImageIOFactory:public ObjectFactoryBase protected: GE5ImageIOFactory(); - ~GE5ImageIOFactory() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GE5ImageIOFactory() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GE5ImageIOFactory); diff --git a/Modules/IO/GE/include/itkGEAdwImageIO.h b/Modules/IO/GE/include/itkGEAdwImageIO.h index 88df93d8dca..f75e285c79f 100644 --- a/Modules/IO/GE/include/itkGEAdwImageIO.h +++ b/Modules/IO/GE/include/itkGEAdwImageIO.h @@ -68,7 +68,7 @@ class ITKIOGE_EXPORT GEAdwImageIO:public IPLCommonImageIO * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this ImageIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /* * Set the spacing and dimension information for the set filename. */ // Implemented in superclass @@ -110,10 +110,10 @@ class ITKIOGE_EXPORT GEAdwImageIO:public IPLCommonImageIO protected: GEAdwImageIO(); - ~GEAdwImageIO() ITK_OVERRIDE; + ~GEAdwImageIO() override; // Implemented in superclass // void PrintSelf(std::ostream& os, Indent indent) const; - virtual GEImageHeader * ReadHeader(const char *FileNameToRead) ITK_OVERRIDE; + GEImageHeader * ReadHeader(const char *FileNameToRead) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GEAdwImageIO); diff --git a/Modules/IO/GE/include/itkGEAdwImageIOFactory.h b/Modules/IO/GE/include/itkGEAdwImageIOFactory.h index 2af868fd953..5b79130d8b1 100644 --- a/Modules/IO/GE/include/itkGEAdwImageIOFactory.h +++ b/Modules/IO/GE/include/itkGEAdwImageIOFactory.h @@ -39,9 +39,9 @@ class ITKIOGE_EXPORT GEAdwImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -59,8 +59,8 @@ class ITKIOGE_EXPORT GEAdwImageIOFactory:public ObjectFactoryBase protected: GEAdwImageIOFactory(); - ~GEAdwImageIOFactory() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GEAdwImageIOFactory() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GEAdwImageIOFactory); diff --git a/Modules/IO/GE/src/itkGE4ImageIO.cxx b/Modules/IO/GE/src/itkGE4ImageIO.cxx index 1444e12d194..1d5d006edbe 100644 --- a/Modules/IO/GE/src/itkGE4ImageIO.cxx +++ b/Modules/IO/GE/src/itkGE4ImageIO.cxx @@ -58,10 +58,10 @@ bool GE4ImageIO::CanReadFile(const char *FileNameToRead) } tmpStr[16] = '\0'; // if none of these strings show up, most likely not GE4 - if ( strstr (tmpStr, "CORONAL") == ITK_NULLPTR - && strstr (tmpStr, "SAGITTAL") == ITK_NULLPTR - && strstr (tmpStr, "AXIAL") == ITK_NULLPTR - && strstr (tmpStr, "OBLIQUE") == ITK_NULLPTR ) + if ( strstr (tmpStr, "CORONAL") == nullptr + && strstr (tmpStr, "SAGITTAL") == nullptr + && strstr (tmpStr, "AXIAL") == nullptr + && strstr (tmpStr, "OBLIQUE") == nullptr ) { f.close(); return false; @@ -81,9 +81,9 @@ GEImageHeader * GE4ImageIO::ReadHeader(const char *FileNameToRead) #else #define RGEDEBUG(x) #endif - if ( FileNameToRead == ITK_NULLPTR || strlen(FileNameToRead) == 0 ) + if ( FileNameToRead == nullptr || strlen(FileNameToRead) == 0 ) { - return ITK_NULLPTR; + return nullptr; } // // need to check if this is a valid file before going further @@ -92,7 +92,7 @@ GEImageHeader * GE4ImageIO::ReadHeader(const char *FileNameToRead) RAISE_EXCEPTION(); } GEImageHeader *hdr = new GEImageHeader; - if ( hdr == ITK_NULLPTR ) + if ( hdr == nullptr ) { RAISE_EXCEPTION(); } @@ -157,7 +157,7 @@ GEImageHeader * GE4ImageIO::ReadHeader(const char *FileNameToRead) this->GetStringAt(f, SIGNA_SEHDR_START * 2 + SIGNA_SEHDR_PLANENAME * 2, tmpStr, 16); tmpStr[16] = '\0'; - if ( strstr (tmpStr, "CORONAL") != ITK_NULLPTR ) + if ( strstr (tmpStr, "CORONAL") != nullptr ) { //hdr->imagePlane = // itk::SpatialOrientation::ITK_ANALYZE_ORIENTATION_IRP_CORONAL; @@ -165,7 +165,7 @@ GEImageHeader * GE4ImageIO::ReadHeader(const char *FileNameToRead) // brains2 filter. hdr->coordinateOrientation = itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RSP; } - else if ( strstr (tmpStr, "SAGITTAL") != ITK_NULLPTR ) + else if ( strstr (tmpStr, "SAGITTAL") != nullptr ) { //hdr->imagePlane = // itk::SpatialOrientation::ITK_ANALYZE_ORIENTATION_IRP_SAGITTAL; @@ -173,7 +173,7 @@ GEImageHeader * GE4ImageIO::ReadHeader(const char *FileNameToRead) // brains2 filter. hdr->coordinateOrientation = itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_AIR; } - else if ( strstr (tmpStr, "AXIAL") != ITK_NULLPTR ) + else if ( strstr (tmpStr, "AXIAL") != nullptr ) { //hdr->imagePlane = // itk::SpatialOrientation::ITK_ANALYZE_ORIENTATION_IRP_TRANSVERSE; @@ -329,7 +329,7 @@ GEImageHeader * GE4ImageIO::ReadHeader(const char *FileNameToRead) // status = stat (imageFile, &statBuf); // if (status == -1) // { - // return (ITK_NULLPTR); + // return (nullptr); // } // // hdr->offset = statBuf.st_size - (hdr->imageXsize * hdr->imageYsize * 2); diff --git a/Modules/IO/GE/src/itkGE5ImageIO.cxx b/Modules/IO/GE/src/itkGE5ImageIO.cxx index 54dcf94077d..d8c59081364 100644 --- a/Modules/IO/GE/src/itkGE5ImageIO.cxx +++ b/Modules/IO/GE/src/itkGE5ImageIO.cxx @@ -192,7 +192,7 @@ GE5ImageIO::ReadHeader(const char *FileNameToRead) } curImage = new GEImageHeader; - if ( curImage == ITK_NULLPTR ) + if ( curImage == nullptr ) { itkExceptionMacro( "GE5ImageIO failed to create a GEImageHeader while reading " @@ -260,11 +260,11 @@ GE5ImageIO::ReadHeader(const char *FileNameToRead) #define VOff(a,b) (imageHdr.GENESIS_IH_img_version != 2 ? a : b) // Create a buffer to read the exam header. // Now seek to the exam header and read the data into the buffer. - char *buffer = ITK_NULLPTR; + char *buffer = nullptr; if(pixelHdrFlag) { buffer = new char[imageHdr.GENESIS_IH_img_l_exam]; - if ( buffer == ITK_NULLPTR ) + if ( buffer == nullptr ) { f.close(); itkExceptionMacro("GE5ImageIO:Unable to allocate memory for exam header!"); @@ -275,7 +275,7 @@ GE5ImageIO::ReadHeader(const char *FileNameToRead) else { buffer = new char[GENESIS_EX_HDR_LEN]; - if ( buffer == ITK_NULLPTR ) + if ( buffer == nullptr ) { f.close(); itkExceptionMacro("GE5ImageIO:Unable to allocate memory for exam header!"); @@ -316,14 +316,14 @@ GE5ImageIO::ReadHeader(const char *FileNameToRead) // Done with exam, delete buffer. delete[] buffer; - buffer = ITK_NULLPTR; + buffer = nullptr; // Allocate buffer for series header. // Now seek to the series header and read the data into the buffer. if(pixelHdrFlag) { buffer = new char[imageHdr.GENESIS_IH_img_l_series]; - if ( buffer == ITK_NULLPTR ) + if ( buffer == nullptr ) { f.close(); itkExceptionMacro @@ -335,7 +335,7 @@ GE5ImageIO::ReadHeader(const char *FileNameToRead) else { buffer = new char[GENESIS_SE_HDR_LEN]; - if ( buffer == ITK_NULLPTR ) + if ( buffer == nullptr ) { f.close(); itkExceptionMacro @@ -358,11 +358,11 @@ GE5ImageIO::ReadHeader(const char *FileNameToRead) // Done with series, delete buffer and allocate for MR header. delete[] buffer; - buffer = ITK_NULLPTR; + buffer = nullptr; if(pixelHdrFlag) { buffer = new char[imageHdr.GENESIS_IH_img_l_image]; - if ( buffer == ITK_NULLPTR ) + if ( buffer == nullptr ) { f.close(); itkExceptionMacro("GE5ImageIO:Unable to allocate memory for MR header!"); @@ -374,7 +374,7 @@ GE5ImageIO::ReadHeader(const char *FileNameToRead) else { buffer = new char[GENESIS_MR_HDR_LEN]; - if ( buffer == ITK_NULLPTR ) + if ( buffer == nullptr ) { f.close(); itkExceptionMacro("GE5ImageIO:Unable to allocate memory for MR header!"); diff --git a/Modules/IO/GE/src/itkGEAdwImageIO.cxx b/Modules/IO/GE/src/itkGEAdwImageIO.cxx index 69c9e87868a..e9fec777032 100644 --- a/Modules/IO/GE/src/itkGEAdwImageIO.cxx +++ b/Modules/IO/GE/src/itkGEAdwImageIO.cxx @@ -99,7 +99,7 @@ GEImageHeader * GEAdwImageIO::ReadHeader(const char *FileNameToRead) RAISE_EXCEPTION(); } GEImageHeader *hdr = new GEImageHeader; - if ( hdr == ITK_NULLPTR ) + if ( hdr == nullptr ) { RAISE_EXCEPTION(); } @@ -112,7 +112,7 @@ GEImageHeader * GEAdwImageIO::ReadHeader(const char *FileNameToRead) this->GetStringAt(f, GE_ADW_EX_PATID, tmpbuf, 12); tmpbuf[12] = '\0'; hdr->patientId[0] = '\0'; - for ( char *ptr = strtok(tmpbuf, "-"); ptr != ITK_NULLPTR; ptr = strtok(ITK_NULLPTR, "-") ) + for ( char *ptr = strtok(tmpbuf, "-"); ptr != nullptr; ptr = strtok(nullptr, "-") ) { strcat(hdr->patientId, ptr); } diff --git a/Modules/IO/GIPL/include/itkGiplImageIO.h b/Modules/IO/GIPL/include/itkGiplImageIO.h index 77c7d42fa96..0545a64e9fb 100644 --- a/Modules/IO/GIPL/include/itkGiplImageIO.h +++ b/Modules/IO/GIPL/include/itkGiplImageIO.h @@ -54,30 +54,30 @@ class ITKIOGIPL_EXPORT GiplImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine the file type. Returns true if this ImageIO can write the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; GiplImageIO(); - ~GiplImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GiplImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GiplImageIO); diff --git a/Modules/IO/GIPL/include/itkGiplImageIOFactory.h b/Modules/IO/GIPL/include/itkGiplImageIOFactory.h index 57ad1b34247..72722afba2f 100644 --- a/Modules/IO/GIPL/include/itkGiplImageIOFactory.h +++ b/Modules/IO/GIPL/include/itkGiplImageIOFactory.h @@ -38,9 +38,9 @@ class ITKIOGIPL_EXPORT GiplImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,7 +58,7 @@ class ITKIOGIPL_EXPORT GiplImageIOFactory:public ObjectFactoryBase protected: GiplImageIOFactory(); - ~GiplImageIOFactory() ITK_OVERRIDE; + ~GiplImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GiplImageIOFactory); diff --git a/Modules/IO/GIPL/src/itkGiplImageIO.cxx b/Modules/IO/GIPL/src/itkGiplImageIO.cxx index b867767588a..173d4802c13 100644 --- a/Modules/IO/GIPL/src/itkGiplImageIO.cxx +++ b/Modules/IO/GIPL/src/itkGiplImageIO.cxx @@ -75,7 +75,7 @@ class GiplImageIOInternals GiplImageIO::GiplImageIO() { m_Internal = new GiplImageIOInternals; - m_Internal->m_GzFile = ITK_NULLPTR; + m_Internal->m_GzFile = nullptr; m_ByteOrder = BigEndian; m_IsCompressed = false; } @@ -85,10 +85,10 @@ GiplImageIO::~GiplImageIO() { if ( m_IsCompressed ) { - if ( m_Internal->m_GzFile != ITK_NULLPTR ) + if ( m_Internal->m_GzFile != nullptr ) { gzclose(m_Internal->m_GzFile); - m_Internal->m_GzFile = ITK_NULLPTR; + m_Internal->m_GzFile = nullptr; } } else @@ -146,7 +146,7 @@ bool GiplImageIO::CanReadFile(const char *filename) else { m_Internal->m_GzFile = gzopen(filename, "rb"); - if ( m_Internal->m_GzFile == ITK_NULLPTR ) + if ( m_Internal->m_GzFile == nullptr ) { return false; } @@ -167,11 +167,11 @@ bool GiplImageIO::CanReadFile(const char *filename) if ( ( magic_number == GIPL_MAGIC_NUMBER ) || ( magic_number == GIPL_MAGIC_NUMBER2 ) ) { gzclose(m_Internal->m_GzFile); - m_Internal->m_GzFile = ITK_NULLPTR; + m_Internal->m_GzFile = nullptr; return true; } gzclose(m_Internal->m_GzFile); - m_Internal->m_GzFile = ITK_NULLPTR; + m_Internal->m_GzFile = nullptr; } return false; } @@ -219,7 +219,7 @@ void GiplImageIO::Read(void *buffer) bool success; if ( m_IsCompressed ) { - if ( p != ITK_NULLPTR ) + if ( p != nullptr ) { success = true; } @@ -236,7 +236,7 @@ void GiplImageIO::Read(void *buffer) if ( m_IsCompressed ) { gzclose(m_Internal->m_GzFile); - m_Internal->m_GzFile = ITK_NULLPTR; + m_Internal->m_GzFile = nullptr; } else { @@ -263,7 +263,7 @@ void GiplImageIO::ReadImageInformation() if ( m_IsCompressed ) { m_Internal->m_GzFile = gzopen(m_FileName.c_str(), "rb"); - if ( m_Internal->m_GzFile == ITK_NULLPTR ) + if ( m_Internal->m_GzFile == nullptr ) { ExceptionObject exception(__FILE__, __LINE__); exception.SetDescription("File cannot be read"); @@ -719,7 +719,7 @@ ::Write(const void *buffer) if ( m_IsCompressed ) { m_Internal->m_GzFile = gzopen(m_FileName.c_str(), "wb"); - if ( m_Internal->m_GzFile == ITK_NULLPTR ) + if ( m_Internal->m_GzFile == nullptr ) { ExceptionObject exception(__FILE__, __LINE__); exception.SetDescription("File cannot be write"); @@ -1088,7 +1088,7 @@ ::Write(const void *buffer) if ( m_IsCompressed ) { gzclose(m_Internal->m_GzFile); - m_Internal->m_GzFile = ITK_NULLPTR; + m_Internal->m_GzFile = nullptr; } else { diff --git a/Modules/IO/HDF5/include/itkHDF5ImageIO.h b/Modules/IO/HDF5/include/itkHDF5ImageIO.h index 019b2adcba4..8be7ffdd542 100644 --- a/Modules/IO/HDF5/include/itkHDF5ImageIO.h +++ b/Modules/IO/HDF5/include/itkHDF5ImageIO.h @@ -106,13 +106,13 @@ class ITKIOHDF5_EXPORT HDF5ImageIO: public StreamingImageIOBase * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this ImageIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ @@ -122,22 +122,22 @@ class ITKIOHDF5_EXPORT HDF5ImageIO: public StreamingImageIOBase * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this ImageIO can write the file specified. */ - virtual bool CanWriteFile(const char *FileNameToWrite) ITK_OVERRIDE; + bool CanWriteFile(const char *FileNameToWrite) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; protected: HDF5ImageIO(); - ~HDF5ImageIO() ITK_OVERRIDE; + ~HDF5ImageIO() override; - virtual SizeType GetHeaderSize(void) const ITK_OVERRIDE; + SizeType GetHeaderSize(void) const override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HDF5ImageIO); diff --git a/Modules/IO/HDF5/include/itkHDF5ImageIOFactory.h b/Modules/IO/HDF5/include/itkHDF5ImageIOFactory.h index 74d46f85dfd..7c836b279f7 100644 --- a/Modules/IO/HDF5/include/itkHDF5ImageIOFactory.h +++ b/Modules/IO/HDF5/include/itkHDF5ImageIOFactory.h @@ -41,9 +41,9 @@ class ITKIOHDF5_EXPORT HDF5ImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -61,8 +61,8 @@ class ITKIOHDF5_EXPORT HDF5ImageIOFactory:public ObjectFactoryBase protected: HDF5ImageIOFactory(); - ~HDF5ImageIOFactory() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HDF5ImageIOFactory() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HDF5ImageIOFactory); diff --git a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx index 227dd1c30bc..d31588bdffb 100644 --- a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx +++ b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx @@ -25,8 +25,8 @@ namespace itk { -HDF5ImageIO::HDF5ImageIO() : m_H5File(ITK_NULLPTR), - m_VoxelDataSet(ITK_NULLPTR), +HDF5ImageIO::HDF5ImageIO() : m_H5File(nullptr), + m_VoxelDataSet(nullptr), m_ImageInformationWritten(false) { } @@ -450,7 +450,7 @@ ::ReadScalar(const std::string &DataSetName) itkExceptionMacro(<< "Wrong # of dims for TransformType " << "in HDF5 File"); } - Space.getSimpleExtentDims(dim,ITK_NULLPTR); + Space.getSimpleExtentDims(dim,nullptr); if(dim[0] != 1) { itkExceptionMacro(<< "Elements > 1 for scalar type " @@ -538,7 +538,7 @@ ::ReadVector(const std::string &DataSetName) itkExceptionMacro(<< "Wrong # of dims for TransformType " << "in HDF5 File"); } - Space.getSimpleExtentDims(dim,ITK_NULLPTR); + Space.getSimpleExtentDims(dim,nullptr); vec.resize(dim[0]); TScalar *buf = new TScalar[dim[0]]; H5::PredType vecType = @@ -594,7 +594,7 @@ ::ReadDirections(const std::string &path) itkExceptionMacro(<< " Wrong # of dims for Image Directions " << "in HDF5 File"); } - dirSpace.getSimpleExtentDims(dim,ITK_NULLPTR); + dirSpace.getSimpleExtentDims(dim,nullptr); rval.resize(dim[1]); for(unsigned i = 0; i < dim[1]; i++) { @@ -669,10 +669,10 @@ ::CanWriteFile(const char *FileNameToWrite) { const char *extensions[] = { - ".hdf",".h4",".hdf4",".h5",".hdf5",".he4",".he5",".hd5",ITK_NULLPTR, + ".hdf",".h4",".hdf4",".h5",".hdf5",".he4",".he5",".hd5",nullptr, }; std::string ext(itksys::SystemTools::GetFilenameLastExtension(FileNameToWrite)); - for(unsigned i = 0; extensions[i] != ITK_NULLPTR; i++) + for(unsigned i = 0; extensions[i] != nullptr; i++) { if(ext == extensions[i]) { @@ -747,11 +747,11 @@ void HDF5ImageIO ::CloseH5File() { - if(this->m_H5File != ITK_NULLPTR) + if(this->m_H5File != nullptr) { this->m_H5File->close(); delete this->m_H5File; - this->m_H5File = ITK_NULLPTR; + this->m_H5File = nullptr; } } @@ -759,11 +759,11 @@ void HDF5ImageIO ::CloseDataSet() { - if(this->m_VoxelDataSet != ITK_NULLPTR) + if(this->m_VoxelDataSet != nullptr) { m_VoxelDataSet->close(); delete m_VoxelDataSet; - this->m_VoxelDataSet = ITK_NULLPTR; + this->m_VoxelDataSet = nullptr; } } @@ -1126,7 +1126,7 @@ ::WriteMeta(const std::string &name,MetaDataObjectBase *metaObjBase) { MetaDataObject *metaObj = dynamic_cast *>(metaObjBase); - if(metaObj == ITK_NULLPTR) + if(metaObj == nullptr) { return false; } @@ -1143,7 +1143,7 @@ ::WriteMetaArray(const std::string &name,MetaDataObjectBase *metaObjBase) typedef MetaDataObject< Array > MetaDataArrayObject; MetaDataArrayObject *metaObj = dynamic_cast(metaObjBase); - if(metaObj == ITK_NULLPTR) + if(metaObj == nullptr) { return false; } @@ -1357,10 +1357,10 @@ ::WriteImageInformation(void) dynamic_cast *>(metaObj); MetaDataObject *constCstringObj = dynamic_cast *>(metaObj); - if(cstringObj != ITK_NULLPTR || constCstringObj != ITK_NULLPTR) + if(cstringObj != nullptr || constCstringObj != nullptr) { const char *val; - if(cstringObj != ITK_NULLPTR) + if(cstringObj != nullptr) { val = cstringObj->GetMetaDataObjectValue(); } @@ -1377,7 +1377,7 @@ ::WriteImageInformation(void) { MetaDataObject *stdStringObj = dynamic_cast *>(metaObj); - if(stdStringObj != ITK_NULLPTR) + if(stdStringObj != nullptr) { std::string val = stdStringObj->GetMetaDataObjectValue(); this->WriteString(objName,val); diff --git a/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx b/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx index 8918a857861..111f0de4c27 100644 --- a/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx +++ b/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx @@ -61,10 +61,10 @@ class DemoImageSource:public GenerateImageSource< TOutputImage > { m_Value = NumericTraits< typename TOutputImage::PixelType >::ZeroValue(); } - ~DemoImageSource() ITK_OVERRIDE {} + ~DemoImageSource() override {} /** Does the real work. */ - virtual void GenerateData() ITK_OVERRIDE + void GenerateData() override { TOutputImage* out = this->GetOutput(); out->SetBufferedRegion(out->GetRequestedRegion()); diff --git a/Modules/IO/IPL/include/itkIPLCommonImageIO.h b/Modules/IO/IPL/include/itkIPLCommonImageIO.h index 8e1d1a41e75..e768b481b9e 100644 --- a/Modules/IO/IPL/include/itkIPLCommonImageIO.h +++ b/Modules/IO/IPL/include/itkIPLCommonImageIO.h @@ -80,21 +80,21 @@ class ITKIOIPL_EXPORT IPLCommonImageIO:public ImageIOBase * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this ImageIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Optionally, modify spacing, origin and direction */ virtual void ModifyImageInformation() {} /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /** Compute the size (in bytes) of the components of a pixel. For * example, and RGB pixel of unsigned char would have a * component size of 1 byte. */ - virtual unsigned int GetComponentSize() const ITK_OVERRIDE; + unsigned int GetComponentSize() const override; /*-------- This part of the interfaces deals with writing data. ----- */ @@ -104,14 +104,14 @@ class ITKIOIPL_EXPORT IPLCommonImageIO:public ImageIOBase * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this ImageIO can write the file specified. */ - virtual bool CanWriteFile(const char *FileNameToWrite) ITK_OVERRIDE; + bool CanWriteFile(const char *FileNameToWrite) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; /** Set sorting method by name ascending. */ virtual void SortImageListByNameAscend(); @@ -121,8 +121,8 @@ class ITKIOIPL_EXPORT IPLCommonImageIO:public ImageIOBase protected: IPLCommonImageIO(); - ~IPLCommonImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~IPLCommonImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; int AddElementToList(char const *const filename, const float sliceLocation, diff --git a/Modules/IO/IPL/include/itkIPLFileNameList.h b/Modules/IO/IPL/include/itkIPLFileNameList.h index b2ff2c67417..9ff52a3fba1 100644 --- a/Modules/IO/IPL/include/itkIPLFileNameList.h +++ b/Modules/IO/IPL/include/itkIPLFileNameList.h @@ -77,12 +77,12 @@ class IPLFileSortInfo m_SliceOffset = 0; m_EchoNumber = 0; m_ImageNumber = 0; - m_Data = ITK_NULLPTR; + m_Data = nullptr; } IPLFileSortInfo(const char *const filename, float sliceLocation, int sliceOffset, int echoNumber, int imageNumber, - void *data = ITK_NULLPTR) + void *data = nullptr) { m_ImageFileName = filename; m_SliceLocation = sliceLocation; @@ -168,7 +168,7 @@ class ITKIOIPL_EXPORT IPLFileNameList {} if ( it == itend ) { - return ITK_NULLPTR; + return nullptr; } return *it; } diff --git a/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx b/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx index 6e6863a79e0..025ec38f7c4 100644 --- a/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx +++ b/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx @@ -24,12 +24,12 @@ #include "itkMetaDataObject.h" #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include //From uiig library "The University of Iowa Imaging Group-UIIG" @@ -43,7 +43,7 @@ IPLCommonImageIO::IPLCommonImageIO() ByteSwapper< int >::SystemIsBigEndian() ? ImageIOBase::BigEndian : ImageIOBase::LittleEndian; - m_ImageHeader = ITK_NULLPTR; + m_ImageHeader = nullptr; m_FilenameList = new IPLFileNameList; this->SetComponentType(ImageIOBase::SHORT); } @@ -104,7 +104,7 @@ GEImageHeader * IPLCommonImageIO::ReadHeader(const char *) // // must be redefined in a child class // - return ITK_NULLPTR; + return nullptr; } bool IPLCommonImageIO::CanReadFile(const char *) @@ -178,7 +178,7 @@ void IPLCommonImageIO::ReadImageInformation() imageMask[IOCommon::ITK_MAXPATHLEN] = '\0'; char *lastslash = strrchr(imagePath, '/'); - if ( lastslash == ITK_NULLPTR ) + if ( lastslash == nullptr ) { strcpy(imagePath, "."); } @@ -202,7 +202,7 @@ void IPLCommonImageIO::ReadImageInformation() char fullPath[IOCommon::ITK_MAXPATHLEN + 1]; sprintf(fullPath, "%s/%s", imagePath, curFname); - if ( curFname == ITK_NULLPTR ) + if ( curFname == nullptr ) { break; } @@ -511,7 +511,7 @@ ::statTimeToAscii(void *clock, char *timeString,int len) strncpy (timeString, asciiTime, len); timeString[len-1] = '\0'; char *newline; - if((newline = strrchr(timeString,'\n')) != ITK_NULLPTR || + if((newline = strrchr(timeString,'\n')) != nullptr || (newline = strrchr(timeString,'\r'))) { *newline = '\0'; diff --git a/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h b/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h index 6cf31109fa6..7da148de9b6 100644 --- a/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h +++ b/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h @@ -103,8 +103,8 @@ class ITKIOImageBase_EXPORT ArchetypeSeriesFileNames:public Object protected: ArchetypeSeriesFileNames(); - ~ArchetypeSeriesFileNames() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ArchetypeSeriesFileNames() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Method that actually does the archetype matching/grouping */ void Scan(); diff --git a/Modules/IO/ImageBase/include/itkImageFileReader.h b/Modules/IO/ImageBase/include/itkImageFileReader.h index 4b6986acdb1..9534885a50c 100644 --- a/Modules/IO/ImageBase/include/itkImageFileReader.h +++ b/Modules/IO/ImageBase/include/itkImageFileReader.h @@ -118,8 +118,8 @@ class ITKIOImageBase_HIDDEN ImageFileReader:public ImageSource< TOutputImage > protected: ImageFileReader(); - ~ImageFileReader() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageFileReader() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Convert a block of pixels from one type to another. */ void DoConvertBuffer(void *buffer, size_t numberOfPixels); @@ -133,17 +133,17 @@ class ITKIOImageBase_HIDDEN ImageFileReader:public ImageSource< TOutputImage > /** Prepare the allocation of the output image during the first back * propagation of the pipeline. */ - virtual void GenerateOutputInformation(void) ITK_OVERRIDE; + void GenerateOutputInformation(void) override; /** Give the reader a chance to indicate that it will produce more * output than it was requested to produce. ImageFileReader cannot * currently read a portion of an image (since the ImageIO objects * cannot read a portion of an image), so the ImageFileReader must * enlarge the RequestedRegion to the size of the image on disk. */ - virtual void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; /** Does the real work. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; ImageIOBase::Pointer m_ImageIO; diff --git a/Modules/IO/ImageBase/include/itkImageFileReader.hxx b/Modules/IO/ImageBase/include/itkImageFileReader.hxx index 23ee11cbcfb..3a13dbb1dd2 100644 --- a/Modules/IO/ImageBase/include/itkImageFileReader.hxx +++ b/Modules/IO/ImageBase/include/itkImageFileReader.hxx @@ -34,7 +34,7 @@ template< typename TOutputImage, typename ConvertPixelTraits > ImageFileReader< TOutputImage, ConvertPixelTraits > ::ImageFileReader() { - m_ImageIO = ITK_NULLPTR; + m_ImageIO = nullptr; this->SetFileName(""); m_UserSpecifiedImageIO = false; m_UseStreaming = true; @@ -396,7 +396,7 @@ void ImageFileReader< TOutputImage, ConvertPixelTraits > itkDebugMacro (<< "Setting imageIO IORegion to: " << m_ActualIORegion); m_ImageIO->SetIORegion(m_ActualIORegion); - char *loadBuffer = ITK_NULLPTR; + char *loadBuffer = nullptr; // the size of the buffer is computed based on the actual number of // pixels to be read and the actual size of the pixels to be read // (as opposed to the sizes of the output) @@ -466,7 +466,7 @@ void ImageFileReader< TOutputImage, ConvertPixelTraits > // clean up delete[] loadBuffer; - loadBuffer = ITK_NULLPTR; + loadBuffer = nullptr; // then rethrow throw; @@ -476,7 +476,7 @@ void ImageFileReader< TOutputImage, ConvertPixelTraits > // clean up delete[] loadBuffer; - loadBuffer = ITK_NULLPTR; + loadBuffer = nullptr; } template< typename TOutputImage, typename ConvertPixelTraits > diff --git a/Modules/IO/ImageBase/include/itkImageFileReaderException.h b/Modules/IO/ImageBase/include/itkImageFileReaderException.h index c218b7d5bdc..b30511f0c1e 100644 --- a/Modules/IO/ImageBase/include/itkImageFileReaderException.h +++ b/Modules/IO/ImageBase/include/itkImageFileReaderException.h @@ -50,7 +50,7 @@ class ITKIOImageBase_EXPORT ImageFileReaderException:public ExceptionObject {} /** Has to have empty throw(). */ - virtual ~ImageFileReaderException() ITK_NOEXCEPT ITK_OVERRIDE; + ~ImageFileReaderException() ITK_NOEXCEPT override; }; } #endif // itkImageFileReaderException_h diff --git a/Modules/IO/ImageBase/include/itkImageFileWriter.h b/Modules/IO/ImageBase/include/itkImageFileWriter.h index e85128116ac..4302c8a9e2c 100644 --- a/Modules/IO/ImageBase/include/itkImageFileWriter.h +++ b/Modules/IO/ImageBase/include/itkImageFileWriter.h @@ -51,7 +51,7 @@ class ITKIOImageBase_EXPORT ImageFileWriterException:public ExceptionObject {} /** Has to have empty throw(). */ - virtual ~ImageFileWriterException() ITK_NOEXCEPT ITK_OVERRIDE; + ~ImageFileWriterException() ITK_NOEXCEPT override; }; /** \class ImageFileWriter @@ -144,7 +144,7 @@ class ITKIOImageBase_HIDDEN ImageFileWriter:public ProcessObject * LargestPossibleRegion. */ virtual void Write(); - /** Specify the region to write. If left ITK_NULLPTR, then the whole image + /** Specify the region to write. If left nullptr, then the whole image * is written. */ void SetIORegion(const ImageIORegion & region); @@ -160,7 +160,7 @@ class ITKIOImageBase_HIDDEN ImageFileWriter:public ProcessObject /** Aliased to the Write() method to be consistent with the rest of the * pipeline. */ - virtual void Update() ITK_OVERRIDE + void Update() override { this->Write(); } @@ -170,7 +170,7 @@ class ITKIOImageBase_HIDDEN ImageFileWriter:public ProcessObject * Updates the pipeline, streaming it the NumberOfStreamDivisions times. * Existing PasteIORegion is reset. */ - virtual void UpdateLargestPossibleRegion() ITK_OVERRIDE + void UpdateLargestPossibleRegion() override { m_PasteIORegion = ImageIORegion(TInputImage::ImageDimension); m_UserSpecifiedIORegion = false; @@ -194,11 +194,11 @@ class ITKIOImageBase_HIDDEN ImageFileWriter:public ProcessObject protected: ImageFileWriter(); - ~ImageFileWriter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageFileWriter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Does the real work. */ - virtual void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageFileWriter); diff --git a/Modules/IO/ImageBase/include/itkImageFileWriter.hxx b/Modules/IO/ImageBase/include/itkImageFileWriter.hxx index 2364c162bd1..97c7bb77093 100644 --- a/Modules/IO/ImageBase/include/itkImageFileWriter.hxx +++ b/Modules/IO/ImageBase/include/itkImageFileWriter.hxx @@ -111,7 +111,7 @@ ImageFileWriter< TInputImage > itkDebugMacro(<< "Writing an image file"); // Make sure input is available - if ( input == ITK_NULLPTR ) + if ( input == nullptr ) { itkExceptionMacro(<< "No input to writer!"); } @@ -243,14 +243,14 @@ ImageFileWriter< TInputImage > if ( strcmp(input->GetNameOfClass(), "VectorImage") == 0 ) { typedef typename InputImageType::InternalPixelType VectorImageScalarType; - m_ImageIO->SetPixelTypeInfo(static_cast(ITK_NULLPTR)); + m_ImageIO->SetPixelTypeInfo(static_cast(nullptr)); typedef typename InputImageType::AccessorFunctorType AccessorFunctorType; m_ImageIO->SetNumberOfComponents( AccessorFunctorType::GetVectorLength(input) ); } else { // Set the pixel and component type; the number of components. - m_ImageIO->SetPixelTypeInfo(static_cast(ITK_NULLPTR)); + m_ImageIO->SetPixelTypeInfo(static_cast(nullptr)); } // Setup the image IO for writing. diff --git a/Modules/IO/ImageBase/include/itkImageIOBase.h b/Modules/IO/ImageBase/include/itkImageIOBase.h index a1bd1a8c9bc..6b760bccaff 100644 --- a/Modules/IO/ImageBase/include/itkImageIOBase.h +++ b/Modules/IO/ImageBase/include/itkImageIOBase.h @@ -540,8 +540,8 @@ class ITKIOImageBase_EXPORT ImageIOBase:public LightProcessObject protected: ImageIOBase(); - ~ImageIOBase() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageIOBase() override; + void PrintSelf(std::ostream & os, Indent indent) const override; virtual const ImageRegionSplitterBase* GetImageRegionSplitter() const; diff --git a/Modules/IO/ImageBase/include/itkImageIOFactory.h b/Modules/IO/ImageBase/include/itkImageIOFactory.h index eb0e638434a..4ce09d51ff4 100644 --- a/Modules/IO/ImageBase/include/itkImageIOFactory.h +++ b/Modules/IO/ImageBase/include/itkImageIOFactory.h @@ -54,7 +54,7 @@ class ITKIOImageBase_EXPORT ImageIOFactory:public Object protected: ImageIOFactory(); - ~ImageIOFactory() ITK_OVERRIDE; + ~ImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageIOFactory); diff --git a/Modules/IO/ImageBase/include/itkImageSeriesReader.h b/Modules/IO/ImageBase/include/itkImageSeriesReader.h index 7b5b87e402a..04ae747b588 100644 --- a/Modules/IO/ImageBase/include/itkImageSeriesReader.h +++ b/Modules/IO/ImageBase/include/itkImageSeriesReader.h @@ -136,14 +136,14 @@ class ITKIOImageBase_HIDDEN ImageSeriesReader:public ImageSource< TOutputImage > /** Prepare the allocation of the output image during the first back * propagation of the pipeline. */ - virtual void GenerateOutputInformation(void) ITK_OVERRIDE; + void GenerateOutputInformation(void) override; /** Give the reader a chance to indicate that it will produce more * output than it was requested to produce. ImageSeriesReader cannot * currently read a portion of an image (since the ImageIO objects * cannot read a portion of an image), so the ImageSeriesReader must * enlarge the RequestedRegion to the size of the image on disk. */ - virtual void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; /** Get access to the Array of MetaDataDictionaries which are * updated in the GenerateData methods */ @@ -156,17 +156,17 @@ class ITKIOImageBase_HIDDEN ImageSeriesReader:public ImageSource< TOutputImage > protected: ImageSeriesReader() : - m_ImageIO(ITK_NULLPTR), + m_ImageIO(nullptr), m_ReverseOrder(false), m_NumberOfDimensionsInImage(0), m_UseStreaming(true), m_MetaDataDictionaryArrayUpdate(true) {} - ~ImageSeriesReader() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageSeriesReader() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Does the real work. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** The image format, 0 will use the factory mechnism. */ ImageIOBase::Pointer m_ImageIO; diff --git a/Modules/IO/ImageBase/include/itkImageSeriesWriter.h b/Modules/IO/ImageBase/include/itkImageSeriesWriter.h index 3e03bf240d4..13769e04fb1 100644 --- a/Modules/IO/ImageBase/include/itkImageSeriesWriter.h +++ b/Modules/IO/ImageBase/include/itkImageSeriesWriter.h @@ -34,7 +34,7 @@ class ITKIOImageBase_EXPORT ImageSeriesWriterException:public ExceptionObject { public: /** Has to have empty throw(). */ - virtual ~ImageSeriesWriterException() ITK_NOEXCEPT ITK_OVERRIDE; + ~ImageSeriesWriterException() ITK_NOEXCEPT override; /** Run-time information. */ itkTypeMacro(ImageSeriesWriterException, ExceptionObject); @@ -133,7 +133,7 @@ class ITKIOImageBase_HIDDEN ImageSeriesWriter:public ProcessObject /** Aliased to the Write() method to be consistent with the rest of the * pipeline. */ - virtual void Update() ITK_OVERRIDE + void Update() override { this->Write(); } @@ -199,11 +199,11 @@ class ITKIOImageBase_HIDDEN ImageSeriesWriter:public ProcessObject protected: ImageSeriesWriter(); - ~ImageSeriesWriter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageSeriesWriter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Does the real work. */ - virtual void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; /** Transition method used for DEPRECATING old functionality. * This method should be removed after release ITK 1.8 */ diff --git a/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx b/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx index c6b00647f8c..9336832f5f0 100644 --- a/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx +++ b/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx @@ -39,9 +39,9 @@ namespace itk template< typename TInputImage, typename TOutputImage > ImageSeriesWriter< TInputImage, TOutputImage > ::ImageSeriesWriter(): - m_ImageIO(ITK_NULLPTR), m_UserSpecifiedImageIO(false), + m_ImageIO(nullptr), m_UserSpecifiedImageIO(false), m_SeriesFormat("%d"), - m_StartIndex(1), m_IncrementIndex(1), m_MetaDataDictionaryArray(ITK_NULLPTR) + m_StartIndex(1), m_IncrementIndex(1), m_MetaDataDictionaryArray(nullptr) { m_UseCompression = false; } @@ -92,7 +92,7 @@ ImageSeriesWriter< TInputImage, TOutputImage > itkDebugMacro(<< "Writing an image file"); // Make sure input is available - if ( inputImage == ITK_NULLPTR ) + if ( inputImage == nullptr ) { itkExceptionMacro(<< "No input to writer!"); } @@ -140,7 +140,7 @@ ImageSeriesWriter< TInputImage, TOutputImage > if ( !inputImage ) { - itkExceptionMacro(<< "Input image is ITK_NULLPTR"); + itkExceptionMacro(<< "Input image is nullptr"); } m_FileNames.clear(); @@ -193,7 +193,7 @@ ImageSeriesWriter< TInputImage, TOutputImage > if ( !inputImage ) { - itkExceptionMacro(<< "Input image is ITK_NULLPTR"); + itkExceptionMacro(<< "Input image is nullptr"); } // We need two regions. One for the input, one for the output. diff --git a/Modules/IO/ImageBase/include/itkNumericSeriesFileNames.h b/Modules/IO/ImageBase/include/itkNumericSeriesFileNames.h index 0afb70424c9..1ab9cbbd67b 100644 --- a/Modules/IO/ImageBase/include/itkNumericSeriesFileNames.h +++ b/Modules/IO/ImageBase/include/itkNumericSeriesFileNames.h @@ -95,8 +95,8 @@ class ITKIOImageBase_EXPORT NumericSeriesFileNames:public Object protected: NumericSeriesFileNames(); - ~NumericSeriesFileNames() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NumericSeriesFileNames() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NumericSeriesFileNames); diff --git a/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h b/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h index 6ea3e4fff64..4467cfd6ac9 100644 --- a/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h +++ b/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h @@ -114,8 +114,8 @@ class ITKIOImageBase_EXPORT RegularExpressionSeriesFileNames:public Object m_NumericSort(false), m_RegularExpression(".*\\.([0-9]+)") {} - ~RegularExpressionSeriesFileNames() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RegularExpressionSeriesFileNames() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RegularExpressionSeriesFileNames); diff --git a/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h b/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h index c9dcea15e99..931271f7317 100644 --- a/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h +++ b/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h @@ -63,31 +63,31 @@ class ITKIOImageBase_EXPORT StreamingImageIOBase:public ImageIOBase // see super class for documentation // // overidden to return true - virtual bool CanStreamWrite(void) ITK_OVERRIDE; + bool CanStreamWrite(void) override; // see super class for documentation // // overidden to return true - virtual bool CanStreamRead(void) ITK_OVERRIDE; + bool CanStreamRead(void) override; // see super class for documentation // // If UseStreamedReading is true, then returned region is the // requested region parameter. - virtual ImageIORegion GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requested) const ITK_OVERRIDE; + ImageIORegion GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requested) const override; // see super class for documentation // // Verifies the set file name meets the pasting requirements, then calls // GetActualNumberOfSplitsForWritingCanStreamWrite - virtual unsigned int GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, + unsigned int GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, const ImageIORegion & pasteRegion, - const ImageIORegion & largestPossibleRegion) ITK_OVERRIDE; + const ImageIORegion & largestPossibleRegion) override; protected: StreamingImageIOBase(); // virtual ~StreamingImageIOBase(); not needed - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** \brief Returns true if GetIORegion is not the same size as the * largest region give by GetNumberOfDimensions. diff --git a/Modules/IO/ImageBase/src/itkImageIOBase.cxx b/Modules/IO/ImageBase/src/itkImageIOBase.cxx index cf028535d35..a0a6ecef38e 100644 --- a/Modules/IO/ImageBase/src/itkImageIOBase.cxx +++ b/Modules/IO/ImageBase/src/itkImageIOBase.cxx @@ -83,7 +83,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/IO/ImageBase/src/itkImageIOFactory.cxx b/Modules/IO/ImageBase/src/itkImageIOFactory.cxx index d0f4069ca3b..b4725f5654b 100644 --- a/Modules/IO/ImageBase/src/itkImageIOFactory.cxx +++ b/Modules/IO/ImageBase/src/itkImageIOFactory.cxx @@ -72,6 +72,6 @@ ImageIOFactory::CreateImageIO(const char *path, FileModeType mode) } } } - return ITK_NULLPTR; + return nullptr; } } // end namespace itk diff --git a/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx b/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx index 7ce511ddd9d..877f8cf2762 100644 --- a/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx +++ b/Modules/IO/ImageBase/src/itkNumericSeriesFileNames.cxx @@ -19,7 +19,7 @@ #define _itkNumericSeriesFileNames_h #include "itkNumericSeriesFileNames.h" -#include +#include namespace itk { diff --git a/Modules/IO/ImageBase/test/itkFileFreeImageIO.h b/Modules/IO/ImageBase/test/itkFileFreeImageIO.h index 92c942ec07d..b7979a0ae0c 100644 --- a/Modules/IO/ImageBase/test/itkFileFreeImageIO.h +++ b/Modules/IO/ImageBase/test/itkFileFreeImageIO.h @@ -48,32 +48,32 @@ class FileFreeImageIO : public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char*) ITK_OVERRIDE; + bool CanReadFile(const char*) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void* buffer) ITK_OVERRIDE; + void Read(void* buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanWriteFile(const char*) ITK_OVERRIDE; + bool CanWriteFile(const char*) override; /** Writes the header of the image. * Assumes SetFileName has been called with a valid file name. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegion has been set properly. */ - virtual void Write(const void* buffer) ITK_OVERRIDE; + void Write(const void* buffer) override; protected: FileFreeImageIO(); ~FileFreeImageIO(); - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FileFreeImageIO); diff --git a/Modules/IO/ImageBase/test/itkFileFreeImageIOFactory.h b/Modules/IO/ImageBase/test/itkFileFreeImageIOFactory.h index d2119f5aeac..f9da34bdfcf 100644 --- a/Modules/IO/ImageBase/test/itkFileFreeImageIOFactory.h +++ b/Modules/IO/ImageBase/test/itkFileFreeImageIOFactory.h @@ -35,8 +35,8 @@ class FileFreeImageIOFactory : public ObjectFactoryBase typedef SmartPointer ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char* GetITKSourceVersion() const ITK_OVERRIDE; - virtual const char* GetDescription() const ITK_OVERRIDE; + const char* GetITKSourceVersion() const override; + const char* GetDescription() const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); diff --git a/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx b/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx index a85493477e5..1cd7bcf2433 100644 --- a/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx +++ b/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx @@ -17,7 +17,7 @@ *=========================================================================*/ #include "itkInternationalizationIOHelpers.h" -#include // for strcmp (cstring cannot be used on both Sun and VS6) +#include // for strcmp (cstring cannot be used on both Sun and VS6) // Some utility functions for the test #if defined(ITK_SUPPORTS_WCHAR_T_FILENAME_CSTYLEIO) \ @@ -44,7 +44,7 @@ bool checkAlphaExists() utf8_str += ".txt"; FILE * tmp = fopen(utf8_str.c_str(), "r"); #endif - if (tmp!=ITK_NULLPTR) + if (tmp!=nullptr) { // closing is required at least for mingw to be able to delete the file afterwards fclose(tmp); @@ -134,7 +134,7 @@ int main( int , char * [] ) ++nberror; } - if (wfile!=ITK_NULLPTR) + if (wfile!=nullptr) { fputs("test",wfile); fclose(wfile); @@ -147,11 +147,11 @@ int main( int , char * [] ) FILE * rfile = itk::i18n::I18nFopen(utf8_str, "rb"); - if (rfile!=ITK_NULLPTR) + if (rfile!=nullptr) { char teststring[10]; char * retptr = fgets(teststring, 10, rfile); - if (retptr!=ITK_NULLPTR) + if (retptr!=nullptr) { std::cout << "teststring=" << teststring < ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -59,7 +59,7 @@ class ITKIOJPEG_EXPORT JPEGImageIOFactory:public ObjectFactoryBase protected: JPEGImageIOFactory(); - ~JPEGImageIOFactory() ITK_OVERRIDE; + ~JPEGImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(JPEGImageIOFactory); diff --git a/Modules/IO/JPEG/src/itkJPEGImageIO.cxx b/Modules/IO/JPEG/src/itkJPEGImageIO.cxx index f33b9138303..92c11560fee 100644 --- a/Modules/IO/JPEG/src/itkJPEGImageIO.cxx +++ b/Modules/IO/JPEG/src/itkJPEGImageIO.cxx @@ -20,7 +20,7 @@ #include "itksys/SystemTools.hxx" #include "itk_jpeg.h" -#include +#include // create an error handler for jpeg that // can longjmp out of the jpeg library @@ -71,14 +71,14 @@ bool wrapSetjmp( itk_jpeg_error_mgr & jerr ) class JPEGFileWrapper { public: - JPEGFileWrapper(const char *const fname, const char *const openMode):m_FilePointer(ITK_NULLPTR) + JPEGFileWrapper(const char *const fname, const char *const openMode):m_FilePointer(nullptr) { m_FilePointer = fopen(fname, openMode); } virtual ~JPEGFileWrapper() { - if ( m_FilePointer != ITK_NULLPTR ) + if ( m_FilePointer != nullptr ) { fclose(m_FilePointer); } @@ -135,7 +135,7 @@ bool JPEGImageIO::CanReadFile(const char *file) // Now check the file header JPEGFileWrapper JPEGfp(file, "rb"); - if ( JPEGfp.m_FilePointer == ITK_NULLPTR ) + if ( JPEGfp.m_FilePointer == nullptr ) { return false; } diff --git a/Modules/IO/LSM/include/itkLSMImageIO.h b/Modules/IO/LSM/include/itkLSMImageIO.h index 1fb4e702df2..ea1c06b8395 100644 --- a/Modules/IO/LSM/include/itkLSMImageIO.h +++ b/Modules/IO/LSM/include/itkLSMImageIO.h @@ -62,32 +62,32 @@ class ITKIOLSM_EXPORT LSMImageIO:public TIFFImageIO /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimesion information for the current filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Writes the spacing and dimensions of the image. * Assumes SetFileName has been called with a valid file name. */ - virtual void WriteImageInformation() ITK_OVERRIDE {} + void WriteImageInformation() override {} /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegion has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; protected: LSMImageIO(); - ~LSMImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LSMImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LSMImageIO); diff --git a/Modules/IO/LSM/include/itkLSMImageIOFactory.h b/Modules/IO/LSM/include/itkLSMImageIOFactory.h index e3609290cd2..ce01915b628 100644 --- a/Modules/IO/LSM/include/itkLSMImageIOFactory.h +++ b/Modules/IO/LSM/include/itkLSMImageIOFactory.h @@ -48,9 +48,9 @@ class ITKIOLSM_EXPORT LSMImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class Methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion() const ITK_OVERRIDE; + const char * GetITKSourceVersion() const override; - virtual const char * GetDescription() const ITK_OVERRIDE; + const char * GetDescription() const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -68,7 +68,7 @@ class ITKIOLSM_EXPORT LSMImageIOFactory:public ObjectFactoryBase protected: LSMImageIOFactory(); - ~LSMImageIOFactory() ITK_OVERRIDE; + ~LSMImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LSMImageIOFactory); diff --git a/Modules/IO/LSM/src/itkLSMImageIO.cxx b/Modules/IO/LSM/src/itkLSMImageIO.cxx index d320d583e7c..ba91d81f73b 100644 --- a/Modules/IO/LSM/src/itkLSMImageIO.cxx +++ b/Modules/IO/LSM/src/itkLSMImageIO.cxx @@ -139,7 +139,7 @@ bool LSMImageIO::CanReadFile(const char *filename) } // Check that TIFFImageIO can read this file: - TIFFErrorHandler save = TIFFSetWarningHandler(ITK_NULLPTR); // get rid of warning about + TIFFErrorHandler save = TIFFSetWarningHandler(nullptr); // get rid of warning about // Zeiss tag if ( !this->TIFFImageIO::CanReadFile(filename) ) { @@ -174,7 +174,7 @@ void LSMImageIO::ReadImageInformation() unsigned int tif_cz_lsminfo_size; void *praw = this->TIFFImageIO::ReadRawByteFromTag(TIF_CZ_LSMINFO, tif_cz_lsminfo_size); zeiss_info *zi = reinterpret_cast< zeiss_info * >( praw ); - if ( praw == ITK_NULLPTR + if ( praw == nullptr || tif_cz_lsminfo_size != TIF_CZ_LSMINFO_SIZE ) { // no zeiss info, just use tiff spacing diff --git a/Modules/IO/MINC/include/itkMINCImageIO.h b/Modules/IO/MINC/include/itkMINCImageIO.h index 0af4a09e308..3af9a43d207 100644 --- a/Modules/IO/MINC/include/itkMINCImageIO.h +++ b/Modules/IO/MINC/include/itkMINCImageIO.h @@ -79,7 +79,7 @@ class ITKIOMINC_EXPORT MINCImageIO : public ImageIOBase itkTypeMacro(MINCImageIO, Superclass); /** Right now MINC supports up to 3D with multiple components */ - virtual bool SupportsDimension(unsigned long dim) ITK_OVERRIDE + bool SupportsDimension(unsigned long dim) override { return dim<4; } @@ -93,33 +93,33 @@ class ITKIOMINC_EXPORT MINCImageIO : public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Writes the spacing and dimensions of the image. * Assumes SetFileName has been called with a valid file name. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegion has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; protected: MINCImageIO(); - ~MINCImageIO() ITK_OVERRIDE; + ~MINCImageIO() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void WriteSlice(std::string & fileName, const void *buffer); diff --git a/Modules/IO/MINC/include/itkMINCImageIOFactory.h b/Modules/IO/MINC/include/itkMINCImageIOFactory.h index 020942922e2..2624c562e66 100644 --- a/Modules/IO/MINC/include/itkMINCImageIOFactory.h +++ b/Modules/IO/MINC/include/itkMINCImageIOFactory.h @@ -48,9 +48,9 @@ class ITKIOMINC_EXPORT MINCImageIOFactory : public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion() const ITK_OVERRIDE; + const char * GetITKSourceVersion() const override; - virtual const char * GetDescription() const ITK_OVERRIDE; + const char * GetDescription() const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -68,7 +68,7 @@ class ITKIOMINC_EXPORT MINCImageIOFactory : public ObjectFactoryBase protected: MINCImageIOFactory(); - ~MINCImageIOFactory() ITK_OVERRIDE; + ~MINCImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MINCImageIOFactory); diff --git a/Modules/IO/MINC/src/itkMINCImageIO.cxx b/Modules/IO/MINC/src/itkMINCImageIO.cxx index a492ad9f886..b1b290519a2 100644 --- a/Modules/IO/MINC/src/itkMINCImageIO.cxx +++ b/Modules/IO/MINC/src/itkMINCImageIO.cxx @@ -190,7 +190,7 @@ void MINCImageIO::CleanupDimensions(void) for ( int i = 0; i < this->m_MINCPImpl->m_NDims; i++ ) { mifree_name( this->m_MINCPImpl->m_DimensionName[i] ); - this->m_MINCPImpl->m_DimensionName[i]=ITK_NULLPTR; + this->m_MINCPImpl->m_DimensionName[i]=nullptr; } } @@ -201,12 +201,12 @@ void MINCImageIO::CleanupDimensions(void) delete[] this->m_MINCPImpl->m_MincFileDims; delete[] this->m_MINCPImpl->m_MincApparentDims; - this->m_MINCPImpl->m_DimensionName = ITK_NULLPTR; - this->m_MINCPImpl->m_DimensionSize = ITK_NULLPTR; - this->m_MINCPImpl->m_DimensionStart = ITK_NULLPTR; - this->m_MINCPImpl->m_DimensionStep = ITK_NULLPTR; - this->m_MINCPImpl->m_MincFileDims = ITK_NULLPTR; - this->m_MINCPImpl->m_MincApparentDims = ITK_NULLPTR; + this->m_MINCPImpl->m_DimensionName = nullptr; + this->m_MINCPImpl->m_DimensionSize = nullptr; + this->m_MINCPImpl->m_DimensionStart = nullptr; + this->m_MINCPImpl->m_DimensionStep = nullptr; + this->m_MINCPImpl->m_MincFileDims = nullptr; + this->m_MINCPImpl->m_MincApparentDims = nullptr; } void MINCImageIO::AllocateDimensions(int nDims) @@ -224,7 +224,7 @@ void MINCImageIO::AllocateDimensions(int nDims) for ( int i = 0; i < this->m_MINCPImpl->m_NDims; i++ ) { - this->m_MINCPImpl->m_DimensionName[i] = ITK_NULLPTR; + this->m_MINCPImpl->m_DimensionName[i] = nullptr; this->m_MINCPImpl->m_DimensionSize[i] = 0; this->m_MINCPImpl->m_DimensionStart[i] = 0.0; this->m_MINCPImpl->m_DimensionStep[i] = 0.0; @@ -246,20 +246,20 @@ void MINCImageIO::CloseVolume(void) { miclose_volume( this->m_MINCPImpl->m_Volume ); } - this->m_MINCPImpl->m_Volume = ITK_NULLPTR; + this->m_MINCPImpl->m_Volume = nullptr; } MINCImageIO::MINCImageIO() : m_MINCPImpl(new MINCImageIOPImpl) { this->m_MINCPImpl->m_NDims = 0; - this->m_MINCPImpl->m_DimensionName = ITK_NULLPTR; - this->m_MINCPImpl->m_DimensionSize = ITK_NULLPTR; - this->m_MINCPImpl->m_DimensionStart = ITK_NULLPTR; - this->m_MINCPImpl->m_DimensionStep = ITK_NULLPTR; - this->m_MINCPImpl->m_MincFileDims = ITK_NULLPTR; - this->m_MINCPImpl->m_MincApparentDims = ITK_NULLPTR; - this->m_MINCPImpl->m_Volume = ITK_NULLPTR; + this->m_MINCPImpl->m_DimensionName = nullptr; + this->m_MINCPImpl->m_DimensionSize = nullptr; + this->m_MINCPImpl->m_DimensionStart = nullptr; + this->m_MINCPImpl->m_DimensionStep = nullptr; + this->m_MINCPImpl->m_MincFileDims = nullptr; + this->m_MINCPImpl->m_MincApparentDims = nullptr; + this->m_MINCPImpl->m_Volume = nullptr; for ( int i = 0; i < 5; i++ ) { diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx index a776ea82f1d..e2dedcb5051 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest4.cxx @@ -136,7 +136,7 @@ int itkMINCImageIOTest4( int argc, char * argv [] ) int ret=EXIT_SUCCESS; std::cout.precision( 10 ); - if( test_image_moments >(input,ITK_NULLPTR,total,mx,my,mz,epsilon) != EXIT_SUCCESS ) + if( test_image_moments >(input,nullptr,total,mx,my,mz,epsilon) != EXIT_SUCCESS ) { ret=EXIT_FAILURE; } diff --git a/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx b/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx index 5c254513376..8b589b1e1da 100644 --- a/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx +++ b/Modules/IO/MINC/test/itkMINCImageIOTest_2D.cxx @@ -127,7 +127,7 @@ int itkMINCImageIOTest_2D( int argc, char * argv [] ) // save and restore cout's precision, to silence a Coverity warning std::cout.precision( 10 ); - if( test_image_moments >(input,ITK_NULLPTR,total,mx,my,epsilon) != EXIT_SUCCESS ) + if( test_image_moments >(input,nullptr,total,mx,my,epsilon) != EXIT_SUCCESS ) { ret=EXIT_FAILURE; } diff --git a/Modules/IO/MRC/include/itkMRCHeaderObject.h b/Modules/IO/MRC/include/itkMRCHeaderObject.h index 73ca5f7ca74..67d0a15495b 100644 --- a/Modules/IO/MRC/include/itkMRCHeaderObject.h +++ b/Modules/IO/MRC/include/itkMRCHeaderObject.h @@ -262,13 +262,13 @@ class ITKIOMRC_EXPORT MRCHeaderObject: protected: MRCHeaderObject(); - ~MRCHeaderObject() ITK_OVERRIDE; + ~MRCHeaderObject() override; /** Methods to fix the order of a set header */ void swapHeader(bool bigEndian); /** Prints loads of information from the header */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MRCHeaderObject); diff --git a/Modules/IO/MRC/include/itkMRCImageIO.h b/Modules/IO/MRC/include/itkMRCImageIO.h index 4d1be5142b5..8b94b14be5a 100644 --- a/Modules/IO/MRC/include/itkMRCImageIO.h +++ b/Modules/IO/MRC/include/itkMRCImageIO.h @@ -71,18 +71,18 @@ class ITKIOMRC_EXPORT MRCImageIO : itkTypeMacro(MRCImageIO, StreamingImageIOBase); // we don't use this method - virtual void WriteImageInformation(void) ITK_OVERRIDE {} + void WriteImageInformation(void) override {} //-------- This part of the interface deals with reading data. ------ // See super class for documentation - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; // See super class for documentation - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; // See super class for documentation - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; // -------- This part of the interfaces deals with writing data. ----- @@ -92,10 +92,10 @@ class ITKIOMRC_EXPORT MRCImageIO : * The methods verifies that the file extension is known to be * supported by this class. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; // see super class for documentation - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; /** \todo Move to itkIOCommon with the other MetaDataDictionary * keys, likely rename the symbol to something like @@ -106,13 +106,13 @@ class ITKIOMRC_EXPORT MRCImageIO : protected: MRCImageIO(); // ~MRCImageIO(); // default works - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Overloaded to return the actually header size of the file * specified. The header must be read before this methods is * called. */ - virtual SizeType GetHeaderSize(void) const ITK_OVERRIDE; + SizeType GetHeaderSize(void) const override; private: diff --git a/Modules/IO/MRC/include/itkMRCImageIOFactory.h b/Modules/IO/MRC/include/itkMRCImageIOFactory.h index 8752ae5ae58..70b23c0df4e 100644 --- a/Modules/IO/MRC/include/itkMRCImageIOFactory.h +++ b/Modules/IO/MRC/include/itkMRCImageIOFactory.h @@ -56,9 +56,9 @@ class ITKIOMRC_EXPORT MRCImageIOFactory typedef SmartPointer< const Self > ConstPointer; /** Class Methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -76,7 +76,7 @@ class ITKIOMRC_EXPORT MRCImageIOFactory protected: MRCImageIOFactory(); - ~MRCImageIOFactory() ITK_OVERRIDE; + ~MRCImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MRCImageIOFactory); diff --git a/Modules/IO/MRC/src/itkMRCHeaderObject.cxx b/Modules/IO/MRC/src/itkMRCHeaderObject.cxx index 06a019142f4..b2e91c52048 100644 --- a/Modules/IO/MRC/src/itkMRCHeaderObject.cxx +++ b/Modules/IO/MRC/src/itkMRCHeaderObject.cxx @@ -43,7 +43,7 @@ void MRCHeaderObject::DeepCopy(ConstPointer h) } else { - this->m_ExtendedFeiHeader = ITK_NULLPTR; + this->m_ExtendedFeiHeader = nullptr; } } @@ -109,8 +109,8 @@ bool MRCHeaderObject::SetHeader(const Header *buffer) // clean up delete[] static_cast< char * >( this->m_ExtendedHeader ); - this->m_ExtendedHeader = ITK_NULLPTR; - this->m_ExtendedFeiHeader = ITK_NULLPTR; + this->m_ExtendedHeader = nullptr; + this->m_ExtendedFeiHeader = nullptr; SizeValueType extendedHeaderBytes = 0; if ( this->m_Header.nreal & 1 ) { extendedHeaderBytes += 2; } @@ -168,7 +168,7 @@ bool MRCHeaderObject::SetExtendedHeader(const void *buffer) this->m_ExtendedHeader = new char[this->m_ExtendedHeaderSize]; memcpy(this->m_ExtendedHeader, buffer, this->m_ExtendedHeaderSize); - this->m_ExtendedFeiHeader = ITK_NULLPTR; + this->m_ExtendedFeiHeader = nullptr; if ( this->m_ExtendedHeaderSize == 128 * 1024 && this->m_Header.nint == 0 && this->m_Header.nreal == 32 ) { this->m_ExtendedFeiHeader = static_cast< FeiExtendedHeader * >( this->m_ExtendedHeader ); @@ -194,8 +194,8 @@ bool MRCHeaderObject::IsOriginalHeaderBigEndian(void) const MRCHeaderObject::MRCHeaderObject(void) : m_ExtendedHeaderSize(0), - m_ExtendedHeader(ITK_NULLPTR), - m_ExtendedFeiHeader(ITK_NULLPTR) + m_ExtendedHeader(nullptr), + m_ExtendedFeiHeader(nullptr) { memset( &this->m_Header, 0, sizeof( Header ) ); this->m_BigEndianHeader = ByteSwapper< void * >::SystemIsBE(); diff --git a/Modules/IO/MRC/src/itkMRCImageIO.cxx b/Modules/IO/MRC/src/itkMRCImageIO.cxx index c842885203e..f4c00562928 100644 --- a/Modules/IO/MRC/src/itkMRCImageIO.cxx +++ b/Modules/IO/MRC/src/itkMRCImageIO.cxx @@ -225,7 +225,7 @@ void MRCImageIO::ReadImageInformation(void) // methods to load the data into the MRCHeader member variable void MRCImageIO::InternalReadImageInformation(std::ifstream & file) { - char *buffer = ITK_NULLPTR; + char *buffer = nullptr; try { @@ -264,7 +264,7 @@ void MRCImageIO::InternalReadImageInformation(std::ifstream & file) { // clean up dynamic allocation delete[] buffer; - buffer = ITK_NULLPTR; + buffer = nullptr; throw; } diff --git a/Modules/IO/Mesh/include/itkBYUMeshIO.h b/Modules/IO/Mesh/include/itkBYUMeshIO.h index 20a855b926b..f34941cc1be 100644 --- a/Modules/IO/Mesh/include/itkBYUMeshIO.h +++ b/Modules/IO/Mesh/include/itkBYUMeshIO.h @@ -59,19 +59,19 @@ class ITKIOMesh_EXPORT BYUMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadMeshInformation() ITK_OVERRIDE; + void ReadMeshInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void ReadPoints(void *buffer) ITK_OVERRIDE; + void ReadPoints(void *buffer) override; - virtual void ReadCells(void *buffer) ITK_OVERRIDE; + void ReadCells(void *buffer) override; - virtual void ReadPointData(void *buffer) ITK_OVERRIDE; + void ReadPointData(void *buffer) override; - virtual void ReadCellData(void *buffer) ITK_OVERRIDE; + void ReadCellData(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ @@ -80,21 +80,21 @@ class ITKIOMesh_EXPORT BYUMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can write the file specified. */ - virtual bool CanWriteFile(const char *FileNameToWrite) ITK_OVERRIDE; + bool CanWriteFile(const char *FileNameToWrite) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteMeshInformation() ITK_OVERRIDE; + void WriteMeshInformation() override; /** Writes the data to disk from the memory buffer provided. */ - virtual void WritePoints(void *buffer) ITK_OVERRIDE; + void WritePoints(void *buffer) override; - virtual void WriteCells(void *buffer) ITK_OVERRIDE; + void WriteCells(void *buffer) override; - virtual void WritePointData(void *buffer) ITK_OVERRIDE; + void WritePointData(void *buffer) override; - virtual void WriteCellData(void *buffer) ITK_OVERRIDE; + void WriteCellData(void *buffer) override; - virtual void Write() ITK_OVERRIDE; + void Write() override; protected: /** Write points to output stream */ @@ -137,9 +137,9 @@ class ITKIOMesh_EXPORT BYUMeshIO:public MeshIOBase protected: BYUMeshIO(); - virtual ~BYUMeshIO() ITK_OVERRIDE; + ~BYUMeshIO() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BYUMeshIO); diff --git a/Modules/IO/Mesh/include/itkBYUMeshIOFactory.h b/Modules/IO/Mesh/include/itkBYUMeshIOFactory.h index d2cb2e94f0e..15983170f82 100644 --- a/Modules/IO/Mesh/include/itkBYUMeshIOFactory.h +++ b/Modules/IO/Mesh/include/itkBYUMeshIOFactory.h @@ -38,9 +38,9 @@ class ITKIOMesh_EXPORT BYUMeshIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,9 +58,9 @@ class ITKIOMesh_EXPORT BYUMeshIOFactory:public ObjectFactoryBase protected: BYUMeshIOFactory(); - ~BYUMeshIOFactory() ITK_OVERRIDE; + ~BYUMeshIOFactory() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BYUMeshIOFactory); diff --git a/Modules/IO/Mesh/include/itkFreeSurferAsciiMeshIO.h b/Modules/IO/Mesh/include/itkFreeSurferAsciiMeshIO.h index b6e72e5eaab..5fb9fa20255 100644 --- a/Modules/IO/Mesh/include/itkFreeSurferAsciiMeshIO.h +++ b/Modules/IO/Mesh/include/itkFreeSurferAsciiMeshIO.h @@ -57,19 +57,19 @@ class ITKIOMesh_EXPORT FreeSurferAsciiMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadMeshInformation() ITK_OVERRIDE; + void ReadMeshInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void ReadPoints(void *buffer) ITK_OVERRIDE; + void ReadPoints(void *buffer) override; - virtual void ReadCells(void *buffer) ITK_OVERRIDE; + void ReadCells(void *buffer) override; - virtual void ReadPointData(void *buffer) ITK_OVERRIDE; + void ReadPointData(void *buffer) override; - virtual void ReadCellData(void *buffer) ITK_OVERRIDE; + void ReadCellData(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ @@ -78,22 +78,22 @@ class ITKIOMesh_EXPORT FreeSurferAsciiMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can write the file specified. */ - virtual bool CanWriteFile(const char *FileNameToWrite) ITK_OVERRIDE; + bool CanWriteFile(const char *FileNameToWrite) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteMeshInformation() ITK_OVERRIDE; + void WriteMeshInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void WritePoints(void *buffer) ITK_OVERRIDE; + void WritePoints(void *buffer) override; - virtual void WriteCells(void *buffer) ITK_OVERRIDE; + void WriteCells(void *buffer) override; - virtual void WritePointData(void *buffer) ITK_OVERRIDE; + void WritePointData(void *buffer) override; - virtual void WriteCellData(void *buffer) ITK_OVERRIDE; + void WriteCellData(void *buffer) override; - virtual void Write() ITK_OVERRIDE; + void Write() override; protected: /** Write points to output stream */ @@ -152,8 +152,8 @@ class ITKIOMesh_EXPORT FreeSurferAsciiMeshIO:public MeshIOBase protected: FreeSurferAsciiMeshIO(); - virtual ~FreeSurferAsciiMeshIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FreeSurferAsciiMeshIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; void OpenFile(); diff --git a/Modules/IO/Mesh/include/itkFreeSurferAsciiMeshIOFactory.h b/Modules/IO/Mesh/include/itkFreeSurferAsciiMeshIOFactory.h index 39d5fb083b4..3b4be001389 100644 --- a/Modules/IO/Mesh/include/itkFreeSurferAsciiMeshIOFactory.h +++ b/Modules/IO/Mesh/include/itkFreeSurferAsciiMeshIOFactory.h @@ -38,9 +38,9 @@ class ITKIOMesh_EXPORT FreeSurferAsciiMeshIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,9 +58,9 @@ class ITKIOMesh_EXPORT FreeSurferAsciiMeshIOFactory:public ObjectFactoryBase protected: FreeSurferAsciiMeshIOFactory(); - ~FreeSurferAsciiMeshIOFactory() ITK_OVERRIDE; + ~FreeSurferAsciiMeshIOFactory() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FreeSurferAsciiMeshIOFactory); diff --git a/Modules/IO/Mesh/include/itkFreeSurferBinaryMeshIO.h b/Modules/IO/Mesh/include/itkFreeSurferBinaryMeshIO.h index 45e7fa98540..7234a6da560 100644 --- a/Modules/IO/Mesh/include/itkFreeSurferBinaryMeshIO.h +++ b/Modules/IO/Mesh/include/itkFreeSurferBinaryMeshIO.h @@ -60,19 +60,19 @@ class ITKIOMesh_EXPORT FreeSurferBinaryMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadMeshInformation() ITK_OVERRIDE; + void ReadMeshInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void ReadPoints(void *buffer) ITK_OVERRIDE; + void ReadPoints(void *buffer) override; - virtual void ReadCells(void *buffer) ITK_OVERRIDE; + void ReadCells(void *buffer) override; - virtual void ReadPointData(void *buffer) ITK_OVERRIDE; + void ReadPointData(void *buffer) override; - virtual void ReadCellData(void *buffer) ITK_OVERRIDE; + void ReadCellData(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ @@ -81,22 +81,22 @@ class ITKIOMesh_EXPORT FreeSurferBinaryMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can write the file specified. */ - virtual bool CanWriteFile(const char *FileNameToWrite) ITK_OVERRIDE; + bool CanWriteFile(const char *FileNameToWrite) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteMeshInformation() ITK_OVERRIDE; + void WriteMeshInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void WritePoints(void *buffer) ITK_OVERRIDE; + void WritePoints(void *buffer) override; - virtual void WriteCells(void *buffer) ITK_OVERRIDE; + void WriteCells(void *buffer) override; - virtual void WritePointData(void *buffer) ITK_OVERRIDE; + void WritePointData(void *buffer) override; - virtual void WriteCellData(void *buffer) ITK_OVERRIDE; + void WriteCellData(void *buffer) override; - virtual void Write() ITK_OVERRIDE; + void Write() override; protected: /** Write points to output stream */ @@ -166,9 +166,9 @@ class ITKIOMesh_EXPORT FreeSurferBinaryMeshIO:public MeshIOBase protected: FreeSurferBinaryMeshIO(); - virtual ~FreeSurferBinaryMeshIO() ITK_OVERRIDE; + ~FreeSurferBinaryMeshIO() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void OpenFile(); diff --git a/Modules/IO/Mesh/include/itkFreeSurferBinaryMeshIOFactory.h b/Modules/IO/Mesh/include/itkFreeSurferBinaryMeshIOFactory.h index 13f9150e59d..5499c64936c 100644 --- a/Modules/IO/Mesh/include/itkFreeSurferBinaryMeshIOFactory.h +++ b/Modules/IO/Mesh/include/itkFreeSurferBinaryMeshIOFactory.h @@ -38,9 +38,9 @@ class ITKIOMesh_EXPORT FreeSurferBinaryMeshIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,9 +58,9 @@ class ITKIOMesh_EXPORT FreeSurferBinaryMeshIOFactory:public ObjectFactoryBase protected: FreeSurferBinaryMeshIOFactory(); - ~FreeSurferBinaryMeshIOFactory() ITK_OVERRIDE; + ~FreeSurferBinaryMeshIOFactory() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FreeSurferBinaryMeshIOFactory); diff --git a/Modules/IO/Mesh/include/itkGiftiMeshIO.h b/Modules/IO/Mesh/include/itkGiftiMeshIO.h index dba1f53b027..8af93379a04 100644 --- a/Modules/IO/Mesh/include/itkGiftiMeshIO.h +++ b/Modules/IO/Mesh/include/itkGiftiMeshIO.h @@ -79,19 +79,19 @@ class ITKIOMesh_EXPORT GiftiMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadMeshInformation() ITK_OVERRIDE; + void ReadMeshInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void ReadPoints(void *buffer) ITK_OVERRIDE; + void ReadPoints(void *buffer) override; - virtual void ReadCells(void *buffer) ITK_OVERRIDE; + void ReadCells(void *buffer) override; - virtual void ReadPointData(void *buffer) ITK_OVERRIDE; + void ReadPointData(void *buffer) override; - virtual void ReadCellData(void *buffer) ITK_OVERRIDE; + void ReadCellData(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ @@ -100,28 +100,28 @@ class ITKIOMesh_EXPORT GiftiMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can write the file specified. */ - virtual bool CanWriteFile(const char *FileNameToWrite) ITK_OVERRIDE; + bool CanWriteFile(const char *FileNameToWrite) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteMeshInformation() ITK_OVERRIDE; + void WriteMeshInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void WritePoints(void *buffer) ITK_OVERRIDE; + void WritePoints(void *buffer) override; - virtual void WriteCells(void *buffer) ITK_OVERRIDE; + void WriteCells(void *buffer) override; - virtual void WritePointData(void *buffer) ITK_OVERRIDE; + void WritePointData(void *buffer) override; - virtual void WriteCellData(void *buffer) ITK_OVERRIDE; + void WriteCellData(void *buffer) override; - virtual void Write() ITK_OVERRIDE; + void Write() override; protected: GiftiMeshIO(); - virtual ~GiftiMeshIO() ITK_OVERRIDE; + ~GiftiMeshIO() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; template< typename TInput, typename TOutput > void ConvertBuffer(TInput *input, TOutput *output, SizeValueType numberOfElements) diff --git a/Modules/IO/Mesh/include/itkGiftiMeshIOFactory.h b/Modules/IO/Mesh/include/itkGiftiMeshIOFactory.h index 5c8b6b119b1..527ff6c52d5 100644 --- a/Modules/IO/Mesh/include/itkGiftiMeshIOFactory.h +++ b/Modules/IO/Mesh/include/itkGiftiMeshIOFactory.h @@ -38,9 +38,9 @@ class ITKIOMesh_EXPORT GiftiMeshIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,9 +58,9 @@ class ITKIOMesh_EXPORT GiftiMeshIOFactory:public ObjectFactoryBase protected: GiftiMeshIOFactory(); - ~GiftiMeshIOFactory() ITK_OVERRIDE; + ~GiftiMeshIOFactory() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GiftiMeshIOFactory); diff --git a/Modules/IO/Mesh/include/itkMeshFileReader.h b/Modules/IO/Mesh/include/itkMeshFileReader.h index 1c97d81a63f..e9ba28995f6 100644 --- a/Modules/IO/Mesh/include/itkMeshFileReader.h +++ b/Modules/IO/Mesh/include/itkMeshFileReader.h @@ -128,7 +128,7 @@ class ITK_TEMPLATE_EXPORT MeshFileReader:public MeshSource< TOutputMesh > /** Prepare the allocation of the output mesh during the first back * propagation of the pipeline. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; template< typename T > void ReadPoints(T *buffer); @@ -142,8 +142,8 @@ class ITK_TEMPLATE_EXPORT MeshFileReader:public MeshSource< TOutputMesh > protected: MeshFileReader(); - ~MeshFileReader() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MeshFileReader() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Convert a block of pixels from one type to another. */ template< typename T > @@ -160,7 +160,7 @@ class ITK_TEMPLATE_EXPORT MeshFileReader:public MeshSource< TOutputMesh > void TestFileExistanceAndReadability(); /** Does the real work. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; MeshIOBase::Pointer m_MeshIO; bool m_UserSpecifiedMeshIO; // keep track whether the MeshIO is diff --git a/Modules/IO/Mesh/include/itkMeshFileReader.hxx b/Modules/IO/Mesh/include/itkMeshFileReader.hxx index f04de762de5..3218d687069 100644 --- a/Modules/IO/Mesh/include/itkMeshFileReader.hxx +++ b/Modules/IO/Mesh/include/itkMeshFileReader.hxx @@ -36,7 +36,7 @@ template< typename TOutputMesh, typename ConvertPointPixelTraits, typename Conve MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > ::MeshFileReader() { - m_MeshIO = ITK_NULLPTR; + m_MeshIO = nullptr; m_FileName = ""; m_UserSpecifiedMeshIO = false; } @@ -345,7 +345,7 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > { typename TOutputMesh::Pointer output = this->GetOutput(); - char * inputPointDataBuffer = ITK_NULLPTR; + char * inputPointDataBuffer = nullptr; OutputPointPixelType *outputPointDataBuffer = new OutputPointPixelType[m_MeshIO->GetNumberOfPointPixels()]; try @@ -385,10 +385,10 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > // clean up delete[] inputPointDataBuffer; - inputPointDataBuffer = ITK_NULLPTR; + inputPointDataBuffer = nullptr; delete[] outputPointDataBuffer; - outputPointDataBuffer = ITK_NULLPTR; + outputPointDataBuffer = nullptr; // then rethrow throw; @@ -396,7 +396,7 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > // clean up delete[] inputPointDataBuffer; - inputPointDataBuffer = ITK_NULLPTR; + inputPointDataBuffer = nullptr; for ( OutputPointIdentifier id = 0; id < m_MeshIO->GetNumberOfPointPixels(); id++ ) { @@ -404,7 +404,7 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > } delete[] outputPointDataBuffer; - outputPointDataBuffer = ITK_NULLPTR; + outputPointDataBuffer = nullptr; } template< typename TOutputMesh, typename ConvertPointPixelTraits, typename ConvertCellPixelTraits > @@ -414,7 +414,7 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > { typename TOutputMesh::Pointer output = this->GetOutput(); - char * inputCellDataBuffer = ITK_NULLPTR; + char * inputCellDataBuffer = nullptr; OutputCellPixelType *outputCellDataBuffer = new OutputCellPixelType[m_MeshIO->GetNumberOfCellPixels()]; try @@ -454,10 +454,10 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > // clean up delete[] inputCellDataBuffer; - inputCellDataBuffer = ITK_NULLPTR; + inputCellDataBuffer = nullptr; delete[] outputCellDataBuffer; - outputCellDataBuffer = ITK_NULLPTR; + outputCellDataBuffer = nullptr; // then rethrow throw; @@ -465,7 +465,7 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > // clean up delete[] inputCellDataBuffer; - inputCellDataBuffer = ITK_NULLPTR; + inputCellDataBuffer = nullptr; for ( OutputCellIdentifier id = 0; id < m_MeshIO->GetNumberOfCellPixels(); id++ ) { @@ -473,7 +473,7 @@ MeshFileReader< TOutputMesh, ConvertPointPixelTraits, ConvertCellPixelTraits > } delete[] outputCellDataBuffer; - outputCellDataBuffer = ITK_NULLPTR; + outputCellDataBuffer = nullptr; } template< typename TOutputMesh, typename ConvertPointPixelTraits, typename ConvertCellPixelTraits > diff --git a/Modules/IO/Mesh/include/itkMeshFileReaderException.h b/Modules/IO/Mesh/include/itkMeshFileReaderException.h index 5dd6dadd861..008d9f9992e 100644 --- a/Modules/IO/Mesh/include/itkMeshFileReaderException.h +++ b/Modules/IO/Mesh/include/itkMeshFileReaderException.h @@ -33,7 +33,7 @@ class ITKIOMesh_EXPORT MeshFileReaderException:public ExceptionObject { public: /** Has to have empty throw(). */ - virtual ~MeshFileReaderException() ITK_NOEXCEPT ITK_OVERRIDE; + ~MeshFileReaderException() ITK_NOEXCEPT override; /** Run-time information. */ itkTypeMacro(MeshFileReaderException, ExceptionObject); diff --git a/Modules/IO/Mesh/include/itkMeshFileWriter.h b/Modules/IO/Mesh/include/itkMeshFileWriter.h index 25f859d4cd6..793863a9ee3 100644 --- a/Modules/IO/Mesh/include/itkMeshFileWriter.h +++ b/Modules/IO/Mesh/include/itkMeshFileWriter.h @@ -115,7 +115,7 @@ class ITKIOMesh_HIDDEN MeshFileWriter:public ProcessObject /** Aliased to the Write() method to be consistent with the rest of the * pipeline. */ - virtual void Update() ITK_OVERRIDE + void Update() override { this->Write(); } @@ -127,8 +127,8 @@ class ITKIOMesh_HIDDEN MeshFileWriter:public ProcessObject protected: MeshFileWriter(); - ~MeshFileWriter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MeshFileWriter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; template< typename Output > void CopyPointsToBuffer(Output *data); diff --git a/Modules/IO/Mesh/include/itkMeshFileWriter.hxx b/Modules/IO/Mesh/include/itkMeshFileWriter.hxx index bb395adbe33..20af9ec400c 100644 --- a/Modules/IO/Mesh/include/itkMeshFileWriter.hxx +++ b/Modules/IO/Mesh/include/itkMeshFileWriter.hxx @@ -33,7 +33,7 @@ template< typename TInputMesh > MeshFileWriter< TInputMesh > ::MeshFileWriter() { - m_MeshIO = ITK_NULLPTR; + m_MeshIO = nullptr; m_UseCompression = false; m_FactorySpecifiedMeshIO = false; m_UserSpecifiedMeshIO = false; @@ -60,7 +60,7 @@ MeshFileWriter< TInputMesh > { if ( this->GetNumberOfInputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return static_cast< TInputMesh * >( this->ProcessObject::GetInput(0) ); @@ -84,7 +84,7 @@ MeshFileWriter< TInputMesh > itkDebugMacro(<< "Writing an mesh file"); // Make sure input is available - if ( input == ITK_NULLPTR ) + if ( input == nullptr ) { itkExceptionMacro(<< "No input to writer!"); } diff --git a/Modules/IO/Mesh/include/itkMeshFileWriterException.h b/Modules/IO/Mesh/include/itkMeshFileWriterException.h index 444b6690854..45cfc7464a5 100644 --- a/Modules/IO/Mesh/include/itkMeshFileWriterException.h +++ b/Modules/IO/Mesh/include/itkMeshFileWriterException.h @@ -33,7 +33,7 @@ class ITKIOMesh_EXPORT MeshFileWriterException:public ExceptionObject { public: /** Has to have empty throw(). */ - virtual ~MeshFileWriterException() ITK_NOEXCEPT ITK_OVERRIDE; + ~MeshFileWriterException() ITK_NOEXCEPT override; /** Run-time information. */ itkTypeMacro(MeshFileWriterException, ExceptionObject); diff --git a/Modules/IO/Mesh/include/itkMeshIOBase.h b/Modules/IO/Mesh/include/itkMeshIOBase.h index f96820fe45b..082a278e647 100644 --- a/Modules/IO/Mesh/include/itkMeshIOBase.h +++ b/Modules/IO/Mesh/include/itkMeshIOBase.h @@ -513,9 +513,9 @@ class ITKIOMesh_EXPORT MeshIOBase:public LightProcessObject protected: MeshIOBase(); - virtual ~MeshIOBase() ITK_OVERRIDE {} + ~MeshIOBase() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Insert an extension to the list of supported extensions for reading. */ void AddSupportedReadExtension(const char *extension); diff --git a/Modules/IO/Mesh/include/itkMeshIOFactory.h b/Modules/IO/Mesh/include/itkMeshIOFactory.h index 7770d3d02f9..026b18e4ea2 100644 --- a/Modules/IO/Mesh/include/itkMeshIOFactory.h +++ b/Modules/IO/Mesh/include/itkMeshIOFactory.h @@ -66,7 +66,7 @@ class ITKIOMesh_EXPORT MeshIOFactory:public Object protected: MeshIOFactory(); - ~MeshIOFactory() ITK_OVERRIDE; + ~MeshIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MeshIOFactory); diff --git a/Modules/IO/Mesh/include/itkOBJMeshIO.h b/Modules/IO/Mesh/include/itkOBJMeshIO.h index ca5e9159bfa..485d6b2e2f0 100644 --- a/Modules/IO/Mesh/include/itkOBJMeshIO.h +++ b/Modules/IO/Mesh/include/itkOBJMeshIO.h @@ -56,19 +56,19 @@ class ITKIOMesh_EXPORT OBJMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadMeshInformation() ITK_OVERRIDE; + void ReadMeshInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void ReadPoints(void *buffer) ITK_OVERRIDE; + void ReadPoints(void *buffer) override; - virtual void ReadCells(void *buffer) ITK_OVERRIDE; + void ReadCells(void *buffer) override; - virtual void ReadPointData(void *buffer) ITK_OVERRIDE; + void ReadPointData(void *buffer) override; - virtual void ReadCellData(void *buffer) ITK_OVERRIDE; + void ReadCellData(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ @@ -77,22 +77,22 @@ class ITKIOMesh_EXPORT OBJMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can write the file specified. */ - virtual bool CanWriteFile(const char *FileNameToWrite) ITK_OVERRIDE; + bool CanWriteFile(const char *FileNameToWrite) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteMeshInformation() ITK_OVERRIDE; + void WriteMeshInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void WritePoints(void *buffer) ITK_OVERRIDE; + void WritePoints(void *buffer) override; - virtual void WriteCells(void *buffer) ITK_OVERRIDE; + void WriteCells(void *buffer) override; - virtual void WritePointData(void *buffer) ITK_OVERRIDE; + void WritePointData(void *buffer) override; - virtual void WriteCellData(void *buffer) ITK_OVERRIDE; + void WriteCellData(void *buffer) override; - virtual void Write() ITK_OVERRIDE; + void Write() override; protected: /** Write points to output stream */ @@ -155,9 +155,9 @@ class ITKIOMesh_EXPORT OBJMeshIO:public MeshIOBase protected: OBJMeshIO(); - virtual ~OBJMeshIO() ITK_OVERRIDE; + ~OBJMeshIO() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void OpenFile(); diff --git a/Modules/IO/Mesh/include/itkOBJMeshIOFactory.h b/Modules/IO/Mesh/include/itkOBJMeshIOFactory.h index 71eca02e389..b158f4fc36a 100644 --- a/Modules/IO/Mesh/include/itkOBJMeshIOFactory.h +++ b/Modules/IO/Mesh/include/itkOBJMeshIOFactory.h @@ -38,9 +38,9 @@ class ITKIOMesh_EXPORT OBJMeshIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,9 +58,9 @@ class ITKIOMesh_EXPORT OBJMeshIOFactory:public ObjectFactoryBase protected: OBJMeshIOFactory(); - ~OBJMeshIOFactory() ITK_OVERRIDE; + ~OBJMeshIOFactory() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(OBJMeshIOFactory); diff --git a/Modules/IO/Mesh/include/itkOFFMeshIO.h b/Modules/IO/Mesh/include/itkOFFMeshIO.h index 4a9aa2fd58f..0dce4f44d07 100644 --- a/Modules/IO/Mesh/include/itkOFFMeshIO.h +++ b/Modules/IO/Mesh/include/itkOFFMeshIO.h @@ -57,19 +57,19 @@ class ITKIOMesh_EXPORT OFFMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadMeshInformation() ITK_OVERRIDE; + void ReadMeshInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void ReadPoints(void *buffer) ITK_OVERRIDE; + void ReadPoints(void *buffer) override; - virtual void ReadCells(void *buffer) ITK_OVERRIDE; + void ReadCells(void *buffer) override; - virtual void ReadPointData(void *buffer) ITK_OVERRIDE; + void ReadPointData(void *buffer) override; - virtual void ReadCellData(void *buffer) ITK_OVERRIDE; + void ReadCellData(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ @@ -78,22 +78,22 @@ class ITKIOMesh_EXPORT OFFMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can write the file specified. */ - virtual bool CanWriteFile(const char *FileNameToWrite) ITK_OVERRIDE; + bool CanWriteFile(const char *FileNameToWrite) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteMeshInformation() ITK_OVERRIDE; + void WriteMeshInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void WritePoints(void *buffer) ITK_OVERRIDE; + void WritePoints(void *buffer) override; - virtual void WriteCells(void *buffer) ITK_OVERRIDE; + void WriteCells(void *buffer) override; - virtual void WritePointData(void *buffer) ITK_OVERRIDE; + void WritePointData(void *buffer) override; - virtual void WriteCellData(void *buffer) ITK_OVERRIDE; + void WriteCellData(void *buffer) override; - virtual void Write() ITK_OVERRIDE; + void Write() override; protected: /** Read buffer as ascii stream */ @@ -172,9 +172,9 @@ class ITKIOMesh_EXPORT OFFMeshIO:public MeshIOBase protected: OFFMeshIO(); - virtual ~OFFMeshIO() ITK_OVERRIDE; + ~OFFMeshIO() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void OpenFile(); diff --git a/Modules/IO/Mesh/include/itkOFFMeshIOFactory.h b/Modules/IO/Mesh/include/itkOFFMeshIOFactory.h index c3701fea0c7..777b957bdf6 100644 --- a/Modules/IO/Mesh/include/itkOFFMeshIOFactory.h +++ b/Modules/IO/Mesh/include/itkOFFMeshIOFactory.h @@ -38,9 +38,9 @@ class ITKIOMesh_EXPORT OFFMeshIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,9 +58,9 @@ class ITKIOMesh_EXPORT OFFMeshIOFactory:public ObjectFactoryBase protected: OFFMeshIOFactory(); - ~OFFMeshIOFactory() ITK_OVERRIDE; + ~OFFMeshIOFactory() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(OFFMeshIOFactory); diff --git a/Modules/IO/Mesh/include/itkVTKPolyDataMeshIO.h b/Modules/IO/Mesh/include/itkVTKPolyDataMeshIO.h index 4a25633e5c3..ff8dd816c15 100644 --- a/Modules/IO/Mesh/include/itkVTKPolyDataMeshIO.h +++ b/Modules/IO/Mesh/include/itkVTKPolyDataMeshIO.h @@ -68,19 +68,19 @@ class ITKIOMesh_EXPORT VTKPolyDataMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadMeshInformation() ITK_OVERRIDE; + void ReadMeshInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void ReadPoints(void *buffer) ITK_OVERRIDE; + void ReadPoints(void *buffer) override; - virtual void ReadCells(void *buffer) ITK_OVERRIDE; + void ReadCells(void *buffer) override; - virtual void ReadPointData(void *buffer) ITK_OVERRIDE; + void ReadPointData(void *buffer) override; - virtual void ReadCellData(void *buffer) ITK_OVERRIDE; + void ReadCellData(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine if the file can be written with this MeshIO implementation. @@ -88,28 +88,28 @@ class ITKIOMesh_EXPORT VTKPolyDataMeshIO:public MeshIOBase * \post Sets classes MeshIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this MeshIO can write the file specified. */ - virtual bool CanWriteFile(const char *FileNameToWrite) ITK_OVERRIDE; + bool CanWriteFile(const char *FileNameToWrite) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteMeshInformation() ITK_OVERRIDE; + void WriteMeshInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void WritePoints(void *buffer) ITK_OVERRIDE; + void WritePoints(void *buffer) override; - virtual void WriteCells(void *buffer) ITK_OVERRIDE; + void WriteCells(void *buffer) override; - virtual void WritePointData(void *buffer) ITK_OVERRIDE; + void WritePointData(void *buffer) override; - virtual void WriteCellData(void *buffer) ITK_OVERRIDE; + void WriteCellData(void *buffer) override; - virtual void Write() ITK_OVERRIDE; + void Write() override; protected: VTKPolyDataMeshIO(); - virtual ~VTKPolyDataMeshIO() ITK_OVERRIDE; + ~VTKPolyDataMeshIO() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; template< typename T > void UpdateCellInformation(T *buffer) diff --git a/Modules/IO/Mesh/include/itkVTKPolyDataMeshIOFactory.h b/Modules/IO/Mesh/include/itkVTKPolyDataMeshIOFactory.h index 6ab5a098357..fdf11a48cfc 100644 --- a/Modules/IO/Mesh/include/itkVTKPolyDataMeshIOFactory.h +++ b/Modules/IO/Mesh/include/itkVTKPolyDataMeshIOFactory.h @@ -38,9 +38,9 @@ class ITKIOMesh_EXPORT VTKPolyDataMeshIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,9 +58,9 @@ class ITKIOMesh_EXPORT VTKPolyDataMeshIOFactory:public ObjectFactoryBase protected: VTKPolyDataMeshIOFactory(); - ~VTKPolyDataMeshIOFactory() ITK_OVERRIDE; + ~VTKPolyDataMeshIOFactory() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VTKPolyDataMeshIOFactory); diff --git a/Modules/IO/Mesh/src/itkGiftiMeshIO.cxx b/Modules/IO/Mesh/src/itkGiftiMeshIO.cxx index 9d3b10e7ad5..c39c16b717d 100644 --- a/Modules/IO/Mesh/src/itkGiftiMeshIO.cxx +++ b/Modules/IO/Mesh/src/itkGiftiMeshIO.cxx @@ -49,7 +49,7 @@ class GiftiMeshIO::GiftiImageProxy GiftiMeshIO ::GiftiMeshIO() : - m_GiftiImageHolder(new GiftiImageProxy(ITK_NULLPTR), true), + m_GiftiImageHolder(new GiftiImageProxy(nullptr), true), m_GiftiImage(*m_GiftiImageHolder.GetPointer()) { this->AddSupportedWriteExtension(".gii"); @@ -120,7 +120,7 @@ ::GetLabelColorTable() } else { - return ITK_NULLPTR; + return nullptr; } } @@ -135,7 +135,7 @@ ::GetLabelNameTable() } else { - return ITK_NULLPTR; + return nullptr; } } @@ -163,7 +163,7 @@ ::ReadMeshInformation() m_GiftiImage = gifti_read_image(this->GetFileName(), false); // Whether reading is successful - if ( m_GiftiImage == ITK_NULLPTR ) + if ( m_GiftiImage == nullptr ) { itkExceptionMacro(<< this->GetFileName() << " is not recognized as a GIFTI file"); } @@ -874,7 +874,7 @@ ::ReadPoints(void *buffer) m_GiftiImage = gifti_read_image(this->GetFileName(), true); // Whter reading is successful - if ( m_GiftiImage == ITK_NULLPTR ) + if ( m_GiftiImage == nullptr ) { itkExceptionMacro(<< this->GetFileName() << " is not recognized as a GIFTI file"); } @@ -901,7 +901,7 @@ ::ReadCells(void *buffer) m_GiftiImage = gifti_read_image(this->GetFileName(), true); // Whter reading is successful - if ( m_GiftiImage == ITK_NULLPTR ) + if ( m_GiftiImage == nullptr ) { itkExceptionMacro(<< this->GetFileName() << " is not recognized as a GIFTI file"); } @@ -1047,7 +1047,7 @@ ::ReadPointData(void *buffer) m_GiftiImage = gifti_read_image(this->GetFileName(), true); // Whter reading is successful - if ( m_GiftiImage == ITK_NULLPTR ) + if ( m_GiftiImage == nullptr ) { itkExceptionMacro(<< this->GetFileName() << " is not recognized as a GIFTI file"); } @@ -1077,7 +1077,7 @@ ::ReadCellData(void *buffer) m_GiftiImage = gifti_read_image(this->GetFileName(), true); // Whter reading is successful - if ( m_GiftiImage == ITK_NULLPTR ) + if ( m_GiftiImage == nullptr ) { itkExceptionMacro(<< this->GetFileName() << " is not recognized as a GIFTI file"); } @@ -1131,7 +1131,7 @@ ::WriteMeshInformation() m_GiftiImage = gifti_create_image(nda, NIFTI_INTENT_POINTSET, NIFTI_TYPE_UINT32, 0, dims, 0); // Whter reading is successful - if ( m_GiftiImage == ITK_NULLPTR ) + if ( m_GiftiImage == nullptr ) { itkExceptionMacro(<< "Could not create a new gifti image"); } diff --git a/Modules/IO/Mesh/src/itkMeshIOFactory.cxx b/Modules/IO/Mesh/src/itkMeshIOFactory.cxx index 0b189a630b1..623c8f0f414 100644 --- a/Modules/IO/Mesh/src/itkMeshIOFactory.cxx +++ b/Modules/IO/Mesh/src/itkMeshIOFactory.cxx @@ -84,7 +84,7 @@ ::CreateMeshIO(const char *path, FileModeType mode) } } - return ITK_NULLPTR; + return nullptr; } diff --git a/Modules/IO/Meta/include/itkMetaArrayReader.h b/Modules/IO/Meta/include/itkMetaArrayReader.h index 6040d888784..a7731ba5d5d 100644 --- a/Modules/IO/Meta/include/itkMetaArrayReader.h +++ b/Modules/IO/Meta/include/itkMetaArrayReader.h @@ -243,8 +243,8 @@ class ITKIOMeta_EXPORT MetaArrayReader : public LightProcessObject protected: MetaArrayReader(); - virtual ~MetaArrayReader() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MetaArrayReader() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/IO/Meta/include/itkMetaArrayWriter.h b/Modules/IO/Meta/include/itkMetaArrayWriter.h index 242c4b8ea26..a6cbb7e542d 100644 --- a/Modules/IO/Meta/include/itkMetaArrayWriter.h +++ b/Modules/IO/Meta/include/itkMetaArrayWriter.h @@ -129,7 +129,7 @@ class ITKIOMeta_EXPORT MetaArrayWriter : public LightProcessObject m_MetaArray.InitializeEssential(rows, _metaElementType, cols, - ITK_NULLPTR, + nullptr, true, true); m_Buffer = m_MetaArray.ElementData(); @@ -155,8 +155,8 @@ class ITKIOMeta_EXPORT MetaArrayWriter : public LightProcessObject protected: MetaArrayWriter(); - virtual ~MetaArrayWriter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MetaArrayWriter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/IO/Meta/include/itkMetaImageIO.h b/Modules/IO/Meta/include/itkMetaImageIO.h index e65a061f639..d9dce6761fc 100644 --- a/Modules/IO/Meta/include/itkMetaImageIO.h +++ b/Modules/IO/Meta/include/itkMetaImageIO.h @@ -56,7 +56,7 @@ class ITKIOMeta_EXPORT MetaImageIO:public ImageIOBase * while others can support 2D, 3D, or even n-D. This method returns * true/false as to whether the ImageIO can support the dimension * indicated. */ - virtual bool SupportsDimension(unsigned long) ITK_OVERRIDE + bool SupportsDimension(unsigned long) override { return true; } @@ -65,13 +65,13 @@ class ITKIOMeta_EXPORT MetaImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; MetaImage * GetMetaImagePointer(); @@ -79,14 +79,14 @@ class ITKIOMeta_EXPORT MetaImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can write the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; /** Set the filename for the Data file. Setting this will make the Writer to use the non-Local mode and save header and data in @@ -104,24 +104,24 @@ class ITKIOMeta_EXPORT MetaImageIO:public ImageIOBase * could be the region that we can read from the file. This is called the * streamable region, which will be smaller than the LargestPossibleRegion and * greater or equal to the RequestedRegion */ - virtual ImageIORegion - GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requested) const ITK_OVERRIDE; + ImageIORegion + GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requested) const override; - virtual unsigned int + unsigned int GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, const ImageIORegion & pasteRegion, - const ImageIORegion & largestPossibleRegion) ITK_OVERRIDE; + const ImageIORegion & largestPossibleRegion) override; - virtual ImageIORegion + ImageIORegion GetSplitRegionForWriting(unsigned int ithPiece, unsigned int numberOfActualSplits, const ImageIORegion & pasteRegion, - const ImageIORegion & largestPossibleRegion) ITK_OVERRIDE; + const ImageIORegion & largestPossibleRegion) override; /** Determine if the ImageIO can stream reading from this * file. Only time cannot stream read/write is if compression is used. * CanRead must be called prior to this function. */ - virtual bool CanStreamRead() ITK_OVERRIDE + bool CanStreamRead() override { if ( m_MetaImage.CompressedData() ) { @@ -135,7 +135,7 @@ class ITKIOMeta_EXPORT MetaImageIO:public ImageIOBase * Assumes file passes a CanRead call and its pixels are of the same * type as the template of the writer. Can verify by first calling * CanRead and then CanStreamRead prior to calling CanStreamWrite. */ - virtual bool CanStreamWrite() ITK_OVERRIDE + bool CanStreamWrite() override { if ( this->GetUseCompression() ) { @@ -165,8 +165,8 @@ class ITKIOMeta_EXPORT MetaImageIO:public ImageIOBase protected: MetaImageIO(); - ~MetaImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MetaImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/IO/Meta/include/itkMetaImageIOFactory.h b/Modules/IO/Meta/include/itkMetaImageIOFactory.h index 7afc08289db..88eed8b3cd8 100644 --- a/Modules/IO/Meta/include/itkMetaImageIOFactory.h +++ b/Modules/IO/Meta/include/itkMetaImageIOFactory.h @@ -38,9 +38,9 @@ class ITKIOMeta_EXPORT MetaImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion() const ITK_OVERRIDE; + const char * GetITKSourceVersion() const override; - virtual const char * GetDescription() const ITK_OVERRIDE; + const char * GetDescription() const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,7 +58,7 @@ class ITKIOMeta_EXPORT MetaImageIOFactory:public ObjectFactoryBase protected: MetaImageIOFactory(); - ~MetaImageIOFactory() ITK_OVERRIDE; + ~MetaImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaImageIOFactory); diff --git a/Modules/IO/Meta/src/itkMetaArrayReader.cxx b/Modules/IO/Meta/src/itkMetaArrayReader.cxx index e4c9f58f5bd..ff9949a9f68 100644 --- a/Modules/IO/Meta/src/itkMetaArrayReader.cxx +++ b/Modules/IO/Meta/src/itkMetaArrayReader.cxx @@ -23,7 +23,7 @@ namespace itk MetaArrayReader ::MetaArrayReader() : m_FileName( "" ), - m_Buffer( ITK_NULLPTR ) + m_Buffer( nullptr ) { } diff --git a/Modules/IO/Meta/src/itkMetaArrayWriter.cxx b/Modules/IO/Meta/src/itkMetaArrayWriter.cxx index 1a2c2abf2ba..5b510959921 100644 --- a/Modules/IO/Meta/src/itkMetaArrayWriter.cxx +++ b/Modules/IO/Meta/src/itkMetaArrayWriter.cxx @@ -25,7 +25,7 @@ ::MetaArrayWriter() : m_Precision( 6 ), m_FileName( "" ), m_DataFileName( "" ), - m_Buffer( ITK_NULLPTR ) + m_Buffer( nullptr ) { } @@ -36,7 +36,7 @@ MetaArrayWriter void MetaArrayWriter ::ConvertTo(MET_ValueEnumType _metaElementType) { - if ( m_Buffer != ITK_NULLPTR ) + if ( m_Buffer != nullptr ) { m_MetaArray.ImportBufferToElementData( m_Buffer, m_MetaArray.ElementType() ); @@ -50,7 +50,7 @@ ::Update() m_MetaArray.SetDoublePrecision(m_Precision); m_MetaArray.BinaryData(m_Binary); - if ( m_Buffer != ITK_NULLPTR ) + if ( m_Buffer != nullptr ) { m_MetaArray.Write(m_FileName.c_str(), m_DataFileName.c_str(), true, m_Buffer); diff --git a/Modules/IO/Meta/test/testMetaUtils.cxx b/Modules/IO/Meta/test/testMetaUtils.cxx index ef79ed54d7c..fb5e7609bfc 100644 --- a/Modules/IO/Meta/test/testMetaUtils.cxx +++ b/Modules/IO/Meta/test/testMetaUtils.cxx @@ -239,7 +239,7 @@ int testMetaUtils(int argc, char * argv[]) std::cout << "ElementSize not defined" << std::endl; int nNames=0; - char **names=ITK_NULLPTR; + char **names=nullptr; ++fieldIter; if((*fieldIter)->defined) { diff --git a/Modules/IO/NIFTI/include/itkNiftiImageIO.h b/Modules/IO/NIFTI/include/itkNiftiImageIO.h index 499002dc63e..83ea66ea449 100644 --- a/Modules/IO/NIFTI/include/itkNiftiImageIO.h +++ b/Modules/IO/NIFTI/include/itkNiftiImageIO.h @@ -61,13 +61,13 @@ class ITKIONIFTI_EXPORT NiftiImageIO:public ImageIOBase * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this ImageIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; //-------- This part of the interfaces deals with writing data. ----- @@ -77,23 +77,23 @@ class ITKIONIFTI_EXPORT NiftiImageIO:public ImageIOBase * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this ImageIO can write the file specified. */ - virtual bool CanWriteFile(const char *FileNameToWrite) ITK_OVERRIDE; + bool CanWriteFile(const char *FileNameToWrite) override; /** Set the spacing and dimension information for the set filename. * * For Nifti this does not write a file, it only fills in the * appropriate header information. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; /** Calculate the region of the image that can be efficiently read * in response to a given requested region. */ - virtual ImageIORegion - GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requestedRegion) const ITK_OVERRIDE; + ImageIORegion + GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requestedRegion) const override; /** A mode to allow the Nifti filter to read and write to the LegacyAnalyze75 format as interpreted by * the nifti library maintainers. This format does not properly respect the file orientation fields. @@ -105,8 +105,8 @@ class ITKIONIFTI_EXPORT NiftiImageIO:public ImageIOBase protected: NiftiImageIO(); - ~NiftiImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NiftiImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; virtual bool GetUseLegacyModeForTwoFileWriting(void) const { return false; } diff --git a/Modules/IO/NIFTI/include/itkNiftiImageIOFactory.h b/Modules/IO/NIFTI/include/itkNiftiImageIOFactory.h index a9434a914bb..27f358b673d 100644 --- a/Modules/IO/NIFTI/include/itkNiftiImageIOFactory.h +++ b/Modules/IO/NIFTI/include/itkNiftiImageIOFactory.h @@ -39,9 +39,9 @@ class ITKIONIFTI_EXPORT NiftiImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -59,8 +59,8 @@ class ITKIONIFTI_EXPORT NiftiImageIOFactory:public ObjectFactoryBase protected: NiftiImageIOFactory(); - ~NiftiImageIOFactory() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NiftiImageIOFactory() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NiftiImageIOFactory); diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx index ef8e6cc3cd9..7cb95bff3e8 100644 --- a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx +++ b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx @@ -415,7 +415,7 @@ class NiftiImageIO::NiftiImageProxy NiftiImageIO::NiftiImageIO() : - m_NiftiImageHolder(new NiftiImageProxy(ITK_NULLPTR), true), + m_NiftiImageHolder(new NiftiImageProxy(nullptr), true), m_NiftiImage(*m_NiftiImageHolder.GetPointer()), m_RescaleSlope(1.0), m_RescaleIntercept(0.0), @@ -499,7 +499,7 @@ CastCopy(float *to, void *from, size_t pixelcount) void NiftiImageIO::Read(void *buffer) { - void *data = ITK_NULLPTR; + void *data = nullptr; ImageIORegion regionToRead = this->GetIORegion(); ImageIORegion::SizeType size = regionToRead.GetSize(); @@ -535,14 +535,14 @@ void NiftiImageIO::Read(void *buffer) _size[4] = numComponents; } // Free memory if any was occupied already (incase of re-using the IO filter). - if ( this->m_NiftiImage != ITK_NULLPTR ) + if ( this->m_NiftiImage != nullptr ) { nifti_image_free(this->m_NiftiImage); } // // allocate nifti image... this->m_NiftiImage = nifti_image_read(this->GetFileName(), false); - if ( this->m_NiftiImage == ITK_NULLPTR ) + if ( this->m_NiftiImage == nullptr ) { itkExceptionMacro( << "nifti_image_read (just header) failed for file: " << this->GetFileName() ); @@ -1011,7 +1011,7 @@ ::ReadImageInformation() #endif prev = this->GetFileName(); } - if ( this->m_NiftiImage == ITK_NULLPTR ) + if ( this->m_NiftiImage == nullptr ) { itkExceptionMacro(<< this->GetFileName() << " is not recognized as a NIFTI file"); } @@ -1337,7 +1337,7 @@ ::ReadImageInformation() // We don't need the image anymore nifti_image_free(this->m_NiftiImage); - this->m_NiftiImage = ITK_NULLPTR; + this->m_NiftiImage = nullptr; } namespace @@ -1377,7 +1377,7 @@ ::WriteImageInformation(void) } // fill out the image header. - if ( this->m_NiftiImage == ITK_NULLPTR ) + if ( this->m_NiftiImage == nullptr ) { this->m_NiftiImage = nifti_simple_init_nim(); } @@ -1387,7 +1387,7 @@ ::WriteImageInformation(void) // // set the file type const char *tempextension = nifti_find_file_extension( FName.c_str() ); - if ( tempextension == ITK_NULLPTR ) + if ( tempextension == nullptr ) { itkExceptionMacro( << "Bad Nifti file name. No extension found for file: " << FName); @@ -1963,9 +1963,9 @@ NiftiImageIO::SetNIfTIOrientationFromImageIO(unsigned short int origdims, unsign &( this->m_NiftiImage->qoffset_x ), &( this->m_NiftiImage->qoffset_y ), &( this->m_NiftiImage->qoffset_z ), - ITK_NULLPTR, - ITK_NULLPTR, - ITK_NULLPTR, + nullptr, + nullptr, + nullptr, &( this->m_NiftiImage->qfac ) ); // copy q matrix to s matrix this->m_NiftiImage->qto_xyz = matrix; @@ -2007,7 +2007,7 @@ ::Write(const void *buffer) // for writing. this->m_NiftiImage->data = const_cast< void * >( buffer ); nifti_image_write(this->m_NiftiImage); - this->m_NiftiImage->data = ITK_NULLPTR; // if left pointing to data buffer + this->m_NiftiImage->data = nullptr; // if left pointing to data buffer // nifti_image_free will try and free this memory } else ///Image intent is vector image @@ -2092,7 +2092,7 @@ ::Write(const void *buffer) //writing. this->m_NiftiImage->data = (void *)nifti_buf; nifti_image_write(this->m_NiftiImage); - this->m_NiftiImage->data = ITK_NULLPTR; // if left pointing to data buffer + this->m_NiftiImage->data = nullptr; // if left pointing to data buffer delete[] nifti_buf; } } diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx index 84931b2ad33..aab5f97a6dc 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest3.cxx @@ -31,7 +31,7 @@ template void Decrement( ScalarType &value, typename itk::DisableIfC - ::is_signed, ScalarType>::Type* = 0 ) + ::is_signed, ScalarType>::Type* = nullptr ) { if( value > 1 ) { @@ -43,7 +43,7 @@ template void Decrement( ScalarType &value, typename itk::EnableIfC - ::is_signed, ScalarType>::Type* = 0 ) + ::is_signed, ScalarType>::Type* = nullptr ) { if( value > -std::numeric_limits::max() + 1 ) { diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx index b6c051ff607..6a0bbe0b6e2 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest5.cxx @@ -29,7 +29,7 @@ SlopeInterceptTest() const char *filename = "SlopeIntercept.nii"; nifti_image * niftiImage = nifti_simple_init_nim(); niftiImage->fname = (char *)malloc(strlen(filename)+1); - if(niftiImage->fname == ITK_NULLPTR) + if(niftiImage->fname == nullptr) { std::cerr << "Failed to allocate memory for filename, length requested " << strlen(filename) + 1 << std::endl; @@ -38,7 +38,7 @@ SlopeInterceptTest() strcpy(niftiImage->fname,filename); niftiImage->nifti_type = 1; niftiImage->iname = (char *)malloc(strlen(filename)+1); - if (niftiImage->iname == ITK_NULLPTR) + if (niftiImage->iname == nullptr) { free(niftiImage->fname); std::cerr << "Failed to allocate memory for filename, length requested " @@ -82,9 +82,9 @@ SlopeInterceptTest() &(niftiImage->qoffset_x), &(niftiImage->qoffset_y), &(niftiImage->qoffset_z), - ITK_NULLPTR, - ITK_NULLPTR, - ITK_NULLPTR, + nullptr, + nullptr, + nullptr, &(niftiImage->qfac)); niftiImage->data = malloc(sizeof(PixelType) * 256); for(unsigned i = 0; i < 256; i++) diff --git a/Modules/IO/NRRD/include/itkNrrdImageIO.h b/Modules/IO/NRRD/include/itkNrrdImageIO.h index a066cf6b798..4599639b204 100644 --- a/Modules/IO/NRRD/include/itkNrrdImageIO.h +++ b/Modules/IO/NRRD/include/itkNrrdImageIO.h @@ -53,33 +53,33 @@ class ITKIONRRD_EXPORT NrrdImageIO:public ImageIOBase * while others can support 2D, 3D, or even n-D. This method returns * true/false as to whether the ImageIO can support the dimension * indicated. */ - virtual bool SupportsDimension(unsigned long) ITK_OVERRIDE; + bool SupportsDimension(unsigned long) override; /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /** Determine the file type. Returns true if this ImageIO can write the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; protected: NrrdImageIO(); - ~NrrdImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NrrdImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Utility functions for converting between enumerated data type representations */ diff --git a/Modules/IO/NRRD/include/itkNrrdImageIOFactory.h b/Modules/IO/NRRD/include/itkNrrdImageIOFactory.h index 92bf4b4512e..d9cb10c33e0 100644 --- a/Modules/IO/NRRD/include/itkNrrdImageIOFactory.h +++ b/Modules/IO/NRRD/include/itkNrrdImageIOFactory.h @@ -38,9 +38,9 @@ class ITKIONRRD_EXPORT NrrdImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,7 +58,7 @@ class ITKIONRRD_EXPORT NrrdImageIOFactory:public ObjectFactoryBase protected: NrrdImageIOFactory(); - ~NrrdImageIOFactory() ITK_OVERRIDE; + ~NrrdImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NrrdImageIOFactory); diff --git a/Modules/IO/NRRD/src/itkNrrdImageIO.cxx b/Modules/IO/NRRD/src/itkNrrdImageIO.cxx index 704390e0319..ff8f5bd0e17 100644 --- a/Modules/IO/NRRD/src/itkNrrdImageIO.cxx +++ b/Modules/IO/NRRD/src/itkNrrdImageIO.cxx @@ -542,8 +542,8 @@ void NrrdImageIO::ReadImageInformation() // Store key/value pairs in MetaDataDictionary char key[AIR_STRLEN_SMALL]; const char * val; - char * keyPtr = ITK_NULLPTR; - char * valPtr = ITK_NULLPTR; + char * keyPtr = nullptr; + char * valPtr = nullptr; MetaDataDictionary & thisDic = this->GetMetaDataDictionary(); // Necessary to clear dict if ImageIO object is re-used thisDic.Clear(); @@ -742,7 +742,7 @@ void NrrdImageIO::Read(void *buffer) // Read in the nrrd. Yes, this means that the header is being read // twice: once by NrrdImageIO::ReadImageInformation, and once here - if ( nrrdLoad(nrrd, this->GetFileName(), ITK_NULLPTR) != 0 ) + if ( nrrdLoad(nrrd, this->GetFileName(), nullptr) != 0 ) { char *err = biffGetDone(NRRD); // would be nice to free(err) itkExceptionMacro("Read: Error reading " diff --git a/Modules/IO/PNG/include/itkPNGImageIO.h b/Modules/IO/PNG/include/itkPNGImageIO.h index a1408d3a00d..f3c9ab7e536 100644 --- a/Modules/IO/PNG/include/itkPNGImageIO.h +++ b/Modules/IO/PNG/include/itkPNGImageIO.h @@ -63,13 +63,13 @@ class ITKIOPNG_EXPORT PNGImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /** Reads 3D data from multiple files assuming one slice per file. */ virtual void ReadVolume(void *buffer); @@ -78,20 +78,20 @@ class ITKIOPNG_EXPORT PNGImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can write the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Writes the spacing and dimensions of the image. * Assumes SetFileName has been called with a valid file name. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegion has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; protected: PNGImageIO(); - ~PNGImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PNGImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; void WriteSlice(const std::string & fileName, const void *buffer); diff --git a/Modules/IO/PNG/include/itkPNGImageIOFactory.h b/Modules/IO/PNG/include/itkPNGImageIOFactory.h index 9a7c8ec5f2b..bf9163bd046 100644 --- a/Modules/IO/PNG/include/itkPNGImageIOFactory.h +++ b/Modules/IO/PNG/include/itkPNGImageIOFactory.h @@ -39,9 +39,9 @@ class ITKIOPNG_EXPORT PNGImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -59,7 +59,7 @@ class ITKIOPNG_EXPORT PNGImageIOFactory:public ObjectFactoryBase protected: PNGImageIOFactory(); - ~PNGImageIOFactory() ITK_OVERRIDE; + ~PNGImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PNGImageIOFactory); diff --git a/Modules/IO/PNG/src/itkPNGImageIO.cxx b/Modules/IO/PNG/src/itkPNGImageIO.cxx index 99809b6fc57..1d733f11049 100644 --- a/Modules/IO/PNG/src/itkPNGImageIO.cxx +++ b/Modules/IO/PNG/src/itkPNGImageIO.cxx @@ -18,12 +18,13 @@ #include "itkPNGImageIO.h" #include "itk_png.h" #include "itksys/SystemTools.hxx" +#include +#include namespace itk { extern "C" { - #include /* The PNG library does not expect the error function to return. Therefore we must use this ugly longjmp call. */ void itkPNGWriteErrorFunction( png_structp png_ptr, @@ -58,7 +59,7 @@ bool wrapSetjmp( png_structp & png_ptr ) class PNGFileWrapper { public: - PNGFileWrapper(const char *const fname, const char *const openMode):m_FilePointer(ITK_NULLPTR) + PNGFileWrapper(const char *const fname, const char *const openMode):m_FilePointer(nullptr) { m_FilePointer = fopen(fname, openMode); } @@ -87,7 +88,7 @@ bool PNGImageIO::CanReadFile(const char *file) // Now check the file header PNGFileWrapper pngfp(file, "rb"); - if ( pngfp.m_FilePointer == ITK_NULLPTR ) + if ( pngfp.m_FilePointer == nullptr ) { return false; } @@ -103,8 +104,8 @@ bool PNGImageIO::CanReadFile(const char *file) return false; } png_structp png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)ITK_NULLPTR, - ITK_NULLPTR, ITK_NULLPTR); + (PNG_LIBPNG_VER_STRING, (png_voidp)nullptr, + nullptr, nullptr); if ( !png_ptr ) { return false; @@ -114,7 +115,7 @@ bool PNGImageIO::CanReadFile(const char *file) if ( !info_ptr ) { png_destroy_read_struct(&png_ptr, - (png_infopp)ITK_NULLPTR, (png_infopp)ITK_NULLPTR); + (png_infopp)nullptr, (png_infopp)nullptr); return false; } @@ -122,7 +123,7 @@ bool PNGImageIO::CanReadFile(const char *file) if ( !end_info ) { png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)ITK_NULLPTR); + (png_infopp)nullptr); return false; } png_destroy_read_struct(&png_ptr, &info_ptr, @@ -164,8 +165,8 @@ void PNGImageIO::Read(void *buffer) itkExceptionMacro( "File is not png type: " << this->GetFileName() ); } png_structp png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)ITK_NULLPTR, - ITK_NULLPTR, ITK_NULLPTR); + (PNG_LIBPNG_VER_STRING, (png_voidp)nullptr, + nullptr, nullptr); if ( !png_ptr ) { itkExceptionMacro( "File is not png type" << this->GetFileName() ); @@ -175,7 +176,7 @@ void PNGImageIO::Read(void *buffer) if ( !info_ptr ) { png_destroy_read_struct(&png_ptr, - (png_infopp)ITK_NULLPTR, (png_infopp)ITK_NULLPTR); + (png_infopp)nullptr, (png_infopp)nullptr); itkExceptionMacro( "File is not png type " << this->GetFileName() ); } @@ -183,7 +184,7 @@ void PNGImageIO::Read(void *buffer) if ( !end_info ) { png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)ITK_NULLPTR); + (png_infopp)nullptr); itkExceptionMacro( "File is not png type " << this->GetFileName() ); } @@ -273,7 +274,7 @@ void PNGImageIO::Read(void *buffer) png_read_image(png_ptr, row_pointers); delete[] row_pointers; // close the file - png_read_end(png_ptr, ITK_NULLPTR); + png_read_end(png_ptr, nullptr); png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); } @@ -354,8 +355,8 @@ void PNGImageIO::ReadImageInformation() return; } png_structp png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)ITK_NULLPTR, - ITK_NULLPTR, ITK_NULLPTR); + (PNG_LIBPNG_VER_STRING, (png_voidp)nullptr, + nullptr, nullptr); if ( !png_ptr ) { return; @@ -365,7 +366,7 @@ void PNGImageIO::ReadImageInformation() if ( !info_ptr ) { png_destroy_read_struct(&png_ptr, - (png_infopp)ITK_NULLPTR, (png_infopp)ITK_NULLPTR); + (png_infopp)nullptr, (png_infopp)nullptr); return; } @@ -373,7 +374,7 @@ void PNGImageIO::ReadImageInformation() if ( !end_info ) { png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)ITK_NULLPTR); + (png_infopp)nullptr); return; } @@ -570,7 +571,7 @@ void PNGImageIO::WriteSlice(const std::string & fileName, const void *buffer) } png_structp png_ptr = png_create_write_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)ITK_NULLPTR, ITK_NULLPTR, ITK_NULLPTR); + (PNG_LIBPNG_VER_STRING, (png_voidp)nullptr, nullptr, nullptr); if ( !png_ptr ) { itkExceptionMacro(<< "Unable to write PNG file! png_create_write_struct failed."); @@ -580,7 +581,7 @@ void PNGImageIO::WriteSlice(const std::string & fileName, const void *buffer) if ( !info_ptr ) { png_destroy_write_struct(&png_ptr, - (png_infopp)ITK_NULLPTR); + (png_infopp)nullptr); itkExceptionMacro(<< "Unable to write PNG file!. png_create_info_struct failed."); } diff --git a/Modules/IO/PhilipsREC/include/itkPhilipsPAR.h b/Modules/IO/PhilipsREC/include/itkPhilipsPAR.h index 80831c5d1ab..7cdc75ef4de 100644 --- a/Modules/IO/PhilipsREC/include/itkPhilipsPAR.h +++ b/Modules/IO/PhilipsREC/include/itkPhilipsPAR.h @@ -294,8 +294,8 @@ class ITKIOPhilipsREC_EXPORT PhilipsPAR:public LightProcessObject protected: PhilipsPAR(); - ~PhilipsPAR() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PhilipsPAR() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PhilipsPAR); diff --git a/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIO.h b/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIO.h index ffaf854a832..6fc0b5cb042 100644 --- a/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIO.h +++ b/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIO.h @@ -104,13 +104,13 @@ class ITKIOPhilipsREC_EXPORT PhilipsRECImageIO:public ImageIOBase * \param FileNameToRead The name of the file to test for reading. * \return Returns true if this ImageIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ @@ -120,28 +120,28 @@ class ITKIOPhilipsREC_EXPORT PhilipsRECImageIO:public ImageIOBase * \post This function will always return false (Not implemented). * \return Returns true if this ImageIO can write the file specified. */ - virtual bool CanWriteFile( const char *itkNotUsed(FileNameToWrite) ) ITK_OVERRIDE + bool CanWriteFile( const char *itkNotUsed(FileNameToWrite) ) override { return false; } /** Set the spacing and dimension information for the set filename. */ - virtual void WriteImageInformation() ITK_OVERRIDE + void WriteImageInformation() override { return; } /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void Write( const void *itkNotUsed(buffer) ) ITK_OVERRIDE + void Write( const void *itkNotUsed(buffer) ) override { return; } protected: PhilipsRECImageIO(); - ~PhilipsRECImageIO() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PhilipsRECImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIOFactory.h b/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIOFactory.h index 321e8203af8..98d222c32a2 100644 --- a/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIOFactory.h +++ b/Modules/IO/PhilipsREC/include/itkPhilipsRECImageIOFactory.h @@ -45,9 +45,9 @@ class ITKIOPhilipsREC_EXPORT PhilipsRECImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion() const ITK_OVERRIDE; + const char * GetITKSourceVersion() const override; - virtual const char * GetDescription() const ITK_OVERRIDE; + const char * GetDescription() const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -70,7 +70,7 @@ class ITKIOPhilipsREC_EXPORT PhilipsRECImageIOFactory:public ObjectFactoryBase protected: PhilipsRECImageIOFactory(); - ~PhilipsRECImageIOFactory() ITK_OVERRIDE; + ~PhilipsRECImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PhilipsRECImageIOFactory); diff --git a/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx b/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx index 02a4f35b927..74c276b686f 100644 --- a/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx +++ b/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx @@ -557,10 +557,10 @@ void PhilipsPAR::ReadPAR(std::string parFile, struct par_parameter *pPar) { std::istringstream inString; - if ( pPar == ITK_NULLPTR ) + if ( pPar == nullptr ) { std::ostringstream message; - message << "ReadPAR: pPar == ITK_NULLPTR"; + message << "ReadPAR: pPar == nullptr"; ExceptionObject exception(__FILE__, __LINE__, message.str(), ITK_LOCATION); diff --git a/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx b/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx index c0badea312e..96228b2e26f 100644 --- a/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx +++ b/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx @@ -492,11 +492,11 @@ void PhilipsRECImageIO::Read(void *buffer) // In addition, it has the added benefit of reading gzip compressed image // files that do not have a .gz ending. gzFile file_p = gzopen(ImageFileName.c_str(), "rb"); - if ( file_p == ITK_NULLPTR ) + if ( file_p == nullptr ) { ImageFileName += ".gz"; file_p = gzopen(ImageFileName.c_str(), "rb"); - if ( file_p == ITK_NULLPTR ) + if ( file_p == nullptr ) { std::ostringstream message; message << "Philips REC Data File can not be opened. " diff --git a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx index 581e4bb299d..2b862042aa8 100644 --- a/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx +++ b/Modules/IO/PhilipsREC/test/itkPhilipsRECImageIOPrintTest.cxx @@ -136,7 +136,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) std::cout << "PAR_MaxNumberOfCardiacPhases = " << tempInt << std::endl; PhilipsRECImageIOType::TriggerTimesContainerType::Pointer - ptrToTimePoints = ITK_NULLPTR; + ptrToTimePoints = nullptr; if( !itk::ExposeMetaData(imageIO->GetMetaDataDictionary(), "PAR_TriggerTimes", ptrToTimePoints) ) @@ -146,7 +146,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) } if( !ptrToTimePoints ) { - std::cerr << "PAR_TriggerTimes is ITK_NULLPTR" << std::endl; + std::cerr << "PAR_TriggerTimes is nullptr" << std::endl; return EXIT_FAILURE; } std::cout << "TriggerTimes ="; @@ -166,7 +166,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) std::cout << "PAR_MaxNumberOfEchoes = " << tempInt << std::endl; PhilipsRECImageIOType::EchoTimesContainerType::Pointer - ptrToEchoes = ITK_NULLPTR; + ptrToEchoes = nullptr; if( !itk::ExposeMetaData(imageIO->GetMetaDataDictionary(), "PAR_EchoTimes", ptrToEchoes) ) @@ -176,7 +176,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) } if( !ptrToEchoes ) { - std::cerr << "PAR_EchoTimes is ITK_NULLPTR" << std::endl; + std::cerr << "PAR_EchoTimes is nullptr" << std::endl; return EXIT_FAILURE; } std::cout << "EchoTimes ="; @@ -253,7 +253,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) std::cout << "PAR_ScanResolution = " << scanRes << std::endl; PhilipsRECImageIOType::RepetitionTimesContainerType::Pointer - ptrToTR = ITK_NULLPTR; + ptrToTR = nullptr; if( !itk::ExposeMetaData(imageIO->GetMetaDataDictionary(), "PAR_RepetitionTimes", ptrToTR) ) @@ -263,7 +263,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) } if( !ptrToTR ) { - std::cerr << "PAR_RepetitionTimes is ITK_NULLPTR" << std::endl; + std::cerr << "PAR_RepetitionTimes is nullptr" << std::endl; return EXIT_FAILURE; } std::cout << "RepetitionTimes ="; @@ -432,7 +432,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) std::cout << "PAR_MaxNumberOfDiffusionValues = " << tempInt << std::endl; PhilipsRECImageIOType::GradientBvalueContainerType::Pointer - ptrToBValues = ITK_NULLPTR; + ptrToBValues = nullptr; if( !itk::ExposeMetaData(imageIO->GetMetaDataDictionary(), "PAR_GradientBValues", ptrToBValues) ) @@ -442,7 +442,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) } if( !ptrToBValues ) { - std::cerr << "PAR_GradientBValues is ITK_NULLPTR" << std::endl; + std::cerr << "PAR_GradientBValues is nullptr" << std::endl; return EXIT_FAILURE; } std::cout << "GradientBValues ="; @@ -462,7 +462,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) std::cout << "PAR_MaxNumberOfGradientOrients = " << tempInt << std::endl; PhilipsRECImageIOType::GradientDirectionContainerType::Pointer - ptrToGradValues = ITK_NULLPTR; + ptrToGradValues = nullptr; if( !itk::ExposeMetaData(imageIO->GetMetaDataDictionary(), "PAR_GradientDirectionValues", ptrToGradValues) ) @@ -472,7 +472,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) } if( !ptrToGradValues ) { - std::cerr << "PAR_GradientDirectionValues is ITK_NULLPTR" << std::endl; + std::cerr << "PAR_GradientDirectionValues is nullptr" << std::endl; return EXIT_FAILURE; } std::cout << "GradientDirectionValues ="; @@ -531,7 +531,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) ScanningSequenceImageTypeRescaleValuesContainerTypePtr; ScanningSequenceImageTypeRescaleValuesContainerTypePtr - ptrToRescaleValues = ITK_NULLPTR; + ptrToRescaleValues = nullptr; if( !itk::ExposeMetaData (imageIO->GetMetaDataDictionary(), "PAR_ScanningSequenceImageTypeRescaleValues", @@ -543,7 +543,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) } if( !ptrToRescaleValues ) { - std::cerr << "PAR_ScanningSequenceImageTypeRescaleValues is ITK_NULLPTR"; + std::cerr << "PAR_ScanningSequenceImageTypeRescaleValues is nullptr"; std::cerr << std::endl; return EXIT_FAILURE; } @@ -571,7 +571,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) std::cout << "PAR_NumberOfASLLabelTypes = " << tempInt << std::endl; PhilipsRECImageIOType::LabelTypesASLContainerType::Pointer - ptrToASLLabelTypes = ITK_NULLPTR; + ptrToASLLabelTypes = nullptr; if( !itk::ExposeMetaData(imageIO->GetMetaDataDictionary(), "PAR_ASLLabelTypes", ptrToASLLabelTypes) ) @@ -581,7 +581,7 @@ int itkPhilipsRECImageIOPrintTest( int argc, char * argv [] ) } if( !ptrToASLLabelTypes ) { - std::cerr << "PAR_ASLLabelTypes is ITK_NULLPTR" << std::endl; + std::cerr << "PAR_ASLLabelTypes is nullptr" << std::endl; return EXIT_FAILURE; } std::cout << "ASLLabelTypes ="; diff --git a/Modules/IO/RAW/include/itkRawImageIO.h b/Modules/IO/RAW/include/itkRawImageIO.h index 773696022d0..b1a877bab54 100644 --- a/Modules/IO/RAW/include/itkRawImageIO.h +++ b/Modules/IO/RAW/include/itkRawImageIO.h @@ -89,7 +89,7 @@ class ITK_TEMPLATE_EXPORT RawImageIO:public ImageIOBase * while others can support 2D, 3D, or even n-D. This method returns * true/false as to whether the ImageIO can support the dimension * indicated. */ - virtual bool SupportsDimension(unsigned long dim) ITK_OVERRIDE + bool SupportsDimension(unsigned long dim) override { return ( dim == m_FileDimensionality ); } /*-------- This part of the interface deals with reading data. ------ */ @@ -97,14 +97,14 @@ class ITK_TEMPLATE_EXPORT RawImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIOBase can read the * file specified. Always returns false because we don't want to use * this reader unless absolutely sure (i.e., manual ImageIO creation). */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE { return false; } + bool CanReadFile(const char *) override { return false; } /** Binary files have no image information to read. This must be set by the * user of the class. */ - virtual void ReadImageInformation() ITK_OVERRIDE { return; } + void ReadImageInformation() override { return; } /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /** Set/Get the Data mask. */ itkGetConstReferenceMacro(ImageMask, unsigned short); @@ -123,18 +123,18 @@ class ITK_TEMPLATE_EXPORT RawImageIO:public ImageIOBase /** Returns true if this ImageIO can write the specified file. * False is only returned when the file name is not specified. Otherwise * true is always returned. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Binary files have no image information to read. */ - virtual void WriteImageInformation(void) ITK_OVERRIDE { return; } + void WriteImageInformation(void) override { return; } /** Writes the data to disk from the memory buffer provided. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; protected: RawImageIO(); - ~RawImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RawImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; //void ComputeInternalFileName(unsigned long slice); @@ -160,12 +160,12 @@ class ITK_TEMPLATE_EXPORT RawImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE + const char * GetITKSourceVersion(void) const override { return ITK_SOURCE_VERSION; } - virtual const char * GetDescription(void) const ITK_OVERRIDE + const char * GetDescription(void) const override { return "Raw ImageIO Factory, allows the loading of Raw images into insight"; } @@ -184,7 +184,7 @@ class ITK_TEMPLATE_EXPORT RawImageIOFactory:public ObjectFactoryBase protected: RawImageIOFactory() {} - ~RawImageIOFactory() {} + ~RawImageIOFactory() override {} typedef RawImageIO< TPixel, VImageDimension > myProductType; const myProductType *m_MyProduct; diff --git a/Modules/IO/RAW/include/itkRawImageIO.hxx b/Modules/IO/RAW/include/itkRawImageIO.hxx index c448d88fc1f..4c79ab95636 100644 --- a/Modules/IO/RAW/include/itkRawImageIO.hxx +++ b/Modules/IO/RAW/include/itkRawImageIO.hxx @@ -28,7 +28,7 @@ RawImageIO< TPixel, VImageDimension >::RawImageIO(): ImageIOBase() { this->SetNumberOfComponents(1); - this->SetPixelTypeInfo( static_cast(ITK_NULLPTR) ); + this->SetPixelTypeInfo( static_cast(nullptr) ); this->SetNumberOfDimensions(VImageDimension); for ( unsigned int idx = 0; idx < VImageDimension; ++idx ) diff --git a/Modules/IO/Siemens/include/itkSiemensVisionImageIO.h b/Modules/IO/Siemens/include/itkSiemensVisionImageIO.h index 65663a28f50..bc90b4952b1 100644 --- a/Modules/IO/Siemens/include/itkSiemensVisionImageIO.h +++ b/Modules/IO/Siemens/include/itkSiemensVisionImageIO.h @@ -69,7 +69,7 @@ class ITKIOSiemens_EXPORT SiemensVisionImageIO:public IPLCommonImageIO * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite * \return Returns true if this ImageIO can read the file specified. */ - virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE; + bool CanReadFile(const char *FileNameToRead) override; /* * Set the spacing and dimension information for the set filename. */ // Implemented in superclass @@ -111,10 +111,10 @@ class ITKIOSiemens_EXPORT SiemensVisionImageIO:public IPLCommonImageIO protected: SiemensVisionImageIO(); - ~SiemensVisionImageIO() ITK_OVERRIDE; + ~SiemensVisionImageIO() override; // Implemented in superclass // void PrintSelf(std::ostream& os, Indent indent) const; - virtual GEImageHeader * ReadHeader(const char *FileNameToRead) ITK_OVERRIDE; + GEImageHeader * ReadHeader(const char *FileNameToRead) override; private: typedef enum { diff --git a/Modules/IO/Siemens/include/itkSiemensVisionImageIOFactory.h b/Modules/IO/Siemens/include/itkSiemensVisionImageIOFactory.h index 4df07f79a2f..ea8ed19df1d 100644 --- a/Modules/IO/Siemens/include/itkSiemensVisionImageIOFactory.h +++ b/Modules/IO/Siemens/include/itkSiemensVisionImageIOFactory.h @@ -39,9 +39,9 @@ class ITKIOSiemens_EXPORT SiemensVisionImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -59,8 +59,8 @@ class ITKIOSiemens_EXPORT SiemensVisionImageIOFactory:public ObjectFactoryBase protected: SiemensVisionImageIOFactory(); - ~SiemensVisionImageIOFactory() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SiemensVisionImageIOFactory() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SiemensVisionImageIOFactory); diff --git a/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx b/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx index 38f4efb86fe..a28866707fe 100644 --- a/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx +++ b/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx @@ -87,7 +87,7 @@ GEImageHeader * SiemensVisionImageIO::ReadHeader(const char *FileNameToRead) #define TEMPLEN 2048 char tmpStr[TEMPLEN], tmpStr2[TEMPLEN], tmpStr3[TEMPLEN]; GEImageHeader *hdr = new GEImageHeader; - if ( hdr == ITK_NULLPTR ) + if ( hdr == nullptr ) { RAISE_EXCEPTION(); } diff --git a/Modules/IO/SpatialObjects/include/itkPolygonGroupSpatialObjectXMLFile.h b/Modules/IO/SpatialObjects/include/itkPolygonGroupSpatialObjectXMLFile.h index fbedf318d6a..66295dd0c96 100644 --- a/Modules/IO/SpatialObjects/include/itkPolygonGroupSpatialObjectXMLFile.h +++ b/Modules/IO/SpatialObjects/include/itkPolygonGroupSpatialObjectXMLFile.h @@ -54,17 +54,17 @@ class PolygonGroupSpatialObjectXMLFileReader: public: /** Determine if a file can be read */ - virtual int CanReadFile(const char *name) ITK_OVERRIDE; + int CanReadFile(const char *name) override; protected: PolygonGroupSpatialObjectXMLFileReader() {} - virtual ~PolygonGroupSpatialObjectXMLFileReader() ITK_OVERRIDE {} + ~PolygonGroupSpatialObjectXMLFileReader() override {} - virtual void StartElement(const char *name, const char **atts) ITK_OVERRIDE; + void StartElement(const char *name, const char **atts) override; - virtual void EndElement(const char *name) ITK_OVERRIDE; + void EndElement(const char *name) override; - virtual void CharacterDataHandler(const char *inData, int inLength) ITK_OVERRIDE; + void CharacterDataHandler(const char *inData, int inLength) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PolygonGroupSpatialObjectXMLFileReader); @@ -99,14 +99,14 @@ class PolygonGroupSpatialObjectXMLFileWriter: typedef PGroupSpatialObjectType PolygonGroupType; typedef PolygonSpatialObject< 3 > PolygonSpatialObjectType; /** Test whether a file is writable. */ - virtual int CanWriteFile(const char *name) ITK_OVERRIDE; + int CanWriteFile(const char *name) override; /** Actually write out the file in question */ - virtual int WriteFile() ITK_OVERRIDE; + int WriteFile() override; protected: PolygonGroupSpatialObjectXMLFileWriter() {} - virtual ~PolygonGroupSpatialObjectXMLFileWriter() ITK_OVERRIDE {} + ~PolygonGroupSpatialObjectXMLFileWriter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(PolygonGroupSpatialObjectXMLFileWriter); diff --git a/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h b/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h index 907209d6b3b..93e6f022f5b 100644 --- a/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h +++ b/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.h @@ -90,7 +90,7 @@ class ITK_TEMPLATE_EXPORT SpatialObjectReader:public Object std::string m_FileName; SpatialObjectReader(); - virtual ~SpatialObjectReader() ITK_OVERRIDE; + ~SpatialObjectReader() override; private: diff --git a/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.hxx b/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.hxx index 83f4a9ebbf6..7537d7a71f7 100644 --- a/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.hxx +++ b/Modules/IO/SpatialObjects/include/itkSpatialObjectReader.hxx @@ -27,8 +27,8 @@ SpatialObjectReader< NDimensions, PixelType, TMeshTraits > ::SpatialObjectReader() { m_FileName = ""; - m_Scene = ITK_NULLPTR; - m_Group = ITK_NULLPTR; + m_Scene = nullptr; + m_Group = nullptr; } template< unsigned int NDimensions, typename PixelType, typename TMeshTraits > diff --git a/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h b/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h index 4f2b8f4472a..ff69a169f51 100644 --- a/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h +++ b/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.h @@ -97,7 +97,7 @@ class ITK_TEMPLATE_EXPORT SpatialObjectWriter:public Object bool m_WriteImagesInSeparateFile; SpatialObjectWriter(); - virtual ~SpatialObjectWriter() ITK_OVERRIDE; + ~SpatialObjectWriter() override; private: diff --git a/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.hxx b/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.hxx index bb06d90762f..d5937130161 100644 --- a/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.hxx +++ b/Modules/IO/SpatialObjects/include/itkSpatialObjectWriter.hxx @@ -27,8 +27,8 @@ SpatialObjectWriter< NDimensions, PixelType, TMeshTraits > ::SpatialObjectWriter() { m_FileName = ""; - m_SpatialObject = ITK_NULLPTR; - m_Scene = ITK_NULLPTR; + m_SpatialObject = nullptr; + m_Scene = nullptr; m_BinaryPoints = false; m_WriteImagesInSeparateFile = false; } @@ -64,10 +64,10 @@ SpatialObjectWriter< NDimensions, PixelType, TMeshTraits > m_MetaToSpatialConverter.SetBinaryPoints(m_BinaryPoints); m_MetaToSpatialConverter.SetWriteImagesInSeparateFile(m_WriteImagesInSeparateFile); - if ( m_Scene != ITK_NULLPTR ) + if ( m_Scene != nullptr ) { m_MetaToSpatialConverter.WriteMeta( m_Scene, m_FileName.c_str() ); - m_Scene = ITK_NULLPTR; + m_Scene = nullptr; } else { @@ -81,7 +81,7 @@ SpatialObjectWriter< NDimensions, PixelType, TMeshTraits > m_MetaToSpatialConverter.WriteMeta( tScene, m_FileName.c_str() ); - m_SpatialObject = ITK_NULLPTR; + m_SpatialObject = nullptr; } } } diff --git a/Modules/IO/SpatialObjects/src/itkPolygonGroupSpatialObjectXMLFile.cxx b/Modules/IO/SpatialObjects/src/itkPolygonGroupSpatialObjectXMLFile.cxx index 53bf7ba2097..d6894cbd949 100644 --- a/Modules/IO/SpatialObjects/src/itkPolygonGroupSpatialObjectXMLFile.cxx +++ b/Modules/IO/SpatialObjects/src/itkPolygonGroupSpatialObjectXMLFile.cxx @@ -192,7 +192,7 @@ PolygonGroupSpatialObjectXMLFileWriter::WriteFile() { // // sanity checks - if ( m_InputObject == ITK_NULLPTR ) + if ( m_InputObject == nullptr ) { std::string errmsg("No PolygonGroup to Write"); RAISE_EXCEPTION(errmsg); @@ -247,7 +247,7 @@ PolygonGroupSpatialObjectXMLFileWriter::WriteFile() // // Write out polygondata PolygonGroupType::ChildrenListType *children = - m_InputObject->GetChildren(0, ITK_NULLPTR); + m_InputObject->GetChildren(0, nullptr); PolygonGroupType::ChildrenListType::iterator it = children->begin(); PolygonGroupType::ChildrenListType::iterator end = children->end(); while ( it != end ) diff --git a/Modules/IO/SpatialObjects/test/itkPolygonGroupSpatialObjectXMLFileTest.cxx b/Modules/IO/SpatialObjects/test/itkPolygonGroupSpatialObjectXMLFileTest.cxx index 1f1f7c6bbf4..cd5ff7041e3 100644 --- a/Modules/IO/SpatialObjects/test/itkPolygonGroupSpatialObjectXMLFileTest.cxx +++ b/Modules/IO/SpatialObjects/test/itkPolygonGroupSpatialObjectXMLFileTest.cxx @@ -76,14 +76,14 @@ int testPolygonGroupEquivalence(PolygonGroup3DPointer &p1, // // Write out polygondata PolygonGroup3DType::ChildrenListType *children1 = - p1->GetChildren(0,ITK_NULLPTR); + p1->GetChildren(0,nullptr); PolygonGroup3DType::ChildrenListType::iterator it1 = children1->begin(); PolygonGroup3DType::ChildrenListType::iterator end1 = children1->end(); PolygonGroup3DType::ChildrenListType *children2 = - p2->GetChildren(0,ITK_NULLPTR); + p2->GetChildren(0,nullptr); PolygonGroup3DType::ChildrenListType::iterator it2 = children2->begin(); PolygonGroup3DType::ChildrenListType::iterator end2 = diff --git a/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx b/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx index b944227559c..f4c7ee867ce 100644 --- a/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx +++ b/Modules/IO/SpatialObjects/test/itkReadWriteSpatialObjectTest.cxx @@ -741,7 +741,7 @@ int itkReadWriteSpatialObjectTest(int argc, char* argv[]) if(!strcmp((*obj)->GetTypeName(),"ImageSpatialObject")) { const itkImageType *constImage = dynamic_cast((*obj).GetPointer())->GetImage(); - if(constImage == ITK_NULLPTR) + if(constImage == nullptr) { std::cerr << "dynamic_cast failed." << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/Stimulate/include/itkStimulateImageIO.h b/Modules/IO/Stimulate/include/itkStimulateImageIO.h index f5471de5674..ed356f60ed1 100644 --- a/Modules/IO/Stimulate/include/itkStimulateImageIO.h +++ b/Modules/IO/Stimulate/include/itkStimulateImageIO.h @@ -77,27 +77,27 @@ class ITKIOStimulate_EXPORT StimulateImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimesion information for the current filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Writes the spacing and dimensions of the image. * Assumes SetFileName has been called with a valid file name. */ - virtual void WriteImageInformation() ITK_OVERRIDE {} + void WriteImageInformation() override {} /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegion has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; /** Two values used for applying intensity windowing to the data set. The pair * of numbers represent a low value and a hight value. Pixel values below the @@ -117,8 +117,8 @@ class ITKIOStimulate_EXPORT StimulateImageIO:public ImageIOBase protected: StimulateImageIO(); - ~StimulateImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~StimulateImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; void InternalReadImageInformation(std::ifstream & file); diff --git a/Modules/IO/Stimulate/include/itkStimulateImageIOFactory.h b/Modules/IO/Stimulate/include/itkStimulateImageIOFactory.h index 80180f13176..3f8c0c89e2e 100644 --- a/Modules/IO/Stimulate/include/itkStimulateImageIOFactory.h +++ b/Modules/IO/Stimulate/include/itkStimulateImageIOFactory.h @@ -48,9 +48,9 @@ class ITKIOStimulate_EXPORT StimulateImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class Methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -68,7 +68,7 @@ class ITKIOStimulate_EXPORT StimulateImageIOFactory:public ObjectFactoryBase protected: StimulateImageIOFactory(); - ~StimulateImageIOFactory() ITK_OVERRIDE; + ~StimulateImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StimulateImageIOFactory); diff --git a/Modules/IO/TIFF/include/itkTIFFImageIO.h b/Modules/IO/TIFF/include/itkTIFFImageIO.h index 0b4a3dc5977..843c25322d1 100644 --- a/Modules/IO/TIFF/include/itkTIFFImageIO.h +++ b/Modules/IO/TIFF/include/itkTIFFImageIO.h @@ -61,13 +61,13 @@ class ITKIOTIFF_EXPORT TIFFImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /** Reads 3D data from multi-pages tiff. */ virtual void ReadVolume(void *buffer); @@ -76,15 +76,15 @@ class ITKIOTIFF_EXPORT TIFFImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Writes the spacing and dimensions of the image. * Assumes SetFileName has been called with a valid file name. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegion has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; enum { NOFORMAT, RGB_, GRAYSCALE, PALETTE_RGB, PALETTE_GRAYSCALE, OTHER }; @@ -139,8 +139,8 @@ class ITKIOTIFF_EXPORT TIFFImageIO:public ImageIOBase protected: TIFFImageIO(); - ~TIFFImageIO() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~TIFFImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; void InternalWrite(const void *buffer); diff --git a/Modules/IO/TIFF/include/itkTIFFImageIOFactory.h b/Modules/IO/TIFF/include/itkTIFFImageIOFactory.h index 5383d4f80cb..39793ac40bd 100644 --- a/Modules/IO/TIFF/include/itkTIFFImageIOFactory.h +++ b/Modules/IO/TIFF/include/itkTIFFImageIOFactory.h @@ -39,9 +39,9 @@ class ITKIOTIFF_EXPORT TIFFImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -59,7 +59,7 @@ class ITKIOTIFF_EXPORT TIFFImageIOFactory:public ObjectFactoryBase protected: TIFFImageIOFactory(); - ~TIFFImageIOFactory() ITK_OVERRIDE; + ~TIFFImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TIFFImageIOFactory); diff --git a/Modules/IO/TIFF/src/itkTIFFImageIO.cxx b/Modules/IO/TIFF/src/itkTIFFImageIO.cxx index 3cfeb2c31f5..fe8a370e811 100644 --- a/Modules/IO/TIFF/src/itkTIFFImageIO.cxx +++ b/Modules/IO/TIFF/src/itkTIFFImageIO.cxx @@ -38,7 +38,7 @@ bool TIFFImageIO::CanReadFile(const char *file) } // Now check if this is a valid TIFF image - TIFFErrorHandler save = TIFFSetErrorHandler(ITK_NULLPTR); + TIFFErrorHandler save = TIFFSetErrorHandler(nullptr); int res = m_InternalImage->Open(file); if ( res ) { @@ -220,9 +220,9 @@ TIFFImageIO::TIFFImageIO() : m_ComponentType = UCHAR; m_PixelType = SCALAR; - m_ColorRed = ITK_NULLPTR; - m_ColorGreen = ITK_NULLPTR; - m_ColorBlue = ITK_NULLPTR; + m_ColorRed = nullptr; + m_ColorGreen = nullptr; + m_ColorBlue = nullptr; m_InternalImage = new TIFFReaderInternal; @@ -268,13 +268,13 @@ void TIFFImageIO::PrintSelf(std::ostream & os, Indent indent) const void TIFFImageIO::InitializeColors() { - m_ColorRed = ITK_NULLPTR; - m_ColorGreen = ITK_NULLPTR; - m_ColorBlue = ITK_NULLPTR; + m_ColorRed = nullptr; + m_ColorGreen = nullptr; + m_ColorBlue = nullptr; m_TotalColors = -1; m_ImageFormat = TIFFImageIO::NOFORMAT; - if ( m_InternalImage == ITK_NULLPTR ) + if ( m_InternalImage == nullptr ) { return; } @@ -441,7 +441,7 @@ void TIFFImageIO::ReadImageInformation() if ( TIFFIsCODECConfigured(this->m_InternalImage->m_Compression) != 1 ) { const TIFFCodec* c = TIFFFindCODEC(this->m_InternalImage->m_Compression); - const char * codecName = ( c != ITK_NULLPTR ) ? static_cast(c->name) : "unknown"; + const char * codecName = ( c != nullptr ) ? static_cast(c->name) : "unknown"; itkExceptionMacro( "TIFF CODEC \"" << codecName << "\" is not supported." ); } @@ -892,7 +892,7 @@ bool TIFFImageIO::CanFindTIFFTag(unsigned int t) const itkTIFFField *fld = TIFFFieldWithTag(m_InternalImage->m_Image, tag); - if ( fld == ITK_NULLPTR ) + if ( fld == nullptr ) { return false; } @@ -907,18 +907,18 @@ void * TIFFImageIO::ReadRawByteFromTag(unsigned int t, unsigned int & value_coun itkExceptionMacro(<< "Need to call CanReadFile before"); } ttag_t tag = t; - void * raw_data = ITK_NULLPTR; + void * raw_data = nullptr; const itkTIFFField *fld = TIFFFieldWithTag(m_InternalImage->m_Image, tag); - if ( fld == ITK_NULLPTR ) + if ( fld == nullptr ) { - itkExceptionMacro(<< "fld is ITK_NULLPTR"); + itkExceptionMacro(<< "fld is nullptr"); } if ( !itkTIFFFieldPassCount( fld ) ) { - return ITK_NULLPTR; + return nullptr; } int ret = 0; @@ -976,7 +976,7 @@ void TIFFImageIO::ReadTIFFTags() MetaDataDictionary & dict = this->GetMetaDataDictionary(); - void *raw_data = ITK_NULLPTR; + void *raw_data = nullptr; bool mem_alloc = false; const int tagCount = TIFFGetTagListCount( m_InternalImage->m_Image ); @@ -996,13 +996,13 @@ void TIFFImageIO::ReadTIFFTags() _TIFFfree(raw_data); mem_alloc = false; } - raw_data = ITK_NULLPTR; + raw_data = nullptr; uint32 tag = TIFFGetTagListEntry(m_InternalImage->m_Image, i); const itkTIFFField *field = TIFFFieldWithTag(m_InternalImage->m_Image, tag); - if ( field == ITK_NULLPTR ) + if ( field == nullptr ) { continue; } @@ -1075,7 +1075,7 @@ void TIFFImageIO::ReadTIFFTags() } } - if (raw_data == ITK_NULLPTR) + if (raw_data == nullptr) { continue; } @@ -1170,7 +1170,7 @@ void TIFFImageIO::ReadCurrentPage(void *buffer, size_t pixelOffset) if ( !m_InternalImage->CanRead() ) { - uint32 *tempImage = ITK_NULLPTR; + uint32 *tempImage = nullptr; if ( this->GetNumberOfComponents() == 4 && m_ComponentType == UCHAR ) diff --git a/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx b/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx index 72e2d25f816..08f91203722 100644 --- a/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx +++ b/Modules/IO/TIFF/src/itkTIFFReaderInternal.cxx @@ -63,7 +63,7 @@ void TIFFReaderInternal::Clean() { TIFFClose(this->m_Image); } - this->m_Image = ITK_NULLPTR; + this->m_Image = nullptr; this->m_Width = 0; this->m_Height = 0; this->m_SamplesPerPixel = 0; @@ -92,7 +92,7 @@ void TIFFReaderInternal::Clean() TIFFReaderInternal::TIFFReaderInternal() { - this->m_Image = ITK_NULLPTR; + this->m_Image = nullptr; this->Clean(); } diff --git a/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx b/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx index 9921bc110be..59e792aa7af 100644 --- a/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx +++ b/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx @@ -106,7 +106,7 @@ int itkLargeTIFFImageWriteReadTestHelper( std::string filename, typename TImage: chronometer.Stop( "Write" ); - image = ITK_NULLPTR; + image = nullptr; } // end write block to free the memory std::cout << "Trying to read the image back from disk" << std::endl; diff --git a/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx b/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx index 6157b04f6c1..0c39807dc6c 100644 --- a/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx +++ b/Modules/IO/TIFF/test/itkTIFFImageIOTest.cxx @@ -74,7 +74,7 @@ int itkTIFFImageIOTestHelper( int, char * argv[] ) TRY_EXPECT_NO_EXCEPTION( reader->Update() ); // Test 2 reads with only one ReadImageInformation - TestMultipleReads< ImageType >( argv[1], ITK_NULLPTR ); + TestMultipleReads< ImageType >( argv[1], nullptr ); typename ImageType::Pointer image = reader->GetOutput(); diff --git a/Modules/IO/TransformBase/include/itkTransformFileReader.h b/Modules/IO/TransformBase/include/itkTransformFileReader.h index c19bf9eb2f0..a1db5f360a7 100644 --- a/Modules/IO/TransformBase/include/itkTransformFileReader.h +++ b/Modules/IO/TransformBase/include/itkTransformFileReader.h @@ -83,10 +83,10 @@ class ITK_TEMPLATE_EXPORT TransformFileReaderTemplate: public LightProcessObject itkGetConstObjectMacro( TransformIO, TransformIOType ); protected: - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; TransformFileReaderTemplate(); - virtual ~TransformFileReaderTemplate() ITK_OVERRIDE; + ~TransformFileReaderTemplate() override; TransformListType m_TransformList; typename TransformIOType::Pointer m_TransformIO; diff --git a/Modules/IO/TransformBase/include/itkTransformFileWriter.h b/Modules/IO/TransformBase/include/itkTransformFileWriter.h index 4b2fb19d3ea..03cb1571769 100644 --- a/Modules/IO/TransformBase/include/itkTransformFileWriter.h +++ b/Modules/IO/TransformBase/include/itkTransformFileWriter.h @@ -92,9 +92,9 @@ class ITKIOTransformBase_TEMPLATE_EXPORT TransformFileWriterTemplate:public Ligh protected: TransformFileWriterTemplate(); - virtual ~TransformFileWriterTemplate() ITK_OVERRIDE; + ~TransformFileWriterTemplate() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: void PushBackTransformList(const Object *transObj); diff --git a/Modules/IO/TransformBase/include/itkTransformIOBase.h b/Modules/IO/TransformBase/include/itkTransformIOBase.h index 512060fbcc6..828faaad7bd 100644 --- a/Modules/IO/TransformBase/include/itkTransformIOBase.h +++ b/Modules/IO/TransformBase/include/itkTransformIOBase.h @@ -126,8 +126,8 @@ class ITKIOTransformBase_TEMPLATE_EXPORT TransformIOBaseTemplate:public LightPro protected: TransformIOBaseTemplate(); - virtual ~TransformIOBaseTemplate() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~TransformIOBaseTemplate() override; + void PrintSelf(std::ostream & os, Indent indent) const override; void OpenStream(std::ofstream & outputStream, bool binary); diff --git a/Modules/IO/TransformBase/include/itkTransformIOFactory.h b/Modules/IO/TransformBase/include/itkTransformIOFactory.h index 3ab487f7cdf..3e41c0c57aa 100644 --- a/Modules/IO/TransformBase/include/itkTransformIOFactory.h +++ b/Modules/IO/TransformBase/include/itkTransformIOFactory.h @@ -59,7 +59,7 @@ class ITK_TEMPLATE_EXPORT TransformIOFactoryTemplate:public Object protected: TransformIOFactoryTemplate(); - virtual ~TransformIOFactoryTemplate() ITK_OVERRIDE; + ~TransformIOFactoryTemplate() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TransformIOFactoryTemplate); diff --git a/Modules/IO/TransformBase/include/itkTransformIOFactory.hxx b/Modules/IO/TransformBase/include/itkTransformIOFactory.hxx index 71151b3097b..b694bd9a79b 100644 --- a/Modules/IO/TransformBase/include/itkTransformIOFactory.hxx +++ b/Modules/IO/TransformBase/include/itkTransformIOFactory.hxx @@ -71,7 +71,7 @@ TransformIOFactoryTemplate } } } - return ITK_NULLPTR; + return nullptr; } } // end namespace itk diff --git a/Modules/IO/TransformFactory/include/itkTransformFactoryBase.h b/Modules/IO/TransformFactory/include/itkTransformFactoryBase.h index 54deef256d0..1148151dc45 100644 --- a/Modules/IO/TransformFactory/include/itkTransformFactoryBase.h +++ b/Modules/IO/TransformFactory/include/itkTransformFactoryBase.h @@ -48,9 +48,9 @@ TransformFactoryBase:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Run-time type information (and related methods). */ itkTypeMacro(TransformFactoryBase, ObjectFactoryBase); @@ -102,7 +102,7 @@ TransformFactoryBase:public ObjectFactoryBase protected: TransformFactoryBase(); - virtual ~TransformFactoryBase() ITK_OVERRIDE; + ~TransformFactoryBase() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TransformFactoryBase); diff --git a/Modules/IO/TransformFactory/src/itkTransformFactoryBase.cxx b/Modules/IO/TransformFactory/src/itkTransformFactoryBase.cxx index 11d03668491..cb33cb39b3b 100644 --- a/Modules/IO/TransformFactory/src/itkTransformFactoryBase.cxx +++ b/Modules/IO/TransformFactory/src/itkTransformFactoryBase.cxx @@ -55,7 +55,7 @@ namespace itk { -TransformFactoryBase *TransformFactoryBase:: m_Factory = ITK_NULLPTR; +TransformFactoryBase *TransformFactoryBase:: m_Factory = nullptr; namespace TransformFactoryBasePrivate { @@ -96,7 +96,7 @@ void TransformFactoryBase::RegisterDefaultTransforms() TransformFactoryBase * TransformFactoryBase::GetFactory() { - if ( m_Factory == ITK_NULLPTR ) + if ( m_Factory == nullptr ) { // Make and register the factory Pointer p = New(); diff --git a/Modules/IO/TransformFactory/test/itkTransformFactoryBaseTest.cxx b/Modules/IO/TransformFactory/test/itkTransformFactoryBaseTest.cxx index 1ed2631b74c..d24180c5f19 100644 --- a/Modules/IO/TransformFactory/test/itkTransformFactoryBaseTest.cxx +++ b/Modules/IO/TransformFactory/test/itkTransformFactoryBaseTest.cxx @@ -17,7 +17,7 @@ *=========================================================================*/ #include -#include +#include #include #include "itkVersion.h" #include "itkTransformFactoryBase.h" diff --git a/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.h b/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.h index 5e4962e2bdd..4c8d811a423 100644 --- a/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.h +++ b/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.h @@ -104,23 +104,23 @@ private HDF5CommonPathNames /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read() ITK_OVERRIDE; + void Read() override; /** 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() ITK_OVERRIDE; + void Write() override; protected: HDF5TransformIOTemplate(); - virtual ~HDF5TransformIOTemplate() ITK_OVERRIDE; + ~HDF5TransformIOTemplate() override; private: /** Read a parameter array from the file location name */ diff --git a/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.hxx b/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.hxx index 527a1e28613..98ded7baa17 100644 --- a/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.hxx +++ b/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.hxx @@ -73,11 +73,11 @@ HDF5TransformIOTemplate // all and this is just by convention. const char *extensions[] = { - ".hdf",".h4",".hdf4",".h5",".hdf5",".he4",".he5",".hd5",ITK_NULLPTR, + ".hdf",".h4",".hdf4",".h5",".hdf5",".he4",".he5",".hd5",nullptr, }; std::string ext (itksys::SystemTools::GetFilenameLastExtension(fileName)); - for(unsigned i = 0; extensions[i] != ITK_NULLPTR; i++) + for(unsigned i = 0; extensions[i] != nullptr; i++) { if(ext == extensions[i]) { @@ -176,7 +176,7 @@ HDF5TransformIOTemplate << "in HDF5 File"); } hsize_t dim; - Space.getSimpleExtentDims(&dim,ITK_NULLPTR); + Space.getSimpleExtentDims(&dim,nullptr); ParametersType ParameterArray; ParameterArray.SetSize(dim); H5::FloatType ParamType = paramSet.getFloatType(); @@ -227,7 +227,7 @@ HDF5TransformIOTemplate << "in HDF5 File"); } hsize_t dim; - Space.getSimpleExtentDims(&dim,ITK_NULLPTR); + Space.getSimpleExtentDims(&dim,nullptr); FixedParametersType FixedParameterArray; FixedParameterArray.SetSize(dim); diff --git a/Modules/IO/TransformHDF5/include/itkHDF5TransformIOFactory.h b/Modules/IO/TransformHDF5/include/itkHDF5TransformIOFactory.h index e59c14fa7b0..9bc3d780a2e 100644 --- a/Modules/IO/TransformHDF5/include/itkHDF5TransformIOFactory.h +++ b/Modules/IO/TransformHDF5/include/itkHDF5TransformIOFactory.h @@ -39,9 +39,9 @@ class ITKIOTransformHDF5_EXPORT HDF5TransformIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -59,8 +59,8 @@ class ITKIOTransformHDF5_EXPORT HDF5TransformIOFactory:public ObjectFactoryBase protected: HDF5TransformIOFactory(); - ~HDF5TransformIOFactory() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HDF5TransformIOFactory() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HDF5TransformIOFactory); diff --git a/Modules/IO/TransformInsightLegacy/include/itkTxtTransformIO.h b/Modules/IO/TransformInsightLegacy/include/itkTxtTransformIO.h index 8f916a7f8af..0cbaa59d35a 100644 --- a/Modules/IO/TransformInsightLegacy/include/itkTxtTransformIO.h +++ b/Modules/IO/TransformInsightLegacy/include/itkTxtTransformIO.h @@ -53,26 +53,26 @@ class ITK_TEMPLATE_EXPORT TxtTransformIOTemplate:public TransformIOBaseTemplate< /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read() ITK_OVERRIDE; + void Read() override; /** 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() ITK_OVERRIDE; + void Write() override; /* Helper function for Read method, used for CompositeTransform reading. */ void ReadComponentFile( std::string Value ); protected: TxtTransformIOTemplate(); - virtual ~TxtTransformIOTemplate() ITK_OVERRIDE; + ~TxtTransformIOTemplate() override; private: /** trim spaces and newlines from start and end of a string */ diff --git a/Modules/IO/TransformInsightLegacy/include/itkTxtTransformIOFactory.h b/Modules/IO/TransformInsightLegacy/include/itkTxtTransformIOFactory.h index ba78252b1f5..e87add71ef5 100644 --- a/Modules/IO/TransformInsightLegacy/include/itkTxtTransformIOFactory.h +++ b/Modules/IO/TransformInsightLegacy/include/itkTxtTransformIOFactory.h @@ -38,9 +38,9 @@ class ITKIOTransformInsightLegacy_EXPORT TxtTransformIOFactory:public ObjectFact typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -58,8 +58,8 @@ class ITKIOTransformInsightLegacy_EXPORT TxtTransformIOFactory:public ObjectFact protected: TxtTransformIOFactory(); - ~TxtTransformIOFactory() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~TxtTransformIOFactory() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TxtTransformIOFactory); diff --git a/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx b/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx index 7b787ab36fc..a1a09573cbe 100644 --- a/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx +++ b/Modules/IO/TransformInsightLegacy/test/itkIOTransformTxtTest.cxx @@ -100,7 +100,7 @@ static int oneTest(const std::string & outputDirectory, const char *goodname,con return EXIT_FAILURE; } - if( dynamic_cast(list->front().GetPointer()) == ITK_NULLPTR ) + if( dynamic_cast(list->front().GetPointer()) == nullptr ) { std::cerr << "Failure to dynamic_cast read transform!" << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h b/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h index 1a004c6c377..f52d91dfb1e 100644 --- a/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h +++ b/Modules/IO/TransformMINC/include/itkMINCTransformAdapter.h @@ -101,7 +101,7 @@ template OutputVnlVectorType; /** Method to transform a point. */ - virtual OutputPointType TransformPoint(const InputPointType &point ) const ITK_OVERRIDE + OutputPointType TransformPoint(const InputPointType &point ) const override { if(!m_Initialized) { @@ -147,33 +147,33 @@ template writer->Update(); xfm.push_back( VIO_General_transform() ); - create_grid_transform_no_copy( &xfm[xfm.size()-1], ITK_NULLPTR, ITK_NULLPTR ); //relying on volume_io using the same name + create_grid_transform_no_copy( &xfm[xfm.size()-1], nullptr, nullptr ); //relying on volume_io using the same name if(_inverse_grid) { xfm[xfm.size()-1].inverse_flag=TRUE; diff --git a/Modules/IO/TransformMINC/include/itkMINCTransformIOFactory.h b/Modules/IO/TransformMINC/include/itkMINCTransformIOFactory.h index bdb4dea0d1a..952d3266492 100644 --- a/Modules/IO/TransformMINC/include/itkMINCTransformIOFactory.h +++ b/Modules/IO/TransformMINC/include/itkMINCTransformIOFactory.h @@ -40,9 +40,9 @@ namespace itk typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion() const ITK_OVERRIDE; + const char * GetITKSourceVersion() const override; - virtual const char * GetDescription() const ITK_OVERRIDE; + const char * GetDescription() const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -60,8 +60,8 @@ namespace itk protected: MINCTransformIOFactory(); - ~MINCTransformIOFactory() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MINCTransformIOFactory() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MINCTransformIOFactory); diff --git a/Modules/IO/TransformMatlab/include/itkMatlabTransformIO.h b/Modules/IO/TransformMatlab/include/itkMatlabTransformIO.h index d50e8ec4b00..884af63e5ec 100644 --- a/Modules/IO/TransformMatlab/include/itkMatlabTransformIO.h +++ b/Modules/IO/TransformMatlab/include/itkMatlabTransformIO.h @@ -49,23 +49,23 @@ class ITK_TEMPLATE_EXPORT MatlabTransformIOTemplate:public TransformIOBaseTempla /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read() ITK_OVERRIDE; + void Read() override; /** 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() ITK_OVERRIDE; + void Write() override; protected: MatlabTransformIOTemplate(); - virtual ~MatlabTransformIOTemplate() ITK_OVERRIDE; + ~MatlabTransformIOTemplate() override; }; /** This helps to meet backward compatibility */ diff --git a/Modules/IO/TransformMatlab/include/itkMatlabTransformIOFactory.h b/Modules/IO/TransformMatlab/include/itkMatlabTransformIOFactory.h index cde6e9d3c2e..4dae47a1365 100644 --- a/Modules/IO/TransformMatlab/include/itkMatlabTransformIOFactory.h +++ b/Modules/IO/TransformMatlab/include/itkMatlabTransformIOFactory.h @@ -39,9 +39,9 @@ class ITKIOTransformMatlab_EXPORT MatlabTransformIOFactory:public ObjectFactoryB typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -60,8 +60,8 @@ class ITKIOTransformMatlab_EXPORT MatlabTransformIOFactory:public ObjectFactoryB protected: MatlabTransformIOFactory(); - ~MatlabTransformIOFactory() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MatlabTransformIOFactory() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MatlabTransformIOFactory); diff --git a/Modules/IO/VTK/include/itkVTKImageIO.h b/Modules/IO/VTK/include/itkVTKImageIO.h index 0e9ad4a6181..d38bef11394 100644 --- a/Modules/IO/VTK/include/itkVTKImageIO.h +++ b/Modules/IO/VTK/include/itkVTKImageIO.h @@ -65,48 +65,48 @@ class ITKIOVTK_EXPORT VTKImageIO: // see super class for documentation // // overidden to return true only when supported - virtual bool CanStreamWrite(void) ITK_OVERRIDE; + bool CanStreamWrite(void) override; // see super class for documentation // // overidden to return true only when supported - virtual bool CanStreamRead(void) ITK_OVERRIDE; + bool CanStreamRead(void) override; /*-------- This part of the interface deals with reading data. ------ */ /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimesion information for the current filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Writes the spacing and dimensions of the image. * Assumes SetFileName has been called with a valid file name. */ - virtual void WriteImageInformation() ITK_OVERRIDE {} + void WriteImageInformation() override {} /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegion has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; /** returns the header size, if it is unknown it will return 0 */ - virtual SizeType GetHeaderSize() const ITK_OVERRIDE { return this->m_HeaderSize; } + SizeType GetHeaderSize() const override { return this->m_HeaderSize; } protected: VTKImageIO(); - ~VTKImageIO() ITK_OVERRIDE; + ~VTKImageIO() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void InternalReadImageInformation(std::ifstream & file); @@ -118,14 +118,14 @@ class ITKIOVTK_EXPORT VTKImageIO: void ReadHeaderSize(std::ifstream & file); /** Convenient method to read a buffer as ASCII text. */ - virtual void ReadBufferAsASCII(std::istream & os, void *buffer, + void ReadBufferAsASCII(std::istream & os, void *buffer, IOComponentType ctype, - SizeType numberOfBytesToBeRead) ITK_OVERRIDE; + SizeType numberOfBytesToBeRead) override; /** Convenient method to write a buffer as ASCII text. */ - virtual void WriteBufferAsASCII(std::ostream & os, const void *buffer, + void WriteBufferAsASCII(std::ostream & os, const void *buffer, IOComponentType ctype, - SizeType numberOfBytesToWrite) ITK_OVERRIDE; + SizeType numberOfBytesToWrite) override; /** We have a special method to read symmetric second rank tensors because * the VTK file format expands the symmetry and only supports 3D tensors. */ diff --git a/Modules/IO/VTK/include/itkVTKImageIOFactory.h b/Modules/IO/VTK/include/itkVTKImageIOFactory.h index f647d867384..7b127e3b5c0 100644 --- a/Modules/IO/VTK/include/itkVTKImageIOFactory.h +++ b/Modules/IO/VTK/include/itkVTKImageIOFactory.h @@ -48,9 +48,9 @@ class ITKIOVTK_EXPORT VTKImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class Methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -68,7 +68,7 @@ class ITKIOVTK_EXPORT VTKImageIOFactory:public ObjectFactoryBase protected: VTKImageIOFactory(); - ~VTKImageIOFactory() ITK_OVERRIDE; + ~VTKImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VTKImageIOFactory); diff --git a/Modules/IO/VTK/test/itkVTKImageIOStreamTest.cxx b/Modules/IO/VTK/test/itkVTKImageIOStreamTest.cxx index 6a77e579e53..12864b1fc0c 100644 --- a/Modules/IO/VTK/test/itkVTKImageIOStreamTest.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIOStreamTest.cxx @@ -54,10 +54,10 @@ class ConstantImageSource:public GenerateImageSource< TOutputImage > { m_Value = NumericTraits< typename TOutputImage::PixelType >::ZeroValue(); } - ~ConstantImageSource() ITK_OVERRIDE {} + ~ConstantImageSource() override {} /** Does the real work. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ConstantImageSource); diff --git a/Modules/IO/XML/include/itkDOMNode.h b/Modules/IO/XML/include/itkDOMNode.h index 43e599dfb9c..d6249584a03 100644 --- a/Modules/IO/XML/include/itkDOMNode.h +++ b/Modules/IO/XML/include/itkDOMNode.h @@ -144,19 +144,19 @@ class ITKIOXML_EXPORT DOMNode : public Object /** Remove all attributes and children. */ virtual void RemoveAllAttributesAndChildren(); - /** Retrieve a child by index (return ITK_NULLPTR if i is out of range). */ + /** Retrieve a child by index (return nullptr if i is out of range). */ virtual DOMNode* GetChild( IdentifierType i=0 ); virtual const DOMNode* GetChild( IdentifierType i=0 ) const; - /** Retrieve a child by tag name and an index (multiple children can have a same tag name, return ITK_NULLPTR if no such child). */ + /** Retrieve a child by tag name and an index (multiple children can have a same tag name, return nullptr if no such child). */ virtual DOMNode* GetChild( const std::string& tag, IdentifierType i=0 ); virtual const DOMNode* GetChild( const std::string& tag, IdentifierType i=0 ) const; - /** Retrieve a child by its unique "id" attribute value (return ITK_NULLPTR if not found). */ + /** Retrieve a child by its unique "id" attribute value (return nullptr if not found). */ virtual DOMNode* GetChildByID( const std::string& value ); virtual const DOMNode* GetChildByID( const std::string& value ) const; - /** Retrieve an older or younger sibling by distance (return ITK_NULLPTR if no such sibling). */ + /** Retrieve an older or younger sibling by distance (return nullptr if no such sibling). */ virtual DOMNode* GetSibling( OffsetType i ); virtual const DOMNode* GetSibling( OffsetType i ) const; @@ -182,7 +182,7 @@ class ITKIOXML_EXPORT DOMNode : public Object * / : absolute path (denote apath), search from the root. * \endverbatim * - * The method returns ITK_NULLPTR if queried node does not exist. + * The method returns nullptr if queried node does not exist. */ virtual DOMNode* Find( const std::string& path ); virtual const DOMNode* Find( const std::string& path ) const; @@ -190,7 +190,7 @@ class ITKIOXML_EXPORT DOMNode : public Object /** Return the path of this node within its root, in the form of a query string that uses only indices. */ virtual std::string GetPath() const; - /** Get a child and cast it to a text node (return ITK_NULLPTR if out of range or not a text node). */ + /** Get a child and cast it to a text node (return nullptr if out of range or not a text node). */ virtual DOMTextNode* GetTextChild( IdentifierType i=0 ); virtual const DOMTextNode* GetTextChild( IdentifierType i=0 ) const; diff --git a/Modules/IO/XML/include/itkDOMReader.h b/Modules/IO/XML/include/itkDOMReader.h index df8b577410a..b2dcab1245b 100644 --- a/Modules/IO/XML/include/itkDOMReader.h +++ b/Modules/IO/XML/include/itkDOMReader.h @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT DOMReader : public Object * Some derived readers may accept an incomplete DOM object during the reading process, in those cases * the optional argument 'userdata' can be used to provide the missed information. */ - void Update( const DOMNodeType* inputdom, const void* userdata = ITK_NULLPTR ); + void Update( const DOMNodeType* inputdom, const void* userdata = nullptr ); /** * Function called by end-users to generate the output object from the input XML file. diff --git a/Modules/IO/XML/include/itkDOMReader.hxx b/Modules/IO/XML/include/itkDOMReader.hxx index ff6e11f051a..352f13f2ab4 100644 --- a/Modules/IO/XML/include/itkDOMReader.hxx +++ b/Modules/IO/XML/include/itkDOMReader.hxx @@ -27,7 +27,7 @@ namespace itk { template< typename TOutput > -DOMReader::DOMReader() : m_Output( ITK_NULLPTR ) +DOMReader::DOMReader() : m_Output( nullptr ) { // Create the logger. this->m_Logger = LoggerType::New(); @@ -82,7 +82,7 @@ template< typename TOutput > void DOMReader::Update( const DOMNodeType* inputdom, const void* userdata ) { - if ( inputdom == ITK_NULLPTR ) + if ( inputdom == nullptr ) { itkExceptionMacro( "read from an invalid DOM object" ); } @@ -105,7 +105,7 @@ DOMReader::Update( const DOMNodeType* inputdom, const void* userdata ) info << ClearContent << "Reading \"" << tagname << "\" done!\n"; this->GetLogger()->Info( info ); - if ( this->GetOutput() == ITK_NULLPTR ) + if ( this->GetOutput() == nullptr ) { itkExceptionMacro( "no valid output object was generated" ); } diff --git a/Modules/IO/XML/include/itkDOMWriter.h b/Modules/IO/XML/include/itkDOMWriter.h index c5e7d08f12d..5e12af1acf5 100644 --- a/Modules/IO/XML/include/itkDOMWriter.h +++ b/Modules/IO/XML/include/itkDOMWriter.h @@ -102,7 +102,7 @@ class ITK_TEMPLATE_EXPORT DOMWriter : public Object * Some derived writers may accept an incomplete input object during the writing process, in those cases * the optional argument 'userdata' can be used to provide the missed information. */ - void Update( DOMNodeType* outputdom, const void* userdata = ITK_NULLPTR ); + void Update( DOMNodeType* outputdom, const void* userdata = nullptr ); /** * Function called by end-users to write the input object to the output XML file. diff --git a/Modules/IO/XML/include/itkDOMWriter.hxx b/Modules/IO/XML/include/itkDOMWriter.hxx index 84f08b5cdbc..a4c7080f437 100644 --- a/Modules/IO/XML/include/itkDOMWriter.hxx +++ b/Modules/IO/XML/include/itkDOMWriter.hxx @@ -28,7 +28,7 @@ namespace itk { template< typename TInput > -DOMWriter::DOMWriter() : m_Input( ITK_NULLPTR ) +DOMWriter::DOMWriter() : m_Input( nullptr ) { // Create the logger. this->m_Logger = LoggerType::New(); @@ -72,12 +72,12 @@ template< typename TInput > void DOMWriter::Update( DOMNodeType* outputdom, const void* userdata ) { - if ( outputdom == ITK_NULLPTR ) + if ( outputdom == nullptr ) { itkExceptionMacro( "write to an invalid DOM object" ); } - if ( this->GetInput() == ITK_NULLPTR ) + if ( this->GetInput() == nullptr ) { itkExceptionMacro( "input object is null" ); } diff --git a/Modules/IO/XML/include/itkXMLFile.h b/Modules/IO/XML/include/itkXMLFile.h index 06d63787210..3342800c890 100644 --- a/Modules/IO/XML/include/itkXMLFile.h +++ b/Modules/IO/XML/include/itkXMLFile.h @@ -65,8 +65,8 @@ class ITKIOXML_EXPORT XMLReaderBase:public LightProcessObject protected: XMLReaderBase() {} - virtual ~XMLReaderBase() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~XMLReaderBase() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Instantiates and invokes the XML parser for the file named by * m_Filename. The parser will throw an exception in the case of XML @@ -104,10 +104,10 @@ class XMLReader: public XMLReaderBase protected: XMLReader() : - m_OutputObject(ITK_NULLPTR) + m_OutputObject(nullptr) {} - virtual ~XMLReader() {} + ~XMLReader() override {} T *m_OutputObject; @@ -135,7 +135,7 @@ class XMLWriterBase:public LightProcessObject */ XMLWriterBase() { - m_InputObject = ITK_NULLPTR; + m_InputObject = nullptr; } /** Set the filename to write */ diff --git a/Modules/IO/XML/src/itkDOMNode.cxx b/Modules/IO/XML/src/itkDOMNode.cxx index ae55f07f346..5903f1e03f2 100644 --- a/Modules/IO/XML/src/itkDOMNode.cxx +++ b/Modules/IO/XML/src/itkDOMNode.cxx @@ -23,7 +23,7 @@ namespace itk { -DOMNode::DOMNode() : m_Parent( ITK_NULLPTR ) +DOMNode::DOMNode() : m_Parent( nullptr ) { } @@ -230,7 +230,7 @@ DOMNode::AddChild( DOMNode* node, IdentifierType i ) return; } - if ( node == ITK_NULLPTR || this->ShareRoot(node) ) + if ( node == nullptr || this->ShareRoot(node) ) { itkExceptionMacro( "not able to add child" ); } @@ -248,7 +248,7 @@ DOMNode::AddChild( DOMNode* node, IdentifierType i ) void DOMNode::AddChildAtBegin( DOMNode* node ) { - if ( node == ITK_NULLPTR || this->ShareRoot(node) ) + if ( node == nullptr || this->ShareRoot(node) ) { itkExceptionMacro( "not able to add child" ); } @@ -261,7 +261,7 @@ DOMNode::AddChildAtBegin( DOMNode* node ) void DOMNode::AddChildAtEnd( DOMNode* node ) { - if ( node == ITK_NULLPTR || this->ShareRoot(node) ) + if ( node == nullptr || this->ShareRoot(node) ) { itkExceptionMacro( "not able to add child" ); } @@ -274,7 +274,7 @@ DOMNode::AddChildAtEnd( DOMNode* node ) void DOMNode::SetChild( DOMNode* node, IdentifierType i ) { - if ( node == ITK_NULLPTR || this->ShareRoot(node) ) + if ( node == nullptr || this->ShareRoot(node) ) { itkExceptionMacro( "not able to add child" ); } @@ -297,7 +297,7 @@ DOMNode::RemoveChild( IdentifierType i ) itkExceptionMacro( "not able to remove child" ); } - this->m_Children[i]->m_Parent = ITK_NULLPTR; + this->m_Children[i]->m_Parent = nullptr; this->m_Children.erase( this->m_Children.begin() + i ); } @@ -309,13 +309,13 @@ DOMNode::RemoveAllAttributesAndChildren() this->RemoveAllChildren(); } -/** Retrieve a child by index (return ITK_NULLPTR if out of range). */ +/** Retrieve a child by index (return nullptr if out of range). */ DOMNode* DOMNode::GetChild( IdentifierType i ) { if ( i < 0 || i >= static_cast(this->m_Children.size()) ) { - return ITK_NULLPTR; + return nullptr; } else { @@ -323,7 +323,7 @@ DOMNode::GetChild( IdentifierType i ) } } -/** Retrieve a child by index (return ITK_NULLPTR if out of range). */ +/** Retrieve a child by index (return nullptr if out of range). */ const DOMNode* DOMNode::GetChild( IdentifierType i ) const { @@ -332,7 +332,7 @@ DOMNode::GetChild( IdentifierType i ) const return const_cast(this)->GetChild( i ); } -/** Retrieve a child by tag name and an index (multiple children can have a same tag name, return ITK_NULLPTR if no such child). */ +/** Retrieve a child by tag name and an index (multiple children can have a same tag name, return nullptr if no such child). */ DOMNode* DOMNode::GetChild( const std::string& tag, IdentifierType i ) { @@ -348,10 +348,10 @@ DOMNode::GetChild( const std::string& tag, IdentifierType i ) } } } - return ITK_NULLPTR; + return nullptr; } -/** Retrieve a child by tag name and an index (multiple children can have a same tag name, return ITK_NULLPTR if no such child). */ +/** Retrieve a child by tag name and an index (multiple children can have a same tag name, return nullptr if no such child). */ const DOMNode* DOMNode::GetChild( const std::string& tag, IdentifierType i ) const { @@ -360,7 +360,7 @@ DOMNode::GetChild( const std::string& tag, IdentifierType i ) const return const_cast(this)->GetChild( tag, i ); } -/** Retrieve a child by its unique "id" attribute value (return ITK_NULLPTR if not found). */ +/** Retrieve a child by its unique "id" attribute value (return nullptr if not found). */ DOMNode* DOMNode::GetChildByID( const std::string& value ) { @@ -372,10 +372,10 @@ DOMNode::GetChildByID( const std::string& value ) return node; } } - return ITK_NULLPTR; + return nullptr; } -/** Retrieve a child by its unique "id" attribute value (return ITK_NULLPTR if not found). */ +/** Retrieve a child by its unique "id" attribute value (return nullptr if not found). */ const DOMNode* DOMNode::GetChildByID( const std::string& value ) const { @@ -384,15 +384,15 @@ DOMNode::GetChildByID( const std::string& value ) const return const_cast(this)->GetChildByID( value ); } -/** Retrieve an older or younger sibling by distance (return ITK_NULLPTR if no such sibling). */ +/** Retrieve an older or younger sibling by distance (return nullptr if no such sibling). */ DOMNode* DOMNode::GetSibling( OffsetType i ) { DOMNode* parent = this->GetParent(); - if ( parent == ITK_NULLPTR ) + if ( parent == nullptr ) { - return ITK_NULLPTR; + return nullptr; } IdentifierType j; @@ -407,7 +407,7 @@ DOMNode::GetSibling( OffsetType i ) j += i; if ( j < 0 || j >= static_cast(parent->GetNumberOfChildren()) ) { - return ITK_NULLPTR; + return nullptr; } else { @@ -415,7 +415,7 @@ DOMNode::GetSibling( OffsetType i ) } } -/** Retrieve an older or younger sibling by distance (return ITK_NULLPTR if no such sibling). */ +/** Retrieve an older or younger sibling by distance (return nullptr if no such sibling). */ const DOMNode* DOMNode::GetSibling( OffsetType i ) const { @@ -430,7 +430,7 @@ DOMNode::GetRoot() { DOMNode* node = this->GetParent(); - if ( node == ITK_NULLPTR ) + if ( node == nullptr ) { return this; } @@ -453,7 +453,7 @@ DOMNode::GetRoot() const bool DOMNode::ShareRoot( const DOMNode* node ) const { - return ( node != ITK_NULLPTR && node->GetRoot() == this->GetRoot() ); + return ( node != nullptr && node->GetRoot() == this->GetRoot() ); } /** @@ -469,7 +469,7 @@ DOMNode::ShareRoot( const DOMNode* node ) const * .. : parent node; * / : absolute path (denote apath), search from the root. * - * The method returns ITK_NULLPTR if queried node does not exist. + * The method returns nullptr if queried node does not exist. */ DOMNode* DOMNode::Find( const std::string& path ) @@ -491,7 +491,7 @@ DOMNode::Find( const std::string& path ) } } - DOMNode* node = ITK_NULLPTR; + DOMNode* node = nullptr; // / if ( s == "" ) @@ -592,7 +592,7 @@ DOMNode::Find( const std::string& path ) } } - if ( rpath == "" || node == ITK_NULLPTR ) + if ( rpath == "" || node == nullptr ) { return node; } @@ -604,7 +604,7 @@ DOMNode::Find( const std::string& path ) /** * The following function finds a child or sibling or relative using a query string or path. - * The method returns ITK_NULLPTR if queried node does not exist. + * The method returns nullptr if queried node does not exist. */ const DOMNode* DOMNode::Find( const std::string& path ) const @@ -621,7 +621,7 @@ DOMNode::GetPath() const std::string path = ""; const DOMNode* parent = this->GetParent(); - if ( parent == ITK_NULLPTR ) + if ( parent == nullptr ) { return path; } @@ -644,7 +644,7 @@ DOMNode::GetPath() const return path; } -/** Get a child and cast it to a text node (return ITK_NULLPTR if out of range or not a text node). */ +/** Get a child and cast it to a text node (return nullptr if out of range or not a text node). */ DOMTextNode* DOMNode::GetTextChild( IdentifierType i ) { @@ -652,7 +652,7 @@ DOMNode::GetTextChild( IdentifierType i ) return dynamic_cast(node); } -/** Get a child and cast it to a text node (return ITK_NULLPTR if out of range or not a text node). */ +/** Get a child and cast it to a text node (return nullptr if out of range or not a text node). */ const DOMTextNode* DOMNode::GetTextChild( IdentifierType i ) const { diff --git a/Modules/IO/XML/src/itkDOMNodeXMLReader.cxx b/Modules/IO/XML/src/itkDOMNodeXMLReader.cxx index b8f0c242bd3..f4079eb13d2 100644 --- a/Modules/IO/XML/src/itkDOMNodeXMLReader.cxx +++ b/Modules/IO/XML/src/itkDOMNodeXMLReader.cxx @@ -52,7 +52,7 @@ static void itkXMLParserCharacterDataHandler( void* parser, const char* data, in static_cast(parser)->CharacterDataHandler( data, length ); } -DOMNodeXMLReader::DOMNodeXMLReader() : m_Context(ITK_NULLPTR) +DOMNodeXMLReader::DOMNodeXMLReader() : m_Context(nullptr) { } @@ -69,7 +69,7 @@ DOMNodeXMLReader::Update( std::istream& is ) this->SetDOMNodeXML( temp ); } m_DOMNodeXML->RemoveAllAttributesAndChildren(); - this->m_Context = ITK_NULLPTR; + this->m_Context = nullptr; is >> std::noskipws; std::string s; @@ -84,7 +84,7 @@ DOMNodeXMLReader::Update( std::istream& is ) s.append( 1, c ); } - XML_Parser parser = XML_ParserCreate( ITK_NULLPTR ); + XML_Parser parser = XML_ParserCreate( nullptr ); XML_SetElementHandler( parser, &itkXMLParserStartElement, &itkXMLParserEndElement ); XML_SetCharacterDataHandler( parser, &itkXMLParserCharacterDataHandler ); XML_SetUserData( parser, this ); @@ -124,7 +124,7 @@ DOMNodeXMLReader::Update() void DOMNodeXMLReader::StartElement( const char* name, const char** atts ) { - OutputType* node = ITK_NULLPTR; + OutputType* node = nullptr; if ( this->m_Context ) { OutputPointer node1 = OutputType::New(); diff --git a/Modules/IO/XML/src/itkDOMNodeXMLWriter.cxx b/Modules/IO/XML/src/itkDOMNodeXMLWriter.cxx index d6c3326179a..f6fc6ad172d 100644 --- a/Modules/IO/XML/src/itkDOMNodeXMLWriter.cxx +++ b/Modules/IO/XML/src/itkDOMNodeXMLWriter.cxx @@ -35,7 +35,7 @@ void DOMNodeXMLWriter::Update( std::ostream& os, std::string indent ) { const InputType* input = this->GetInput(); - if ( input == ITK_NULLPTR ) + if ( input == nullptr ) { itkExceptionMacro( "input object is null" ); } diff --git a/Modules/IO/XML/src/itkXMLFile.cxx b/Modules/IO/XML/src/itkXMLFile.cxx index 318d229044a..cd656dfa500 100644 --- a/Modules/IO/XML/src/itkXMLFile.cxx +++ b/Modules/IO/XML/src/itkXMLFile.cxx @@ -60,7 +60,7 @@ static void itkXMLParserCharacterDataHandler(void *parser, const char *data, void XMLReaderBase::parse(void) { - XML_Parser Parser = XML_ParserCreate(ITK_NULLPTR); + XML_Parser Parser = XML_ParserCreate(nullptr); XML_SetElementHandler(Parser, &itkXMLParserStartElement, diff --git a/Modules/IO/XML/test/itkDOMTestObjectDOMReader.h b/Modules/IO/XML/test/itkDOMTestObjectDOMReader.h index 1721a855fae..14fe962696f 100644 --- a/Modules/IO/XML/test/itkDOMTestObjectDOMReader.h +++ b/Modules/IO/XML/test/itkDOMTestObjectDOMReader.h @@ -47,7 +47,7 @@ class DOMTestObjectDOMReader : public DOMReader * This function is called automatically when update functions are performed. * It should fill the contents of the output object by pulling information from the intermediate DOM object. */ - virtual void GenerateData( const DOMNodeType* inputdom, const void* ) ITK_OVERRIDE; + void GenerateData( const DOMNodeType* inputdom, const void* ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DOMTestObjectDOMReader); @@ -57,7 +57,7 @@ inline void DOMTestObjectDOMReader::GenerateData( const DOMNodeType* inputdom, const void* ) { OutputType* output = this->GetOutput(); - if ( output == ITK_NULLPTR ) + if ( output == nullptr ) { OutputType::Pointer object = OutputType::New(); output = (OutputType*)object; @@ -74,7 +74,7 @@ DOMTestObjectDOMReader::GenerateData( const DOMNodeType* inputdom, const void* ) // read child foo const DOMNodeType* foo = inputdom->GetChild( "foo" ); - if ( foo == ITK_NULLPTR ) + if ( foo == nullptr ) { itkExceptionMacro( "child foo not found" ); } diff --git a/Modules/IO/XML/test/itkDOMTestObjectDOMWriter.h b/Modules/IO/XML/test/itkDOMTestObjectDOMWriter.h index ee9d2f58b0d..0e01b2512f0 100644 --- a/Modules/IO/XML/test/itkDOMTestObjectDOMWriter.h +++ b/Modules/IO/XML/test/itkDOMTestObjectDOMWriter.h @@ -48,7 +48,7 @@ class DOMTestObjectDOMWriter : public DOMWriter * This function is called automatically when update functions are performed. * It should fill the contents of the intermediate DOM object by pulling information from the input object. */ - virtual void GenerateData( DOMNodeType* outputdom, const void* ) const ITK_OVERRIDE; + void GenerateData( DOMNodeType* outputdom, const void* ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DOMTestObjectDOMWriter); diff --git a/Modules/Nonunit/Review/include/itkAreaClosingImageFilter.h b/Modules/Nonunit/Review/include/itkAreaClosingImageFilter.h index a99e4e5565e..4651f510fc2 100644 --- a/Modules/Nonunit/Review/include/itkAreaClosingImageFilter.h +++ b/Modules/Nonunit/Review/include/itkAreaClosingImageFilter.h @@ -106,9 +106,9 @@ class AreaClosingImageFilter: m_UseImageSpacing = true; } - virtual ~AreaClosingImageFilter() {} + ~AreaClosingImageFilter() override {} - void GenerateData() ITK_OVERRIDE + void GenerateData() override { this->m_AttributeValuePerPixel = 1; if ( m_UseImageSpacing ) @@ -127,7 +127,7 @@ class AreaClosingImageFilter: Superclass::GenerateData(); } - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "UseImageSpacing: " << m_UseImageSpacing << std::endl; diff --git a/Modules/Nonunit/Review/include/itkAreaOpeningImageFilter.h b/Modules/Nonunit/Review/include/itkAreaOpeningImageFilter.h index fec258f715f..6a7bf9616e3 100644 --- a/Modules/Nonunit/Review/include/itkAreaOpeningImageFilter.h +++ b/Modules/Nonunit/Review/include/itkAreaOpeningImageFilter.h @@ -108,9 +108,9 @@ class AreaOpeningImageFilter: m_UseImageSpacing = true; } - virtual ~AreaOpeningImageFilter() {} + ~AreaOpeningImageFilter() override {} - void GenerateData() ITK_OVERRIDE + void GenerateData() override { this->m_AttributeValuePerPixel = 1; if ( m_UseImageSpacing ) @@ -129,7 +129,7 @@ class AreaOpeningImageFilter: Superclass::GenerateData(); } - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "UseImageSpacing: " << m_UseImageSpacing << std::endl; diff --git a/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.h b/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.h index 5e845df497b..1ec4b41c08d 100644 --- a/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.h +++ b/Modules/Nonunit/Review/include/itkAttributeMorphologyBaseImageFilter.h @@ -143,25 +143,25 @@ class ITK_TEMPLATE_EXPORT AttributeMorphologyBaseImageFilter: m_Lambda = 0; } - virtual ~AttributeMorphologyBaseImageFilter() {} + ~AttributeMorphologyBaseImageFilter() override {} AttributeMorphologyBaseImageFilter(const Self &) {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Standard pipeline method. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** AttributeMorphologyBaseImageFilter needs the entire input. Therefore * it must provide an implementation GenerateInputRequestedRegion(). * \sa ProcessObject::GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** AttributeMorphologyBaseImageFilter will produce all of the output. * Therefore it must provide an implementation of * EnlargeOutputRequestedRegion(). * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) override; AttributeType m_AttributeValuePerPixel; diff --git a/Modules/Nonunit/Review/include/itkComplexBSplineInterpolateImageFunction.h b/Modules/Nonunit/Review/include/itkComplexBSplineInterpolateImageFunction.h index de888aa6d5b..5177c0c6b28 100644 --- a/Modules/Nonunit/Review/include/itkComplexBSplineInterpolateImageFunction.h +++ b/Modules/Nonunit/Review/include/itkComplexBSplineInterpolateImageFunction.h @@ -96,7 +96,7 @@ class ITK_TEMPLATE_EXPORT ComplexBSplineInterpolateImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex(const ContinuousIndexType & index) const override; /** Derivative typedef support */ /* typedef CovariantVector< OutputType, itkGetStaticConstMacro( ImageDimension ) > CovariantVectorType; @@ -119,13 +119,13 @@ class ITK_TEMPLATE_EXPORT ComplexBSplineInterpolateImageFunction: /** Set the input image. This must be set by the user, after setting the spline order! */ - virtual void SetInputImage(const TImageType *inputData) ITK_OVERRIDE; + void SetInputImage(const TImageType *inputData) override; protected: ComplexBSplineInterpolateImageFunction(); - virtual ~ComplexBSplineInterpolateImageFunction() {} + ~ComplexBSplineInterpolateImageFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ComplexBSplineInterpolateImageFunction); diff --git a/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.h b/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.h index e64077eae3a..e7e4c589337 100644 --- a/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.h +++ b/Modules/Nonunit/Review/include/itkConformalFlatteningMeshFilter.h @@ -111,11 +111,11 @@ class ITK_TEMPLATE_EXPORT ConformalFlatteningMeshFilter: protected: ConformalFlatteningMeshFilter(); - ~ConformalFlatteningMeshFilter() {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ConformalFlatteningMeshFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate Requested Data */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ConformalFlatteningMeshFilter); diff --git a/Modules/Nonunit/Review/include/itkConstrainedRegionBasedLevelSetFunctionSharedData.h b/Modules/Nonunit/Review/include/itkConstrainedRegionBasedLevelSetFunctionSharedData.h index 0e29bd944a1..c63f9eca7c2 100644 --- a/Modules/Nonunit/Review/include/itkConstrainedRegionBasedLevelSetFunctionSharedData.h +++ b/Modules/Nonunit/Review/include/itkConstrainedRegionBasedLevelSetFunctionSharedData.h @@ -124,7 +124,7 @@ class ConstrainedRegionBasedLevelSetFunctionSharedData: typedef typename Superclass::LevelSetDataPointerVector LevelSetDataPointerVector; typedef typename Superclass::LevelSetDataPointerVectorIterator LevelSetDataPointerVectorIterator; - void PopulateListImage() ITK_OVERRIDE + void PopulateListImage() override { ListSpacingType spacing = this->m_NearestNeighborListImage->GetSpacing(); @@ -178,7 +178,7 @@ class ConstrainedRegionBasedLevelSetFunctionSharedData: protected: ConstrainedRegionBasedLevelSetFunctionSharedData():Superclass(){} - ~ConstrainedRegionBasedLevelSetFunctionSharedData(){} + ~ConstrainedRegionBasedLevelSetFunctionSharedData() override{} private: ConstrainedRegionBasedLevelSetFunctionSharedData(const Self &); //purposely diff --git a/Modules/Nonunit/Review/include/itkContourExtractor2DImageFilter.h b/Modules/Nonunit/Review/include/itkContourExtractor2DImageFilter.h index 456edf7e1cc..83e88e38801 100644 --- a/Modules/Nonunit/Review/include/itkContourExtractor2DImageFilter.h +++ b/Modules/Nonunit/Review/include/itkContourExtractor2DImageFilter.h @@ -179,15 +179,15 @@ class ITK_TEMPLATE_EXPORT ContourExtractor2DImageFilter: protected: ContourExtractor2DImageFilter(); - virtual ~ContourExtractor2DImageFilter(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ContourExtractor2DImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** ContourExtractor2DImageFilter manually controls the input requested * region via SetRequestedRegion and ClearRequestedRegion, so it must * override the superclass method. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: VertexType InterpolateContourPosition(InputPixelType fromValue, diff --git a/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h b/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h index b4bf49415c0..1851536f578 100644 --- a/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h +++ b/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h @@ -117,19 +117,19 @@ class ITK_TEMPLATE_EXPORT DirectFourierReconstructionImageToImageFilter: /** Constructor */ DirectFourierReconstructionImageToImageFilter(); /** Destructor */ - ~DirectFourierReconstructionImageToImageFilter() {} + ~DirectFourierReconstructionImageToImageFilter() override {} /** Output class information */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate metadata for output image */ - void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** Calculate the required input region */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Actual filter computation */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: /** Const slice iterator type of the input image */ diff --git a/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFilter.h b/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFilter.h index b38ecd48eea..3bd1b507f7d 100644 --- a/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFilter.h +++ b/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFilter.h @@ -196,8 +196,8 @@ class ITK_TEMPLATE_EXPORT DiscreteGaussianDerivativeImageFilter : m_InternalNumberOfStreamDivisions = ImageDimension * ImageDimension; } - virtual ~DiscreteGaussianDerivativeImageFilter() {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DiscreteGaussianDerivativeImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** DiscreteGaussianDerivativeImageFilter needs a larger input requested region * than the output requested region (larger by the size of the @@ -205,14 +205,14 @@ class ITK_TEMPLATE_EXPORT DiscreteGaussianDerivativeImageFilter : * provide an implementation for GenerateInputRequestedRegion() in * order to inform the pipeline execution model. * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Standard pipeline method. While this class does not implement a * ThreadedGenerateData(), its GenerateData() delegates all * calculations to an NeighborhoodOperatorImageFilter. Since the * NeighborhoodOperatorImageFilter is multithreaded, this filter is * multithreaded by default. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: diff --git a/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.h b/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.h index 1a7b236d324..027d1bf2b75 100644 --- a/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.h +++ b/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.h @@ -106,14 +106,14 @@ class ITK_TEMPLATE_EXPORT DiscreteGaussianDerivativeImageFunction: public: /** Evaluate the function at specified point. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE; + OutputType Evaluate(const PointType & point) const override; /** Evaluate the function at specified Index position */ - virtual OutputType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at specified ContinuousIndex position. */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override; /** Set/Get the variance for the discrete Gaussian kernel. * Sets the variance for individual dimensions. The default is 0.0 @@ -188,7 +188,7 @@ class ITK_TEMPLATE_EXPORT DiscreteGaussianDerivativeImageFunction: * \warning this method caches BufferedRegion information. * If the BufferedRegion has changed, user must call * SetInputImage again to update cached values. */ - virtual void SetInputImage(const InputImageType *ptr) ITK_OVERRIDE; + void SetInputImage(const InputImageType *ptr) override; /** Initialize the Gaussian kernel. Call this method before * evaluating the function. This method MUST be called after any @@ -200,10 +200,10 @@ class ITK_TEMPLATE_EXPORT DiscreteGaussianDerivativeImageFunction: DiscreteGaussianDerivativeImageFunction(); DiscreteGaussianDerivativeImageFunction(const Self &){} - ~DiscreteGaussianDerivativeImageFunction(){} + ~DiscreteGaussianDerivativeImageFunction() override{} void operator=(const Self &){} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void RecomputeGaussianKernel(); diff --git a/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.h b/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.h index 806a0426061..1611aad50d3 100644 --- a/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.h +++ b/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.h @@ -109,14 +109,14 @@ class ITK_TEMPLATE_EXPORT DiscreteGradientMagnitudeGaussianImageFunction: public: /** Evaluate the function in the given dimension at specified point */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE; + OutputType Evaluate(const PointType & point) const override; /** Evaluate the function at specified Index position */ - virtual OutputType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at specified ContinuousIndex position */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override; /** Set/Get the variance for the discrete Gaussian kernel. * Sets the variance for individual dimensions. The default is 0.0 in each dimension. @@ -175,7 +175,7 @@ class ITK_TEMPLATE_EXPORT DiscreteGradientMagnitudeGaussianImageFunction: * \warning this method caches BufferedRegion information. * If the BufferedRegion has changed, user must call * SetInputImage again to update cached values. */ - virtual void SetInputImage(const InputImageType *ptr) ITK_OVERRIDE; + void SetInputImage(const InputImageType *ptr) override; /** Initialize the Gaussian kernel. Call this method before evaluating the function. * This method MUST be called after any changes to function parameters. */ @@ -186,10 +186,10 @@ class ITK_TEMPLATE_EXPORT DiscreteGradientMagnitudeGaussianImageFunction: DiscreteGradientMagnitudeGaussianImageFunction(); DiscreteGradientMagnitudeGaussianImageFunction(const Self &){} - ~DiscreteGradientMagnitudeGaussianImageFunction() ITK_OVERRIDE {} + ~DiscreteGradientMagnitudeGaussianImageFunction() override {} void operator=(const Self &){} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void RecomputeGaussianKernel(); diff --git a/Modules/Nonunit/Review/include/itkDiscreteHessianGaussianImageFunction.h b/Modules/Nonunit/Review/include/itkDiscreteHessianGaussianImageFunction.h index f229d973784..e64ed106be3 100644 --- a/Modules/Nonunit/Review/include/itkDiscreteHessianGaussianImageFunction.h +++ b/Modules/Nonunit/Review/include/itkDiscreteHessianGaussianImageFunction.h @@ -116,14 +116,14 @@ class ITK_TEMPLATE_EXPORT DiscreteHessianGaussianImageFunction: public: /** Evalutate the in the given dimension at specified point */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE; + OutputType Evaluate(const PointType & point) const override; /** Evaluate the function at specified Index position */ - virtual OutputType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtIndex(const IndexType & index) const override; /** Evaluate the function at specified ContinuousIndex position */ - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & index) const override; /** Set/Get the variance for the discrete Gaussian kernel. * Sets the variance for individual dimensions. The default is 0.0 in each dimension. @@ -182,7 +182,7 @@ class ITK_TEMPLATE_EXPORT DiscreteHessianGaussianImageFunction: * \warning this method caches BufferedRegion information. * If the BufferedRegion has changed, user must call * SetInputImage again to update cached values. */ - virtual void SetInputImage(const InputImageType *ptr) ITK_OVERRIDE; + void SetInputImage(const InputImageType *ptr) override; /** Initialize the Gaussian kernel. Call this method before evaluating the function. * This method MUST be called after any changes to function parameters. */ @@ -193,10 +193,10 @@ class ITK_TEMPLATE_EXPORT DiscreteHessianGaussianImageFunction: DiscreteHessianGaussianImageFunction(); DiscreteHessianGaussianImageFunction(const Self &){} - ~DiscreteHessianGaussianImageFunction(){} + ~DiscreteHessianGaussianImageFunction() override{} void operator=(const Self &){} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void RecomputeGaussianKernel(); diff --git a/Modules/Nonunit/Review/include/itkFastApproximateRankImageFilter.h b/Modules/Nonunit/Review/include/itkFastApproximateRankImageFilter.h index 9e1d5215597..3313e587538 100644 --- a/Modules/Nonunit/Review/include/itkFastApproximateRankImageFilter.h +++ b/Modules/Nonunit/Review/include/itkFastApproximateRankImageFilter.h @@ -101,9 +101,9 @@ class FastApproximateRankImageFilter: this->SetRank(0.5); } - ~FastApproximateRankImageFilter() {} + ~FastApproximateRankImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "Rank: " << m_Rank << std::endl; diff --git a/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.h b/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.h index 20841124547..7c5c089049e 100644 --- a/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.h +++ b/Modules/Nonunit/Review/include/itkGridForwardWarpImageFilter.h @@ -120,11 +120,11 @@ class ITK_TEMPLATE_EXPORT GridForwardWarpImageFilter: protected: GridForwardWarpImageFilter(); - ~GridForwardWarpImageFilter() {} + ~GridForwardWarpImageFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GridForwardWarpImageFilter); diff --git a/Modules/Nonunit/Review/include/itkJPEG2000ImageIO.h b/Modules/Nonunit/Review/include/itkJPEG2000ImageIO.h index 72dc7526f21..c72694d3190 100644 --- a/Modules/Nonunit/Review/include/itkJPEG2000ImageIO.h +++ b/Modules/Nonunit/Review/include/itkJPEG2000ImageIO.h @@ -64,36 +64,36 @@ class JPEG2000ImageIO:public StreamingImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine the file type. Returns true if this ImageIO can write the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; /** Method for supporting streaming. Given a requested region, determine what * could be the region that we can read from the file. This is called the * streamable region, which will be smaller than the LargestPossibleRegion and * greater or equal to the RequestedRegion */ - virtual ImageIORegion - GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requested) const ITK_OVERRIDE; + ImageIORegion + GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requested) const override; /** Method required by the base class StreamingImageIOBase */ - virtual SizeType GetHeaderSize(void) const ITK_OVERRIDE; + SizeType GetHeaderSize(void) const override; /** Define the tile size to use when writing out an image. */ void SetTileSize(int x, int y); @@ -103,13 +103,13 @@ class JPEG2000ImageIO:public StreamingImageIOBase * These methods are re-overridden to not support streaming for * now... */ - virtual bool CanStreamWrite( void ) ITK_OVERRIDE; + bool CanStreamWrite( void ) override; protected: JPEG2000ImageIO(); - ~JPEG2000ImageIO() ITK_OVERRIDE; + ~JPEG2000ImageIO() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(JPEG2000ImageIO); diff --git a/Modules/Nonunit/Review/include/itkJPEG2000ImageIOFactory.h b/Modules/Nonunit/Review/include/itkJPEG2000ImageIOFactory.h index d831bbe360d..ea574a1923f 100644 --- a/Modules/Nonunit/Review/include/itkJPEG2000ImageIOFactory.h +++ b/Modules/Nonunit/Review/include/itkJPEG2000ImageIOFactory.h @@ -49,9 +49,9 @@ class JPEG2000ImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion() const ITK_OVERRIDE; + const char * GetITKSourceVersion() const override; - virtual const char * GetDescription() const ITK_OVERRIDE; + const char * GetDescription() const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -70,7 +70,7 @@ class JPEG2000ImageIOFactory:public ObjectFactoryBase protected: JPEG2000ImageIOFactory(); - ~JPEG2000ImageIOFactory() ITK_OVERRIDE; + ~JPEG2000ImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(JPEG2000ImageIOFactory); diff --git a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h index fae3fcec0c8..f8be57cff42 100644 --- a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h +++ b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h @@ -466,10 +466,10 @@ class ITK_TEMPLATE_EXPORT LabelGeometryImageFilter: protected: LabelGeometryImageFilter(); - ~LabelGeometryImageFilter(){} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LabelGeometryImageFilter() override{} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabelGeometryImageFilter); diff --git a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx index 1c3cffa9ba6..b32055cdeb4 100644 --- a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx @@ -1038,7 +1038,7 @@ LabelGeometryImageFilter< TLabelImage, TIntensityImage > if ( mapIt == m_LabelGeometryMapper.end() ) { // label does not exist, return a default value - return ITK_NULLPTR; + return nullptr; } else { @@ -1057,7 +1057,7 @@ LabelGeometryImageFilter< TLabelImage, TIntensityImage > if ( mapIt == m_LabelGeometryMapper.end() ) { // label does not exist, return a default value - return ITK_NULLPTR; + return nullptr; } else { diff --git a/Modules/Nonunit/Review/include/itkMiniPipelineSeparableImageFilter.h b/Modules/Nonunit/Review/include/itkMiniPipelineSeparableImageFilter.h index 38e7a914ad8..92d9bfd62ab 100644 --- a/Modules/Nonunit/Review/include/itkMiniPipelineSeparableImageFilter.h +++ b/Modules/Nonunit/Review/include/itkMiniPipelineSeparableImageFilter.h @@ -84,23 +84,23 @@ class ITK_TEMPLATE_EXPORT MiniPipelineSeparableImageFilter: /** n-dimensional Kernel radius. */ typedef typename TInputImage::SizeType RadiusType; - virtual void SetRadius(const RadiusType &) ITK_OVERRIDE; + void SetRadius(const RadiusType &) override; - virtual void SetRadius(const SizeValueType & radius) ITK_OVERRIDE + void SetRadius(const SizeValueType & radius) override { // needed because of the overloading of the method Superclass::SetRadius(radius); } - virtual void Modified() const ITK_OVERRIDE; + void Modified() const override; - virtual void SetNumberOfThreads(ThreadIdType nb) ITK_OVERRIDE; + void SetNumberOfThreads(ThreadIdType nb) override; protected: MiniPipelineSeparableImageFilter(); - ~MiniPipelineSeparableImageFilter() {} + ~MiniPipelineSeparableImageFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; typename FilterType::Pointer m_Filters[ImageDimension]; typename CastType::Pointer m_Cast; diff --git a/Modules/Nonunit/Review/include/itkMultiScaleHessianBasedMeasureImageFilter.h b/Modules/Nonunit/Review/include/itkMultiScaleHessianBasedMeasureImageFilter.h index 916d831e53a..8a12208ad98 100644 --- a/Modules/Nonunit/Review/include/itkMultiScaleHessianBasedMeasureImageFilter.h +++ b/Modules/Nonunit/Review/include/itkMultiScaleHessianBasedMeasureImageFilter.h @@ -178,16 +178,16 @@ class ITK_TEMPLATE_EXPORT MultiScaleHessianBasedMeasureImageFilter: protected: MultiScaleHessianBasedMeasureImageFilter(); - ~MultiScaleHessianBasedMeasureImageFilter() {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MultiScaleHessianBasedMeasureImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate Data */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *) override; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; private: void UpdateMaximumResponse(double sigma); diff --git a/Modules/Nonunit/Review/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx b/Modules/Nonunit/Review/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx index 3f93a0801f1..94ad28b498e 100644 --- a/Modules/Nonunit/Review/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx @@ -53,7 +53,7 @@ MultiScaleHessianBasedMeasureImageFilter m_SigmaStepMethod = Self::LogarithmicSigmaSteps; m_HessianFilter = HessianFilterType::New(); - m_HessianToMeasureFilter = ITK_NULLPTR; + m_HessianToMeasureFilter = nullptr; //Instantiate Update buffer m_UpdateBuffer = UpdateBufferType::New(); diff --git a/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.h b/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.h index 4c0750db2ec..63c4cb81f16 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.h +++ b/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.h @@ -190,21 +190,21 @@ class ITK_TEMPLATE_EXPORT MultiphaseDenseFiniteDifferenceImageFilter: // this->m_UpdateCounter = 0; // FIXME: Should this be a bool ? } - ~MultiphaseDenseFiniteDifferenceImageFilter() {} + ~MultiphaseDenseFiniteDifferenceImageFilter() override {} - virtual void PrintSelf(std::ostream &, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream &, Indent indent) const override; /** A simple method to copy the data from the input to the output. ( Supports * "read-only" image adaptors in the case where the input image type converts * to a different output image type. ) */ - virtual void CopyInputToOutput() ITK_OVERRIDE; + void CopyInputToOutput() override; - virtual void PostProcessOutput() ITK_OVERRIDE; + void PostProcessOutput() override; /** This method applies changes from the m_UpdateBuffer to the output using * the ThreadedApplyUpdate() method and a multithreading mechanism. "dt" is * the time step to use for the update of each pixel. */ - virtual void ApplyUpdate(TimeStepType dt) ITK_OVERRIDE; + void ApplyUpdate(TimeStepType dt) override; unsigned int m_ReinitializeCounter; // FIXME: Should this be a boolean ? // unsigned int m_UpdateCounter; // FIXME: Should this be a boolean ? @@ -214,12 +214,12 @@ class ITK_TEMPLATE_EXPORT MultiphaseDenseFiniteDifferenceImageFilter: /** This method allocates storage in m_UpdateBuffer. It is called from * Superclass::GenerateData(). */ - virtual void AllocateUpdateBuffer() ITK_OVERRIDE; + void AllocateUpdateBuffer() override; /** This method populates an update buffer with changes for each pixel in the * output using the ThreadedCalculateChange() method and a multithreading * mechanism. Returns value is a time step to be used for the update. */ - virtual TimeStepType CalculateChange() ITK_OVERRIDE; + TimeStepType CalculateChange() override; /** The buffer that holds the updates for an iteration of the algorithm. */ std::vector< InputImagePointer > m_UpdateBuffers; diff --git a/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx b/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx index c4857e028a4..32c9c5ec80a 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx @@ -62,7 +62,7 @@ MultiphaseDenseFiniteDifferenceImageFilter< TInputImage, TFeatureImage, if ( !input || !output ) { - itkExceptionMacro (<< "Either input and/or output is ITK_NULLPTR."); + itkExceptionMacro (<< "Either input and/or output is nullptr."); } ImageRegionConstIterator< InputImageType > in( input, input->GetBufferedRegion() ); @@ -184,7 +184,7 @@ MultiphaseDenseFiniteDifferenceImageFilter< TInputImage, TFeatureImage, { this->Superclass::SetFunctionCount(n); - this->m_UpdateBuffers.resize(n, ITK_NULLPTR); + this->m_UpdateBuffers.resize(n, nullptr); for ( IdCellType i = 0; i < this->m_FunctionCount; i++ ) { diff --git a/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h b/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h index c65b568cb78..0d87c29e7c8 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h +++ b/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h @@ -242,7 +242,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseFiniteDifferenceImageFilter: } else { - return ITK_NULLPTR; + return nullptr; } } @@ -346,7 +346,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseFiniteDifferenceImageFilter: { m_FunctionCount = n; - m_DifferenceFunctions.resize(m_FunctionCount, ITK_NULLPTR); + m_DifferenceFunctions.resize(m_FunctionCount, nullptr); RadiusType radius; radius.Fill(1); @@ -358,7 +358,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseFiniteDifferenceImageFilter: } // Initialize the images - m_LevelSet.resize(m_FunctionCount, ITK_NULLPTR); + m_LevelSet.resize(m_FunctionCount, nullptr); // Initialize the lookup table this->m_Lookup.resize(m_FunctionCount); @@ -380,7 +380,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseFiniteDifferenceImageFilter: protected: MultiphaseFiniteDifferenceImageFilter() { - this->m_KdTree = ITK_NULLPTR; + this->m_KdTree = nullptr; this->m_ElapsedIterations = 0; this->m_MaximumRMSError = itk::Math::eps; this->m_RMSChange = NumericTraits< double >::max(); @@ -392,7 +392,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseFiniteDifferenceImageFilter: this->InPlaceOff(); } - ~MultiphaseFiniteDifferenceImageFilter(){} + ~MultiphaseFiniteDifferenceImageFilter() override{} IdCellType m_FunctionCount; std::vector< InputImagePointer > m_LevelSet; @@ -411,7 +411,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseFiniteDifferenceImageFilter: * calculation. */ bool m_UseImageSpacing; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** This method allocates a temporary update container in the subclass. */ virtual void AllocateUpdateBuffer() = 0; @@ -436,7 +436,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseFiniteDifferenceImageFilter: /** This is the default, high-level algorithm for calculating finite * difference solutions. It calls virtual methods in its subclasses * to implement the major steps of the algorithm. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** FiniteDifferenceImageFilter2 needs a larger input requested region than * the output requested region. As such, we need to provide @@ -449,7 +449,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseFiniteDifferenceImageFilter: * handled as described in the FiniteDifferenceFunction defined by the * subclass. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This method returns true when the current iterative solution of the * equation has met the criteria to stop solving. Defined by a subclass. */ diff --git a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h index 8a9b555fa7c..393f4c56094 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h +++ b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.h @@ -305,7 +305,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseSparseFiniteDifferenceImageFilter: { this->Superclass::SetFunctionCount(n); - m_SparseData.resize(this->m_FunctionCount, ITK_NULLPTR); + m_SparseData.resize(this->m_FunctionCount, nullptr); for ( IdCellType i = 0; i < this->m_FunctionCount; i++ ) { @@ -326,7 +326,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseSparseFiniteDifferenceImageFilter: protected: MultiphaseSparseFiniteDifferenceImageFilter(); - ~MultiphaseSparseFiniteDifferenceImageFilter() + ~MultiphaseSparseFiniteDifferenceImageFilter() override { while ( !m_SparseData.empty() ) { @@ -335,7 +335,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseSparseFiniteDifferenceImageFilter: } } - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; // This data structure is created for each phase struct SparseDataStruct { @@ -387,7 +387,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseSparseFiniteDifferenceImageFilter: /**This method packages the output(s) into a consistent format. The default * implementation produces a volume with the final solution values in the * sparse field, and inside and outside values elsewhere as appropriate. */ - virtual void PostProcessOutput() ITK_OVERRIDE; + void PostProcessOutput() override; /**This method pre-processes pixels inside and outside the sparse field * layers. The default is to set them to positive and negative values, @@ -396,24 +396,24 @@ class ITK_TEMPLATE_EXPORT MultiphaseSparseFiniteDifferenceImageFilter: virtual void InitializeBackgroundPixels(); /** Constructs the sparse field layers and initializes their values. */ - void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Copies the input to the output image. Processing occurs on the output * image, so the data type of the output image determines the precision of * the calculations (i.e. double or float). This method overrides the * parent class method to do some additional processing. */ - void CopyInputToOutput() ITK_OVERRIDE; + void CopyInputToOutput() override; /** Reserves memory in the update buffer. Called before each iteration. */ - void AllocateUpdateBuffer() ITK_OVERRIDE {} + void AllocateUpdateBuffer() override {} /** Applies the update buffer values to the active layer and reconstructs the * sparse field layers for the next iteration. */ - void ApplyUpdate(TimeStepType dt) ITK_OVERRIDE; + void ApplyUpdate(TimeStepType dt) override; /** Traverses the active layer list and calculates the change at these * indices to be applied in the current iteration. */ - TimeStepType CalculateChange() ITK_OVERRIDE; + TimeStepType CalculateChange() override; /** Initializes a layer of the sparse field using a previously initialized * layer. Builds the list of nodes in m_Layer[to] using m_Layer[from]. @@ -465,7 +465,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseSparseFiniteDifferenceImageFilter: /** */ void ProcessOutsideList(LayerType *OutsideList, StatusType ChangeToStatus); - void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; virtual void UpdatePixel( unsigned int itkNotUsed(functionIndex), unsigned int itkNotUsed(idx), NeighborhoodIterator< InputImageType > & itkNotUsed(iterator), ValueType & itkNotUsed( diff --git a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx index f9b46f10434..9c321c417e4 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkMultiphaseSparseFiniteDifferenceImageFilter.hxx @@ -1386,7 +1386,7 @@ MultiphaseSparseFiniteDifferenceImageFilter< TInputImage, TFeatureImage, TOutput if ( !input || !output ) { - itkExceptionMacro (<< "Either input and/or output is ITK_NULLPTR."); + itkExceptionMacro (<< "Either input and/or output is nullptr."); } ImageRegionIterator< OutputImageType > outIt (output, region); diff --git a/Modules/Nonunit/Review/include/itkNeuralNetworkFileReader.h b/Modules/Nonunit/Review/include/itkNeuralNetworkFileReader.h index 6202da67945..03b0ab7d68e 100644 --- a/Modules/Nonunit/Review/include/itkNeuralNetworkFileReader.h +++ b/Modules/Nonunit/Review/include/itkNeuralNetworkFileReader.h @@ -116,8 +116,8 @@ class ITK_TEMPLATE_EXPORT NeuralNetworkFileReader:public Object protected: NeuralNetworkFileReader(); - ~NeuralNetworkFileReader(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NeuralNetworkFileReader() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Nonunit/Review/include/itkNeuralNetworkFileReader.hxx b/Modules/Nonunit/Review/include/itkNeuralNetworkFileReader.hxx index a5ef6865cca..461b9f683e3 100644 --- a/Modules/Nonunit/Review/include/itkNeuralNetworkFileReader.hxx +++ b/Modules/Nonunit/Review/include/itkNeuralNetworkFileReader.hxx @@ -239,10 +239,10 @@ NeuralNetworkFileReader< TNetwork > typename tfType::Pointer tf = tfType::New(); layerptr->SetTransferFunction(tf); } - else if ( !strcmp( (char *)mF->value, "ITK_NULLPTR" ) ) + else if ( !strcmp( (char *)mF->value, "nullptr" ) ) { - std::cout << "ITK_NULLPTR" << std::endl; - layerptr->SetTransferFunction(ITK_NULLPTR); + std::cout << "nullptr" << std::endl; + layerptr->SetTransferFunction(nullptr); } mF = MET_GetFieldRecord("InputFunction", &this->m_Fields); @@ -255,10 +255,10 @@ NeuralNetworkFileReader< TNetwork > typename ifType::Pointer ifcn = ifType::New(); layerptr->SetNodeInputFunction(ifcn); } - else if ( !strcmp( (char *)( mF->value ), "ITK_NULLPTR" ) ) + else if ( !strcmp( (char *)( mF->value ), "nullptr" ) ) { - std::cout << "ITK_NULLPTR" << std::endl; - layerptr->SetNodeInputFunction(ITK_NULLPTR); + std::cout << "nullptr" << std::endl; + layerptr->SetNodeInputFunction(nullptr); } this->m_Network->AddLayer(layerptr); } diff --git a/Modules/Nonunit/Review/include/itkNeuralNetworkFileWriter.h b/Modules/Nonunit/Review/include/itkNeuralNetworkFileWriter.h index 33765f202ee..ab70aded137 100644 --- a/Modules/Nonunit/Review/include/itkNeuralNetworkFileWriter.h +++ b/Modules/Nonunit/Review/include/itkNeuralNetworkFileWriter.h @@ -126,8 +126,8 @@ class ITK_TEMPLATE_EXPORT NeuralNetworkFileWriter:public Object protected: NeuralNetworkFileWriter(); - ~NeuralNetworkFileWriter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NeuralNetworkFileWriter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: void ClearFields(); diff --git a/Modules/Nonunit/Review/include/itkNeuralNetworkFileWriter.hxx b/Modules/Nonunit/Review/include/itkNeuralNetworkFileWriter.hxx index 11dc3199948..d73b9f0e89a 100644 --- a/Modules/Nonunit/Review/include/itkNeuralNetworkFileWriter.hxx +++ b/Modules/Nonunit/Review/include/itkNeuralNetworkFileWriter.hxx @@ -160,7 +160,7 @@ NeuralNetworkFileWriter< TNetwork > else { MET_InitWriteField(mF, "TransferFunction", MET_STRING, - strlen("ITK_NULLPTR"), "ITK_NULLPTR"); + strlen("nullptr"), "nullptr"); } this->m_Fields.push_back(mF); } @@ -178,7 +178,7 @@ NeuralNetworkFileWriter< TNetwork > else { MET_InitWriteField(mF, "InputFunction", MET_STRING, - strlen("ITK_NULLPTR"), "ITK_NULLPTR"); + strlen("nullptr"), "nullptr"); } mF->terminateRead = true; this->m_Fields.push_back(mF); diff --git a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.h b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.h index db9a36786c9..2bb06b34461 100644 --- a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.h +++ b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.h @@ -180,16 +180,16 @@ class ITK_TEMPLATE_EXPORT RegionBasedLevelSetFunction:public void UpdateSharedData(bool forceUpdate); - void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { return new GlobalDataStruct; } - TimeStepType ComputeGlobalTimeStep(void *GlobalData) const ITK_OVERRIDE; + TimeStepType ComputeGlobalTimeStep(void *GlobalData) const override; /** Compute the equation value. */ - virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, - void *globalData, const FloatOffsetType & = FloatOffsetType(0.0) ) ITK_OVERRIDE; + PixelType ComputeUpdate( const NeighborhoodType & neighborhood, + void *globalData, const FloatOffsetType & = FloatOffsetType(0.0) ) override; void SetInitialImage(InputImageType *f) { @@ -271,7 +271,7 @@ class ITK_TEMPLATE_EXPORT RegionBasedLevelSetFunction:public void SetFunctionId(const unsigned int & iFid) { this->m_FunctionId = iFid; } - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE + void ReleaseGlobalDataPointer(void *GlobalData) const override { delete (GlobalDataStruct *)GlobalData; } virtual ScalarValueType ComputeCurvature(const NeighborhoodType &, @@ -300,7 +300,7 @@ class ITK_TEMPLATE_EXPORT RegionBasedLevelSetFunction:public protected: RegionBasedLevelSetFunction(); - virtual ~RegionBasedLevelSetFunction() {} + ~RegionBasedLevelSetFunction() override {} /** The initial level set image */ InputImageConstPointer m_InitialImage; diff --git a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx index 8118e83780d..31a731a1f83 100644 --- a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx +++ b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx @@ -57,9 +57,9 @@ RegionBasedLevelSetFunction< TInput, m_FunctionId = 0; - m_SharedData = ITK_NULLPTR; - m_InitialImage = ITK_NULLPTR; - m_FeatureImage = ITK_NULLPTR; + m_SharedData = nullptr; + m_InitialImage = nullptr; + m_FeatureImage = nullptr; m_UpdateC = false; for ( unsigned int i = 0; i < ImageDimension; i++ ) diff --git a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.h b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.h index 405017a26a9..6795a13107f 100644 --- a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.h +++ b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.h @@ -139,7 +139,7 @@ class ITK_TEMPLATE_EXPORT RegionBasedLevelSetFunctionData:public LightObject protected: RegionBasedLevelSetFunctionData(); - virtual ~RegionBasedLevelSetFunctionData() {} + ~RegionBasedLevelSetFunctionData() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(RegionBasedLevelSetFunctionData); diff --git a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.hxx b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.hxx index 6d6d51d0c4f..fe79bc954bc 100644 --- a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.hxx +++ b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.hxx @@ -29,7 +29,7 @@ RegionBasedLevelSetFunctionData< TInputImage, TFeatureImage > m_WeightedNumberOfPixelsInsideLevelSet = 0.; m_WeightedNumberOfPixelsOutsideLevelSet = 0.; - m_HeavisideFunctionOfLevelSetImage = ITK_NULLPTR; + m_HeavisideFunctionOfLevelSetImage = nullptr; } template< typename TInputImage, typename TFeatureImage > diff --git a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionSharedData.h b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionSharedData.h index 0c5b07d7e23..027ff0b1f9f 100644 --- a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionSharedData.h +++ b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionSharedData.h @@ -131,7 +131,7 @@ class RegionBasedLevelSetFunctionSharedData:public LightObject void SetFunctionCount(const unsigned int & n) { this->m_FunctionCount = n; - this->m_LevelSetDataPointerVector.resize(n, ITK_NULLPTR); + this->m_LevelSetDataPointerVector.resize(n, nullptr); LevelSetDataPointerVectorIterator it = m_LevelSetDataPointerVector.begin(); LevelSetDataPointerVectorIterator end = m_LevelSetDataPointerVector.end(); @@ -175,8 +175,8 @@ class RegionBasedLevelSetFunctionSharedData:public LightObject KdTreePointer m_KdTree; protected: - RegionBasedLevelSetFunctionSharedData():m_NumberOfNeighbors(6), m_KdTree(ITK_NULLPTR){} - ~RegionBasedLevelSetFunctionSharedData(){} + RegionBasedLevelSetFunctionSharedData():m_NumberOfNeighbors(6), m_KdTree(nullptr){} + ~RegionBasedLevelSetFunctionSharedData() override{} private: ITK_DISALLOW_COPY_AND_ASSIGN(RegionBasedLevelSetFunctionSharedData); diff --git a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.h b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.h index 59775118ebf..cfb21c863b7 100644 --- a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.h +++ b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.h @@ -104,8 +104,8 @@ class ITK_TEMPLATE_EXPORT RobustAutomaticThresholdCalculator:public Object protected: RobustAutomaticThresholdCalculator(); - virtual ~RobustAutomaticThresholdCalculator() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RobustAutomaticThresholdCalculator() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RobustAutomaticThresholdCalculator); diff --git a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.h b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.h index 83db5ce4f3b..f747a29febb 100644 --- a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.h +++ b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdImageFilter.h @@ -150,12 +150,12 @@ class ITK_TEMPLATE_EXPORT RobustAutomaticThresholdImageFilter: protected: RobustAutomaticThresholdImageFilter(); - ~RobustAutomaticThresholdImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RobustAutomaticThresholdImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RobustAutomaticThresholdImageFilter); diff --git a/Modules/Nonunit/Review/include/itkScalarChanAndVeseDenseLevelSetImageFilter.h b/Modules/Nonunit/Review/include/itkScalarChanAndVeseDenseLevelSetImageFilter.h index 898fb793370..ade867d284e 100644 --- a/Modules/Nonunit/Review/include/itkScalarChanAndVeseDenseLevelSetImageFilter.h +++ b/Modules/Nonunit/Review/include/itkScalarChanAndVeseDenseLevelSetImageFilter.h @@ -136,13 +136,13 @@ class ITK_TEMPLATE_EXPORT ScalarChanAndVeseDenseLevelSetImageFilter: this->m_SharedData = SharedDataType::New(); } - ~ScalarChanAndVeseDenseLevelSetImageFilter(){} + ~ScalarChanAndVeseDenseLevelSetImageFilter() override{} SharedDataPointer m_SharedData; - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarChanAndVeseDenseLevelSetImageFilter); diff --git a/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.h b/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.h index 3e116cde34e..84c7fb1db7c 100644 --- a/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.h +++ b/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunction.h @@ -133,23 +133,23 @@ class ITK_TEMPLATE_EXPORT ScalarChanAndVeseLevelSetFunction: protected: ScalarChanAndVeseLevelSetFunction():Superclass() {} - ~ScalarChanAndVeseLevelSetFunction(){} + ~ScalarChanAndVeseLevelSetFunction() override{} - void ComputeParameters() ITK_OVERRIDE; + void ComputeParameters() override; - void UpdateSharedDataParameters() ITK_OVERRIDE; + void UpdateSharedDataParameters() override; ScalarValueType ComputeInternalTerm(const FeaturePixelType & iValue, - const FeatureIndexType & iIdx) ITK_OVERRIDE; + const FeatureIndexType & iIdx) override; ScalarValueType ComputeExternalTerm(const FeaturePixelType & iValue, - const FeatureIndexType & iIdx) ITK_OVERRIDE; + const FeatureIndexType & iIdx) override; void UpdateSharedDataInsideParameters(const unsigned int & iId, - const FeaturePixelType & iVal, const ScalarValueType & iChange) ITK_OVERRIDE; + const FeaturePixelType & iVal, const ScalarValueType & iChange) override; void UpdateSharedDataOutsideParameters(const unsigned int & iId, - const FeaturePixelType & iVal, const ScalarValueType & iChange) ITK_OVERRIDE; + const FeaturePixelType & iVal, const ScalarValueType & iChange) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarChanAndVeseLevelSetFunction); diff --git a/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunctionData.h b/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunctionData.h index e223cba3937..85a0db56ce5 100644 --- a/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunctionData.h +++ b/Modules/Nonunit/Review/include/itkScalarChanAndVeseLevelSetFunctionData.h @@ -112,7 +112,7 @@ class ScalarChanAndVeseLevelSetFunctionData: m_WeightedSumOfPixelValuesOutsideLevelSet = 0.; } - virtual ~ScalarChanAndVeseLevelSetFunctionData() {} + ~ScalarChanAndVeseLevelSetFunctionData() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarChanAndVeseLevelSetFunctionData); diff --git a/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.h b/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.h index 9895852aee4..1dc2d2457bc 100644 --- a/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.h +++ b/Modules/Nonunit/Review/include/itkScalarChanAndVeseSparseLevelSetImageFilter.h @@ -139,17 +139,17 @@ class ITK_TEMPLATE_EXPORT ScalarChanAndVeseSparseLevelSetImageFilter: this->m_SharedData = SharedDataType::New(); } - ~ScalarChanAndVeseSparseLevelSetImageFilter() {} + ~ScalarChanAndVeseSparseLevelSetImageFilter() override {} SharedDataPointer m_SharedData; - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; - virtual void UpdatePixel(unsigned int functionIndex, + void UpdatePixel(unsigned int functionIndex, unsigned int idx, NeighborhoodIterator< InputImageType > & iterator, - ValueType & newValue, bool & status) ITK_OVERRIDE; + ValueType & newValue, bool & status) override; }; } //end namespace itk diff --git a/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.h b/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.h index c8572806dfc..c0417e7863d 100644 --- a/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.h +++ b/Modules/Nonunit/Review/include/itkScalarRegionBasedLevelSetFunction.h @@ -130,10 +130,10 @@ class ITK_TEMPLATE_EXPORT ScalarRegionBasedLevelSetFunction: protected: ScalarRegionBasedLevelSetFunction():Superclass(){} - ~ScalarRegionBasedLevelSetFunction(){} + ~ScalarRegionBasedLevelSetFunction() override{} ScalarValueType ComputeOverlapParameters(const FeatureIndexType & featIndex, - ScalarValueType & product) ITK_OVERRIDE; + ScalarValueType & product) override; // update the background and foreground constants for pixel updates // Called only when sparse filters are used to prevent iteration through the diff --git a/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.h b/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.h index c6f9c818928..452360e8d3d 100644 --- a/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.h +++ b/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.h @@ -95,11 +95,11 @@ class ITK_TEMPLATE_EXPORT StochasticFractalDimensionImageFilter: protected: StochasticFractalDimensionImageFilter(); - ~StochasticFractalDimensionImageFilter(); + ~StochasticFractalDimensionImageFilter() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(StochasticFractalDimensionImageFilter); diff --git a/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx b/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx index e665adf49d4..a7f246aa081 100644 --- a/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx @@ -33,7 +33,7 @@ StochasticFractalDimensionImageFilter< TInputImage, TMaskImage, TOutputImage > { this->m_NeighborhoodRadius.Fill(2); - this->m_MaskImage = ITK_NULLPTR; + this->m_MaskImage = nullptr; } template< typename TInputImage, typename TMaskImage, typename TOutputImage > diff --git a/Modules/Nonunit/Review/include/itkUnconstrainedRegionBasedLevelSetFunctionSharedData.h b/Modules/Nonunit/Review/include/itkUnconstrainedRegionBasedLevelSetFunctionSharedData.h index e08e449992d..9ebc2ff3959 100644 --- a/Modules/Nonunit/Review/include/itkUnconstrainedRegionBasedLevelSetFunctionSharedData.h +++ b/Modules/Nonunit/Review/include/itkUnconstrainedRegionBasedLevelSetFunctionSharedData.h @@ -124,7 +124,7 @@ class UnconstrainedRegionBasedLevelSetFunctionSharedData: typedef typename Superclass::LevelSetDataPointerVector LevelSetDataPointerVector; typedef typename Superclass::LevelSetDataPointerVectorIterator LevelSetDataPointerVectorIterator; - void PopulateListImage() ITK_OVERRIDE + void PopulateListImage() override { ListPixelType L; @@ -137,7 +137,7 @@ class UnconstrainedRegionBasedLevelSetFunctionSharedData: protected: UnconstrainedRegionBasedLevelSetFunctionSharedData():Superclass(){} - ~UnconstrainedRegionBasedLevelSetFunctionSharedData(){} + ~UnconstrainedRegionBasedLevelSetFunctionSharedData() override{} private: UnconstrainedRegionBasedLevelSetFunctionSharedData(const Self &); //purposely diff --git a/Modules/Nonunit/Review/include/itkVectorCentralDifferenceImageFunction.h b/Modules/Nonunit/Review/include/itkVectorCentralDifferenceImageFunction.h index 6df1aa30057..a1bb2f60e86 100644 --- a/Modules/Nonunit/Review/include/itkVectorCentralDifferenceImageFunction.h +++ b/Modules/Nonunit/Review/include/itkVectorCentralDifferenceImageFunction.h @@ -100,7 +100,7 @@ class ITK_TEMPLATE_EXPORT VectorCentralDifferenceImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType EvaluateAtIndex(const IndexType & index) const ITK_OVERRIDE; + OutputType EvaluateAtIndex(const IndexType & index) const override; /** Evalulate the image derivative by central differencing at non-integer * positions. @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT VectorCentralDifferenceImageFunction: * * ImageFunction::IsInsideBuffer() can be used to check bounds before * calling the method. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE + OutputType Evaluate(const PointType & point) const override { IndexType index; @@ -118,8 +118,8 @@ class ITK_TEMPLATE_EXPORT VectorCentralDifferenceImageFunction: return this->EvaluateAtIndex(index); } - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType & cindex) const ITK_OVERRIDE + OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType & cindex) const override { IndexType index; @@ -143,8 +143,8 @@ class ITK_TEMPLATE_EXPORT VectorCentralDifferenceImageFunction: protected: VectorCentralDifferenceImageFunction(); - ~VectorCentralDifferenceImageFunction(){} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VectorCentralDifferenceImageFunction() override{} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorCentralDifferenceImageFunction); diff --git a/Modules/Nonunit/Review/include/itkVoxBoCUBImageIO.h b/Modules/Nonunit/Review/include/itkVoxBoCUBImageIO.h index 8ba7186a9fe..b1d92286066 100644 --- a/Modules/Nonunit/Review/include/itkVoxBoCUBImageIO.h +++ b/Modules/Nonunit/Review/include/itkVoxBoCUBImageIO.h @@ -65,30 +65,30 @@ class VoxBoCUBImageIO:public ImageIOBase /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /*-------- This part of the interfaces deals with writing data. ----- */ /** Determine the file type. Returns true if this ImageIO can write the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Set the spacing and dimension information for the set filename. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; VoxBoCUBImageIO(); - ~VoxBoCUBImageIO(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VoxBoCUBImageIO() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VoxBoCUBImageIO); diff --git a/Modules/Nonunit/Review/include/itkVoxBoCUBImageIOFactory.h b/Modules/Nonunit/Review/include/itkVoxBoCUBImageIOFactory.h index 31c143859d0..4828dac1a97 100644 --- a/Modules/Nonunit/Review/include/itkVoxBoCUBImageIOFactory.h +++ b/Modules/Nonunit/Review/include/itkVoxBoCUBImageIOFactory.h @@ -44,9 +44,9 @@ class VoxBoCUBImageIOFactory:public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -64,7 +64,7 @@ class VoxBoCUBImageIOFactory:public ObjectFactoryBase protected: VoxBoCUBImageIOFactory(); - ~VoxBoCUBImageIOFactory(); + ~VoxBoCUBImageIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VoxBoCUBImageIOFactory); diff --git a/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h b/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h index d6bd7cc11be..3919077f10a 100644 --- a/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h +++ b/Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h @@ -123,8 +123,8 @@ class ITK_TEMPLATE_EXPORT WarpHarmonicEnergyCalculator:public Object protected: WarpHarmonicEnergyCalculator(); - virtual ~WarpHarmonicEnergyCalculator() {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~WarpHarmonicEnergyCalculator() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Get/Set the neighborhood radius used for gradient computation */ itkGetConstReferenceMacro(NeighborhoodRadius, RadiusType); diff --git a/Modules/Nonunit/Review/src/itkJPEG2000ImageIO.cxx b/Modules/Nonunit/Review/src/itkJPEG2000ImageIO.cxx index 6c6cabec6d5..a847d52f365 100644 --- a/Modules/Nonunit/Review/src/itkJPEG2000ImageIO.cxx +++ b/Modules/Nonunit/Review/src/itkJPEG2000ImageIO.cxx @@ -78,7 +78,7 @@ JPEG2000ImageIO::JPEG2000ImageIO() this->SetNumberOfDimensions(2); // JPEG2000 is 2D. (by now...) this->SetNumberOfComponents(1); - this->m_Internal->m_Dinfo = ITK_NULLPTR; + this->m_Internal->m_Dinfo = nullptr; this->m_Internal->m_TileWidth = 0; this->m_Internal->m_TileHeight = 0; @@ -164,9 +164,9 @@ void JPEG2000ImageIO::ReadImageInformation() opj_stream_t *cio = opj_stream_create_default_file_stream(l_file, true); - this->m_Internal->m_Dinfo = ITK_NULLPTR; /* handle to a decompressor */ + this->m_Internal->m_Dinfo = nullptr; /* handle to a decompressor */ - opj_image_t *l_image = ITK_NULLPTR; + opj_image_t *l_image = nullptr; /* decode the code-stream */ /* ---------------------- */ @@ -202,7 +202,7 @@ void JPEG2000ImageIO::ReadImageInformation() "JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl - << "Reason: opj_create_decompress(CODEC_J2K) returns ITK_NULLPTR" ); + << "Reason: opj_create_decompress(CODEC_J2K) returns nullptr" ); } break; } @@ -219,7 +219,7 @@ void JPEG2000ImageIO::ReadImageInformation() "JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl - << "Reason: opj_create_decompress(CODEC_JP2) returns ITK_NULLPTR" ); + << "Reason: opj_create_decompress(CODEC_JP2) returns nullptr" ); } break; } @@ -236,7 +236,7 @@ void JPEG2000ImageIO::ReadImageInformation() "JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl - << "Reason: opj_create_decompress(CODEC_JPT) returns ITK_NULLPTR" ); + << "Reason: opj_create_decompress(CODEC_JPT) returns nullptr" ); } break; } @@ -382,7 +382,7 @@ void JPEG2000ImageIO::ReadImageInformation() if ( this->m_Internal->m_Dinfo ) { opj_destroy_codec(this->m_Internal->m_Dinfo); - this->m_Internal->m_Dinfo = ITK_NULLPTR; + this->m_Internal->m_Dinfo = nullptr; } if( l_image ) @@ -414,12 +414,12 @@ void JPEG2000ImageIO::Read(void *buffer) "JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl - << "Reason: opj_stream_create_default_file_stream returns ITK_NULLPTR" ); + << "Reason: opj_stream_create_default_file_stream returns nullptr" ); } - this->m_Internal->m_Dinfo = ITK_NULLPTR; /* handle to a decompressor */ + this->m_Internal->m_Dinfo = nullptr; /* handle to a decompressor */ - opj_image_t *l_image = ITK_NULLPTR; + opj_image_t *l_image = nullptr; /* decode the code-stream */ /* ---------------------- */ @@ -436,7 +436,7 @@ void JPEG2000ImageIO::Read(void *buffer) "JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl - << "Reason: opj_create_decompress(CODEC_J2K) returns ITK_NULLPTR" ); + << "Reason: opj_create_decompress(CODEC_J2K) returns nullptr" ); } break; } @@ -451,7 +451,7 @@ void JPEG2000ImageIO::Read(void *buffer) "JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl - << "Reason: opj_create_decompress(CODEC_JP2) returns ITK_NULLPTR" ); + << "Reason: opj_create_decompress(CODEC_JP2) returns nullptr" ); } break; } @@ -466,7 +466,7 @@ void JPEG2000ImageIO::Read(void *buffer) "JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl - << "Reason: opj_create_decompress(CODEC_JPT) returns ITK_NULLPTR" ); + << "Reason: opj_create_decompress(CODEC_JPT) returns nullptr" ); } break; } @@ -513,7 +513,7 @@ void JPEG2000ImageIO::Read(void *buffer) if ( !bResult ) { opj_destroy_codec(this->m_Internal->m_Dinfo); - this->m_Internal->m_Dinfo = ITK_NULLPTR; + this->m_Internal->m_Dinfo = nullptr; opj_stream_destroy(l_stream); fclose(l_file); itkExceptionMacro( @@ -560,7 +560,7 @@ void JPEG2000ImageIO::Read(void *buffer) if ( !bResult ) { opj_destroy_codec(this->m_Internal->m_Dinfo); - this->m_Internal->m_Dinfo = ITK_NULLPTR; + this->m_Internal->m_Dinfo = nullptr; opj_stream_destroy(l_stream); fclose(l_file); itkExceptionMacro( @@ -738,7 +738,7 @@ void JPEG2000ImageIO::Read(void *buffer) if ( !l_image ) { opj_destroy_codec(this->m_Internal->m_Dinfo); - this->m_Internal->m_Dinfo = ITK_NULLPTR; + this->m_Internal->m_Dinfo = nullptr; opj_stream_destroy(l_stream); fclose(l_file); itkExceptionMacro( @@ -755,7 +755,7 @@ void JPEG2000ImageIO::Read(void *buffer) if ( this->m_Internal->m_Dinfo ) { opj_destroy_codec(this->m_Internal->m_Dinfo); - this->m_Internal->m_Dinfo = ITK_NULLPTR; + this->m_Internal->m_Dinfo = nullptr; } if( l_image ) @@ -883,7 +883,7 @@ ::Write(const void *buffer) } /* Create comment for codestream */ - if ( parameters.cp_comment == ITK_NULLPTR ) + if ( parameters.cp_comment == nullptr ) { const char comment[] = "Created by OpenJPEG version "; const SizeValueType clen = strlen(comment); @@ -1037,7 +1037,7 @@ ::Write(const void *buffer) itkDebugMacro(<< " END COPY BUFFER"); //-------------------------------------------------------------------- - opj_codec_t *cinfo = ITK_NULLPTR; + opj_codec_t *cinfo = nullptr; if ( extension == ".j2k" ) { cinfo = opj_create_compress(CODEC_J2K); @@ -1047,7 +1047,7 @@ ::Write(const void *buffer) "JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl - << "Reason: opj_create_compress(CODEC_J2K) returns ITK_NULLPTR" ); + << "Reason: opj_create_compress(CODEC_J2K) returns nullptr" ); } } else if ( extension == ".jp2" ) @@ -1059,7 +1059,7 @@ ::Write(const void *buffer) "JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl - << "Reason: opj_create_compress(CODEC_JP2) returns ITK_NULLPTR" ); + << "Reason: opj_create_compress(CODEC_JP2) returns nullptr" ); } } else if ( extension == ".jpt" ) @@ -1071,7 +1071,7 @@ ::Write(const void *buffer) "JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl - << "Reason: opj_create_compress(CODEC_JPT) returns ITK_NULLPTR" ); + << "Reason: opj_create_compress(CODEC_JPT) returns nullptr" ); } } else diff --git a/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx b/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx index 4522e7017d3..34b4ccb3998 100644 --- a/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx +++ b/Modules/Nonunit/Review/src/itkVoxBoCUBImageIO.cxx @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include "itk_zlib.h" #include "itkSpatialOrientationAdapter.h" @@ -103,7 +103,7 @@ class CompressedCUBFileAdaptor:public GenericCUBFileAdaptor CompressedCUBFileAdaptor(const char *file, const char *mode) { m_GzFile = gzopen(file, mode); - if ( m_GzFile == ITK_NULLPTR ) + if ( m_GzFile == nullptr ) { ExceptionObject exception; exception.SetDescription("File cannot be accessed"); @@ -111,7 +111,7 @@ class CompressedCUBFileAdaptor:public GenericCUBFileAdaptor } } - virtual ~CompressedCUBFileAdaptor() + ~CompressedCUBFileAdaptor() override { if ( m_GzFile ) { @@ -120,7 +120,7 @@ class CompressedCUBFileAdaptor:public GenericCUBFileAdaptor } } - virtual unsigned char ReadByte() ITK_OVERRIDE + unsigned char ReadByte() override { int byte = gzgetc(m_GzFile); @@ -135,9 +135,9 @@ class CompressedCUBFileAdaptor:public GenericCUBFileAdaptor return static_cast< unsigned char >( byte ); } - virtual void ReadData(void *data, SizeType bytes) ITK_OVERRIDE + void ReadData(void *data, SizeType bytes) override { - if ( m_GzFile == ITK_NULLPTR ) + if ( m_GzFile == nullptr ) { ExceptionObject exception; exception.SetDescription("File cannot be read"); @@ -159,9 +159,9 @@ class CompressedCUBFileAdaptor:public GenericCUBFileAdaptor } } - virtual void WriteData(const void *data, SizeType bytes) ITK_OVERRIDE + void WriteData(const void *data, SizeType bytes) override { - if ( m_GzFile == ITK_NULLPTR ) + if ( m_GzFile == nullptr ) { ExceptionObject exception; exception.SetDescription("File cannot be written"); @@ -201,7 +201,7 @@ class DirectCUBFileAdaptor:public GenericCUBFileAdaptor } } - ~DirectCUBFileAdaptor() + ~DirectCUBFileAdaptor() override { if ( m_File ) { @@ -209,7 +209,7 @@ class DirectCUBFileAdaptor:public GenericCUBFileAdaptor } } - virtual unsigned char ReadByte() ITK_OVERRIDE + unsigned char ReadByte() override { int byte = fgetc(m_File); @@ -224,9 +224,9 @@ class DirectCUBFileAdaptor:public GenericCUBFileAdaptor return static_cast< unsigned char >( byte ); } - virtual void ReadData(void *data, SizeType bytes) ITK_OVERRIDE + void ReadData(void *data, SizeType bytes) override { - if ( m_File == ITK_NULLPTR ) + if ( m_File == nullptr ) { ExceptionObject exception; exception.SetDescription("File cannot be read"); @@ -248,9 +248,9 @@ class DirectCUBFileAdaptor:public GenericCUBFileAdaptor } } - virtual void WriteData(const void *data, SizeType bytes) ITK_OVERRIDE + void WriteData(const void *data, SizeType bytes) override { - if ( m_File == ITK_NULLPTR ) + if ( m_File == nullptr ) { ExceptionObject exception; exception.SetDescription("File cannot be written"); @@ -322,8 +322,8 @@ VoxBoCUBImageIO::VoxBoCUBImageIO() { InitializeOrientationMap(); m_ByteOrder = BigEndian; - m_Reader = ITK_NULLPTR; - m_Writer = ITK_NULLPTR; + m_Reader = nullptr; + m_Writer = nullptr; } /** Destructor */ @@ -352,12 +352,12 @@ VoxBoCUBImageIO::CreateReader(const char *filename) } else { - return ITK_NULLPTR; + return nullptr; } } catch ( ... ) { - return ITK_NULLPTR; + return nullptr; } } @@ -380,12 +380,12 @@ VoxBoCUBImageIO::CreateWriter(const char *filename) } else { - return ITK_NULLPTR; + return nullptr; } } catch ( ... ) { - return ITK_NULLPTR; + return nullptr; } } @@ -394,7 +394,7 @@ bool VoxBoCUBImageIO::CanReadFile(const char *filename) // First check if the file can be read GenericCUBFileAdaptor *reader = CreateReader(filename); - if ( reader == ITK_NULLPTR ) + if ( reader == nullptr ) { itkDebugMacro(<< "The file is not a valid CUB file"); return false; @@ -442,7 +442,7 @@ bool VoxBoCUBImageIO::CanWriteFile(const char *name) void VoxBoCUBImageIO::Read(void *buffer) { - if ( m_Reader == ITK_NULLPTR ) + if ( m_Reader == nullptr ) { ExceptionObject exception(__FILE__, __LINE__); exception.SetDescription("File cannot be read"); @@ -466,7 +466,7 @@ void VoxBoCUBImageIO::ReadImageInformation() // Create a reader m_Reader = CreateReader( m_FileName.c_str() ); - if ( m_Reader == ITK_NULLPTR ) + if ( m_Reader == nullptr ) { ExceptionObject exception(__FILE__, __LINE__); exception.SetDescription("File cannot be read"); @@ -615,7 +615,7 @@ void VoxBoCUBImageIO ::WriteImageInformation(void) { - if ( m_Writer == ITK_NULLPTR ) + if ( m_Writer == nullptr ) { ExceptionObject exception(__FILE__, __LINE__); exception.SetDescription("File cannot be read"); @@ -744,7 +744,7 @@ ::Write(const void *buffer) WriteImageInformation(); m_Writer->WriteData( buffer, this->GetImageSizeInBytes() ); delete m_Writer; - m_Writer = ITK_NULLPTR; + m_Writer = nullptr; } /** Print Self Method */ diff --git a/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx index 130dbc0d1f4..e5061a9a524 100644 --- a/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkDirectFourierReconstructionImageToImageFilterTest.cxx @@ -54,12 +54,12 @@ class CommandProgressUpdate : public itk::Command typedef const ReconstructionFilterType * ReconstructionFilterPointer; - virtual void Execute(itk::Object * caller, const itk::EventObject & event ) ITK_OVERRIDE + void Execute(itk::Object * caller, const itk::EventObject & event ) override { Execute( ( const itk::Object * )caller, event); } - virtual void Execute( const itk::Object * caller, const itk::EventObject & event ) ITK_OVERRIDE + void Execute( const itk::Object * caller, const itk::EventObject & event ) override { ReconstructionFilterPointer reconstructor = static_cast< ReconstructionFilterPointer >( caller ); diff --git a/Modules/Nonunit/Review/test/itkImageFunctionTest.cxx b/Modules/Nonunit/Review/test/itkImageFunctionTest.cxx index 1facdf0aaee..a6f6849ce45 100644 --- a/Modules/Nonunit/Review/test/itkImageFunctionTest.cxx +++ b/Modules/Nonunit/Review/test/itkImageFunctionTest.cxx @@ -71,21 +71,21 @@ class TestImageFunction: typedef typename Superclass::ContinuousIndexType ContinuousIndexType; /** Evaluate the function at specified Point position.*/ - virtual OutputType Evaluate(const PointType & itkNotUsed(point) ) const ITK_OVERRIDE + OutputType Evaluate(const PointType & itkNotUsed(point) ) const override { OutputType result(0); return result; } /** Evaluate the function at specified Index position. */ - virtual OutputType EvaluateAtIndex(const IndexType & itkNotUsed(index) ) const ITK_OVERRIDE + OutputType EvaluateAtIndex(const IndexType & itkNotUsed(index) ) const override { OutputType result(0); return result; } /** Evaluate the function at specified ContinuousIndex position. */ - virtual OutputType EvaluateAtContinuousIndex( const ContinuousIndexType & itkNotUsed(index) ) const ITK_OVERRIDE + OutputType EvaluateAtContinuousIndex( const ContinuousIndexType & itkNotUsed(index) ) const override { OutputType result(0); return result; @@ -93,7 +93,7 @@ class TestImageFunction: protected: TestImageFunction(){}; - ~TestImageFunction() ITK_OVERRIDE {}; + ~TestImageFunction() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(TestImageFunction); diff --git a/Modules/Nonunit/Review/test/itkMultiphaseDenseFiniteDifferenceImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkMultiphaseDenseFiniteDifferenceImageFilterTest.cxx index 2f0485d1683..2645fdcc879 100644 --- a/Modules/Nonunit/Review/test/itkMultiphaseDenseFiniteDifferenceImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkMultiphaseDenseFiniteDifferenceImageFilterTest.cxx @@ -42,18 +42,18 @@ class MultiphaseDenseFiniteDifferenceImageFilterTestHelper itkNewMacro( Self ); - virtual void AllocateUpdateBuffer() ITK_OVERRIDE {} + void AllocateUpdateBuffer() override {} typedef typename Superclass::TimeStepType TimeStepType; - virtual void ApplyUpdate(TimeStepType itkNotUsed(dt) ) ITK_OVERRIDE {} + void ApplyUpdate(TimeStepType itkNotUsed(dt) ) override {} - virtual TimeStepType CalculateChange() ITK_OVERRIDE + TimeStepType CalculateChange() override { return TimeStepType( 1.0 ); } - virtual void CopyInputToOutput() ITK_OVERRIDE {} + void CopyInputToOutput() override {} }; diff --git a/Modules/Nonunit/Review/test/itkMultiphaseFiniteDifferenceImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkMultiphaseFiniteDifferenceImageFilterTest.cxx index a1027c0756c..00bc66697bd 100644 --- a/Modules/Nonunit/Review/test/itkMultiphaseFiniteDifferenceImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkMultiphaseFiniteDifferenceImageFilterTest.cxx @@ -41,18 +41,18 @@ class MultiphaseFiniteDifferenceImageFilterTestHelper itkNewMacro( Self ); - virtual void AllocateUpdateBuffer() ITK_OVERRIDE {} + void AllocateUpdateBuffer() override {} typedef typename Superclass::TimeStepType TimeStepType; - virtual void ApplyUpdate(TimeStepType itkNotUsed(dt) ) ITK_OVERRIDE {} + void ApplyUpdate(TimeStepType itkNotUsed(dt) ) override {} - virtual TimeStepType CalculateChange() ITK_OVERRIDE + TimeStepType CalculateChange() override { return TimeStepType( 1.0 ); } - virtual void CopyInputToOutput() ITK_OVERRIDE {} + void CopyInputToOutput() override {} }; diff --git a/Modules/Nonunit/Review/test/itkMultiphaseSparseFiniteDifferenceImageFilterTest.cxx b/Modules/Nonunit/Review/test/itkMultiphaseSparseFiniteDifferenceImageFilterTest.cxx index 24d88d6eee1..af6b97459e7 100644 --- a/Modules/Nonunit/Review/test/itkMultiphaseSparseFiniteDifferenceImageFilterTest.cxx +++ b/Modules/Nonunit/Review/test/itkMultiphaseSparseFiniteDifferenceImageFilterTest.cxx @@ -42,18 +42,18 @@ class MultiphaseSparseFiniteDifferenceImageFilterTestHelper itkNewMacro( Self ); - virtual void AllocateUpdateBuffer() ITK_OVERRIDE {} + void AllocateUpdateBuffer() override {} typedef typename Superclass::TimeStepType TimeStepType; - virtual void ApplyUpdate(TimeStepType itkNotUsed(dt) ) ITK_OVERRIDE {} + void ApplyUpdate(TimeStepType itkNotUsed(dt) ) override {} - virtual TimeStepType CalculateChange() ITK_OVERRIDE + TimeStepType CalculateChange() override { return TimeStepType( 1.0 ); } - virtual void CopyInputToOutput() ITK_OVERRIDE {} + void CopyInputToOutput() override {} }; diff --git a/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest2.h b/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest2.h index b0215736ddd..6438c76ff77 100644 --- a/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest2.h +++ b/Modules/Nonunit/Review/test/itkOptImageToImageMetricsTest2.h @@ -86,7 +86,7 @@ class OptImageToImageMetricsTest typedef typename MetricType::TransformPointer TransformPointer; const TransformPointer *transformPtr= metric->GetThreaderTransform(); - if ((transformPtr==static_cast(ITK_NULLPTR))|| + if ((transformPtr==static_cast(nullptr))|| (transformPtr[0].IsNull())) { exit(EXIT_FAILURE); diff --git a/Modules/Nonunit/Review/test/itkRegionBasedLevelSetFunctionTest.cxx b/Modules/Nonunit/Review/test/itkRegionBasedLevelSetFunctionTest.cxx index f4c32e90290..1006f6060b6 100644 --- a/Modules/Nonunit/Review/test/itkRegionBasedLevelSetFunctionTest.cxx +++ b/Modules/Nonunit/Review/test/itkRegionBasedLevelSetFunctionTest.cxx @@ -45,31 +45,31 @@ class RegionBasedLevelSetFunctionTestHelper : typedef typename Superclass::FeaturePixelType FeaturePixelType; typedef typename Superclass::FeatureIndexType FeatureIndexType; - virtual ScalarValueType ComputeInternalTerm(const FeaturePixelType& , - const FeatureIndexType& ) ITK_OVERRIDE + ScalarValueType ComputeInternalTerm(const FeaturePixelType& , + const FeatureIndexType& ) override { return ScalarValueType( 0 ); } - virtual ScalarValueType ComputeExternalTerm(const FeaturePixelType& , - const FeatureIndexType & ) ITK_OVERRIDE + ScalarValueType ComputeExternalTerm(const FeaturePixelType& , + const FeatureIndexType & ) override { return ScalarValueType( 0 ); } - virtual ScalarValueType ComputeOverlapParameters( const FeatureIndexType&, - ScalarValueType & ) ITK_OVERRIDE + ScalarValueType ComputeOverlapParameters( const FeatureIndexType&, + ScalarValueType & ) override { return ScalarValueType( 0 ); } - virtual void ComputeParameters() ITK_OVERRIDE {} + void ComputeParameters() override {} - virtual void UpdateSharedDataParameters() ITK_OVERRIDE {} + void UpdateSharedDataParameters() override {} protected: RegionBasedLevelSetFunctionTestHelper() {} - ~RegionBasedLevelSetFunctionTestHelper() {} + ~RegionBasedLevelSetFunctionTestHelper() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(RegionBasedLevelSetFunctionTestHelper); diff --git a/Modules/Nonunit/Review/test/itkScalarChanAndVeseLevelSetFunctionTest1.cxx b/Modules/Nonunit/Review/test/itkScalarChanAndVeseLevelSetFunctionTest1.cxx index 23a90524698..878bbaa9ef3 100644 --- a/Modules/Nonunit/Review/test/itkScalarChanAndVeseLevelSetFunctionTest1.cxx +++ b/Modules/Nonunit/Review/test/itkScalarChanAndVeseLevelSetFunctionTest1.cxx @@ -61,11 +61,11 @@ class ScalarChanAndVeseLevelSetFunctionTestHelper : virtual void computeOverlapParameters( const FeatureIndexType, unsigned int &, unsigned int & ) {} - virtual void ComputeParameters() ITK_OVERRIDE {} + void ComputeParameters() override {} protected: ScalarChanAndVeseLevelSetFunctionTestHelper() {} - ~ScalarChanAndVeseLevelSetFunctionTestHelper() {} + ~ScalarChanAndVeseLevelSetFunctionTestHelper() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarChanAndVeseLevelSetFunctionTestHelper); diff --git a/Modules/Nonunit/Review/test/itkScalarChanAndVeseLevelSetFunctionTest2.cxx b/Modules/Nonunit/Review/test/itkScalarChanAndVeseLevelSetFunctionTest2.cxx index 087297d62d4..c17b56024ad 100644 --- a/Modules/Nonunit/Review/test/itkScalarChanAndVeseLevelSetFunctionTest2.cxx +++ b/Modules/Nonunit/Review/test/itkScalarChanAndVeseLevelSetFunctionTest2.cxx @@ -61,11 +61,11 @@ class ScalarChanAndVeseLevelSetFunctionTest2Helper : virtual void computeOverlapParameters( const FeatureIndexType, unsigned int &, unsigned int & ) {} - virtual void ComputeParameters() ITK_OVERRIDE {} + void ComputeParameters() override {} protected: ScalarChanAndVeseLevelSetFunctionTest2Helper() {} - ~ScalarChanAndVeseLevelSetFunctionTest2Helper() {} + ~ScalarChanAndVeseLevelSetFunctionTest2Helper() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarChanAndVeseLevelSetFunctionTest2Helper); diff --git a/Modules/Nonunit/Review/test/itkScalarRegionBasedLevelSetFunctionTest.cxx b/Modules/Nonunit/Review/test/itkScalarRegionBasedLevelSetFunctionTest.cxx index adea37769bf..5eb22176abe 100644 --- a/Modules/Nonunit/Review/test/itkScalarRegionBasedLevelSetFunctionTest.cxx +++ b/Modules/Nonunit/Review/test/itkScalarRegionBasedLevelSetFunctionTest.cxx @@ -45,37 +45,37 @@ class ScalarRegionBasedLevelSetFunctionTestHelper : typedef typename Superclass::FeaturePixelType FeaturePixelType; typedef typename Superclass::FeatureIndexType FeatureIndexType; - virtual ScalarValueType ComputeInternalTerm(const FeaturePixelType &, - const FeatureIndexType & ) ITK_OVERRIDE + ScalarValueType ComputeInternalTerm(const FeaturePixelType &, + const FeatureIndexType & ) override { return ScalarValueType( 0 ); } - virtual ScalarValueType ComputeExternalTerm(const FeaturePixelType &, - const FeatureIndexType & ) ITK_OVERRIDE + ScalarValueType ComputeExternalTerm(const FeaturePixelType &, + const FeatureIndexType & ) override { return ScalarValueType( 0 ); } - virtual ScalarValueType ComputeOverlapParameters( const FeatureIndexType& , - ScalarValueType& ) ITK_OVERRIDE + ScalarValueType ComputeOverlapParameters( const FeatureIndexType& , + ScalarValueType& ) override { return ScalarValueType( 0 ); } - virtual void ComputeParameters() ITK_OVERRIDE {} + void ComputeParameters() override {} - virtual void UpdateSharedDataParameters() ITK_OVERRIDE {} + void UpdateSharedDataParameters() override {} - virtual void UpdateSharedDataInsideParameters( const unsigned int& , - const FeaturePixelType&, const ScalarValueType& ) ITK_OVERRIDE {} + void UpdateSharedDataInsideParameters( const unsigned int& , + const FeaturePixelType&, const ScalarValueType& ) override {} - virtual void UpdateSharedDataOutsideParameters( const unsigned int& , - const FeaturePixelType&, const ScalarValueType& ) ITK_OVERRIDE {} + void UpdateSharedDataOutsideParameters( const unsigned int& , + const FeaturePixelType&, const ScalarValueType& ) override {} protected: ScalarRegionBasedLevelSetFunctionTestHelper() {} - ~ScalarRegionBasedLevelSetFunctionTestHelper() {} + ~ScalarRegionBasedLevelSetFunctionTestHelper() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarRegionBasedLevelSetFunctionTestHelper); diff --git a/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.h b/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.h index 492e197d2a4..d256a0bb0e7 100644 --- a/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.h +++ b/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.h @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT EigenAnalysis2DImageFilter: /** Create the Output */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -116,9 +116,9 @@ class ITK_TEMPLATE_EXPORT EigenAnalysis2DImageFilter: protected: EigenAnalysis2DImageFilter(); - virtual ~EigenAnalysis2DImageFilter() ITK_OVERRIDE {} + ~EigenAnalysis2DImageFilter() override {} - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(EigenAnalysis2DImageFilter); diff --git a/Modules/Numerics/FEM/include/itkFEMElement1DStress.h b/Modules/Numerics/FEM/include/itkFEMElement1DStress.h index 5ad9694d293..a7b510dc3bc 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement1DStress.h +++ b/Modules/Numerics/FEM/include/itkFEMElement1DStress.h @@ -72,19 +72,19 @@ class ITK_TEMPLATE_EXPORT Element1DStress : public TBaseClass /** * Compute the B matrix. */ - virtual void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const ITK_OVERRIDE; + void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const override; /** * Compute the D matrix. */ - virtual void GetMaterialMatrix(MatrixType & D) const ITK_OVERRIDE; + void GetMaterialMatrix(MatrixType & D) const override; /** * Element stiffness matrix is reimplemented here, because we want to * be able to use this class to implement 1D stress problem in any * number of dimensions i.e. Bar1D, Bar2D, Bar3D. */ - virtual void GetStiffnessMatrix(MatrixType & Ke) const ITK_OVERRIDE; + void GetStiffnessMatrix(MatrixType & Ke) const override; /** * 1D stress elements have 2 DOFs per node. In reality there is @@ -93,7 +93,7 @@ class ITK_TEMPLATE_EXPORT Element1DStress : public TBaseClass * So the number of DOFs per node is equal to the number of * spatial dimensions. */ - virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE + unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const override { return 2; } @@ -101,19 +101,19 @@ class ITK_TEMPLATE_EXPORT Element1DStress : public TBaseClass /** * Get/Set the material properties for the element */ - virtual Material::ConstPointer GetMaterial(void) const ITK_OVERRIDE + Material::ConstPointer GetMaterial(void) const override { return m_mat; } - virtual void SetMaterial(Material::ConstPointer mat_) ITK_OVERRIDE + void SetMaterial(Material::ConstPointer mat_) override { m_mat = dynamic_cast(mat_.GetPointer()); } protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Pointer to material properties of the element diff --git a/Modules/Numerics/FEM/include/itkFEMElement1DStress.hxx b/Modules/Numerics/FEM/include/itkFEMElement1DStress.hxx index 75ce20923b5..0d4adb775ba 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement1DStress.hxx +++ b/Modules/Numerics/FEM/include/itkFEMElement1DStress.hxx @@ -28,7 +28,7 @@ namespace fem { template Element1DStress -::Element1DStress() : Superclass(), m_mat(ITK_NULLPTR) +::Element1DStress() : Superclass(), m_mat(nullptr) { } diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLine.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLine.h index ac279957d36..328267f6e1a 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLine.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLine.h @@ -53,13 +53,13 @@ class ITKFEM_EXPORT Element2DC0LinearLine : public ElementStd<2, 2> enum { DefaultIntegrationOrder = 1 }; /** Get the Integration point and weight */ - virtual void GetIntegrationPointAndWeight(unsigned int i, + void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, - unsigned int order) const ITK_OVERRIDE; + unsigned int order) const override; /** Get the number of integration points */ - virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const ITK_OVERRIDE; + unsigned int GetNumberOfIntegrationPoints(unsigned int order) const override; // //////////////////////////////////////////////////////////////////////// /** @@ -67,18 +67,18 @@ class ITKFEM_EXPORT Element2DC0LinearLine : public ElementStd<2, 2> */ /** Return the shape functions used to interpolate across the element */ - virtual VectorType ShapeFunctions(const VectorType & pt) const ITK_OVERRIDE; + VectorType ShapeFunctions(const VectorType & pt) const override; /** Return the shape functions derivatives in the shapeD matrix */ - virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const ITK_OVERRIDE; + void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const override; /** * Get parametric/local coordinates given global coordinates. The function returns true if the * global coordinate is within the element else returns false. * For a line, line length*1e-4 is used as the tolerance */ - virtual bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, - VectorType & localPt) const ITK_OVERRIDE; + bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, + VectorType & localPt) const override; /** * We need to provide our own implementation of calculating Jacobian, @@ -89,7 +89,7 @@ class ITKFEM_EXPORT Element2DC0LinearLine : public ElementStd<2, 2> * * Jacobian is a scalar for this element. */ - virtual void Jacobian(const VectorType & pt, MatrixType & J, const MatrixType *pshapeD = ITK_NULLPTR) const ITK_OVERRIDE; + void Jacobian(const VectorType & pt, MatrixType & J, const MatrixType *pshapeD = nullptr) const override; /** * Distance of a point to a line.(Used in GetLocalFromGlobalCoordinates ). @@ -98,9 +98,9 @@ class ITKFEM_EXPORT Element2DC0LinearLine : public ElementStd<2, 2> VectorType & closestPoint) const; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; - virtual void PopulateEdgeIds(void) ITK_OVERRIDE; // HACK: Should PopulateEdgeIds + void PopulateEdgeIds(void) override; // HACK: Should PopulateEdgeIds // be const or not in this // hierarchy. Sometimes it is, // sometimes it is not. diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLineStress.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLineStress.h index 6acc2582008..2b0d83ba4c3 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLineStress.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearLineStress.h @@ -49,7 +49,7 @@ class ITKFEM_EXPORT Element2DC0LinearLineStress : public Element1DStress enum { DefaultIntegrationOrder = 2 }; /** Get the Integration point and weight */ - virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const ITK_OVERRIDE; + void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const override; /** Get the number of integration points */ - virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const ITK_OVERRIDE; + unsigned int GetNumberOfIntegrationPoints(unsigned int order) const override; // //////////////////////////////////////////////////////////////////////// /** @@ -86,13 +86,13 @@ class ITKFEM_EXPORT Element2DC0LinearQuadrilateral : public ElementStd<4, 2> */ /** Return the shape functions used to interpolate across the element */ - virtual VectorType ShapeFunctions(const VectorType & pt) const ITK_OVERRIDE; + VectorType ShapeFunctions(const VectorType & pt) const override; /** Return the shape functions derivatives in the shapeD matrix */ - virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const ITK_OVERRIDE; + void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const override; /** Convert from global to local coordinates */ - virtual bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const ITK_OVERRIDE; + bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const override; /** Interpolation Functions */ void InterpolationFunctions( const VectorType & pcoords, VectorType & sf) const; @@ -104,9 +104,9 @@ class ITKFEM_EXPORT Element2DC0LinearQuadrilateral : public ElementStd<4, 2> Float Determinant2x2(const VectorType & c1, const VectorType & c2) const; protected: - virtual void PopulateEdgeIds(void) ITK_OVERRIDE; + void PopulateEdgeIds(void) override; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralMembrane.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralMembrane.h index 2507ed95363..dd57767a3c4 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralMembrane.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralMembrane.h @@ -72,7 +72,7 @@ class ITKFEM_EXPORT Element2DC0LinearQuadrilateralMembrane : public Element2DMem /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only clears the internal storage @@ -90,7 +90,7 @@ class ITKFEM_EXPORT Element2DC0LinearQuadrilateralMembrane : public Element2DMem Material::ConstPointer p_); protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; // class Element2DC0LinearQuadrilateralMembrane diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStrain.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStrain.h index a49b8657404..5fadfe5bb4c 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStrain.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStrain.h @@ -70,7 +70,7 @@ class ITKFEM_EXPORT Element2DC0LinearQuadrilateralStrain : public Element2DStrai /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only clears the internal storage @@ -88,7 +88,7 @@ class ITKFEM_EXPORT Element2DC0LinearQuadrilateralStrain : public Element2DStrai Material::ConstPointer p_); protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStress.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStress.h index e26d8c01261..4ddd23bd13d 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStress.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearQuadrilateralStress.h @@ -72,7 +72,7 @@ class ITKFEM_EXPORT Element2DC0LinearQuadrilateralStress : public Element2DStres /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only clears the internal storage @@ -90,7 +90,7 @@ class ITKFEM_EXPORT Element2DC0LinearQuadrilateralStress : public Element2DStres Material::ConstPointer p_); protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; // class Element2DC0LinearQuadrilateralStress diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangular.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangular.h index 2616594ac69..047407a6698 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangular.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangular.h @@ -76,10 +76,10 @@ class ITKFEM_EXPORT Element2DC0LinearTriangular : public ElementStd<3, 2> enum { DefaultIntegrationOrder = 1 }; /** Get the Integration point and weight */ - virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const ITK_OVERRIDE; + void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const override; /** Get the number of integration points */ - virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const ITK_OVERRIDE; + unsigned int GetNumberOfIntegrationPoints(unsigned int order) const override; // //////////////////////////////////////////////////////////////////////// /** @@ -87,20 +87,20 @@ class ITKFEM_EXPORT Element2DC0LinearTriangular : public ElementStd<3, 2> */ /** Return the shape functions used to interpolate across the element */ - virtual VectorType ShapeFunctions(const VectorType & pt) const ITK_OVERRIDE; + VectorType ShapeFunctions(const VectorType & pt) const override; /** Return the shape functions derivatives in the shapeD matrix */ - virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const ITK_OVERRIDE; + void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const override; /** Convert from global to local coordinates */ - virtual bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const ITK_OVERRIDE; + bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const override; // Since the Jacobian is not quadratic, we need to provide our // own implementation of calculating the determinant and inverse. - virtual Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ = ITK_NULLPTR) const ITK_OVERRIDE; + Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ = nullptr) const override; /** Return the inverse of the Jacobian */ - virtual void JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ = ITK_NULLPTR) const ITK_OVERRIDE; + void JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ = nullptr) const override; /** * Constants for integration rules. @@ -114,9 +114,9 @@ class ITKFEM_EXPORT Element2DC0LinearTriangular : public ElementStd<3, 2> static const unsigned int Nip[6]; protected: - virtual void PopulateEdgeIds(void) ITK_OVERRIDE; + void PopulateEdgeIds(void) override; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; } diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangularMembrane.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangularMembrane.h index 238599ed2b5..05cb9fa97be 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangularMembrane.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangularMembrane.h @@ -76,7 +76,7 @@ class ITKFEM_EXPORT Element2DC0LinearTriangularMembrane : public Element2DMembra /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only clears the internal storage @@ -90,7 +90,7 @@ class ITKFEM_EXPORT Element2DC0LinearTriangularMembrane : public Element2DMembra Element2DC0LinearTriangularMembrane(NodeIDType n1_, NodeIDType n2_, NodeIDType n3_, Material::ConstPointer p_); protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; // class Element2DC0LinearTriangularMembrane diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangularStrain.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangularStrain.h index c5b35c59d68..236ae40b88b 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangularStrain.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0LinearTriangularStrain.h @@ -74,7 +74,7 @@ class ITKFEM_EXPORT Element2DC0LinearTriangularStrain : public Element2DStrain enum { DefaultIntegrationOrder = 2 }; /** Get the Integration point and weight */ - virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const ITK_OVERRIDE; + void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const override; /** Get the number of integration points */ - virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const ITK_OVERRIDE; + unsigned int GetNumberOfIntegrationPoints(unsigned int order) const override; // //////////////////////////////////////////////////////////////////////// /** @@ -87,25 +87,25 @@ class ITKFEM_EXPORT Element2DC0QuadraticTriangular : public ElementStd<6, 2> */ /** Return the shape functions used to interpolate across the element */ - virtual VectorType ShapeFunctions(const VectorType & pt) const ITK_OVERRIDE; + VectorType ShapeFunctions(const VectorType & pt) const override; /** Return the shape functions derivatives in the shapeD matrix */ - virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const ITK_OVERRIDE; + void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const override; /** Convert from global to local coordinates */ - virtual bool GetLocalFromGlobalCoordinates(const VectorType & GlobalPt, VectorType & LocalPt) const ITK_OVERRIDE; + bool GetLocalFromGlobalCoordinates(const VectorType & GlobalPt, VectorType & LocalPt) const override; // Since the Jacobian is not quadratic, we need to provide our // own implementation of calculating the determinant and inverse. - virtual Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ = ITK_NULLPTR) const ITK_OVERRIDE; + Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ = nullptr) const override; /** Compute the inverse of the Jacobian matrix */ - virtual void JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ = ITK_NULLPTR) const ITK_OVERRIDE; + void JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ = nullptr) const override; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; - virtual void PopulateEdgeIds(void) ITK_OVERRIDE; + void PopulateEdgeIds(void) override; }; } diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStrain.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStrain.h index 0b108ee26d0..4d29aeb68bd 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStrain.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStrain.h @@ -76,7 +76,7 @@ class ITKFEM_EXPORT Element2DC0QuadraticTriangularStrain : public Element2DStrai /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only clears the internal storage @@ -96,7 +96,7 @@ class ITKFEM_EXPORT Element2DC0QuadraticTriangularStrain : public Element2DStrai Material::ConstPointer p_); protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; // class Element2DC0QuadraticTriangularStrain diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStress.h b/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStress.h index a2c078811d6..9f17ab4f300 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStress.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC0QuadraticTriangularStress.h @@ -73,7 +73,7 @@ class ITKFEM_EXPORT Element2DC0QuadraticTriangularStress : public Element2DStres /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only clears the internal storage @@ -93,7 +93,7 @@ class ITKFEM_EXPORT Element2DC0QuadraticTriangularStress : public Element2DStres Material::ConstPointer p_); protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; // class Element2DC0QuadraticTriangularStress diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DC1Beam.h b/Modules/Numerics/FEM/include/itkFEMElement2DC1Beam.h index 404d0c24e4f..2d20885c407 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DC1Beam.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DC1Beam.h @@ -54,7 +54,7 @@ class ITKFEM_EXPORT Element2DC1Beam : public ElementStd<2, 2> /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** @@ -73,18 +73,18 @@ class ITKFEM_EXPORT Element2DC1Beam : public ElementStd<2, 2> */ /** Get the Stiffness matrix */ - virtual void GetStiffnessMatrix(MatrixType & Ke) const ITK_OVERRIDE; + void GetStiffnessMatrix(MatrixType & Ke) const override; /** Get the Mass matrix */ - virtual void GetMassMatrix(MatrixType & Me) const ITK_OVERRIDE; + void GetMassMatrix(MatrixType & Me) const override; /** Get the Strain Displacement matrix */ - virtual void GetStrainDisplacementMatrix(MatrixType &, const MatrixType &) const ITK_OVERRIDE + void GetStrainDisplacementMatrix(MatrixType &, const MatrixType &) const override { } /** Get the Material matrix */ - virtual void GetMaterialMatrix(MatrixType &) const ITK_OVERRIDE + void GetMaterialMatrix(MatrixType &) const override { } @@ -96,9 +96,9 @@ class ITKFEM_EXPORT Element2DC1Beam : public ElementStd<2, 2> enum { DefaultIntegrationOrder = 1 }; /** Get the Integration point and weight */ - virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order = 0) const ITK_OVERRIDE; + void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order = 0) const override; - virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const ITK_OVERRIDE; + unsigned int GetNumberOfIntegrationPoints(unsigned int order) const override; // //////////////////////////////////////////////////////////////////////// /** @@ -106,22 +106,22 @@ class ITKFEM_EXPORT Element2DC1Beam : public ElementStd<2, 2> */ /** Return the shape functions used to interpolate across the element */ - virtual VectorType ShapeFunctions(const VectorType & pt) const ITK_OVERRIDE; + VectorType ShapeFunctions(const VectorType & pt) const override; /** Return the shape functions derivatives in the shapeD matrix */ - virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const ITK_OVERRIDE; + void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const override; /** Convert from global to local coordinates */ - virtual bool GetLocalFromGlobalCoordinates(const VectorType &, VectorType &) const ITK_OVERRIDE + bool GetLocalFromGlobalCoordinates(const VectorType &, VectorType &) const override { return false; } /** Return the determinate of the Jacobian */ - virtual Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ) const ITK_OVERRIDE; + Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ) const override; /** Get the degrees of freedom for each node */ - virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE + unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const override { return 3; } @@ -129,22 +129,22 @@ class ITKFEM_EXPORT Element2DC1Beam : public ElementStd<2, 2> /** * Get/Set the material properties for the element */ - virtual Material::ConstPointer GetMaterial(void) const ITK_OVERRIDE + Material::ConstPointer GetMaterial(void) const override { return dynamic_cast(m_mat); } - virtual void SetMaterial(Material::ConstPointer mat_) ITK_OVERRIDE + void SetMaterial(Material::ConstPointer mat_) override { m_mat = dynamic_cast( mat_.GetPointer() ); } /** No edges to populate in this class */ - virtual void PopulateEdgeIds(void) ITK_OVERRIDE { /* empty */ } + void PopulateEdgeIds(void) override { /* empty */ } protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DMembrane.h b/Modules/Numerics/FEM/include/itkFEMElement2DMembrane.h index 4d6d008d809..17906d81351 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DMembrane.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DMembrane.h @@ -80,22 +80,22 @@ class ITK_TEMPLATE_EXPORT Element2DMembrane : public TBaseClass /** * Compute the B matrix. */ - virtual void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const ITK_OVERRIDE; + void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const override; /** * Compute the D matrix. */ - virtual void GetMaterialMatrix(MatrixType & D) const ITK_OVERRIDE; + void GetMaterialMatrix(MatrixType & D) const override; /** * Compute the mass matrix specific for 2D stress problems. */ - void GetMassMatrix(MatrixType & Me) const ITK_OVERRIDE; + void GetMassMatrix(MatrixType & Me) const override; /** * 2D stress elements have 2 DOFs per node. */ - virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE + unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const override { return 2; } @@ -103,12 +103,12 @@ class ITK_TEMPLATE_EXPORT Element2DMembrane : public TBaseClass /** * Get/Set the material properties for the element */ - virtual Material::ConstPointer GetMaterial(void) const ITK_OVERRIDE + Material::ConstPointer GetMaterial(void) const override { return m_mat; } - virtual void SetMaterial(Material::ConstPointer mat_) ITK_OVERRIDE + void SetMaterial(Material::ConstPointer mat_) override { m_mat = dynamic_cast( mat_.GetPointer() ); @@ -116,7 +116,7 @@ class ITK_TEMPLATE_EXPORT Element2DMembrane : public TBaseClass protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Pointer to material properties for the element diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DMembrane.hxx b/Modules/Numerics/FEM/include/itkFEMElement2DMembrane.hxx index de50d64c7f0..0e2b9414282 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DMembrane.hxx +++ b/Modules/Numerics/FEM/include/itkFEMElement2DMembrane.hxx @@ -27,7 +27,7 @@ namespace fem { template Element2DMembrane -::Element2DMembrane() : Superclass(), m_mat(ITK_NULLPTR) +::Element2DMembrane() : Superclass(), m_mat(nullptr) { } diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DStrain.h b/Modules/Numerics/FEM/include/itkFEMElement2DStrain.h index 32dde1eaae3..4996a3cd1f3 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DStrain.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DStrain.h @@ -78,22 +78,22 @@ class ITK_TEMPLATE_EXPORT Element2DStrain : public TBaseClass /** * Compute the B matrix. */ - virtual void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const ITK_OVERRIDE; + void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const override; /** * Compute the D matrix. */ - virtual void GetMaterialMatrix(MatrixType & D) const ITK_OVERRIDE; + void GetMaterialMatrix(MatrixType & D) const override; /** * Compute the mass matrix specific for 2D strain problems. */ - void GetMassMatrix(MatrixType & Me) const ITK_OVERRIDE; + void GetMassMatrix(MatrixType & Me) const override; /** * 2D strain elements have 2 DOFs per node. */ - virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE + unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const override { return 2; } @@ -101,12 +101,12 @@ class ITK_TEMPLATE_EXPORT Element2DStrain : public TBaseClass /** * Get/Set the material properties for the element */ - virtual Material::ConstPointer GetMaterial(void) const ITK_OVERRIDE + Material::ConstPointer GetMaterial(void) const override { return dynamic_cast(m_mat); } - virtual void SetMaterial(Material::ConstPointer mat_) ITK_OVERRIDE + void SetMaterial(Material::ConstPointer mat_) override { m_mat = dynamic_cast( mat_.GetPointer() ); @@ -114,7 +114,7 @@ class ITK_TEMPLATE_EXPORT Element2DStrain : public TBaseClass protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Pointer to material properties of the element diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DStrain.hxx b/Modules/Numerics/FEM/include/itkFEMElement2DStrain.hxx index 0974dd6f649..54d04eda2d4 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DStrain.hxx +++ b/Modules/Numerics/FEM/include/itkFEMElement2DStrain.hxx @@ -27,7 +27,7 @@ namespace fem { template Element2DStrain -::Element2DStrain() : Superclass(), m_mat(ITK_NULLPTR) +::Element2DStrain() : Superclass(), m_mat(nullptr) { } diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DStress.h b/Modules/Numerics/FEM/include/itkFEMElement2DStress.h index c2abca29193..86d883001ff 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DStress.h +++ b/Modules/Numerics/FEM/include/itkFEMElement2DStress.h @@ -72,22 +72,22 @@ class ITK_TEMPLATE_EXPORT Element2DStress : public TBaseClass /** * Compute the B matrix. */ - virtual void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const ITK_OVERRIDE; + void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const override; /** * Compute the D matrix. */ - virtual void GetMaterialMatrix(MatrixType & D) const ITK_OVERRIDE; + void GetMaterialMatrix(MatrixType & D) const override; /** * Compute the mass matrix specific for 2D stress problems. */ - void GetMassMatrix(MatrixType & Me) const ITK_OVERRIDE; + void GetMassMatrix(MatrixType & Me) const override; /** * 2D stress elements have 2 DOFs per node. */ - virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE + unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const override { return 2; } @@ -95,12 +95,12 @@ class ITK_TEMPLATE_EXPORT Element2DStress : public TBaseClass /** * Get/Set the material properties for the element */ - virtual Material::ConstPointer GetMaterial(void) const ITK_OVERRIDE + Material::ConstPointer GetMaterial(void) const override { return dynamic_cast(m_mat); } - virtual void SetMaterial(Material::ConstPointer mat_) ITK_OVERRIDE + void SetMaterial(Material::ConstPointer mat_) override { this->SetMaterialInternal(mat_.GetPointer()); } @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT Element2DStress : public TBaseClass protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Pointer to material properties of the element diff --git a/Modules/Numerics/FEM/include/itkFEMElement2DStress.hxx b/Modules/Numerics/FEM/include/itkFEMElement2DStress.hxx index 53dc7f8f611..b39207ca56b 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement2DStress.hxx +++ b/Modules/Numerics/FEM/include/itkFEMElement2DStress.hxx @@ -27,7 +27,7 @@ namespace fem { template Element2DStress -::Element2DStress() : Superclass(), m_mat(ITK_NULLPTR) +::Element2DStress() : Superclass(), m_mat(nullptr) { } diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedron.h b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedron.h index 4b770fdbbe6..d006901cb7b 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedron.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedron.h @@ -79,9 +79,9 @@ class ITKFEM_EXPORT Element3DC0LinearHexahedron : public ElementStd<8, 3> * Methods related to numeric integration */ - virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const ITK_OVERRIDE; + void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const override; - virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const ITK_OVERRIDE; + unsigned int GetNumberOfIntegrationPoints(unsigned int order) const override; // //////////////////////////////////////////////////////////////////////// /** @@ -89,13 +89,13 @@ class ITKFEM_EXPORT Element3DC0LinearHexahedron : public ElementStd<8, 3> */ /** Return the shape functions used to interpolate across the element */ - virtual VectorType ShapeFunctions(const VectorType & pt) const ITK_OVERRIDE; + VectorType ShapeFunctions(const VectorType & pt) const override; /** Return the shape functions derivatives in the shapeD matrix */ - virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const ITK_OVERRIDE; + void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const override; /** Convert from global to local coordinates */ - virtual bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const ITK_OVERRIDE; + bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const override; /** * Methods used in computing parametric/local coordinates given global coordinates. @@ -107,9 +107,9 @@ class ITKFEM_EXPORT Element3DC0LinearHexahedron : public ElementStd<8, 3> Float Determinant3x3(const VectorType & c1, const VectorType & c2, const VectorType & c3) const; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; - virtual void PopulateEdgeIds(void) ITK_OVERRIDE; + void PopulateEdgeIds(void) override; }; } diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedronMembrane.h b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedronMembrane.h index 4e1c67c4eb2..54488e4e085 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedronMembrane.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedronMembrane.h @@ -61,7 +61,7 @@ class ITKFEM_EXPORT Element3DC0LinearHexahedronMembrane : public Element3DMembra * CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only clears the internal storage @@ -75,7 +75,7 @@ class ITKFEM_EXPORT Element3DC0LinearHexahedronMembrane : public Element3DMembra Element3DC0LinearHexahedronMembrane(NodeIDType ns_[], Material::ConstPointer p_); protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; // class Element3DC0LinearHexahedronMembrane diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedronStrain.h b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedronStrain.h index 16b7329f8b3..abb2ba0a5fd 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedronStrain.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearHexahedronStrain.h @@ -61,7 +61,7 @@ class ITKFEM_EXPORT Element3DC0LinearHexahedronStrain : public Element3DStrain enum { DefaultIntegrationOrder = 1 }; /** Get the Integration point and weight */ - virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const ITK_OVERRIDE; + void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const override; /** Get the number of integration points */ - virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const ITK_OVERRIDE; + unsigned int GetNumberOfIntegrationPoints(unsigned int order) const override; // //////////////////////////////////////////////////////////////////////// /** @@ -91,18 +91,18 @@ class ITKFEM_EXPORT Element3DC0LinearTetrahedron : public ElementStd<4, 3> */ /** Return the shape functions used to interpolate across the element */ - virtual VectorType ShapeFunctions(const VectorType & pt) const ITK_OVERRIDE; + VectorType ShapeFunctions(const VectorType & pt) const override; /** Return the shape functions derivatives in the shapeD matrix */ - virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const ITK_OVERRIDE; + void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const override; /** Convert from global to local coordinates */ - virtual bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const ITK_OVERRIDE; + bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const override; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; - virtual void PopulateEdgeIds(void) ITK_OVERRIDE; + void PopulateEdgeIds(void) override; }; } diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTetrahedronMembrane.h b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTetrahedronMembrane.h index 948a1384913..42b0f959888 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTetrahedronMembrane.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTetrahedronMembrane.h @@ -60,7 +60,7 @@ class ITKFEM_EXPORT Element3DC0LinearTetrahedronMembrane : public Element3DMembr * CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only clears the internal storage @@ -74,7 +74,7 @@ class ITKFEM_EXPORT Element3DC0LinearTetrahedronMembrane : public Element3DMembr Element3DC0LinearTetrahedronMembrane(NodeIDType ns_[], Material::ConstPointer p_); protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; // class Element3DC0LinearTetrahedronMembrane diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTetrahedronStrain.h b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTetrahedronStrain.h index caf624ee44a..5790d9e3d2a 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTetrahedronStrain.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTetrahedronStrain.h @@ -58,7 +58,7 @@ class ITKFEM_EXPORT Element3DC0LinearTetrahedronStrain : public Element3DStrain< * CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only clears the internal storage @@ -72,7 +72,7 @@ class ITKFEM_EXPORT Element3DC0LinearTetrahedronStrain : public Element3DStrain< Element3DC0LinearTetrahedronStrain(NodeIDType ns_[], Material::ConstPointer p_); protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; // class Element3DC0LinearTetrahedronStrain diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangular.h b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangular.h index b38bd78d776..bf1607298ee 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangular.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangular.h @@ -70,10 +70,10 @@ class ITKFEM_EXPORT Element3DC0LinearTriangular : public ElementStd<3, 3> enum { DefaultIntegrationOrder = 1 }; /** Get the Integration point and weight */ - virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const ITK_OVERRIDE; + void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const override; /** Get the number of integration points */ - virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const ITK_OVERRIDE; + unsigned int GetNumberOfIntegrationPoints(unsigned int order) const override; // //////////////////////////////////////////////////////////////////////// /* @@ -81,22 +81,22 @@ class ITKFEM_EXPORT Element3DC0LinearTriangular : public ElementStd<3, 3> */ /** Return the shape functions used to interpolate across the element */ - virtual VectorType ShapeFunctions(const VectorType & pt) const ITK_OVERRIDE; + VectorType ShapeFunctions(const VectorType & pt) const override; /** Return the shape functions derivatives in the shapeD matrix */ - virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const ITK_OVERRIDE; + void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const override; /** Convert from global to local coordinates */ - virtual bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const ITK_OVERRIDE; + bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const override; /** Compute the determinate of the Jacobian matrix */ - virtual Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ = ITK_NULLPTR) const ITK_OVERRIDE; + Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ = nullptr) const override; /** Compute the inverse of the Jacobian matrix */ - virtual void JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ = ITK_NULLPTR) const ITK_OVERRIDE; + void JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ = nullptr) const override; /** Define the edges and nodes that correspond to the edges */ - virtual void PopulateEdgeIds() ITK_OVERRIDE; + void PopulateEdgeIds() override; /** * Normal of the triangle element @@ -125,7 +125,7 @@ class ITKFEM_EXPORT Element3DC0LinearTriangular : public ElementStd<3, 3> static const unsigned int Nip[6]; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; } diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangularLaplaceBeltrami.h b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangularLaplaceBeltrami.h index ce40bcd987b..0a6ed164442 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangularLaplaceBeltrami.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangularLaplaceBeltrami.h @@ -56,7 +56,7 @@ class ITKFEM_EXPORT Element3DC0LinearTriangularLaplaceBeltrami : public Element3 /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only clears the internal storage @@ -70,16 +70,16 @@ class ITKFEM_EXPORT Element3DC0LinearTriangularLaplaceBeltrami : public Element3 Element3DC0LinearTriangularLaplaceBeltrami(NodeIDType n1_, NodeIDType n2_, NodeIDType n3_, Material::ConstPointer p_); /** Get the degress of freesom for each node */ - virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE + unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const override { return 1; } /** Get the Stiffness matrix */ - virtual void GetStiffnessMatrix(MatrixType & Ke) const ITK_OVERRIDE; + void GetStiffnessMatrix(MatrixType & Ke) const override; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; // class Element3DC0LinearTriangularLaplaceBeltrami diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangularMembrane.h b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangularMembrane.h index 3cc8edce5c3..1593a131cf9 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangularMembrane.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DC0LinearTriangularMembrane.h @@ -55,7 +55,7 @@ class ITKFEM_EXPORT Element3DC0LinearTriangularMembrane : public Element3DMembra /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only clears the internal storage @@ -69,7 +69,7 @@ class ITKFEM_EXPORT Element3DC0LinearTriangularMembrane : public Element3DMembra Element3DC0LinearTriangularMembrane(NodeIDType n1_, NodeIDType n2_, NodeIDType n3_, Material::ConstPointer p_); protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; // class Element3DC0LinearTriangularMembrane diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DMembrane.h b/Modules/Numerics/FEM/include/itkFEMElement3DMembrane.h index ce815a4299c..fbe7731541d 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DMembrane.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DMembrane.h @@ -77,22 +77,22 @@ class ITK_TEMPLATE_EXPORT Element3DMembrane : public TBaseClass /** * Compute the B matrix. */ - virtual void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const ITK_OVERRIDE; + void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const override; /** * Compute the D matrix. */ - virtual void GetMaterialMatrix(MatrixType & D) const ITK_OVERRIDE; + void GetMaterialMatrix(MatrixType & D) const override; /** * Compute the mass matrix specific for 3D membrane problems. */ - void GetMassMatrix(MatrixType & Me) const ITK_OVERRIDE; + void GetMassMatrix(MatrixType & Me) const override; /** * 3D membrane elements have 3 DOFs per node. */ - virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE + unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const override { return 3; } @@ -100,12 +100,12 @@ class ITK_TEMPLATE_EXPORT Element3DMembrane : public TBaseClass /** * Get/Set the material properties for the element */ - virtual Material::ConstPointer GetMaterial(void) const ITK_OVERRIDE + Material::ConstPointer GetMaterial(void) const override { return dynamic_cast(m_mat); } - virtual void SetMaterial(Material::ConstPointer mat_) ITK_OVERRIDE + void SetMaterial(Material::ConstPointer mat_) override { m_mat = dynamic_cast( mat_.GetPointer() ); @@ -113,7 +113,7 @@ class ITK_TEMPLATE_EXPORT Element3DMembrane : public TBaseClass protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Pointer to material properties of the element diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DMembrane.hxx b/Modules/Numerics/FEM/include/itkFEMElement3DMembrane.hxx index 9907e7d87ee..a6ae1fb4b97 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DMembrane.hxx +++ b/Modules/Numerics/FEM/include/itkFEMElement3DMembrane.hxx @@ -27,7 +27,7 @@ namespace fem { template Element3DMembrane -::Element3DMembrane() : Superclass(), m_mat(ITK_NULLPTR) +::Element3DMembrane() : Superclass(), m_mat(nullptr) { } diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DMembrane1DOF.h b/Modules/Numerics/FEM/include/itkFEMElement3DMembrane1DOF.h index 46719d0d450..c62f27e27ac 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DMembrane1DOF.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DMembrane1DOF.h @@ -72,38 +72,38 @@ class ITK_TEMPLATE_EXPORT Element3DMembrane1DOF : public TBaseClass /** * Compute the B matrix. */ - virtual void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const ITK_OVERRIDE; + void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const override; /** * Compute the D matrix. */ - virtual void GetMaterialMatrix(MatrixType & D) const ITK_OVERRIDE; + void GetMaterialMatrix(MatrixType & D) const override; /** * Compute the mass matrix specific for 3D membrane problems. */ - void GetMassMatrix(MatrixType & Me) const ITK_OVERRIDE; + void GetMassMatrix(MatrixType & Me) const override; /** * 3D membrane elements have 3 DOFs per node. */ - virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE + unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const override { return 3; } /** Get the Stiffness matrix */ - virtual void GetStiffnessMatrix(MatrixType & Ke) const ITK_OVERRIDE; + void GetStiffnessMatrix(MatrixType & Ke) const override; /** * Get/Set the material properties for the element */ - virtual Material::ConstPointer GetMaterial(void) const ITK_OVERRIDE + Material::ConstPointer GetMaterial(void) const override { return dynamic_cast(m_Mat.GetPointer()); } - virtual void SetMaterial(Material::ConstPointer mat_) ITK_OVERRIDE + void SetMaterial(Material::ConstPointer mat_) override { m_Mat = dynamic_cast( mat_.GetPointer() ); @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT Element3DMembrane1DOF : public TBaseClass protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Pointer to material properties of the element diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DMembrane1DOF.hxx b/Modules/Numerics/FEM/include/itkFEMElement3DMembrane1DOF.hxx index a60950869ca..7a3c822acf0 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DMembrane1DOF.hxx +++ b/Modules/Numerics/FEM/include/itkFEMElement3DMembrane1DOF.hxx @@ -27,7 +27,7 @@ namespace fem { template Element3DMembrane1DOF -::Element3DMembrane1DOF() : Superclass(), m_Mat(ITK_NULLPTR) +::Element3DMembrane1DOF() : Superclass(), m_Mat(nullptr) { } diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DStrain.h b/Modules/Numerics/FEM/include/itkFEMElement3DStrain.h index 6c90034c43b..9e7b9d35fa1 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DStrain.h +++ b/Modules/Numerics/FEM/include/itkFEMElement3DStrain.h @@ -74,17 +74,17 @@ class ITK_TEMPLATE_EXPORT Element3DStrain : public TBaseClass /** * Compute the B matrix. */ - virtual void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const ITK_OVERRIDE; + void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const override; /** * Compute the D matrix. */ - virtual void GetMaterialMatrix(MatrixType & D) const ITK_OVERRIDE; + void GetMaterialMatrix(MatrixType & D) const override; /** * 3D strain elements have 3 DOFs per node. */ - virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE + unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const override { return 3; } @@ -92,12 +92,12 @@ class ITK_TEMPLATE_EXPORT Element3DStrain : public TBaseClass /** * Get/Set the material properties for the element */ - virtual Material::ConstPointer GetMaterial(void) const ITK_OVERRIDE + Material::ConstPointer GetMaterial(void) const override { return m_mat; } - virtual void SetMaterial(Material::ConstPointer mat_) ITK_OVERRIDE + void SetMaterial(Material::ConstPointer mat_) override { m_mat = dynamic_cast( mat_.GetPointer() ); @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT Element3DStrain : public TBaseClass protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Pointer to material properties of the element diff --git a/Modules/Numerics/FEM/include/itkFEMElement3DStrain.hxx b/Modules/Numerics/FEM/include/itkFEMElement3DStrain.hxx index 2c0a07b63d3..0b9fe6f97ef 100644 --- a/Modules/Numerics/FEM/include/itkFEMElement3DStrain.hxx +++ b/Modules/Numerics/FEM/include/itkFEMElement3DStrain.hxx @@ -27,7 +27,7 @@ namespace fem { template Element3DStrain -::Element3DStrain() : Superclass(), m_mat(ITK_NULLPTR) +::Element3DStrain() : Superclass(), m_mat(nullptr) { } diff --git a/Modules/Numerics/FEM/include/itkFEMElementBase.h b/Modules/Numerics/FEM/include/itkFEMElementBase.h index 11b32fce333..c8cc9afbb0e 100644 --- a/Modules/Numerics/FEM/include/itkFEMElementBase.h +++ b/Modules/Numerics/FEM/include/itkFEMElementBase.h @@ -172,7 +172,7 @@ class ITKFEM_EXPORT Element : public FEMLightObject /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Floating point precision type. @@ -193,7 +193,7 @@ class ITKFEM_EXPORT Element : public FEMLightObject /** * Destructor */ - ~Node() ITK_OVERRIDE + ~Node() override { this->ClearDegreesOfFreedom(); this->m_elements.clear(); @@ -250,7 +250,7 @@ class ITKFEM_EXPORT Element : public FEMLightObject typedef std::set SetOfElements; mutable SetOfElements m_elements; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: /** * Vector object that holds node coordinates. @@ -599,8 +599,8 @@ class ITKFEM_EXPORT Element : public FEMLightObject * * \sa ShapeFunctionDerivatives */ - virtual void ShapeFunctionGlobalDerivatives(const VectorType & pt, MatrixType & shapeDgl, const MatrixType *pJ = ITK_NULLPTR, - const MatrixType *pshapeD = ITK_NULLPTR) const; + virtual void ShapeFunctionGlobalDerivatives(const VectorType & pt, MatrixType & shapeDgl, const MatrixType *pJ = nullptr, + const MatrixType *pshapeD = nullptr) const; /** * Compute the Jacobian matrix of the transformation from local @@ -623,7 +623,7 @@ class ITKFEM_EXPORT Element : public FEMLightObject * If this pointer is 0, derivatives will be computed as * necessary. */ - virtual void Jacobian(const VectorType & pt, MatrixType & J, const MatrixType *pshapeD = ITK_NULLPTR) const; + virtual void Jacobian(const VectorType & pt, MatrixType & J, const MatrixType *pshapeD = nullptr) const; /** * Compute the determinant of the Jacobian matrix @@ -634,7 +634,7 @@ class ITKFEM_EXPORT Element : public FEMLightObject * \param pJ Optional pointer to Jacobian matrix computed at point pt. If this * is set to 0, the Jacobian will be computed as necessary. */ - virtual Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ = ITK_NULLPTR) const; + virtual Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ = nullptr) const; /** * Compute the inverse of the Jacobian matrix @@ -647,7 +647,7 @@ class ITKFEM_EXPORT Element : public FEMLightObject * \param pJ Optional pointer to Jacobian matrix computed at point pt. If this * is set to 0, the Jacobian will be computed as necessary. */ - virtual void JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ = ITK_NULLPTR) const; + virtual void JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ = nullptr) const; /** * Return the total number of degrees of freedom defined in a derived @@ -678,7 +678,7 @@ class ITKFEM_EXPORT Element : public FEMLightObject // to store edge connectivity data std::vector > m_EdgeIds; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; diff --git a/Modules/Numerics/FEM/include/itkFEMElementStd.h b/Modules/Numerics/FEM/include/itkFEMElementStd.h index dd955dd3ccd..be1e6bbd5c3 100644 --- a/Modules/Numerics/FEM/include/itkFEMElementStd.h +++ b/Modules/Numerics/FEM/include/itkFEMElementStd.h @@ -89,38 +89,38 @@ class ITK_TEMPLATE_EXPORT ElementStd : public TBaseClass ElementStd(); /** Methods that define the geometry of an element. */ - virtual unsigned int GetNumberOfNodes(void) const ITK_OVERRIDE + unsigned int GetNumberOfNodes(void) const override { return NumberOfNodes; } /** Get/Set the Nodes that define the element. */ - virtual NodeIDType GetNode(unsigned int n) const ITK_OVERRIDE + NodeIDType GetNode(unsigned int n) const override { if( n >= NumberOfNodes ) { - return ITK_NULLPTR; + return nullptr; } return this->m_node[n]; } - virtual void SetNode(unsigned int n, NodeIDType node) ITK_OVERRIDE + void SetNode(unsigned int n, NodeIDType node) override { this->SetNodeInternal(n,node); } - virtual void SetNode(unsigned int n, typename Superclass::Node::Pointer node) ITK_OVERRIDE + void SetNode(unsigned int n, typename Superclass::Node::Pointer node) override { this->SetNodeInternal(n,node); } /** Get the nodal coordinates. */ - virtual const VectorType & GetNodeCoordinates(unsigned int n) const ITK_OVERRIDE + const VectorType & GetNodeCoordinates(unsigned int n) const override { return m_node[n]->GetCoordinates(); } /** Get the number of spatial dimensions. */ - virtual unsigned int GetNumberOfSpatialDimensions() const ITK_OVERRIDE + unsigned int GetNumberOfSpatialDimensions() const override { return NumberOfSpatialDimensions; } @@ -128,7 +128,7 @@ class ITK_TEMPLATE_EXPORT ElementStd : public TBaseClass protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; virtual void SetNodeInternal(unsigned int n, const Node *node) { diff --git a/Modules/Numerics/FEM/include/itkFEMElementStd.hxx b/Modules/Numerics/FEM/include/itkFEMElementStd.hxx index 6b3187cc56c..bf37e2f2b4e 100644 --- a/Modules/Numerics/FEM/include/itkFEMElementStd.hxx +++ b/Modules/Numerics/FEM/include/itkFEMElementStd.hxx @@ -32,7 +32,7 @@ ElementStd< VNumberOfNodes, VNumberOfSpatialDimensions, TBaseClass > // Set all node ids to 0 (undefined) for( int i = 0; i < NumberOfNodes; i++ ) { - this->m_node[i] = ITK_NULLPTR; + this->m_node[i] = nullptr; } } diff --git a/Modules/Numerics/FEM/include/itkFEMException.h b/Modules/Numerics/FEM/include/itkFEMException.h index 3083b147031..807c1dbb64e 100644 --- a/Modules/Numerics/FEM/include/itkFEMException.h +++ b/Modules/Numerics/FEM/include/itkFEMException.h @@ -52,8 +52,8 @@ class ITK_ABI_EXPORT FEMException : public itk::ExceptionObject FEMException(const char *file, unsigned int lineNumber, std::string location = "Unknown"); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~FEMException() - ITK_NOEXCEPT ITK_OVERRIDE; + ~FEMException() + ITK_NOEXCEPT override; /** Type related information. */ itkTypeMacro(FEMException, ExceptionObject); @@ -77,8 +77,8 @@ class ITK_ABI_EXPORT FEMExceptionIO : public FEMException FEMExceptionIO(const char *file, unsigned int lineNumber, std::string location, std::string moreDescription); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~FEMExceptionIO() - ITK_NOEXCEPT ITK_OVERRIDE; + ~FEMExceptionIO() + ITK_NOEXCEPT override; /** Type related information. */ itkTypeMacro(FEMExceptionIO, FEMException); @@ -108,8 +108,8 @@ class ITK_ABI_EXPORT FEMExceptionWrongClass : public FEMException FEMExceptionWrongClass(const char *file, unsigned int lineNumber, std::string location); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~FEMExceptionWrongClass() - ITK_NOEXCEPT ITK_OVERRIDE; + ~FEMExceptionWrongClass() + ITK_NOEXCEPT override; /** Type related information. */ itkTypeMacro(FEMExceptionWrongClass, FEMException); @@ -130,8 +130,8 @@ class ITK_ABI_EXPORT FEMExceptionObjectNotFound : public FEMException int GN); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~FEMExceptionObjectNotFound() - ITK_NOEXCEPT ITK_OVERRIDE; + ~FEMExceptionObjectNotFound() + ITK_NOEXCEPT override; /** Type related information. */ itkTypeMacro(FEMExceptionObjectNotFound, FEMException); @@ -162,8 +162,8 @@ class ITK_ABI_EXPORT FEMExceptionSolution : public FEMException FEMExceptionSolution(const char *file, unsigned int lineNumber, std::string location, std::string moreDescription); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~FEMExceptionSolution() - ITK_NOEXCEPT ITK_OVERRIDE; + ~FEMExceptionSolution() + ITK_NOEXCEPT override; /** Type related information. */ itkTypeMacro(FEMExceptionSolution, FEMException); diff --git a/Modules/Numerics/FEM/include/itkFEMFactoryBase.h b/Modules/Numerics/FEM/include/itkFEMFactoryBase.h index 81c4ff6319e..b25d354c43c 100644 --- a/Modules/Numerics/FEM/include/itkFEMFactoryBase.h +++ b/Modules/Numerics/FEM/include/itkFEMFactoryBase.h @@ -49,9 +49,9 @@ class ITKFEM_EXPORT FEMFactoryBase : public ObjectFactoryBase typedef SmartPointer ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Run-time type information (and related methods). */ itkTypeMacro(FEMFactoryBase, ObjectFactoryBase); @@ -65,13 +65,13 @@ class ITKFEM_EXPORT FEMFactoryBase : public ObjectFactoryBase /** Register this transform */ static FEMFactoryBase * GetFactory() { - if( m_Factory == ITK_NULLPTR ) + if( m_Factory == nullptr ) { m_CreationLock.Lock(); //Need to make sure that during gaining access //to the lock that some other thread did not //initialize the singleton. - if( m_Factory == ITK_NULLPTR ) + if( m_Factory == nullptr ) { // Make and register the factory FEMFactoryBase::Pointer p = FEMFactoryBase::New(); @@ -103,7 +103,7 @@ class ITKFEM_EXPORT FEMFactoryBase : public ObjectFactoryBase protected: FEMFactoryBase(); - virtual ~FEMFactoryBase() ITK_OVERRIDE; + ~FEMFactoryBase() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FEMFactoryBase); diff --git a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h index 6576366e6a0..64d2374557a 100644 --- a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h +++ b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h @@ -83,7 +83,7 @@ class ITK_TEMPLATE_EXPORT ImageMetricLoad : public LoadElement /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; // Necessary typedefs for dealing with images BEGIN typedef typename LoadElement::Float Float; @@ -261,14 +261,14 @@ class ITK_TEMPLATE_EXPORT ImageMetricLoad : public LoadElement /** Set the pointer to the solution vector. * \param ptr Pointer to the object of Solution class. */ - virtual void SetSolution(Solution::ConstPointer ptr) ITK_OVERRIDE + void SetSolution(Solution::ConstPointer ptr) override { m_Solution = ptr; } /** Get the pointer to the solution vector. * \return Pointer to the object of Solution class. */ - virtual Solution::ConstPointer GetSolution() ITK_OVERRIDE + Solution::ConstPointer GetSolution() override { return m_Solution; } @@ -333,10 +333,10 @@ class ITK_TEMPLATE_EXPORT ImageMetricLoad : public LoadElement } // FIXME - Documentation - virtual void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) ITK_OVERRIDE; + void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) override; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: GradientImageType *m_MetricGradientImage; diff --git a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx index a4963dad183..df4f9d91c10 100644 --- a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx +++ b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx @@ -131,8 +131,8 @@ template ImageMetricLoad ::ImageMetricLoad() { - m_Metric = ITK_NULLPTR; - m_Transform = ITK_NULLPTR; + m_Metric = nullptr; + m_Transform = nullptr; m_SolutionIndex = 1; m_SolutionIndex2 = 0; m_Sign = 1.0; @@ -140,7 +140,7 @@ ImageMetricLoad { m_MetricRadius[i] = 1; } - m_MetricGradientImage = ITK_NULLPTR; + m_MetricGradientImage = nullptr; } template diff --git a/Modules/Numerics/FEM/include/itkFEMItpackSparseMatrix.h b/Modules/Numerics/FEM/include/itkFEMItpackSparseMatrix.h index 7ec183a632f..8670a64a58d 100644 --- a/Modules/Numerics/FEM/include/itkFEMItpackSparseMatrix.h +++ b/Modules/Numerics/FEM/include/itkFEMItpackSparseMatrix.h @@ -290,8 +290,8 @@ class ITK_ABI_EXPORT FEMExceptionItpackSparseMatrixSbagn : public FEMException integer errorCode); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~FEMExceptionItpackSparseMatrixSbagn() - ITK_NOEXCEPT ITK_OVERRIDE; + ~FEMExceptionItpackSparseMatrixSbagn() + ITK_NOEXCEPT override; /** Type related information. */ itkTypeMacro(FEMExceptionItpackSparseMatrixSbagn, FEMException); @@ -320,8 +320,8 @@ class ITK_ABI_EXPORT FEMExceptionItpackSparseMatrixSbsij : public FEMException integer errorCode); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~FEMExceptionItpackSparseMatrixSbsij() - ITK_NOEXCEPT ITK_OVERRIDE; + ~FEMExceptionItpackSparseMatrixSbsij() + ITK_NOEXCEPT override; /** Type related information. */ itkTypeMacro(FEMExceptionItpackSparseMatrixSbsij, FEMException); diff --git a/Modules/Numerics/FEM/include/itkFEMLightObject.h b/Modules/Numerics/FEM/include/itkFEMLightObject.h index 84349463701..2a549365bb6 100644 --- a/Modules/Numerics/FEM/include/itkFEMLightObject.h +++ b/Modules/Numerics/FEM/include/itkFEMLightObject.h @@ -78,9 +78,9 @@ class ITKFEM_EXPORT FEMLightObject : public itk::LightObject /** * Virtual destructor */ - virtual ~FEMLightObject() ITK_OVERRIDE {} + ~FEMLightObject() override {} - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Copy constructor must be available for the FEM objects... diff --git a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapper.h b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapper.h index 381a8525a2c..30874cc0a56 100644 --- a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapper.h +++ b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapper.h @@ -76,7 +76,7 @@ class ITKFEM_EXPORT LinearSystemWrapper : public Solution * Virtual destructor should properly destroy the object and clean up any * memory allocated for matrix and vector storage. */ - virtual ~LinearSystemWrapper(); + ~LinearSystemWrapper() override; /** * Clear all the data (matrices) inside the system, so that the system @@ -507,8 +507,8 @@ class ITK_ABI_EXPORT FEMExceptionLinearSystem : public FEMException FEMExceptionLinearSystem(const char *file, unsigned int lineNumber, std::string location, std::string moreDescription); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~FEMExceptionLinearSystem() - ITK_NOEXCEPT ITK_OVERRIDE; + ~FEMExceptionLinearSystem() + ITK_NOEXCEPT override; /** Type related information. */ itkTypeMacro(FEMExceptionLinearSystem, FEMException); @@ -535,8 +535,8 @@ class ITK_ABI_EXPORT FEMExceptionLinearSystemBounds : public FEMException unsigned int index2); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~FEMExceptionLinearSystemBounds() - ITK_NOEXCEPT ITK_OVERRIDE; + ~FEMExceptionLinearSystemBounds() + ITK_NOEXCEPT override; /** Type related information. */ itkTypeMacro(FEMExceptionLinearSystem, FEMException); diff --git a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperDenseVNL.h b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperDenseVNL.h index 9a40f513600..d48bbb31e05 100644 --- a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperDenseVNL.h +++ b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperDenseVNL.h @@ -53,100 +53,100 @@ class ITKFEM_EXPORT LinearSystemWrapperDenseVNL : public LinearSystemWrapper typedef std::vector MatrixHolder; /* constructor & destructor */ - LinearSystemWrapperDenseVNL() : LinearSystemWrapper(), m_Matrices(ITK_NULLPTR), m_Vectors(ITK_NULLPTR), m_Solutions(ITK_NULLPTR) + LinearSystemWrapperDenseVNL() : LinearSystemWrapper(), m_Matrices(nullptr), m_Vectors(nullptr), m_Solutions(nullptr) { } - virtual ~LinearSystemWrapperDenseVNL() ITK_OVERRIDE; + ~LinearSystemWrapperDenseVNL() override; /* memory management routines */ - virtual void InitializeMatrix(unsigned int matrixIndex) ITK_OVERRIDE; + void InitializeMatrix(unsigned int matrixIndex) override; - virtual bool IsMatrixInitialized(unsigned int matrixIndex) ITK_OVERRIDE; + bool IsMatrixInitialized(unsigned int matrixIndex) override; - virtual void DestroyMatrix(unsigned int matrixIndex) ITK_OVERRIDE; + void DestroyMatrix(unsigned int matrixIndex) override; - virtual void InitializeVector(unsigned int vectorIndex) ITK_OVERRIDE; + void InitializeVector(unsigned int vectorIndex) override; - virtual bool IsVectorInitialized(unsigned int vectorIndex) ITK_OVERRIDE; + bool IsVectorInitialized(unsigned int vectorIndex) override; - virtual void DestroyVector(unsigned int vectorIndex) ITK_OVERRIDE; + void DestroyVector(unsigned int vectorIndex) override; - virtual void InitializeSolution(unsigned int solutionIndex) ITK_OVERRIDE; + void InitializeSolution(unsigned int solutionIndex) override; - virtual bool IsSolutionInitialized(unsigned int solutionIndex) ITK_OVERRIDE; + bool IsSolutionInitialized(unsigned int solutionIndex) override; - virtual void DestroySolution(unsigned int solutionIndex) ITK_OVERRIDE; + void DestroySolution(unsigned int solutionIndex) override; virtual void SetMaximumNonZeroValuesInMatrix(unsigned int, unsigned int) { } /* assembly & solving routines */ - virtual Float GetMatrixValue(unsigned int i, unsigned int j, - unsigned int matrixIndex) const ITK_OVERRIDE + Float GetMatrixValue(unsigned int i, unsigned int j, + unsigned int matrixIndex) const override { return ( *( ( *m_Matrices )[matrixIndex] ) )(i, j); } - virtual void SetMatrixValue(unsigned int i, unsigned int j, Float value, - unsigned int matrixIndex) ITK_OVERRIDE + void SetMatrixValue(unsigned int i, unsigned int j, Float value, + unsigned int matrixIndex) override { ( *( ( *m_Matrices )[matrixIndex] ) )(i, j) = value; } - virtual void AddMatrixValue(unsigned int i, unsigned int j, Float value, - unsigned int matrixIndex) ITK_OVERRIDE + void AddMatrixValue(unsigned int i, unsigned int j, Float value, + unsigned int matrixIndex) override { ( *( ( *m_Matrices )[matrixIndex] ) )(i, j) += value; } - virtual Float GetVectorValue(unsigned int i, - unsigned int vectorIndex) const ITK_OVERRIDE + Float GetVectorValue(unsigned int i, + unsigned int vectorIndex) const override { return ( *( ( *m_Vectors )[vectorIndex] ) )[i]; } - virtual void SetVectorValue(unsigned int i, Float value, - unsigned int vectorIndex) ITK_OVERRIDE + void SetVectorValue(unsigned int i, Float value, + unsigned int vectorIndex) override { ( *( ( *m_Vectors )[vectorIndex] ) )(i) = value; } - virtual void AddVectorValue(unsigned int i, Float value, - unsigned int vectorIndex) ITK_OVERRIDE + void AddVectorValue(unsigned int i, Float value, + unsigned int vectorIndex) override { ( *( ( *m_Vectors )[vectorIndex] ) )(i) += value; } - virtual Float GetSolutionValue(unsigned int i, unsigned int solutionIndex) const ITK_OVERRIDE; + Float GetSolutionValue(unsigned int i, unsigned int solutionIndex) const override; - virtual void SetSolutionValue(unsigned int i, Float value, - unsigned int solutionIndex) ITK_OVERRIDE + void SetSolutionValue(unsigned int i, Float value, + unsigned int solutionIndex) override { ( *( ( *m_Solutions )[solutionIndex] ) )(i) = value; } - virtual void AddSolutionValue(unsigned int i, Float value, - unsigned int solutionIndex) ITK_OVERRIDE + void AddSolutionValue(unsigned int i, Float value, + unsigned int solutionIndex) override { ( *( ( *m_Solutions )[solutionIndex] ) )(i) += value; } - virtual void Solve(void) ITK_OVERRIDE; + void Solve(void) override; /* matrix & vector manipulation routines */ - virtual void ScaleMatrix(Float scale, unsigned int matrixIndex) ITK_OVERRIDE; + void ScaleMatrix(Float scale, unsigned int matrixIndex) override; virtual void ScaleVector(Float scale, unsigned int vectorIndex); virtual void ScaleSolution(Float scale, unsigned int solutionIndex); - virtual void SwapMatrices(unsigned int matrixIndex1, unsigned int matrixIndex2) ITK_OVERRIDE; + void SwapMatrices(unsigned int matrixIndex1, unsigned int matrixIndex2) override; - virtual void SwapVectors(unsigned int vectorIndex1, unsigned int vectorIndex2) ITK_OVERRIDE; + void SwapVectors(unsigned int vectorIndex1, unsigned int vectorIndex2) override; - virtual void SwapSolutions(unsigned int solutionIndex1, unsigned int solutionIndex2) ITK_OVERRIDE; + void SwapSolutions(unsigned int solutionIndex1, unsigned int solutionIndex2) override; - virtual void CopySolution2Vector(unsigned solutionIndex, unsigned int vectorIndex) ITK_OVERRIDE; + void CopySolution2Vector(unsigned solutionIndex, unsigned int vectorIndex) override; - virtual void CopyVector2Solution(unsigned int vectorIndex, unsigned int solutionIndex) ITK_OVERRIDE; + void CopyVector2Solution(unsigned int vectorIndex, unsigned int solutionIndex) override; - virtual void MultiplyMatrixMatrix(unsigned int resultMatrixIndex, unsigned int leftMatrixIndex, - unsigned int rightMatrixIndex) ITK_OVERRIDE; + void MultiplyMatrixMatrix(unsigned int resultMatrixIndex, unsigned int leftMatrixIndex, + unsigned int rightMatrixIndex) override; - virtual void MultiplyMatrixVector(unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int vectorIndex) ITK_OVERRIDE; + void MultiplyMatrixVector(unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int vectorIndex) override; private: diff --git a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperItpack.h b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperItpack.h index 097e856d74d..fea6feed386 100644 --- a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperItpack.h +++ b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperItpack.h @@ -558,7 +558,7 @@ class ITKFEM_EXPORT LinearSystemWrapperItpack : public LinearSystemWrapper maxNonZeroValues; } - virtual void ScaleMatrix(Float scale, unsigned int matrixIndex) ITK_OVERRIDE; + void ScaleMatrix(Float scale, unsigned int matrixIndex) override; /** ----------------------------------------------------------------- * @@ -575,65 +575,65 @@ class ITKFEM_EXPORT LinearSystemWrapperItpack : public LinearSystemWrapper /** * destructor */ - ~LinearSystemWrapperItpack() ITK_OVERRIDE; + ~LinearSystemWrapperItpack() override; /* memory management routines */ - virtual void InitializeMatrix(unsigned int matrixIndex) ITK_OVERRIDE; + void InitializeMatrix(unsigned int matrixIndex) override; - virtual bool IsMatrixInitialized(unsigned int matrixIndex) ITK_OVERRIDE; + bool IsMatrixInitialized(unsigned int matrixIndex) override; - virtual void DestroyMatrix(unsigned int matrixIndex) ITK_OVERRIDE; + void DestroyMatrix(unsigned int matrixIndex) override; - virtual void InitializeVector(unsigned int vectorIndex) ITK_OVERRIDE; + void InitializeVector(unsigned int vectorIndex) override; - virtual bool IsVectorInitialized(unsigned int vectorIndex) ITK_OVERRIDE; + bool IsVectorInitialized(unsigned int vectorIndex) override; - virtual void DestroyVector(unsigned int vectorIndex) ITK_OVERRIDE; + void DestroyVector(unsigned int vectorIndex) override; - virtual void InitializeSolution(unsigned int solutionIndex) ITK_OVERRIDE; + void InitializeSolution(unsigned int solutionIndex) override; - virtual bool IsSolutionInitialized(unsigned int solutionIndex) ITK_OVERRIDE; + bool IsSolutionInitialized(unsigned int solutionIndex) override; - virtual void DestroySolution(unsigned int solutionIndex) ITK_OVERRIDE; + void DestroySolution(unsigned int solutionIndex) override; /* assembly & solving routines */ - virtual Float GetMatrixValue(unsigned int i, unsigned int j, unsigned int matrixIndex) const ITK_OVERRIDE; + Float GetMatrixValue(unsigned int i, unsigned int j, unsigned int matrixIndex) const override; - virtual void SetMatrixValue(unsigned int i, unsigned int j, Float value, unsigned int matrixIndex) ITK_OVERRIDE; + void SetMatrixValue(unsigned int i, unsigned int j, Float value, unsigned int matrixIndex) override; - virtual void AddMatrixValue(unsigned int i, unsigned int j, Float value, unsigned int matrixIndex) ITK_OVERRIDE; + void AddMatrixValue(unsigned int i, unsigned int j, Float value, unsigned int matrixIndex) override; - virtual void GetColumnsOfNonZeroMatrixElementsInRow(unsigned int row, ColumnArray & cols, unsigned int matrixIndex) ITK_OVERRIDE; + void GetColumnsOfNonZeroMatrixElementsInRow(unsigned int row, ColumnArray & cols, unsigned int matrixIndex) override; - virtual Float GetVectorValue(unsigned int i, unsigned int vectorIndex) const ITK_OVERRIDE; + Float GetVectorValue(unsigned int i, unsigned int vectorIndex) const override; - virtual void SetVectorValue(unsigned int i, Float value, unsigned int vectorIndex) ITK_OVERRIDE; + void SetVectorValue(unsigned int i, Float value, unsigned int vectorIndex) override; - virtual void AddVectorValue(unsigned int i, Float value, unsigned int vectorIndex) ITK_OVERRIDE; + void AddVectorValue(unsigned int i, Float value, unsigned int vectorIndex) override; - virtual Float GetSolutionValue(unsigned int i, unsigned int solutionIndex) const ITK_OVERRIDE; + Float GetSolutionValue(unsigned int i, unsigned int solutionIndex) const override; - virtual void SetSolutionValue(unsigned int i, Float value, unsigned int solutionIndex) ITK_OVERRIDE; + void SetSolutionValue(unsigned int i, Float value, unsigned int solutionIndex) override; - virtual void AddSolutionValue(unsigned int i, Float value, unsigned int solutionIndex) ITK_OVERRIDE; + void AddSolutionValue(unsigned int i, Float value, unsigned int solutionIndex) override; - virtual void Solve(void) ITK_OVERRIDE; + void Solve(void) override; /* matrix & vector manipulation routines */ - virtual void SwapMatrices(unsigned int matrixIndex1, unsigned int matrixIndex2) ITK_OVERRIDE; + void SwapMatrices(unsigned int matrixIndex1, unsigned int matrixIndex2) override; - virtual void SwapVectors(unsigned int vectorIndex1, unsigned int vectorIndex2) ITK_OVERRIDE; + void SwapVectors(unsigned int vectorIndex1, unsigned int vectorIndex2) override; - virtual void SwapSolutions(unsigned int solutionIndex1, unsigned int solutionIndex2) ITK_OVERRIDE; + void SwapSolutions(unsigned int solutionIndex1, unsigned int solutionIndex2) override; - virtual void CopySolution2Vector(unsigned solutionIndex, unsigned int vectorIndex) ITK_OVERRIDE; + void CopySolution2Vector(unsigned solutionIndex, unsigned int vectorIndex) override; - virtual void CopyVector2Solution(unsigned int vectorIndex, unsigned int solutionIndex) ITK_OVERRIDE; + void CopyVector2Solution(unsigned int vectorIndex, unsigned int solutionIndex) override; - virtual void MultiplyMatrixMatrix(unsigned int resultMatrixIndex, unsigned int leftMatrixIndex, - unsigned int rightMatrixIndex) ITK_OVERRIDE; + void MultiplyMatrixMatrix(unsigned int resultMatrixIndex, unsigned int leftMatrixIndex, + unsigned int rightMatrixIndex) override; - virtual void MultiplyMatrixVector(unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int vectorIndex) ITK_OVERRIDE; + void MultiplyMatrixVector(unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int vectorIndex) override; /** * Perform a matrix*solution operation and store the result in the linear system @@ -641,7 +641,7 @@ class ITKFEM_EXPORT LinearSystemWrapperItpack : public LinearSystemWrapper * \param solutionIndex index of solution to multiply * \param resultVectorIndex index of vector where result is store */ - virtual void MultiplyMatrixSolution(unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int solutionIndex) ITK_OVERRIDE; + void MultiplyMatrixSolution(unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int solutionIndex) override; private: @@ -693,7 +693,7 @@ class ITK_ABI_EXPORT FEMExceptionItpackSolver : public FEMException FEMExceptionItpackSolver(const char *file, unsigned int lineNumber, std::string location, integer errorCode); /** Virtual destructor needed for subclasses. Has to have empty throw(). */ - virtual ~FEMExceptionItpackSolver() ITK_NOEXCEPT ITK_OVERRIDE {} + ~FEMExceptionItpackSolver() ITK_NOEXCEPT override {} /** Type related information. */ itkTypeMacro(FEMExceptionItpackSolver, FEMException); diff --git a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperVNL.h b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperVNL.h index 87b2d6ae7a7..9b9d057d007 100644 --- a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperVNL.h +++ b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperVNL.h @@ -52,96 +52,96 @@ class ITKFEM_EXPORT LinearSystemWrapperVNL : public LinearSystemWrapper typedef std::vector MatrixHolder; /* constructor & destructor */ - LinearSystemWrapperVNL() : LinearSystemWrapper(), m_Matrices(ITK_NULLPTR), m_Vectors(ITK_NULLPTR), m_Solutions(ITK_NULLPTR) + LinearSystemWrapperVNL() : LinearSystemWrapper(), m_Matrices(nullptr), m_Vectors(nullptr), m_Solutions(nullptr) { } - virtual ~LinearSystemWrapperVNL() ITK_OVERRIDE; + ~LinearSystemWrapperVNL() override; /* memory management routines */ - virtual void InitializeMatrix(unsigned int matrixIndex) ITK_OVERRIDE; + void InitializeMatrix(unsigned int matrixIndex) override; - virtual bool IsMatrixInitialized(unsigned int matrixIndex) ITK_OVERRIDE; + bool IsMatrixInitialized(unsigned int matrixIndex) override; - virtual void DestroyMatrix(unsigned int matrixIndex) ITK_OVERRIDE; + void DestroyMatrix(unsigned int matrixIndex) override; - virtual void InitializeVector(unsigned int vectorIndex) ITK_OVERRIDE; + void InitializeVector(unsigned int vectorIndex) override; - virtual bool IsVectorInitialized(unsigned int vectorIndex) ITK_OVERRIDE; + bool IsVectorInitialized(unsigned int vectorIndex) override; - virtual void DestroyVector(unsigned int vectorIndex) ITK_OVERRIDE; + void DestroyVector(unsigned int vectorIndex) override; - virtual void InitializeSolution(unsigned int solutionIndex) ITK_OVERRIDE; + void InitializeSolution(unsigned int solutionIndex) override; - virtual bool IsSolutionInitialized(unsigned int solutionIndex) ITK_OVERRIDE; + bool IsSolutionInitialized(unsigned int solutionIndex) override; - virtual void DestroySolution(unsigned int solutionIndex) ITK_OVERRIDE; + void DestroySolution(unsigned int solutionIndex) override; virtual void SetMaximumNonZeroValuesInMatrix(unsigned int, unsigned int) { } /* assembly & solving routines */ - virtual Float GetMatrixValue(unsigned int i, unsigned int j, - unsigned int matrixIndex) const ITK_OVERRIDE + Float GetMatrixValue(unsigned int i, unsigned int j, + unsigned int matrixIndex) const override { return ( *( ( *m_Matrices )[matrixIndex] ) )(i, j); } - virtual void SetMatrixValue(unsigned int i, unsigned int j, Float value, - unsigned int matrixIndex) ITK_OVERRIDE + void SetMatrixValue(unsigned int i, unsigned int j, Float value, + unsigned int matrixIndex) override { ( *( ( *m_Matrices )[matrixIndex] ) )(i, j) = value; } - virtual void AddMatrixValue(unsigned int i, unsigned int j, Float value, - unsigned int matrixIndex) ITK_OVERRIDE + void AddMatrixValue(unsigned int i, unsigned int j, Float value, + unsigned int matrixIndex) override { ( *( ( *m_Matrices )[matrixIndex] ) )(i, j) += value; } - virtual Float GetVectorValue(unsigned int i, - unsigned int vectorIndex) const ITK_OVERRIDE + Float GetVectorValue(unsigned int i, + unsigned int vectorIndex) const override { return ( *( ( *m_Vectors )[vectorIndex] ) )[i]; } - virtual void SetVectorValue(unsigned int i, Float value, - unsigned int vectorIndex) ITK_OVERRIDE + void SetVectorValue(unsigned int i, Float value, + unsigned int vectorIndex) override { ( *( ( *m_Vectors )[vectorIndex] ) )(i) = value; } - virtual void AddVectorValue(unsigned int i, Float value, - unsigned int vectorIndex) ITK_OVERRIDE + void AddVectorValue(unsigned int i, Float value, + unsigned int vectorIndex) override { ( *( ( *m_Vectors )[vectorIndex] ) )(i) += value; } - virtual Float GetSolutionValue(unsigned int i, unsigned int solutionIndex) const ITK_OVERRIDE; + Float GetSolutionValue(unsigned int i, unsigned int solutionIndex) const override; - virtual void SetSolutionValue(unsigned int i, Float value, - unsigned int solutionIndex) ITK_OVERRIDE + void SetSolutionValue(unsigned int i, Float value, + unsigned int solutionIndex) override { ( *( ( *m_Solutions )[solutionIndex] ) )(i) = value; } - virtual void AddSolutionValue(unsigned int i, Float value, - unsigned int solutionIndex) ITK_OVERRIDE + void AddSolutionValue(unsigned int i, Float value, + unsigned int solutionIndex) override { ( *( ( *m_Solutions )[solutionIndex] ) )(i) += value; } - virtual void Solve(void) ITK_OVERRIDE; + void Solve(void) override; /* matrix & vector manipulation routines */ - virtual void ScaleMatrix(Float scale, unsigned int matrixIndex) ITK_OVERRIDE; + void ScaleMatrix(Float scale, unsigned int matrixIndex) override; - virtual void SwapMatrices(unsigned int matrixIndex1, unsigned int matrixIndex2) ITK_OVERRIDE; + void SwapMatrices(unsigned int matrixIndex1, unsigned int matrixIndex2) override; - virtual void SwapVectors(unsigned int vectorIndex1, unsigned int vectorIndex2) ITK_OVERRIDE; + void SwapVectors(unsigned int vectorIndex1, unsigned int vectorIndex2) override; - virtual void SwapSolutions(unsigned int solutionIndex1, unsigned int solutionIndex2) ITK_OVERRIDE; + void SwapSolutions(unsigned int solutionIndex1, unsigned int solutionIndex2) override; - virtual void CopySolution2Vector(unsigned solutionIndex, unsigned int vectorIndex) ITK_OVERRIDE; + void CopySolution2Vector(unsigned solutionIndex, unsigned int vectorIndex) override; - virtual void CopyVector2Solution(unsigned int vectorIndex, unsigned int solutionIndex) ITK_OVERRIDE; + void CopyVector2Solution(unsigned int vectorIndex, unsigned int solutionIndex) override; - virtual void MultiplyMatrixMatrix(unsigned int resultMatrixIndex, unsigned int leftMatrixIndex, - unsigned int rightMatrixIndex) ITK_OVERRIDE; + void MultiplyMatrixMatrix(unsigned int resultMatrixIndex, unsigned int leftMatrixIndex, + unsigned int rightMatrixIndex) override; - virtual void MultiplyMatrixVector(unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int vectorIndex) ITK_OVERRIDE; + void MultiplyMatrixVector(unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int vectorIndex) override; private: diff --git a/Modules/Numerics/FEM/include/itkFEMLoadBC.h b/Modules/Numerics/FEM/include/itkFEMLoadBC.h index f94e2e08bcd..96580fc02eb 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadBC.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadBC.h @@ -49,7 +49,7 @@ class ITKFEM_EXPORT LoadBC : public Load /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** Default constructor */ LoadBC() : m_DegreeOfFreedom(0), m_Value() @@ -69,7 +69,7 @@ class ITKFEM_EXPORT LoadBC : public Load vnl_vector GetValue() const; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Local DOF number within the Element object. diff --git a/Modules/Numerics/FEM/include/itkFEMLoadBCMFC.h b/Modules/Numerics/FEM/include/itkFEMLoadBCMFC.h index cb3d449754e..909ab738b7d 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadBCMFC.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadBCMFC.h @@ -69,7 +69,7 @@ class ITKFEM_EXPORT LoadBCMFC : public Load /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * \class MFCTerm @@ -162,7 +162,7 @@ class ITKFEM_EXPORT LoadBCMFC : public Load // friend class Solver; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; // private: // FIXME: CrankNicolsonSolver class, which is derived from Solver // class also needs access to Index. diff --git a/Modules/Numerics/FEM/include/itkFEMLoadBase.h b/Modules/Numerics/FEM/include/itkFEMLoadBase.h index 0cd480e3fd3..13bd5a989e9 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadBase.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadBase.h @@ -67,7 +67,7 @@ class ITKFEM_EXPORT Load : public FEMLightObject virtual void SetSolution(Solution::ConstPointer itkNotUsed(ptr)) { } virtual Solution::ConstPointer GetSolution() { - return ITK_NULLPTR; + return nullptr; } /** * Get the element containing the degree of freedom @@ -88,7 +88,7 @@ class ITKFEM_EXPORT Load : public FEMLightObject } protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Pointer to an element in a system that contains the DOF * on which the external force is applied. diff --git a/Modules/Numerics/FEM/include/itkFEMLoadEdge.h b/Modules/Numerics/FEM/include/itkFEMLoadEdge.h index c795e2080d0..348c2afe46a 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadEdge.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadEdge.h @@ -54,7 +54,7 @@ class ITKFEM_EXPORT LoadEdge : public LoadElement /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Set the edge number on which the force is being applied @@ -78,10 +78,10 @@ class ITKFEM_EXPORT LoadEdge : public LoadElement vnl_matrix & GetForce(); /** Apply the load to the specified element */ - virtual void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) ITK_OVERRIDE; + void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) override; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Local number of the edge (face) of the element on which the load acts. diff --git a/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h b/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h index d6eb76a0f69..412ec29c30f 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h @@ -59,7 +59,7 @@ class ITKFEM_EXPORT LoadElement : public Load /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Float type used in Element and derived classes @@ -102,7 +102,7 @@ class ITKFEM_EXPORT LoadElement : public Load virtual void ApplyLoad(Element::ConstPointer , Element::VectorType & ) { /* HACK: This should probably through an execption if it is not intended to be used. */ } protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; void AddNextElementInternal(const Element *e); ElementPointersVectorType m_Element; /** pointers to element objects on which the load acts */ diff --git a/Modules/Numerics/FEM/include/itkFEMLoadGrav.h b/Modules/Numerics/FEM/include/itkFEMLoadGrav.h index a96478d5f42..cbaa202d720 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadGrav.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadGrav.h @@ -52,7 +52,7 @@ class ITKFEM_EXPORT LoadGrav : public LoadElement virtual vnl_vector GetGravitationalForceAtPoint(vnl_vector ) = 0; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; @@ -81,9 +81,9 @@ class ITKFEM_EXPORT LoadGravConst : public LoadGrav /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; - virtual vnl_vector GetGravitationalForceAtPoint(vnl_vector ) ITK_OVERRIDE; + vnl_vector GetGravitationalForceAtPoint(vnl_vector ) override; /** * Set the gravity force that exists at every point @@ -97,10 +97,10 @@ class ITKFEM_EXPORT LoadGravConst : public LoadGrav const vnl_vector & GetForce() const; /** Apply the load to the specified element */ - virtual void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) ITK_OVERRIDE; + void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) override; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; vnl_vector m_GravityForce; }; diff --git a/Modules/Numerics/FEM/include/itkFEMLoadLandmark.h b/Modules/Numerics/FEM/include/itkFEMLoadLandmark.h index 08360f57b3f..29be6e85fca 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadLandmark.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadLandmark.h @@ -53,16 +53,16 @@ class ITKFEM_EXPORT LoadLandmark : public LoadElement /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Methods to access the most recent solution vector */ - virtual void SetSolution(Solution::ConstPointer ptr) ITK_OVERRIDE + void SetSolution(Solution::ConstPointer ptr) override { m_Solution = ptr; } - virtual Solution::ConstPointer GetSolution() ITK_OVERRIDE + Solution::ConstPointer GetSolution() override { return m_Solution; } @@ -213,7 +213,7 @@ class ITKFEM_EXPORT LoadLandmark : public LoadElement m_Target(0), m_Source(0), m_Force(0), - m_Solution(ITK_NULLPTR) + m_Solution(nullptr) { } @@ -223,11 +223,11 @@ class ITKFEM_EXPORT LoadLandmark : public LoadElement double GetEta() const; /** Apply the load to the specified element */ - virtual void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) ITK_OVERRIDE; + void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) override; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Square root of the variance (eta) diff --git a/Modules/Numerics/FEM/include/itkFEMLoadNode.h b/Modules/Numerics/FEM/include/itkFEMLoadNode.h index 359e6280c21..a7985c72603 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadNode.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadNode.h @@ -87,11 +87,11 @@ class ITKFEM_EXPORT LoadNode : public Load /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Point within the element on which the force acts. diff --git a/Modules/Numerics/FEM/include/itkFEMLoadNoisyLandmark.h b/Modules/Numerics/FEM/include/itkFEMLoadNoisyLandmark.h index d0d050f618a..ddaf12e2c1f 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadNoisyLandmark.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadNoisyLandmark.h @@ -174,7 +174,7 @@ class ITKFEM_EXPORT LoadNoisyLandmark : public LoadLandmark this->m_Element.resize(1); } - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: diff --git a/Modules/Numerics/FEM/include/itkFEMLoadPoint.h b/Modules/Numerics/FEM/include/itkFEMLoadPoint.h index 53e25e2d271..923f15fb380 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadPoint.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadPoint.h @@ -50,7 +50,7 @@ class ITKFEM_EXPORT LoadPoint : public LoadElement /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** Default constructor. */ LoadPoint() : @@ -74,11 +74,11 @@ class ITKFEM_EXPORT LoadPoint : public LoadElement /** Apply the load to the specified element. * Modified version from the one in itk::fem::LoadLandmark. */ - virtual void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) ITK_OVERRIDE; + void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) override; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** Point of which the load acts in global the coordinate system. */ vnl_vector m_Point; diff --git a/Modules/Numerics/FEM/include/itkFEMLoadTest.h b/Modules/Numerics/FEM/include/itkFEMLoadTest.h index bffa94b6510..e69e77a6839 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadTest.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadTest.h @@ -52,7 +52,7 @@ class LoadTest : public LoadElement /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const + ::itk::LightObject::Pointer CreateAnother(void) const override { ::itk::LightObject::Pointer smartPtr; Pointer copyPtr = Self::New(); diff --git a/Modules/Numerics/FEM/include/itkFEMMaterialBase.h b/Modules/Numerics/FEM/include/itkFEMMaterialBase.h index 1af6c311fa2..78868cfb95e 100644 --- a/Modules/Numerics/FEM/include/itkFEMMaterialBase.h +++ b/Modules/Numerics/FEM/include/itkFEMMaterialBase.h @@ -62,7 +62,7 @@ class ITKFEM_EXPORT Material : public FEMLightObject protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; }; diff --git a/Modules/Numerics/FEM/include/itkFEMMaterialLinearElasticity.h b/Modules/Numerics/FEM/include/itkFEMMaterialLinearElasticity.h index 34e7d626db4..a8dbcfc1058 100644 --- a/Modules/Numerics/FEM/include/itkFEMMaterialLinearElasticity.h +++ b/Modules/Numerics/FEM/include/itkFEMMaterialLinearElasticity.h @@ -52,7 +52,7 @@ class ITKFEM_EXPORT MaterialLinearElasticity : public Material /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; /** * Default constructor only initializes the members. @@ -121,7 +121,7 @@ class ITKFEM_EXPORT MaterialLinearElasticity : public Material protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /* Data members of MaterialLinearElasticity class */ diff --git a/Modules/Numerics/FEM/include/itkFEMObject.h b/Modules/Numerics/FEM/include/itkFEMObject.h index 3370ceaefdf..122c514454e 100644 --- a/Modules/Numerics/FEM/include/itkFEMObject.h +++ b/Modules/Numerics/FEM/include/itkFEMObject.h @@ -300,8 +300,8 @@ class ITK_TEMPLATE_EXPORT FEMObject : public DataObject protected: /** Constructor for use by New() method. */ FEMObject(); - ~FEMObject() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~FEMObject() override; + void PrintSelf(std::ostream& os, Indent indent) const override; /** * Assign a global freedom numbers to each DOF in a system. diff --git a/Modules/Numerics/FEM/include/itkFEMObject.hxx b/Modules/Numerics/FEM/include/itkFEMObject.hxx index 1116067f99a..cd66f69890a 100644 --- a/Modules/Numerics/FEM/include/itkFEMObject.hxx +++ b/Modules/Numerics/FEM/include/itkFEMObject.hxx @@ -57,10 +57,10 @@ FEMObject ::~FEMObject() { this->Clear(); - this->m_ElementContainer = ITK_NULLPTR; - this->m_NodeContainer = ITK_NULLPTR; - this->m_LoadContainer = ITK_NULLPTR; - this->m_MaterialContainer = ITK_NULLPTR; + this->m_ElementContainer = nullptr; + this->m_NodeContainer = nullptr; + this->m_LoadContainer = nullptr; + this->m_MaterialContainer = nullptr; } template @@ -133,7 +133,7 @@ FEMObject { fem::MaterialLinearElasticity *mCopy = dynamic_cast( Copy->GetMaterial(i).GetPointer() ); - if(mCopy == ITK_NULLPTR) + if(mCopy == nullptr) { itkExceptionMacro(<< "dynamic_cast failed."); } @@ -148,7 +148,7 @@ FEMObject // copy element information int numElements = Copy->GetNumberOfElements(); - itk::LightObject::Pointer a = ITK_NULLPTR; + itk::LightObject::Pointer a = nullptr; for( int i = 0; i < numElements; i++ ) { fem::Element *elCopy = Copy->GetElement(i); @@ -156,7 +156,7 @@ FEMObject a = ObjectFactoryBase::CreateInstance( elCopy->GetNameOfClass() ); a->UnRegister(); fem::Element *o1 = dynamic_cast( a.GetPointer() ); - if(o1 == ITK_NULLPTR) + if(o1 == nullptr) { itkExceptionMacro(<< "dynamic_cast failed."); } @@ -184,7 +184,7 @@ FEMObject if( loadname == "LoadNode" ) { fem::LoadNode *lCopy = dynamic_cast( load ); - if(lCopy == ITK_NULLPTR) + if(lCopy == nullptr) { itkExceptionMacro(<< "dynamic_cast failed."); } @@ -208,7 +208,7 @@ FEMObject else if( loadname == "LoadBC" ) { fem::LoadBC *lCopy = dynamic_cast( load ); - if(lCopy == ITK_NULLPTR) + if(lCopy == nullptr) { itkExceptionMacro(<< "dynamic_cast failed."); } @@ -233,7 +233,7 @@ FEMObject else if( loadname == "LoadBCMFC" ) { fem::LoadBCMFC *lCopy = dynamic_cast(load); - if(lCopy == ITK_NULLPTR) + if(lCopy == nullptr) { itkExceptionMacro(<< "dynamic_cast failed."); } @@ -271,7 +271,7 @@ FEMObject else if( loadname == "LoadEdge" ) { fem::LoadEdge *lCopy = dynamic_cast( load ); - if(lCopy == ITK_NULLPTR) + if(lCopy == nullptr) { itkExceptionMacro(<< "dynamic_cast failed."); } @@ -307,7 +307,7 @@ FEMObject else if( loadname == "LoadGravConst" ) { fem::LoadGravConst *lCopy = dynamic_cast( load ); - if(lCopy == ITK_NULLPTR) + if(lCopy == nullptr) { itkExceptionMacro(<< "dynamic_cast failed."); } @@ -368,7 +368,7 @@ FEMObject for( int l = 0; l < numLoads; l++ ) { LoadBCMFC *l1 = dynamic_cast( this->GetLoad(l).GetPointer() ); - if( l1 != ITK_NULLPTR ) + if( l1 != nullptr ) { // store the index of an LoadBCMFC object for later l1->SetIndex(m_NMFC); @@ -561,7 +561,7 @@ FEMObject return this->m_ElementContainer->GetElement(i).GetPointer(); } } - return ITK_NULLPTR; + return nullptr; } template @@ -601,7 +601,7 @@ FEMObject return this->m_NodeContainer->GetElement(i); } } - return ITK_NULLPTR; + return nullptr; } template @@ -632,7 +632,7 @@ FEMObject return this->m_LoadContainer->GetElement(i); } } - return ITK_NULLPTR; + return nullptr; } template @@ -664,7 +664,7 @@ FEMObject return this->m_MaterialContainer->GetElement(i).GetPointer(); } } - return ITK_NULLPTR; + return nullptr; } template diff --git a/Modules/Numerics/FEM/include/itkFEMObjectSpatialObject.h b/Modules/Numerics/FEM/include/itkFEMObjectSpatialObject.h index 85ec2f7a496..bc424c9c4bd 100644 --- a/Modules/Numerics/FEM/include/itkFEMObjectSpatialObject.h +++ b/Modules/Numerics/FEM/include/itkFEMObjectSpatialObject.h @@ -72,7 +72,7 @@ class ITK_TEMPLATE_EXPORT FEMObjectSpatialObject : public SpatialObject< TDimens /** Returns the latest modified time of the object and its component. */ - ModifiedTimeType GetMTime( void ) const ITK_OVERRIDE; + ModifiedTimeType GetMTime( void ) const override; protected: ITK_DISALLOW_COPY_AND_ASSIGN(FEMObjectSpatialObject); @@ -80,9 +80,9 @@ class ITK_TEMPLATE_EXPORT FEMObjectSpatialObject : public SpatialObject< TDimens FEMObjectPointer m_FEMObject; FEMObjectSpatialObject(); - virtual ~FEMObjectSpatialObject() ITK_OVERRIDE; + ~FEMObjectSpatialObject() override; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; }; diff --git a/Modules/Numerics/FEM/include/itkFEMP.h b/Modules/Numerics/FEM/include/itkFEMP.h index 8409c311f40..3dd9236e1b3 100644 --- a/Modules/Numerics/FEM/include/itkFEMP.h +++ b/Modules/Numerics/FEM/include/itkFEMP.h @@ -76,7 +76,7 @@ class FEMP } else { - m_Data = ITK_NULLPTR; + m_Data = nullptr; } } @@ -95,7 +95,7 @@ class FEMP */ ~FEMP() { - m_Data = ITK_NULLPTR; + m_Data = nullptr; } /** @@ -146,11 +146,11 @@ const FEMP & FEMP::operator=(const FEMP & rhs) /** * First destroy the existing object on the left hand side */ - m_Data = ITK_NULLPTR; + m_Data = nullptr; /** * Then clone the one on the right hand side - * of the expression (if not ITK_NULLPTR). + * of the expression (if not nullptr). */ if( rhs.m_Data ) { @@ -163,7 +163,7 @@ const FEMP & FEMP::operator=(const FEMP & rhs) } else { - m_Data = ITK_NULLPTR; + m_Data = nullptr; } } return *this; diff --git a/Modules/Numerics/FEM/include/itkFEMRobustSolver.h b/Modules/Numerics/FEM/include/itkFEMRobustSolver.h index 5b888be8777..167cd063325 100644 --- a/Modules/Numerics/FEM/include/itkFEMRobustSolver.h +++ b/Modules/Numerics/FEM/include/itkFEMRobustSolver.h @@ -168,14 +168,14 @@ class ITK_TEMPLATE_EXPORT RobustSolver : public Solver * for the matrix and vector storage. */ RobustSolver(); - ~RobustSolver() ITK_OVERRIDE; + ~RobustSolver() override; /** Method invoked by the pipeline in order to trigger the computation of * the registration. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Run the solver and produce a warped FEM object. */ - virtual void RunSolver(void) ITK_OVERRIDE; + void RunSolver(void) override; /** Initialize matrix, vector, solution, interpolation grid, and landmark. */ void Initialization(); diff --git a/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx b/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx index 4973ec79c2f..5059eae483d 100644 --- a/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx +++ b/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx @@ -123,7 +123,7 @@ RobustSolver LoadNoisyLandmark *landmark = dynamic_cast(load.GetPointer()); - itkAssertInDebugAndIgnoreInReleaseMacro(landmark != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(landmark != nullptr); const VectorType & globalPosition = landmark->GetSource(); @@ -142,7 +142,7 @@ RobustSolver const Element * element = this->m_InterpolationGrid->GetPixel(index); // Landmark is inside the mesh - if(element != ITK_NULLPTR) + if(element != nullptr) { landmark->SetContainedElement( element ); @@ -340,7 +340,7 @@ RobustSolver LoadNoisyLandmark *landmark = dynamic_cast(load.GetPointer()); - if(landmark == ITK_NULLPTR) + if(landmark == nullptr) { itkExceptionMacro("Encounter landmark that is not a LoadNoisyLandmark"); } @@ -415,7 +415,7 @@ RobustSolver LoadNoisyLandmark *landmark = dynamic_cast(load.GetPointer()); - itkAssertInDebugAndIgnoreInReleaseMacro(landmark != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(landmark != nullptr); if(!landmark->IsOutlier()) { @@ -517,7 +517,7 @@ RobustSolver for(it = loadVector.begin(); it <= nth; it++) { LoadNoisyLandmark * landmark = dynamic_cast((*it).GetPointer()); - itkAssertInDebugAndIgnoreInReleaseMacro(landmark != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(landmark != nullptr); landmark->SetOutlier(true); } @@ -578,7 +578,7 @@ RobustSolver LoadNoisyLandmark *landmark = dynamic_cast(load.GetPointer()); - if(landmark == ITK_NULLPTR) + if(landmark == nullptr) { itkExceptionMacro("Encounter landmark that is not a LoadNoisyLandmark"); } @@ -709,7 +709,7 @@ RobustSolver LoadNoisyLandmark *landmark = dynamic_cast(load.GetPointer()); - if(landmark == ITK_NULLPTR) + if(landmark == nullptr) { itkExceptionMacro("Encounter landmark that is not a LoadNoisyLandmark"); } @@ -798,7 +798,7 @@ RobustSolver LoadNoisyLandmark *landmark = dynamic_cast(load.GetPointer()); - itkAssertInDebugAndIgnoreInReleaseMacro(landmark != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(landmark != nullptr); if(landmark->IsOutlier()) { @@ -917,7 +917,7 @@ RobustSolver LoadNoisyLandmark *landmark = dynamic_cast(load.GetPointer()); - itkAssertInDebugAndIgnoreInReleaseMacro(landmark != ITK_NULLPTR); + itkAssertInDebugAndIgnoreInReleaseMacro(landmark != nullptr); if(!landmark->IsOutlier()) { @@ -1007,7 +1007,7 @@ RobustSolver this->m_InterpolationGrid->Allocate(); // Initialize all pointers in interpolation grid image to 0 - this->m_InterpolationGrid->FillBuffer(ITK_NULLPTR); + this->m_InterpolationGrid->FillBuffer(nullptr); // Fill the interpolation grid with proper pointers to elements FEMIndexType numberOfElements = this->m_FEMObject->GetNumberOfElements(); diff --git a/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.h b/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.h index 3f1b9c25dc3..32e39b8d536 100644 --- a/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.h +++ b/Modules/Numerics/FEM/include/itkFEMScatteredDataPointSetToImageFilter.h @@ -242,7 +242,7 @@ class ITK_TEMPLATE_EXPORT FEMScatteredDataPointSetToImageFilter: protected: FEMScatteredDataPointSetToImageFilter(); - virtual ~FEMScatteredDataPointSetToImageFilter() ITK_OVERRIDE; + ~FEMScatteredDataPointSetToImageFilter() override; /** Generate 2D/3D rectilinear mesh */ void GenerateRectilinearMesh(); @@ -269,11 +269,11 @@ class ITK_TEMPLATE_EXPORT FEMScatteredDataPointSetToImageFilter: void InitializeLoads(FEMObjectType * femObject); /** Run the solver and call ProduceDeformationField to produce deformation field */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; void ProduceDeformationField(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Numerics/FEM/include/itkFEMSolver.h b/Modules/Numerics/FEM/include/itkFEMSolver.h index 8e4c158e22b..61dfa1d62c9 100644 --- a/Modules/Numerics/FEM/include/itkFEMSolver.h +++ b/Modules/Numerics/FEM/include/itkFEMSolver.h @@ -251,7 +251,7 @@ class ITK_TEMPLATE_EXPORT Solver : public ProcessObject * output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) override; /** Get the output data of this process object. The output of this * function is not valid until an appropriate Update() method has @@ -272,12 +272,12 @@ class ITK_TEMPLATE_EXPORT Solver : public ProcessObject protected: Solver(); - virtual ~Solver() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~Solver() override; + void PrintSelf(std::ostream& os, Indent indent) const override; /** Method invoked by the pipeline in order to trigger the computation of * the registration. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** @@ -316,7 +316,7 @@ class ITK_TEMPLATE_EXPORT Solver : public ProcessObject * Copy the element stiffness matrix into the correct position in the * master stiffess matrix. Since more complex Solver classes may need to * assemble many matrices and may also do some funky stuff to them, this - * function is virtual and can be overriden in a derived solver class. + * function is and can be overriden in a derived solver class. */ virtual void AssembleElementMatrix(Element::Pointer e); diff --git a/Modules/Numerics/FEM/include/itkFEMSolver.hxx b/Modules/Numerics/FEM/include/itkFEMSolver.hxx index ddd805921ba..72149c2e57c 100644 --- a/Modules/Numerics/FEM/include/itkFEMSolver.hxx +++ b/Modules/Numerics/FEM/include/itkFEMSolver.hxx @@ -45,7 +45,7 @@ Solver this->m_NGFN = 0; this->m_NMFC = 0; - this->m_FEMObject = ITK_NULLPTR; + this->m_FEMObject = nullptr; this->m_Origin.Fill( 0.0 ); this->m_Spacing.Fill( 1.0 ); @@ -96,7 +96,7 @@ Solver { if( this->GetNumberOfInputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(0) ); @@ -148,7 +148,7 @@ Solver { if( this->GetNumberOfOutputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(0)); @@ -162,7 +162,7 @@ Solver FEMObjectType* out = dynamic_cast (this->ProcessObject::GetOutput(idx) ); - if( out == ITK_NULLPTR ) + if( out == nullptr ) { itkWarningMacro( << "dynamic_cast to output type failed" ); } @@ -940,7 +940,7 @@ Solver m_InterpolationGrid->Allocate(); // Initialize all pointers in interpolation grid image to 0 - m_InterpolationGrid->FillBuffer(ITK_NULLPTR); + m_InterpolationGrid->FillBuffer(nullptr); FillInterpolationGrid(); } @@ -974,7 +974,7 @@ Solver else { // Return 0, if outside the grid. - return ITK_NULLPTR; + return nullptr; } } diff --git a/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.h b/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.h index ef91d8209fd..7441bc6ca61 100644 --- a/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.h +++ b/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.h @@ -131,7 +131,7 @@ class ITK_TEMPLATE_EXPORT SolverCrankNicolson : public Solver itkGetMacro(Rho, Float); /** Returns the time step used for dynamic problems. */ - virtual Float GetTimeStep(void) const ITK_OVERRIDE + Float GetTimeStep(void) const override { return m_TimeStep; } @@ -141,7 +141,7 @@ class ITK_TEMPLATE_EXPORT SolverCrankNicolson : public Solver * * \param dt New time step. */ - virtual void SetTimeStep(Float dt) ITK_OVERRIDE + void SetTimeStep(Float dt) override { m_TimeStep = dt; } @@ -199,16 +199,16 @@ class ITK_TEMPLATE_EXPORT SolverCrankNicolson : public Solver * Time step and other parameters are also initialized. */ SolverCrankNicolson(); - ~SolverCrankNicolson() ITK_OVERRIDE {} + ~SolverCrankNicolson() override {} /** Method invoked by the pipeline in order to trigger the computation of * the registration. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** * Solve for the displacement vector u at a given time. Update the total solution as well. */ - virtual void RunSolver(void) ITK_OVERRIDE; + void RunSolver(void) override; /** * Helper initialization function before assembly but after generate GFN. diff --git a/Modules/Numerics/FEM/include/itkFEMSolverHyperbolic.h b/Modules/Numerics/FEM/include/itkFEMSolverHyperbolic.h index b7179f84c69..f935ec9393d 100644 --- a/Modules/Numerics/FEM/include/itkFEMSolverHyperbolic.h +++ b/Modules/Numerics/FEM/include/itkFEMSolverHyperbolic.h @@ -62,7 +62,7 @@ class ITK_TEMPLATE_EXPORT SolverHyperbolic : public Solver itkGetMacro(NumberOfIterations, unsigned int); /** Returns the time step used for dynamic problems. */ - virtual Float GetTimeStep(void) const ITK_OVERRIDE + Float GetTimeStep(void) const override { return this->m_TimeStep; } @@ -72,41 +72,41 @@ class ITK_TEMPLATE_EXPORT SolverHyperbolic : public Solver * * \param dt New time step. */ - virtual void SetTimeStep(Float dt) ITK_OVERRIDE + void SetTimeStep(Float dt) override { this->m_TimeStep = dt; } protected: SolverHyperbolic(); - virtual ~SolverHyperbolic() ITK_OVERRIDE {} - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~SolverHyperbolic() override {} + void PrintSelf(std::ostream& os, Indent indent) const override; /** Initialize the linear system wrapper. */ - virtual void InitializeLinearSystemWrapper(void) ITK_OVERRIDE; + void InitializeLinearSystemWrapper(void) override; /** * When assembling the element matrix into master matrix, we * need to assemble the mass matrix too. */ - virtual void AssembleElementMatrix(Element::Pointer e) ITK_OVERRIDE; + void AssembleElementMatrix(Element::Pointer e) override; /** Initialize the storage for all master matrices. */ - virtual void InitializeMatrixForAssembly(unsigned int N) ITK_OVERRIDE; + void InitializeMatrixForAssembly(unsigned int N) override; /** * Combine the M, C and K matrices into one big system of linear * equations. */ - virtual void FinalizeMatrixAfterAssembly( void ) ITK_OVERRIDE; + void FinalizeMatrixAfterAssembly( void ) override; /** Method invoked by the pipeline in order to trigger the computation. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Solve for the displacement vector u at a given time. * Update the total solution as well. */ - virtual void RunSolver(void) ITK_OVERRIDE; + void RunSolver(void) override; /** Solve for the displacement vector u for one iteration. */ void Solve(); diff --git a/Modules/Numerics/FEM/include/itkFEMSpatialObjectReader.h b/Modules/Numerics/FEM/include/itkFEMSpatialObjectReader.h index 9e4a5bee36c..726a2001527 100644 --- a/Modules/Numerics/FEM/include/itkFEMSpatialObjectReader.h +++ b/Modules/Numerics/FEM/include/itkFEMSpatialObjectReader.h @@ -52,7 +52,7 @@ class FEMSpatialObjectReader : public SpatialObjectReader this->m_NumberOfElements.fill( 0 ); this->m_PixelsPerElement.set_size( NDimensions ); this->m_PixelsPerElement.fill( 1 ); - this->m_Material = ITK_NULLPTR; - this->m_Element = ITK_NULLPTR; + this->m_Material = nullptr; + this->m_Element = nullptr; this->ProcessObject::SetNthOutput(0, this->MakeOutput(0) ); } @@ -76,7 +76,7 @@ ImageToRectilinearFEMObjectFilter { if( this->GetNumberOfInputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(0) ); @@ -114,7 +114,7 @@ ImageToRectilinearFEMObjectFilter { if( this->GetNumberOfOutputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(0) ); @@ -131,7 +131,7 @@ ImageToRectilinearFEMObjectFilter FEMObjectType* out = dynamic_cast (this->ProcessObject::GetOutput(idx) ); - if( out == ITK_NULLPTR ) + if( out == nullptr ) { itkWarningMacro( << "dynamic_cast to output type failed" ); } diff --git a/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.h b/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.h index 711cd65ffc8..b2aad4da09a 100644 --- a/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.h +++ b/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.h @@ -68,17 +68,17 @@ class ITK_TEMPLATE_EXPORT MetaFEMObjectConverter : typedef MetaFEMObject FEMObjectMetaObjectType; /** Convert the MetaObject to Spatial Object */ - virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) ITK_OVERRIDE; + SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo) override; /** Convert the SpatialObject to MetaObject */ - virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) ITK_OVERRIDE; + MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject) override; protected: /** Create the specific MetaObject for this class */ - virtual MetaObjectType *CreateMetaObject() ITK_OVERRIDE; + MetaObjectType *CreateMetaObject() override; MetaFEMObjectConverter(); - ~MetaFEMObjectConverter() ITK_OVERRIDE {} + ~MetaFEMObjectConverter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MetaFEMObjectConverter); diff --git a/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx b/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx index 3a1753e2d8e..9582d68cc99 100644 --- a/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx +++ b/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx @@ -52,7 +52,7 @@ MetaFEMObjectConverter ::MetaObjectToSpatialObject(const MetaObjectType * mo) { const MetaFEMObject *FEMmo = dynamic_cast(mo); - if(FEMmo == ITK_NULLPTR) + if(FEMmo == nullptr) { itkExceptionMacro(<< "Can't convert MetaObject to MetaFEMObject"); } diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangular.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangular.cxx index f0c01d93b04..28e4e37fdf7 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangular.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0LinearTriangular.cxx @@ -181,11 +181,11 @@ Element2DC0LinearTriangular ::JacobianDeterminant(const VectorType & pt, const MatrixType *pJ) const { - MatrixType *pJlocal = ITK_NULLPTR; + MatrixType *pJlocal = nullptr; // If Jacobian was not provided, we // need to compute it here - if( pJ == ITK_NULLPTR ) + if( pJ == nullptr ) { pJlocal = new MatrixType(); this->Jacobian(pt, *pJlocal); @@ -204,11 +204,11 @@ void Element2DC0LinearTriangular ::JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ) const { - MatrixType *pJlocal = ITK_NULLPTR; + MatrixType *pJlocal = nullptr; // If Jacobian was not provided, we // need to compute it here - if( pJ == ITK_NULLPTR ) + if( pJ == nullptr ) { pJlocal = new MatrixType(); this->Jacobian(pt, *pJlocal); diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangular.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangular.cxx index 4a7ea761a86..bf460e71264 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangular.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC0QuadraticTriangular.cxx @@ -117,11 +117,11 @@ ::JacobianDeterminant(const VectorType & pt, const MatrixType *pJ) const { // return Superclass::JacobianDeterminant( pt, pJ ); - MatrixType *pJlocal = ITK_NULLPTR; + MatrixType *pJlocal = nullptr; // If Jacobian was not provided, we // need to compute it here - if( pJ == ITK_NULLPTR ) + if( pJ == nullptr ) { pJlocal = new MatrixType(); this->Jacobian(pt, *pJlocal); @@ -140,11 +140,11 @@ void Element2DC0QuadraticTriangular ::JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ) const { - MatrixType *pJlocal = ITK_NULLPTR; + MatrixType *pJlocal = nullptr; // If Jacobian was not provided, we // need to compute it here - if( pJ == ITK_NULLPTR ) + if( pJ == nullptr ) { pJlocal = new MatrixType(); this->Jacobian(pt, *pJlocal); diff --git a/Modules/Numerics/FEM/src/itkFEMElement2DC1Beam.cxx b/Modules/Numerics/FEM/src/itkFEMElement2DC1Beam.cxx index d2d671f9a43..8fa32b84438 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement2DC1Beam.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement2DC1Beam.cxx @@ -39,7 +39,7 @@ ::itk::LightObject::Pointer Element2DC1Beam::CreateAnother(void) const } Element2DC1Beam -::Element2DC1Beam() : Superclass(), m_mat(ITK_NULLPTR) +::Element2DC1Beam() : Superclass(), m_mat(nullptr) { } diff --git a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangular.cxx b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangular.cxx index 8687683ba6a..eab45b8be92 100644 --- a/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangular.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElement3DC0LinearTriangular.cxx @@ -277,11 +277,11 @@ void Element3DC0LinearTriangular ::JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ) const { - MatrixType *pJlocal = ITK_NULLPTR; + MatrixType *pJlocal = nullptr; // If Jacobian was not provided, we // need to compute it here - if( pJ == ITK_NULLPTR ) + if( pJ == nullptr ) { pJlocal = new MatrixType(); this->Jacobian(pt, *pJlocal); diff --git a/Modules/Numerics/FEM/src/itkFEMElementBase.cxx b/Modules/Numerics/FEM/src/itkFEMElementBase.cxx index 05c9ba42596..7dabd73f131 100644 --- a/Modules/Numerics/FEM/src/itkFEMElementBase.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElementBase.cxx @@ -262,11 +262,11 @@ Element::InterpolateSolutionN(const VectorType & pt, const Solution & sol, unsig void Element::Jacobian(const VectorType & pt, MatrixType & J, const MatrixType *pshapeD) const { - MatrixType *pshapeDlocal = ITK_NULLPTR; + MatrixType *pshapeDlocal = nullptr; // If derivatives of shape functions were not provided, we // need to compute them here - if( pshapeD == ITK_NULLPTR ) + if( pshapeD == nullptr ) { pshapeDlocal = new MatrixType(); this->ShapeFunctionDerivatives(pt, *pshapeDlocal); @@ -293,11 +293,11 @@ Element::Jacobian(const VectorType & pt, MatrixType & J, const MatrixType *pshap Element::Float Element::JacobianDeterminant(const VectorType & pt, const MatrixType *pJ) const { - MatrixType *pJlocal = ITK_NULLPTR; + MatrixType *pJlocal = nullptr; // If Jacobian was not provided, we // need to compute it here - if( pJ == ITK_NULLPTR ) + if( pJ == nullptr ) { pJlocal = new MatrixType(); this->Jacobian(pt, *pJlocal); @@ -315,11 +315,11 @@ Element::JacobianDeterminant(const VectorType & pt, const MatrixType *pJ) const void Element::JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ) const { - MatrixType *pJlocal = ITK_NULLPTR; + MatrixType *pJlocal = nullptr; // If Jacobian was not provided, we // need to compute it here - if( pJ == ITK_NULLPTR ) + if( pJ == nullptr ) { pJlocal = new MatrixType(); this->Jacobian(pt, *pJlocal); @@ -337,12 +337,12 @@ void Element::ShapeFunctionGlobalDerivatives(const VectorType & pt, const MatrixType *pJ, const MatrixType *pshapeD) const { - MatrixType *pshapeDlocal = ITK_NULLPTR; - MatrixType *pJlocal = ITK_NULLPTR; + MatrixType *pshapeDlocal = nullptr; + MatrixType *pJlocal = nullptr; // If derivatives of shape functions were not provided, we // need to compute them here - if( pshapeD == ITK_NULLPTR ) + if( pshapeD == nullptr ) { pshapeDlocal = new MatrixType(); this->ShapeFunctionDerivatives(pt, *pshapeDlocal); @@ -351,7 +351,7 @@ void Element::ShapeFunctionGlobalDerivatives(const VectorType & pt, // If Jacobian was not provided, we // need to compute it here - if( pJ == ITK_NULLPTR ) + if( pJ == nullptr ) { pJlocal = new MatrixType(); this->Jacobian(pt, *pJlocal, pshapeD); @@ -464,7 +464,7 @@ void Element::Node::PrintSelf(std::ostream& os, Indent indent) const Material::ConstPointer Element::GetMaterial(void) const { - return ITK_NULLPTR; + return nullptr; } void Element::SetMaterial(Material::ConstPointer) diff --git a/Modules/Numerics/FEM/src/itkFEMFactoryBase.cxx b/Modules/Numerics/FEM/src/itkFEMFactoryBase.cxx index b570416a1a7..9fda59a2c13 100644 --- a/Modules/Numerics/FEM/src/itkFEMFactoryBase.cxx +++ b/Modules/Numerics/FEM/src/itkFEMFactoryBase.cxx @@ -41,7 +41,7 @@ namespace itk { -FEMFactoryBase * FEMFactoryBase::m_Factory = ITK_NULLPTR; +FEMFactoryBase * FEMFactoryBase::m_Factory = nullptr; SimpleFastMutexLock FEMFactoryBase::m_CreationLock; FEMFactoryBase::FEMFactoryBase() diff --git a/Modules/Numerics/FEM/src/itkFEMItpackSparseMatrix.cxx b/Modules/Numerics/FEM/src/itkFEMItpackSparseMatrix.cxx index 4b2190d8a89..5c59f6c417c 100644 --- a/Modules/Numerics/FEM/src/itkFEMItpackSparseMatrix.cxx +++ b/Modules/Numerics/FEM/src/itkFEMItpackSparseMatrix.cxx @@ -33,10 +33,10 @@ ItpackSparseMatrix::ItpackSparseMatrix() m_LEVEL = -1; /* no error messages */ m_NOUT = 0; /* output unit number */ - m_IA = ITK_NULLPTR; - m_JA = ITK_NULLPTR; - m_IWORK = ITK_NULLPTR; - m_A = ITK_NULLPTR; + m_IA = nullptr; + m_JA = nullptr; + m_IWORK = nullptr; + m_A = nullptr; } ItpackSparseMatrix::ItpackSparseMatrix(integer order) @@ -50,10 +50,10 @@ ItpackSparseMatrix::ItpackSparseMatrix(integer order) m_LEVEL = -1; /* no error messages */ m_NOUT = 0; /* output unit number */ - m_IA = ITK_NULLPTR; - m_JA = ITK_NULLPTR; - m_IWORK = ITK_NULLPTR; - m_A = ITK_NULLPTR; + m_IA = nullptr; + m_JA = nullptr; + m_IWORK = nullptr; + m_A = nullptr; } ItpackSparseMatrix::ItpackSparseMatrix(integer order, integer maxNonZeroValues) @@ -67,10 +67,10 @@ ItpackSparseMatrix::ItpackSparseMatrix(integer order, integer maxNonZeroValues) m_LEVEL = -1; /* no error messages */ m_NOUT = 0; /* output unit number */ - m_IA = ITK_NULLPTR; - m_JA = ITK_NULLPTR; - m_IWORK = ITK_NULLPTR; - m_A = ITK_NULLPTR; + m_IA = nullptr; + m_JA = nullptr; + m_IWORK = nullptr; + m_A = nullptr; } void ItpackSparseMatrix::Initialize() @@ -135,10 +135,10 @@ void ItpackSparseMatrix::Clear() m_LEVEL = -1; m_NOUT = 0; - m_IA = ITK_NULLPTR; - m_JA = ITK_NULLPTR; - m_IWORK = ITK_NULLPTR; - m_A = ITK_NULLPTR; + m_IA = nullptr; + m_JA = nullptr; + m_IWORK = nullptr; + m_A = nullptr; } void ItpackSparseMatrix::Finalize() @@ -296,7 +296,7 @@ ItpackSparseMatrix::doublereal * ItpackSparseMatrix::GetA() { if( m_MatrixInitialized == 0 ) { - return ITK_NULLPTR; + return nullptr; } if( m_MatrixFinalized == 0 ) { @@ -310,7 +310,7 @@ ItpackSparseMatrix::integer * ItpackSparseMatrix::GetIA() { if( m_MatrixInitialized == 0 ) { - return ITK_NULLPTR; + return nullptr; } if( m_MatrixFinalized == 0 ) { @@ -324,7 +324,7 @@ ItpackSparseMatrix::integer * ItpackSparseMatrix::GetJA() { if( m_MatrixInitialized == 0 ) { - return ITK_NULLPTR; + return nullptr; } if( m_MatrixFinalized == 0 ) { diff --git a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperDenseVNL.cxx b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperDenseVNL.cxx index b297e5962d1..5e9d9d07519 100644 --- a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperDenseVNL.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperDenseVNL.cxx @@ -25,7 +25,7 @@ namespace fem void LinearSystemWrapperDenseVNL::InitializeMatrix(unsigned int matrixIndex) { // allocate if necessary - if( m_Matrices == ITK_NULLPTR ) + if( m_Matrices == nullptr ) { m_Matrices = new MatrixHolder(m_NumberOfMatrices); } @@ -56,14 +56,14 @@ void LinearSystemWrapperDenseVNL::DestroyMatrix(unsigned int matrixIndex) if( m_Matrices ) { delete ( *m_Matrices )[matrixIndex]; - ( *m_Matrices )[matrixIndex] = ITK_NULLPTR; + ( *m_Matrices )[matrixIndex] = nullptr; } } void LinearSystemWrapperDenseVNL::InitializeVector(unsigned int vectorIndex) { // allocate if necessary - if( m_Vectors == ITK_NULLPTR ) + if( m_Vectors == nullptr ) { m_Vectors = new std::vector *>(m_NumberOfVectors); } @@ -94,14 +94,14 @@ void LinearSystemWrapperDenseVNL::DestroyVector(unsigned int vectorIndex) if( m_Vectors ) { delete ( *m_Vectors )[vectorIndex]; - ( *m_Vectors )[vectorIndex] = ITK_NULLPTR; + ( *m_Vectors )[vectorIndex] = nullptr; } } void LinearSystemWrapperDenseVNL::InitializeSolution(unsigned int solutionIndex) { // allocate if necessary - if( m_Solutions == ITK_NULLPTR ) + if( m_Solutions == nullptr ) { m_Solutions = new std::vector *>(m_NumberOfSolutions); } @@ -132,14 +132,14 @@ void LinearSystemWrapperDenseVNL::DestroySolution(unsigned int solutionIndex) if( m_Solutions ) { delete ( *m_Solutions )[solutionIndex]; - ( *m_Solutions )[solutionIndex] = ITK_NULLPTR; + ( *m_Solutions )[solutionIndex] = nullptr; } } LinearSystemWrapperDenseVNL::Float LinearSystemWrapperDenseVNL::GetSolutionValue(unsigned int i, unsigned int solutionIndex) const { - if( m_Solutions == ITK_NULLPTR ) + if( m_Solutions == nullptr ) { return 0.0; } @@ -166,9 +166,9 @@ void LinearSystemWrapperDenseVNL::Solve(void) /* use functions to make sure that zero based matrix, vector, & index store final system to solve */ /* - if (m_PrimaryMatrixSetupFunction != ITK_NULLPTR) (*m_PrimaryMatrixSetupFunction)(static_cast(this)); - if (m_PrimaryVectorSetupFunction != ITK_NULLPTR) (*m_PrimaryVectorSetupFunction)(static_cast(this)); - if (m_PrimarySolutionSetupFunction != ITK_NULLPTR) (*m_PrimarySolutionSetupFunction)(static_cast(this)); + if (m_PrimaryMatrixSetupFunction != nullptr) (*m_PrimaryMatrixSetupFunction)(static_cast(this)); + if (m_PrimaryVectorSetupFunction != nullptr) (*m_PrimaryVectorSetupFunction)(static_cast(this)); + if (m_PrimarySolutionSetupFunction != nullptr) (*m_PrimarySolutionSetupFunction)(static_cast(this)); */ /** diff --git a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx index fc018135c72..6d99241627f 100644 --- a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx @@ -54,9 +54,9 @@ LinearSystemWrapperItpack::LinearSystemWrapperItpack() m_RPARM[7] = 500.0 * NumericTraits::min(); m_MaximumNonZeroValues = 0; - m_Matrices = ITK_NULLPTR; - m_Vectors = ITK_NULLPTR; - m_Solutions = ITK_NULLPTR; + m_Matrices = nullptr; + m_Vectors = nullptr; + m_Solutions = nullptr; } void LinearSystemWrapperItpack::InitializeMatrix(unsigned int matrixIndex) @@ -86,7 +86,7 @@ void LinearSystemWrapperItpack::InitializeMatrix(unsigned int matrixIndex) } // allocate if necessay - if( m_Matrices == ITK_NULLPTR ) + if( m_Matrices == nullptr ) { m_Matrices = new MatrixHolder(m_NumberOfMatrices); } @@ -135,7 +135,7 @@ void LinearSystemWrapperItpack::InitializeVector(unsigned int vectorIndex) } /* allocate if necessay */ - if( m_Vectors == ITK_NULLPTR ) + if( m_Vectors == nullptr ) { m_Vectors = new VectorHolder(m_NumberOfVectors); } @@ -186,7 +186,7 @@ void LinearSystemWrapperItpack::InitializeSolution(unsigned int solutionIndex) } // allocate if necessay - if( m_Solutions == ITK_NULLPTR ) + if( m_Solutions == nullptr ) { m_Solutions = new VectorHolder(m_NumberOfSolutions); } @@ -251,7 +251,7 @@ void LinearSystemWrapperItpack::DestroyVector(unsigned int vectorIndex) /* delete vector */ delete[] ( *m_Vectors )[vectorIndex]; - ( *m_Vectors )[vectorIndex] = ITK_NULLPTR; + ( *m_Vectors )[vectorIndex] = nullptr; } } @@ -271,7 +271,7 @@ void LinearSystemWrapperItpack::DestroySolution(unsigned int solutionIndex) /* delete vector */ delete[] ( *m_Solutions )[solutionIndex]; - ( *m_Solutions )[solutionIndex] = ITK_NULLPTR; + ( *m_Solutions )[solutionIndex] = nullptr; } } diff --git a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx index 117cfac5aa6..03ea1ccec44 100644 --- a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperVNL.cxx @@ -28,10 +28,10 @@ void LinearSystemWrapperVNL::InitializeMatrix(unsigned int matrixIndex) { // allocate if necessary - if( m_Matrices == ITK_NULLPTR ) + if( m_Matrices == nullptr ) { m_Matrices = new MatrixHolder(m_NumberOfMatrices); - if( m_Matrices == ITK_NULLPTR ) + if( m_Matrices == nullptr ) { itkGenericExceptionMacro(<< "LinearSystemWrapperVNL::InitializeMatrix(): m_Matrices allocation failed."); } @@ -41,7 +41,7 @@ void LinearSystemWrapperVNL::InitializeMatrix(unsigned int matrixIndex) delete ( *m_Matrices )[matrixIndex]; ( *m_Matrices )[matrixIndex] = new MatrixRepresentation( this->GetSystemOrder(), this->GetSystemOrder() ); - if( ( *m_Matrices )[matrixIndex] == ITK_NULLPTR ) + if( ( *m_Matrices )[matrixIndex] == nullptr ) { itkGenericExceptionMacro( << "LinearSystemWrapperVNL::InitializeMatrix(): allocation of (*m_Matrices)[" << matrixIndex << "] failed."); @@ -67,17 +67,17 @@ void LinearSystemWrapperVNL::DestroyMatrix(unsigned int matrixIndex) if( m_Matrices ) { delete ( *m_Matrices )[matrixIndex]; - ( *m_Matrices )[matrixIndex] = ITK_NULLPTR; + ( *m_Matrices )[matrixIndex] = nullptr; } } void LinearSystemWrapperVNL::InitializeVector(unsigned int vectorIndex) { // allocate if necessary - if( m_Vectors == ITK_NULLPTR ) + if( m_Vectors == nullptr ) { m_Vectors = new std::vector *>(m_NumberOfVectors); - if( m_Vectors == ITK_NULLPTR ) + if( m_Vectors == nullptr ) { itkGenericExceptionMacro(<< "InitializeVector(): m_Vectors memory allocation failed."); } @@ -87,7 +87,7 @@ void LinearSystemWrapperVNL::InitializeVector(unsigned int vectorIndex) delete ( *m_Vectors )[vectorIndex]; ( *m_Vectors )[vectorIndex] = new vnl_vector( this->GetSystemOrder() ); - if( ( *m_Vectors )[vectorIndex] == ITK_NULLPTR ) + if( ( *m_Vectors )[vectorIndex] == nullptr ) { itkGenericExceptionMacro(<< "InitializeVector(): allocation of (*m_Vectors)[" << vectorIndex << "] failed."); } @@ -113,17 +113,17 @@ void LinearSystemWrapperVNL::DestroyVector(unsigned int vectorIndex) if( m_Vectors ) { delete ( *m_Vectors )[vectorIndex]; - ( *m_Vectors )[vectorIndex] = ITK_NULLPTR; + ( *m_Vectors )[vectorIndex] = nullptr; } } void LinearSystemWrapperVNL::InitializeSolution(unsigned int solutionIndex) { // allocate if necessary - if( m_Solutions == ITK_NULLPTR ) + if( m_Solutions == nullptr ) { m_Solutions = new std::vector *>(m_NumberOfSolutions); - if( m_Solutions == ITK_NULLPTR ) + if( m_Solutions == nullptr ) { itkGenericExceptionMacro(<< "InitializeSolution(): m_Solutions memory allocation failed."); } @@ -133,7 +133,7 @@ void LinearSystemWrapperVNL::InitializeSolution(unsigned int solutionIndex) delete ( *m_Solutions )[solutionIndex]; ( *m_Solutions )[solutionIndex] = new vnl_vector( this->GetSystemOrder() ); - if( ( *m_Solutions )[solutionIndex] == ITK_NULLPTR ) + if( ( *m_Solutions )[solutionIndex] == nullptr ) { itkGenericExceptionMacro(<< "InitializeSolution(): allocation of (*m_olutions)[" << solutionIndex << "] failed."); } @@ -159,14 +159,14 @@ void LinearSystemWrapperVNL::DestroySolution(unsigned int solutionIndex) if( m_Solutions ) { delete ( *m_Solutions )[solutionIndex]; - ( *m_Solutions )[solutionIndex] = ITK_NULLPTR; + ( *m_Solutions )[solutionIndex] = nullptr; } } LinearSystemWrapperVNL::Float LinearSystemWrapperVNL::GetSolutionValue(unsigned int i, unsigned int SolutionIndex) const { - if( m_Solutions == ITK_NULLPTR ) + if( m_Solutions == nullptr ) { return 0.0; } @@ -191,9 +191,9 @@ void LinearSystemWrapperVNL::Solve(void) /* use functions to make sure that zero based matrix, vector, & index store final system to solve */ /* - if (m_PrimaryMatrixSetupFunction != ITK_NULLPTR) (*m_PrimaryMatrixSetupFunction)(static_cast(this)); - if (m_PrimaryVectorSetupFunction != ITK_NULLPTR) (*m_PrimaryVectorSetupFunction)(static_cast(this)); - if (m_PrimarySolutionSetupFunction != ITK_NULLPTR) (*m_PrimarySolutionSetupFunction)(static_cast(this)); + if (m_PrimaryMatrixSetupFunction != nullptr) (*m_PrimaryMatrixSetupFunction)(static_cast(this)); + if (m_PrimaryVectorSetupFunction != nullptr) (*m_PrimaryVectorSetupFunction)(static_cast(this)); + if (m_PrimarySolutionSetupFunction != nullptr) (*m_PrimarySolutionSetupFunction)(static_cast(this)); */ /* diff --git a/Modules/Numerics/FEM/src/itkFEMLoadLandmark.cxx b/Modules/Numerics/FEM/src/itkFEMLoadLandmark.cxx index 41ce73a223f..9e106aa17b2 100644 --- a/Modules/Numerics/FEM/src/itkFEMLoadLandmark.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLoadLandmark.cxx @@ -62,7 +62,7 @@ Element::ConstPointer LoadLandmark::GetAssignedElement(Element::ArrayType1::Poin } } - return ITK_NULLPTR; + return nullptr; } /** diff --git a/Modules/Numerics/FEM/test/itkFEMElement2DTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement2DTest.cxx index 9d86b7bbe8d..6f00ff85e5a 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement2DTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement2DTest.cxx @@ -94,7 +94,7 @@ int itkFEMElement2DTest(int argc, char *argv[]) femSO->GetFEMObject()->FinalizeMesh(); - double * expectedSolution = ITK_NULLPTR; + double * expectedSolution = nullptr; bool foundError = false; std::string modelFile = itksys::SystemTools::GetFilenameName( argv[1] ); @@ -299,7 +299,7 @@ int itkFEMElement2DTest(int argc, char *argv[]) } else { - if( expectedSolution != ITK_NULLPTR ) + if( expectedSolution != nullptr ) { bool testError = CheckDisplacements1(solver, s, expectedSolution, tolerance); if( testError ) diff --git a/Modules/Numerics/FEM/test/itkFEMElement3DTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement3DTest.cxx index a426efd50c9..8afffe08022 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement3DTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement3DTest.cxx @@ -96,7 +96,7 @@ int itkFEMElement3DTest(int argc, char *argv[]) femSO->GetFEMObject()->FinalizeMesh(); - double * expectedSolution = ITK_NULLPTR; + double * expectedSolution = nullptr; bool foundError = false; std::string modelFile = itksys::SystemTools::GetFilenameName( argv[1] ); @@ -237,7 +237,7 @@ int itkFEMElement3DTest(int argc, char *argv[]) PrintNodalCoordinates1(solver, s); // PrintU(S, s, ); - if( expectedSolution != ITK_NULLPTR ) + if( expectedSolution != nullptr ) { bool testError = CheckDisplacements1(solver, s, expectedSolution, tolerance); if( testError ) @@ -257,7 +257,7 @@ int itkFEMElement3DTest(int argc, char *argv[]) { std::cerr << "ITK exception detected: " << err; std::cout << "Test FAILED" << std::endl; - myScene = ITK_NULLPTR; + myScene = nullptr; return EXIT_FAILURE; } @@ -265,10 +265,10 @@ int itkFEMElement3DTest(int argc, char *argv[]) if( foundError ) { std::cout << "Overall Test : [FAILED]" << std::endl; - myScene = ITK_NULLPTR; + myScene = nullptr; return EXIT_FAILURE; } - myScene = ITK_NULLPTR; + myScene = nullptr; std::cout << "Overall Test : [PASSED]" << std::endl; return EXIT_SUCCESS; } diff --git a/Modules/Numerics/FEM/test/itkFEMElementTest.cxx b/Modules/Numerics/FEM/test/itkFEMElementTest.cxx index d937fd0548a..18bf76dbfc5 100644 --- a/Modules/Numerics/FEM/test/itkFEMElementTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElementTest.cxx @@ -143,7 +143,7 @@ int itkFEMElementTest(int ac, char *av[]) // Open a file handle & associate it with the input file std::string modelFile = itksys::SystemTools::GetFilenameName(fname); - double * expectedSolution = ITK_NULLPTR; + double * expectedSolution = nullptr; double tolerance; f.open(fname, std::ios::binary); @@ -437,7 +437,7 @@ int itkFEMElementTest(int ac, char *av[]) PrintNodalCoordinates(S, s, comment); PrintU(S, s, comment); - if( expectedSolution != ITK_NULLPTR ) + if( expectedSolution != nullptr ) { bool foundError = CheckDisplacements(S, s, comment, expectedSolution, tolerance); if( foundError ) diff --git a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx index 096e42b3832..bcfceba6811 100644 --- a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx +++ b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter2DTest.cxx @@ -167,7 +167,7 @@ int itkImageToRectilinearFEMObjectFilter2DTest(int argc, char *argv[]) ElasticityType * m1 = dynamic_cast( femObject->GetMaterial(0).GetPointer() ); - if ( m1 == ITK_NULLPTR) + if ( m1 == nullptr) { std::cout << " [FAILED]" << std::endl; std::cout << "\tdynamic_cast( femObject->GetMaterial(0).GetPointer() ) failed" << std::endl; diff --git a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx index 0ad2af75346..9f4fd4415b2 100644 --- a/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx +++ b/Modules/Numerics/FEM/test/itkImageToRectilinearFEMObjectFilter3DTest.cxx @@ -171,7 +171,7 @@ int itkImageToRectilinearFEMObjectFilter3DTest(int argc, char *argv[]) ElasticityType * m1 = dynamic_cast( femObject->GetMaterial(0).GetPointer() ); - if ( m1 == ITK_NULLPTR) + if ( m1 == nullptr) { std::cout << " [FAILED]" << std::endl; std::cout << "\tdynamic_cast( femObject->GetMaterial(0).GetPointer() ) failed" << std::endl; diff --git a/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.h b/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.h index e90d0395a6e..f658d566a92 100644 --- a/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.h +++ b/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.h @@ -201,7 +201,7 @@ class ITK_TEMPLATE_EXPORT NarrowBandImageFilterBase: } } - virtual void CopyInputToOutput() ITK_OVERRIDE; + void CopyInputToOutput() override; protected: NarrowBandImageFilterBase() @@ -216,8 +216,8 @@ class ITK_TEMPLATE_EXPORT NarrowBandImageFilterBase: m_Barrier = Barrier::New(); } - virtual ~NarrowBandImageFilterBase() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NarrowBandImageFilterBase() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; NarrowBandPointer m_NarrowBand; @@ -244,17 +244,17 @@ class ITK_TEMPLATE_EXPORT NarrowBandImageFilterBase: * a band, and calls the SplitRegions function of NarrowBand to pre-partition * the band for multi-threading. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** This method check the narrow band state each iteration and reinitialize the narrow band if it is appropriate calling CreateNarrowBand and SplitRegions to pre-partion the band for multi-threading. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** This method allows deallocation of data and further post processing */ - virtual void PostProcessOutput() ITK_OVERRIDE; + void PostProcessOutput() override; /* This function clears all pixels from the narrow band */ void ClearNarrowBand(); @@ -265,7 +265,7 @@ class ITK_TEMPLATE_EXPORT NarrowBandImageFilterBase: /** This is the default, high-level algorithm for calculating finite * difference solutions. It calls virtual methods in its subclasses * to implement the major steps of the algorithm. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /* Variables to control reinitialization */ IdentifierType m_ReinitializationFrequency; @@ -296,7 +296,7 @@ class ITK_TEMPLATE_EXPORT NarrowBandImageFilterBase: * functions. This function is here for compatibility with the * FiniteDifferenceSolver framework. */ - virtual void AllocateUpdateBuffer() ITK_OVERRIDE {} + void AllocateUpdateBuffer() override {} /** This method gives support for a multithread iterative scheme. */ static ITK_THREAD_RETURN_TYPE IterateThreaderCallback(void *arg); @@ -313,7 +313,7 @@ class ITK_TEMPLATE_EXPORT NarrowBandImageFilterBase: const ThreadRegionType & regionToProcess, ThreadIdType threadId); - virtual void ApplyUpdate(const TimeStepType&) ITK_OVERRIDE {} + void ApplyUpdate(const TimeStepType&) override {} /** This method populates m_NarrowBand with changes for each pixel in the * output using the ThreadedCalculateChange() method and a multithreading @@ -321,7 +321,7 @@ class ITK_TEMPLATE_EXPORT NarrowBandImageFilterBase: virtual TimeStepType ThreadedCalculateChange(const ThreadRegionType & regionToProcess, ThreadIdType threadId); - virtual TimeStepType CalculateChange() ITK_OVERRIDE { return 0; } + TimeStepType CalculateChange() override { return 0; } }; } // end namespace itk diff --git a/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx b/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx index 9fab51e6ac0..cbe9700e96a 100644 --- a/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx +++ b/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx @@ -55,7 +55,7 @@ namespace itk this->SetDifferenceFunction(m_Function); } - virtual bool Halt () ITK_OVERRIDE + bool Halt () override { if (this->GetElapsedIterations() == 20) { @@ -67,7 +67,7 @@ namespace itk } } - virtual void CreateNarrowBand() ITK_OVERRIDE + void CreateNarrowBand() override { //Create a band typename ImageType::SizeType sz= this->GetInput()->GetRequestedRegion().GetSize(); diff --git a/Modules/Numerics/NeuralNetworks/include/itkBackPropagationLayer.h b/Modules/Numerics/NeuralNetworks/include/itkBackPropagationLayer.h index 60dd60b1a39..bc9b8cf5c9a 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkBackPropagationLayer.h +++ b/Modules/Numerics/NeuralNetworks/include/itkBackPropagationLayer.h @@ -60,31 +60,31 @@ class ITK_TEMPLATE_EXPORT BackPropagationLayer : public LayerBase typedef Array InternalVectorType; - virtual OutputType Evaluate(const ErrorVectorType&) const ITK_OVERRIDE = 0; + OutputType Evaluate(const ErrorVectorType&) const override = 0; virtual InternalVectorType EvaluateDerivative(const ErrorVectorType&) const = 0; protected: ErrorFunctionBase(){}; - ~ErrorFunctionBase() ITK_OVERRIDE {}; + ~ErrorFunctionBase() override {}; private: diff --git a/Modules/Numerics/NeuralNetworks/include/itkGaussianRadialBasisFunction.h b/Modules/Numerics/NeuralNetworks/include/itkGaussianRadialBasisFunction.h index 7ffb8c10dcc..54551b299b5 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkGaussianRadialBasisFunction.h +++ b/Modules/Numerics/NeuralNetworks/include/itkGaussianRadialBasisFunction.h @@ -50,18 +50,18 @@ class ITK_TEMPLATE_EXPORT GaussianRadialBasisFunction : public RadialBasisFuncti itkNewMacro(Self); /** Evaluate at the specified input position */ - virtual ScalarType Evaluate(const ScalarType& input) const ITK_OVERRIDE; + ScalarType Evaluate(const ScalarType& input) const override; - virtual ScalarType EvaluateDerivative(const ScalarType& dist,const ArrayType& input, - char mode,int element_id=0) const ITK_OVERRIDE; + ScalarType EvaluateDerivative(const ScalarType& dist,const ArrayType& input, + char mode,int element_id=0) const override; protected: GaussianRadialBasisFunction(); - virtual ~GaussianRadialBasisFunction() ITK_OVERRIDE; + ~GaussianRadialBasisFunction() override; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; }; diff --git a/Modules/Numerics/NeuralNetworks/include/itkIdentityTransferFunction.h b/Modules/Numerics/NeuralNetworks/include/itkIdentityTransferFunction.h index bc79385db5b..e7f3e60726b 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkIdentityTransferFunction.h +++ b/Modules/Numerics/NeuralNetworks/include/itkIdentityTransferFunction.h @@ -49,18 +49,18 @@ class ITK_TEMPLATE_EXPORT IdentityTransferFunction : public TransferFunctionBase /** Evaluate at the specified input position */ - virtual ScalarType Evaluate(const ScalarType& input) const ITK_OVERRIDE; + ScalarType Evaluate(const ScalarType& input) const override; /** Evaluate the derivative at the specified input position */ - virtual ScalarType EvaluateDerivative(const ScalarType& input) const ITK_OVERRIDE; + ScalarType EvaluateDerivative(const ScalarType& input) const override; protected: IdentityTransferFunction(); - virtual ~IdentityTransferFunction() ITK_OVERRIDE; + ~IdentityTransferFunction() override; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; };//class diff --git a/Modules/Numerics/NeuralNetworks/include/itkInputFunctionBase.h b/Modules/Numerics/NeuralNetworks/include/itkInputFunctionBase.h index b3a328c39cd..7c8de4ac6d0 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkInputFunctionBase.h +++ b/Modules/Numerics/NeuralNetworks/include/itkInputFunctionBase.h @@ -51,17 +51,17 @@ class InputFunctionBase : public FunctionBase typedef TTargetVector OutputType; /** Evaluate at the specified input position */ - virtual OutputType Evaluate(const InputVectorType& input) const ITK_OVERRIDE = 0; + OutputType Evaluate(const InputVectorType& input) const override = 0; virtual void SetSize(unsigned int) = 0; protected: InputFunctionBase() {}; - ~InputFunctionBase() ITK_OVERRIDE {}; + ~InputFunctionBase() override {}; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE + void PrintSelf( std::ostream& os, Indent indent ) const override { os << indent << "InputFunctionBase(" << this << ")" << std::endl; Superclass::PrintSelf( os, indent ); diff --git a/Modules/Numerics/NeuralNetworks/include/itkIterativeSupervisedTrainingFunction.h b/Modules/Numerics/NeuralNetworks/include/itkIterativeSupervisedTrainingFunction.h index b90350a1447..ff105deacff 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkIterativeSupervisedTrainingFunction.h +++ b/Modules/Numerics/NeuralNetworks/include/itkIterativeSupervisedTrainingFunction.h @@ -51,17 +51,17 @@ class ITK_TEMPLATE_EXPORT IterativeSupervisedTrainingFunction : public TrainingF void SetNumOfIterations(SizeValueType i); - virtual void Train(NetworkType* net, TSample* samples, TTargetVector* targets) ITK_OVERRIDE; + void Train(NetworkType* net, TSample* samples, TTargetVector* targets) override; itkSetMacro(Threshold, ScalarType); protected: IterativeSupervisedTrainingFunction(); - virtual ~IterativeSupervisedTrainingFunction() ITK_OVERRIDE{}; + ~IterativeSupervisedTrainingFunction() override{}; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; ScalarType m_Threshold; bool m_Stop; //stop condition diff --git a/Modules/Numerics/NeuralNetworks/include/itkLayerBase.h b/Modules/Numerics/NeuralNetworks/include/itkLayerBase.h index e32a0693415..d7fb2969a4c 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkLayerBase.h +++ b/Modules/Numerics/NeuralNetworks/include/itkLayerBase.h @@ -139,10 +139,10 @@ class ITK_TEMPLATE_EXPORT LayerBase : public LightProcessObject protected: LayerBase(); - ~LayerBase() ITK_OVERRIDE; + ~LayerBase() override; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; LayerTypeCode m_LayerTypeCode; //input, hidden, output unsigned int m_LayerId; diff --git a/Modules/Numerics/NeuralNetworks/include/itkLayerBase.hxx b/Modules/Numerics/NeuralNetworks/include/itkLayerBase.hxx index f8811a5a2d0..4bf4d22f14c 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkLayerBase.hxx +++ b/Modules/Numerics/NeuralNetworks/include/itkLayerBase.hxx @@ -34,10 +34,10 @@ LayerBase m_NumberOfNodes = 0; m_LayerId = INVALID_LAYER_ID; m_LayerTypeCode = INVALIDLAYER; - m_InputWeightSet = ITK_NULLPTR; - m_OutputWeightSet = ITK_NULLPTR; - m_ActivationFunction = ITK_NULLPTR; - m_NodeInputFunction = ITK_NULLPTR; + m_InputWeightSet = nullptr; + m_OutputWeightSet = nullptr; + m_ActivationFunction = nullptr; + m_NodeInputFunction = nullptr; } template diff --git a/Modules/Numerics/NeuralNetworks/include/itkLearningFunctionBase.h b/Modules/Numerics/NeuralNetworks/include/itkLearningFunctionBase.h index d036d36b907..27fa8ae18ac 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkLearningFunctionBase.h +++ b/Modules/Numerics/NeuralNetworks/include/itkLearningFunctionBase.h @@ -55,10 +55,10 @@ class LearningFunctionBase : public LightProcessObject protected: LearningFunctionBase() {}; - ~LearningFunctionBase() ITK_OVERRIDE {}; + ~LearningFunctionBase() override {}; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE + void PrintSelf( std::ostream& os, Indent indent ) const override { Superclass::PrintSelf( os, indent ); os << indent << "LearningFunctionBase(" << this << ")" << std::endl; diff --git a/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.h b/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.h index e89e864fcfa..36656ace881 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.h +++ b/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.h @@ -51,18 +51,18 @@ class ITK_TEMPLATE_EXPORT LogSigmoidTransferFunction : public TransferFunctionBa itkNewMacro(Self); /** Evaluate at the specified input position */ - virtual TScalar Evaluate(const ScalarType& input) const ITK_OVERRIDE; + TScalar Evaluate(const ScalarType& input) const override; /** Evaluate the derivative at the specified input position */ - virtual TScalar EvaluateDerivative(const ScalarType& input) const ITK_OVERRIDE; + TScalar EvaluateDerivative(const ScalarType& input) const override; protected: LogSigmoidTransferFunction(); - virtual ~LogSigmoidTransferFunction() ITK_OVERRIDE; + ~LogSigmoidTransferFunction() override; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; }; } // end namespace Statistics diff --git a/Modules/Numerics/NeuralNetworks/include/itkMultilayerNeuralNetworkBase.h b/Modules/Numerics/NeuralNetworks/include/itkMultilayerNeuralNetworkBase.h index e6fd8d4ca29..7cf4465ff89 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkMultilayerNeuralNetworkBase.h +++ b/Modules/Numerics/NeuralNetworks/include/itkMultilayerNeuralNetworkBase.h @@ -99,10 +99,10 @@ class ITK_TEMPLATE_EXPORT MultilayerNeuralNetworkBase : public NeuralNetworkObje void SetLearningFunction(LearningFunctionInterfaceType* f); - virtual NetworkOutputType GenerateOutput(TMeasurementVector samplevector) ITK_OVERRIDE; + NetworkOutputType GenerateOutput(TMeasurementVector samplevector) override; - virtual void BackwardPropagate(NetworkOutputType errors) ITK_OVERRIDE; - virtual void UpdateWeights(ValueType) ITK_OVERRIDE; + void BackwardPropagate(NetworkOutputType errors) override; + void UpdateWeights(ValueType) override; void SetLearningRule(LearningFunctionInterfaceType*); @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT MultilayerNeuralNetworkBase : public NeuralNetworkObje protected: MultilayerNeuralNetworkBase(); - ~MultilayerNeuralNetworkBase() ITK_OVERRIDE; + ~MultilayerNeuralNetworkBase() override; LayerVectorType m_Layers; WeightVectorType m_Weights; @@ -126,7 +126,7 @@ class ITK_TEMPLATE_EXPORT MultilayerNeuralNetworkBase : public NeuralNetworkObje int m_NumOfWeightSets; #endif /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; }; } // end namespace Statistics diff --git a/Modules/Numerics/NeuralNetworks/include/itkNeuralNetworkObject.h b/Modules/Numerics/NeuralNetworks/include/itkNeuralNetworkObject.h index 2ffe02e8342..177a9fd752e 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkNeuralNetworkObject.h +++ b/Modules/Numerics/NeuralNetworks/include/itkNeuralNetworkObject.h @@ -59,10 +59,10 @@ class ITK_TEMPLATE_EXPORT NeuralNetworkObject : public DataObject protected: NeuralNetworkObject(); - virtual ~NeuralNetworkObject() ITK_OVERRIDE; + ~NeuralNetworkObject() override; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; ValueType m_LearningRate; diff --git a/Modules/Numerics/NeuralNetworks/include/itkOneHiddenLayerBackPropagationNeuralNetwork.h b/Modules/Numerics/NeuralNetworks/include/itkOneHiddenLayerBackPropagationNeuralNetwork.h index d2d59cdd6bd..fa631c05fd5 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkOneHiddenLayerBackPropagationNeuralNetwork.h +++ b/Modules/Numerics/NeuralNetworks/include/itkOneHiddenLayerBackPropagationNeuralNetwork.h @@ -74,7 +74,7 @@ class ITK_TEMPLATE_EXPORT OneHiddenLayerBackPropagationNeuralNetwork : //Add the layers to the network. // 1 input, 1 hidden, 1 output - void Initialize() ITK_OVERRIDE; + void Initialize() override; itkSetMacro(NumOfInputNodes, unsigned int); itkGetConstReferenceMacro(NumOfInputNodes, unsigned int); @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT OneHiddenLayerBackPropagationNeuralNetwork : itkSetMacro(OutputLayerBias, ValueType); itkGetConstReferenceMacro(OutputLayerBias, ValueType); - virtual NetworkOutputType GenerateOutput(TMeasurementVector samplevector) ITK_OVERRIDE; + NetworkOutputType GenerateOutput(TMeasurementVector samplevector) override; void SetInputFunction(InputFunctionInterfaceType* f); void SetInputTransferFunction(TransferFunctionInterfaceType* f); @@ -113,10 +113,10 @@ class ITK_TEMPLATE_EXPORT OneHiddenLayerBackPropagationNeuralNetwork : protected: OneHiddenLayerBackPropagationNeuralNetwork(); - virtual ~OneHiddenLayerBackPropagationNeuralNetwork() ITK_OVERRIDE {}; + ~OneHiddenLayerBackPropagationNeuralNetwork() override {}; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; private: diff --git a/Modules/Numerics/NeuralNetworks/include/itkQuickPropLearningRule.h b/Modules/Numerics/NeuralNetworks/include/itkQuickPropLearningRule.h index 8e354105ad5..1acf6349c44 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkQuickPropLearningRule.h +++ b/Modules/Numerics/NeuralNetworks/include/itkQuickPropLearningRule.h @@ -56,8 +56,8 @@ class ITK_TEMPLATE_EXPORT QuickPropLearningRule : public LearningFunctionBase typedef Array ArrayType; ///** Evaluate at the specified input position */ - virtual ScalarType Evaluate(const ScalarType& input) const ITK_OVERRIDE =0; + ScalarType Evaluate(const ScalarType& input) const override =0; /** Evaluate the derivative at the specified input position */ virtual ScalarType EvaluateDerivative(const ScalarType& dist, const ArrayType& input, @@ -67,10 +67,10 @@ class RadialBasisFunctionBase : public FunctionBase { m_Radius = 0; } - ~RadialBasisFunctionBase() ITK_OVERRIDE {}; + ~RadialBasisFunctionBase() override {}; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE + void PrintSelf( std::ostream& os, Indent indent ) const override { os << indent << "RadialBasisFunctionBase(" << this << ")" << std::endl; Superclass::PrintSelf( os, indent ); diff --git a/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.h b/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.h index 46620f5c291..ee37aeac1e5 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.h +++ b/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.h @@ -61,18 +61,18 @@ class ITK_TEMPLATE_EXPORT SigmoidTransferFunction : public TransferFunctionBase< itkGetMacro(OutputMaximum,ScalarType); /** Evaluate at the specified input position */ - virtual ScalarType Evaluate(const ScalarType& input) const ITK_OVERRIDE; + ScalarType Evaluate(const ScalarType& input) const override; /** Evaluate the derivative at the specified input position */ - virtual ScalarType EvaluateDerivative(const ScalarType& input) const ITK_OVERRIDE; + ScalarType EvaluateDerivative(const ScalarType& input) const override; protected: SigmoidTransferFunction(); - virtual ~SigmoidTransferFunction() ITK_OVERRIDE; + ~SigmoidTransferFunction() override; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; private: diff --git a/Modules/Numerics/NeuralNetworks/include/itkSquaredDifferenceErrorFunction.h b/Modules/Numerics/NeuralNetworks/include/itkSquaredDifferenceErrorFunction.h index d9833e5cd77..32dd5d8ecd7 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkSquaredDifferenceErrorFunction.h +++ b/Modules/Numerics/NeuralNetworks/include/itkSquaredDifferenceErrorFunction.h @@ -53,17 +53,17 @@ class ITK_TEMPLATE_EXPORT SquaredDifferenceErrorFunction : public ErrorFunctionB itkNewMacro(Self); /** Evaluate at the specified Error position */ - virtual ScalarType Evaluate(const TMeasurementVector& Errors) const ITK_OVERRIDE; + ScalarType Evaluate(const TMeasurementVector& Errors) const override; /** Evaluate derivatives */ - virtual InternalVectorType EvaluateDerivative(const TMeasurementVector& Errors) const ITK_OVERRIDE; + InternalVectorType EvaluateDerivative(const TMeasurementVector& Errors) const override; protected: SquaredDifferenceErrorFunction(); - virtual ~SquaredDifferenceErrorFunction() ITK_OVERRIDE; + ~SquaredDifferenceErrorFunction() override; - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SquaredDifferenceErrorFunction); diff --git a/Modules/Numerics/NeuralNetworks/include/itkSumInputFunction.h b/Modules/Numerics/NeuralNetworks/include/itkSumInputFunction.h index 2251ebc6e2d..62c720c7c57 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkSumInputFunction.h +++ b/Modules/Numerics/NeuralNetworks/include/itkSumInputFunction.h @@ -50,19 +50,19 @@ class ITK_TEMPLATE_EXPORT SumInputFunction : public InputFunctionBase { m_PerformanceFunction = DefaultPerformanceType::New(); m_Iterations = 0; - m_TrainingSamples = ITK_NULLPTR; - m_SampleTargets = ITK_NULLPTR; + m_TrainingSamples = nullptr; + m_SampleTargets = nullptr; m_LearningRate = 1.0; } diff --git a/Modules/Numerics/NeuralNetworks/include/itkTransferFunctionBase.h b/Modules/Numerics/NeuralNetworks/include/itkTransferFunctionBase.h index 058076df6f9..5fd3ba9f32f 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkTransferFunctionBase.h +++ b/Modules/Numerics/NeuralNetworks/include/itkTransferFunctionBase.h @@ -53,17 +53,17 @@ class TransferFunctionBase : public FunctionBase typedef Array ArrayType; /** Evaluate at the specified input position */ - virtual OutputType Evaluate(const InputType& input) const ITK_OVERRIDE = 0; + OutputType Evaluate(const InputType& input) const override = 0; /** Evaluate the derivative at the specified input position */ virtual OutputType EvaluateDerivative(const InputType& input) const = 0; protected: TransferFunctionBase() {}; - ~TransferFunctionBase() ITK_OVERRIDE {}; + ~TransferFunctionBase() override {}; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE + void PrintSelf( std::ostream& os, Indent indent ) const override { os << indent << "TransferFunctionBase(" << this << ")" << std::endl; Superclass::PrintSelf( os, indent ); diff --git a/Modules/Numerics/NeuralNetworks/include/itkTwoHiddenLayerBackPropagationNeuralNetwork.h b/Modules/Numerics/NeuralNetworks/include/itkTwoHiddenLayerBackPropagationNeuralNetwork.h index ee02088928b..fac3b3316d7 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkTwoHiddenLayerBackPropagationNeuralNetwork.h +++ b/Modules/Numerics/NeuralNetworks/include/itkTwoHiddenLayerBackPropagationNeuralNetwork.h @@ -72,7 +72,7 @@ class ITK_TEMPLATE_EXPORT TwoHiddenLayerBackPropagationNeuralNetwork : //Add the layers to the network. // 1 input, 2 hidden, 1 output - void Initialize() ITK_OVERRIDE; + void Initialize() override; itkSetMacro(NumOfInputNodes, unsigned int); itkGetConstReferenceMacro(NumOfInputNodes, unsigned int); @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT TwoHiddenLayerBackPropagationNeuralNetwork : itkSetMacro(OutputLayerBias, ValueType); itkGetConstReferenceMacro(OutputLayerBias, ValueType); - virtual NetworkOutputType GenerateOutput(TMeasurementVector samplevector) ITK_OVERRIDE; + NetworkOutputType GenerateOutput(TMeasurementVector samplevector) override; void SetInputFunction(InputFunctionInterfaceType* f); void SetInputTransferFunction(TransferFunctionInterfaceType* f); @@ -114,10 +114,10 @@ class ITK_TEMPLATE_EXPORT TwoHiddenLayerBackPropagationNeuralNetwork : protected: TwoHiddenLayerBackPropagationNeuralNetwork(); - virtual ~TwoHiddenLayerBackPropagationNeuralNetwork() ITK_OVERRIDE {}; + ~TwoHiddenLayerBackPropagationNeuralNetwork() override {}; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; private: diff --git a/Modules/Numerics/NeuralNetworks/include/itkWeightSetBase.h b/Modules/Numerics/NeuralNetworks/include/itkWeightSetBase.h index afe0b76253f..f910d34e81f 100644 --- a/Modules/Numerics/NeuralNetworks/include/itkWeightSetBase.h +++ b/Modules/Numerics/NeuralNetworks/include/itkWeightSetBase.h @@ -122,10 +122,10 @@ class ITK_TEMPLATE_EXPORT WeightSetBase : public LightProcessObject protected: WeightSetBase(); - ~WeightSetBase() ITK_OVERRIDE; + ~WeightSetBase() override; /** Method to print the object. */ - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; typename RandomVariateGeneratorType::Pointer m_RandomGenerator; diff --git a/Modules/Numerics/NeuralNetworks/test/QPropXORTest1.cxx b/Modules/Numerics/NeuralNetworks/test/QPropXORTest1.cxx index e58b4313abe..48d56e4ad8f 100644 --- a/Modules/Numerics/NeuralNetworks/test/QPropXORTest1.cxx +++ b/Modules/Numerics/NeuralNetworks/test/QPropXORTest1.cxx @@ -40,7 +40,7 @@ QPropXORTest1(int argc, char* argv[]) int num_hidden_nodes = 2; int num_output_nodes = 1; - srand(time(ITK_NULLPTR)); + srand(time(nullptr)); typedef itk::Array MeasurementVectorType; typedef itk::Array TargetVectorType; diff --git a/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h b/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h index bde2a818824..77e9f68999b 100644 --- a/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h @@ -84,10 +84,10 @@ class ITKOptimizers_EXPORT AmoebaOptimizer: typedef vnl_vector< double > InternalParametersType; /** Start optimization with an initial value. */ - virtual void StartOptimization(void) ITK_OVERRIDE; + void StartOptimization(void) override; /** Plug in a Cost Function into the optimizer */ - virtual void SetCostFunction(SingleValuedCostFunction *costFunction) ITK_OVERRIDE; + void SetCostFunction(SingleValuedCostFunction *costFunction) override; /** Set/Get the maximum number of iterations. The optimization algorithm will * terminate after the maximum number of iterations has been reached. @@ -138,7 +138,7 @@ class ITKOptimizers_EXPORT AmoebaOptimizer: itkGetConstMacro(FunctionConvergenceTolerance, double); /** Report the reason for stopping. */ - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; /** Return Current Value */ MeasureType GetValue() const; @@ -148,8 +148,8 @@ class ITKOptimizers_EXPORT AmoebaOptimizer: protected: AmoebaOptimizer(); - virtual ~AmoebaOptimizer() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~AmoebaOptimizer() override; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType; diff --git a/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h b/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h index c2a495b47a4..815beff381a 100644 --- a/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h @@ -58,10 +58,10 @@ class ITKOptimizers_EXPORT ConjugateGradientOptimizer: vnl_conjugate_gradient * GetOptimizer(); /** Start optimization with an initial value. */ - virtual void StartOptimization(void) ITK_OVERRIDE; + void StartOptimization(void) override; /** Plug in a Cost Function into the optimizer */ - virtual void SetCostFunction(SingleValuedCostFunction *costFunction) ITK_OVERRIDE; + void SetCostFunction(SingleValuedCostFunction *costFunction) override; /** Return the number of iterations performed so far */ SizeValueType GetNumberOfIterations() const; @@ -73,7 +73,7 @@ class ITKOptimizers_EXPORT ConjugateGradientOptimizer: protected: ConjugateGradientOptimizer(); - virtual ~ConjugateGradientOptimizer() ITK_OVERRIDE; + ~ConjugateGradientOptimizer() override; typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType; diff --git a/Modules/Numerics/Optimizers/include/itkCostFunction.h b/Modules/Numerics/Optimizers/include/itkCostFunction.h index 75663fa3e82..c4314c7698d 100644 --- a/Modules/Numerics/Optimizers/include/itkCostFunction.h +++ b/Modules/Numerics/Optimizers/include/itkCostFunction.h @@ -57,8 +57,8 @@ class ITK_TEMPLATE_EXPORT CostFunctionTemplate:public Object protected: CostFunctionTemplate() {} - virtual ~CostFunctionTemplate() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CostFunctionTemplate() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CostFunctionTemplate); diff --git a/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h b/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h index bf77cccd546..1b3b725a758 100644 --- a/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h +++ b/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h @@ -75,10 +75,10 @@ class ITKOptimizers_EXPORT CumulativeGaussianCostFunction:public MultipleValuedC /** Not necessary for this optimizer. */ void GetDerivative( const ParametersType & itkNotUsed(parameters), - DerivativeType & itkNotUsed(derivative) ) const ITK_OVERRIDE {} + DerivativeType & itkNotUsed(derivative) ) const override {} /** Return the values evaluated for the given parameters. */ - virtual MeasureType GetValue(const ParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const ParametersType & parameters) const override; /** Return a pointer of values evaluated for the given parameters. */ MeasureType * GetValuePointer(ParametersType & parameters); @@ -90,10 +90,10 @@ class ITKOptimizers_EXPORT CumulativeGaussianCostFunction:public MultipleValuedC double EvaluateCumulativeGaussian(double argument) const; /** Get the SpaceDimension. */ - virtual unsigned int GetNumberOfParameters() const ITK_OVERRIDE; + unsigned int GetNumberOfParameters() const override; /** Get the number Range Dimension. */ - virtual unsigned int GetNumberOfValues() const ITK_OVERRIDE; + unsigned int GetNumberOfValues() const override; /** Initialize the arrays. */ void Initialize(unsigned int rangeDimension); @@ -103,9 +103,9 @@ class ITKOptimizers_EXPORT CumulativeGaussianCostFunction:public MultipleValuedC protected: CumulativeGaussianCostFunction(); - virtual ~CumulativeGaussianCostFunction() ITK_OVERRIDE; + ~CumulativeGaussianCostFunction() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h b/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h index e1596f2838f..1a0aa3ce0f7 100644 --- a/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h @@ -84,18 +84,18 @@ class ITKOptimizers_EXPORT CumulativeGaussianOptimizer: void SetDataArray(MeasureType *dataArray); /** Start the optimizer. */ - virtual void StartOptimization() ITK_OVERRIDE; + void StartOptimization() override; /** Print an array. */ void PrintArray(MeasureType *array); /** Report the reason for stopping. */ - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; protected: CumulativeGaussianOptimizer(); - virtual ~CumulativeGaussianOptimizer() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CumulativeGaussianOptimizer() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Numerics/Optimizers/include/itkExhaustiveOptimizer.h b/Modules/Numerics/Optimizers/include/itkExhaustiveOptimizer.h index edf444882b4..1766073a6ce 100644 --- a/Modules/Numerics/Optimizers/include/itkExhaustiveOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkExhaustiveOptimizer.h @@ -93,7 +93,7 @@ class ITKOptimizers_EXPORT ExhaustiveOptimizer: /** Run-time type information (and related methods). */ itkTypeMacro(ExhaustiveOptimizer, SingleValuedNonLinearOptimizer); - virtual void StartOptimization(void) ITK_OVERRIDE; + void StartOptimization(void) override; void StartWalking(); @@ -114,12 +114,12 @@ class ITKOptimizers_EXPORT ExhaustiveOptimizer: itkGetConstReferenceMacro(MaximumNumberOfIterations, SizeValueType); /** Get the reason for termination */ - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; protected: ExhaustiveOptimizer(); - virtual ~ExhaustiveOptimizer() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ExhaustiveOptimizer() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Advance to the next grid position. */ void AdvanceOneStep(); diff --git a/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h b/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h index f66b8d83f61..430be253a21 100644 --- a/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h @@ -74,7 +74,7 @@ class ITKOptimizers_EXPORT FRPROptimizer: itkGetConstMacro(UseUnitLengthGradient, bool); /** Start optimization. */ - virtual void StartOptimization() ITK_OVERRIDE; + void StartOptimization() override; /** Set it to the Fletch-Reeves optimizer */ void SetToFletchReeves(); @@ -84,9 +84,9 @@ class ITKOptimizers_EXPORT FRPROptimizer: protected: FRPROptimizer(); - virtual ~FRPROptimizer() ITK_OVERRIDE; + ~FRPROptimizer() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Get the value of the n-dimensional cost function at this scalar step * distance along the current line direction from the current line origin. diff --git a/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h b/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h index 2046127448f..fe76f105249 100644 --- a/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h @@ -88,7 +88,7 @@ class ITKOptimizers_EXPORT GradientDescentOptimizer: virtual void AdvanceOneStep(); /** Start optimization. */ - virtual void StartOptimization(void) ITK_OVERRIDE; + void StartOptimization(void) override; /** Resume previously stopped optimization with current parameters * \sa StopOptimization. */ @@ -118,15 +118,15 @@ class ITKOptimizers_EXPORT GradientDescentOptimizer: /** Get Stop condition. */ itkGetConstReferenceMacro(StopCondition, StopConditionType); - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; /** Get Gradient condition. */ itkGetConstReferenceMacro(Gradient, DerivativeType); protected: GradientDescentOptimizer(); - virtual ~GradientDescentOptimizer() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GradientDescentOptimizer() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; // made protected so subclass can access DerivativeType m_Gradient; diff --git a/Modules/Numerics/Optimizers/include/itkInitializationBiasedParticleSwarmOptimizer.h b/Modules/Numerics/Optimizers/include/itkInitializationBiasedParticleSwarmOptimizer.h index a4cbb79a1e0..e755ae95def 100644 --- a/Modules/Numerics/Optimizers/include/itkInitializationBiasedParticleSwarmOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkInitializationBiasedParticleSwarmOptimizer.h @@ -115,9 +115,9 @@ class ITKOptimizers_EXPORT InitializationBiasedParticleSwarmOptimizer : protected: InitializationBiasedParticleSwarmOptimizer(); - virtual ~InitializationBiasedParticleSwarmOptimizer() ITK_OVERRIDE {}; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; - virtual void UpdateSwarm() ITK_OVERRIDE; + ~InitializationBiasedParticleSwarmOptimizer() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; + void UpdateSwarm() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(InitializationBiasedParticleSwarmOptimizer); diff --git a/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h b/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h index fc53e93b642..b12f54da5ea 100644 --- a/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h @@ -96,10 +96,10 @@ class ITKOptimizers_EXPORT LBFGSBOptimizer: typedef LBFGSBOptimizerHelper InternalOptimizerType; /** Start optimization with an initial value. */ - virtual void StartOptimization(void) ITK_OVERRIDE; + void StartOptimization(void) override; /** Plug in a Cost Function into the optimizer */ - virtual void SetCostFunction(SingleValuedCostFunction *costFunction) ITK_OVERRIDE; + void SetCostFunction(SingleValuedCostFunction *costFunction) override; /** Set/Get the optimizer trace flag. If set to true, the optimizer * prints out information every iteration. @@ -176,12 +176,12 @@ class ITKOptimizers_EXPORT LBFGSBOptimizer: itkGetConstReferenceMacro(InfinityNormOfProjectedGradient, double); /** Get the reason for termination */ - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; protected: LBFGSBOptimizer(); - virtual ~LBFGSBOptimizer() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LBFGSBOptimizer() override; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType; diff --git a/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h b/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h index 2eee428999f..77abb907224 100644 --- a/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h @@ -108,10 +108,10 @@ class ITKOptimizers_EXPORT LBFGSOptimizer: vnl_lbfgs * GetOptimizer(); /** Start optimization with an initial value. */ - virtual void StartOptimization(void) ITK_OVERRIDE; + void StartOptimization(void) override; /** Plug in a Cost Function into the optimizer */ - virtual void SetCostFunction(SingleValuedCostFunction *costFunction) ITK_OVERRIDE; + void SetCostFunction(SingleValuedCostFunction *costFunction) override; /** Set/Get the optimizer trace flag. If set to true, the optimizer * prints out information every iteration. @@ -157,12 +157,12 @@ class ITKOptimizers_EXPORT LBFGSOptimizer: MeasureType GetValue() const; /** Get the reason for termination */ - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; protected: LBFGSOptimizer(); - virtual ~LBFGSOptimizer() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LBFGSOptimizer() override; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType; diff --git a/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h b/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h index ab41885feea..1554c04a5e3 100644 --- a/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h @@ -56,10 +56,10 @@ class ITKOptimizers_EXPORT LevenbergMarquardtOptimizer: vnl_levenberg_marquardt * GetOptimizer() const; /** Start optimization with an initial value. */ - virtual void StartOptimization(void) ITK_OVERRIDE; + void StartOptimization(void) override; /** Plug in a Cost Function into the optimizer */ - virtual void SetCostFunction(MultipleValuedCostFunction *costFunction) ITK_OVERRIDE; + void SetCostFunction(MultipleValuedCostFunction *costFunction) override; void SetNumberOfIterations(unsigned int iterations); @@ -72,11 +72,11 @@ class ITKOptimizers_EXPORT LevenbergMarquardtOptimizer: /** Get the current value */ MeasureType GetValue() const; - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; protected: LevenbergMarquardtOptimizer(); - virtual ~LevenbergMarquardtOptimizer() ITK_OVERRIDE; + ~LevenbergMarquardtOptimizer() override; typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType; diff --git a/Modules/Numerics/Optimizers/include/itkMultipleValuedCostFunction.h b/Modules/Numerics/Optimizers/include/itkMultipleValuedCostFunction.h index 842626c5206..ad3a7a26732 100644 --- a/Modules/Numerics/Optimizers/include/itkMultipleValuedCostFunction.h +++ b/Modules/Numerics/Optimizers/include/itkMultipleValuedCostFunction.h @@ -75,7 +75,7 @@ class ITKOptimizers_EXPORT MultipleValuedCostFunction: protected: MultipleValuedCostFunction() {} - virtual ~MultipleValuedCostFunction() ITK_OVERRIDE; + ~MultipleValuedCostFunction() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MultipleValuedCostFunction); diff --git a/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearOptimizer.h b/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearOptimizer.h index ac1046d3c2f..58428596ff8 100644 --- a/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearOptimizer.h @@ -70,8 +70,8 @@ class ITKOptimizers_EXPORT MultipleValuedNonLinearOptimizer: protected: MultipleValuedNonLinearOptimizer(); - virtual ~MultipleValuedNonLinearOptimizer() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MultipleValuedNonLinearOptimizer() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; CostFunctionPointer m_CostFunction; diff --git a/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h b/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h index 9dba6432b0e..2804b52bed9 100644 --- a/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h @@ -58,7 +58,7 @@ class ITKOptimizers_EXPORT MultipleValuedNonLinearVnlOptimizer: * number of parameters is obtained at run-time from the itkCostFunction. * As a consequence each derived optimizer should construct its own * CostFunctionAdaptor when overloading this method */ - virtual void SetCostFunction(MultipleValuedCostFunction *costFunction) ITK_OVERRIDE = 0; + void SetCostFunction(MultipleValuedCostFunction *costFunction) override = 0; /** Define if the Cost function should provide a customized Gradient computation or the gradient can be computed internally @@ -89,9 +89,9 @@ class ITKOptimizers_EXPORT MultipleValuedNonLinearVnlOptimizer: protected: MultipleValuedNonLinearVnlOptimizer(); - virtual ~MultipleValuedNonLinearVnlOptimizer() ITK_OVERRIDE; + ~MultipleValuedNonLinearVnlOptimizer() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef MultipleValuedVnlCostFunctionAdaptor CostFunctionAdaptorType; diff --git a/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h b/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h index 00179dfe0a1..e69d86b228f 100644 --- a/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h +++ b/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h @@ -73,12 +73,12 @@ class ITKOptimizers_EXPORT MultipleValuedVnlCostFunctionAdaptor: { return m_CostFunction; } /** Delegate computation of the value to the CostFunction. */ - virtual void f(const InternalParametersType & inparameters, - InternalMeasureType & measures) ITK_OVERRIDE; + void f(const InternalParametersType & inparameters, + InternalMeasureType & measures) override; /** Delegate computation of the gradient to the costFunction. */ - virtual void gradf(const InternalParametersType & inparameters, - InternalDerivativeType & gradient) ITK_OVERRIDE; + void gradf(const InternalParametersType & inparameters, + InternalDerivativeType & gradient) override; /** Delegate computation of value and gradient to the costFunction. */ virtual void compute(const InternalParametersType & x, diff --git a/Modules/Numerics/Optimizers/include/itkNonLinearOptimizer.h b/Modules/Numerics/Optimizers/include/itkNonLinearOptimizer.h index eab4697a7ef..8fded41fab6 100644 --- a/Modules/Numerics/Optimizers/include/itkNonLinearOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkNonLinearOptimizer.h @@ -54,7 +54,7 @@ class ITKOptimizers_EXPORT NonLinearOptimizer:public Optimizer protected: NonLinearOptimizer() {} - virtual ~NonLinearOptimizer() ITK_OVERRIDE; + ~NonLinearOptimizer() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NonLinearOptimizer); diff --git a/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h b/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h index f60198a9a22..6fbecaf05d2 100644 --- a/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h @@ -152,7 +152,7 @@ class ITKOptimizers_EXPORT OnePlusOneEvolutionaryOptimizer: /** Start optimization. * Optimization will stop when it meets either of two termination conditions, * the maximum iteration limit or epsilon (minimal search radius) */ - virtual void StartOptimization() ITK_OVERRIDE; + void StartOptimization() override; /** when users call StartOptimization, this value will be set false. * By calling StopOptimization, this flag will be set true, and @@ -166,13 +166,13 @@ class ITKOptimizers_EXPORT OnePlusOneEvolutionaryOptimizer: itkGetConstReferenceMacro(MetricWorstPossibleValue, double); itkSetMacro(MetricWorstPossibleValue, double); - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; protected: OnePlusOneEvolutionaryOptimizer(); OnePlusOneEvolutionaryOptimizer(const OnePlusOneEvolutionaryOptimizer &); - virtual ~OnePlusOneEvolutionaryOptimizer() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~OnePlusOneEvolutionaryOptimizer() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Numerics/Optimizers/include/itkOptimizer.h b/Modules/Numerics/Optimizers/include/itkOptimizer.h index 66113271a45..3d0f5aa2d59 100644 --- a/Modules/Numerics/Optimizers/include/itkOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkOptimizer.h @@ -86,8 +86,8 @@ class ITKOptimizers_EXPORT Optimizer:public Object protected: Optimizer(); - virtual ~Optimizer() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~Optimizer() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Set the current position. */ virtual void SetCurrentPosition(const ParametersType & param); diff --git a/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizer.h b/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizer.h index 42b10b07bf3..cbe0c92452d 100644 --- a/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizer.h @@ -94,9 +94,9 @@ class ITKOptimizers_EXPORT ParticleSwarmOptimizer : protected: ParticleSwarmOptimizer(); - virtual ~ParticleSwarmOptimizer() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; - virtual void UpdateSwarm() ITK_OVERRIDE; + ~ParticleSwarmOptimizer() override; + void PrintSelf(std::ostream& os, Indent indent) const override; + void UpdateSwarm() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ParticleSwarmOptimizer); diff --git a/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h b/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h index c7c1ccdb508..6a655ace026 100644 --- a/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h +++ b/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h @@ -114,7 +114,7 @@ class ITKOptimizers_EXPORT ParticleSwarmOptimizerBase : itkBooleanMacro( PrintSwarm ) /** Start optimization. */ - virtual void StartOptimization( void ) ITK_OVERRIDE; + void StartOptimization( void ) override; /** Set/Get number of particles in the swarm - the maximal number of function @@ -188,7 +188,7 @@ class ITKOptimizers_EXPORT ParticleSwarmOptimizerBase : MeasureType GetValue() const; /** Get the reason for termination */ - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; /** Print the swarm information to the given output stream. Each line * (particle data) is of the form: @@ -198,8 +198,8 @@ class ITKOptimizers_EXPORT ParticleSwarmOptimizerBase : protected: ParticleSwarmOptimizerBase(); - virtual ~ParticleSwarmOptimizerBase() ITK_OVERRIDE; - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~ParticleSwarmOptimizerBase() override; + void PrintSelf( std::ostream& os, Indent indent ) const override; void PrintParamtersType( const ParametersType& x, std::ostream& os ) const; /** diff --git a/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h b/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h index 97b558e099c..55381a793a2 100644 --- a/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h @@ -122,7 +122,7 @@ class ITKOptimizers_EXPORT PowellOptimizer: itkGetConstReferenceMacro(CurrentLineIteration, unsigned int); /** Start optimization. */ - virtual void StartOptimization() ITK_OVERRIDE; + void StartOptimization() override; /** When users call StartOptimization, this value will be set false. * By calling StopOptimization, this flag will be set true, and @@ -136,13 +136,13 @@ class ITKOptimizers_EXPORT PowellOptimizer: itkGetConstReferenceMacro(MetricWorstPossibleValue, double); itkSetMacro(MetricWorstPossibleValue, double); - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; protected: PowellOptimizer(); PowellOptimizer(const PowellOptimizer &); - virtual ~PowellOptimizer() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PowellOptimizer() override; + void PrintSelf(std::ostream & os, Indent indent) const override; itkSetMacro(CurrentCost, double); diff --git a/Modules/Numerics/Optimizers/include/itkQuaternionRigidTransformGradientDescentOptimizer.h b/Modules/Numerics/Optimizers/include/itkQuaternionRigidTransformGradientDescentOptimizer.h index de3c64f3232..d63035e6394 100644 --- a/Modules/Numerics/Optimizers/include/itkQuaternionRigidTransformGradientDescentOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkQuaternionRigidTransformGradientDescentOptimizer.h @@ -71,11 +71,11 @@ class ITKOptimizers_EXPORT QuaternionRigidTransformGradientDescentOptimizer: typedef Superclass::ParametersType ParametersType; /** Advance one step following the gradient direction. */ - virtual void AdvanceOneStep(void) ITK_OVERRIDE; + void AdvanceOneStep(void) override; protected: QuaternionRigidTransformGradientDescentOptimizer() {} - virtual ~QuaternionRigidTransformGradientDescentOptimizer() ITK_OVERRIDE {} + ~QuaternionRigidTransformGradientDescentOptimizer() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(QuaternionRigidTransformGradientDescentOptimizer); diff --git a/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h b/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h index 4be4a681fe1..8cb5ebce6d1 100644 --- a/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h @@ -71,7 +71,7 @@ class ITKOptimizers_EXPORT RegularStepGradientDescentBaseOptimizer: { SetMaximize(true); } /** Start optimization. */ - virtual void StartOptimization(void) ITK_OVERRIDE; + void StartOptimization(void) override; /** Resume previously stopped optimization with current parameters. * \sa StopOptimization */ @@ -99,12 +99,12 @@ class ITKOptimizers_EXPORT RegularStepGradientDescentBaseOptimizer: itkGetConstReferenceMacro(Gradient, DerivativeType); /** Get the reason for termination */ - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; protected: RegularStepGradientDescentBaseOptimizer(); - virtual ~RegularStepGradientDescentBaseOptimizer() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RegularStepGradientDescentBaseOptimizer() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Advance one step following the gradient direction * This method verifies if a change in direction is required diff --git a/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentOptimizer.h b/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentOptimizer.h index c441f9cffb3..df045dac601 100644 --- a/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentOptimizer.h @@ -53,16 +53,16 @@ class ITKOptimizers_EXPORT RegularStepGradientDescentOptimizer: protected: RegularStepGradientDescentOptimizer() {} - virtual ~RegularStepGradientDescentOptimizer() ITK_OVERRIDE {} + ~RegularStepGradientDescentOptimizer() override {} /** Advance one step along the corrected gradient taking into * account the steplength represented by factor. * This method is invoked by AdvanceOneStep. It is expected * to be overrided by optimization methods in non-vector spaces * \sa AdvanceOneStep */ - virtual void StepAlongGradient( + void StepAlongGradient( double factor, - const DerivativeType & transformedGradient) ITK_OVERRIDE; + const DerivativeType & transformedGradient) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RegularStepGradientDescentOptimizer); diff --git a/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h b/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h index ed673a9c003..98f94d3a2b8 100644 --- a/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h @@ -70,7 +70,7 @@ class ITKOptimizers_EXPORT SPSAOptimizer: virtual void AdvanceOneStep(); /** Start optimization. */ - virtual void StartOptimization(void) ITK_OVERRIDE; + void StartOptimization(void) override; /** Resume previously stopped optimization with current parameters * \sa StopOptimization. */ @@ -195,15 +195,15 @@ class ITKOptimizers_EXPORT SPSAOptimizer: itkGetConstMacro(Tolerance, double); /** Get the reason for termination */ - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; protected: SPSAOptimizer(); - virtual ~SPSAOptimizer() ITK_OVERRIDE {} + ~SPSAOptimizer() override {} /** PrintSelf method. */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Variables updated during optimization */ DerivativeType m_Gradient; diff --git a/Modules/Numerics/Optimizers/include/itkSingleValuedCostFunction.h b/Modules/Numerics/Optimizers/include/itkSingleValuedCostFunction.h index 5cb32ef4ea9..9d8a1a4f87f 100644 --- a/Modules/Numerics/Optimizers/include/itkSingleValuedCostFunction.h +++ b/Modules/Numerics/Optimizers/include/itkSingleValuedCostFunction.h @@ -74,7 +74,7 @@ class ITKOptimizers_EXPORT SingleValuedCostFunction: protected: SingleValuedCostFunction() {} - virtual ~SingleValuedCostFunction() ITK_OVERRIDE; + ~SingleValuedCostFunction() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SingleValuedCostFunction); diff --git a/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearOptimizer.h b/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearOptimizer.h index 131a9121b67..dcf00937f96 100644 --- a/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearOptimizer.h @@ -76,8 +76,8 @@ class ITKOptimizers_EXPORT SingleValuedNonLinearOptimizer: protected: SingleValuedNonLinearOptimizer(); - virtual ~SingleValuedNonLinearOptimizer() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SingleValuedNonLinearOptimizer() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; CostFunctionPointer m_CostFunction; diff --git a/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h b/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h index cc1d3d84db9..93d6084a3b6 100644 --- a/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h @@ -60,7 +60,7 @@ class ITKOptimizers_EXPORT SingleValuedNonLinearVnlOptimizer: * number of parameters is obtained at run-time from the itkCostFunction. * As a consequence each derived optimizer should construct its own * CostFunctionAdaptor when overloading this method */ - virtual void SetCostFunction(SingleValuedCostFunction *costFunction) ITK_OVERRIDE = 0; + void SetCostFunction(SingleValuedCostFunction *costFunction) override = 0; /** Methods to define whether the cost function will be maximized or * minimized. By default the VNL amoeba optimizer is only a minimizer. @@ -90,7 +90,7 @@ class ITKOptimizers_EXPORT SingleValuedNonLinearVnlOptimizer: protected: SingleValuedNonLinearVnlOptimizer(); - virtual ~SingleValuedNonLinearVnlOptimizer() ITK_OVERRIDE; + ~SingleValuedNonLinearVnlOptimizer() override; typedef SingleValuedVnlCostFunctionAdaptor CostFunctionAdaptorType; @@ -105,7 +105,7 @@ class ITKOptimizers_EXPORT SingleValuedNonLinearVnlOptimizer: CostFunctionAdaptorType * GetNonConstCostFunctionAdaptor() const; /** Print out internal state */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: /** Callback function for the Command Observer */ diff --git a/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h b/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h index a47d84e0ed3..a4172e6383b 100644 --- a/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h +++ b/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h @@ -72,16 +72,16 @@ class ITKOptimizers_EXPORT SingleValuedVnlCostFunctionAdaptor: { return m_CostFunction; } /** Delegate computation of the value to the CostFunction. */ - virtual InternalMeasureType f(const InternalParametersType & inparameters) ITK_OVERRIDE; + InternalMeasureType f(const InternalParametersType & inparameters) override; /** Delegate computation of the gradient to the costFunction. */ - virtual void gradf(const InternalParametersType & inparameters, - InternalDerivativeType & gradient) ITK_OVERRIDE; + void gradf(const InternalParametersType & inparameters, + InternalDerivativeType & gradient) override; /** Delegate computation of value and gradient to the costFunction. */ - virtual void compute(const InternalParametersType & x, + void compute(const InternalParametersType & x, InternalMeasureType *f, - InternalDerivativeType *g) ITK_OVERRIDE; + InternalDerivativeType *g) override; /** Convert external derviative measures into internal type */ void ConvertExternalToInternalGradient( diff --git a/Modules/Numerics/Optimizers/include/itkVersorRigid3DTransformOptimizer.h b/Modules/Numerics/Optimizers/include/itkVersorRigid3DTransformOptimizer.h index 81c9ff4b584..3c4bf23507a 100644 --- a/Modules/Numerics/Optimizers/include/itkVersorRigid3DTransformOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkVersorRigid3DTransformOptimizer.h @@ -73,12 +73,12 @@ class ITKOptimizers_EXPORT VersorRigid3DTransformOptimizer: typedef VersorType::VectorType VectorType; /** Advance one step following the gradient direction. */ - virtual void StepAlongGradient(double factor, - const DerivativeType & transformedGradient) ITK_OVERRIDE; + void StepAlongGradient(double factor, + const DerivativeType & transformedGradient) override; protected: VersorRigid3DTransformOptimizer() {} - virtual ~VersorRigid3DTransformOptimizer() ITK_OVERRIDE {} + ~VersorRigid3DTransformOptimizer() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(VersorRigid3DTransformOptimizer); diff --git a/Modules/Numerics/Optimizers/include/itkVersorTransformOptimizer.h b/Modules/Numerics/Optimizers/include/itkVersorTransformOptimizer.h index 0d3fb25da3b..c6e05ac5900 100644 --- a/Modules/Numerics/Optimizers/include/itkVersorTransformOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkVersorTransformOptimizer.h @@ -71,12 +71,12 @@ class ITKOptimizers_EXPORT VersorTransformOptimizer: typedef VersorType::VectorType VectorType; /** Advance one step following the gradient direction. */ - virtual void StepAlongGradient(double factor, - const DerivativeType & transformedGradient) ITK_OVERRIDE; + void StepAlongGradient(double factor, + const DerivativeType & transformedGradient) override; protected: VersorTransformOptimizer() {} - virtual ~VersorTransformOptimizer() ITK_OVERRIDE {} + ~VersorTransformOptimizer() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(VersorTransformOptimizer); diff --git a/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx index 21da13fb117..d03049bb095 100644 --- a/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx @@ -32,7 +32,7 @@ ::AmoebaOptimizer() : this->m_AutomaticInitialSimplex = true; this->m_InitialSimplexDelta.Fill( NumericTraits< ParametersType::ValueType >::OneValue() ); this->m_OptimizeWithRestarts = false; - this->m_VnlOptimizer = ITK_NULLPTR; + this->m_VnlOptimizer = nullptr; } @@ -78,7 +78,7 @@ ::GetValue() const SingleValuedNonLinearVnlOptimizer::CostFunctionAdaptorType *costFunction = this->GetNonConstCostFunctionAdaptor(); - if( costFunction != ITK_NULLPTR ) + if( costFunction != nullptr ) { if( static_cast(costFunction->get_number_of_unknowns()) != numberOfParameters ) @@ -134,7 +134,7 @@ ::SetCostFunction(SingleValuedCostFunction *costFunction) //Right now the result of GetCostFunction() will be a null pointer. //SingleValuedNonLinearOptimizer::SetCostFunction( costFunction ); - //if cost function is ITK_NULLPTR this will throw an exception + //if cost function is nullptr this will throw an exception //when the pointer is dereferenced CostFunctionAdaptorType *adaptor = new CostFunctionAdaptorType( costFunction->GetNumberOfParameters() ); @@ -310,9 +310,9 @@ AmoebaOptimizer ::ValidateSettings() { //we have to have a cost function - if( GetCostFunctionAdaptor() == ITK_NULLPTR ) + if( GetCostFunctionAdaptor() == nullptr ) { - itkExceptionMacro(<<"ITK_NULLPTR cost function") + itkExceptionMacro(<<"nullptr cost function") } //if we got here it is safe to get the number of parameters the cost //function expects diff --git a/Modules/Numerics/Optimizers/src/itkConjugateGradientOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkConjugateGradientOptimizer.cxx index da1da764003..2ccac9cb58f 100644 --- a/Modules/Numerics/Optimizers/src/itkConjugateGradientOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkConjugateGradientOptimizer.cxx @@ -29,7 +29,7 @@ ConjugateGradientOptimizer ::ConjugateGradientOptimizer() { m_OptimizerInitialized = false; - m_VnlOptimizer = ITK_NULLPTR; + m_VnlOptimizer = nullptr; } /** diff --git a/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx index 1a57b2ca5fd..0c0d4102093 100644 --- a/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx @@ -36,8 +36,8 @@ CumulativeGaussianOptimizer::CumulativeGaussianOptimizer() m_DifferenceTolerance = 1e-10; m_Verbose = 0; m_FitError = 0; - m_FinalSampledArray = ITK_NULLPTR; - m_CumulativeGaussianArray = ITK_NULLPTR; + m_FinalSampledArray = nullptr; + m_CumulativeGaussianArray = nullptr; m_StopConditionDescription << this->GetNameOfClass() << ": Constructed"; } diff --git a/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx index b7585e17130..018a270fa78 100644 --- a/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx @@ -42,7 +42,7 @@ class ITKOptimizers_EXPORT LBFGSBOptimizerHelper: LBFGSBOptimizer * const itkObj); /** Handle new iteration event */ - virtual bool report_iter() ITK_OVERRIDE; + bool report_iter() override; private: LBFGSBOptimizer * const m_ItkObj; @@ -62,7 +62,7 @@ ::LBFGSBOptimizer(): m_MaximumNumberOfCorrections(5), m_CurrentIteration(0), m_InfinityNormOfProjectedGradient(0.0), - m_VnlOptimizer(ITK_NULLPTR) + m_VnlOptimizer(nullptr) { m_LowerBound = InternalBoundValueType(0); m_UpperBound = InternalBoundValueType(0); diff --git a/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx index 2d6a9a4c7e3..cdeac8621f2 100644 --- a/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx @@ -30,7 +30,7 @@ LBFGSOptimizer ::LBFGSOptimizer() { m_OptimizerInitialized = false; - m_VnlOptimizer = ITK_NULLPTR; + m_VnlOptimizer = nullptr; m_Trace = false; m_MaximumNumberOfFunctionEvaluations = 2000; m_GradientConvergenceTolerance = 1e-5; diff --git a/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx index 3e361a14ffa..7e534317166 100644 --- a/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx @@ -29,7 +29,7 @@ LevenbergMarquardtOptimizer ::LevenbergMarquardtOptimizer() { m_OptimizerInitialized = false; - m_VnlOptimizer = ITK_NULLPTR; + m_VnlOptimizer = nullptr; m_NumberOfIterations = 2000; m_ValueTolerance = 1e-8; m_GradientTolerance = 1e-5; diff --git a/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx index af257b61311..786741878e6 100644 --- a/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx @@ -25,7 +25,7 @@ namespace itk MultipleValuedNonLinearOptimizer ::MultipleValuedNonLinearOptimizer() { - m_CostFunction = ITK_NULLPTR; + m_CostFunction = nullptr; } /** diff --git a/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearVnlOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearVnlOptimizer.cxx index fcd83f6f623..8e3853b9d9a 100644 --- a/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearVnlOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearVnlOptimizer.cxx @@ -28,7 +28,7 @@ namespace itk MultipleValuedNonLinearVnlOptimizer ::MultipleValuedNonLinearVnlOptimizer() { - m_CostFunctionAdaptor = ITK_NULLPTR; + m_CostFunctionAdaptor = nullptr; m_UseGradient = true; m_Command = CommandType::New(); m_Command->SetCallbackFunction(this, @@ -45,7 +45,7 @@ MultipleValuedNonLinearVnlOptimizer ::~MultipleValuedNonLinearVnlOptimizer() { delete m_CostFunctionAdaptor; - m_CostFunctionAdaptor = ITK_NULLPTR; + m_CostFunctionAdaptor = nullptr; } void diff --git a/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx index 2ba4bedbee6..c93a41f1c2d 100644 --- a/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx @@ -31,7 +31,7 @@ ::OnePlusOneEvolutionaryOptimizer() m_Maximize = false; m_Epsilon = (double)1.5e-4; - m_RandomGenerator = ITK_NULLPTR; + m_RandomGenerator = nullptr; m_Initialized = false; m_GrowthFactor = 1.05; diff --git a/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx b/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx index 97fc7dee977..25290f40a9e 100644 --- a/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx +++ b/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx @@ -325,9 +325,9 @@ ::ValidateSettings() unsigned int i,n; //we have to have a cost function - if( GetCostFunction() == ITK_NULLPTR ) + if( GetCostFunction() == nullptr ) { - itkExceptionMacro(<<"ITK_NULLPTR cost function") + itkExceptionMacro(<<"nullptr cost function") } //if we got here it is safe to get the number of parameters the cost //function expects diff --git a/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx index 23908cc4700..87534a93b45 100644 --- a/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx @@ -38,7 +38,7 @@ ::RegularStepGradientDescentBaseOptimizer(): m_CurrentIteration = 0; m_Value = 0; m_Maximize = false; - m_CostFunction = ITK_NULLPTR; + m_CostFunction = nullptr; m_CurrentStepLength = 0; m_StopCondition = Unknown; m_Gradient.Fill(0.0f); diff --git a/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx index c25eedb143c..6a5a0e22289 100644 --- a/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx @@ -25,7 +25,7 @@ namespace itk SingleValuedNonLinearOptimizer ::SingleValuedNonLinearOptimizer() { - m_CostFunction = ITK_NULLPTR; + m_CostFunction = nullptr; } /** diff --git a/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearVnlOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearVnlOptimizer.cxx index 4c74649179b..a7ec31824d2 100644 --- a/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearVnlOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearVnlOptimizer.cxx @@ -26,7 +26,7 @@ namespace itk SingleValuedNonLinearVnlOptimizer ::SingleValuedNonLinearVnlOptimizer() { - m_CostFunctionAdaptor = ITK_NULLPTR; + m_CostFunctionAdaptor = nullptr; m_Maximize = false; m_Command = CommandType::New(); m_Command->SetCallbackFunction(this, @@ -41,7 +41,7 @@ SingleValuedNonLinearVnlOptimizer ::~SingleValuedNonLinearVnlOptimizer() { delete m_CostFunctionAdaptor; - m_CostFunctionAdaptor = ITK_NULLPTR; + m_CostFunctionAdaptor = nullptr; } void diff --git a/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx index f2c304f04c7..edbff101bce 100644 --- a/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkAmoebaOptimizerTest.cxx @@ -76,7 +76,7 @@ class amoebaTestF1 : public itk::SingleValuedCostFunction m_Negate = false; } - virtual double GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + double GetValue( const ParametersType & parameters ) const override { VectorType v( parameters.Size() ); @@ -95,7 +95,7 @@ class amoebaTestF1 : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & parameters, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { VectorType v( parameters.Size() ); @@ -120,7 +120,7 @@ class amoebaTestF1 : public itk::SingleValuedCostFunction } } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } @@ -163,7 +163,7 @@ class amoebaTestF2 : public itk::SingleValuedCostFunction { } - virtual double GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + double GetValue( const ParametersType & parameters ) const override { double val; if( parameters[0]<0 ) @@ -178,13 +178,13 @@ class amoebaTestF2 : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & itkNotUsed(parameters), - DerivativeType & itkNotUsed(derivative) ) const ITK_OVERRIDE + DerivativeType & itkNotUsed(derivative) ) const override { throw itk::ExceptionObject( __FILE__, __LINE__, "no derivative available" ); } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return 1; } @@ -200,12 +200,12 @@ class CommandIterationUpdateAmoeba : public itk::Command void Reset() { m_IterationNumber = 0; } - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const itk::AmoebaOptimizer *optimizer = static_cast< const itk::AmoebaOptimizer * >( object ); if( dynamic_cast< const itk::FunctionEvaluationIterationEvent * >( &event ) ) diff --git a/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx index 35f9ad2dca3..a80d724931d 100644 --- a/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx @@ -64,7 +64,7 @@ class conjugateCostFunction : public itk::SingleValuedCostFunction { } - virtual double GetValue( const ParametersType & position ) const ITK_OVERRIDE + double GetValue( const ParametersType & position ) const override { double x = position[0]; @@ -82,7 +82,7 @@ class conjugateCostFunction : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & position, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { double x = position[0]; @@ -100,7 +100,7 @@ class conjugateCostFunction : public itk::SingleValuedCostFunction std::cout << derivative[1] << ")" << std::endl; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } @@ -128,12 +128,12 @@ class CommandIterationUpdateConjugateGradient : public itk::Command typedef itk::ConjugateGradientOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( m_FunctionEvent.CheckEvent( &event ) ) diff --git a/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx index bf3fb782590..6f6b01b8961 100644 --- a/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkExhaustiveOptimizerTest.cxx @@ -60,7 +60,7 @@ class RSGCostFunction : public itk::SingleValuedCostFunction } - virtual MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + MeasureType GetValue( const ParametersType & parameters ) const override { double x = parameters[0]; @@ -79,7 +79,7 @@ class RSGCostFunction : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & parameters, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { double x = parameters[0]; @@ -96,7 +96,7 @@ class RSGCostFunction : public itk::SingleValuedCostFunction } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } @@ -111,12 +111,12 @@ class IndexObserver : public itk::Command itkNewMacro ( IndexObserver ); - virtual void Execute ( const itk::Object *caller, const itk::EventObject &) ITK_OVERRIDE + void Execute ( const itk::Object *caller, const itk::EventObject &) override { typedef itk::ExhaustiveOptimizer OptimizerType; const OptimizerType *optimizer = dynamic_cast < const OptimizerType * > ( caller ); - if ( ITK_NULLPTR != optimizer ) + if ( nullptr != optimizer ) { OptimizerType::ParametersType currentIndex = optimizer->GetCurrentIndex (); @@ -130,7 +130,7 @@ class IndexObserver : public itk::Command } } - virtual void Execute (itk::Object *caller, const itk::EventObject &event) ITK_OVERRIDE + void Execute (itk::Object *caller, const itk::EventObject &event) override { Execute ( static_cast < const itk::Object * > ( caller ), event ); } diff --git a/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx index 562215a1e97..a9604c7ed6c 100644 --- a/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkFRPROptimizerTest.cxx @@ -56,7 +56,7 @@ class FRPRGradientCostFunction : public itk::SingleValuedCostFunction } - virtual MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + MeasureType GetValue( const ParametersType & parameters ) const override { double x = parameters[0]; @@ -75,7 +75,7 @@ class FRPRGradientCostFunction : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & parameters, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { double x = parameters[0]; @@ -96,7 +96,7 @@ class FRPRGradientCostFunction : public itk::SingleValuedCostFunction } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } diff --git a/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx index 5b45064dcf5..65c1e91d067 100644 --- a/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkGradientDescentOptimizerTest.cxx @@ -58,7 +58,7 @@ class gradientCostFunction : public itk::SingleValuedCostFunction } - virtual MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + MeasureType GetValue( const ParametersType & parameters ) const override { double x = parameters[0]; @@ -77,7 +77,7 @@ class gradientCostFunction : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & parameters, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { double x = parameters[0]; @@ -98,7 +98,7 @@ class gradientCostFunction : public itk::SingleValuedCostFunction } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } diff --git a/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx index 09688fb26ce..a6755e18dae 100644 --- a/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx @@ -65,7 +65,7 @@ class LBFGSBCostFunction : public itk::SingleValuedCostFunction { } - virtual double GetValue( const ParametersType & position ) const ITK_OVERRIDE + double GetValue( const ParametersType & position ) const override { double x = position[0]; @@ -83,7 +83,7 @@ class LBFGSBCostFunction : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & position, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { double x = position[0]; @@ -103,7 +103,7 @@ class LBFGSBCostFunction : public itk::SingleValuedCostFunction } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } @@ -126,12 +126,12 @@ class EventChecker: public itk::Command bool GetHadEndEvent() { return m_HadEndEvent; } - virtual void Execute( itk::Object *caller, const itk::EventObject & event ) ITK_OVERRIDE + void Execute( itk::Object *caller, const itk::EventObject & event ) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute( const itk::Object *, const itk::EventObject & event) ITK_OVERRIDE + void Execute( const itk::Object *, const itk::EventObject & event) override { if( itk::StartEvent().CheckEvent( &event )) { diff --git a/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx index 5eb79877640..dcb6884f767 100644 --- a/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkLBFGSOptimizerTest.cxx @@ -63,7 +63,7 @@ class LBFGSCostFunction : public itk::SingleValuedCostFunction { } - virtual double GetValue( const ParametersType & position ) const ITK_OVERRIDE + double GetValue( const ParametersType & position ) const override { double x = position[0]; double y = position[1]; @@ -80,7 +80,7 @@ class LBFGSCostFunction : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & position, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { double x = position[0]; double y = position[1]; @@ -98,7 +98,7 @@ class LBFGSCostFunction : public itk::SingleValuedCostFunction } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } diff --git a/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx index 8a018b71c9d..cfac19a0077 100644 --- a/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkLevenbergMarquardtOptimizerTest.cxx @@ -87,7 +87,7 @@ class LMCostFunction : public itk::MultipleValuedCostFunction } - virtual MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + MeasureType GetValue( const ParametersType & parameters ) const override { std::cout << "GetValue( "; @@ -118,7 +118,7 @@ class LMCostFunction : public itk::MultipleValuedCostFunction } void GetDerivative( const ParametersType & parameters, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { std::cout << "GetDerivative( "; @@ -149,12 +149,12 @@ class LMCostFunction : public itk::MultipleValuedCostFunction } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual unsigned int GetNumberOfValues(void) const ITK_OVERRIDE + unsigned int GetNumberOfValues(void) const override { return RangeDimension; } @@ -185,12 +185,12 @@ class CommandIterationUpdateLevenbergMarquardt : public itk::Command typedef itk::LevenbergMarquardtOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { std::cout << "Observer::Execute() " << std::endl; OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); diff --git a/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx index b542429c918..ec92cd09dfd 100644 --- a/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkOnePlusOneEvolutionaryOptimizerTest.cxx @@ -62,7 +62,7 @@ class OnePlusOneCostFunction : public itk::SingleValuedCostFunction } - virtual MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + MeasureType GetValue( const ParametersType & parameters ) const override { double x = parameters[0]; double y = parameters[1]; @@ -79,12 +79,12 @@ class OnePlusOneCostFunction : public itk::SingleValuedCostFunction } void GetDerivative(const ParametersType & itkNotUsed( parameters ), - DerivativeType & itkNotUsed( derivative ) ) const ITK_OVERRIDE + DerivativeType & itkNotUsed( derivative ) ) const override { itkGenericExceptionMacro("OnePlusOneEvolutionaryOptimizer is not supposed to call GetDerivative()"); } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } @@ -107,12 +107,12 @@ class OnePlusOneCommandIterationUpdate : public itk::Command typedef itk::OnePlusOneEvolutionaryOptimizer OptimizerType; typedef const OptimizerType * OptimizerPointer; - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTestFunctions.h b/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTestFunctions.h index 8af15d534be..fba5f0d88e9 100644 --- a/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTestFunctions.h +++ b/Modules/Numerics/Optimizers/test/itkParticleSwarmOptimizerTestFunctions.h @@ -52,7 +52,7 @@ class ParticleSwarmTestF1 : public SingleValuedCostFunction { } - virtual double GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + double GetValue( const ParametersType & parameters ) const override { double val; @@ -68,13 +68,13 @@ class ParticleSwarmTestF1 : public SingleValuedCostFunction } void GetDerivative( const ParametersType & itkNotUsed(parameters), - DerivativeType & itkNotUsed(derivative) ) const ITK_OVERRIDE + DerivativeType & itkNotUsed(derivative) ) const override { throw ExceptionObject( __FILE__, __LINE__, "no derivative available" ); } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return 1; } @@ -122,7 +122,7 @@ class ParticleSwarmTestF2 : public SingleValuedCostFunction m_Intercept[1] = -8; } - virtual double GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + double GetValue( const ParametersType & parameters ) const override { return 0.5 * ( m_A(0, 0) * parameters[0] * parameters[0] + m_A(0, 1) * parameters[0] * parameters[1] @@ -132,13 +132,13 @@ class ParticleSwarmTestF2 : public SingleValuedCostFunction } void GetDerivative( const ParametersType & itkNotUsed(parameters), - DerivativeType & itkNotUsed(derivative) ) const ITK_OVERRIDE + DerivativeType & itkNotUsed(derivative) ) const override { throw ExceptionObject( __FILE__, __LINE__, "no derivative available" ); } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return 2; } @@ -171,7 +171,7 @@ class ParticleSwarmTestF3 : public SingleValuedCostFunction { } - virtual double GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + double GetValue( const ParametersType & parameters ) const override { return (1 - parameters[0]) * (1 - parameters[0]) + 100 * (parameters[1] - parameters[0] * parameters[0]) @@ -179,13 +179,13 @@ class ParticleSwarmTestF3 : public SingleValuedCostFunction } void GetDerivative( const ParametersType & itkNotUsed(parameters), - DerivativeType & itkNotUsed(derivative) ) const ITK_OVERRIDE + DerivativeType & itkNotUsed(derivative) ) const override { throw ExceptionObject( __FILE__, __LINE__, "no derivative available" ); } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return 2; } @@ -207,18 +207,18 @@ class CommandIterationUpdateParticleSwarm : public Command itkSetMacro( PrintOptimizer, bool ); - virtual void Execute(Object *caller, const EventObject & event) ITK_OVERRIDE + void Execute(Object *caller, const EventObject & event) override { Execute( (const Object *)caller, event); } - virtual void Execute(const Object * object, const EventObject & event) ITK_OVERRIDE + void Execute(const Object * object, const EventObject & event) override { const ParticleSwarmOptimizerBase *optimizer = static_cast( object ); - if( dynamic_cast( &event ) != ITK_NULLPTR || - dynamic_cast( &event ) != ITK_NULLPTR ) + if( dynamic_cast( &event ) != nullptr || + dynamic_cast( &event ) != nullptr ) { std::cout << m_IterationNumber++ << ": "; std::cout << "x: " << optimizer->GetCurrentPosition() << " "; diff --git a/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx index d9d6afc6b85..67c351cac3e 100644 --- a/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkPowellOptimizerTest.cxx @@ -59,11 +59,11 @@ class PowellBoundedCostFunction : public itk::SingleValuedCostFunction void GetDerivative( const ParametersType & , - DerivativeType & ) const ITK_OVERRIDE + DerivativeType & ) const override { } - virtual MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + MeasureType GetValue( const ParametersType & parameters ) const override { ++POWELL_CALLS_TO_GET_VALUE; @@ -82,7 +82,7 @@ class PowellBoundedCostFunction : public itk::SingleValuedCostFunction } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } diff --git a/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx index 07a4ea9eac3..ee892c2b6aa 100644 --- a/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkRegularStepGradientDescentOptimizerTest.cxx @@ -57,7 +57,7 @@ class RSGCostFunction : public itk::SingleValuedCostFunction } - virtual MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + MeasureType GetValue( const ParametersType & parameters ) const override { double x = parameters[0]; @@ -75,7 +75,7 @@ class RSGCostFunction : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & parameters, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { double x = parameters[0]; @@ -92,7 +92,7 @@ class RSGCostFunction : public itk::SingleValuedCostFunction } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } diff --git a/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx index c6398e57719..b7675fde23c 100644 --- a/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkSPSAOptimizerTest.cxx @@ -56,7 +56,7 @@ class SPSACostFunction : public itk::SingleValuedCostFunction } - virtual MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + MeasureType GetValue( const ParametersType & parameters ) const override { double x = parameters[0]; @@ -74,7 +74,7 @@ class SPSACostFunction : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & parameters, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { double x = parameters[0]; @@ -91,7 +91,7 @@ class SPSACostFunction : public itk::SingleValuedCostFunction } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } diff --git a/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx index 1d2ae737b1b..0e35de86c53 100644 --- a/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkVersorRigid3DTransformOptimizerTest.cxx @@ -112,7 +112,7 @@ class versorRigid3DCostFunction : public itk::SingleValuedCostFunction } - virtual MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + MeasureType GetValue( const ParametersType & parameters ) const override { TransformType::ParametersType p( itkGetStaticConstMacro( SpaceDimension )); for(unsigned int i=0; i<6; i++) @@ -132,7 +132,7 @@ class versorRigid3DCostFunction : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & parameters, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { VectorType rightPart; for(unsigned int i=0; i<3; i++) @@ -206,7 +206,7 @@ class versorRigid3DCostFunction : public itk::SingleValuedCostFunction } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return itkGetStaticConstMacro( SpaceDimension ); } diff --git a/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx b/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx index d2097528249..6b79248c52a 100644 --- a/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx +++ b/Modules/Numerics/Optimizers/test/itkVersorTransformOptimizerTest.cxx @@ -73,7 +73,7 @@ class versorCostFunction : public itk::SingleValuedCostFunction } - virtual MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE + MeasureType GetValue( const ParametersType & parameters ) const override { std::cout << "GetValue( " << parameters << " ) = "; @@ -111,7 +111,7 @@ class versorCostFunction : public itk::SingleValuedCostFunction } void GetDerivative( const ParametersType & parameters, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { VectorType rightPart; @@ -167,7 +167,7 @@ class versorCostFunction : public itk::SingleValuedCostFunction } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } diff --git a/Modules/Numerics/Optimizersv4/include/itkAmoebaOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkAmoebaOptimizerv4.h index 9c207f1b8d1..be98a921573 100644 --- a/Modules/Numerics/Optimizersv4/include/itkAmoebaOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkAmoebaOptimizerv4.h @@ -81,10 +81,10 @@ class ITKOptimizersv4_EXPORT AmoebaOptimizerv4: typedef vnl_vector< double > InternalParametersType; /** Start optimization with an initial value. */ - virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE; + void StartOptimization(bool doOnlyInitialization = false) override; /** Plug in a Cost Function into the optimizer */ - virtual void SetMetric(MetricType *metric) ITK_OVERRIDE; + void SetMetric(MetricType *metric) override; /** Set/Get the mode which determines how the amoeba algorithm * defines the initial simplex. Default is @@ -129,15 +129,15 @@ class ITKOptimizersv4_EXPORT AmoebaOptimizerv4: itkGetConstMacro(FunctionConvergenceTolerance, double); /** Report the reason for stopping. */ - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; /** Method for getting access to the internal optimizer. */ vnl_amoeba * GetOptimizer() const; protected: AmoebaOptimizerv4(); - virtual ~AmoebaOptimizerv4() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~AmoebaOptimizerv4() override; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType; diff --git a/Modules/Numerics/Optimizersv4/include/itkCommandIterationUpdatev4.h b/Modules/Numerics/Optimizersv4/include/itkCommandIterationUpdatev4.h index 07e578f4dde..6e4b668945c 100644 --- a/Modules/Numerics/Optimizersv4/include/itkCommandIterationUpdatev4.h +++ b/Modules/Numerics/Optimizersv4/include/itkCommandIterationUpdatev4.h @@ -57,12 +57,12 @@ class CommandIterationUpdatev4 : public Command /** * Execute method will print data at each iteration */ - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object *, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object *, const itk::EventObject & event) override { if( typeid( event ) == typeid( itk::StartEvent ) ) { diff --git a/Modules/Numerics/Optimizersv4/include/itkConjugateGradientLineSearchOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkConjugateGradientLineSearchOptimizerv4.h index a76557ea47e..b484c2f79a4 100644 --- a/Modules/Numerics/Optimizersv4/include/itkConjugateGradientLineSearchOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkConjugateGradientLineSearchOptimizerv4.h @@ -72,21 +72,21 @@ class ITK_TEMPLATE_EXPORT ConjugateGradientLineSearchOptimizerv4Template /** Type for the convergence checker */ typedef itk::Function::WindowConvergenceMonitoringFunction ConvergenceMonitoringType; - virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE; + void StartOptimization( bool doOnlyInitialization = false ) override; protected: /** Advance one Step following the gradient direction. * Includes transform update. */ - virtual void AdvanceOneStep(void) ITK_OVERRIDE; + void AdvanceOneStep(void) override; /** Default constructor */ ConjugateGradientLineSearchOptimizerv4Template(); /** Destructor */ - virtual ~ConjugateGradientLineSearchOptimizerv4Template() ITK_OVERRIDE; + ~ConjugateGradientLineSearchOptimizerv4Template() override; - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: diff --git a/Modules/Numerics/Optimizersv4/include/itkConvergenceMonitoringFunction.h b/Modules/Numerics/Optimizersv4/include/itkConvergenceMonitoringFunction.h index 2cac5bf5794..5474d647a73 100644 --- a/Modules/Numerics/Optimizersv4/include/itkConvergenceMonitoringFunction.h +++ b/Modules/Numerics/Optimizersv4/include/itkConvergenceMonitoringFunction.h @@ -96,9 +96,9 @@ class ConvergenceMonitoringFunction this->m_EnergyValues.clear(); } - ~ConvergenceMonitoringFunction() ITK_OVERRIDE {} + ~ConvergenceMonitoringFunction() override {} - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE + void PrintSelf( std::ostream & os, Indent indent ) const override { Superclass::PrintSelf( os, indent ); diff --git a/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.h index f0118f04f77..0b2103acfbe 100644 --- a/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.h @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT ExhaustiveOptimizerv4: /** Scales type */ typedef typename Superclass::ScalesType ScalesType; - virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE; + void StartOptimization(bool doOnlyInitialization = false) override; /** Start optimization */ void StartWalking(); @@ -126,7 +126,7 @@ class ITK_TEMPLATE_EXPORT ExhaustiveOptimizerv4: itkGetConstReferenceMacro(CurrentIndex, ParametersType); /** Get the reason for termination */ - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; /** Set the position to initialize the optimization. */ void SetInitialPosition(const ParametersType & param); @@ -139,8 +139,8 @@ class ITK_TEMPLATE_EXPORT ExhaustiveOptimizerv4: protected: ExhaustiveOptimizerv4(); - virtual ~ExhaustiveOptimizerv4() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ExhaustiveOptimizerv4() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Advance to the next grid position. */ void AdvanceOneStep(); diff --git a/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.h index dcf8304b8c7..2f8ffc749ad 100644 --- a/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.h @@ -110,15 +110,15 @@ class ITK_TEMPLATE_EXPORT GradientDescentLineSearchOptimizerv4Template protected: /** Advance one Step following the gradient direction. * Includes transform update. */ - virtual void AdvanceOneStep(void) ITK_OVERRIDE; + void AdvanceOneStep(void) override; /** Default constructor */ GradientDescentLineSearchOptimizerv4Template(); /** Destructor */ - virtual ~GradientDescentLineSearchOptimizerv4Template() ITK_OVERRIDE; + ~GradientDescentLineSearchOptimizerv4Template() override; - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; TInternalComputationValueType GoldenSectionSearch( TInternalComputationValueType a, TInternalComputationValueType b, TInternalComputationValueType c ); diff --git a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h index 3fa5a41cc75..6f5e0f0bba7 100644 --- a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h +++ b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h @@ -94,7 +94,7 @@ class ITK_TEMPLATE_EXPORT GradientDescentOptimizerBasev4Template itkGetConstReferenceMacro(StopCondition, StopConditionType); /** Set the number of iterations. */ - virtual void SetNumberOfIterations( const SizeValueType numberOfIterations ) ITK_OVERRIDE + void SetNumberOfIterations( const SizeValueType numberOfIterations ) override { itkDebugMacro("setting NumberOfIterations to " << numberOfIterations ); if ( this->m_NumberOfIterations != numberOfIterations) @@ -105,19 +105,19 @@ class ITK_TEMPLATE_EXPORT GradientDescentOptimizerBasev4Template } /** Get the number of iterations. */ - virtual SizeValueType GetNumberOfIterations() const ITK_OVERRIDE + SizeValueType GetNumberOfIterations() const override { return this->m_NumberOfIterations; } /** Get the current iteration number. */ - virtual SizeValueType GetCurrentIteration() const ITK_OVERRIDE + SizeValueType GetCurrentIteration() const override { return this->m_CurrentIteration; } /** Start and run the optimization */ - virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE; + void StartOptimization( bool doOnlyInitialization = false ) override; /** Resume optimization. * This runs the optimization loop, and allows continuation @@ -129,7 +129,7 @@ class ITK_TEMPLATE_EXPORT GradientDescentOptimizerBasev4Template virtual void StopOptimization(); /** Get the reason for termination */ - virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE; + const StopConditionReturnStringType GetStopConditionDescription() const override; /** Modify the gradient in place, to advance the optimization. * This call performs a threaded modification for transforms with @@ -169,7 +169,7 @@ class ITK_TEMPLATE_EXPORT GradientDescentOptimizerBasev4Template /** Default constructor */ GradientDescentOptimizerBasev4Template(); - virtual ~GradientDescentOptimizerBasev4Template() ITK_OVERRIDE; + ~GradientDescentOptimizerBasev4Template() override; /** Flag to control use of the ScalesEstimator (if set) for * automatic learning step estimation at *each* iteration. @@ -214,7 +214,7 @@ class ITK_TEMPLATE_EXPORT GradientDescentOptimizerBasev4Template /** Current gradient */ DerivativeType m_Gradient; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader.h b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader.h index a7346904679..62b3cda95b9 100644 --- a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader.h +++ b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader.h @@ -53,11 +53,11 @@ class ITK_TEMPLATE_EXPORT GradientDescentOptimizerBasev4ModifyGradientByLearning typedef DomainType IndexRangeType; protected: - virtual void ThreadedExecution( const IndexRangeType & subrange, - const ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedExecution( const IndexRangeType & subrange, + const ThreadIdType threadId ) override; GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreaderTemplate() {} - virtual ~GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreaderTemplate() ITK_OVERRIDE {} + ~GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreaderTemplate() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreaderTemplate); diff --git a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByScalesThreader.h b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByScalesThreader.h index 6c43484ea85..5bb6c88d4b6 100644 --- a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByScalesThreader.h +++ b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4ModifyGradientByScalesThreader.h @@ -53,11 +53,11 @@ class ITK_TEMPLATE_EXPORT GradientDescentOptimizerBasev4ModifyGradientByScalesTh typedef DomainType IndexRangeType; protected: - virtual void ThreadedExecution( const IndexRangeType & subrange, - const ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedExecution( const IndexRangeType & subrange, + const ThreadIdType threadId ) override; GradientDescentOptimizerBasev4ModifyGradientByScalesThreaderTemplate() {} - virtual ~GradientDescentOptimizerBasev4ModifyGradientByScalesThreaderTemplate() ITK_OVERRIDE {} + ~GradientDescentOptimizerBasev4ModifyGradientByScalesThreaderTemplate() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(GradientDescentOptimizerBasev4ModifyGradientByScalesThreaderTemplate); diff --git a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h index e94087271f0..6f8ceafea13 100644 --- a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h @@ -183,13 +183,13 @@ class ITK_TEMPLATE_EXPORT GradientDescentOptimizerv4Template itkBooleanMacro(ReturnBestParametersAndValue); /** Start and run the optimization. */ - virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE; + void StartOptimization( bool doOnlyInitialization = false ) override; /** Stop the optimization. */ - virtual void StopOptimization(void) ITK_OVERRIDE; + void StopOptimization(void) override; /** Resume the optimization. */ - virtual void ResumeOptimization() ITK_OVERRIDE; + void ResumeOptimization() override; /** Estimate the learning rate based on the current gradient. */ virtual void EstimateLearningRate(); @@ -201,18 +201,18 @@ class ITK_TEMPLATE_EXPORT GradientDescentOptimizerv4Template virtual void AdvanceOneStep(); /** Modify the gradient by scales and weights over a given index range. */ - virtual void ModifyGradientByScalesOverSubRange( const IndexRangeType& subrange ) ITK_OVERRIDE; + void ModifyGradientByScalesOverSubRange( const IndexRangeType& subrange ) override; /** Modify the gradient by learning rate over a given index range. */ - virtual void ModifyGradientByLearningRateOverSubRange( const IndexRangeType& subrange ) ITK_OVERRIDE; + void ModifyGradientByLearningRateOverSubRange( const IndexRangeType& subrange ) override; /** Default constructor */ GradientDescentOptimizerv4Template(); /** Destructor */ - virtual ~GradientDescentOptimizerv4Template() ITK_OVERRIDE; + ~GradientDescentOptimizerv4Template() override; - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; TInternalComputationValueType m_LearningRate; diff --git a/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h index e521a5b7859..5752d56f8bb 100644 --- a/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h @@ -171,15 +171,15 @@ class ITKOptimizersv4_EXPORT LBFGS2Optimizerv4: itkTypeMacro(LBFGS2Optimizerv4, Superclass); /** Start optimization with an initial value. */ - virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE; + void StartOptimization(bool doOnlyInitialization = false) override; - virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE; + const StopConditionReturnStringType GetStopConditionDescription() const override; /** This optimizer does not support scaling of the derivatives. */ - virtual void SetScales(const ScalesType &) ITK_OVERRIDE; + void SetScales(const ScalesType &) override; /** This optimizer does not support weighting of the derivatives. */ - virtual void SetWeights(const ScalesType ) ITK_OVERRIDE; + void SetWeights(const ScalesType ) override; /** * Set/Get the number of corrections to approximate the inverse hessian matrix. * The L-BFGS routine stores the computation results of previous \c m @@ -239,8 +239,8 @@ class ITKOptimizersv4_EXPORT LBFGS2Optimizerv4: /** Aliased to Set/Get MaximumIterations to match base class interface. */ - virtual SizeValueType GetNumberOfIterations() const ITK_OVERRIDE { return GetMaximumIterations(); } - virtual void SetNumberOfIterations( const SizeValueType _arg ) ITK_OVERRIDE { SetMaximumIterations(static_cast(_arg)); } + SizeValueType GetNumberOfIterations() const override { return GetMaximumIterations(); } + void SetNumberOfIterations( const SizeValueType _arg ) override { SetMaximumIterations(static_cast(_arg)); } /** * The line search algorithm. @@ -381,8 +381,8 @@ class ITKOptimizersv4_EXPORT LBFGS2Optimizerv4: protected: LBFGS2Optimizerv4(); - virtual ~LBFGS2Optimizerv4() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LBFGS2Optimizerv4() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Progress callback from libLBFGS forwards it to the specific instance */ diff --git a/Modules/Numerics/Optimizersv4/include/itkLBFGSBOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkLBFGSBOptimizerv4.h index 24a6ba9e794..1e5463d9cc1 100644 --- a/Modules/Numerics/Optimizersv4/include/itkLBFGSBOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkLBFGSBOptimizerv4.h @@ -109,10 +109,10 @@ class ITKOptimizersv4_EXPORT LBFGSBOptimizerv4: } /** Start optimization with an initial value. */ - virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE; + void StartOptimization(bool doOnlyInitialization = false) override; /** Plug in a Cost Function into the optimizer */ - virtual void SetMetric(MetricType *metric) ITK_OVERRIDE; + void SetMetric(MetricType *metric) override; /** Set the lower bound value for each variable. */ void SetLowerBound(const BoundValueType & value); @@ -150,7 +150,7 @@ class ITKOptimizersv4_EXPORT LBFGSBOptimizerv4: itkGetConstMacro(MaximumNumberOfCorrections, unsigned int); /** This optimizer does not support scaling of the derivatives. */ - virtual void SetScales(const ScalesType &) ITK_OVERRIDE; + void SetScales(const ScalesType &) override; /** Get the current infinity norm of the project gradient of the cost * function. */ @@ -158,8 +158,8 @@ class ITKOptimizersv4_EXPORT LBFGSBOptimizerv4: protected: LBFGSBOptimizerv4(); - virtual ~LBFGSBOptimizerv4() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LBFGSBOptimizerv4() override; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType; diff --git a/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.h b/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.h index af406b52036..6a9384c32d5 100644 --- a/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.h +++ b/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.h @@ -101,10 +101,10 @@ class ITK_TEMPLATE_EXPORT LBFGSOptimizerBasev4: InternalOptimizerType * GetOptimizer(); /** Start optimization with an initial value. */ - virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE; + void StartOptimization(bool doOnlyInitialization = false) override; /** Plug in a Cost Function into the optimizer */ - virtual void SetMetric(MetricType *metric) ITK_OVERRIDE; + void SetMetric(MetricType *metric) override; /** Set/Get the optimizer trace flag. If set to true, the optimizer * prints out information every iteration. @@ -129,12 +129,12 @@ class ITK_TEMPLATE_EXPORT LBFGSOptimizerBasev4: itkGetConstMacro(GradientConvergenceTolerance, double); /** Get the reason for termination */ - virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE; + const StopConditionReturnStringType GetStopConditionDescription() const override; protected: LBFGSOptimizerBasev4(); - virtual ~LBFGSOptimizerBasev4() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LBFGSOptimizerBasev4() override; + void PrintSelf(std::ostream & os, Indent indent) const override; typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType; diff --git a/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.hxx b/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.hxx index 1d138ac409b..80a9ce2effe 100644 --- a/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.hxx @@ -45,7 +45,7 @@ class ITK_TEMPLATE_EXPORT LBFGSOptimizerBaseHelperv4: public TInternalVnlOptimiz LBFGSOptimizerBasev4 * m_ItkObj; /** Handle new iteration event */ - virtual bool report_iter(); + bool report_iter() override; }; diff --git a/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerv4.h index aa72ddbe23d..a22b2160108 100644 --- a/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerv4.h @@ -103,10 +103,10 @@ class ITKOptimizersv4_EXPORT LBFGSOptimizerv4: itkTypeMacro(LBFGSOptimizerv4, Superclass); /** Start optimization with an initial value. */ - virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE; + void StartOptimization(bool doOnlyInitialization = false) override; /** Plug in a Cost Function into the optimizer */ - virtual void SetMetric(MetricType *metric) ITK_OVERRIDE; + void SetMetric(MetricType *metric) override; void VerboseOn(); void VerboseOff(); @@ -131,8 +131,8 @@ class ITKOptimizersv4_EXPORT LBFGSOptimizerv4: protected: LBFGSOptimizerv4(); - virtual ~LBFGSOptimizerv4() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LBFGSOptimizerv4() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** InternalParameters typedef. */ typedef vnl_vector< double > InternalParametersType; diff --git a/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.h index 9f14209c370..291024a8348 100644 --- a/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.h @@ -90,24 +90,24 @@ class ITK_TEMPLATE_EXPORT MultiGradientOptimizerv4Template typedef std::vector< MeasureType > MetricValuesListType; /** Get stop condition enum */ - virtual const StopConditionType & GetStopCondition() const ITK_OVERRIDE + const StopConditionType & GetStopCondition() const override { return this->m_StopCondition; } /** Begin the optimization */ - virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE; + void StartOptimization( bool doOnlyInitialization = false ) override; /** Stop optimization. The object is left in a state so the * optimization can be resumed by calling ResumeOptimization. */ - virtual void StopOptimization(void) ITK_OVERRIDE; + void StopOptimization(void) override; /** Resume the optimization. Can be called after StopOptimization to * resume. The bulk of the optimization work loop is here. */ - virtual void ResumeOptimization() ITK_OVERRIDE; + void ResumeOptimization() override; /** Get the reason for termination */ - virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE; + const StopConditionReturnStringType GetStopConditionDescription() const override; /** Get the list of optimizers currently held. */ OptimizersListType & GetOptimizersList(); @@ -122,9 +122,9 @@ class ITK_TEMPLATE_EXPORT MultiGradientOptimizerv4Template /** Default constructor */ MultiGradientOptimizerv4Template(); - virtual ~MultiGradientOptimizerv4Template() ITK_OVERRIDE; + ~MultiGradientOptimizerv4Template() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /* Common variables for optimization control and reporting */ bool m_Stop; diff --git a/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.h index 764c0994dec..de9de2796be 100644 --- a/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.h @@ -100,7 +100,7 @@ class ITK_TEMPLATE_EXPORT MultiStartOptimizerv4Template void InstantiateLocalOptimizer(); /** Begin the optimization */ - virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE; + void StartOptimization( bool doOnlyInitialization = false ) override; /** Stop optimization. The object is left in a state so the * optimization can be resumed by calling ResumeOptimization. */ @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT MultiStartOptimizerv4Template virtual void ResumeOptimization(); /** Get the reason for termination */ - virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE; + const StopConditionReturnStringType GetStopConditionDescription() const override; /** Get the list of parameters over which to search. */ ParametersListType & GetParametersList(); @@ -134,9 +134,9 @@ class ITK_TEMPLATE_EXPORT MultiStartOptimizerv4Template protected: /** Default constructor */ MultiStartOptimizerv4Template(); - virtual ~MultiStartOptimizerv4Template() ITK_OVERRIDE; + ~MultiStartOptimizerv4Template() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /* Common variables for optimization control and reporting */ bool m_Stop; diff --git a/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx index 45b5976fe8d..d231c95367b 100644 --- a/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx @@ -36,7 +36,7 @@ MultiStartOptimizerv4Template this->m_BestParametersIndex= static_cast(0); this->m_MaximumMetricValue=NumericTraits::max(); this->m_MinimumMetricValue = this->m_MaximumMetricValue; - m_LocalOptimizer = ITK_NULLPTR; + m_LocalOptimizer = nullptr; } //------------------------------------------------------------------- diff --git a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.h b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.h index 9d17cac85f0..7965be59e0e 100644 --- a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.h +++ b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.h @@ -68,7 +68,7 @@ namespace itk * then unit or zero values are returned for GetVirtualSpacing(), * GetVirtualDirection() and GetVirtualOrigin(), as appropriate. The virtual region is left * undefined and an attempt to retrieve it via GetVirtualRegion() will generate an exception. - * The m_VirtualImage member will be ITK_NULLPTR. + * The m_VirtualImage member will be nullptr. * * During evaluation, derived classes should verify that points are within the virtual domain * and thus valid, as appropriate for the needs of the metric. When points are deemed invalid @@ -173,14 +173,14 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMetric: /** DisplacementFieldTransform types for working with local-support transforms */ typedef DisplacementFieldTransform MovingDisplacementFieldTransformType; - virtual void Initialize(void) ITK_OVERRIDE; + void Initialize(void) override; - virtual NumberOfParametersType GetNumberOfParameters() const ITK_OVERRIDE; - virtual NumberOfParametersType GetNumberOfLocalParameters() const ITK_OVERRIDE; - virtual void SetParameters( ParametersType & params ) ITK_OVERRIDE; - virtual const ParametersType & GetParameters() const ITK_OVERRIDE; - virtual bool HasLocalSupport() const ITK_OVERRIDE; - virtual void UpdateTransformParameters( const DerivativeType & derivative, TParametersValueType factor) ITK_OVERRIDE; + NumberOfParametersType GetNumberOfParameters() const override; + NumberOfParametersType GetNumberOfLocalParameters() const override; + void SetParameters( ParametersType & params ) override; + const ParametersType & GetParameters() const override; + bool HasLocalSupport() const override; + void UpdateTransformParameters( const DerivativeType & derivative, TParametersValueType factor) override; /** Connect the fixed transform. */ itkSetObjectMacro(FixedTransform, FixedTransformType); @@ -291,16 +291,16 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMetric: typedef typename Superclass::MetricCategoryType MetricCategoryType; /** Get metric category */ - virtual MetricCategoryType GetMetricCategory() const ITK_OVERRIDE + MetricCategoryType GetMetricCategory() const override { return Superclass::OBJECT_METRIC; } protected: ObjectToObjectMetric(); - virtual ~ObjectToObjectMetric() ITK_OVERRIDE; + ~ObjectToObjectMetric() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Verify that virtual domain and displacement field are the same size * and in the same physical space. */ @@ -312,7 +312,7 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMetric: /** If the moving transform is a DisplacementFieldTransform, return it. * If the moving transform is a CompositeTransform, the routine will check if the * first (last to be added) transform is a DisplacementFieldTransform, and if so return it. - * Otherwise, return ITK_NULLPTR. */ + * Otherwise, return nullptr. */ const MovingDisplacementFieldTransformType * GetMovingDisplacementFieldTransform() const; /** Check that the number of valid points is above a default diff --git a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx index 93e58eaf55c..6faa1351cf0 100644 --- a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx @@ -41,7 +41,7 @@ ObjectToObjectMetricm_FixedTransform = FixedIdentityTransformType::New(); this->m_MovingTransform = MovingIdentityTransformType::New(); - this->m_VirtualImage = ITK_NULLPTR; + this->m_VirtualImage = nullptr; this->m_UserHasSetVirtualDomain = false; } @@ -438,7 +438,7 @@ ObjectToObjectMetricm_MovingTransform.GetPointer(); // If it's a CompositeTransform, get the last transform (1st applied). const MovingCompositeTransformType* comptx = dynamic_cast< const MovingCompositeTransformType * > ( transform ); - if( comptx != ITK_NULLPTR ) + if( comptx != nullptr ) { transform = comptx->GetBackTransform(); } @@ -465,7 +465,7 @@ ObjectToObjectMetricGetMovingDisplacementFieldTransform(); - if( displacementTransform == ITK_NULLPTR ) + if( displacementTransform == nullptr ) { itkExceptionMacro("Expected the moving transform to be of type DisplacementFieldTransform or derived, " "or a CompositeTransform with DisplacementFieldTransform as the last to have been added." ); diff --git a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h index eb5822ecb40..893a94c4861 100644 --- a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h +++ b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h @@ -128,7 +128,7 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMetricBaseTemplate: /** Calculate and return the value for the metric based on the current * transformation(s). The result is both returned, and stored in the * m_Value member variable. */ - virtual MeasureType GetValue() const ITK_OVERRIDE = 0; + MeasureType GetValue() const override = 0; /** * This method returns the derivative based on the current @@ -137,12 +137,12 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMetricBaseTemplate: /** This method returns the derivative and value based on the current * transformation(s). */ - virtual void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE = 0; + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override = 0; /** Methods for working with the metric's 'active' transform, e.g. the * transform being optimized in the case of registration. Some of these are * used in non-metric classes, e.g. optimizers. */ - virtual NumberOfParametersType GetNumberOfParameters() const ITK_OVERRIDE = 0; + NumberOfParametersType GetNumberOfParameters() const override = 0; virtual NumberOfParametersType GetNumberOfLocalParameters() const = 0; /** Set the active transform's parameters by value*/ @@ -187,9 +187,9 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMetricBaseTemplate: protected: ObjectToObjectMetricBaseTemplate(); - virtual ~ObjectToObjectMetricBaseTemplate() ITK_OVERRIDE; + ~ObjectToObjectMetricBaseTemplate() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Fixed and Moving Objects */ ObjectConstPointer m_FixedObject; diff --git a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h index d6fc81eb494..b69bbe53513 100644 --- a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h +++ b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h @@ -218,7 +218,7 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectOptimizerBaseTemplate : public Object /** Default constructor */ ObjectToObjectOptimizerBaseTemplate(); - virtual ~ObjectToObjectOptimizerBaseTemplate() ITK_OVERRIDE; + ~ObjectToObjectOptimizerBaseTemplate() override; MetricTypePointer m_Metric; ThreadIdType m_NumberOfThreads; @@ -252,7 +252,7 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectOptimizerBaseTemplate : public Object */ bool m_DoEstimateScales; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ObjectToObjectOptimizerBaseTemplate); diff --git a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.hxx b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.hxx index cbd874227ed..797c0abbd21 100644 --- a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.hxx @@ -29,7 +29,7 @@ template ObjectToObjectOptimizerBaseTemplate ::ObjectToObjectOptimizerBaseTemplate() { - this->m_Metric = ITK_NULLPTR; + this->m_Metric = nullptr; this->m_CurrentIteration = 0; this->m_NumberOfIterations = 100; this->m_CurrentMetricValue = 0; diff --git a/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.h index df899d78e70..a38574d9152 100644 --- a/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.h @@ -134,7 +134,7 @@ class ITK_TEMPLATE_EXPORT OnePlusOneEvolutionaryOptimizerv4: /** Return Current Value */ itkGetConstReferenceMacro(CurrentCost, MeasureType); - virtual const MeasureType & GetValue() const ITK_OVERRIDE; + const MeasureType & GetValue() const override; /** Return if optimizer has been initialized */ itkGetConstReferenceMacro(Initialized, bool); @@ -142,7 +142,7 @@ class ITK_TEMPLATE_EXPORT OnePlusOneEvolutionaryOptimizerv4: /** Start optimization. * Optimization will stop when it meets either of two termination conditions, * the maximum iteration limit or epsilon (minimal search radius) */ - virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE; + void StartOptimization(bool doOnlyInitialization = false) override; /** when users call StartOptimization, this value will be set false. * By calling StopOptimization, this flag will be set true, and @@ -156,13 +156,13 @@ class ITK_TEMPLATE_EXPORT OnePlusOneEvolutionaryOptimizerv4: itkGetConstReferenceMacro(MetricWorstPossibleValue, double); itkSetMacro(MetricWorstPossibleValue, double); - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; protected: OnePlusOneEvolutionaryOptimizerv4(); OnePlusOneEvolutionaryOptimizerv4(const OnePlusOneEvolutionaryOptimizerv4 &); - virtual ~OnePlusOneEvolutionaryOptimizerv4() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~OnePlusOneEvolutionaryOptimizerv4() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx index bad1218f46e..b7739f863a8 100644 --- a/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx @@ -31,7 +31,7 @@ OnePlusOneEvolutionaryOptimizerv4 m_MetricWorstPossibleValue = 0; m_Epsilon = (double)1.5e-4; - m_RandomGenerator = ITK_NULLPTR; + m_RandomGenerator = nullptr; m_Initialized = false; m_GrowthFactor = 1.05; diff --git a/Modules/Numerics/Optimizersv4/include/itkOptimizerParameterScalesEstimator.h b/Modules/Numerics/Optimizersv4/include/itkOptimizerParameterScalesEstimator.h index a8a2395b450..97ba81a131f 100644 --- a/Modules/Numerics/Optimizersv4/include/itkOptimizerParameterScalesEstimator.h +++ b/Modules/Numerics/Optimizersv4/include/itkOptimizerParameterScalesEstimator.h @@ -70,9 +70,9 @@ class OptimizerParameterScalesEstimatorTemplate : public Object protected: OptimizerParameterScalesEstimatorTemplate(){}; - ~OptimizerParameterScalesEstimatorTemplate() ITK_OVERRIDE {}; + ~OptimizerParameterScalesEstimatorTemplate() override {}; - virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream &os, Indent indent) const override { Superclass::PrintSelf(os,indent); } diff --git a/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.h index 68439ec570a..19b74c56135 100644 --- a/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.h @@ -102,13 +102,13 @@ class ITK_TEMPLATE_EXPORT PowellOptimizerv4: /** Return Current Value */ itkGetConstReferenceMacro(CurrentCost, MeasureType); - virtual const MeasureType & GetValue() const ITK_OVERRIDE { return this->GetCurrentCost(); } + const MeasureType & GetValue() const override { return this->GetCurrentCost(); } /** Get the current line search iteration */ itkGetConstReferenceMacro(CurrentLineIteration, unsigned int); /** Start optimization. */ - virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE; + void StartOptimization(bool doOnlyInitialization = false) override; /** When users call StartOptimization, this value will be set false. * By calling StopOptimization, this flag will be set true, and @@ -122,13 +122,13 @@ class ITK_TEMPLATE_EXPORT PowellOptimizerv4: itkGetConstReferenceMacro(MetricWorstPossibleValue, double); itkSetMacro(MetricWorstPossibleValue, double); - virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE; + const std::string GetStopConditionDescription() const override; protected: PowellOptimizerv4(); PowellOptimizerv4(const PowellOptimizerv4 &); - virtual ~PowellOptimizerv4() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PowellOptimizerv4() override; + void PrintSelf(std::ostream & os, Indent indent) const override; itkSetMacro(CurrentCost, double); diff --git a/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h index 30bc9c42f58..6b2658c0ae5 100644 --- a/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h @@ -88,7 +88,7 @@ class ITK_TEMPLATE_EXPORT QuasiNewtonOptimizerv4Template : typedef std::vector HessianArrayType; /** Start and run the optimization */ - virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE; + void StartOptimization( bool doOnlyInitialization = false ) override; /** Set the maximum tolerable number of iteration without any progress */ itkSetMacro(MaximumIterationsWithoutProgress, SizeValueType); @@ -183,12 +183,12 @@ class ITK_TEMPLATE_EXPORT QuasiNewtonOptimizerv4Template : * Advance one step using the Quasi-Newton step. When the Newton step * is invalid, the gradient step will be used. */ - virtual void AdvanceOneStep(void) ITK_OVERRIDE; + void AdvanceOneStep(void) override; QuasiNewtonOptimizerv4Template(); - virtual ~QuasiNewtonOptimizerv4Template() ITK_OVERRIDE; + ~QuasiNewtonOptimizerv4Template() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(QuasiNewtonOptimizerv4Template); diff --git a/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4EstimateNewtonStepThreader.h b/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4EstimateNewtonStepThreader.h index 02e6b0e86ec..99a5d789ab8 100644 --- a/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4EstimateNewtonStepThreader.h +++ b/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4EstimateNewtonStepThreader.h @@ -51,11 +51,11 @@ class ITK_TEMPLATE_EXPORT QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTempla typedef DomainType IndexRangeType; protected: - virtual void ThreadedExecution( const IndexRangeType & subrange, - const ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedExecution( const IndexRangeType & subrange, + const ThreadIdType threadId ) override; QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate() {} - virtual ~QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate() ITK_OVERRIDE {} + ~QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate); diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h index 99c489dd8e1..e5c43079132 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h @@ -133,16 +133,16 @@ class ITK_TEMPLATE_EXPORT RegistrationParameterScalesEstimator itkSetMacro(CentralRegionRadius, IndexValueType); /** Estimate parameter scales */ - virtual void EstimateScales(ScalesType &scales) ITK_OVERRIDE = 0; + void EstimateScales(ScalesType &scales) override = 0; /** Estimate the step scale, the impact of a step on deformation. */ - virtual FloatType EstimateStepScale(const ParametersType &step) ITK_OVERRIDE = 0; + FloatType EstimateStepScale(const ParametersType &step) override = 0; /** Estimate the scales of local steps. */ - virtual void EstimateLocalStepScales(const ParametersType &step, ScalesType &localStepScales) ITK_OVERRIDE = 0; + void EstimateLocalStepScales(const ParametersType &step, ScalesType &localStepScales) override = 0; /** Estimate the trusted scale for steps. It returns the voxel spacing. */ - virtual FloatType EstimateMaximumStepSize() ITK_OVERRIDE; + FloatType EstimateMaximumStepSize() override; /** Set the sampling strategy automatically for scales estimation. */ virtual void SetScalesSamplingStrategy(); @@ -152,9 +152,9 @@ class ITK_TEMPLATE_EXPORT RegistrationParameterScalesEstimator protected: RegistrationParameterScalesEstimator(); - ~RegistrationParameterScalesEstimator() ITK_OVERRIDE {}; + ~RegistrationParameterScalesEstimator() override {}; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Check the metric and the transforms. */ bool CheckAndSetInputs(); diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx index cae9757349b..e97d5bb404a 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx @@ -79,16 +79,16 @@ RegistrationParameterScalesEstimator< TMetric > { if (m_Metric.IsNull()) { - itkExceptionMacro("RegistrationParameterScalesEstimator: the metric is ITK_NULLPTR"); + itkExceptionMacro("RegistrationParameterScalesEstimator: the metric is nullptr"); } - if (this->m_Metric->GetMovingTransform() == ITK_NULLPTR) + if (this->m_Metric->GetMovingTransform() == nullptr) { - itkExceptionMacro("RegistrationParameterScalesEstimator: this->m_MovingTransform in the metric is ITK_NULLPTR."); + itkExceptionMacro("RegistrationParameterScalesEstimator: this->m_MovingTransform in the metric is nullptr."); } - if (this->m_Metric->GetFixedTransform() == ITK_NULLPTR) + if (this->m_Metric->GetFixedTransform() == nullptr) { - itkExceptionMacro("RegistrationParameterScalesEstimator: this->m_FixedTransform in the metric is ITK_NULLPTR."); + itkExceptionMacro("RegistrationParameterScalesEstimator: this->m_FixedTransform in the metric is nullptr."); } return true; diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromIndexShift.h b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromIndexShift.h index 9e83a380ab5..47441c6e209 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromIndexShift.h +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromIndexShift.h @@ -81,11 +81,11 @@ class ITK_TEMPLATE_EXPORT RegistrationParameterScalesFromIndexShift : protected: RegistrationParameterScalesFromIndexShift(); - ~RegistrationParameterScalesFromIndexShift() ITK_OVERRIDE {}; + ~RegistrationParameterScalesFromIndexShift() override {}; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void ComputeSampleShifts(const ParametersType &deltaParameters, ScalesType &localShifts) ITK_OVERRIDE; + void ComputeSampleShifts(const ParametersType &deltaParameters, ScalesType &localShifts) override; template void TransformPointToContinuousIndex(const VirtualPointType &point, TContinuousIndexType &mappedIndex); diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.h b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.h index 26c6c79575b..864199a82e8 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.h +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.h @@ -69,7 +69,7 @@ class ITK_TEMPLATE_EXPORT RegistrationParameterScalesFromJacobian : typedef typename Superclass::VirtualImageConstPointer VirtualImageConstPointer; /** Estimate parameter scales. */ - virtual void EstimateScales(ScalesType &scales) ITK_OVERRIDE; + void EstimateScales(ScalesType &scales) override; /** * Estimate the scale for \f$\Delta p\f$, the step of change on parameters. @@ -88,17 +88,17 @@ class ITK_TEMPLATE_EXPORT RegistrationParameterScalesFromJacobian : * For multiple voxels, we average the above formula to get the overall * step scale. */ - virtual FloatType EstimateStepScale(const ParametersType &step) ITK_OVERRIDE; + FloatType EstimateStepScale(const ParametersType &step) override; /** Estimate the scales of local steps. */ - virtual void EstimateLocalStepScales(const ParametersType &step, - ScalesType &localStepScales) ITK_OVERRIDE; + void EstimateLocalStepScales(const ParametersType &step, + ScalesType &localStepScales) override; protected: RegistrationParameterScalesFromJacobian(); - ~RegistrationParameterScalesFromJacobian() ITK_OVERRIDE {}; + ~RegistrationParameterScalesFromJacobian() override {}; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Compute the step scales for samples, i.e. the impacts on each sampled diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.h b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.h index dc389f24c96..169542caad7 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.h +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromPhysicalShift.h @@ -63,11 +63,11 @@ class ITK_TEMPLATE_EXPORT RegistrationParameterScalesFromPhysicalShift : protected: RegistrationParameterScalesFromPhysicalShift(); - ~RegistrationParameterScalesFromPhysicalShift() ITK_OVERRIDE {}; + ~RegistrationParameterScalesFromPhysicalShift() override {}; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void ComputeSampleShifts(const ParametersType &deltaParameters, ScalesType &localShifts) ITK_OVERRIDE; + void ComputeSampleShifts(const ParametersType &deltaParameters, ScalesType &localShifts) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RegistrationParameterScalesFromPhysicalShift); diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.h b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.h index d65df81e786..246eba5089b 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.h +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.h @@ -69,14 +69,14 @@ class ITK_TEMPLATE_EXPORT RegistrationParameterScalesFromShiftBase : typedef typename Superclass::VirtualImageConstPointer VirtualImageConstPointer; /** Estimate parameter scales */ - virtual void EstimateScales(ScalesType &scales) ITK_OVERRIDE; + void EstimateScales(ScalesType &scales) override; /** Estimate the scale of a step */ - virtual FloatType EstimateStepScale(const ParametersType &step) ITK_OVERRIDE; + FloatType EstimateStepScale(const ParametersType &step) override; /** Estimate the scales of local steps */ - virtual void EstimateLocalStepScales(const ParametersType &step, - ScalesType &localStepScales) ITK_OVERRIDE; + void EstimateLocalStepScales(const ParametersType &step, + ScalesType &localStepScales) override; /** Set/get small parameter variation */ itkSetMacro( SmallParameterVariation, ParametersValueType ); @@ -84,9 +84,9 @@ class ITK_TEMPLATE_EXPORT RegistrationParameterScalesFromShiftBase : protected: RegistrationParameterScalesFromShiftBase(); - ~RegistrationParameterScalesFromShiftBase() ITK_OVERRIDE {}; + ~RegistrationParameterScalesFromShiftBase() override {}; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Compute the shift in voxels when deltaParameters is applied onto the * current parameters. */ diff --git a/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.h index cddf5973e3d..fb6bba8b759 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.h @@ -101,10 +101,10 @@ class ITK_TEMPLATE_EXPORT RegularStepGradientDescentOptimizerv4 itkGetConstReferenceMacro(CurrentLearningRateRelaxation, MeasureType); /** Start and run the optimization. */ - virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE; + void StartOptimization( bool doOnlyInitialization = false ) override; /** Estimate the learning rate based on the current gradient. */ - virtual void EstimateLearningRate() ITK_OVERRIDE; + void EstimateLearningRate() override; /** Get current gradient step value. */ double GetCurrentStepLength() const; @@ -113,20 +113,20 @@ class ITK_TEMPLATE_EXPORT RegularStepGradientDescentOptimizerv4 /** Advance one Step following the gradient direction. * Includes transform update. */ - virtual void AdvanceOneStep(void) ITK_OVERRIDE; + void AdvanceOneStep(void) override; /** Modify the input gradient over a given index range. */ - virtual void ModifyGradientByScalesOverSubRange( const IndexRangeType& subrange ) ITK_OVERRIDE; - virtual void ModifyGradientByLearningRateOverSubRange( const IndexRangeType& subrange ) ITK_OVERRIDE; + void ModifyGradientByScalesOverSubRange( const IndexRangeType& subrange ) override; + void ModifyGradientByLearningRateOverSubRange( const IndexRangeType& subrange ) override; /** Default constructor. */ RegularStepGradientDescentOptimizerv4(); /** Destructor. */ - virtual ~RegularStepGradientDescentOptimizerv4() ITK_OVERRIDE; + ~RegularStepGradientDescentOptimizerv4() override; - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: diff --git a/Modules/Numerics/Optimizersv4/include/itkSingleValuedCostFunctionv4.h b/Modules/Numerics/Optimizersv4/include/itkSingleValuedCostFunctionv4.h index 8ed3d949b37..755e9035437 100644 --- a/Modules/Numerics/Optimizersv4/include/itkSingleValuedCostFunctionv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkSingleValuedCostFunctionv4.h @@ -83,7 +83,7 @@ class SingleValuedCostFunctionv4Template: protected: SingleValuedCostFunctionv4Template() {} - virtual ~SingleValuedCostFunctionv4Template() ITK_OVERRIDE {} + ~SingleValuedCostFunctionv4Template() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(SingleValuedCostFunctionv4Template); diff --git a/Modules/Numerics/Optimizersv4/include/itkSingleValuedNonLinearVnlOptimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkSingleValuedNonLinearVnlOptimizerv4.h index 1265d70f9a7..7674e070f4e 100644 --- a/Modules/Numerics/Optimizersv4/include/itkSingleValuedNonLinearVnlOptimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkSingleValuedNonLinearVnlOptimizerv4.h @@ -64,7 +64,7 @@ class ITKOptimizersv4_EXPORT SingleValuedNonLinearVnlOptimizerv4 : /** Stop condition internal string type */ typedef Superclass::StopConditionDescriptionType StopConditionDescriptionType; - virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE; + void StartOptimization(bool doOnlyInitialization = false) override; /** Set the metric (cost function). This method has to be overloaded * by derived classes because the CostFunctionAdaptor requires @@ -72,7 +72,7 @@ class ITKOptimizersv4_EXPORT SingleValuedNonLinearVnlOptimizerv4 : * number of parameters is obtained at run-time from the itkObjectToObjectMetric. * As a consequence each derived optimizer should construct its own * CostFunctionAdaptor when overloading this method */ - virtual void SetMetric(MetricType *metric) ITK_OVERRIDE = 0; + void SetMetric(MetricType *metric) override = 0; /** Return Cached Values. These method have the advantage of not triggering a * recomputation of the metric value, but it has the disadvantage of returning @@ -83,11 +83,11 @@ class ITKOptimizersv4_EXPORT SingleValuedNonLinearVnlOptimizerv4 : itkGetConstReferenceMacro(CachedCurrentPosition, ParametersType); /** Get the reason for termination */ - virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE = 0; + const StopConditionReturnStringType GetStopConditionDescription() const override = 0; protected: SingleValuedNonLinearVnlOptimizerv4(); - virtual ~SingleValuedNonLinearVnlOptimizerv4() ITK_OVERRIDE; + ~SingleValuedNonLinearVnlOptimizerv4() override; typedef SingleValuedVnlCostFunctionAdaptorv4 CostFunctionAdaptorType; @@ -102,7 +102,7 @@ class ITKOptimizersv4_EXPORT SingleValuedNonLinearVnlOptimizerv4 : CostFunctionAdaptorType * GetNonConstCostFunctionAdaptor() const; /** Print out internal state */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: /** The purpose of this method is to get around the lack of iteration reporting diff --git a/Modules/Numerics/Optimizersv4/include/itkSingleValuedVnlCostFunctionAdaptorv4.h b/Modules/Numerics/Optimizersv4/include/itkSingleValuedVnlCostFunctionAdaptorv4.h index 127197485e7..48b22f001e8 100644 --- a/Modules/Numerics/Optimizersv4/include/itkSingleValuedVnlCostFunctionAdaptorv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkSingleValuedVnlCostFunctionAdaptorv4.h @@ -75,13 +75,13 @@ class SingleValuedVnlCostFunctionAdaptorv4: } /** Delegate computation of the value to the CostFunction. */ - virtual InternalMeasureType f(const InternalParametersType & inparameters) ITK_OVERRIDE; + InternalMeasureType f(const InternalParametersType & inparameters) override; /** Delegate computation of the gradient to the costFunction. */ - virtual void gradf(const InternalParametersType & inparameters, InternalDerivativeType & gradient) ITK_OVERRIDE; + void gradf(const InternalParametersType & inparameters, InternalDerivativeType & gradient) override; /** Delegate computation of value and gradient to the costFunction. */ - virtual void compute(const InternalParametersType & x, InternalMeasureType *f, InternalDerivativeType *g) ITK_OVERRIDE; + void compute(const InternalParametersType & x, InternalMeasureType *f, InternalDerivativeType *g) override; /** Convert external derviative measures into internal type */ void ConvertExternalToInternalGradient( const DerivativeType & input, InternalDerivativeType & output) const; diff --git a/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.h b/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.h index 1aec8f274f7..a15fd71cb2d 100644 --- a/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.h +++ b/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.h @@ -62,24 +62,24 @@ class ITK_TEMPLATE_EXPORT WindowConvergenceMonitoringFunction typedef typename EnergyValueContainerType::const_iterator EnergyValueConstIterator; /** Add energy value */ - virtual void AddEnergyValue( const EnergyValueType ) ITK_OVERRIDE; + void AddEnergyValue( const EnergyValueType ) override; /* Clear energy values and set total energy to 0 */ - virtual void ClearEnergyValues() ITK_OVERRIDE; + void ClearEnergyValues() override; /** Set/Get window size over which the convergence value is calculated */ itkSetMacro( WindowSize, EnergyValueContainerSizeType ); itkGetConstMacro( WindowSize, EnergyValueContainerSizeType ); /** Calculate convergence value by fitting to a window of the enrgy profile */ - virtual RealType GetConvergenceValue() const ITK_OVERRIDE; + RealType GetConvergenceValue() const override; protected: WindowConvergenceMonitoringFunction(); - ~WindowConvergenceMonitoringFunction() ITK_OVERRIDE; + ~WindowConvergenceMonitoringFunction() override; - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(WindowConvergenceMonitoringFunction); diff --git a/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx b/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx index 8d6561ea873..69d7fd5723c 100644 --- a/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx +++ b/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx @@ -32,7 +32,7 @@ ::AmoebaOptimizerv4() : this->m_AutomaticInitialSimplex = true; this->m_InitialSimplexDelta.Fill( NumericTraits< ParametersType::ValueType >::OneValue() ); this->m_OptimizeWithRestarts = false; - this->m_VnlOptimizer = ITK_NULLPTR; + this->m_VnlOptimizer = nullptr; } @@ -91,7 +91,7 @@ ::SetMetric(MetricType *metric) { this->m_Metric = metric; - //if cost function is ITK_NULLPTR this will throw an exception when the pointer is dereferenced + //if cost function is nullptr this will throw an exception when the pointer is dereferenced const unsigned int numberOfParameters = metric->GetNumberOfParameters(); class AmoebaCostFunctionAdaptorv4: @@ -107,7 +107,7 @@ ::SetMetric(MetricType *metric) { } - Superclass::InternalMeasureType f(const Superclass::InternalParametersType & inparameters) + Superclass::InternalMeasureType f(const Superclass::InternalParametersType & inparameters) override { const Superclass::InternalMeasureType &ret = Superclass::f( inparameters ); ++m_ItkObj->m_CurrentIteration; diff --git a/Modules/Numerics/Optimizersv4/src/itkLBFGSBOptimizerv4.cxx b/Modules/Numerics/Optimizersv4/src/itkLBFGSBOptimizerv4.cxx index d875bf44131..b20f37541ae 100644 --- a/Modules/Numerics/Optimizersv4/src/itkLBFGSBOptimizerv4.cxx +++ b/Modules/Numerics/Optimizersv4/src/itkLBFGSBOptimizerv4.cxx @@ -38,7 +38,7 @@ public LBFGSOptimizerBaseHelperv4 protected: /** Handle new iteration event */ - virtual bool report_iter() ITK_OVERRIDE; + bool report_iter() override; }; /** Create with a reference to the ITK object */ diff --git a/Modules/Numerics/Optimizersv4/src/itkSingleValuedNonLinearVnlOptimizerv4.cxx b/Modules/Numerics/Optimizersv4/src/itkSingleValuedNonLinearVnlOptimizerv4.cxx index a54076120a2..c1fc99747c8 100644 --- a/Modules/Numerics/Optimizersv4/src/itkSingleValuedNonLinearVnlOptimizerv4.cxx +++ b/Modules/Numerics/Optimizersv4/src/itkSingleValuedNonLinearVnlOptimizerv4.cxx @@ -22,7 +22,7 @@ namespace itk SingleValuedNonLinearVnlOptimizerv4 ::SingleValuedNonLinearVnlOptimizerv4() { - this->m_CostFunctionAdaptor = ITK_NULLPTR; + this->m_CostFunctionAdaptor = nullptr; this->m_Command = CommandType::New(); this->m_Command->SetCallbackFunction(this, &SingleValuedNonLinearVnlOptimizerv4::IterationReport); @@ -36,7 +36,7 @@ SingleValuedNonLinearVnlOptimizerv4 if ( this->m_CostFunctionAdaptor ) { delete this->m_CostFunctionAdaptor; - this->m_CostFunctionAdaptor = ITK_NULLPTR; + this->m_CostFunctionAdaptor = nullptr; } } @@ -50,7 +50,7 @@ ::StartOptimization(bool doOnlyInitialization ) this->m_CurrentIteration = 0; // Verify adaptor - if( this->m_CostFunctionAdaptor == ITK_NULLPTR ) + if( this->m_CostFunctionAdaptor == nullptr ) { itkExceptionMacro("CostFunctionAdaptor has not been set."); } diff --git a/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx index f649d24d623..93f0df90ee0 100644 --- a/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkAmoebaOptimizerv4Test.cxx @@ -69,7 +69,7 @@ class itkAmoebaOptimizerv4TestMetric1 : public itk::ObjectToObjectMetricBase m_HasLocalSupport = false; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { double x = this->m_Parameters[0]; double y = this->m_Parameters[1]; @@ -77,7 +77,7 @@ class itkAmoebaOptimizerv4TestMetric1 : public itk::ObjectToObjectMetricBase return val; } - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { double x = this->m_Parameters[0]; double y = this->m_Parameters[1]; @@ -87,38 +87,38 @@ class itkAmoebaOptimizerv4TestMetric1 : public itk::ObjectToObjectMetricBase derivative[1] = -(2*x + 6*y +8); } - virtual void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = GetValue(); GetDerivative( derivative ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE + void Initialize(void) throw ( itk::ExceptionObject ) override { m_Parameters.SetSize( SpaceDimension ); } - virtual Superclass::NumberOfParametersType GetNumberOfLocalParameters() const ITK_OVERRIDE + Superclass::NumberOfParametersType GetNumberOfLocalParameters() const override { return SpaceDimension; } - virtual Superclass::NumberOfParametersType GetNumberOfParameters(void) const ITK_OVERRIDE + Superclass::NumberOfParametersType GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual void SetParameters( ParametersType & params ) ITK_OVERRIDE + void SetParameters( ParametersType & params ) override { this->m_Parameters = params; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return this->m_Parameters; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return m_HasLocalSupport; } @@ -128,7 +128,7 @@ class itkAmoebaOptimizerv4TestMetric1 : public itk::ObjectToObjectMetricBase m_HasLocalSupport = hls; } - virtual void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override { } @@ -174,7 +174,7 @@ class itkAmoebaOptimizerv4TestMetric2 : public itk::ObjectToObjectMetricBase m_HasLocalSupport = false; } - virtual double GetValue() const ITK_OVERRIDE + double GetValue() const override { double x = this->m_Parameters[0]; double val; @@ -189,44 +189,44 @@ class itkAmoebaOptimizerv4TestMetric2 : public itk::ObjectToObjectMetricBase return val; } - void GetDerivative( DerivativeType & itkNotUsed(derivative) ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & itkNotUsed(derivative) ) const override { throw itk::ExceptionObject( __FILE__, __LINE__, "no derivative available" ); } - virtual void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = GetValue(); GetDerivative( derivative ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE + void Initialize(void) throw ( itk::ExceptionObject ) override { m_Parameters.SetSize( SpaceDimension ); } - virtual Superclass::NumberOfParametersType GetNumberOfLocalParameters() const ITK_OVERRIDE + Superclass::NumberOfParametersType GetNumberOfLocalParameters() const override { return SpaceDimension; } - virtual Superclass::NumberOfParametersType GetNumberOfParameters(void) const ITK_OVERRIDE + Superclass::NumberOfParametersType GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual void SetParameters( ParametersType & params ) ITK_OVERRIDE + void SetParameters( ParametersType & params ) override { this->m_Parameters = params; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return this->m_Parameters; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return m_HasLocalSupport; } @@ -236,7 +236,7 @@ class itkAmoebaOptimizerv4TestMetric2 : public itk::ObjectToObjectMetricBase m_HasLocalSupport = hls; } - virtual void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override { } @@ -257,15 +257,15 @@ class CommandIterationUpdateAmoeba : public itk::Command void Reset() { m_IterationNumber = 0; } - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const itk::AmoebaOptimizerv4 *optimizer = static_cast< const itk::AmoebaOptimizerv4 * >( object ); - if( dynamic_cast< const itk::FunctionEvaluationIterationEvent * >( &event ) != ITK_NULLPTR) + if( dynamic_cast< const itk::FunctionEvaluationIterationEvent * >( &event ) != nullptr) { std::cout << m_IterationNumber++ << ": "; std::cout << "x: "<< optimizer->GetCurrentPosition() <<" "; diff --git a/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx index 3b5fdf21631..5b0d6a6ba9d 100644 --- a/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkConjugateGradientLineSearchOptimizerv4Test.cxx @@ -61,16 +61,16 @@ class ConjugateGradientLineSearchOptimizerv4TestMetric m_Parameters.Fill( 0 ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { MeasureType value; GetValueAndDerivative( value, derivative ); } void GetValueAndDerivative( MeasureType & value, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { if( derivative.Size() != 2 ) derivative.SetSize(2); @@ -96,7 +96,7 @@ class ConjugateGradientLineSearchOptimizerv4TestMetric m_Iterations++; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { double x = m_Parameters[0]; double y = m_Parameters[1]; @@ -106,34 +106,34 @@ class ConjugateGradientLineSearchOptimizerv4TestMetric return value; } - virtual void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) override { m_Parameters += update; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return SpaceDimension; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return false; } /* These Set/Get methods are only needed for this test derivation that * isn't using a transform */ - virtual void SetParameters( ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( ParametersType & parameters ) override { m_Parameters = parameters; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } diff --git a/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx index de3fb369b72..0d013dcfb51 100644 --- a/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkExhaustiveOptimizerv4Test.cxx @@ -61,7 +61,7 @@ class ExhaustiveOptv4Metric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = false; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { double x = this->m_Parameters[0]; double y = this->m_Parameters[1]; @@ -75,7 +75,7 @@ class ExhaustiveOptv4Metric : public itk::ObjectToObjectMetricBase return val; } - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { double x = this->m_Parameters[0]; double y = this->m_Parameters[1]; @@ -90,38 +90,38 @@ class ExhaustiveOptv4Metric : public itk::ObjectToObjectMetricBase } void GetValueAndDerivative( MeasureType & value, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { value = GetValue(); GetDerivative( derivative ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE + void Initialize(void) throw ( itk::ExceptionObject ) override { m_Parameters.SetSize( SpaceDimension ); } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return SpaceDimension; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual void SetParameters( ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( ParametersType & parameters ) override { m_Parameters = parameters; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return m_HasLocalSupport; } @@ -131,7 +131,7 @@ class ExhaustiveOptv4Metric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = hls; } - virtual void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override { } @@ -150,12 +150,12 @@ class IndexObserver : public itk::Command itkNewMacro ( IndexObserver ); - virtual void Execute ( const itk::Object *caller, const itk::EventObject &) ITK_OVERRIDE + void Execute ( const itk::Object *caller, const itk::EventObject &) override { typedef itk::ExhaustiveOptimizerv4 OptimizerType; const OptimizerType *optimizer = dynamic_cast < const OptimizerType * > ( caller ); - if ( ITK_NULLPTR != optimizer ) + if ( nullptr != optimizer ) { OptimizerType::ParametersType currentIndex = optimizer->GetCurrentIndex (); itk::SizeValueType currentIteration = optimizer->GetCurrentIteration(); @@ -171,7 +171,7 @@ class IndexObserver : public itk::Command } } - virtual void Execute (itk::Object *caller, const itk::EventObject &event) ITK_OVERRIDE + void Execute (itk::Object *caller, const itk::EventObject &event) override { Execute ( static_cast < const itk::Object * > ( caller ), event ); } diff --git a/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx index 5aa2701f481..11c74c60cc8 100644 --- a/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkGradientDescentLineSearchOptimizerv4Test.cxx @@ -63,16 +63,16 @@ class GradientDescentLineSearchOptimizerv4TestMetric m_Parameters.Fill( 0 ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { MeasureType value; GetValueAndDerivative( value, derivative ); } void GetValueAndDerivative( MeasureType & value, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { if( derivative.Size() != 2 ) derivative.SetSize(2); @@ -98,7 +98,7 @@ class GradientDescentLineSearchOptimizerv4TestMetric m_Iterations++; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { double x = m_Parameters[0]; double y = m_Parameters[1]; @@ -108,34 +108,34 @@ class GradientDescentLineSearchOptimizerv4TestMetric return value; } - virtual void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) override { m_Parameters += update; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return SpaceDimension; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return false; } /* These Set/Get methods are only needed for this test derivation that * isn't using a transform */ - virtual void SetParameters( ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( ParametersType & parameters ) override { m_Parameters = parameters; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } diff --git a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerBasev4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerBasev4Test.cxx index e8af8babf74..5f31c798a5e 100644 --- a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerBasev4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerBasev4Test.cxx @@ -41,46 +41,46 @@ class GradientDescentOptimizerBasev4TestMetric: itkNewMacro(Self); // Pure virtual functions that all Metrics must provide - virtual unsigned int GetNumberOfParameters() const ITK_OVERRIDE { return 5; } + unsigned int GetNumberOfParameters() const override { return 5; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { return itk::NumericTraits< MeasureType >::OneValue(); } - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { derivative.Fill( itk::NumericTraits< ParametersValueType >::ZeroValue() ); } - virtual void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = itk::NumericTraits< MeasureType >::OneValue(); derivative.Fill( itk::NumericTraits< ParametersValueType >::ZeroValue() ); } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return 3; } - virtual void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE {} + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override {} - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } - virtual void SetParameters( ParametersType & ) ITK_OVERRIDE {} + void SetParameters( ParametersType & ) override {} - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return false; } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - virtual void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& os, itk::Indent indent) const override { Superclass::PrintSelf( os, indent ); } protected: - ~GradientDescentOptimizerBasev4TestMetric() ITK_OVERRIDE {} + ~GradientDescentOptimizerBasev4TestMetric() override {} private: GradientDescentOptimizerBasev4TestMetric() {} @@ -109,24 +109,24 @@ class GradientDescentOptimizerBasev4TestOptimizer GradientDescentOptimizerBasev4); /* Provide an override for the pure virtual StartOptimization */ - virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE + void StartOptimization( bool doOnlyInitialization = false ) override { Superclass::StartOptimization( doOnlyInitialization ); std::cout << "StartOptimization called. doOnlyInitialization: " << doOnlyInitialization << std::endl; } - virtual void ResumeOptimization() ITK_OVERRIDE + void ResumeOptimization() override { std::cout << "ResumeOptimization called." << std::endl; } - virtual void ModifyGradientByScalesOverSubRange (const IndexRangeType& index ) ITK_OVERRIDE + void ModifyGradientByScalesOverSubRange (const IndexRangeType& index ) override { std::cout << "ModifyGradientByScalesOverSubRange called with index:" << index << std::endl; } - virtual void ModifyGradientByLearningRateOverSubRange (const IndexRangeType& index ) ITK_OVERRIDE + void ModifyGradientByLearningRateOverSubRange (const IndexRangeType& index ) override { std::cout << "ModifyGradientByLearningRateOverSubRange called with index:" << index << std::endl; @@ -135,7 +135,7 @@ class GradientDescentOptimizerBasev4TestOptimizer protected: GradientDescentOptimizerBasev4TestOptimizer(){} - ~GradientDescentOptimizerBasev4TestOptimizer() ITK_OVERRIDE {} + ~GradientDescentOptimizerBasev4TestOptimizer() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(GradientDescentOptimizerBasev4TestOptimizer); diff --git a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx index c9d6609909e..699165f9fc8 100644 --- a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test.cxx @@ -62,16 +62,16 @@ class GradientDescentOptimizerv4TestMetric m_Parameters.Fill( 0 ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { MeasureType value; GetValueAndDerivative( value, derivative ); } void GetValueAndDerivative( MeasureType & value, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { if( derivative.Size() != 2 ) derivative.SetSize(2); @@ -97,39 +97,39 @@ class GradientDescentOptimizerv4TestMetric std::cout << "derivative: " << derivative << std::endl; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { return 0.0; } - virtual void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) override { m_Parameters += update; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return false; } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return SpaceDimension; } /* These Set/Get methods are only needed for this test derivation that * isn't using a transform */ - virtual void SetParameters( ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( ParametersType & parameters ) override { m_Parameters = parameters; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } diff --git a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx index d57cf11dc83..58fd0b4e35d 100644 --- a/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkGradientDescentOptimizerv4Test2.cxx @@ -57,16 +57,16 @@ class GradientDescentOptimizerv4Test2Metric m_Parameters.Fill( 0 ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { MeasureType value; GetValueAndDerivative( value, derivative ); } void GetValueAndDerivative( MeasureType & value, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { if( derivative.Size() != this->GetNumberOfParameters() ) derivative.SetSize( this->GetNumberOfParameters() ); @@ -81,39 +81,39 @@ class GradientDescentOptimizerv4Test2Metric std::cout << "derivative: " << derivative << std::endl; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { return 0.0; } - virtual void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) override { m_Parameters += update; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension * 3; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return false; } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return SpaceDimension; } /* These Set/Get methods are only needed for this test derivation that * isn't using a transform */ - virtual void SetParameters( ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( ParametersType & parameters ) override { m_Parameters = parameters; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx index 156935904c7..ce9d66f9eec 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGS2Optimizerv4Test.cxx @@ -63,7 +63,7 @@ class itkLBFGS2Optimizerv4TestMetric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = false; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { double x = this->m_Parameters[0]; double y = this->m_Parameters[1]; @@ -77,7 +77,7 @@ class itkLBFGS2Optimizerv4TestMetric : public itk::ObjectToObjectMetricBase return val; } - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { double x = this->m_Parameters[0]; double y = this->m_Parameters[1]; @@ -91,38 +91,38 @@ class itkLBFGS2Optimizerv4TestMetric : public itk::ObjectToObjectMetricBase std::cout << "(" << derivative[0] <<" , " << derivative[1] << ")" << std::endl; } - virtual void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = GetValue(); GetDerivative( derivative ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE + void Initialize(void) throw ( itk::ExceptionObject ) override { m_Parameters.SetSize( SpaceDimension ); } - virtual Superclass::NumberOfParametersType GetNumberOfLocalParameters() const ITK_OVERRIDE + Superclass::NumberOfParametersType GetNumberOfLocalParameters() const override { return SpaceDimension; } - virtual Superclass::NumberOfParametersType GetNumberOfParameters(void) const ITK_OVERRIDE + Superclass::NumberOfParametersType GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual void SetParameters( ParametersType & params ) ITK_OVERRIDE + void SetParameters( ParametersType & params ) override { this->m_Parameters = params; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return this->m_Parameters; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return m_HasLocalSupport; } @@ -132,7 +132,7 @@ class itkLBFGS2Optimizerv4TestMetric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = hls; } - virtual void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override { } diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx index 2280cf3c1d7..1e190d12c02 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGSBOptimizerv4Test.cxx @@ -68,32 +68,32 @@ class LBFGSBOptimizerv4TestMetric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = false; } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE + void Initialize(void) throw ( itk::ExceptionObject ) override { m_Parameters.SetSize( SpaceDimension ); } - virtual Superclass::NumberOfParametersType GetNumberOfLocalParameters() const ITK_OVERRIDE + Superclass::NumberOfParametersType GetNumberOfLocalParameters() const override { return SpaceDimension; } - virtual Superclass::NumberOfParametersType GetNumberOfParameters(void) const ITK_OVERRIDE + Superclass::NumberOfParametersType GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual void SetParameters( ParametersType & params ) ITK_OVERRIDE + void SetParameters( ParametersType & params ) override { this->m_Parameters = params; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return this->m_Parameters; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return m_HasLocalSupport; } @@ -103,11 +103,11 @@ class LBFGSBOptimizerv4TestMetric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = hls; } - virtual void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override { } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { double x = m_Parameters[0]; @@ -120,7 +120,7 @@ class LBFGSBOptimizerv4TestMetric : public itk::ObjectToObjectMetricBase return val; } - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { double x = m_Parameters[0]; double y = m_Parameters[1]; @@ -132,7 +132,7 @@ class LBFGSBOptimizerv4TestMetric : public itk::ObjectToObjectMetricBase std::cout << "GetDerivative ( " << x << " , " << y << ") = " << "(" << -derivative[0] << " , " << -derivative[1] << ")" << std::endl; } - virtual void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = GetValue(); GetDerivative( derivative ); @@ -162,12 +162,12 @@ class EventChecker: public itk::Command bool GetHadEndEvent() { return m_HadEndEvent; } - virtual void Execute( itk::Object *caller, const itk::EventObject & event ) ITK_OVERRIDE + void Execute( itk::Object *caller, const itk::EventObject & event ) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute( const itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute( const itk::Object *caller, const itk::EventObject & event) override { if( itk::StartEvent().CheckEvent( &event )) { diff --git a/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx index 75be5b67439..b793174d48d 100644 --- a/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkLBFGSOptimizerv4Test.cxx @@ -65,7 +65,7 @@ class itkLBFGSOptimizerv4TestMetric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = false; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { double x = this->m_Parameters[0]; double y = this->m_Parameters[1]; @@ -79,7 +79,7 @@ class itkLBFGSOptimizerv4TestMetric : public itk::ObjectToObjectMetricBase return val; } - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { double x = this->m_Parameters[0]; double y = this->m_Parameters[1]; @@ -93,38 +93,38 @@ class itkLBFGSOptimizerv4TestMetric : public itk::ObjectToObjectMetricBase std::cout << "(" << derivative[0] <<" , " << derivative[1] << ")" << std::endl; } - virtual void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = GetValue(); GetDerivative( derivative ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE + void Initialize(void) throw ( itk::ExceptionObject ) override { m_Parameters.SetSize( SpaceDimension ); } - virtual Superclass::NumberOfParametersType GetNumberOfLocalParameters() const ITK_OVERRIDE + Superclass::NumberOfParametersType GetNumberOfLocalParameters() const override { return SpaceDimension; } - virtual Superclass::NumberOfParametersType GetNumberOfParameters(void) const ITK_OVERRIDE + Superclass::NumberOfParametersType GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual void SetParameters( ParametersType & params ) ITK_OVERRIDE + void SetParameters( ParametersType & params ) override { this->m_Parameters = params; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return this->m_Parameters; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return m_HasLocalSupport; } @@ -134,7 +134,7 @@ class itkLBFGSOptimizerv4TestMetric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = hls; } - virtual void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override { } diff --git a/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx index 1164cc67361..b5dbd871b9b 100644 --- a/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkMultiGradientOptimizerv4Test.cxx @@ -62,18 +62,18 @@ class MultiGradientOptimizerv4TestMetric typedef Superclass::MeasureType MeasureType; MultiGradientOptimizerv4TestMetric() : - m_Parameters(ITK_NULLPTR) + m_Parameters(nullptr) {} - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { derivative.Fill( itk::NumericTraits< ParametersValueType >::ZeroValue() ); } void GetValueAndDerivative( MeasureType & value, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { if( derivative.Size() != 2 ) derivative.SetSize(2); @@ -99,7 +99,7 @@ class MultiGradientOptimizerv4TestMetric std::cout << "derivative: " << derivative << std::endl; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { double x = (*m_Parameters)[0]; double y = (*m_Parameters)[1]; @@ -108,34 +108,34 @@ class MultiGradientOptimizerv4TestMetric return metric; } - virtual void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) override { (*m_Parameters) += update; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return false; } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return SpaceDimension; } /* These Set/Get methods are only needed for this test derivation that * isn't using a transform */ - virtual void SetParameters( ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( ParametersType & parameters ) override { m_Parameters = ¶meters; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return (*m_Parameters); } @@ -167,18 +167,18 @@ class MultiGradientOptimizerv4TestMetric2 typedef Superclass::MeasureType MeasureType; MultiGradientOptimizerv4TestMetric2() : - m_Parameters(ITK_NULLPTR) + m_Parameters(nullptr) {} - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { derivative.Fill( itk::NumericTraits< ParametersValueType >::ZeroValue() ); } void GetValueAndDerivative( MeasureType & value, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { if( derivative.Size() != 2 ) derivative.SetSize(2); @@ -204,7 +204,7 @@ class MultiGradientOptimizerv4TestMetric2 std::cout << "derivative: " << derivative << std::endl; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { double x = (*m_Parameters)[0]; double y = (*m_Parameters)[1]; @@ -213,34 +213,34 @@ class MultiGradientOptimizerv4TestMetric2 return metric; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return false; } - virtual void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) override { (*m_Parameters) += update; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return SpaceDimension; } /* These Set/Get methods are only needed for this test derivation that * isn't using a transform */ - virtual void SetParameters( ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( ParametersType & parameters ) override { m_Parameters = ¶meters; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return (*m_Parameters); } diff --git a/Modules/Numerics/Optimizersv4/test/itkMultiStartOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkMultiStartOptimizerv4Test.cxx index 5191b5e9ccf..30abf4d5f82 100644 --- a/Modules/Numerics/Optimizersv4/test/itkMultiStartOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkMultiStartOptimizerv4Test.cxx @@ -59,15 +59,15 @@ class MultiStartOptimizerv4TestMetric m_Parameters.Fill( 0 ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { derivative.Fill( itk::NumericTraits< ParametersValueType >::ZeroValue() ); } void GetValueAndDerivative( MeasureType & value, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { if( derivative.Size() != 2 ) derivative.SetSize(2); @@ -93,7 +93,7 @@ class MultiStartOptimizerv4TestMetric std::cout << "derivative: " << derivative << std::endl; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { double x = m_Parameters[0]; double y = m_Parameters[1]; @@ -102,34 +102,34 @@ class MultiStartOptimizerv4TestMetric return metric; } - virtual void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType & update, ParametersValueType ) override { m_Parameters += update; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return false; } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return SpaceDimension; } /* These Set/Get methods are only needed for this test derivation that * isn't using a transform */ - virtual void SetParameters( ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( ParametersType & parameters ) override { m_Parameters = parameters; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } diff --git a/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx b/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx index d47d6cb289c..8aef87f36dd 100644 --- a/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkObjectToObjectMetricBaseTest.cxx @@ -45,49 +45,49 @@ class ObjectToObjectMetricTestMetric: itkNewMacro(Self); // Pure virtual functions that all Metrics must provide - virtual unsigned int GetNumberOfParameters() const ITK_OVERRIDE { return 5; } + unsigned int GetNumberOfParameters() const override { return 5; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { this->m_Value = 1.0; return this->m_Value; } - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { derivative.Fill(0.0); } - virtual void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = 1.0; derivative.Fill(0.0); } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return 0; } - virtual void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE {} + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override {} - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return false; } - virtual void SetParameters( ParametersType & ) ITK_OVERRIDE + void SetParameters( ParametersType & ) override { } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - virtual void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& os, itk::Indent indent) const override { Superclass::PrintSelf( os, indent ); } ParametersType m_Parameters; private: ObjectToObjectMetricTestMetric() {} - ~ObjectToObjectMetricTestMetric() ITK_OVERRIDE {} + ~ObjectToObjectMetricTestMetric() override {} }; int itkObjectToObjectMetricBaseTest(int ,char * []) diff --git a/Modules/Numerics/Optimizersv4/test/itkObjectToObjectOptimizerBaseTest.cxx b/Modules/Numerics/Optimizersv4/test/itkObjectToObjectOptimizerBaseTest.cxx index f04fd4705d6..e0fccfe43bd 100644 --- a/Modules/Numerics/Optimizersv4/test/itkObjectToObjectOptimizerBaseTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkObjectToObjectOptimizerBaseTest.cxx @@ -41,48 +41,48 @@ class ObjectToObjectOptimizerBaseTestMetric: itkNewMacro(Self); // Pure virtual functions that all Metrics must provide - virtual unsigned int GetNumberOfParameters() const ITK_OVERRIDE { return 5; } + unsigned int GetNumberOfParameters() const override { return 5; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { return 1.0; } - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { derivative.Fill(0.0); } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return false; } - virtual void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = 1.0; derivative.Fill(0.0); } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return 3; } - virtual void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE {} + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override {} - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } - virtual void SetParameters( ParametersType & ) ITK_OVERRIDE {} + void SetParameters( ParametersType & ) override {} - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - virtual void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& os, itk::Indent indent) const override { Superclass::PrintSelf( os, indent ); } ParametersType m_Parameters; private: ObjectToObjectOptimizerBaseTestMetric() {} - ~ObjectToObjectOptimizerBaseTestMetric() ITK_OVERRIDE {} + ~ObjectToObjectOptimizerBaseTestMetric() override {} }; /* Define a simple derived optimizer class. @@ -104,14 +104,14 @@ class ObjectToObjectOptimizerBaseTestOptimizer itkTypeMacro(ObjectToObjectOptimizerBaseTestOptimizer, ObjectToObjectOptimizerBase); /* Provide initialization for this class */ - virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE + void StartOptimization( bool doOnlyInitialization = false ) override { Superclass::StartOptimization( doOnlyInitialization ); std::cout << "StartOptimization called from derived class. doOnlyInitialization: " << doOnlyInitialization << std::endl; } /** Stop condition return string type */ - virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE + const StopConditionReturnStringType GetStopConditionDescription() const override { return std::string("Placeholder test return string" ); } diff --git a/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx index 9d9176cc606..2426dfa0463 100644 --- a/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkOnePlusOneEvolutionaryOptimizerv4Test.cxx @@ -63,7 +63,7 @@ class OnePlusOneMetric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = false; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { double x = m_Parameters[0]; double y = m_Parameters[1]; @@ -79,44 +79,44 @@ class OnePlusOneMetric : public itk::ObjectToObjectMetricBase return measure; } - virtual void GetDerivative( DerivativeType & ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & ) const override { itkGenericExceptionMacro("OnePlusOneEvolutionaryOptimizerv4 is not supposed to call GetDerivative()"); } void GetValueAndDerivative( MeasureType & value, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { value = GetValue(); GetDerivative( derivative ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE + void Initialize(void) throw ( itk::ExceptionObject ) override { m_Parameters.SetSize( SpaceDimension ); } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return SpaceDimension; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual void SetParameters( ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( ParametersType & parameters ) override { m_Parameters = parameters; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return m_HasLocalSupport; } @@ -126,7 +126,7 @@ class OnePlusOneMetric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = hls; } - virtual void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override { } @@ -151,12 +151,12 @@ class OnePlusOneCommandIterationUpdate : public itk::Command typedef itk::OnePlusOneEvolutionaryOptimizerv4 OptimizerType; typedef const OptimizerType * OptimizerPointer; - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { OptimizerPointer optimizer = static_cast< OptimizerPointer >( object ); if( ! itk::IterationEvent().CheckEvent( &event ) ) diff --git a/Modules/Numerics/Optimizersv4/test/itkOptimizerParameterScalesEstimatorTest.cxx b/Modules/Numerics/Optimizersv4/test/itkOptimizerParameterScalesEstimatorTest.cxx index 95a63947590..1ccd877fa34 100644 --- a/Modules/Numerics/Optimizersv4/test/itkOptimizerParameterScalesEstimatorTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkOptimizerParameterScalesEstimatorTest.cxx @@ -36,34 +36,34 @@ class OptimizerParameterScalesEstimatorTest: itkTypeMacro(OptimizerParameterScalesEstimatorTest, OptimizerParameterScalesEstimator); /** Estimate parameter scales */ - virtual void EstimateScales(ScalesType &scales) ITK_OVERRIDE + void EstimateScales(ScalesType &scales) override { scales.SetSize(2); scales.Fill(1.0); } - virtual double EstimateStepScale(const ParametersType &step) ITK_OVERRIDE + double EstimateStepScale(const ParametersType &step) override { double norm = step.two_norm(); return norm; } /** Estimate the scales of local steps. */ - virtual void EstimateLocalStepScales(const ParametersType &step, - ScalesType &localStepScales) ITK_OVERRIDE + void EstimateLocalStepScales(const ParametersType &step, + ScalesType &localStepScales) override { localStepScales.SetSize(step.size()); } /** Estimate the trusted scale for steps. */ - virtual double EstimateMaximumStepSize() ITK_OVERRIDE + double EstimateMaximumStepSize() override { return 1.0; } protected: OptimizerParameterScalesEstimatorTest(){}; - ~OptimizerParameterScalesEstimatorTest() ITK_OVERRIDE {}; + ~OptimizerParameterScalesEstimatorTest() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(OptimizerParameterScalesEstimatorTest); diff --git a/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx index cba0b45b11a..837ea4187a8 100644 --- a/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkPowellOptimizerv4Test.cxx @@ -58,7 +58,7 @@ class PowellBoundedMetric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = false; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { ++POWELL_CALLS_TO_GET_VALUE; @@ -76,43 +76,43 @@ class PowellBoundedMetric : public itk::ObjectToObjectMetricBase return measure; } - virtual void GetDerivative( DerivativeType & ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & ) const override { } void GetValueAndDerivative( MeasureType & value, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { value = GetValue(); GetDerivative( derivative ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE + void Initialize(void) throw ( itk::ExceptionObject ) override { m_Parameters.SetSize( SpaceDimension ); } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return SpaceDimension; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual void SetParameters( ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( ParametersType & parameters ) override { m_Parameters = parameters; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return m_HasLocalSupport; } @@ -122,7 +122,7 @@ class PowellBoundedMetric : public itk::ObjectToObjectMetricBase m_HasLocalSupport = hls; } - virtual void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override { } diff --git a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesEstimatorTest.cxx b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesEstimatorTest.cxx index 054ab8235c8..863a1e78d9b 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesEstimatorTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesEstimatorTest.cxx @@ -49,30 +49,30 @@ class RegistrationParameterScalesEstimatorTestMetric: itkNewMacro(Self); // Pure virtual functions that all Metrics must provide - unsigned int GetNumberOfParameters() const ITK_OVERRIDE { return 5; } + unsigned int GetNumberOfParameters() const override { return 5; } - MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { return 1.0; } - void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = 1.0; derivative.Fill(0.0); } - unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return 0; } - void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE {} + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override {} - const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } - void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& os, itk::Indent indent) const override { Superclass::PrintSelf( os, indent ); } ParametersType m_Parameters; @@ -98,7 +98,7 @@ class RegistrationParameterScalesEstimatorTestMetric: private: RegistrationParameterScalesEstimatorTestMetric() {} - ~RegistrationParameterScalesEstimatorTestMetric() ITK_OVERRIDE {} + ~RegistrationParameterScalesEstimatorTestMetric() override {} }; @@ -136,7 +136,7 @@ class RegistrationParameterScalesEstimatorTest: typedef typename Superclass::VirtualImageConstPointer VirtualImageConstPointer; /** Estimate parameter scales with maximum squared norms of Jacobians. */ - virtual void EstimateScales(ScalesType ¶meterScales) ITK_OVERRIDE + void EstimateScales(ScalesType ¶meterScales) override { this->CheckAndSetInputs(); this->SetSamplingStrategy( Superclass::RandomSampling ); @@ -179,22 +179,22 @@ class RegistrationParameterScalesEstimatorTest: } } - virtual double EstimateStepScale(const ParametersType &step) ITK_OVERRIDE + double EstimateStepScale(const ParametersType &step) override { double norm = step.two_norm(); return norm; } /** Estimate the scales of local steps. */ - virtual void EstimateLocalStepScales(const ParametersType &step, - ScalesType &localStepScales) ITK_OVERRIDE + void EstimateLocalStepScales(const ParametersType &step, + ScalesType &localStepScales) override { localStepScales.SetSize(step.size()); } protected: RegistrationParameterScalesEstimatorTest(){}; - ~RegistrationParameterScalesEstimatorTest() ITK_OVERRIDE {}; + ~RegistrationParameterScalesEstimatorTest() override {}; private: ITK_DISALLOW_COPY_AND_ASSIGN(RegistrationParameterScalesEstimatorTest); diff --git a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromIndexShiftTest.cxx b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromIndexShiftTest.cxx index e3876622832..ed4b9db6e9d 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromIndexShiftTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromIndexShiftTest.cxx @@ -48,28 +48,28 @@ class RegistrationParameterScalesFromIndexShiftTestMetric: itkNewMacro(Self); // Pure virtual functions that all Metrics must provide - unsigned int GetNumberOfParameters() const ITK_OVERRIDE { return 5; } + unsigned int GetNumberOfParameters() const override { return 5; } - MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { return 1.0; } - void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = 1.0; derivative.Fill(0.0); } - unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return 0; } - void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE {} + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override {} - const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } - void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} ParametersType m_Parameters; @@ -94,7 +94,7 @@ class RegistrationParameterScalesFromIndexShiftTestMetric: private: RegistrationParameterScalesFromIndexShiftTestMetric() {} - ~RegistrationParameterScalesFromIndexShiftTestMetric() ITK_OVERRIDE {} + ~RegistrationParameterScalesFromIndexShiftTestMetric() override {} }; diff --git a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromJacobianTest.cxx b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromJacobianTest.cxx index f29eaa99dac..8223de2d18f 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromJacobianTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromJacobianTest.cxx @@ -48,28 +48,28 @@ class RegistrationParameterScalesFromJacobianTestMetric: itkNewMacro(Self); // Pure virtual functions that all Metrics must provide - unsigned int GetNumberOfParameters() const ITK_OVERRIDE { return 5; } + unsigned int GetNumberOfParameters() const override { return 5; } - MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { return 1.0; } - void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = 1.0; derivative.Fill(0.0); } - unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return 0; } - void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE {} + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override {} - const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } - void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} ParametersType m_Parameters; @@ -94,7 +94,7 @@ class RegistrationParameterScalesFromJacobianTestMetric: private: RegistrationParameterScalesFromJacobianTestMetric() {} - ~RegistrationParameterScalesFromJacobianTestMetric() ITK_OVERRIDE {} + ~RegistrationParameterScalesFromJacobianTestMetric() override {} }; diff --git a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx index 040bb1098c3..c11acf595a0 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftPointSetTest.cxx @@ -52,16 +52,16 @@ class RegistrationParameterScalesFromPhysicalShiftPointSetTestMetric: itkNewMacro(Self); - virtual MeasureType GetLocalNeighborhoodValue( const PointType &, const PixelType & ) const ITK_OVERRIDE + MeasureType GetLocalNeighborhoodValue( const PointType &, const PixelType & ) const override { return 1.0; } - virtual void GetLocalNeighborhoodValueAndDerivative( const PointType &, MeasureType & measure, LocalDerivativeType & derivative, const PixelType & ) const ITK_OVERRIDE + void GetLocalNeighborhoodValueAndDerivative( const PointType &, MeasureType & measure, LocalDerivativeType & derivative, const PixelType & ) const override { measure = 1.0; derivative.Fill(0.0); } private: RegistrationParameterScalesFromPhysicalShiftPointSetTestMetric() {} - ~RegistrationParameterScalesFromPhysicalShiftPointSetTestMetric() ITK_OVERRIDE {} + ~RegistrationParameterScalesFromPhysicalShiftPointSetTestMetric() override {} }; diff --git a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftTest.cxx b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftTest.cxx index 9691e4cdb38..4030ec0f7dd 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftTest.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegistrationParameterScalesFromPhysicalShiftTest.cxx @@ -47,28 +47,28 @@ class RegistrationParameterScalesFromPhysicalShiftTestMetric: itkNewMacro(Self); // Pure virtual functions that all Metrics must provide - unsigned int GetNumberOfParameters() const ITK_OVERRIDE { return 5; } + unsigned int GetNumberOfParameters() const override { return 5; } - MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { return 1.0; } - void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override { value = 1.0; derivative.Fill(0.0); } - unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return 0; } - void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) ITK_OVERRIDE {} + void UpdateTransformParameters( const DerivativeType &, ParametersValueType ) override {} - const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } - void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} ParametersType m_Parameters; @@ -93,7 +93,7 @@ class RegistrationParameterScalesFromPhysicalShiftTestMetric: private: RegistrationParameterScalesFromPhysicalShiftTestMetric() {} - ~RegistrationParameterScalesFromPhysicalShiftTestMetric() ITK_OVERRIDE {} + ~RegistrationParameterScalesFromPhysicalShiftTestMetric() override {} }; diff --git a/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx b/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx index b83b38ef65e..15f3be0ea4c 100644 --- a/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx +++ b/Modules/Numerics/Optimizersv4/test/itkRegularStepGradientDescentOptimizerv4Test.cxx @@ -61,16 +61,16 @@ class RSGv4TestMetric : public itk::ObjectToObjectMetricBase m_Parameters.Fill( 0 ); } - virtual void Initialize(void) throw ( itk::ExceptionObject ) ITK_OVERRIDE {} + void Initialize(void) throw ( itk::ExceptionObject ) override {} - virtual void GetDerivative( DerivativeType & derivative ) const ITK_OVERRIDE + void GetDerivative( DerivativeType & derivative ) const override { MeasureType value; GetValueAndDerivative( value, derivative ); } void GetValueAndDerivative( MeasureType & value, - DerivativeType & derivative ) const ITK_OVERRIDE + DerivativeType & derivative ) const override { if( derivative.Size() != 2 ) { @@ -100,39 +100,39 @@ class RSGv4TestMetric : public itk::ObjectToObjectMetricBase std::cout << "derivative: " << derivative << std::endl; } - virtual MeasureType GetValue() const ITK_OVERRIDE + MeasureType GetValue() const override { return 0.0; } - virtual void UpdateTransformParameters( const DerivativeType & update, ParametersValueType factor ) ITK_OVERRIDE + void UpdateTransformParameters( const DerivativeType & update, ParametersValueType factor ) override { m_Parameters += update * factor; } - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return SpaceDimension; } - virtual bool HasLocalSupport() const ITK_OVERRIDE + bool HasLocalSupport() const override { return false; } - virtual unsigned int GetNumberOfLocalParameters() const ITK_OVERRIDE + unsigned int GetNumberOfLocalParameters() const override { return SpaceDimension; } // These Set/Get methods are only needed for this test derivation that // isn't using a transform. - virtual void SetParameters( ParametersType & parameters ) ITK_OVERRIDE + void SetParameters( ParametersType & parameters ) override { m_Parameters = parameters; } - virtual const ParametersType & GetParameters() const ITK_OVERRIDE + const ParametersType & GetParameters() const override { return m_Parameters; } diff --git a/Modules/Numerics/Statistics/include/itkChiSquareDistribution.h b/Modules/Numerics/Statistics/include/itkChiSquareDistribution.h index 7f91074e29b..107c938e98d 100644 --- a/Modules/Numerics/Statistics/include/itkChiSquareDistribution.h +++ b/Modules/Numerics/Statistics/include/itkChiSquareDistribution.h @@ -73,16 +73,16 @@ class ITKStatistics_EXPORT ChiSquareDistribution: /** Return the number of parameters. For a Chi-Square * distribution, the number of parameters is 1 (degrees of freedom) */ - virtual SizeValueType GetNumberOfParameters() const ITK_OVERRIDE { return 1; } + SizeValueType GetNumberOfParameters() const override { return 1; } /** Evaluate the probability density function (pdf). The parameters * of the distribution are assigned via SetParameters(). */ - virtual double EvaluatePDF(double x) const ITK_OVERRIDE; + double EvaluatePDF(double x) const override; /** Evaluate the probability density function (pdf). The parameters * for the distribution are passed as a parameters vector. The * ordering of the parameters is (degrees of freedom). */ - virtual double EvaluatePDF(double x, const ParametersType &) const ITK_OVERRIDE; + double EvaluatePDF(double x, const ParametersType &) const override; /** Evaluate the probability density function (pdf). The parameters * of the distribution are passed as separate parameters. */ @@ -90,12 +90,12 @@ class ITKStatistics_EXPORT ChiSquareDistribution: /** Evaluate the cumulative distribution function (cdf). The parameters * of the distribution are assigned via SetParameters(). */ - virtual double EvaluateCDF(double x) const ITK_OVERRIDE; + double EvaluateCDF(double x) const override; /** Evaluate the cumulative distribution function (cdf). The parameters * for the distribution are passed as a parameters vector. The * ordering of the parameters is (degreesOfFreedom). */ - virtual double EvaluateCDF(double x, const ParametersType &) const ITK_OVERRIDE; + double EvaluateCDF(double x, const ParametersType &) const override; /** Evaluate the cumulative distribution function (cdf). The parameters * of the distribution are passed as separate parameters. */ @@ -104,13 +104,13 @@ class ITKStatistics_EXPORT ChiSquareDistribution: /** Evaluate the inverse cumulative distribution function (inverse * cdf). Parameter p must be between 0.0 and 1.0. The parameters * of the distribution are assigned via SetParameters(). */ - virtual double EvaluateInverseCDF(double p) const ITK_OVERRIDE; + double EvaluateInverseCDF(double p) const override; /** Evaluate the inverse cumulative distribution function (inverse * cdf). Parameter p must be between 0.0 and 1.0. The parameters * for the distribution are passed as a parameters vector. The * ordering of the parameters is (degrees of freedom). */ - virtual double EvaluateInverseCDF(double p, const ParametersType &) const ITK_OVERRIDE; + double EvaluateInverseCDF(double p, const ParametersType &) const override; /** Evaluate the inverse cumulative distribution function (inverse * cdf). Parameter p must be between 0.0 and 1.0. The parameters @@ -126,16 +126,16 @@ class ITKStatistics_EXPORT ChiSquareDistribution: virtual SizeValueType GetDegreesOfFreedom() const; /** Does the Chi-Square distribution have a mean? */ - virtual bool HasMean() const ITK_OVERRIDE { return true; } + bool HasMean() const override { return true; } /** Get the mean of the distribution. */ - virtual double GetMean() const ITK_OVERRIDE; + double GetMean() const override; /** Does the Chi-Square distribution have a variance? */ - virtual bool HasVariance() const ITK_OVERRIDE { return true; } + bool HasVariance() const override { return true; } /** Get the variance of the distribution. */ - virtual double GetVariance() const ITK_OVERRIDE; + double GetVariance() const override; /** Static method to evaluate the probability density function (pdf) * of a Chi-Square with a specified number of degrees of freedom. The @@ -197,9 +197,9 @@ class ITKStatistics_EXPORT ChiSquareDistribution: protected: ChiSquareDistribution(); - virtual ~ChiSquareDistribution() ITK_OVERRIDE {} + ~ChiSquareDistribution() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ChiSquareDistribution); diff --git a/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.h b/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.h index 3b3038d24f1..834ebb23c8f 100644 --- a/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.h +++ b/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.h @@ -114,17 +114,17 @@ class ITK_TEMPLATE_EXPORT CovarianceSampleFilter: protected: CovarianceSampleFilter(); - virtual ~CovarianceSampleFilter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CovarianceSampleFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** DataObject pointer */ typedef DataObject::Pointer DataObjectPointer; typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CovarianceSampleFilter); diff --git a/Modules/Numerics/Statistics/include/itkDecisionRule.h b/Modules/Numerics/Statistics/include/itkDecisionRule.h index 415d3d0cff9..4522ea8e18d 100644 --- a/Modules/Numerics/Statistics/include/itkDecisionRule.h +++ b/Modules/Numerics/Statistics/include/itkDecisionRule.h @@ -72,7 +72,7 @@ class ITKStatistics_EXPORT DecisionRule : public Object protected: DecisionRule(); - virtual ~DecisionRule() ITK_OVERRIDE; + ~DecisionRule() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DecisionRule); diff --git a/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h b/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h index a0b4dd526b6..ac2a632d39b 100644 --- a/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h +++ b/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h @@ -106,8 +106,8 @@ class ITKStatistics_EXPORT DenseFrequencyContainer2: protected: DenseFrequencyContainer2(); - virtual ~DenseFrequencyContainer2() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DenseFrequencyContainer2() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DenseFrequencyContainer2); diff --git a/Modules/Numerics/Statistics/include/itkDistanceMetric.h b/Modules/Numerics/Statistics/include/itkDistanceMetric.h index 9173dd0773c..6468bc1ba27 100644 --- a/Modules/Numerics/Statistics/include/itkDistanceMetric.h +++ b/Modules/Numerics/Statistics/include/itkDistanceMetric.h @@ -78,7 +78,7 @@ class ITK_TEMPLATE_EXPORT DistanceMetric:public FunctionBase< TVector, double > /** Gets the distance between the origin point and x. This function * work with SetOrigin() function. */ - virtual double Evaluate(const MeasurementVectorType & x) const ITK_OVERRIDE = 0; + double Evaluate(const MeasurementVectorType & x) const override = 0; /** Gets the distance between x1 and x2. This method is used by * KdTreeKMeans estimators. When the estimator is refactored, @@ -131,8 +131,8 @@ class ITK_TEMPLATE_EXPORT DistanceMetric:public FunctionBase< TVector, double > protected: DistanceMetric(); - virtual ~DistanceMetric() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DistanceMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.h b/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.h index 592c4f9c6f2..e3811273d3a 100644 --- a/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.h +++ b/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.h @@ -68,7 +68,7 @@ class ITK_TEMPLATE_EXPORT DistanceToCentroidMembershipFunction: MeasurementVectorSizeType; /** Set the length of each measurement vector. */ - virtual void SetMeasurementVectorSize(MeasurementVectorSizeType) ITK_OVERRIDE; + void SetMeasurementVectorSize(MeasurementVectorSizeType) override; /** Type of the DistanceMetric to use */ typedef DistanceMetric< MeasurementVectorType > DistanceMetricType; @@ -94,15 +94,15 @@ class ITK_TEMPLATE_EXPORT DistanceToCentroidMembershipFunction: /** * Method to get probability of an instance. The return value is the * value of the density function, not probability. */ - double Evaluate(const MeasurementVectorType & measurement) const ITK_OVERRIDE; + double Evaluate(const MeasurementVectorType & measurement) const override; protected: DistanceToCentroidMembershipFunction(); - virtual ~DistanceToCentroidMembershipFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DistanceToCentroidMembershipFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Return a copy of the current membership function */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DistanceToCentroidMembershipFunction); diff --git a/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.h b/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.h index 078a1884a2a..9022cd5f4e5 100644 --- a/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.h +++ b/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.h @@ -54,10 +54,10 @@ class ITK_TEMPLATE_EXPORT EuclideanDistanceMetric: itkNewMacro(Self); /** Gets the distance between the origin and x */ - double Evaluate(const MeasurementVectorType & x) const ITK_OVERRIDE; + double Evaluate(const MeasurementVectorType & x) const override; /** Gets the distance between x1 and x2 */ - double Evaluate(const MeasurementVectorType & x1, const MeasurementVectorType & x2) const ITK_OVERRIDE; + double Evaluate(const MeasurementVectorType & x1, const MeasurementVectorType & x2) const override; /** Gets the cooridnate distance between a and b. NOTE: a and b * should be type of component. This method is used by @@ -67,7 +67,7 @@ class ITK_TEMPLATE_EXPORT EuclideanDistanceMetric: protected: EuclideanDistanceMetric() {} - virtual ~EuclideanDistanceMetric() ITK_OVERRIDE {} + ~EuclideanDistanceMetric() override {} }; // end of class } // end of namespace Statistics } // end of namespace itk diff --git a/Modules/Numerics/Statistics/include/itkEuclideanSquareDistanceMetric.h b/Modules/Numerics/Statistics/include/itkEuclideanSquareDistanceMetric.h index 95e043ca7a7..a7159e296c2 100644 --- a/Modules/Numerics/Statistics/include/itkEuclideanSquareDistanceMetric.h +++ b/Modules/Numerics/Statistics/include/itkEuclideanSquareDistanceMetric.h @@ -53,14 +53,14 @@ class ITK_TEMPLATE_EXPORT EuclideanSquareDistanceMetric: itkNewMacro(Self); /** Gets the distance between the origin and x */ - double Evaluate(const MeasurementVectorType & x) const ITK_OVERRIDE; + double Evaluate(const MeasurementVectorType & x) const override; /** Gets the distance between x1 and x2 */ - double Evaluate(const MeasurementVectorType & x1, const MeasurementVectorType & x2) const ITK_OVERRIDE; + double Evaluate(const MeasurementVectorType & x1, const MeasurementVectorType & x2) const override; protected: EuclideanSquareDistanceMetric() {} - virtual ~EuclideanSquareDistanceMetric() ITK_OVERRIDE {} + ~EuclideanSquareDistanceMetric() override {} }; // end of class } // end of namespace Statistics } // end of namespace itk diff --git a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h index eab48cb378a..f7c12e3d1f6 100644 --- a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h +++ b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h @@ -169,8 +169,8 @@ class ITK_TEMPLATE_EXPORT ExpectationMaximizationMixtureModelEstimator:public Ob protected: ExpectationMaximizationMixtureModelEstimator(); - virtual ~ExpectationMaximizationMixtureModelEstimator() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ExpectationMaximizationMixtureModelEstimator() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; bool CalculateDensities(); diff --git a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx index 87372e7428b..72f0015251d 100644 --- a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx +++ b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx @@ -29,7 +29,7 @@ namespace Statistics template< typename TSample > ExpectationMaximizationMixtureModelEstimator< TSample > ::ExpectationMaximizationMixtureModelEstimator() : - m_Sample(ITK_NULLPTR), + m_Sample(nullptr), m_MaxIteration(100), m_CurrentIteration(0), m_TerminationCode(NOT_CONVERGED), diff --git a/Modules/Numerics/Statistics/include/itkGaussianDistribution.h b/Modules/Numerics/Statistics/include/itkGaussianDistribution.h index dbcca1e78a2..65072f9ebe6 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianDistribution.h +++ b/Modules/Numerics/Statistics/include/itkGaussianDistribution.h @@ -76,16 +76,16 @@ class ITKStatistics_EXPORT GaussianDistribution: /** Return the number of parameters. For a univariate Gaussian, * this is 2 (mean, variance). */ - virtual SizeValueType GetNumberOfParameters() const ITK_OVERRIDE { return 2; } + SizeValueType GetNumberOfParameters() const override { return 2; } /** Evaluate the probability density function (pdf). The parameters * of the distribution are assigned via SetParameters(). */ - virtual double EvaluatePDF(double x) const ITK_OVERRIDE; + double EvaluatePDF(double x) const override; /** Evaluate the probability density function (pdf). The parameters * for the distribution are passed as a parameters vector. The * ordering of the parameters is (mean, variance). */ - virtual double EvaluatePDF(double x, const ParametersType &) const ITK_OVERRIDE; + double EvaluatePDF(double x, const ParametersType &) const override; /** Evaluate the probability density function (pdf). The parameters * of the distribution are passed as separate parameters. */ @@ -93,12 +93,12 @@ class ITKStatistics_EXPORT GaussianDistribution: /** Evaluate the cumulative distribution function (cdf). The parameters * of the distribution are assigned via SetParameters(). */ - virtual double EvaluateCDF(double x) const ITK_OVERRIDE; + double EvaluateCDF(double x) const override; /** Evaluate the cumulative distribution function (cdf). The parameters * for the distribution are passed as a parameters vector. The * ordering of the parameters is (mean, variance). */ - virtual double EvaluateCDF(double x, const ParametersType &) const ITK_OVERRIDE; + double EvaluateCDF(double x, const ParametersType &) const override; /** Evaluate the cumulative distribution function (cdf). The parameters * of the distribution are passed as separate parameters. */ @@ -107,13 +107,13 @@ class ITKStatistics_EXPORT GaussianDistribution: /** Evaluate the inverse cumulative distribution function (inverse * cdf). Parameter p must be between 0.0 and 1.0. The parameters * of the distribution are assigned via SetParameters(). */ - virtual double EvaluateInverseCDF(double p) const ITK_OVERRIDE; + double EvaluateInverseCDF(double p) const override; /** Evaluate the inverse cumulative distribution function (inverse * cdf). Parameter p must be between 0.0 and 1.0. The parameters * for the distribution are passed as a parameters vector. The * ordering of the parameters is (mean, variance). */ - virtual double EvaluateInverseCDF(double p, const ParametersType &) const ITK_OVERRIDE; + double EvaluateInverseCDF(double p, const ParametersType &) const override; /** Evaluate the inverse cumulative distribution function (inverse * cdf). Parameter p must be between 0.0 and 1.0. The parameters @@ -128,10 +128,10 @@ class ITKStatistics_EXPORT GaussianDistribution: /** Get the mean of the Gaussian distribution. Defaults to 0.0. The * mean is stored in position 0 of the parameters vector. */ - virtual double GetMean() const ITK_OVERRIDE; + double GetMean() const override; /** Does this distribution have a mean? */ - virtual bool HasMean() const ITK_OVERRIDE { return true; } + bool HasMean() const override { return true; } /** Set the variance of the Gaussian distribution. Defaults * to 1.0. The variance is stored in position 1 of the parameters @@ -140,10 +140,10 @@ class ITKStatistics_EXPORT GaussianDistribution: /** Get the variance of the Gaussian distribution. Defaults to * 1.0. The variance is stored in position 1 of the parameters vector. */ - virtual double GetVariance() const ITK_OVERRIDE; + double GetVariance() const override; /** Does this distribution have a variance? */ - virtual bool HasVariance() const ITK_OVERRIDE { return true; } + bool HasVariance() const override { return true; } /** Static method to evaluate the probability density function (pdf) * of a standardized (mean zero, unit variance) Gaussian. The static @@ -232,9 +232,9 @@ class ITKStatistics_EXPORT GaussianDistribution: protected: GaussianDistribution(); - virtual ~GaussianDistribution(void) ITK_OVERRIDE {} + ~GaussianDistribution(void) override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GaussianDistribution); diff --git a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h index a6482330499..6c482e1dca7 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h +++ b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h @@ -106,17 +106,17 @@ class ITK_TEMPLATE_EXPORT GaussianMembershipFunction: itkGetConstReferenceMacro(InverseCovariance, CovarianceMatrixType); /** Evaluate the probability density of a measurement vector. */ - double Evaluate(const MeasurementVectorType & measurement) const ITK_OVERRIDE; + double Evaluate(const MeasurementVectorType & measurement) const override; /** Method to clone a membership function, i.e. create a new instance of * the same type of membership function and configure its ivars to * match. */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; protected: GaussianMembershipFunction(); - virtual ~GaussianMembershipFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GaussianMembershipFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GaussianMembershipFunction); diff --git a/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.h b/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.h index 95551d5843d..349c902c6cc 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.h +++ b/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.h @@ -84,22 +84,22 @@ class ITK_TEMPLATE_EXPORT GaussianMixtureModelComponent: typedef typename CovarianceEstimatorType::OutputType CovarianceMatrixType; /** Sets the input sample */ - void SetSample(const TSample *sample) ITK_OVERRIDE; + void SetSample(const TSample *sample) override; /** Sets the component's distribution parameters. */ - void SetParameters(const ParametersType & parameters) ITK_OVERRIDE; + void SetParameters(const ParametersType & parameters) override; protected: GaussianMixtureModelComponent(); - virtual ~GaussianMixtureModelComponent() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GaussianMixtureModelComponent() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Returns the sum of squared changes in parameters between * iterations */ double CalculateParametersChange(); /** Computes the new distribution parameters */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: typename NativeMembershipFunctionType::Pointer m_GaussianMembershipFunction; diff --git a/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.h b/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.h index 71fd64c8052..4aa42b4bcf2 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.h +++ b/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.h @@ -97,19 +97,19 @@ template < typename TSample, typename TRegion > * This does a complete copy of the subsampler state * to the new subsampler */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; GaussianRandomSpatialNeighborSubsampler(); - virtual ~GaussianRandomSpatialNeighborSubsampler() ITK_OVERRIDE {}; + ~GaussianRandomSpatialNeighborSubsampler() override {}; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** method to randomly generate an integer in the closed range * [0, upperBound] * usign a gaussian selection method. */ - virtual RandomIntType GetIntegerVariate(RandomIntType lowerBound, + RandomIntType GetIntegerVariate(RandomIntType lowerBound, RandomIntType upperBound, - RandomIntType mean) ITK_OVERRIDE; + RandomIntType mean) override; RealType m_Variance; diff --git a/Modules/Numerics/Statistics/include/itkHistogram.h b/Modules/Numerics/Statistics/include/itkHistogram.h index 429a0735982..0bcc78c6fc3 100644 --- a/Modules/Numerics/Statistics/include/itkHistogram.h +++ b/Modules/Numerics/Statistics/include/itkHistogram.h @@ -171,7 +171,7 @@ class ITK_TEMPLATE_EXPORT Histogram: InstanceIdentifier GetInstanceIdentifier(const IndexType & index) const; /** Returns the number of instances (bins or cells) in this container */ - InstanceIdentifier Size() const ITK_OVERRIDE; + InstanceIdentifier Size() const override; /** Get the size (N-dimensional) of the histogram */ const SizeType & GetSize() const; @@ -224,7 +224,7 @@ class ITK_TEMPLATE_EXPORT Histogram: const MeasurementVectorType & GetHistogramMaxFromIndex(const IndexType & index) const; /** Get the frequency of an instance identifier */ - AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const ITK_OVERRIDE; + AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override; /** Get the frequency of an index */ AbsoluteFrequencyType GetFrequency(const IndexType & index) const; @@ -271,7 +271,7 @@ class ITK_TEMPLATE_EXPORT Histogram: /** Get the measurement of an instance identifier. This is the * centroid of the bin. */ - const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const ITK_OVERRIDE; + const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override; /** Get the measurement of an index. This is the centroid of the bin. */ const MeasurementVectorType & GetMeasurementVector(const IndexType & index) const; @@ -282,7 +282,7 @@ class ITK_TEMPLATE_EXPORT Histogram: unsigned int dimension) const; /** Get the total frequency in the histogram */ - TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE; + TotalAbsoluteFrequencyType GetTotalFrequency() const override; /** Get the frequency of a dimension's nth element. */ AbsoluteFrequencyType GetFrequency(InstanceIdentifier n, @@ -309,10 +309,10 @@ class ITK_TEMPLATE_EXPORT Histogram: double Mean(unsigned int dimension) const; /** Method to graft another histogram's output */ - virtual void Graft(const DataObject *) ITK_OVERRIDE; + void Graft(const DataObject *) override; protected: - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; public: @@ -463,7 +463,7 @@ class ITK_TEMPLATE_EXPORT Histogram: protected: Histogram(); - virtual ~Histogram() ITK_OVERRIDE {} + ~Histogram() override {} // The number of bins for each dimension SizeType m_Size; @@ -478,7 +478,7 @@ class ITK_TEMPLATE_EXPORT Histogram: // This method is provided here just to avoid a "hidden" warning // related to the virtual method available in DataObject. - virtual void Initialize() ITK_OVERRIDE {} + void Initialize() override {} // lower bound of each bin std::vector< std::vector< MeasurementType > > m_Min; diff --git a/Modules/Numerics/Statistics/include/itkHistogramToEntropyImageFilter.h b/Modules/Numerics/Statistics/include/itkHistogramToEntropyImageFilter.h index 395c46415ba..12a93e8e2fa 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToEntropyImageFilter.h +++ b/Modules/Numerics/Statistics/include/itkHistogramToEntropyImageFilter.h @@ -124,7 +124,7 @@ class HistogramToEntropyImageFilter: protected: HistogramToEntropyImageFilter() {} - virtual ~HistogramToEntropyImageFilter() ITK_OVERRIDE {} + ~HistogramToEntropyImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(HistogramToEntropyImageFilter); diff --git a/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.h b/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.h index 0d39f81fe48..20baddb6a27 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.h +++ b/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.h @@ -115,15 +115,15 @@ class ITK_TEMPLATE_EXPORT HistogramToImageFilter: protected: HistogramToImageFilter(); - ~HistogramToImageFilter() ITK_OVERRIDE; + ~HistogramToImageFilter() override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; FunctorType m_Functor; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HistogramToImageFilter); diff --git a/Modules/Numerics/Statistics/include/itkHistogramToIntensityImageFilter.h b/Modules/Numerics/Statistics/include/itkHistogramToIntensityImageFilter.h index b2f09b5e64a..79d2471ec96 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToIntensityImageFilter.h +++ b/Modules/Numerics/Statistics/include/itkHistogramToIntensityImageFilter.h @@ -98,7 +98,7 @@ class HistogramToIntensityImageFilter: protected: HistogramToIntensityImageFilter() {} - virtual ~HistogramToIntensityImageFilter() ITK_OVERRIDE {} + ~HistogramToIntensityImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(HistogramToIntensityImageFilter); diff --git a/Modules/Numerics/Statistics/include/itkHistogramToLogProbabilityImageFilter.h b/Modules/Numerics/Statistics/include/itkHistogramToLogProbabilityImageFilter.h index 19f8ec6743a..8d9b7f0b713 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToLogProbabilityImageFilter.h +++ b/Modules/Numerics/Statistics/include/itkHistogramToLogProbabilityImageFilter.h @@ -119,7 +119,7 @@ class HistogramToLogProbabilityImageFilter: protected: HistogramToLogProbabilityImageFilter() {} - virtual ~HistogramToLogProbabilityImageFilter() ITK_OVERRIDE {} + ~HistogramToLogProbabilityImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(HistogramToLogProbabilityImageFilter); diff --git a/Modules/Numerics/Statistics/include/itkHistogramToProbabilityImageFilter.h b/Modules/Numerics/Statistics/include/itkHistogramToProbabilityImageFilter.h index b85b7ada07f..97aafad9859 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToProbabilityImageFilter.h +++ b/Modules/Numerics/Statistics/include/itkHistogramToProbabilityImageFilter.h @@ -109,7 +109,7 @@ class HistogramToProbabilityImageFilter: protected: HistogramToProbabilityImageFilter() {} - virtual ~HistogramToProbabilityImageFilter() ITK_OVERRIDE {} + ~HistogramToProbabilityImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(HistogramToProbabilityImageFilter); diff --git a/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h b/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h index dded1fb3ddc..84915c508dd 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h +++ b/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h @@ -160,15 +160,15 @@ class ITK_TEMPLATE_EXPORT HistogramToRunLengthFeaturesFilter : public ProcessObj protected: HistogramToRunLengthFeaturesFilter(); - ~HistogramToRunLengthFeaturesFilter() ITK_OVERRIDE {}; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~HistogramToRunLengthFeaturesFilter() override {}; + void PrintSelf(std::ostream& os, Indent indent) const override; /** Make a DataObject to be used for output output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType ) ITK_OVERRIDE; + DataObjectPointer MakeOutput( DataObjectPointerArraySizeType ) override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HistogramToRunLengthFeaturesFilter); diff --git a/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx b/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx index fdf7931b5a6..4778fd6a407 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx @@ -58,7 +58,7 @@ HistogramToRunLengthFeaturesFilter< THistogram> { if ( this->GetNumberOfInputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return itkDynamicCastInDebugMode(this->ProcessObject::GetInput( 0 ) ); } diff --git a/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h b/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h index 9175309b3ce..046a0c4eae7 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h +++ b/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h @@ -202,15 +202,15 @@ class ITK_TEMPLATE_EXPORT HistogramToTextureFeaturesFilter:public ProcessObject protected: HistogramToTextureFeaturesFilter(); - ~HistogramToTextureFeaturesFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~HistogramToTextureFeaturesFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Make a DataObject to be used for output output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HistogramToTextureFeaturesFilter); diff --git a/Modules/Numerics/Statistics/include/itkImageClassifierFilter.h b/Modules/Numerics/Statistics/include/itkImageClassifierFilter.h index 59fe92fedf6..76e5637c522 100644 --- a/Modules/Numerics/Statistics/include/itkImageClassifierFilter.h +++ b/Modules/Numerics/Statistics/include/itkImageClassifierFilter.h @@ -147,13 +147,13 @@ class ITK_TEMPLATE_EXPORT ImageClassifierFilter: protected: ImageClassifierFilter(); - virtual ~ImageClassifierFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageClassifierFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; ITK_DISALLOW_COPY_AND_ASSIGN(ImageClassifierFilter); /** Starts the classification process */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: diff --git a/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx b/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx index 58cd8ba127e..61560a49caf 100644 --- a/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx @@ -34,7 +34,7 @@ ImageClassifierFilter< TSample, TInputImage, TOutputImage > this->SetNumberOfRequiredOutputs(1); /** Initialize decision rule */ - m_DecisionRule = ITK_NULLPTR; + m_DecisionRule = nullptr; m_NumberOfClasses = 0; } @@ -143,7 +143,7 @@ ImageClassifierFilter< TSample, TInputImage, TOutputImage > } MembershipFunctionsWeightsArrayType membershipFunctionsWeightsArray; - if ( membershipFunctionsWeightsArrayDecorated == ITK_NULLPTR ) + if ( membershipFunctionsWeightsArrayDecorated == nullptr ) { // no weights array is set and hence all membership functions will have // equal diff --git a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.h b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.h index 6e38a41e9c4..7bf56ccafe4 100644 --- a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.h +++ b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.h @@ -119,17 +119,17 @@ class ITK_TEMPLATE_EXPORT ImageToHistogramFilter:public ImageTransformer protected: ImageToHistogramFilter(); - virtual ~ImageToHistogramFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageToHistogramFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void BeforeThreadedGenerateData(void) ITK_OVERRIDE; - void ThreadedGenerateData(const RegionType & inputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; - void AfterThreadedGenerateData(void) ITK_OVERRIDE; + void BeforeThreadedGenerateData(void) override; + void ThreadedGenerateData(const RegionType & inputRegionForThread, ThreadIdType threadId) override; + void AfterThreadedGenerateData(void) override; /** Method that construct the outputs */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE; + DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType) override; virtual void ThreadedComputeMinimumAndMaximum( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress ); virtual void ThreadedComputeHistogram( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress ); diff --git a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx index 8307c01c676..2965bb2a7ab 100644 --- a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx @@ -254,7 +254,7 @@ ImageToHistogramFilter< TImage > m_Histograms.clear(); m_Minimums.clear(); m_Maximums.clear(); - m_Barrier = ITK_NULLPTR; + m_Barrier = nullptr; } diff --git a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h index 31a1af05df8..b78704a8595 100644 --- a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h @@ -106,12 +106,12 @@ class ITK_TEMPLATE_EXPORT ImageToListSampleAdaptor: const TImage * GetImage() const; /** returns the number of measurement vectors in this container */ - InstanceIdentifier Size() const ITK_OVERRIDE; + InstanceIdentifier Size() const override; /** method to return measurement vector for a specified id */ - virtual const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const ITK_OVERRIDE; + const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override; - virtual MeasurementVectorSizeType GetMeasurementVectorSize() const ITK_OVERRIDE + MeasurementVectorSizeType GetMeasurementVectorSize() const override { // some filter are expected that this method returns something even if the // input is not set. This won't be the right value for a variable length vector @@ -127,10 +127,10 @@ class ITK_TEMPLATE_EXPORT ImageToListSampleAdaptor: } /** method to return frequency for a specified id */ - AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const ITK_OVERRIDE; + AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override; /** method to return the total frequency */ - TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE; + TotalAbsoluteFrequencyType GetTotalFrequency() const override; /** \class ConstIterator * \brief Const Iterator @@ -291,8 +291,8 @@ class ITK_TEMPLATE_EXPORT ImageToListSampleAdaptor: protected: ImageToListSampleAdaptor(); - virtual ~ImageToListSampleAdaptor() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageToListSampleAdaptor() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageToListSampleAdaptor); diff --git a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx index 8f5343e8ac6..59ebc2e94ab 100644 --- a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx @@ -28,7 +28,7 @@ template< typename TImage > ImageToListSampleAdaptor< TImage > ::ImageToListSampleAdaptor() { - m_Image = ITK_NULLPTR; + m_Image = nullptr; } template< typename TImage > diff --git a/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.h b/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.h index a0e85799430..5200b398f2c 100644 --- a/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.h +++ b/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.h @@ -113,23 +113,23 @@ class ITK_TEMPLATE_EXPORT ImageToListSampleFilter: protected: ImageToListSampleFilter(); - virtual ~ImageToListSampleFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageToListSampleFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Standard itk::ProcessObject subclass method. */ typedef DataObject::Pointer DataObjectPointer; typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; /** This method causes the filter to generate its output. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** This method ensures that a mask image if specified has requested regions * that at least contain the input image's buffered region. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageToListSampleFilter); diff --git a/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx index df0828da3eb..9dddf4cd8c8 100644 --- a/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx @@ -99,7 +99,7 @@ ImageToListSampleFilter< TImage, TMaskImage > { const ImageType *input = this->GetInput(); - if ( input == ITK_NULLPTR ) + if ( input == nullptr ) { itkExceptionMacro("Input image has not been set yet"); } @@ -128,7 +128,7 @@ ImageToListSampleFilter< TImage, TMaskImage > static_cast< ListSampleType * >( this->ProcessObject::GetOutput(0) ); const ImageType * input = this->GetInput(); - const MaskImageType *maskImage = ITK_NULLPTR; + const MaskImageType *maskImage = nullptr; // Verify whether the image and the mask have the same LargestPossibleRegion. // Otherwise, throw an exception. diff --git a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h index 3ed66c91e13..5158ae13f90 100644 --- a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h @@ -129,16 +129,16 @@ class ITK_TEMPLATE_EXPORT ImageToNeighborhoodSampleAdaptor : /** returns the number of measurement vectors in this container */ - InstanceIdentifier Size() const ITK_OVERRIDE; + InstanceIdentifier Size() const override; /** method to return measurement vector for a specified id */ - virtual const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const ITK_OVERRIDE; + const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override; /** method to return frequency for a specified id */ - AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const ITK_OVERRIDE; + AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override; /** method to return the total frequency */ - TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE; + TotalAbsoluteFrequencyType GetTotalFrequency() const override; /** \class ConstIterator * \brief Const Iterator @@ -297,8 +297,8 @@ class ITK_TEMPLATE_EXPORT ImageToNeighborhoodSampleAdaptor : protected: ImageToNeighborhoodSampleAdaptor(); - virtual ~ImageToNeighborhoodSampleAdaptor() ITK_OVERRIDE {} - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~ImageToNeighborhoodSampleAdaptor() override {} + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageToNeighborhoodSampleAdaptor); diff --git a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx index 2fdca83c549..bc18131cc70 100644 --- a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx @@ -26,7 +26,7 @@ namespace Statistics { template < typename TImage, typename TBoundaryCondition> ImageToNeighborhoodSampleAdaptor< TImage, TBoundaryCondition> ::ImageToNeighborhoodSampleAdaptor() : - m_Image(ITK_NULLPTR), + m_Image(nullptr), m_InstanceIdentifierInternal(0), m_UseImageRegion(true) { diff --git a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h index 3e38103a81d..8422b3dc9a6 100644 --- a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h @@ -149,13 +149,13 @@ class ITK_TEMPLATE_EXPORT JointDomainImageToListSampleAdaptor: const TImage * GetImage() const; /** returns the number of measurement vectors in this container */ - InstanceIdentifier Size() const ITK_OVERRIDE; + InstanceIdentifier Size() const override; /** Get frequency */ - AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const ITK_OVERRIDE; + AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override; /** Get total frequency */ - TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE; + TotalAbsoluteFrequencyType GetTotalFrequency() const override; itkStaticConstMacro(RangeDomainDimension, unsigned int, itk::PixelTraits< typename TImage::PixelType >::Dimension); @@ -171,14 +171,14 @@ class ITK_TEMPLATE_EXPORT JointDomainImageToListSampleAdaptor: /** Gets the measurement vector specified by the instance * identifier. This method overrides superclass method. */ - const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const ITK_OVERRIDE; + const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override; /** Method to set UsePixelContainer flag */ itkSetMacro(UsePixelContainer, bool); itkGetConstMacro(UsePixelContainer, bool); itkBooleanMacro(UsePixelContainer); - // void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + // void PrintSelf(std::ostream& os, Indent indent) const override; /** \class ConstIterator * \brief Const Iterator @@ -328,8 +328,8 @@ class ITK_TEMPLATE_EXPORT JointDomainImageToListSampleAdaptor: protected: JointDomainImageToListSampleAdaptor(); - virtual ~JointDomainImageToListSampleAdaptor() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~JointDomainImageToListSampleAdaptor() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(JointDomainImageToListSampleAdaptor); diff --git a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx index 429842c2e34..e11658bea23 100644 --- a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx @@ -29,7 +29,7 @@ JointDomainImageToListSampleAdaptor< TImage > ::JointDomainImageToListSampleAdaptor() { m_NormalizationFactors.Fill(1.0f); - m_Image = ITK_NULLPTR; + m_Image = nullptr; m_UsePixelContainer = true; } diff --git a/Modules/Numerics/Statistics/include/itkKdTree.h b/Modules/Numerics/Statistics/include/itkKdTree.h index e97c523e23e..0e26bcbafda 100644 --- a/Modules/Numerics/Statistics/include/itkKdTree.h +++ b/Modules/Numerics/Statistics/include/itkKdTree.h @@ -145,35 +145,35 @@ struct ITK_TEMPLATE_EXPORT KdTreeNonterminalNode:public KdTreeNode KdTreeNonterminalNode( unsigned int, MeasurementType, Superclass *, Superclass * ); - virtual ~KdTreeNonterminalNode() {} + ~KdTreeNonterminalNode() override {} - virtual bool IsTerminal() const + bool IsTerminal() const override { return false; } - void GetParameters( unsigned int &, MeasurementType & ) const; + void GetParameters( unsigned int &, MeasurementType & ) const override; /** Returns the pointer to the left child of this node */ - Superclass * Left() + Superclass * Left() override { return m_Left; } /** Returns the pointer to the right child of this node */ - Superclass * Right() + Superclass * Right() override { return m_Right; } /** Returns the const pointer to the left child of this node */ - const Superclass * Left() const + const Superclass * Left() const override { return m_Left; } /** Returns the const pointer to the right child of this node */ - const Superclass * Right() const + const Superclass * Right() const override { return m_Right; } @@ -182,7 +182,7 @@ struct ITK_TEMPLATE_EXPORT KdTreeNonterminalNode:public KdTreeNode * Returs the number of measurement vectors under this node including * its children */ - unsigned int Size() const + unsigned int Size() const override { return 0; } @@ -191,20 +191,20 @@ struct ITK_TEMPLATE_EXPORT KdTreeNonterminalNode:public KdTreeNode * Returns the vector sum of the all measurement vectors under this node. * Do nothing for this class. */ - void GetWeightedCentroid( CentroidType & ) {} + void GetWeightedCentroid( CentroidType & ) override {} /** * Returns the centroid. weighted centroid divided by the size. Do nothing for * this class. */ - void GetCentroid( CentroidType & ) {} + void GetCentroid( CentroidType & ) override {} /** * Returns the identifier of the only MeasurementVector associated with * this node in the tree. This MeasurementVector will be used later during * the distance computation when querying the tree. */ - InstanceIdentifier GetInstanceIdentifier( InstanceIdentifier ) const + InstanceIdentifier GetInstanceIdentifier( InstanceIdentifier ) const override { return this->m_InstanceIdentifier; } @@ -212,7 +212,7 @@ struct ITK_TEMPLATE_EXPORT KdTreeNonterminalNode:public KdTreeNode /** * Set the identifier of the node. */ - void AddInstanceIdentifier( InstanceIdentifier valueId ) + void AddInstanceIdentifier( InstanceIdentifier valueId ) override { this->m_InstanceIdentifier = valueId; } @@ -253,16 +253,16 @@ struct ITK_TEMPLATE_EXPORT KdTreeWeightedCentroidNonterminalNode:public KdTreeNo KdTreeWeightedCentroidNonterminalNode( unsigned int, MeasurementType, Superclass *, Superclass *, CentroidType &, unsigned int ); - virtual ~KdTreeWeightedCentroidNonterminalNode() {} + ~KdTreeWeightedCentroidNonterminalNode() override {} /** Not a terminal node. */ - virtual bool IsTerminal() const + bool IsTerminal() const override { return false; } /** Return the parameters of the node. */ - void GetParameters( unsigned int &, MeasurementType & ) const; + void GetParameters( unsigned int &, MeasurementType & ) const override; /** Return the length of a measurement vector */ MeasurementVectorSizeType GetMeasurementVectorSize() const @@ -271,31 +271,31 @@ struct ITK_TEMPLATE_EXPORT KdTreeWeightedCentroidNonterminalNode:public KdTreeNo } /** Return the left tree pointer. */ - Superclass * Left() + Superclass * Left() override { return m_Left; } /** Return the right tree pointer. */ - Superclass * Right() + Superclass * Right() override { return m_Right; } /** Return the left tree const pointer. */ - const Superclass * Left() const + const Superclass * Left() const override { return m_Left; } /** Return the right tree const pointer. */ - const Superclass * Right() const + const Superclass * Right() const override { return m_Right; } /** Return the size of the node. */ - unsigned int Size() const + unsigned int Size() const override { return m_Size; } @@ -303,7 +303,7 @@ struct ITK_TEMPLATE_EXPORT KdTreeWeightedCentroidNonterminalNode:public KdTreeNo /** * Returns the vector sum of the all measurement vectors under this node. */ - void GetWeightedCentroid(CentroidType & centroid) + void GetWeightedCentroid(CentroidType & centroid) override { centroid = m_WeightedCentroid; } @@ -311,7 +311,7 @@ struct ITK_TEMPLATE_EXPORT KdTreeWeightedCentroidNonterminalNode:public KdTreeNo /** * Returns the centroid. weighted centroid divided by the size. */ - void GetCentroid(CentroidType & centroid) + void GetCentroid(CentroidType & centroid) override { centroid = m_Centroid; } @@ -321,7 +321,7 @@ struct ITK_TEMPLATE_EXPORT KdTreeWeightedCentroidNonterminalNode:public KdTreeNo * this node in the tree. This MeasurementVector will be used later during * the distance computation when querying the tree. */ - InstanceIdentifier GetInstanceIdentifier(InstanceIdentifier) const + InstanceIdentifier GetInstanceIdentifier(InstanceIdentifier) const override { return this->m_InstanceIdentifier; } @@ -329,7 +329,7 @@ struct ITK_TEMPLATE_EXPORT KdTreeWeightedCentroidNonterminalNode:public KdTreeNo /** * Set the identifier of the node. */ - void AddInstanceIdentifier(InstanceIdentifier valueId) + void AddInstanceIdentifier(InstanceIdentifier valueId) override { this->m_InstanceIdentifier = valueId; } @@ -368,46 +368,46 @@ struct ITK_TEMPLATE_EXPORT KdTreeTerminalNode:public KdTreeNode KdTreeTerminalNode() {} - virtual ~KdTreeTerminalNode() + ~KdTreeTerminalNode() override { this->m_InstanceIdentifiers.clear(); } /** A terminal node. */ - bool IsTerminal() const + bool IsTerminal() const override { return true; } /** Return the parameters of the node. */ - void GetParameters( unsigned int &, MeasurementType & ) const {} + void GetParameters( unsigned int &, MeasurementType & ) const override {} /** Return the left tree pointer. Null for terminal nodes. */ - Superclass * Left() + Superclass * Left() override { - return ITK_NULLPTR; + return nullptr; } /** Return the right tree pointer. Null for terminal nodes. */ - Superclass * Right() + Superclass * Right() override { - return ITK_NULLPTR; + return nullptr; } /** Return the left tree const pointer. Null for terminal nodes. */ - const Superclass * Left() const + const Superclass * Left() const override { - return ITK_NULLPTR; + return nullptr; } /** Return the right tree const pointer. Null for terminal nodes. */ - const Superclass * Right() const + const Superclass * Right() const override { - return ITK_NULLPTR; + return nullptr; } /** Return the size of the node. */ - unsigned int Size() const + unsigned int Size() const override { return static_cast< unsigned int >( m_InstanceIdentifiers.size() ); } @@ -416,20 +416,20 @@ struct ITK_TEMPLATE_EXPORT KdTreeTerminalNode:public KdTreeNode * Returns the vector sum of the all measurement vectors under this node. * Do nothing for this case. */ - void GetWeightedCentroid( CentroidType & ) {} + void GetWeightedCentroid( CentroidType & ) override {} /** * Returns the centroid. weighted centroid divided by the size. Do nothing * for this case. */ - void GetCentroid( CentroidType & ) {} + void GetCentroid( CentroidType & ) override {} /** * Returns the identifier of the only MeasurementVector associated with * this node in the tree. This MeasurementVector will be used later during * the distance computation when querying the tree. */ - InstanceIdentifier GetInstanceIdentifier( InstanceIdentifier index ) const + InstanceIdentifier GetInstanceIdentifier( InstanceIdentifier index ) const override { return m_InstanceIdentifiers[index]; } @@ -437,7 +437,7 @@ struct ITK_TEMPLATE_EXPORT KdTreeTerminalNode:public KdTreeNode /** * Set the identifier of the node. */ - void AddInstanceIdentifier( InstanceIdentifier id ) + void AddInstanceIdentifier( InstanceIdentifier id ) override { m_InstanceIdentifiers.push_back( id ); } @@ -721,9 +721,9 @@ class ITK_TEMPLATE_EXPORT KdTree:public Object KdTree(); /** Destructor: deletes the root node and the empty terminal node. */ - virtual ~KdTree() ITK_OVERRIDE; + ~KdTree() override; - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; /** search loop */ int NearestNeighborSearchLoop( const KdTreeNodeType *, diff --git a/Modules/Numerics/Statistics/include/itkKdTree.hxx b/Modules/Numerics/Statistics/include/itkKdTree.hxx index d380a59f702..94c1b0a27f1 100644 --- a/Modules/Numerics/Statistics/include/itkKdTree.hxx +++ b/Modules/Numerics/Statistics/include/itkKdTree.hxx @@ -82,8 +82,8 @@ KdTree this->m_EmptyTerminalNode = new KdTreeTerminalNode(); this->m_DistanceMetric = DistanceMetricType::New(); - this->m_Sample = ITK_NULLPTR; - this->m_Root = ITK_NULLPTR; + this->m_Sample = nullptr; + this->m_Root = nullptr; this->m_BucketSize = 16; this->m_MeasurementVectorSize = 0; } @@ -92,7 +92,7 @@ template KdTree ::~KdTree() { - if( this->m_Root != ITK_NULLPTR ) + if( this->m_Root != nullptr ) { this->DeleteNode( this->m_Root ); } @@ -107,7 +107,7 @@ KdTree Superclass::PrintSelf( os, indent ); os << indent << "Input Sample: "; - if( this->m_Sample != ITK_NULLPTR ) + if( this->m_Sample != nullptr ) { os << this->m_Sample << std::endl; } @@ -117,7 +117,7 @@ KdTree } os << indent << "Bucket Size: " << this->m_BucketSize << std::endl; os << indent << "Root Node: "; - if( this->m_Root != ITK_NULLPTR ) + if( this->m_Root != nullptr ) { os << this->m_Root << std::endl; } @@ -147,12 +147,12 @@ KdTree } // non-terminal node - if( node->Left() != ITK_NULLPTR ) + if( node->Left() != nullptr ) { this->DeleteNode( node->Left() ); } - if( node->Right() != ITK_NULLPTR ) + if( node->Right() != nullptr ) { this->DeleteNode( node->Right() ); } diff --git a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h index a0b95ea7594..3a6257cbcda 100644 --- a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h +++ b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h @@ -163,9 +163,9 @@ class ITK_TEMPLATE_EXPORT KdTreeBasedKmeansEstimator: protected: KdTreeBasedKmeansEstimator(); - virtual ~KdTreeBasedKmeansEstimator() ITK_OVERRIDE {} + ~KdTreeBasedKmeansEstimator() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; void FillClusterLabels(KdTreeNodeType *node, int closestIndex); diff --git a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx index cb383984ef8..d01c9a798eb 100644 --- a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx +++ b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx @@ -32,7 +32,7 @@ KdTreeBasedKmeansEstimator< TKdTree > m_MaximumIteration(100), m_CentroidPositionChanges(0.0), m_CentroidPositionChangesThreshold(0.0), - m_KdTree(ITK_NULLPTR), + m_KdTree(nullptr), m_DistanceMetric(EuclideanDistanceMetric< ParameterType >::New()), m_UseClusterLabels(false), m_GenerateClusterLabels(false), diff --git a/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h b/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h index 702c6ab9fd2..c977a309c40 100644 --- a/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h +++ b/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h @@ -138,9 +138,9 @@ class ITK_TEMPLATE_EXPORT KdTreeGenerator:public Object KdTreeGenerator(); /** Destructor */ - virtual ~KdTreeGenerator() ITK_OVERRIDE {} + ~KdTreeGenerator() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Returns the smart pointer to the internal Subsample object. */ SubsamplePointer GetSubsample() diff --git a/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx b/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx index 489969416f3..4b2f6238cb6 100644 --- a/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx +++ b/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx @@ -28,7 +28,7 @@ template< typename TSample > KdTreeGenerator< TSample > ::KdTreeGenerator() { - m_SourceSample = ITK_NULLPTR; + m_SourceSample = nullptr; m_BucketSize = 16; m_Subsample = SubsampleType::New(); m_MeasurementVectorSize = 0; @@ -42,7 +42,7 @@ KdTreeGenerator< TSample > Superclass::PrintSelf(os, indent); os << indent << "Source Sample: "; - if ( m_SourceSample != ITK_NULLPTR ) + if ( m_SourceSample != nullptr ) { os << m_SourceSample << std::endl; } @@ -83,7 +83,7 @@ void KdTreeGenerator< TSample > ::GenerateData() { - if ( m_SourceSample == ITK_NULLPTR ) + if ( m_SourceSample == nullptr ) { return; } diff --git a/Modules/Numerics/Statistics/include/itkListSample.h b/Modules/Numerics/Statistics/include/itkListSample.h index 100fc42fe26..7defe5f662b 100644 --- a/Modules/Numerics/Statistics/include/itkListSample.h +++ b/Modules/Numerics/Statistics/include/itkListSample.h @@ -94,11 +94,11 @@ class ITK_TEMPLATE_EXPORT ListSample:public Sample< TMeasurementVector > void PushBack(const MeasurementVectorType & mv); /** Get the number of measurement vectors in the sample */ - InstanceIdentifier Size() const ITK_OVERRIDE; + InstanceIdentifier Size() const override; /** Get the measurement associated with the specified * InstanceIdentifier */ - const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const ITK_OVERRIDE; + const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override; /** Set a component a measurement to a particular value. */ void SetMeasurement(InstanceIdentifier id, @@ -111,14 +111,14 @@ class ITK_TEMPLATE_EXPORT ListSample:public Sample< TMeasurementVector > /** Get the frequency of a measurement. Returns 1 if the measurement * exist. */ - AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const ITK_OVERRIDE; + AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override; /** Get the total frequency of the sample. This is equivalent to * the size of the sample. */ - TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE; + TotalAbsoluteFrequencyType GetTotalFrequency() const override; /** Method to graft another sample */ - virtual void Graft(const DataObject *thatObject) ITK_OVERRIDE; + void Graft(const DataObject *thatObject) override; /** \class ConstIterator * \brief Const Iterator @@ -271,8 +271,8 @@ class ITK_TEMPLATE_EXPORT ListSample:public Sample< TMeasurementVector > protected: ListSample(); - virtual ~ListSample() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ListSample() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ListSample); diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h index e1ee4446239..c882855b378 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h @@ -112,17 +112,17 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceMembershipFunction: * prescribed mean and covariance. Note that the Mahalanobis * distance is not a probability density. The square of the * distance is returned. */ - double Evaluate(const MeasurementVectorType & measurement) const ITK_OVERRIDE; + double Evaluate(const MeasurementVectorType & measurement) const override; /** Method to clone a membership function, i.e. create a new instance of * the same type of membership function and configure its ivars to * match. */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; protected: MahalanobisDistanceMembershipFunction(); - virtual ~MahalanobisDistanceMembershipFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MahalanobisDistanceMembershipFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: MeanVectorType m_Mean; // mean diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h index afaf5e02c3c..9566229597c 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h @@ -70,7 +70,7 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceMetric: typedef vnl_matrix< double > CovarianceMatrixType; /** Set the length of each measurement vector. */ - virtual void SetMeasurementVectorSize(MeasurementVectorSizeType) ITK_OVERRIDE; + void SetMeasurementVectorSize(MeasurementVectorSizeType) override; /** Method to set mean */ void SetMean(const MeanVectorType & mean); @@ -97,10 +97,10 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceMetric: /** * Method to get probability of an instance. The return value is the * value of the density function, not probability. */ - double Evaluate(const MeasurementVectorType & measurement) const ITK_OVERRIDE; + double Evaluate(const MeasurementVectorType & measurement) const override; /** Gets the distance between x1 and x2. */ - double Evaluate(const MeasurementVectorType & x1, const MeasurementVectorType & x2) const ITK_OVERRIDE; + double Evaluate(const MeasurementVectorType & x1, const MeasurementVectorType & x2) const override; /** Set/Get tolerance values */ itkSetMacro(Epsilon, double); @@ -111,8 +111,8 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceMetric: protected: MahalanobisDistanceMetric(); - virtual ~MahalanobisDistanceMetric(void) ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MahalanobisDistanceMetric(void) override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: MeanVectorType m_Mean; // mean diff --git a/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.h b/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.h index c5fdc07954c..930aca3ce16 100644 --- a/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.h +++ b/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.h @@ -55,14 +55,14 @@ class ITK_TEMPLATE_EXPORT ManhattanDistanceMetric: itkNewMacro(Self); /** Gets the distance between the origin and x */ - double Evaluate(const MeasurementVectorType & x) const ITK_OVERRIDE; + double Evaluate(const MeasurementVectorType & x) const override; /** Gets the distance between x1 and x2 */ - double Evaluate(const MeasurementVectorType & x1, const MeasurementVectorType & x2) const ITK_OVERRIDE; + double Evaluate(const MeasurementVectorType & x1, const MeasurementVectorType & x2) const override; protected: ManhattanDistanceMetric() {} - virtual ~ManhattanDistanceMetric() ITK_OVERRIDE {} + ~ManhattanDistanceMetric() override {} }; // end of class } // end of namespace Statistics } // end of namespace itk diff --git a/Modules/Numerics/Statistics/include/itkMaskedImageToHistogramFilter.h b/Modules/Numerics/Statistics/include/itkMaskedImageToHistogramFilter.h index 0ae06d2b39e..6e62ee2db64 100644 --- a/Modules/Numerics/Statistics/include/itkMaskedImageToHistogramFilter.h +++ b/Modules/Numerics/Statistics/include/itkMaskedImageToHistogramFilter.h @@ -81,10 +81,10 @@ class ITK_TEMPLATE_EXPORT MaskedImageToHistogramFilter:public ImageToHistogramFi protected: MaskedImageToHistogramFilter(); - virtual ~MaskedImageToHistogramFilter() ITK_OVERRIDE {} + ~MaskedImageToHistogramFilter() override {} - virtual void ThreadedComputeMinimumAndMaximum( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress ) ITK_OVERRIDE; - virtual void ThreadedComputeHistogram( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress ) ITK_OVERRIDE; + void ThreadedComputeMinimumAndMaximum( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress ) override; + void ThreadedComputeHistogram( const RegionType & inputRegionForThread, ThreadIdType threadId, ProgressReporter & progress ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MaskedImageToHistogramFilter); diff --git a/Modules/Numerics/Statistics/include/itkMaximumDecisionRule.h b/Modules/Numerics/Statistics/include/itkMaximumDecisionRule.h index 2715fd69da0..e590c3073be 100644 --- a/Modules/Numerics/Statistics/include/itkMaximumDecisionRule.h +++ b/Modules/Numerics/Statistics/include/itkMaximumDecisionRule.h @@ -63,11 +63,11 @@ class ITKStatistics_EXPORT MaximumDecisionRule:public DecisionRule * Evaluate the decision rule, returning the class label associated * with the largest discriminant score. */ - virtual ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const ITK_OVERRIDE; + ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const override; protected: MaximumDecisionRule() {} - virtual ~MaximumDecisionRule() ITK_OVERRIDE {} + ~MaximumDecisionRule() override {} }; // end of class } // end of namespace Statistics diff --git a/Modules/Numerics/Statistics/include/itkMaximumRatioDecisionRule.h b/Modules/Numerics/Statistics/include/itkMaximumRatioDecisionRule.h index eb31bf6363e..f0b141b81f3 100644 --- a/Modules/Numerics/Statistics/include/itkMaximumRatioDecisionRule.h +++ b/Modules/Numerics/Statistics/include/itkMaximumRatioDecisionRule.h @@ -88,7 +88,7 @@ class ITKStatistics_EXPORT MaximumRatioDecisionRule : public DecisionRule * assumed). Parameter to Evaluate() is the discriminant score in * the form of a likelihood \f$p(x|i)\f$. */ - virtual ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const ITK_OVERRIDE; + ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const override; /** Set the prior probabilities used in evaluating * \f$p(x|i) p(i) > p(x|j) p(j)\f$. The likelihoods are set using @@ -101,8 +101,8 @@ class ITKStatistics_EXPORT MaximumRatioDecisionRule : public DecisionRule protected: MaximumRatioDecisionRule(); - virtual ~MaximumRatioDecisionRule() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MaximumRatioDecisionRule() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MaximumRatioDecisionRule); diff --git a/Modules/Numerics/Statistics/include/itkMeanSampleFilter.h b/Modules/Numerics/Statistics/include/itkMeanSampleFilter.h index a0a42f9a6de..9998cfb79b5 100644 --- a/Modules/Numerics/Statistics/include/itkMeanSampleFilter.h +++ b/Modules/Numerics/Statistics/include/itkMeanSampleFilter.h @@ -97,17 +97,17 @@ class ITK_TEMPLATE_EXPORT MeanSampleFilter : public ProcessObject protected: MeanSampleFilter(); - virtual ~MeanSampleFilter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MeanSampleFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** DataObject pointer */ typedef DataObject::Pointer DataObjectPointer; typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MeanSampleFilter); diff --git a/Modules/Numerics/Statistics/include/itkMembershipFunctionBase.h b/Modules/Numerics/Statistics/include/itkMembershipFunctionBase.h index 25fcc4cb155..9eadc2682fd 100644 --- a/Modules/Numerics/Statistics/include/itkMembershipFunctionBase.h +++ b/Modules/Numerics/Statistics/include/itkMembershipFunctionBase.h @@ -76,7 +76,7 @@ class ITK_TEMPLATE_EXPORT MembershipFunctionBase: /** Method to get membership score (discriminant score) of an entity * or measurement. Evaluate() maps from a vector measurement type * to a real number. */ - virtual double Evaluate(const MeasurementVectorType & x) const ITK_OVERRIDE = 0; + double Evaluate(const MeasurementVectorType & x) const override = 0; /** Set the length of the measurement vector. If this membership * function is templated over a vector type that can be resized, @@ -131,9 +131,9 @@ class ITK_TEMPLATE_EXPORT MembershipFunctionBase: MeasurementVectorType() ); } - virtual ~MembershipFunctionBase(void) ITK_OVERRIDE {} + ~MembershipFunctionBase(void) override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "Length of measurement vectors: " diff --git a/Modules/Numerics/Statistics/include/itkMembershipSample.h b/Modules/Numerics/Statistics/include/itkMembershipSample.h index e8004c16eaf..ccbd05187c4 100644 --- a/Modules/Numerics/Statistics/include/itkMembershipSample.h +++ b/Modules/Numerics/Statistics/include/itkMembershipSample.h @@ -113,7 +113,7 @@ class ITK_TEMPLATE_EXPORT MembershipSample:public DataObject unsigned int GetClassLabel(const InstanceIdentifier & id) const; /** Gets the Subsample that includes only the instances that belong - * to the classLabel. If classLabel does not exist, ITK_NULLPTR is returned. */ + * to the classLabel. If classLabel does not exist, nullptr is returned. */ const ClassSampleType * GetClassSample(const ClassLabelType & classLabel) const; /** Gets the class labels that corresponding to the each instance in @@ -136,7 +136,7 @@ class ITK_TEMPLATE_EXPORT MembershipSample:public DataObject TotalAbsoluteFrequencyType GetTotalFrequency() const; /** Method to graft another sample */ - virtual void Graft(const DataObject *thatObject) ITK_OVERRIDE; + void Graft(const DataObject *thatObject) override; // void PrintSelf(std::ostream& os, Indent indent) const; @@ -287,8 +287,8 @@ class ITK_TEMPLATE_EXPORT MembershipSample:public DataObject protected: MembershipSample(); - virtual ~MembershipSample() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MembershipSample() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MembershipSample); diff --git a/Modules/Numerics/Statistics/include/itkMembershipSample.hxx b/Modules/Numerics/Statistics/include/itkMembershipSample.hxx index 4960c8dc06e..3f58a33b90d 100644 --- a/Modules/Numerics/Statistics/include/itkMembershipSample.hxx +++ b/Modules/Numerics/Statistics/include/itkMembershipSample.hxx @@ -101,7 +101,7 @@ MembershipSample< TSample > int classIndex = this->GetInternalClassLabel(classLabel); if (classIndex < 0) { - return ITK_NULLPTR; + return nullptr; } return m_ClassSamples[classIndex]; diff --git a/Modules/Numerics/Statistics/include/itkMinimumDecisionRule.h b/Modules/Numerics/Statistics/include/itkMinimumDecisionRule.h index d9abb706af7..0d820f7c76a 100644 --- a/Modules/Numerics/Statistics/include/itkMinimumDecisionRule.h +++ b/Modules/Numerics/Statistics/include/itkMinimumDecisionRule.h @@ -61,11 +61,11 @@ class ITKStatistics_EXPORT MinimumDecisionRule:public DecisionRule * Evaluate the decision rule, returning the class label associated * with the smallest discriminant score. */ - virtual ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const ITK_OVERRIDE; + ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const override; protected: MinimumDecisionRule() {} - virtual ~MinimumDecisionRule() ITK_OVERRIDE {} + ~MinimumDecisionRule() override {} }; // end of class } // end of namespace Statistics diff --git a/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.h b/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.h index f26faffd8b8..eaa4959bc3b 100644 --- a/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.h +++ b/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.h @@ -130,8 +130,8 @@ class ITK_TEMPLATE_EXPORT MixtureModelComponentBase: protected: MixtureModelComponentBase(); - virtual ~MixtureModelComponentBase() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MixtureModelComponentBase() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** stores the pointer to the membership function. * subclasses use this function to store their membership function diff --git a/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx b/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx index 3bb3330bc6b..4d3344a0840 100644 --- a/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx +++ b/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx @@ -28,8 +28,8 @@ template< typename TSample > MixtureModelComponentBase< TSample > ::MixtureModelComponentBase() { - m_Sample = ITK_NULLPTR; - m_MembershipFunction = ITK_NULLPTR; + m_Sample = nullptr; + m_MembershipFunction = nullptr; m_MinimalParametersChange = 1.0e-06; m_ParametersModified = true; } @@ -47,7 +47,7 @@ MixtureModelComponentBase< TSample > Superclass::PrintSelf(os, indent); os << indent << "Sample: "; - if ( m_Sample != ITK_NULLPTR ) + if ( m_Sample != nullptr ) { os << m_Sample << std::endl; } @@ -57,7 +57,7 @@ MixtureModelComponentBase< TSample > } os << indent << "Membership Function: "; - if ( m_MembershipFunction != ITK_NULLPTR ) + if ( m_MembershipFunction != nullptr ) { os << m_MembershipFunction << std::endl; } diff --git a/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.h b/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.h index 5f467b6530f..78051b2117f 100644 --- a/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.h +++ b/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.h @@ -74,10 +74,10 @@ class ITK_TEMPLATE_EXPORT NeighborhoodSampler:public SampleToSubsampleFilter< TS protected: NeighborhoodSampler(); - virtual ~NeighborhoodSampler() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NeighborhoodSampler() override; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NeighborhoodSampler); diff --git a/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.hxx b/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.hxx index 5ecfbe24502..1fdb1826623 100644 --- a/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.hxx +++ b/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.hxx @@ -49,7 +49,7 @@ NeighborhoodSampler< TSample > const InputRadiusObjectType *radiusObject = this->GetRadiusInput(); - if ( radiusObject == ITK_NULLPTR ) + if ( radiusObject == nullptr ) { itkExceptionMacro("Radius input is missing"); } diff --git a/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h b/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h index 734edd14a4a..0db8fda26b9 100644 --- a/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h +++ b/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h @@ -116,12 +116,12 @@ class ITKStatistics_EXPORT NormalVariateGenerator: void Initialize(int randomSeed); /** get a variate using FastNorm function */ - virtual double GetVariate() ITK_OVERRIDE; + double GetVariate() override; protected: NormalVariateGenerator(); - virtual ~NormalVariateGenerator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NormalVariateGenerator() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** get a variate */ double FastNorm(); diff --git a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h index fb044eff231..fe464339ed6 100644 --- a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h @@ -88,17 +88,17 @@ class ITK_TEMPLATE_EXPORT PointSetToListSampleAdaptor: const TPointSet * GetPointSet(); /** returns the number of measurement vectors in this container */ - InstanceIdentifier Size() const ITK_OVERRIDE; + InstanceIdentifier Size() const override; /** returns the measurement vector that is specified by the instance * identifier argument. */ - const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const ITK_OVERRIDE; + const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override; /** returns 1 as other subclasses of ListSampleBase does */ - AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const ITK_OVERRIDE; + AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override; /** returns the size of this container */ - TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE; + TotalAbsoluteFrequencyType GetTotalFrequency() const override; /** \class ConstIterator * \ingroup ITKStatistics @@ -253,8 +253,8 @@ class ITK_TEMPLATE_EXPORT PointSetToListSampleAdaptor: protected: PointSetToListSampleAdaptor(); - virtual ~PointSetToListSampleAdaptor() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PointSetToListSampleAdaptor() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PointSetToListSampleAdaptor); diff --git a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx index f18aa0917cd..942fda04301 100644 --- a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx @@ -28,7 +28,7 @@ template< typename TPointSet > PointSetToListSampleAdaptor< TPointSet > ::PointSetToListSampleAdaptor() { - this->m_PointSet = ITK_NULLPTR; + this->m_PointSet = nullptr; this->SetMeasurementVectorSize( TPointSet::PointDimension ); } diff --git a/Modules/Numerics/Statistics/include/itkProbabilityDistribution.h b/Modules/Numerics/Statistics/include/itkProbabilityDistribution.h index b11751e8ad6..17c008891f5 100644 --- a/Modules/Numerics/Statistics/include/itkProbabilityDistribution.h +++ b/Modules/Numerics/Statistics/include/itkProbabilityDistribution.h @@ -147,8 +147,8 @@ class ITKStatistics_EXPORT ProbabilityDistribution: protected: ProbabilityDistribution(void); - virtual ~ProbabilityDistribution(void) ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ProbabilityDistribution(void) override; + void PrintSelf(std::ostream & os, Indent indent) const override; ParametersType m_Parameters; diff --git a/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.h b/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.h index ede2627ab4e..b3969d12af6 100644 --- a/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.h +++ b/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.h @@ -103,8 +103,8 @@ class ITK_TEMPLATE_EXPORT RegionConstrainedSubsampler : public SubsamplerBaseSuperclass::Graft(thatObject); @@ -176,9 +176,9 @@ class Sample:public DataObject MeasurementVectorType() ); } - virtual ~Sample() ITK_OVERRIDE {} + ~Sample() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "Length of measurement vectors in the sample: " diff --git a/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.h b/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.h index 04f6c92eae4..72c589bef39 100644 --- a/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.h +++ b/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.h @@ -127,13 +127,13 @@ class ITK_TEMPLATE_EXPORT SampleClassifierFilter: protected: SampleClassifierFilter(); - virtual ~SampleClassifierFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SampleClassifierFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; ITK_DISALLOW_COPY_AND_ASSIGN(SampleClassifierFilter); /** Starts the classification process */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Make a DataObject of the correct type to used as the specified * output. This method @@ -143,7 +143,7 @@ class ITK_TEMPLATE_EXPORT SampleClassifierFilter: */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; private: diff --git a/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx b/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx index e66b8071bed..f3f5ad73d88 100644 --- a/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx @@ -36,7 +36,7 @@ SampleClassifierFilter< TSample > this->ProcessObject::SetNthOutput( 0, this->MakeOutput(0) ); /** Initialize decision rule */ - m_DecisionRule = ITK_NULLPTR; + m_DecisionRule = nullptr; } template< typename TSample > @@ -146,7 +146,7 @@ SampleClassifierFilter< TSample > } MembershipFunctionsWeightsArrayType membershipFunctionsWeightsArray; - if ( membershipFunctionsWeightsArrayDecorated == ITK_NULLPTR ) + if ( membershipFunctionsWeightsArrayDecorated == nullptr ) { // no weights array is set and hence all membership functions will have // equal diff --git a/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.h b/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.h index 1aa2afc7e06..e30b930df61 100644 --- a/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.h +++ b/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.h @@ -136,9 +136,9 @@ class ITK_TEMPLATE_EXPORT SampleToHistogramFilter:public ProcessObject protected: SampleToHistogramFilter(); - virtual ~SampleToHistogramFilter() ITK_OVERRIDE; + ~SampleToHistogramFilter() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Make a DataObject of the correct type to used as the specified * output. This method @@ -148,10 +148,10 @@ class ITK_TEMPLATE_EXPORT SampleToHistogramFilter:public ProcessObject */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; // Where the histogram is actually computed - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SampleToHistogramFilter); diff --git a/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx b/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx index 0db3f2a4a22..446af1687d2 100644 --- a/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx @@ -143,12 +143,12 @@ SampleToHistogramFilter< TSample, THistogram > const InputHistogramSizeObjectType *histogramSizeObject = this->GetHistogramSizeInput(); - if ( histogramSizeObject == ITK_NULLPTR ) + if ( histogramSizeObject == nullptr ) { itkSpecializedExceptionMacro(MissingHistogramSizeInput); } - if ( marginalScaleObject == ITK_NULLPTR ) + if ( marginalScaleObject == nullptr ) { itkSpecializedExceptionMacro(MissingHistogramMarginalScaleInput); } @@ -274,12 +274,12 @@ SampleToHistogramFilter< TSample, THistogram > } else { - if ( binMaximumObject == ITK_NULLPTR ) + if ( binMaximumObject == nullptr ) { itkSpecializedExceptionMacro(MissingHistogramBinMaximumInput); } - if ( binMinimumObject == ITK_NULLPTR ) + if ( binMinimumObject == nullptr ) { itkSpecializedExceptionMacro(MissingHistogramBinMinimumInput); } diff --git a/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.h b/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.h index 706a643e235..cc6dd6dfc50 100644 --- a/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.h +++ b/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.h @@ -77,8 +77,8 @@ class ITK_TEMPLATE_EXPORT SampleToSubsampleFilter:public ProcessObject protected: SampleToSubsampleFilter(); - virtual ~SampleToSubsampleFilter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SampleToSubsampleFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Make a DataObject of the correct type to used as the specified * output. This method @@ -88,7 +88,7 @@ class ITK_TEMPLATE_EXPORT SampleToSubsampleFilter:public ProcessObject */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SampleToSubsampleFilter); diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.h index 52e6bf47eb1..daa68388a7a 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.h @@ -101,16 +101,16 @@ class ITK_TEMPLATE_EXPORT ScalarImageToCooccurrenceListSampleFilter: protected: ScalarImageToCooccurrenceListSampleFilter(); - virtual ~ScalarImageToCooccurrenceListSampleFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ScalarImageToCooccurrenceListSampleFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; typedef DataObject::Pointer DataObjectPointer; typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; /** This method causes the filter to generate its output. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarImageToCooccurrenceListSampleFilter); diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h index 691598bac8a..b91d5d995d7 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h @@ -172,8 +172,8 @@ class ITK_TEMPLATE_EXPORT ScalarImageToCooccurrenceMatrixFilter:public ProcessOb protected: ScalarImageToCooccurrenceMatrixFilter(); - virtual ~ScalarImageToCooccurrenceMatrixFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ScalarImageToCooccurrenceMatrixFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; virtual void FillHistogram(RadiusType radius, RegionType region); @@ -184,10 +184,10 @@ class ITK_TEMPLATE_EXPORT ScalarImageToCooccurrenceMatrixFilter:public ProcessOb typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; /** This method causes the filter to generate its output. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarImageToCooccurrenceMatrixFilter); diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx index 6e171479a06..374e27da2d5 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx @@ -145,8 +145,8 @@ ScalarImageToCooccurrenceMatrixFilter< TImageType, const ImageType *input = this->GetInput(); - // At this point input must be non-ITK_NULLPTR because the ProcessObject - // checks the number of required input to be non-ITK_NULLPTR pointers before + // At this point input must be non-nullptr because the ProcessObject + // checks the number of required input to be non-nullptr pointers before // calling this GenerateData() method. // First, create an appropriate histogram with the right number of bins @@ -173,7 +173,7 @@ ScalarImageToCooccurrenceMatrixFilter< TImageType, RadiusType radius; radius.Fill(minRadius); - const ImageType *maskImage = ITK_NULLPTR; + const ImageType *maskImage = nullptr; // Check if a mask image has been provided // @@ -183,7 +183,7 @@ ScalarImageToCooccurrenceMatrixFilter< TImageType, } // Now fill in the histogram - if ( maskImage != ITK_NULLPTR ) + if ( maskImage != nullptr ) { this->FillHistogramWithMask(radius, input->GetRequestedRegion(), maskImage); } diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.h b/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.h index 2e236eacb4f..557edde07bd 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.h @@ -99,8 +99,8 @@ class ITK_TEMPLATE_EXPORT ScalarImageToHistogramGenerator:public Object protected: ScalarImageToHistogramGenerator(); - virtual ~ScalarImageToHistogramGenerator() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ScalarImageToHistogramGenerator() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h index 80805f92d23..801259bfa40 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h @@ -195,20 +195,20 @@ class ITK_TEMPLATE_EXPORT ScalarImageToRunLengthFeaturesFilter:public ProcessObj protected: ScalarImageToRunLengthFeaturesFilter(); - virtual ~ScalarImageToRunLengthFeaturesFilter() ITK_OVERRIDE {} - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + ~ScalarImageToRunLengthFeaturesFilter() override {} + void PrintSelf( std::ostream & os, Indent indent ) const override; void FastCompute(); void FullCompute(); /** This method causes the filter to generate its output. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Make a DataObject to be used for output output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) override; private: typename RunLengthMatrixFilterType::Pointer m_RunLengthMatrixGenerator; diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx index 70781abab51..29efbb42f3b 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx @@ -320,7 +320,7 @@ ScalarImageToRunLengthFeaturesFilter { if ( this->GetNumberOfInputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return static_cast( this->ProcessObject::GetInput( 0 ) ); } @@ -354,7 +354,7 @@ ScalarImageToRunLengthFeaturesFilter { if ( this->GetNumberOfInputs() < 2 ) { - return ITK_NULLPTR; + return nullptr; } return static_cast< const ImageType *>( this->ProcessObject::GetInput( 1 ) ); } diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h index 3815471188f..a0f5187b277 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h @@ -233,18 +233,18 @@ class ITK_TEMPLATE_EXPORT ScalarImageToRunLengthMatrixFilter : public ProcessObj protected: ScalarImageToRunLengthMatrixFilter(); - virtual ~ScalarImageToRunLengthMatrixFilter() ITK_OVERRIDE {}; - virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~ScalarImageToRunLengthMatrixFilter() override {}; + void PrintSelf( std::ostream& os, Indent indent ) const override; /** Standard itk::ProcessObject subclass method. */ typedef DataObject::Pointer DataObjectPointer; typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType idx ) ITK_OVERRIDE; + DataObjectPointer MakeOutput( DataObjectPointerArraySizeType idx ) override; /** This method causes the filter to generate its output. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** * Normalize the direction of the offset before it is applied. diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx index 881beca718b..eda90b40fab 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx @@ -94,7 +94,7 @@ ScalarImageToRunLengthMatrixFilter { if( this->GetNumberOfInputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return static_cast( this->ProcessObject::GetInput( 0 ) ); } @@ -106,7 +106,7 @@ ScalarImageToRunLengthMatrixFilter { if( this->GetNumberOfInputs() < 2 ) { - return ITK_NULLPTR; + return nullptr; } return static_cast( this->ProcessObject::GetInput( 1 ) ); } diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h b/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h index 5bfeec5e847..9b39fd16c85 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h +++ b/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h @@ -197,20 +197,20 @@ class ITK_TEMPLATE_EXPORT ScalarImageToTextureFeaturesFilter:public ProcessObjec protected: ScalarImageToTextureFeaturesFilter(); - virtual ~ScalarImageToTextureFeaturesFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ScalarImageToTextureFeaturesFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; void FastCompute(); void FullCompute(); /** This method causes the filter to generate its output. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Make a DataObject to be used for output output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) override; private: typename CooccurrenceMatrixFilterType::Pointer m_GLCMGenerator; diff --git a/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h b/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h index 399ce59ffa2..bec9cef1b7e 100644 --- a/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h +++ b/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h @@ -98,8 +98,8 @@ class ITKStatistics_EXPORT SparseFrequencyContainer2:public Object protected: SparseFrequencyContainer2(); - virtual ~SparseFrequencyContainer2() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SparseFrequencyContainer2() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SparseFrequencyContainer2); diff --git a/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h b/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h index 7b0da3b1dc7..2c8173e9829 100644 --- a/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h +++ b/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h @@ -99,8 +99,8 @@ template < typename TSample, typename TRegion > * them as a Subsample. The definition of similar will be subclass- * specific. And could mean spatial similarity or feature similarity * etc. */ - virtual void Search(const InstanceIdentifier& query, - SubsamplePointer& results) ITK_OVERRIDE; + void Search(const InstanceIdentifier& query, + SubsamplePointer& results) override; protected: /** @@ -108,12 +108,12 @@ template < typename TSample, typename TRegion > * This does a complete copy of the subsampler state * to the new subsampler */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; SpatialNeighborSubsampler(); - virtual ~SpatialNeighborSubsampler() ITK_OVERRIDE {}; + ~SpatialNeighborSubsampler() override {}; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; RadiusType m_Radius; bool m_RadiusInitialized; diff --git a/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.h b/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.h index 963dc59e4f5..0b704fe15bc 100644 --- a/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.h +++ b/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.h @@ -94,17 +94,17 @@ class ITK_TEMPLATE_EXPORT StandardDeviationPerComponentSampleFilter: ITK_DISALLOW_COPY_AND_ASSIGN(StandardDeviationPerComponentSampleFilter); StandardDeviationPerComponentSampleFilter(); - virtual ~StandardDeviationPerComponentSampleFilter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~StandardDeviationPerComponentSampleFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** DataObject pointer */ typedef DataObject::Pointer DataObjectPointer; typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; MeasurementVectorSizeType GetMeasurementVectorSize() const; diff --git a/Modules/Numerics/Statistics/include/itkSubsample.h b/Modules/Numerics/Statistics/include/itkSubsample.h index c55f76289e0..2d24445bbf4 100644 --- a/Modules/Numerics/Statistics/include/itkSubsample.h +++ b/Modules/Numerics/Statistics/include/itkSubsample.h @@ -83,7 +83,7 @@ class ITK_TEMPLATE_EXPORT Subsample: #endif /** Get the Id Holder */ - virtual const InstanceIdentifierHolder & GetIdHolder() const + const InstanceIdentifierHolder & GetIdHolder() const { return this->m_IdHolder; } @@ -107,20 +107,20 @@ class ITK_TEMPLATE_EXPORT Subsample: /** returns SizeType object whose each element is the number of * elements in each dimension */ - InstanceIdentifier Size() const ITK_OVERRIDE; + InstanceIdentifier Size() const override; /** Clear the subsample */ void Clear(); /** returns the measurement of the instance which is identified * by the 'id' */ - const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const ITK_OVERRIDE; + const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override; /** returns the frequency of the instance which is identified by the 'id' */ - AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const ITK_OVERRIDE; + AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override; /** returns the total frequency for the 'd' dimension */ - TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE; + TotalAbsoluteFrequencyType GetTotalFrequency() const override; void Swap(unsigned int index1, unsigned int index2); @@ -131,7 +131,7 @@ class ITK_TEMPLATE_EXPORT Subsample: AbsoluteFrequencyType GetFrequencyByIndex(unsigned int index) const; /** Method to graft another sample */ - virtual void Graft(const DataObject *thatObject) ITK_OVERRIDE; + void Graft(const DataObject *thatObject) override; class ConstIterator { @@ -281,8 +281,8 @@ class ITK_TEMPLATE_EXPORT Subsample: protected: Subsample(); - virtual ~Subsample() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~Subsample() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(Subsample); diff --git a/Modules/Numerics/Statistics/include/itkSubsample.hxx b/Modules/Numerics/Statistics/include/itkSubsample.hxx index 3d979ba339c..419b37e5a8e 100644 --- a/Modules/Numerics/Statistics/include/itkSubsample.hxx +++ b/Modules/Numerics/Statistics/include/itkSubsample.hxx @@ -30,7 +30,7 @@ template< typename TSample > Subsample< TSample > ::Subsample() { - m_Sample = ITK_NULLPTR; + m_Sample = nullptr; m_TotalFrequency = NumericTraits< AbsoluteFrequencyType >::ZeroValue(); m_ActiveDimension = 0; } @@ -43,7 +43,7 @@ Subsample< TSample > Superclass::PrintSelf(os, indent); os << indent << "Sample: "; - if ( m_Sample != ITK_NULLPTR ) + if ( m_Sample != nullptr ) { os << m_Sample << std::endl; } diff --git a/Modules/Numerics/Statistics/include/itkSubsamplerBase.h b/Modules/Numerics/Statistics/include/itkSubsamplerBase.h index 5497f0c101c..4a0244484d2 100644 --- a/Modules/Numerics/Statistics/include/itkSubsamplerBase.h +++ b/Modules/Numerics/Statistics/include/itkSubsamplerBase.h @@ -114,12 +114,12 @@ class ITK_TEMPLATE_EXPORT SubsamplerBase : public Object * This does a complete copy of the subsampler state * to the new subsampler */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; SubsamplerBase(); - virtual ~SubsamplerBase() ITK_OVERRIDE {}; + ~SubsamplerBase() override {}; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; SampleConstPointer m_Sample; bool m_RequestMaximumNumberOfResults; diff --git a/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx b/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx index 16f2718cde8..653703dee83 100644 --- a/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx +++ b/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx @@ -26,7 +26,7 @@ template SubsamplerBase ::SubsamplerBase() { - m_Sample = ITK_NULLPTR; + m_Sample = nullptr; m_RequestMaximumNumberOfResults = true; m_CanSelectQuery = true; m_Seed = 0; @@ -72,7 +72,7 @@ SubsamplerBase } else { - os << indent << "Sample is ITK_NULLPTR" << std::endl; + os << indent << "Sample is nullptr" << std::endl; } os << std::endl; diff --git a/Modules/Numerics/Statistics/include/itkTDistribution.h b/Modules/Numerics/Statistics/include/itkTDistribution.h index f55611d3243..35a3f68cfc7 100644 --- a/Modules/Numerics/Statistics/include/itkTDistribution.h +++ b/Modules/Numerics/Statistics/include/itkTDistribution.h @@ -73,16 +73,16 @@ class ITKStatistics_EXPORT TDistribution: /** Return the number of parameters. For a univariate Student-t * distribution, the number of parameters is 1 (degrees of freedom) */ - virtual SizeValueType GetNumberOfParameters() const ITK_OVERRIDE { return 1; } + SizeValueType GetNumberOfParameters() const override { return 1; } /** Evaluate the probability density function (pdf). The parameters * of the distribution are assigned via SetParameters(). */ - virtual double EvaluatePDF(double x) const ITK_OVERRIDE; + double EvaluatePDF(double x) const override; /** Evaluate the probability density function (pdf). The parameters * for the distribution are passed as a parameters vector. The * ordering of the parameters is (degrees of freedom). */ - virtual double EvaluatePDF(double x, const ParametersType &) const ITK_OVERRIDE; + double EvaluatePDF(double x, const ParametersType &) const override; /** Evaluate the probability density function (pdf). The parameters * of the distribution are passed as separate parameters. */ @@ -90,12 +90,12 @@ class ITKStatistics_EXPORT TDistribution: /** Evaluate the cumulative distribution function (cdf). The parameters * of the distribution are assigned via SetParameters(). */ - virtual double EvaluateCDF(double x) const ITK_OVERRIDE; + double EvaluateCDF(double x) const override; /** Evaluate the cumulative distribution function (cdf). The parameters * for the distribution are passed as a parameters vector. The * ordering of the parameters is (degreesOfFreedom). */ - virtual double EvaluateCDF(double x, const ParametersType &) const ITK_OVERRIDE; + double EvaluateCDF(double x, const ParametersType &) const override; /** Evaluate the cumulative distribution function (cdf). The parameters * of the distribution are passed as separate parameters. */ @@ -104,13 +104,13 @@ class ITKStatistics_EXPORT TDistribution: /** Evaluate the inverse cumulative distribution function (inverse * cdf). Parameter p must be between 0.0 and 1.0. The parameters * of the distribution are assigned via SetParameters(). */ - virtual double EvaluateInverseCDF(double p) const ITK_OVERRIDE; + double EvaluateInverseCDF(double p) const override; /** Evaluate the inverse cumulative distribution function (inverse * cdf). Parameter p must be between 0.0 and 1.0. The parameters * for the distribution are passed as a parameters vector. The * ordering of the parameters is (degrees of freedom). */ - virtual double EvaluateInverseCDF(double p, const ParametersType &) const ITK_OVERRIDE; + double EvaluateInverseCDF(double p, const ParametersType &) const override; /** Evaluate the inverse cumulative distribution function (inverse * cdf). Parameter p must be between 0.0 and 1.0. The parameters @@ -126,18 +126,18 @@ class ITKStatistics_EXPORT TDistribution: virtual SizeValueType GetDegreesOfFreedom() const; /** Does the Student-t distribution have a mean? */ - virtual bool HasMean() const ITK_OVERRIDE { return true; } + bool HasMean() const override { return true; } /** Get the mean of the distribution. */ - virtual double GetMean() const ITK_OVERRIDE; + double GetMean() const override; /** Does the Student-t distribution have a variance? Variance is * only defined for degrees of freedom greater than 2 */ - virtual bool HasVariance() const ITK_OVERRIDE; + bool HasVariance() const override; /** Get the variance of the distribution. If the variance does not exist, * then quiet_NaN is returned. */ - virtual double GetVariance() const ITK_OVERRIDE; + double GetVariance() const override; /** Static method to evaluate the probability density function (pdf) * of a Student-t with a specified number of degrees of freedom. The @@ -199,9 +199,9 @@ class ITKStatistics_EXPORT TDistribution: protected: TDistribution(); - virtual ~TDistribution(void) ITK_OVERRIDE {} + ~TDistribution(void) override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TDistribution); diff --git a/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h b/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h index b78d2a7b7e2..f84d8db6042 100644 --- a/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h +++ b/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h @@ -86,7 +86,7 @@ template < typename TSample, typename TRegion > /** typedefs related to random variate generator */ typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType; - virtual void SetSeed(const SeedType seed) ITK_OVERRIDE + void SetSeed(const SeedType seed) override { Superclass::SetSeed(seed); this->m_RandomNumberGenerator->SetSeed(this->m_Seed); @@ -126,8 +126,8 @@ template < typename TSample, typename TRegion > * them as a Subsample. The definition of similar will be subclass- * specific. And could mean spatial similarity or feature similarity * etc. */ - virtual void Search(const InstanceIdentifier& query, - SubsamplePointer& results) ITK_OVERRIDE; + void Search(const InstanceIdentifier& query, + SubsamplePointer& results) override; protected: /** @@ -135,12 +135,12 @@ template < typename TSample, typename TRegion > * This does a complete copy of the subsampler state * to the new subsampler */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; UniformRandomSpatialNeighborSubsampler(); - virtual ~UniformRandomSpatialNeighborSubsampler() ITK_OVERRIDE {}; + ~UniformRandomSpatialNeighborSubsampler() override {}; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; /** method to randomly generate an integer in the closed range * [lowerBound, upperBound] diff --git a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h index 770c6433660..230381e8b6d 100644 --- a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h @@ -86,17 +86,17 @@ class ITK_TEMPLATE_EXPORT VectorContainerToListSampleAdaptor: itkGetConstObjectMacro(VectorContainer, VectorContainerType ); /** returns the number of measurement vectors in this container */ - InstanceIdentifier Size() const ITK_OVERRIDE; + InstanceIdentifier Size() const override; /** returns the measurement vector that is specified by the instance * identifier argument. */ - const MeasurementVectorType & GetMeasurementVector( InstanceIdentifier ) const ITK_OVERRIDE; + const MeasurementVectorType & GetMeasurementVector( InstanceIdentifier ) const override; /** returns 1 as other subclasses of ListSampleBase does */ - AbsoluteFrequencyType GetFrequency( InstanceIdentifier ) const ITK_OVERRIDE; + AbsoluteFrequencyType GetFrequency( InstanceIdentifier ) const override; /** returns the size of this container */ - TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE; + TotalAbsoluteFrequencyType GetTotalFrequency() const override; /** \class ConstIterator * \ingroup ITKStatistics @@ -247,8 +247,8 @@ class ITK_TEMPLATE_EXPORT VectorContainerToListSampleAdaptor: protected: VectorContainerToListSampleAdaptor(); - virtual ~VectorContainerToListSampleAdaptor() ITK_OVERRIDE {} - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + ~VectorContainerToListSampleAdaptor() override {} + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorContainerToListSampleAdaptor); diff --git a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx index 6e1512ac145..22a4dd95c1f 100644 --- a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx @@ -28,7 +28,7 @@ template VectorContainerToListSampleAdaptor ::VectorContainerToListSampleAdaptor() { - this->m_VectorContainer = ITK_NULLPTR; + this->m_VectorContainer = nullptr; } template diff --git a/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.h b/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.h index a584c42e58d..0d3224242a4 100644 --- a/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.h +++ b/Modules/Numerics/Statistics/include/itkWeightedCentroidKdTreeGenerator.h @@ -92,18 +92,18 @@ class ITK_TEMPLATE_EXPORT WeightedCentroidKdTreeGenerator: WeightedCentroidKdTreeGenerator(); /** Destructor */ - virtual ~WeightedCentroidKdTreeGenerator() ITK_OVERRIDE {} + ~WeightedCentroidKdTreeGenerator() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Nonterminal node generation routine */ - virtual KdTreeNodeType * GenerateNonterminalNode(unsigned int beginIndex, + KdTreeNodeType * GenerateNonterminalNode(unsigned int beginIndex, unsigned int endIndex, MeasurementVectorType & lowerBound, MeasurementVectorType & upperBound, - unsigned int level) ITK_OVERRIDE; + unsigned int level) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(WeightedCentroidKdTreeGenerator); diff --git a/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.h b/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.h index ed09764b1e7..5d35d91055c 100644 --- a/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.h +++ b/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.h @@ -99,10 +99,10 @@ class ITK_TEMPLATE_EXPORT WeightedCovarianceSampleFilter: protected: WeightedCovarianceSampleFilter(); - virtual ~WeightedCovarianceSampleFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~WeightedCovarianceSampleFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Compute covariance matrix with weights computed from a function */ void ComputeCovarianceMatrixWithWeightingFunction(); diff --git a/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx index 48affc4afc7..c0b8f64fe6d 100644 --- a/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx @@ -29,7 +29,7 @@ template< typename TSample > WeightedCovarianceSampleFilter< TSample > ::WeightedCovarianceSampleFilter() { - this->ProcessObject::SetNthInput(1, ITK_NULLPTR); + this->ProcessObject::SetNthInput(1, nullptr); } template< typename TSample > @@ -58,7 +58,7 @@ WeightedCovarianceSampleFilter< TSample > const InputWeightingFunctionObjectType *functionObject = this->GetWeightingFunctionInput(); - if ( functionObject != ITK_NULLPTR ) + if ( functionObject != nullptr ) { this->ComputeCovarianceMatrixWithWeightingFunction(); return; @@ -68,7 +68,7 @@ WeightedCovarianceSampleFilter< TSample > const InputWeightArrayObjectType *weightArrayObject = this->GetWeightsInput(); - if ( weightArrayObject != ITK_NULLPTR ) + if ( weightArrayObject != nullptr ) { this->ComputeCovarianceMatrixWithWeights(); return; diff --git a/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.h b/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.h index 077ff1decaf..fb3fb287e00 100644 --- a/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.h +++ b/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.h @@ -93,10 +93,10 @@ class ITK_TEMPLATE_EXPORT WeightedMeanSampleFilter : public MeanSampleFilter< TS protected: WeightedMeanSampleFilter(); - virtual ~WeightedMeanSampleFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~WeightedMeanSampleFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; // compute mean with weight array void ComputeMeanWithWeights(); diff --git a/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx index 7a1ab38654c..9efb27d97f4 100644 --- a/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx @@ -32,7 +32,7 @@ template< typename TSample > WeightedMeanSampleFilter< TSample > ::WeightedMeanSampleFilter() { - this->ProcessObject::SetNthInput(1, ITK_NULLPTR); + this->ProcessObject::SetNthInput(1, nullptr); } template< typename TSample > @@ -61,7 +61,7 @@ WeightedMeanSampleFilter< TSample > const InputWeightingFunctionObjectType *functionObject = this->GetWeightingFunctionInput(); - if ( functionObject != ITK_NULLPTR ) + if ( functionObject != nullptr ) { this->ComputeMeanWithWeightingFunction(); return; @@ -71,7 +71,7 @@ WeightedMeanSampleFilter< TSample > const InputWeightArrayObjectType *weightArrayObject = this->GetWeightsInput(); - if ( weightArrayObject != ITK_NULLPTR ) + if ( weightArrayObject != nullptr ) { this->ComputeMeanWithWeights(); return; diff --git a/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx b/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx index b30550a3b9d..ea080774ab4 100644 --- a/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx +++ b/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx @@ -34,7 +34,7 @@ NormalVariateGenerator::NormalVariateGenerator() m_TLEN = ( 8 * m_LEN ); m_Vec1 = new int[m_TLEN]; - m_Gausssave = ITK_NULLPTR; + m_Gausssave = nullptr; this->Initialize(0); } @@ -125,12 +125,12 @@ double NormalVariateGenerator::FastNorm(void) int r; int s; int t; - int * pa = ITK_NULLPTR; - int * pb = ITK_NULLPTR; - int * pc = ITK_NULLPTR; - int * pd = ITK_NULLPTR; + int * pa = nullptr; + int * pb = nullptr; + int * pc = nullptr; + int * pd = nullptr; int * pe; - int * p0 = ITK_NULLPTR; + int * p0 = nullptr; int mtype; int stype; double ts; diff --git a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx index 2fe4f7d4831..49bcf9ac4a6 100644 --- a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest.cxx @@ -100,9 +100,9 @@ int itkCovarianceSampleFilterTest(int, char* [] ) covarianceFilter->ResetPipeline(); - if ( covarianceFilter->GetInput() != ITK_NULLPTR ) + if ( covarianceFilter->GetInput() != nullptr ) { - std::cerr << "GetInput() should return ITK_NULLPTR if the input \ + std::cerr << "GetInput() should return nullptr if the input \ has not been set" << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx index 99988e5c9bd..92a67a459f3 100644 --- a/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkCovarianceSampleFilterTest3.cxx @@ -50,7 +50,7 @@ class MyCovarianceSampleFilter : public CovarianceSampleFilter< TSample > private: MyCovarianceSampleFilter() {} - ~MyCovarianceSampleFilter() ITK_OVERRIDE {} + ~MyCovarianceSampleFilter() override {} }; } } diff --git a/Modules/Numerics/Statistics/test/itkDecisionRuleTest.cxx b/Modules/Numerics/Statistics/test/itkDecisionRuleTest.cxx index 3a49539238c..644e24a7804 100644 --- a/Modules/Numerics/Statistics/test/itkDecisionRuleTest.cxx +++ b/Modules/Numerics/Statistics/test/itkDecisionRuleTest.cxx @@ -45,7 +45,7 @@ class MyDecisionRule : public DecisionRule typedef Superclass::ClassIdentifierType ClassIdentifierType; /** Evaluate membership score */ - virtual ClassIdentifierType Evaluate(const MembershipVectorType &scoreVector) const ITK_OVERRIDE + ClassIdentifierType Evaluate(const MembershipVectorType &scoreVector) const override { double max = scoreVector[0]; diff --git a/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx b/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx index 7d3d76b4d89..b6083a1724d 100644 --- a/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx +++ b/Modules/Numerics/Statistics/test/itkDistanceMetricTest.cxx @@ -39,14 +39,14 @@ class MyDistanceMetric : public DistanceMetric< TMeasurementVector > itkNewMacro(Self); /** Evaluate membership score */ - double Evaluate(const TMeasurementVector & ) const ITK_OVERRIDE + double Evaluate(const TMeasurementVector & ) const override { double score; score = 1; return score; } - double Evaluate(const TMeasurementVector &, const TMeasurementVector & ) const ITK_OVERRIDE + double Evaluate(const TMeasurementVector &, const TMeasurementVector & ) const override { double score; score = 1; diff --git a/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx b/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx index bf8392778bf..672bc9d7025 100644 --- a/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkDistanceMetricTest2.cxx @@ -39,14 +39,14 @@ class MyDistanceMetric : public DistanceMetric< TMeasurementVector > itkNewMacro(Self); /** Evaluate membership score */ - double Evaluate(const TMeasurementVector & ) const ITK_OVERRIDE + double Evaluate(const TMeasurementVector & ) const override { double score; score = 1; return score; } - double Evaluate(const TMeasurementVector &, const TMeasurementVector & ) const ITK_OVERRIDE + double Evaluate(const TMeasurementVector &, const TMeasurementVector & ) const override { double score; score = 1; diff --git a/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx b/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx index 25222ba5df9..11f23d29aa1 100644 --- a/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkHistogramToTextureFeaturesFilterTest.cxx @@ -120,7 +120,7 @@ int itkHistogramToTextureFeaturesFilterTest(int, char* [] ) std::cerr << "Exception caught: " << excp << std::endl; } - if ( filter->GetInput() != ITK_NULLPTR ) + if ( filter->GetInput() != nullptr ) { passed = false; } diff --git a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx index 8d173cb2d0a..ad724143a4d 100644 --- a/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkImageToListSampleFilterTest.cxx @@ -147,17 +147,17 @@ int itkImageToListSampleFilterTest(int, char* [] ) // Restore the pipeline after the exception filter->ResetPipeline(); - if ( filter->GetInput() != ITK_NULLPTR ) + if ( filter->GetInput() != nullptr ) { pass = false; - failureMeassage = "GetInput() should return ITK_NULLPTR if the input \ + failureMeassage = "GetInput() should return nullptr if the input \ has not been set"; } - if ( filter->GetMaskImage() != ITK_NULLPTR ) + if ( filter->GetMaskImage() != nullptr ) { pass = false; - failureMeassage = "GetMaskImage() should return ITK_NULLPTR if mask image \ + failureMeassage = "GetMaskImage() should return nullptr if mask image \ has not been set"; } diff --git a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx index 178d966f091..9d88844f66b 100644 --- a/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkMeanSampleFilterTest.cxx @@ -74,10 +74,10 @@ int itkMeanSampleFilterTest(int, char* [] ) std::cerr << "Exception caught: " << excp << std::endl; } - if ( filter->GetInput() != ITK_NULLPTR ) + if ( filter->GetInput() != nullptr ) { pass = false; - failureMeassage = "GetInput() should return ITK_NULLPTR if the input \ + failureMeassage = "GetInput() should return nullptr if the input \ has not been set"; } diff --git a/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest.cxx b/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest.cxx index 93fd3424519..52e2dd144d4 100644 --- a/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest.cxx +++ b/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest.cxx @@ -43,7 +43,7 @@ class MyMembershipFunctionBase : public MembershipFunctionBase< TMeasurementVect itkNewMacro(Self); /** Evaluate membership score */ - double Evaluate(const TMeasurementVector & ) const ITK_OVERRIDE + double Evaluate(const TMeasurementVector & ) const override { double score; score = 1; diff --git a/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest2.cxx b/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest2.cxx index 439bd069333..f868dd8e5b2 100644 --- a/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkMembershipFunctionBaseTest2.cxx @@ -43,7 +43,7 @@ class MyMembershipFunctionBase : public MembershipFunctionBase< TMeasurementVect itkNewMacro(Self); /** Evaluate membership score */ - double Evaluate(const TMeasurementVector & ) const ITK_OVERRIDE + double Evaluate(const TMeasurementVector & ) const override { double score; score = 1; diff --git a/Modules/Numerics/Statistics/test/itkMixtureModelComponentBaseTest.cxx b/Modules/Numerics/Statistics/test/itkMixtureModelComponentBaseTest.cxx index 5421c95c586..59b7bba012e 100644 --- a/Modules/Numerics/Statistics/test/itkMixtureModelComponentBaseTest.cxx +++ b/Modules/Numerics/Statistics/test/itkMixtureModelComponentBaseTest.cxx @@ -49,7 +49,7 @@ class MixtureModelComponentBaseTestHelper : public MixtureModelComponentBaseGetInput() != ITK_NULLPTR ) + if( filter->GetInput() != nullptr ) { - std::cerr << "GetInput() should have returned ITK_NULLPTR" << std::endl; + std::cerr << "GetInput() should have returned nullptr" << std::endl; return EXIT_FAILURE; } // Test GetOutput() before creating the output - if( filter->GetOutput() == ITK_NULLPTR ) + if( filter->GetOutput() == nullptr ) { - std::cerr << "GetOutput() should have returned NON-ITK_NULLPTR" << std::endl; + std::cerr << "GetOutput() should have returned NON-nullptr" << std::endl; return EXIT_FAILURE; } @@ -72,9 +72,9 @@ int itkNeighborhoodSamplerTest1(int, char* [] ) const InputRadiusObjectType * recoveredRadiusObject = filter->GetRadiusInput(); - if( recoveredRadiusObject == ITK_NULLPTR ) + if( recoveredRadiusObject == nullptr ) { - std::cerr << "GetRadiusInput() returned ITK_NULLPTR object." << std::endl; + std::cerr << "GetRadiusInput() returned nullptr object." << std::endl; return EXIT_FAILURE; } @@ -88,9 +88,9 @@ int itkNeighborhoodSamplerTest1(int, char* [] ) recoveredRadiusObject = filter->GetRadiusInput(); - if( recoveredRadiusObject == ITK_NULLPTR ) + if( recoveredRadiusObject == nullptr ) { - std::cerr << "GetRadiusInput() returned ITK_NULLPTR object." << std::endl; + std::cerr << "GetRadiusInput() returned nullptr object." << std::endl; return EXIT_FAILURE; } @@ -146,7 +146,7 @@ int itkNeighborhoodSamplerTest1(int, char* [] ) // // Testing exception cases in the GenerateData() method. // - filter->SetRadiusInput( ITK_NULLPTR ); + filter->SetRadiusInput( nullptr ); std::cout << "GetRadiusInput() = " << filter->GetRadiusInput() << std::endl; @@ -154,7 +154,7 @@ int itkNeighborhoodSamplerTest1(int, char* [] ) { filter->Update(); std::cerr << "Failure to throw expected exception "; - std::cerr << " due to ITK_NULLPTR SetRadiusInput()"; + std::cerr << " due to nullptr SetRadiusInput()"; return EXIT_FAILURE; } catch( itk::ExceptionObject & ) diff --git a/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx b/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx index a7b85d6702e..2b4e72f82d9 100644 --- a/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx +++ b/Modules/Numerics/Statistics/test/itkPointSetToListSampleAdaptorTest.cxx @@ -118,10 +118,10 @@ int itkPointSetToListSampleAdaptorTest( int, char * [] ) //exercise returned pointset const PointSetToListSampleAdaptorType::PointSetType * pointSetReturned = listSample->GetPointSet( ); - //check for ITK_NULLPTR - if( pointSetReturned == ITK_NULLPTR ) + //check for nullptr + if( pointSetReturned == nullptr ) { - std::cerr << "GetPointSet() returned a ITK_NULLPTR pointer"<< std::endl; + std::cerr << "GetPointSet() returned a nullptr pointer"<< std::endl; return EXIT_FAILURE; } diff --git a/Modules/Numerics/Statistics/test/itkProbabilityDistributionTest.cxx b/Modules/Numerics/Statistics/test/itkProbabilityDistributionTest.cxx index c7431a5a182..f534350d72e 100644 --- a/Modules/Numerics/Statistics/test/itkProbabilityDistributionTest.cxx +++ b/Modules/Numerics/Statistics/test/itkProbabilityDistributionTest.cxx @@ -33,17 +33,17 @@ class ProbabilityDistributionTestingHelper : public ProbabilityDistribution itkNewMacro(Self); - virtual SizeValueType GetNumberOfParameters() const ITK_OVERRIDE { return 42; } - virtual double EvaluatePDF(double ) const ITK_OVERRIDE { return 42.0; } - virtual double EvaluatePDF(double , const ParametersType&) const ITK_OVERRIDE { return 42.0; } - virtual double EvaluateCDF(double ) const ITK_OVERRIDE { return 42.0; } - virtual double EvaluateCDF(double , const ParametersType&) const ITK_OVERRIDE { return 42.0; } - virtual double EvaluateInverseCDF(double ) const ITK_OVERRIDE { return 42.0; } - virtual double EvaluateInverseCDF(double , const ParametersType&) const ITK_OVERRIDE { return 42.0; } - virtual bool HasMean() const ITK_OVERRIDE { return true; } - virtual bool HasVariance() const ITK_OVERRIDE { return true; } - virtual double GetMean() const ITK_OVERRIDE { return 42.0; } - virtual double GetVariance() const ITK_OVERRIDE { return 42.0; } + SizeValueType GetNumberOfParameters() const override { return 42; } + double EvaluatePDF(double ) const override { return 42.0; } + double EvaluatePDF(double , const ParametersType&) const override { return 42.0; } + double EvaluateCDF(double ) const override { return 42.0; } + double EvaluateCDF(double , const ParametersType&) const override { return 42.0; } + double EvaluateInverseCDF(double ) const override { return 42.0; } + double EvaluateInverseCDF(double , const ParametersType&) const override { return 42.0; } + bool HasMean() const override { return true; } + bool HasVariance() const override { return true; } + double GetMean() const override { return 42.0; } + double GetVariance() const override { return 42.0; } void RunTests() { diff --git a/Modules/Numerics/Statistics/test/itkRandomVariateGeneratorBaseTest.cxx b/Modules/Numerics/Statistics/test/itkRandomVariateGeneratorBaseTest.cxx index 23e5ca9ec87..be0c5361887 100644 --- a/Modules/Numerics/Statistics/test/itkRandomVariateGeneratorBaseTest.cxx +++ b/Modules/Numerics/Statistics/test/itkRandomVariateGeneratorBaseTest.cxx @@ -34,7 +34,7 @@ class VariateGeneratorTestHelper : public RandomVariateGeneratorBase itkNewMacro(Self); - virtual double GetVariate() ITK_OVERRIDE + double GetVariate() override { double theAnswerToTheQuestionOfLifeTheUniverseAndEverything = 42.0; return theAnswerToTheQuestionOfLifeTheUniverseAndEverything; diff --git a/Modules/Numerics/Statistics/test/itkSampleTest.cxx b/Modules/Numerics/Statistics/test/itkSampleTest.cxx index 53fc48ec09a..8277bb964f2 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest.cxx @@ -53,27 +53,27 @@ class MySample : public Sample< TMeasurementVector > typedef typename Superclass::InstanceIdentifier InstanceIdentifier; /** Get the size of the sample (number of measurements) */ - virtual InstanceIdentifier Size() const ITK_OVERRIDE + InstanceIdentifier Size() const override { return static_cast( m_Values.size() ); } /** Get the measurement associated with a particular * InstanceIdentifier. */ - virtual const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const ITK_OVERRIDE + const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override { return m_Values[id]; } /** Get the frequency of a measurement specified by instance * identifier. */ - virtual AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const ITK_OVERRIDE + AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override { return m_Frequencies[id]; } /** Get the total frequency of the sample. */ - virtual TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE + TotalAbsoluteFrequencyType GetTotalFrequency() const override { TotalAbsoluteFrequencyType sum = NumericTraits< TotalAbsoluteFrequencyType >::ZeroValue(); typedef typename std::vector< AbsoluteFrequencyType >::const_iterator Iterator; @@ -86,7 +86,7 @@ class MySample : public Sample< TMeasurementVector > return sum; } - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& os, Indent indent) const override { Superclass::PrintSelf(os,indent); os << indent << m_Values.size() << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkSampleTest2.cxx b/Modules/Numerics/Statistics/test/itkSampleTest2.cxx index d6e619f5c3d..4c46c232ca4 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest2.cxx @@ -53,7 +53,7 @@ class MySample : public Sample< TMeasurementVector > typedef typename Superclass::InstanceIdentifier InstanceIdentifier; /** Get the size of the sample (number of measurements) */ - virtual InstanceIdentifier Size() const ITK_OVERRIDE + InstanceIdentifier Size() const override { return static_cast( m_Values.size() ); } @@ -66,20 +66,20 @@ class MySample : public Sample< TMeasurementVector > /** Get the measurement associated with a particular * InstanceIdentifier. */ - virtual const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const ITK_OVERRIDE + const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override { return m_Values[id]; } /** Get the frequency of a measurement specified by instance * identifier. */ - virtual AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const ITK_OVERRIDE + AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override { return m_Frequencies[id]; } /** Get the total frequency of the sample. */ - virtual TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE + TotalAbsoluteFrequencyType GetTotalFrequency() const override { TotalAbsoluteFrequencyType sum = NumericTraits< TotalAbsoluteFrequencyType >::ZeroValue(); typedef typename std::vector< AbsoluteFrequencyType >::const_iterator Iterator; @@ -92,7 +92,7 @@ class MySample : public Sample< TMeasurementVector > return sum; } - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& os, Indent indent) const override { Superclass::PrintSelf(os,indent); os << indent << m_Values.size() << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkSampleTest3.cxx b/Modules/Numerics/Statistics/test/itkSampleTest3.cxx index cc6e9f2b166..0c28780440e 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest3.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest3.cxx @@ -53,7 +53,7 @@ class MySample : public Sample< TMeasurementVector > typedef typename Superclass::InstanceIdentifier InstanceIdentifier; /** Get the size of the sample (number of measurements) */ - virtual InstanceIdentifier Size() const ITK_OVERRIDE + InstanceIdentifier Size() const override { return static_cast( m_Values.size() ); } @@ -67,20 +67,20 @@ class MySample : public Sample< TMeasurementVector > /** Get the measurement associated with a particular * InstanceIdentifier. */ - virtual const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const ITK_OVERRIDE + const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override { return m_Values[id]; } /** Get the frequency of a measurement specified by instance * identifier. */ - virtual AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const ITK_OVERRIDE + AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override { return m_Frequencies[id]; } /** Get the total frequency of the sample. */ - virtual TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE + TotalAbsoluteFrequencyType GetTotalFrequency() const override { TotalAbsoluteFrequencyType sum = NumericTraits< TotalAbsoluteFrequencyType >::ZeroValue(); typedef typename std::vector< AbsoluteFrequencyType >::const_iterator Iterator; @@ -93,7 +93,7 @@ class MySample : public Sample< TMeasurementVector > return sum; } - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& os, Indent indent) const override { Superclass::PrintSelf(os,indent); os << indent << m_Values.size() << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkSampleTest4.cxx b/Modules/Numerics/Statistics/test/itkSampleTest4.cxx index f3ea23759b8..91244f36d7d 100644 --- a/Modules/Numerics/Statistics/test/itkSampleTest4.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleTest4.cxx @@ -53,7 +53,7 @@ class MySample : public Sample< TMeasurementVector > typedef typename Superclass::InstanceIdentifier InstanceIdentifier; /** Get the size of the sample (number of measurements) */ - virtual InstanceIdentifier Size() const ITK_OVERRIDE + InstanceIdentifier Size() const override { return static_cast( m_Values.size() ); } @@ -67,21 +67,21 @@ class MySample : public Sample< TMeasurementVector > /** Get the measurement associated with a particular * InstanceIdentifier. */ - virtual const MeasurementVectorType & - GetMeasurementVector(InstanceIdentifier id) const ITK_OVERRIDE + const MeasurementVectorType & + GetMeasurementVector(InstanceIdentifier id) const override { return m_Values[id]; } /** Get the frequency of a measurement specified by instance * identifier. */ - virtual AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const ITK_OVERRIDE + AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override { return m_Frequencies[id]; } /** Get the total frequency of the sample. */ - virtual TotalAbsoluteFrequencyType GetTotalFrequency() const ITK_OVERRIDE + TotalAbsoluteFrequencyType GetTotalFrequency() const override { TotalAbsoluteFrequencyType sum = NumericTraits< TotalAbsoluteFrequencyType >::ZeroValue(); typedef typename std::vector< AbsoluteFrequencyType >::const_iterator Iterator; @@ -94,7 +94,7 @@ class MySample : public Sample< TMeasurementVector > return sum; } - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& os, Indent indent) const override { Superclass::PrintSelf(os,indent); os << indent << m_Values.size() << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest.cxx b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest.cxx index 6d7d95c6277..3e76c532ebb 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToHistogramFilterTest.cxx @@ -52,16 +52,16 @@ int itkSampleToHistogramFilterTest( int , char * [] ) SampleType::Pointer sample = SampleType::New(); // Test GetInput() before setting the input - if( filter->GetInput() != ITK_NULLPTR ) + if( filter->GetInput() != nullptr ) { - std::cerr << "GetInput() should have returned ITK_NULLPTR" << std::endl; + std::cerr << "GetInput() should have returned nullptr" << std::endl; return EXIT_FAILURE; } // Test GetOutput() before creating the output - if( filter->GetOutput() == ITK_NULLPTR ) + if( filter->GetOutput() == nullptr ) { - std::cerr << "GetOutput() should have returned NON-ITK_NULLPTR" << std::endl; + std::cerr << "GetOutput() should have returned NON-nullptr" << std::endl; return EXIT_FAILURE; } @@ -148,7 +148,7 @@ int itkSampleToHistogramFilterTest( int , char * [] ) const InputHistogramSizeObjectType * returnedHistogramSizeObject = filter->GetHistogramSizeInput(); - if( returnedHistogramSizeObject == ITK_NULLPTR ) + if( returnedHistogramSizeObject == nullptr ) { std::cerr << "SetHistogramSize() failed pointer consistency test" << std::endl; return EXIT_FAILURE; @@ -261,9 +261,9 @@ int itkSampleToHistogramFilterTest( int , char * [] ) const InputHistogramMeasurementObjectType * recoveredMarginalScaleObject = filter->GetMarginalScaleInput(); - if( recoveredMarginalScaleObject == ITK_NULLPTR ) + if( recoveredMarginalScaleObject == nullptr ) { - std::cerr << "GetMarginalScaleInput() returned ITK_NULLPTR object." << std::endl; + std::cerr << "GetMarginalScaleInput() returned nullptr object." << std::endl; return EXIT_FAILURE; } @@ -277,9 +277,9 @@ int itkSampleToHistogramFilterTest( int , char * [] ) recoveredMarginalScaleObject = filter->GetMarginalScaleInput(); - if( recoveredMarginalScaleObject == ITK_NULLPTR ) + if( recoveredMarginalScaleObject == nullptr ) { - std::cerr << "GetMarginalScaleInput() returned ITK_NULLPTR object." << std::endl; + std::cerr << "GetMarginalScaleInput() returned nullptr object." << std::endl; return EXIT_FAILURE; } @@ -366,7 +366,7 @@ int itkSampleToHistogramFilterTest( int , char * [] ) const InputHistogramMeasurementVectorObjectType * returnedHistogramBinMinimumObject = filter->GetHistogramBinMinimumInput(); - if( returnedHistogramBinMinimumObject == ITK_NULLPTR ) + if( returnedHistogramBinMinimumObject == nullptr ) { std::cerr << "SetHistogramSize() failed pointer consistency test" << std::endl; return EXIT_FAILURE; @@ -487,7 +487,7 @@ int itkSampleToHistogramFilterTest( int , char * [] ) const InputHistogramMeasurementVectorObjectType * returnedHistogramBinMaximumObject = filter->GetHistogramBinMaximumInput(); - if( returnedHistogramBinMaximumObject == ITK_NULLPTR ) + if( returnedHistogramBinMaximumObject == nullptr ) { std::cerr << "SetHistogramSize() failed pointer consistency test" << std::endl; return EXIT_FAILURE; @@ -602,9 +602,9 @@ int itkSampleToHistogramFilterTest( int , char * [] ) const InputBooleanObjectType * recoveredAutoMinimumMaximumObject = filter->GetAutoMinimumMaximumInput(); - if( recoveredAutoMinimumMaximumObject == ITK_NULLPTR ) + if( recoveredAutoMinimumMaximumObject == nullptr ) { - std::cerr << "GetAutoMinimumMaximumInput() returned ITK_NULLPTR object." << std::endl; + std::cerr << "GetAutoMinimumMaximumInput() returned nullptr object." << std::endl; return EXIT_FAILURE; } @@ -618,9 +618,9 @@ int itkSampleToHistogramFilterTest( int , char * [] ) recoveredAutoMinimumMaximumObject = filter->GetAutoMinimumMaximumInput(); - if( recoveredAutoMinimumMaximumObject == ITK_NULLPTR ) + if( recoveredAutoMinimumMaximumObject == nullptr ) { - std::cerr << "GetAutoMinimumMaximumInput() returned ITK_NULLPTR object." << std::endl; + std::cerr << "GetAutoMinimumMaximumInput() returned nullptr object." << std::endl; return EXIT_FAILURE; } @@ -693,7 +693,7 @@ int itkSampleToHistogramFilterTest( int , char * [] ) // // Testing exception cases in the GenerateData() method. // - filter->SetHistogramSizeInput( ITK_NULLPTR ); + filter->SetHistogramSizeInput( nullptr ); std::cout << "GetHistogramSizeInput() = " << filter->GetHistogramSizeInput() << std::endl; @@ -701,7 +701,7 @@ int itkSampleToHistogramFilterTest( int , char * [] ) { filter->Update(); std::cerr << "Failure to throw expected exception "; - std::cerr << " due to ITK_NULLPTR SetHistogramSizeInput()"; + std::cerr << " due to nullptr SetHistogramSizeInput()"; return EXIT_FAILURE; } catch( itk::MissingHistogramSizeInput &e ) @@ -720,7 +720,7 @@ int itkSampleToHistogramFilterTest( int , char * [] ) // // Testing exception cases in the GenerateData() method. // - filter->SetMarginalScaleInput( ITK_NULLPTR ); + filter->SetMarginalScaleInput( nullptr ); std::cout << "GetMarginalScaleInput() = " << filter->GetMarginalScaleInput() << std::endl; @@ -728,7 +728,7 @@ int itkSampleToHistogramFilterTest( int , char * [] ) { filter->Update(); std::cerr << "Failure to throw expected exception "; - std::cerr << " due to ITK_NULLPTR SetMarginalScaleInput()"; + std::cerr << " due to nullptr SetMarginalScaleInput()"; return EXIT_FAILURE; } catch( itk::MissingHistogramMarginalScaleInput &e ) @@ -753,7 +753,7 @@ int itkSampleToHistogramFilterTest( int , char * [] ) // First, force to use the minimum and maximum provided by the user. filter->SetAutoMinimumMaximum( false ); - filter->SetHistogramBinMinimumInput( ITK_NULLPTR ); + filter->SetHistogramBinMinimumInput( nullptr ); std::cout << "GetHistogramBinMinimumInput() = " << filter->GetHistogramBinMinimumInput() << std::endl; @@ -761,7 +761,7 @@ int itkSampleToHistogramFilterTest( int , char * [] ) { filter->Update(); std::cerr << "Failure to throw expected exception "; - std::cerr << " due to ITK_NULLPTR SetHistogramBinMinimumInput()"; + std::cerr << " due to nullptr SetHistogramBinMinimumInput()"; return EXIT_FAILURE; } catch( itk::MissingHistogramBinMinimumInput &e ) @@ -781,7 +781,7 @@ int itkSampleToHistogramFilterTest( int , char * [] ) // // Testing exception cases in the GenerateData() method. // - filter->SetHistogramBinMaximumInput( ITK_NULLPTR ); + filter->SetHistogramBinMaximumInput( nullptr ); std::cout << "GetHistogramBinMaximumInput() = " << filter->GetHistogramBinMaximumInput() << std::endl; @@ -789,7 +789,7 @@ int itkSampleToHistogramFilterTest( int , char * [] ) { filter->Update(); std::cerr << "Failure to throw expected exception "; - std::cerr << " due to ITK_NULLPTR SetHistogramBinMaximumInput()"; + std::cerr << " due to nullptr SetHistogramBinMaximumInput()"; return EXIT_FAILURE; } catch( itk::MissingHistogramBinMaximumInput &e ) @@ -819,9 +819,9 @@ int itkSampleToHistogramFilterTest( int , char * [] ) // Test GetOutput() after creating the output - if( filter->GetOutput() == ITK_NULLPTR ) + if( filter->GetOutput() == nullptr ) { - std::cerr << "GetOutput() should have returned NON-ITK_NULLPTR" << std::endl; + std::cerr << "GetOutput() should have returned NON-nullptr" << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Numerics/Statistics/test/itkSampleToSubsampleFilterTest1.cxx b/Modules/Numerics/Statistics/test/itkSampleToSubsampleFilterTest1.cxx index 4f0365ea4d9..26bc7c9653d 100644 --- a/Modules/Numerics/Statistics/test/itkSampleToSubsampleFilterTest1.cxx +++ b/Modules/Numerics/Statistics/test/itkSampleToSubsampleFilterTest1.cxx @@ -40,14 +40,14 @@ class SubsamplerTester : public SampleToSubsampleFilter< TSample > protected: SubsamplerTester() {} - virtual ~SubsamplerTester() ITK_OVERRIDE {} - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE + ~SubsamplerTester() override {} + void PrintSelf(std::ostream& os, Indent indent) const override { this->Superclass::PrintSelf(os,indent); os << "Superclass = " << this->Superclass::GetNameOfClass() << std::endl; } - void GenerateData() ITK_OVERRIDE + void GenerateData() override { } @@ -80,16 +80,16 @@ int itkSampleToSubsampleFilterTest1(int, char* [] ) FilterType::Pointer filter = FilterType::New(); // Test GetInput() before setting the input - if( filter->GetInput() != ITK_NULLPTR ) + if( filter->GetInput() != nullptr ) { - std::cerr << "GetInput() should have returned ITK_NULLPTR" << std::endl; + std::cerr << "GetInput() should have returned nullptr" << std::endl; return EXIT_FAILURE; } // Test GetOutput() before creating the output - if( filter->GetOutput() == ITK_NULLPTR ) + if( filter->GetOutput() == nullptr ) { - std::cerr << "GetOutput() should have returned NON-ITK_NULLPTR" << std::endl; + std::cerr << "GetOutput() should have returned NON-nullptr" << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx index ce60b53ea3c..ec105f4283b 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceListSampleFilterTest.cxx @@ -90,7 +90,7 @@ int itkScalarImageToCooccurrenceListSampleFilterTest( int , char *[] ) try { filter->Update(); - std::cerr << "Failed to throw expected exception due to ITK_NULLPTR input: " << std::endl; + std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } catch ( itk::ExceptionObject & excp ) @@ -100,9 +100,9 @@ int itkScalarImageToCooccurrenceListSampleFilterTest( int , char *[] ) filter->ResetPipeline(); - if ( filter->GetInput() != ITK_NULLPTR ) + if ( filter->GetInput() != nullptr ) { - std::cerr << "GetInput() should return ITK_NULLPTR since the input is\ + std::cerr << "GetInput() should return nullptr since the input is\ not set yet " << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx index 0321505c352..89531121d86 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToCooccurrenceMatrixFilterTest.cxx @@ -105,7 +105,7 @@ int itkScalarImageToCooccurrenceMatrixFilterTest(int, char* [] ) { filter->Update(); passed = false; - std::cerr << "Failed to throw expected exception due to ITK_NULLPTR input: " << std::endl; + std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } catch ( itk::ExceptionObject & excp ) @@ -115,29 +115,29 @@ int itkScalarImageToCooccurrenceMatrixFilterTest(int, char* [] ) filter->ResetPipeline(); - if ( filter->GetInput() != ITK_NULLPTR ) + if ( filter->GetInput() != nullptr ) { - std::cerr << "GetInput() should return ITK_NULLPTR since the input is\ + std::cerr << "GetInput() should return nullptr since the input is\ not set yet " << std::endl; passed = false; } - if ( filter->GetMaskImage() != ITK_NULLPTR ) + if ( filter->GetMaskImage() != nullptr ) { - std::cerr << "GetMaskImage() should return ITK_NULLPTR since the mask image is\ + std::cerr << "GetMaskImage() should return nullptr since the mask image is\ not set yet " << std::endl; passed = false; } - //Invoke update with a ITK_NULLPTR input. An exception should be + //Invoke update with a nullptr input. An exception should be //thrown. - filter->SetInput( ITK_NULLPTR ); + filter->SetInput( nullptr ); try { filter->Update(); passed = false; - std::cerr << "Failed to throw expected exception due to ITK_NULLPTR input: " << std::endl; + std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } catch ( itk::ExceptionObject & excp ) @@ -147,7 +147,7 @@ int itkScalarImageToCooccurrenceMatrixFilterTest(int, char* [] ) filter->ResetPipeline(); - if ( filter->GetInput() != ITK_NULLPTR ) + if ( filter->GetInput() != nullptr ) { passed = false; } diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx index 82d63a1ca0b..c397dbfb325 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthFeaturesFilterTest.cxx @@ -112,7 +112,7 @@ int itkScalarImageToRunLengthFeaturesFilterTest(int, char* [] ) { texFilter->Update(); passed = false; - std::cerr << "Failed to throw expected exception due to ITK_NULLPTR input: " << std::endl; + std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } catch ( itk::ExceptionObject & excp ) @@ -122,28 +122,28 @@ int itkScalarImageToRunLengthFeaturesFilterTest(int, char* [] ) texFilter->ResetPipeline(); - if ( texFilter->GetInput() != ITK_NULLPTR ) + if ( texFilter->GetInput() != nullptr ) { - std::cerr << "GetInput() should return ITK_NULLPTR since the input is " + std::cerr << "GetInput() should return nullptr since the input is " << " not set yet " << std::endl; passed = false; } - if ( texFilter->GetMaskImage() != ITK_NULLPTR ) + if ( texFilter->GetMaskImage() != nullptr ) { - std::cerr << "GetMaskImage() should return ITK_NULLPTR since the mask image is " + std::cerr << "GetMaskImage() should return nullptr since the mask image is " << "not set yet " << std::endl; passed = false; } - //Invoke update with a ITK_NULLPTR input. An exception should be + //Invoke update with a nullptr input. An exception should be //thrown. - texFilter->SetInput( ITK_NULLPTR ); + texFilter->SetInput( nullptr ); try { texFilter->Update(); passed = false; - std::cerr << "Failed to throw expected exception due to ITK_NULLPTR input: " << std::endl; + std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } catch ( itk::ExceptionObject & excp ) @@ -153,7 +153,7 @@ int itkScalarImageToRunLengthFeaturesFilterTest(int, char* [] ) texFilter->ResetPipeline(); - if ( texFilter->GetInput() != ITK_NULLPTR ) + if ( texFilter->GetInput() != nullptr ) { passed = false; } @@ -290,7 +290,7 @@ int itkScalarImageToRunLengthFeaturesFilterTest(int, char* [] ) texFilter->Update(); - if ( texFilter->GetMaskImage() == ITK_NULLPTR ) + if ( texFilter->GetMaskImage() == nullptr ) { std::cerr << "Error: " << std::endl; std::cerr << "Mask should not be null." << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx index 7b83ced64ed..ff732f31f2c 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToRunLengthMatrixFilterTest.cxx @@ -192,7 +192,7 @@ int itkScalarImageToRunLengthMatrixFilterTest(int, char* [] ) << std::endl; passed = false; } - if ( filter->GetMaskImage() == ITK_NULLPTR ) + if ( filter->GetMaskImage() == nullptr ) { std::cerr << "Error: " << std::endl; std::cerr << "Mask should not be null." << std::endl; diff --git a/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx b/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx index b06c61f661d..cb1c35e546a 100644 --- a/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkScalarImageToTextureFeaturesFilterTest.cxx @@ -112,7 +112,7 @@ int itkScalarImageToTextureFeaturesFilterTest(int, char* [] ) { texFilter->Update(); passed = false; - std::cerr << "Failed to throw expected exception due to ITK_NULLPTR input: " << std::endl; + std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } catch ( itk::ExceptionObject & excp ) @@ -122,28 +122,28 @@ int itkScalarImageToTextureFeaturesFilterTest(int, char* [] ) texFilter->ResetPipeline(); - if ( texFilter->GetInput() != ITK_NULLPTR ) + if ( texFilter->GetInput() != nullptr ) { - std::cerr << "GetInput() should return ITK_NULLPTR since the input is\ + std::cerr << "GetInput() should return nullptr since the input is\ not set yet " << std::endl; passed = false; } - if ( texFilter->GetMaskImage() != ITK_NULLPTR ) + if ( texFilter->GetMaskImage() != nullptr ) { - std::cerr << "GetMaskImage() should return ITK_NULLPTR since the mask image is\ + std::cerr << "GetMaskImage() should return nullptr since the mask image is\ not set yet " << std::endl; passed = false; } - //Invoke update with a ITK_NULLPTR input. An exception should be + //Invoke update with a nullptr input. An exception should be //thrown. - texFilter->SetInput( ITK_NULLPTR ); + texFilter->SetInput( nullptr ); try { texFilter->Update(); passed = false; - std::cerr << "Failed to throw expected exception due to ITK_NULLPTR input: " << std::endl; + std::cerr << "Failed to throw expected exception due to nullptr input: " << std::endl; return EXIT_FAILURE; } catch ( itk::ExceptionObject & excp ) @@ -153,7 +153,7 @@ int itkScalarImageToTextureFeaturesFilterTest(int, char* [] ) texFilter->ResetPipeline(); - if ( texFilter->GetInput() != ITK_NULLPTR ) + if ( texFilter->GetInput() != nullptr ) { passed = false; } diff --git a/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx index 1b74b101da4..51e44a5c6ec 100644 --- a/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkStandardDeviationPerComponentSampleFilterTest.cxx @@ -105,9 +105,9 @@ int itkStandardDeviationPerComponentSampleFilterTest(int, char* [] ) standardDeviationFilter->ResetPipeline(); - if ( standardDeviationFilter->GetInput() != ITK_NULLPTR ) + if ( standardDeviationFilter->GetInput() != nullptr ) { - std::cerr << "GetInput() should return ITK_NULLPTR if the input \ + std::cerr << "GetInput() should return nullptr if the input \ has not been set" << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx index 74daa5fa0a9..30077368823 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest.cxx @@ -79,7 +79,7 @@ class WeightedCovarianceTestFunction : typedef double OutputType; /**Evaluate at the specified input position */ - virtual OutputType Evaluate( const InputType & itkNotUsed( input ) ) const ITK_OVERRIDE + OutputType Evaluate( const InputType & itkNotUsed( input ) ) const override { MeasurementVectorType measurements; // set the weight factor of the measurment @@ -89,7 +89,7 @@ class WeightedCovarianceTestFunction : protected: WeightedCovarianceTestFunction() {} - ~WeightedCovarianceTestFunction() ITK_OVERRIDE {} + ~WeightedCovarianceTestFunction() override {} }; // end of class @@ -155,9 +155,9 @@ int itkWeightedCovarianceSampleFilterTest(int, char* [] ) std::cout << "Expected exception caught: " << excp << std::endl; } - if ( filter->GetInput() != ITK_NULLPTR ) + if ( filter->GetInput() != nullptr ) { - std::cerr << "GetInput() should return ITK_NULLPTR if the input \ + std::cerr << "GetInput() should return nullptr if the input \ has not been set" << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx index d9099ac21ac..ad0c3938ee6 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedCovarianceSampleFilterTest2.cxx @@ -78,7 +78,7 @@ class WeightedCovarianceTestFunction : typedef double OutputType; /**Evaluate at the specified input position */ - virtual OutputType Evaluate( const InputType & itkNotUsed( input ) ) const ITK_OVERRIDE + OutputType Evaluate( const InputType & itkNotUsed( input ) ) const override { MeasurementVectorType2 measurements; // set the weight factor of the measurment @@ -88,7 +88,7 @@ class WeightedCovarianceTestFunction : protected: WeightedCovarianceTestFunction() {} - ~WeightedCovarianceTestFunction() ITK_OVERRIDE {} + ~WeightedCovarianceTestFunction() override {} }; // end of class @@ -156,9 +156,9 @@ int itkWeightedCovarianceSampleFilterTest2(int, char* [] ) std::cout << "Expected exception caught: " << excp << std::endl; } - if ( filter->GetInput() != ITK_NULLPTR ) + if ( filter->GetInput() != nullptr ) { - std::cerr << "GetInput() should return ITK_NULLPTR if the input \ + std::cerr << "GetInput() should return nullptr if the input \ has not been set" << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx b/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx index 7d22eb640c6..64ab346ad9f 100644 --- a/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx +++ b/Modules/Numerics/Statistics/test/itkWeightedMeanSampleFilterTest.cxx @@ -48,7 +48,7 @@ class WeightedMeanTestFunction : typedef double OutputType; /**Evaluate at the specified input position */ - virtual OutputType Evaluate( const InputType& input ) const ITK_OVERRIDE + OutputType Evaluate( const InputType& input ) const override { MeasurementVectorType measurements; // set the weight factor of the measurment @@ -66,7 +66,7 @@ class WeightedMeanTestFunction : protected: WeightedMeanTestFunction() {} - ~WeightedMeanTestFunction() ITK_OVERRIDE {} + ~WeightedMeanTestFunction() override {} }; // end of class @@ -121,9 +121,9 @@ int itkWeightedMeanSampleFilterTest(int, char* [] ) std::cerr << "Exception caught: " << excp << std::endl; } - if ( filter->GetInput() != ITK_NULLPTR ) + if ( filter->GetInput() != nullptr ) { - std::cerr << "GetInput() should return ITK_NULLPTR if the input \ + std::cerr << "GetInput() should return nullptr if the input \ has not been set" << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Registration/Common/include/itkBSplineExponentialDiffeomorphicTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkBSplineExponentialDiffeomorphicTransformParametersAdaptor.h index 19912dd8f6f..62f0673efdb 100644 --- a/Modules/Registration/Common/include/itkBSplineExponentialDiffeomorphicTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkBSplineExponentialDiffeomorphicTransformParametersAdaptor.h @@ -111,13 +111,13 @@ class ITK_TEMPLATE_EXPORT BSplineExponentialDiffeomorphicTransformParametersAdap /** * Change the displacement field fixed parameters */ - virtual void AdaptTransformParameters() ITK_OVERRIDE; + void AdaptTransformParameters() override; protected: BSplineExponentialDiffeomorphicTransformParametersAdaptor(); - ~BSplineExponentialDiffeomorphicTransformParametersAdaptor() ITK_OVERRIDE; + ~BSplineExponentialDiffeomorphicTransformParametersAdaptor() override; - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineExponentialDiffeomorphicTransformParametersAdaptor); diff --git a/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h index 8b5edb5f101..daf042b4880 100644 --- a/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkBSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h @@ -111,13 +111,13 @@ class ITK_TEMPLATE_EXPORT BSplineSmoothingOnUpdateDisplacementFieldTransformPara /** * Change the displacement field fixed parameters */ - virtual void AdaptTransformParameters() ITK_OVERRIDE; + void AdaptTransformParameters() override; protected: BSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor(); - ~BSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor() ITK_OVERRIDE; + ~BSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor() override; - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor); diff --git a/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.h index 88249c0bb25..e3c370745a6 100644 --- a/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkBSplineTransformParametersAdaptor.h @@ -128,16 +128,16 @@ class ITK_TEMPLATE_EXPORT BSplineTransformParametersAdaptor /** Get the required direction. */ itkGetConstReferenceMacro( RequiredTransformDomainDirection, DirectionType ); - virtual void SetRequiredFixedParameters( const FixedParametersType ) ITK_OVERRIDE; + void SetRequiredFixedParameters( const FixedParametersType ) override; /** Initialize the transform using the specified fixed parameters */ - virtual void AdaptTransformParameters() ITK_OVERRIDE; + void AdaptTransformParameters() override; protected: BSplineTransformParametersAdaptor(); - ~BSplineTransformParametersAdaptor() ITK_OVERRIDE; + ~BSplineTransformParametersAdaptor() override; - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BSplineTransformParametersAdaptor); diff --git a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.h b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.h index d00e6992fc0..87b79bc1271 100644 --- a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.h +++ b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.h @@ -153,16 +153,16 @@ public MeshToMeshFilter< TFeatures, TDisplacements> protected: /** MakeOutput is provided for handling multiple outputs */ using Superclass::MakeOutput; - virtual DataObject::Pointer MakeOutput( ProcessObject::DataObjectPointerArraySizeType idx ) ITK_OVERRIDE; + DataObject::Pointer MakeOutput( ProcessObject::DataObjectPointerArraySizeType idx ) override; /** We need to create our own GenerateOutputInformation because the the * default version from ProcessObject result in a dynamic_cast of the input * pointer to the output pointer type in PointSet::CopyInformation. This does * not work since they are different types. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** We cannot stream (see comments in GenerateOutputInformation). */ - virtual void EnlargeOutputRequestedRegion(DataObject * output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject * output) override; /** Generate temporary containers to be used by individual threads exclusively */ virtual void BeforeThreadedGenerateData(); @@ -173,12 +173,12 @@ public MeshToMeshFilter< TFeatures, TDisplacements> virtual void AfterThreadedGenerateData(); /** Start multithreader here since MeshToMesh filter does not provide multithreaded support */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; BlockMatchingImageFilter(); - ~BlockMatchingImageFilter() ITK_OVERRIDE; + ~BlockMatchingImageFilter() override; - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; /** Static function used as a "callback" by the MultiThreader. The threading * library will call this routine for each thread, which will delegate the diff --git a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx index cd9f9454566..6fff990ce24 100644 --- a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx +++ b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx @@ -126,7 +126,7 @@ BlockMatchingImageFilter< TFixedImage, TMovingImage, TFeatures, TDisplacements, break; } itkExceptionMacro(<< "Bad output index " << idx ); - return ITK_NULLPTR; + return nullptr; } diff --git a/Modules/Registration/Common/include/itkCenteredTransformInitializer.h b/Modules/Registration/Common/include/itkCenteredTransformInitializer.h index e64a6dc5763..d72144c40af 100644 --- a/Modules/Registration/Common/include/itkCenteredTransformInitializer.h +++ b/Modules/Registration/Common/include/itkCenteredTransformInitializer.h @@ -133,9 +133,9 @@ class ITK_TEMPLATE_EXPORT CenteredTransformInitializer:public Object protected: CenteredTransformInitializer(); - ~CenteredTransformInitializer() ITK_OVERRIDE {} + ~CenteredTransformInitializer() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; itkGetModifiableObjectMacro(Transform, TransformType); diff --git a/Modules/Registration/Common/include/itkCenteredVersorTransformInitializer.h b/Modules/Registration/Common/include/itkCenteredVersorTransformInitializer.h index 07a0ce69a1c..c9cd38b7aea 100644 --- a/Modules/Registration/Common/include/itkCenteredVersorTransformInitializer.h +++ b/Modules/Registration/Common/include/itkCenteredVersorTransformInitializer.h @@ -86,7 +86,7 @@ class ITK_TEMPLATE_EXPORT CenteredVersorTransformInitializer: typedef typename Superclass::OutputVectorType OutputVectorType; /** Initialize the transform using data from the images */ - void InitializeTransform() ITK_OVERRIDE; + void InitializeTransform() override; /** Enable the use of the principal axes of each image to compute an * initial rotation that will align them. */ @@ -96,9 +96,9 @@ class ITK_TEMPLATE_EXPORT CenteredVersorTransformInitializer: protected: CenteredVersorTransformInitializer(); - ~CenteredVersorTransformInitializer() ITK_OVERRIDE {} + ~CenteredVersorTransformInitializer() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CenteredVersorTransformInitializer); diff --git a/Modules/Registration/Common/include/itkCommandIterationUpdate.h b/Modules/Registration/Common/include/itkCommandIterationUpdate.h index 365597fb982..6e1f124c07a 100644 --- a/Modules/Registration/Common/include/itkCommandIterationUpdate.h +++ b/Modules/Registration/Common/include/itkCommandIterationUpdate.h @@ -57,12 +57,12 @@ class CommandIterationUpdate : public Command /** * Execute method will print data at each iteration */ - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object *, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object *, const itk::EventObject & event) override { if( typeid( event ) == typeid( itk::StartEvent ) ) { diff --git a/Modules/Registration/Common/include/itkCommandVnlIterationUpdate.h b/Modules/Registration/Common/include/itkCommandVnlIterationUpdate.h index 79ca2ec340d..e34a48ef1d0 100644 --- a/Modules/Registration/Common/include/itkCommandVnlIterationUpdate.h +++ b/Modules/Registration/Common/include/itkCommandVnlIterationUpdate.h @@ -57,12 +57,12 @@ class CommandVnlIterationUpdate : public Command /** * Execute method will print data at each iteration */ - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * itkNotUsed(caller), const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * itkNotUsed(caller), const itk::EventObject & event) override { if( typeid( event ) == typeid( itk::StartEvent ) ) { diff --git a/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.h b/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.h index 81f0de5c288..d71228da77e 100644 --- a/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.h @@ -124,26 +124,26 @@ class ITK_TEMPLATE_EXPORT CompareHistogramImageToImageMetric: itkGetConstReferenceMacro(TrainingFixedImageRegion, FixedImageRegionType); /** Return the number of parameters required by the Transform */ - unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return this->GetTransform()->GetNumberOfParameters(); } /** Forms the histogram of the training images to prepare to evaluate the * metric. Must set all parameters first. */ - void Initialize() ITK_OVERRIDE; + void Initialize() override; protected: /** Constructor is protected to ensure that \c New() function is used to create instances. */ CompareHistogramImageToImageMetric(); - virtual ~CompareHistogramImageToImageMetric() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CompareHistogramImageToImageMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Form the Histogram for the Training data */ void FormTrainingHistogram(); /** Evaluates the comparison histogram metric. All sub-classes must re-implement method. */ - virtual MeasureType EvaluateMeasure(HistogramType & histogram) const ITK_OVERRIDE = 0; + MeasureType EvaluateMeasure(HistogramType & histogram) const override = 0; private: // Purposely not implemented. diff --git a/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx index 84b74ca8dea..e3e70366c00 100644 --- a/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx @@ -26,11 +26,11 @@ namespace itk template< typename TFixedImage, typename TMovingImage > CompareHistogramImageToImageMetric< TFixedImage, TMovingImage >::CompareHistogramImageToImageMetric() { - m_TrainingFixedImage = ITK_NULLPTR; // has to be provided by the user. - m_TrainingMovingImage = ITK_NULLPTR; // has to be provided by the user. - m_TrainingTransform = ITK_NULLPTR; // has to be provided by the user. - m_TrainingInterpolator = ITK_NULLPTR; // has to be provided by the user. - m_TrainingHistogram = ITK_NULLPTR; // either provided by the user or created + m_TrainingFixedImage = nullptr; // has to be provided by the user. + m_TrainingMovingImage = nullptr; // has to be provided by the user. + m_TrainingTransform = nullptr; // has to be provided by the user. + m_TrainingInterpolator = nullptr; // has to be provided by the user. + m_TrainingHistogram = nullptr; // either provided by the user or created } template< typename TFixedImage, typename TMovingImage > diff --git a/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.h index 61c783b9b7b..755aa2b58f4 100644 --- a/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.h @@ -118,11 +118,11 @@ class ITK_TEMPLATE_EXPORT ConstantVelocityFieldTransformParametersAdaptor virtual const DirectionType GetRequiredDirection() const; /** Initialize the transform using the specified fixed parameters */ - virtual void AdaptTransformParameters() ITK_OVERRIDE; + void AdaptTransformParameters() override; protected: ConstantVelocityFieldTransformParametersAdaptor(); - ~ConstantVelocityFieldTransformParametersAdaptor() ITK_OVERRIDE; + ~ConstantVelocityFieldTransformParametersAdaptor() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ConstantVelocityFieldTransformParametersAdaptor); diff --git a/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.h b/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.h index 4ba199a109d..471cca0a3ab 100644 --- a/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.h @@ -81,10 +81,10 @@ class ITK_TEMPLATE_EXPORT CorrelationCoefficientHistogramImageToImageMetric: /** Constructor is protected to ensure that \c New() function is used to create instances. */ CorrelationCoefficientHistogramImageToImageMetric(){} - virtual ~CorrelationCoefficientHistogramImageToImageMetric() ITK_OVERRIDE {} + ~CorrelationCoefficientHistogramImageToImageMetric() override {} /** Evaluates the sum of squared differences from the histogram. */ - virtual MeasureType EvaluateMeasure(HistogramType & histogram) const ITK_OVERRIDE; + MeasureType EvaluateMeasure(HistogramType & histogram) const override; private: /** Returns the mean in the x-direction. */ diff --git a/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.h index 71aff5bda58..2f3267af116 100644 --- a/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.h @@ -120,11 +120,11 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldTransformParametersAdaptor virtual const DirectionType GetRequiredDirection() const; /** Initialize the transform using the specified fixed parameters */ - virtual void AdaptTransformParameters() ITK_OVERRIDE; + void AdaptTransformParameters() override; protected: DisplacementFieldTransformParametersAdaptor(); - ~DisplacementFieldTransformParametersAdaptor() ITK_OVERRIDE; + ~DisplacementFieldTransformParametersAdaptor() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DisplacementFieldTransformParametersAdaptor); diff --git a/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx index 40734799003..208d45d5dd1 100644 --- a/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx @@ -231,7 +231,7 @@ DisplacementFieldTransformParametersAdaptor newDisplacementField->Update(); newDisplacementField->DisconnectPipeline(); - typename DisplacementFieldType::Pointer newInverseDisplacementField = ITK_NULLPTR; + typename DisplacementFieldType::Pointer newInverseDisplacementField = nullptr; if( this->m_Transform->GetInverseDisplacementField() ) { typename LinearInterpolatorType::Pointer inverseInterpolator = LinearInterpolatorType::New(); diff --git a/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h b/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h index 20029dfbcf9..968d35f82ce 100644 --- a/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h +++ b/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.h @@ -85,14 +85,14 @@ class ITK_TEMPLATE_EXPORT EuclideanDistancePointMetric: typedef typename DistanceMapType::ConstPointer DistanceMapPointer; /** Get the number of values, i.e. the number of points in the moving set. */ - unsigned int GetNumberOfValues() const ITK_OVERRIDE; + unsigned int GetNumberOfValues() const override; /** Get the derivatives of the match measure. */ void GetDerivative(const TransformParametersType & parameters, - DerivativeType & Derivative) const ITK_OVERRIDE; + DerivativeType & Derivative) const override; /** Get the match measure, i.e. the value for single valued optimizers. */ - MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const TransformParametersType & parameters) const override; /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, @@ -112,9 +112,9 @@ class ITK_TEMPLATE_EXPORT EuclideanDistancePointMetric: protected: EuclideanDistancePointMetric(); - virtual ~EuclideanDistancePointMetric() ITK_OVERRIDE {} + ~EuclideanDistancePointMetric() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(EuclideanDistancePointMetric); diff --git a/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.h index b179b7b46d5..b81b5677d86 100644 --- a/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.h @@ -63,13 +63,13 @@ class ITK_TEMPLATE_EXPORT GaussianExponentialDiffeomorphicTransformParametersAda virtual void SetGaussianSmoothingVarianceForTheUpdateField( ScalarType ); itkGetConstReferenceMacro( GaussianSmoothingVarianceForTheUpdateField, ScalarType ); - virtual void AdaptTransformParameters() ITK_OVERRIDE; + void AdaptTransformParameters() override; protected: GaussianExponentialDiffeomorphicTransformParametersAdaptor(); - ~GaussianExponentialDiffeomorphicTransformParametersAdaptor() ITK_OVERRIDE; + ~GaussianExponentialDiffeomorphicTransformParametersAdaptor() override; - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GaussianExponentialDiffeomorphicTransformParametersAdaptor); diff --git a/Modules/Registration/Common/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h index f966ce113b8..cfdae11fc96 100644 --- a/Modules/Registration/Common/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkGaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor.h @@ -63,13 +63,13 @@ class ITK_TEMPLATE_EXPORT GaussianSmoothingOnUpdateDisplacementFieldTransformPar virtual void SetGaussianSmoothingVarianceForTheTotalField( const ScalarType ); itkGetConstReferenceMacro( GaussianSmoothingVarianceForTheTotalField, ScalarType ); - virtual void AdaptTransformParameters() ITK_OVERRIDE; + void AdaptTransformParameters() override; protected: GaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor(); - ~GaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor() ITK_OVERRIDE; + ~GaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor() override; - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GaussianSmoothingOnUpdateDisplacementFieldTransformParametersAdaptor); diff --git a/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.h b/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.h index ab58eea81a9..2e9b266d8c4 100644 --- a/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.h @@ -121,18 +121,18 @@ class ITK_TEMPLATE_EXPORT GradientDifferenceImageToImageMetric: /** Get the derivatives of the match measure. */ void GetDerivative(const TransformParametersType & parameters, - DerivativeType & derivative) const ITK_OVERRIDE; + DerivativeType & derivative) const override; /** Get the value for single valued optimizers. */ - MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const TransformParametersType & parameters) const override; /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & Value, DerivativeType & derivative) const ITK_OVERRIDE; + MeasureType & Value, DerivativeType & derivative) const override; /** Initialize the Metric by making sure that all the components * are present and plugged together correctly */ - virtual void Initialize(void) ITK_OVERRIDE; + void Initialize(void) override; /** Write gradient images to a files for debugging purposes. */ void WriteGradientImagesToFiles() const; @@ -144,8 +144,8 @@ class ITK_TEMPLATE_EXPORT GradientDifferenceImageToImageMetric: protected: GradientDifferenceImageToImageMetric(); - virtual ~GradientDifferenceImageToImageMetric() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~GradientDifferenceImageToImageMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Compute the range of the moved image gradients. */ void ComputeMovedGradientRange() const; diff --git a/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx b/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx index 19ea6e817d7..baa831c574b 100644 --- a/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx @@ -39,7 +39,7 @@ GradientDifferenceImageToImageMetric< TFixedImage, TMovingImage > { unsigned int iDimension; - m_TransformMovingImageFilter = ITK_NULLPTR; + m_TransformMovingImageFilter = nullptr; for ( iDimension = 0; iDimension < FixedImageDimension; iDimension++ ) { diff --git a/Modules/Registration/Common/include/itkHistogramImageToImageMetric.h b/Modules/Registration/Common/include/itkHistogramImageToImageMetric.h index b3af4b47194..fa3463e05f7 100644 --- a/Modules/Registration/Common/include/itkHistogramImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkHistogramImageToImageMetric.h @@ -79,11 +79,11 @@ class ITK_TEMPLATE_EXPORT HistogramImageToImageMetric: typedef typename HistogramType::Pointer HistogramPointer; /** Initializes the metric. */ - void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Define the transform and thereby the parameter space of the metric * and the space of its derivatives */ - void SetTransform(TransformType *transform) ITK_OVERRIDE; + void SetTransform(TransformType *transform) override; /** Sets the histogram size. Note this function must be called before \c Initialize(). */ @@ -130,16 +130,16 @@ class ITK_TEMPLATE_EXPORT HistogramImageToImageMetric: itkGetConstReferenceMacro(DerivativeStepLengthScales, ScalesType); /** Get the value for single valued optimizers. */ - MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const TransformParametersType & parameters) const override; /** Get the derivatives of the match measure. */ void GetDerivative(const TransformParametersType & parameters, - DerivativeType & derivative) const ITK_OVERRIDE; + DerivativeType & derivative) const override; /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, MeasureType & Value, - DerivativeType & Derivative) const ITK_OVERRIDE; + DerivativeType & Derivative) const override; /** Set the lower bounds of the intensities to be considered for computing * the histogram. This option allows to focus the computation of the Metric in @@ -161,7 +161,7 @@ class ITK_TEMPLATE_EXPORT HistogramImageToImageMetric: /** Constructor is protected to ensure that \c New() function is used to create instances. */ HistogramImageToImageMetric(); - virtual ~HistogramImageToImageMetric() ITK_OVERRIDE {} + ~HistogramImageToImageMetric() override {} /** The histogram size. */ HistogramSizeType m_HistogramSize; @@ -200,7 +200,7 @@ class ITK_TEMPLATE_EXPORT HistogramImageToImageMetric: virtual MeasureType EvaluateMeasure(HistogramType & histogram) const = 0; /** PrintSelf function */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(HistogramImageToImageMetric); diff --git a/Modules/Registration/Common/include/itkImageRegistrationMethod.h b/Modules/Registration/Common/include/itkImageRegistrationMethod.h index 3782105f2d5..d8215276c01 100644 --- a/Modules/Registration/Common/include/itkImageRegistrationMethod.h +++ b/Modules/Registration/Common/include/itkImageRegistrationMethod.h @@ -185,19 +185,19 @@ class ITK_TEMPLATE_EXPORT ImageRegistrationMethod:public ProcessObject * output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; /** Method to return the latest modified time of this object or * any of its cached ivars */ - virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE; + ModifiedTimeType GetMTime() const override; protected: ImageRegistrationMethod(); - virtual ~ImageRegistrationMethod() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageRegistrationMethod() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Method invoked by the pipeline in order to trigger the computation of * the registration. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Provides derived classes with the ability to set this private var */ itkSetMacro(LastTransformParameters, ParametersType); diff --git a/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx b/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx index a132f70dfa9..fe16c6b0a7d 100644 --- a/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx @@ -31,12 +31,12 @@ ImageRegistrationMethod< TFixedImage, TMovingImage > { this->SetNumberOfRequiredOutputs(1); // for the Transform - m_FixedImage = ITK_NULLPTR; // has to be provided by the user. - m_MovingImage = ITK_NULLPTR; // has to be provided by the user. - m_Transform = ITK_NULLPTR; // has to be provided by the user. - m_Interpolator = ITK_NULLPTR; // has to be provided by the user. - m_Metric = ITK_NULLPTR; // has to be provided by the user. - m_Optimizer = ITK_NULLPTR; // has to be provided by the user. + m_FixedImage = nullptr; // has to be provided by the user. + m_MovingImage = 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_InitialTransformParameters = ParametersType(1); m_LastTransformParameters = ParametersType(1); @@ -311,7 +311,7 @@ ImageRegistrationMethod< TFixedImage, TMovingImage > break; default: itkExceptionMacro("MakeOutput request for an output number larger than the expected number of outputs"); - return ITK_NULLPTR; + return nullptr; } } diff --git a/Modules/Registration/Common/include/itkImageToImageMetric.h b/Modules/Registration/Common/include/itkImageToImageMetric.h index 6dd98222016..cbdb10cd74a 100644 --- a/Modules/Registration/Common/include/itkImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkImageToImageMetric.h @@ -209,7 +209,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetric: void SetTransformParameters(const ParametersType & parameters) const; /** Return the number of parameters required by the Transform */ - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return m_Transform->GetNumberOfParameters(); } @@ -315,9 +315,9 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetric: protected: ImageToImageMetric(); - virtual ~ImageToImageMetric() ITK_OVERRIDE; + ~ImageToImageMetric() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** \class FixedImageSamplePoint * A fixed image spatial sample consists of the fixed domain point diff --git a/Modules/Registration/Common/include/itkImageToImageMetric.hxx b/Modules/Registration/Common/include/itkImageToImageMetric.hxx index 73d73da01e7..a8fbb390484 100644 --- a/Modules/Registration/Common/include/itkImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkImageToImageMetric.hxx @@ -43,19 +43,19 @@ ImageToImageMetric< TFixedImage, TMovingImage > m_NumberOfPixelsCounted(0), - m_FixedImage(ITK_NULLPTR), // has to be provided by the user. - m_MovingImage(ITK_NULLPTR), // has to be provided by the user. + m_FixedImage(nullptr), // has to be provided by the user. + m_MovingImage(nullptr), // has to be provided by the user. - m_Transform(ITK_NULLPTR), // has to be provided by the user. - m_ThreaderTransform(ITK_NULLPTR), // constructed at initialization. + m_Transform(nullptr), // has to be provided by the user. + m_ThreaderTransform(nullptr), // constructed at initialization. - m_Interpolator(ITK_NULLPTR), // has to be provided by the user. + m_Interpolator(nullptr), // has to be provided by the user. m_ComputeGradient(true), // metric computes gradient by default - m_GradientImage(ITK_NULLPTR), // computed at initialization + m_GradientImage(nullptr), // computed at initialization - m_FixedImageMask(ITK_NULLPTR), - m_MovingImageMask(ITK_NULLPTR), + m_FixedImageMask(nullptr), + m_MovingImageMask(nullptr), m_NumberOfThreads(1), @@ -67,7 +67,7 @@ ImageToImageMetric< TFixedImage, TMovingImage > m_TransformIsBSpline(false), m_NumBSplineWeights(0), - m_BSplineTransform(ITK_NULLPTR), + m_BSplineTransform(nullptr), m_BSplineTransformWeightsArray(), m_BSplineTransformIndicesArray(), m_BSplinePreTransformPointsArray(0), @@ -77,15 +77,15 @@ ImageToImageMetric< TFixedImage, TMovingImage > m_UseCachingOfBSplineWeights(true), m_BSplineTransformWeights(), m_BSplineTransformIndices(), - m_ThreaderBSplineTransformWeights(ITK_NULLPTR), - m_ThreaderBSplineTransformIndices(ITK_NULLPTR), + m_ThreaderBSplineTransformWeights(nullptr), + m_ThreaderBSplineTransformIndices(nullptr), m_InterpolatorIsBSpline(false), - m_BSplineInterpolator(ITK_NULLPTR), - m_DerivativeCalculator(ITK_NULLPTR), + m_BSplineInterpolator(nullptr), + m_DerivativeCalculator(nullptr), m_Threader(MultiThreaderType::New()), - m_ThreaderNumberOfMovingImageSamples(ITK_NULLPTR), + m_ThreaderNumberOfMovingImageSamples(nullptr), m_WithinThreadPreProcess(false), m_WithinThreadPostProcess(false) { @@ -108,16 +108,16 @@ ImageToImageMetric< TFixedImage, TMovingImage > ::~ImageToImageMetric() { delete[] m_ThreaderNumberOfMovingImageSamples; - m_ThreaderNumberOfMovingImageSamples = ITK_NULLPTR; + m_ThreaderNumberOfMovingImageSamples = nullptr; delete[] m_ThreaderTransform; - m_ThreaderTransform = ITK_NULLPTR; + m_ThreaderTransform = nullptr; delete[] this->m_ThreaderBSplineTransformWeights; - this->m_ThreaderBSplineTransformWeights = ITK_NULLPTR; + this->m_ThreaderBSplineTransformWeights = nullptr; delete[] this->m_ThreaderBSplineTransformIndices; - this->m_ThreaderBSplineTransformIndices = ITK_NULLPTR; + this->m_ThreaderBSplineTransformIndices = nullptr; } /** @@ -432,7 +432,7 @@ ImageToImageMetric< TFixedImage, TMovingImage > m_DerivativeCalculator->SetInputImage(this->m_MovingImage); - m_BSplineInterpolator = ITK_NULLPTR; + m_BSplineInterpolator = nullptr; itkDebugMacro("Interpolator is not BSpline"); } else @@ -441,7 +441,7 @@ ImageToImageMetric< TFixedImage, TMovingImage > m_BSplineInterpolator->SetNumberOfThreads(m_NumberOfThreads); m_BSplineInterpolator->UseImageDirectionOn(); - m_DerivativeCalculator = ITK_NULLPTR; + m_DerivativeCalculator = nullptr; itkDebugMacro("Interpolator is BSpline"); } @@ -462,7 +462,7 @@ ImageToImageMetric< TFixedImage, TMovingImage > if ( !testPtr2 ) { m_TransformIsBSpline = false; - m_BSplineTransform = ITK_NULLPTR; + m_BSplineTransform = nullptr; itkDebugMacro("Transform is not BSplineDeformable"); } else @@ -483,10 +483,10 @@ ImageToImageMetric< TFixedImage, TMovingImage > this->m_BSplineTransformIndices.SetSize(1); delete[] this->m_ThreaderBSplineTransformWeights; - this->m_ThreaderBSplineTransformWeights = ITK_NULLPTR; + this->m_ThreaderBSplineTransformWeights = nullptr; delete[] this->m_ThreaderBSplineTransformIndices; - this->m_ThreaderBSplineTransformIndices = ITK_NULLPTR; + this->m_ThreaderBSplineTransformIndices = nullptr; if ( this->m_UseCachingOfBSplineWeights ) { diff --git a/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h b/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h index 57956dd419d..72a61a5b8dd 100644 --- a/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h +++ b/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h @@ -147,12 +147,12 @@ class ITK_TEMPLATE_EXPORT ImageToSpatialObjectMetric: itkGetModifiableObjectMacro(Interpolator, InterpolatorType); /** Get Value and Derivatives for MultipleValuedOptimizers */ - virtual void GetValueAndDerivative(const ParametersType & parameters, + void GetValueAndDerivative(const ParametersType & parameters, MeasureType & Value, - DerivativeType & Derivative) const ITK_OVERRIDE = 0; + DerivativeType & Derivative) const override = 0; /** Return the number of parameters required by the Transform */ - virtual unsigned int GetNumberOfParameters( void ) const ITK_OVERRIDE; + unsigned int GetNumberOfParameters( void ) const override; /** Initialize the metric */ virtual void Initialize(void); @@ -167,10 +167,10 @@ class ITK_TEMPLATE_EXPORT ImageToSpatialObjectMetric: protected: ImageToSpatialObjectMetric(); - virtual ~ImageToSpatialObjectMetric() ITK_OVERRIDE {} + ~ImageToSpatialObjectMetric() override {} ImageToSpatialObjectMetric(const Self &) {} void operator=(const Self &) {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; MeasureType m_MatchMeasure; DerivativeType m_MatchMeasureDerivatives; diff --git a/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx b/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx index 30791eb4d74..8503e5024c1 100644 --- a/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx +++ b/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx @@ -28,10 +28,10 @@ ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject > ::ImageToSpatialObjectMetric(): m_MatchMeasure(0) { - m_FixedImage = ITK_NULLPTR; // has to be provided by the user. - m_MovingSpatialObject = ITK_NULLPTR; // has to be provided by the user. - m_Transform = ITK_NULLPTR; // has to be provided by the user. - m_Interpolator = ITK_NULLPTR; // has to be provided by the user. + m_FixedImage = nullptr; // has to be provided by the user. + m_MovingSpatialObject = 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. } /** Return the number of parameters required by the Transform */ diff --git a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h index 688b2406613..2e3b6f14c4d 100644 --- a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h +++ b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h @@ -174,20 +174,20 @@ class ITK_TEMPLATE_EXPORT ImageToSpatialObjectRegistrationMethod : public Proces * output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; /** Method to return the latest modified time of this object or * any of its cached ivars */ - virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE; + ModifiedTimeType GetMTime() const override; protected: ImageToSpatialObjectRegistrationMethod(); - virtual ~ImageToSpatialObjectRegistrationMethod() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageToSpatialObjectRegistrationMethod() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Method invoked by the pipeline in order to trigger the computation of * the registration. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Initialize by setting the interconnects between the components. */ void Initialize(); diff --git a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx index 53d79af3e20..e32e9cfd4ef 100644 --- a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx @@ -29,12 +29,12 @@ ImageToSpatialObjectRegistrationMethod< TFixedImage, TMovingSpatialObject > { this->SetNumberOfRequiredOutputs(1); // for the Transform - m_FixedImage = ITK_NULLPTR; // has to be provided by the user - m_MovingSpatialObject = ITK_NULLPTR; // has to be provided by the user - m_Transform = ITK_NULLPTR; // has to be provided by the user - m_Interpolator = ITK_NULLPTR; // has to be provided by the user - m_Metric = ITK_NULLPTR; // has to be provided by the user - m_Optimizer = ITK_NULLPTR; // has to be provided by the user + m_FixedImage = nullptr; // has to be provided by the user + m_MovingSpatialObject = 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_InitialTransformParameters = ParametersType(1); m_LastTransformParameters = ParametersType(1); @@ -173,7 +173,7 @@ ImageToSpatialObjectRegistrationMethod< TFixedImage, TMovingSpatialObject > break; default: itkExceptionMacro("MakeOutput request for an output number larger than the expected number of outputs"); - return ITK_NULLPTR; + return nullptr; } } diff --git a/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.h b/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.h index fa11fac1006..41149daba8e 100644 --- a/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.h @@ -88,23 +88,23 @@ class ITK_TEMPLATE_EXPORT KappaStatisticImageToImageMetric: typedef typename Superclass::FixedImageRegionType FixedImageRegionType; /** Computes the gradient image and assigns it to m_GradientImage */ - void ComputeGradient() ITK_OVERRIDE; + void ComputeGradient() override; /** Get the derivatives of the match measure. */ void GetDerivative(const TransformParametersType &, - DerivativeType & derivative) const ITK_OVERRIDE; + DerivativeType & derivative) const override; /** Get the value of the metric at a particular parameter * setting. The metric value is given by 2*|A&B|/(|A|+|B|), where A * is the moving image, B is the fixed image, & is intersection, * and |.| indicates the area of the enclosed set. If ComplementOn has * been set, the metric value is 1.0-2*|A&B|/(|A|+|B|). */ - MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const TransformParametersType & parameters) const override; /** Get both the value and derivative. This method internally calls the \c GetValue() and the \c GetDerivative() method. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & Value, DerivativeType & Derivative) const ITK_OVERRIDE; + MeasureType & Value, DerivativeType & Derivative) const override; /** This method allows the user to set the foreground value. The default * value is 255. */ @@ -121,8 +121,8 @@ class ITK_TEMPLATE_EXPORT KappaStatisticImageToImageMetric: protected: KappaStatisticImageToImageMetric(); - virtual ~KappaStatisticImageToImageMetric() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~KappaStatisticImageToImageMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(KappaStatisticImageToImageMetric); diff --git a/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.h b/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.h index a3f4cc9a4c3..0ef4ea64084 100644 --- a/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.h @@ -122,25 +122,25 @@ class ITK_TEMPLATE_EXPORT KullbackLeiblerCompareHistogramImageToImageMetric: itkGetConstReferenceMacro(Epsilon, double); /** Return the number of parameters required by the Transform */ - unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return this->GetTransform()->GetNumberOfParameters(); } /** Forms the histogram of the training images to prepare to evaluate the */ /** metric. Must set all parameters first */ - void Initialize() ITK_OVERRIDE; + void Initialize() override; protected: /** Constructor is protected to ensure that \c New() function is used to create instances. */ KullbackLeiblerCompareHistogramImageToImageMetric(); - virtual ~KullbackLeiblerCompareHistogramImageToImageMetric() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~KullbackLeiblerCompareHistogramImageToImageMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Form the Histogram for the Training data */ void FormTrainingHistogram(); /** Evaluates the mutual information from the histogram. */ - virtual MeasureType EvaluateMeasure(HistogramType & histogram) const ITK_OVERRIDE; + MeasureType EvaluateMeasure(HistogramType & histogram) const override; double m_Epsilon; diff --git a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h index 31a3ed98b60..94794027fc7 100644 --- a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h +++ b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h @@ -176,9 +176,9 @@ class ITK_TEMPLATE_EXPORT LandmarkBasedTransformInitializer: protected: LandmarkBasedTransformInitializer(); - ~LandmarkBasedTransformInitializer() ITK_OVERRIDE {} + ~LandmarkBasedTransformInitializer() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LandmarkBasedTransformInitializer); diff --git a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx index 0d84cc864b0..ab7296c9bc7 100644 --- a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx +++ b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx @@ -30,8 +30,8 @@ namespace itk template< typename TTransform, typename TFixedImage, typename TMovingImage > LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage > ::LandmarkBasedTransformInitializer(): - m_ReferenceImage(ITK_NULLPTR), - m_Transform(ITK_NULLPTR), + m_ReferenceImage(nullptr), + m_Transform(nullptr), m_FixedLandmarks(0), m_MovingLandmarks(0), m_LandmarkWeight(0), @@ -48,27 +48,27 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage > ::InternalInitializeTransform(TTransform2 *) { - if ( dynamic_cast(this->m_Transform.GetPointer()) != ITK_NULLPTR ) + if ( dynamic_cast(this->m_Transform.GetPointer()) != nullptr ) { - this->InternalInitializeTransform(static_cast(ITK_NULLPTR)); + this->InternalInitializeTransform(static_cast(nullptr)); return; } - if ( dynamic_cast(this->m_Transform.GetPointer()) != ITK_NULLPTR ) + if ( dynamic_cast(this->m_Transform.GetPointer()) != nullptr ) { - this->InternalInitializeTransform(static_cast(ITK_NULLPTR)); + this->InternalInitializeTransform(static_cast(nullptr)); return; } - if ( dynamic_cast< VersorRigid3DTransformType * >( this->m_Transform.GetPointer() ) != ITK_NULLPTR ) + if ( dynamic_cast< VersorRigid3DTransformType * >( this->m_Transform.GetPointer() ) != nullptr ) { - this->InternalInitializeTransform(static_cast< VersorRigid3DTransformType*>(ITK_NULLPTR)); + this->InternalInitializeTransform(static_cast< VersorRigid3DTransformType*>(nullptr)); return; } - if ( dynamic_cast< Rigid2DTransformType * >(this->m_Transform.GetPointer() ) != ITK_NULLPTR ) + if ( dynamic_cast< Rigid2DTransformType * >(this->m_Transform.GetPointer() ) != nullptr ) { - this->InternalInitializeTransform(static_cast(ITK_NULLPTR)); + this->InternalInitializeTransform(static_cast(nullptr)); return; } @@ -83,7 +83,7 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage > { BSplineTransformType *transform = dynamic_cast(this->m_Transform.GetPointer()); - if ( transform == ITK_NULLPTR ) + if ( transform == nullptr ) { itkExceptionMacro( << "BSplineTransform Expected but transform is " << this->m_Transform->GetNameOfClass() ); @@ -205,7 +205,7 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage > { AffineTransformType *transform = dynamic_cast(this->m_Transform.GetPointer()); - if ( transform == ITK_NULLPTR ) + if ( transform == nullptr ) { itkExceptionMacro( << "AffineTransform Expected but transform is " << this->m_Transform->GetNameOfClass() ); @@ -360,7 +360,7 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage > itkDebugMacro("Internal Initialize VersorRigid3DTransformType"); VersorRigid3DTransformType *transform = dynamic_cast< VersorRigid3DTransformType * >( this->m_Transform.GetPointer() ); - if ( transform == ITK_NULLPTR ) + if ( transform == nullptr ) { itkExceptionMacro( << "VersorRigid3DTransformType Expected but transform is " << this->m_Transform->GetNameOfClass() ); @@ -554,7 +554,7 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage > Rigid2DTransformType *transform = dynamic_cast< Rigid2DTransformType * >(this->m_Transform.GetPointer() ); - if ( transform == ITK_NULLPTR ) + if ( transform == nullptr ) { itkExceptionMacro( << "VersorRigid3DTransformType Expected but transform is " << this->m_Transform->GetNameOfClass() ); @@ -702,7 +702,7 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage > itkExceptionMacro("Different number of fixed and moving landmarks"); return; } - this->InternalInitializeTransform(static_cast(ITK_NULLPTR)); + this->InternalInitializeTransform(static_cast(nullptr)); } template< typename TTransform, typename TFixedImage, typename TMovingImage > diff --git a/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.h b/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.h index 23f5673a2ce..18153a17c7d 100644 --- a/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMatchCardinalityImageToImageMetric.h @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT MatchCardinalityImageToImageMetric: /** Get the derivatives of the match measure. */ void GetDerivative(const TransformParametersType &, - DerivativeType & derivative) const ITK_OVERRIDE + DerivativeType & derivative) const override { itkWarningMacro(<< "This metric does not provide metric derivatives."); derivative.Fill(NumericTraits< typename DerivativeType::ValueType >::ZeroValue()); @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT MatchCardinalityImageToImageMetric: * of pixels under consideration (within the buffer and if * specified within a mask). In other words, the metric measure the * percentage of pixel matches or mismatches. */ - MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const TransformParametersType & parameters) const override; /** Set/Get whether this metric measures pixel matches or pixel * mismatches. Note the GetValue() returns the number of matches (or @@ -129,8 +129,8 @@ class ITK_TEMPLATE_EXPORT MatchCardinalityImageToImageMetric: protected: MatchCardinalityImageToImageMetric(); - virtual ~MatchCardinalityImageToImageMetric() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MatchCardinalityImageToImageMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Non-const version of GetValue(). This is a hack around various diff --git a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h index aa9b80a948c..3fef1163974 100644 --- a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h @@ -162,16 +162,16 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetric: * (2) uniformly select NumberOfSpatialSamples within * the FixedImageRegion, and * (3) allocate memory for pdf data structures. */ - virtual void Initialize(void) ITK_OVERRIDE; + void Initialize(void) override; /** Get the value. */ - MeasureType GetValue(const ParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const ParametersType & parameters) const override; /** Get the derivatives of the match measure. */ - void GetDerivative(const ParametersType & parameters, DerivativeType & Derivative) const ITK_OVERRIDE; + void GetDerivative(const ParametersType & parameters, DerivativeType & Derivative) const override; /** Get the value and derivatives for single valued optimizers. */ - void GetValueAndDerivative(const ParametersType & parameters, MeasureType & Value, DerivativeType & Derivative) const ITK_OVERRIDE; + void GetValueAndDerivative(const ParametersType & parameters, MeasureType & Value, DerivativeType & Derivative) const override; /** Number of bins to used in the histogram. * According to Mattes et al the optimum value is 50. @@ -224,9 +224,9 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetric: */ const typename JointPDFType::Pointer GetJointPDF () const { - if( this->m_MMIMetricPerThreadVariables == ITK_NULLPTR ) + if( this->m_MMIMetricPerThreadVariables == nullptr ) { - return JointPDFType::Pointer(ITK_NULLPTR); + return JointPDFType::Pointer(nullptr); } return this->m_MMIMetricPerThreadVariables[0].JointPDF; } @@ -239,9 +239,9 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetric: */ const typename JointPDFDerivativesType::Pointer GetJointPDFDerivatives () const { - if( this->m_MMIMetricPerThreadVariables == ITK_NULLPTR ) + if( this->m_MMIMetricPerThreadVariables == nullptr ) { - return JointPDFDerivativesType::Pointer(ITK_NULLPTR); + return JointPDFDerivativesType::Pointer(nullptr); } return this->m_MMIMetricPerThreadVariables[0].JointPDFDerivatives; } @@ -249,8 +249,8 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetric: protected: MattesMutualInformationImageToImageMetric(); - virtual ~MattesMutualInformationImageToImageMetric() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MattesMutualInformationImageToImageMetric() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MattesMutualInformationImageToImageMetric); @@ -277,20 +277,20 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetric: & movingImageGradientValue, PDFValueType cubicBSplineDerivativeValue) const; - virtual void GetValueThreadPreProcess(ThreadIdType threadId, bool withinSampleThread) const ITK_OVERRIDE; - virtual void GetValueThreadPostProcess(ThreadIdType threadId, bool withinSampleThread) const ITK_OVERRIDE; + void GetValueThreadPreProcess(ThreadIdType threadId, bool withinSampleThread) const override; + void GetValueThreadPostProcess(ThreadIdType threadId, bool withinSampleThread) const override; //NOTE: The signature in base class requires that movingImageValue is of type double - virtual bool GetValueThreadProcessSample(ThreadIdType threadId, SizeValueType fixedImageSample, + bool GetValueThreadProcessSample(ThreadIdType threadId, SizeValueType fixedImageSample, const MovingImagePointType & mappedPoint, - double movingImageValue) const ITK_OVERRIDE; + double movingImageValue) const override; - virtual void GetValueAndDerivativeThreadPreProcess( ThreadIdType threadId, bool withinSampleThread) const ITK_OVERRIDE; - virtual void GetValueAndDerivativeThreadPostProcess( ThreadIdType threadId, bool withinSampleThread) const ITK_OVERRIDE; + void GetValueAndDerivativeThreadPreProcess( ThreadIdType threadId, bool withinSampleThread) const override; + void GetValueAndDerivativeThreadPostProcess( ThreadIdType threadId, bool withinSampleThread) const override; //NOTE: The signature in base class requires that movingImageValue is of type double - virtual bool GetValueAndDerivativeThreadProcessSample(ThreadIdType threadId, SizeValueType fixedImageSample, + bool GetValueAndDerivativeThreadProcessSample(ThreadIdType threadId, SizeValueType fixedImageSample, const MovingImagePointType & mappedPoint, double movingImageValue, const ImageDerivativesType & - movingImageGradientValue) const ITK_OVERRIDE; + movingImageGradientValue) const override; /** Variables to define the marginal and joint histograms. */ SizeValueType m_NumberOfHistogramBins; diff --git a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx index bee00490e09..ae5f458c2dd 100644 --- a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx @@ -45,15 +45,15 @@ MattesMutualInformationImageToImageMetric m_FixedImageBinSize(0.0), m_MovingImageBinSize(0.0), - m_CubicBSplineKernel(ITK_NULLPTR), - m_CubicBSplineDerivativeKernel(ITK_NULLPTR), + m_CubicBSplineKernel(nullptr), + m_CubicBSplineDerivativeKernel(nullptr), m_PRatioArray(0,0), // Initialize memory m_MovingImageMarginalPDF(0), - m_MMIMetricPerThreadVariables(ITK_NULLPTR), + m_MMIMetricPerThreadVariables(nullptr), m_UseExplicitPDFDerivatives(true), m_ImplicitDerivativesSecondPass(false) @@ -340,7 +340,7 @@ MattesMutualInformationImageToImageMetric for( ThreadIdType threadId = 0; threadId < this->m_NumberOfThreads; ++threadId ) { // Not needed if this->m_UseExplicitPDFDerivatives=false - this->m_MMIMetricPerThreadVariables[threadId].JointPDFDerivatives = ITK_NULLPTR; + this->m_MMIMetricPerThreadVariables[threadId].JointPDFDerivatives = nullptr; } /** Allocate memory for helper array that will contain the pRatios @@ -1018,7 +1018,7 @@ MattesMutualInformationImageToImageMetric const int pdfFixedIndex = this->m_FixedImageSamples[sampleNumber].valueIndex; - JointPDFDerivativesValueType *derivPtr=ITK_NULLPTR; + JointPDFDerivativesValueType *derivPtr=nullptr; if( this->m_UseExplicitPDFDerivatives ) { @@ -1082,11 +1082,11 @@ MattesMutualInformationImageToImageMetric } else { - const WeightsValueType *weights = ITK_NULLPTR; - const IndexValueType * indices = ITK_NULLPTR; + const WeightsValueType *weights = nullptr; + const IndexValueType * indices = nullptr; - BSplineTransformWeightsType * weightsHelper = ITK_NULLPTR; - BSplineTransformIndexArrayType *indicesHelper = ITK_NULLPTR; + BSplineTransformWeightsType * weightsHelper = nullptr; + BSplineTransformIndexArrayType *indicesHelper = nullptr; if( this->m_UseCachingOfBSplineWeights ) { diff --git a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.h b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.h index a69282ab33d..6a7f80b80fb 100644 --- a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferenceImageToImageMetric.h @@ -77,14 +77,14 @@ class ITK_TEMPLATE_EXPORT MeanReciprocalSquareDifferenceImageToImageMetric: /** Get the derivatives of the match measure. */ void GetDerivative(const TransformParametersType & parameters, - DerivativeType & derivative) const ITK_OVERRIDE; + DerivativeType & derivative) const override; /** Get the value for single valued optimizers. */ - MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const TransformParametersType & parameters) const override; /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & Value, DerivativeType & derivative) const ITK_OVERRIDE; + MeasureType & Value, DerivativeType & derivative) const override; /** Set/Get Lambda value. This factor regulates the capture radius of this metric */ @@ -98,8 +98,8 @@ class ITK_TEMPLATE_EXPORT MeanReciprocalSquareDifferenceImageToImageMetric: protected: MeanReciprocalSquareDifferenceImageToImageMetric(); - virtual ~MeanReciprocalSquareDifferenceImageToImageMetric() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MeanReciprocalSquareDifferenceImageToImageMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: MeanReciprocalSquareDifferenceImageToImageMetric(const Self &); //purposely diff --git a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.h b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.h index c460cbb9bed..995207491ef 100644 --- a/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.h +++ b/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.h @@ -82,14 +82,14 @@ class ITK_TEMPLATE_EXPORT MeanReciprocalSquareDifferencePointSetToImageMetric: /** Get the derivatives of the match measure. */ void GetDerivative(const TransformParametersType & parameters, - DerivativeType & Derivative) const ITK_OVERRIDE; + DerivativeType & Derivative) const override; /** Get the value for single valued optimizers. */ - MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const TransformParametersType & parameters) const override; /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & Value, DerivativeType & Derivative) const ITK_OVERRIDE; + MeasureType & Value, DerivativeType & Derivative) const override; /** Set/Get the lambda distance. (controls the capture radius of the metric). */ @@ -98,8 +98,8 @@ class ITK_TEMPLATE_EXPORT MeanReciprocalSquareDifferencePointSetToImageMetric: protected: MeanReciprocalSquareDifferencePointSetToImageMetric(); - virtual ~MeanReciprocalSquareDifferencePointSetToImageMetric() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MeanReciprocalSquareDifferencePointSetToImageMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: MeanReciprocalSquareDifferencePointSetToImageMetric(const Self &); //purposely diff --git a/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.h b/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.h index 063106802f8..1dd1ef00677 100644 --- a/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.h +++ b/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.h @@ -119,12 +119,12 @@ class ITK_TEMPLATE_EXPORT MeanSquareRegistrationFunction: { return m_MovingImageInterpolator; } /** This class uses a constant timestep of 1. */ - virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE + TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const override { return m_TimeStep; } /** Return a pointer to a global data structure that is passed to * this object from the solver at each calculation. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { GlobalDataStruct *global = new GlobalDataStruct(); @@ -132,22 +132,22 @@ class ITK_TEMPLATE_EXPORT MeanSquareRegistrationFunction: } /** Release memory for global data structure. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE + void ReleaseGlobalDataPointer(void *GlobalData) const override { delete (GlobalDataStruct *)GlobalData; } /** Set the object's state before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** This method is called by a finite difference solver image filter at * each pixel that does not lie on a data set boundary */ - virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, + PixelType ComputeUpdate( const NeighborhoodType & neighborhood, void *globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0) ) ITK_OVERRIDE; + const FloatOffsetType & offset = FloatOffsetType(0.0) ) override; protected: MeanSquareRegistrationFunction(); - ~MeanSquareRegistrationFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MeanSquareRegistrationFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** FixedImage image neighborhood iterator type. */ typedef ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType; diff --git a/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx b/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx index 7c380aaa30a..058f6036b5f 100644 --- a/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx +++ b/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx @@ -45,8 +45,8 @@ MeanSquareRegistrationFunction< 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_FixedImageGradientCalculator = GradientCalculatorType::New(); typename DefaultInterpolatorType::Pointer interp = diff --git a/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.h b/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.h index f20216faf3c..1cd5592626c 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.h @@ -77,10 +77,10 @@ class ITK_TEMPLATE_EXPORT MeanSquaresHistogramImageToImageMetric: /** Constructor is protected to ensure that \c New() function is used to create instances. */ MeanSquaresHistogramImageToImageMetric(){} - virtual ~MeanSquaresHistogramImageToImageMetric() ITK_OVERRIDE {} + ~MeanSquaresHistogramImageToImageMetric() override {} /** Evaluates the sum of squared differences from the histogram. */ - virtual MeasureType EvaluateMeasure(HistogramType & histogram) const ITK_OVERRIDE; + MeasureType EvaluateMeasure(HistogramType & histogram) const override; private: MeanSquaresHistogramImageToImageMetric(Self const &); // Purposely not diff --git a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h index 1241d771202..f3bbabbb126 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h @@ -86,25 +86,25 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetric: * (2) uniformly select NumberOfSpatialSamples within * the FixedImageRegion, and * (3) allocate memory for pdf data structures. */ - virtual void Initialize(void) ITK_OVERRIDE; + void Initialize(void) override; /** Get the value. */ - MeasureType GetValue(const ParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const ParametersType & parameters) const override; /** Get the derivatives of the match measure. */ void GetDerivative(const ParametersType & parameters, - DerivativeType & Derivative) const ITK_OVERRIDE; + DerivativeType & Derivative) const override; /** Get the value and derivatives for single valued optimizers. */ void GetValueAndDerivative(const ParametersType & parameters, MeasureType & Value, - DerivativeType & Derivative) const ITK_OVERRIDE; + DerivativeType & Derivative) const override; protected: MeanSquaresImageToImageMetric(); - virtual ~MeanSquaresImageToImageMetric() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MeanSquaresImageToImageMetric() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: @@ -113,14 +113,14 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetric: bool GetValueThreadProcessSample(ThreadIdType threadId, SizeValueType fixedImageSample, const MovingImagePointType & mappedPoint, - double movingImageValue) const ITK_OVERRIDE; + double movingImageValue) const override; bool GetValueAndDerivativeThreadProcessSample(ThreadIdType threadId, SizeValueType fixedImageSample, const MovingImagePointType & mappedPoint, double movingImageValue, const ImageDerivativesType & - movingImageGradientValue) const ITK_OVERRIDE; + movingImageGradientValue) const override; struct PerThreadS { diff --git a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx index 484d31f15f6..221fb5c763b 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx @@ -35,7 +35,7 @@ MeanSquaresImageToImageMetric { this->SetComputeGradient(true); - m_PerThread = ITK_NULLPTR; + m_PerThread = nullptr; this->m_WithinThreadPreProcess = false; this->m_WithinThreadPostProcess = false; @@ -50,7 +50,7 @@ MeanSquaresImageToImageMetric ::~MeanSquaresImageToImageMetric() { delete[] m_PerThread; - m_PerThread = ITK_NULLPTR; + m_PerThread = nullptr; } /** diff --git a/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.h b/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.h index 81c85b8c4e2..5b3634f7006 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.h +++ b/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.h @@ -77,18 +77,18 @@ class ITK_TEMPLATE_EXPORT MeanSquaresPointSetToImageMetric: /** Get the derivatives of the match measure. */ void GetDerivative(const TransformParametersType & parameters, - DerivativeType & Derivative) const ITK_OVERRIDE; + DerivativeType & Derivative) const override; /** Get the value for single valued optimizers. */ - MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const TransformParametersType & parameters) const override; /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & Value, DerivativeType & Derivative) const ITK_OVERRIDE; + MeasureType & Value, DerivativeType & Derivative) const override; protected: MeanSquaresPointSetToImageMetric(); - virtual ~MeanSquaresPointSetToImageMetric() ITK_OVERRIDE {} + ~MeanSquaresPointSetToImageMetric() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MeanSquaresPointSetToImageMetric); diff --git a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h index 65628c2a2bf..80c456957f3 100644 --- a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h +++ b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h @@ -207,20 +207,20 @@ class ITK_TEMPLATE_EXPORT MultiResolutionImageRegistrationMethod:public ProcessO * output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; /** Method to return the latest modified time of this object or * any of its cached ivars */ - virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE; + ModifiedTimeType GetMTime() const override; protected: MultiResolutionImageRegistrationMethod(); - virtual ~MultiResolutionImageRegistrationMethod() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MultiResolutionImageRegistrationMethod() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Method invoked by the pipeline in order to trigger the computation of * the registration. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Initialize by setting the interconnects between the components. This method is executed at every level of the pyramid with the diff --git a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx index d8d1a70cf14..9d42db232da 100644 --- a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx @@ -32,12 +32,12 @@ MultiResolutionImageRegistrationMethod< TFixedImage, TMovingImage > { this->SetNumberOfRequiredOutputs(1); // for the Transform - m_FixedImage = ITK_NULLPTR; // has to be provided by the user. - m_MovingImage = ITK_NULLPTR; // has to be provided by the user. - m_Transform = ITK_NULLPTR; // has to be provided by the user. - m_Interpolator = ITK_NULLPTR; // has to be provided by the user. - m_Metric = ITK_NULLPTR; // has to be provided by the user. - m_Optimizer = ITK_NULLPTR; // has to be provided by the user. + m_FixedImage = nullptr; // has to be provided by the user. + m_MovingImage = 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. // Use MultiResolutionPyramidImageFilter as the default // image pyramids. @@ -473,7 +473,7 @@ MultiResolutionImageRegistrationMethod< TFixedImage, TMovingImage > break; default: itkExceptionMacro("MakeOutput request for an output number larger than the expected number of outputs"); - return ITK_NULLPTR; + return nullptr; } } } // end namespace itk diff --git a/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.h b/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.h index bb0d92dc923..0b87d8170c9 100644 --- a/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.h +++ b/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.h @@ -185,13 +185,13 @@ class ITK_TEMPLATE_EXPORT MultiResolutionPyramidImageFilter: * implementation for GenerateOutputInformation() in order to inform the * pipeline execution model. The original documentation of this method is * below. \sa ProcessObject::GenerateOutputInformaton() */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** Given one output whose requested region has been set, this method sets * the requested region for the remaining output images. The original * documentation of this method is below. \sa * ProcessObject::GenerateOutputRequestedRegion(); */ - virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void GenerateOutputRequestedRegion(DataObject *output) override; /** MultiResolutionPyramidImageFilter requires a larger input requested * region than the output requested regions to accommodate the shrinkage and @@ -199,7 +199,7 @@ class ITK_TEMPLATE_EXPORT MultiResolutionPyramidImageFilter: * to provide an implementation for GenerateInputRequestedRegion(). The * original documentation of this method is below. \sa * ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; itkSetMacro(MaximumError, double); itkGetConstReferenceMacro(MaximumError, double); @@ -219,11 +219,11 @@ class ITK_TEMPLATE_EXPORT MultiResolutionPyramidImageFilter: protected: MultiResolutionPyramidImageFilter(); - ~MultiResolutionPyramidImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MultiResolutionPyramidImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate the output data. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; double m_MaximumError; diff --git a/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.h b/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.h index 7f1665b98c9..a7ade5a4d62 100644 --- a/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.h @@ -76,10 +76,10 @@ class ITK_TEMPLATE_EXPORT MutualInformationHistogramImageToImageMetric: /** Constructor is protected to ensure that \c New() function is used to create instances. */ MutualInformationHistogramImageToImageMetric(){} - virtual ~MutualInformationHistogramImageToImageMetric() ITK_OVERRIDE {} + ~MutualInformationHistogramImageToImageMetric() override {} /** Evaluates the mutual information from the histogram. */ - virtual MeasureType EvaluateMeasure(HistogramType & histogram) const ITK_OVERRIDE; + MeasureType EvaluateMeasure(HistogramType & histogram) const override; private: // Purposely not implemented. diff --git a/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.h b/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.h index 17c702e049e..7d8874937a5 100644 --- a/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.h @@ -137,14 +137,14 @@ class ITK_TEMPLATE_EXPORT MutualInformationImageToImageMetric: /** Get the derivatives of the match measure. */ void GetDerivative( const ParametersType & parameters, - DerivativeType & Derivative) const ITK_OVERRIDE; + DerivativeType & Derivative) const override; /** Get the value. */ - MeasureType GetValue(const ParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const ParametersType & parameters) const override; /** Get the value and derivatives for single valued optimizers. */ void GetValueAndDerivative(const ParametersType & parameters, - MeasureType & Value, DerivativeType & Derivative) const ITK_OVERRIDE; + MeasureType & Value, DerivativeType & Derivative) const override; /** Set the number of spatial samples. This is the number of image * samples used to calculate the joint probability distribution. @@ -181,8 +181,8 @@ class ITK_TEMPLATE_EXPORT MutualInformationImageToImageMetric: protected: MutualInformationImageToImageMetric(); - virtual ~MutualInformationImageToImageMetric() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MutualInformationImageToImageMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MutualInformationImageToImageMetric); diff --git a/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.h b/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.h index 8601aa62ad0..a1a08a68e5a 100644 --- a/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.h @@ -79,14 +79,14 @@ class ITK_TEMPLATE_EXPORT NormalizedCorrelationImageToImageMetric: /** Get the derivatives of the match measure. */ void GetDerivative(const TransformParametersType & parameters, - DerivativeType & Derivative) const ITK_OVERRIDE; + DerivativeType & Derivative) const override; /** Get the value for single valued optimizers. */ - MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const TransformParametersType & parameters) const override; /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & Value, DerivativeType & Derivative) const ITK_OVERRIDE; + MeasureType & Value, DerivativeType & Derivative) const override; /** Set/Get SubtractMean boolean. If true, the sample mean is subtracted * from the sample values in the cross-correlation formula and @@ -98,8 +98,8 @@ class ITK_TEMPLATE_EXPORT NormalizedCorrelationImageToImageMetric: protected: NormalizedCorrelationImageToImageMetric(); - virtual ~NormalizedCorrelationImageToImageMetric() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NormalizedCorrelationImageToImageMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NormalizedCorrelationImageToImageMetric); diff --git a/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.h b/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.h index 68a5babca64..355716bd62a 100644 --- a/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.h +++ b/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.h @@ -81,14 +81,14 @@ class ITK_TEMPLATE_EXPORT NormalizedCorrelationPointSetToImageMetric: /** Get the derivatives of the match measure. */ void GetDerivative(const TransformParametersType & parameters, - DerivativeType & Derivative) const ITK_OVERRIDE; + DerivativeType & Derivative) const override; /** Get the value for single valued optimizers. */ - MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const TransformParametersType & parameters) const override; /** Get value and derivatives for multiple valued optimizers. */ void GetValueAndDerivative(const TransformParametersType & parameters, - MeasureType & Value, DerivativeType & Derivative) const ITK_OVERRIDE; + MeasureType & Value, DerivativeType & Derivative) const override; /** Set/Get SubtractMean boolean. If true, the sample mean is subtracted * from the sample values in the cross-correlation formula and @@ -100,8 +100,8 @@ class ITK_TEMPLATE_EXPORT NormalizedCorrelationPointSetToImageMetric: protected: NormalizedCorrelationPointSetToImageMetric(); - virtual ~NormalizedCorrelationPointSetToImageMetric() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NormalizedCorrelationPointSetToImageMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NormalizedCorrelationPointSetToImageMetric); diff --git a/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.h b/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.h index 982cf5b9d97..73cecc1eb02 100644 --- a/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.h +++ b/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.h @@ -90,10 +90,10 @@ class ITK_TEMPLATE_EXPORT NormalizedMutualInformationHistogramImageToImageMetric /** Constructor is protected to ensure that \c New() function is used to create instances. */ NormalizedMutualInformationHistogramImageToImageMetric(){} - virtual ~NormalizedMutualInformationHistogramImageToImageMetric() ITK_OVERRIDE {} + ~NormalizedMutualInformationHistogramImageToImageMetric() override {} /** Evaluates the normalized mutual information from the histogram. */ - virtual MeasureType EvaluateMeasure(HistogramType & histogram) const ITK_OVERRIDE; + MeasureType EvaluateMeasure(HistogramType & histogram) const override; private: // Purposely not implemented. diff --git a/Modules/Registration/Common/include/itkPDEDeformableRegistrationFunction.h b/Modules/Registration/Common/include/itkPDEDeformableRegistrationFunction.h index 9f61580cdde..25a391a075f 100644 --- a/Modules/Registration/Common/include/itkPDEDeformableRegistrationFunction.h +++ b/Modules/Registration/Common/include/itkPDEDeformableRegistrationFunction.h @@ -99,17 +99,17 @@ class PDEDeformableRegistrationFunction: protected: PDEDeformableRegistrationFunction() { - m_MovingImage = ITK_NULLPTR; - m_FixedImage = ITK_NULLPTR; - m_DisplacementField = ITK_NULLPTR; + m_MovingImage = nullptr; + m_FixedImage = nullptr; + m_DisplacementField = nullptr; m_Energy = 0.0; m_NormalizeGradient = true; m_GradientStep = 1.0; } - ~PDEDeformableRegistrationFunction() ITK_OVERRIDE {} + ~PDEDeformableRegistrationFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "MovingImage: "; diff --git a/Modules/Registration/Common/include/itkPointSetToImageMetric.h b/Modules/Registration/Common/include/itkPointSetToImageMetric.h index 1327c231137..aafc7f2f343 100644 --- a/Modules/Registration/Common/include/itkPointSetToImageMetric.h +++ b/Modules/Registration/Common/include/itkPointSetToImageMetric.h @@ -158,7 +158,7 @@ class ITK_TEMPLATE_EXPORT PointSetToImageMetric:public SingleValuedCostFunction itkGetConstReferenceMacro(ComputeGradient, bool); /** Return the number of parameters required by the Transform */ - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return m_Transform->GetNumberOfParameters(); } /** Initialize the Metric by making sure that all the components @@ -167,8 +167,8 @@ class ITK_TEMPLATE_EXPORT PointSetToImageMetric:public SingleValuedCostFunction protected: PointSetToImageMetric(); - virtual ~PointSetToImageMetric() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PointSetToImageMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; mutable SizeValueType m_NumberOfPixelsCounted; diff --git a/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx b/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx index 88d8496b97a..7acfc4a1465 100644 --- a/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx @@ -29,13 +29,13 @@ template< typename TFixedPointSet, typename TMovingImage > PointSetToImageMetric< TFixedPointSet, TMovingImage > ::PointSetToImageMetric() { - m_FixedPointSet = ITK_NULLPTR; // has to be provided by the user. - m_MovingImage = ITK_NULLPTR; // has to be provided by the user. - m_Transform = ITK_NULLPTR; // has to be provided by the user. - m_Interpolator = ITK_NULLPTR; // has to be provided by the user. + m_FixedPointSet = nullptr; // has to be provided by the user. + m_MovingImage = 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_ComputeGradient = true; // metric computes gradient by default m_NumberOfPixelsCounted = 0; // initialize to zero - m_GradientImage = ITK_NULLPTR; // computed at initialization + m_GradientImage = nullptr; // computed at initialization } /** diff --git a/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h b/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h index 10bbfdf543e..dc9d49b5652 100644 --- a/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h +++ b/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h @@ -158,16 +158,16 @@ class ITK_TEMPLATE_EXPORT PointSetToImageRegistrationMethod : public ProcessObje * output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; - virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE; + ModifiedTimeType GetMTime() const override; protected: PointSetToImageRegistrationMethod(); - virtual ~PointSetToImageRegistrationMethod() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PointSetToImageRegistrationMethod() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PointSetToImageRegistrationMethod); diff --git a/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx b/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx index 6dfa4eaa294..c216e24aa62 100644 --- a/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx @@ -172,7 +172,7 @@ PointSetToImageRegistrationMethod< TFixedPointSet, TMovingImage > break; default: itkExceptionMacro("MakeOutput request for an output number larger than the expected number of outputs"); - return ITK_NULLPTR; + return nullptr; } } diff --git a/Modules/Registration/Common/include/itkPointSetToPointSetMetric.h b/Modules/Registration/Common/include/itkPointSetToPointSetMetric.h index f157302d8c1..d0995f2a5f6 100644 --- a/Modules/Registration/Common/include/itkPointSetToPointSetMetric.h +++ b/Modules/Registration/Common/include/itkPointSetToPointSetMetric.h @@ -117,7 +117,7 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetric:public MultipleValuedCostFunc void SetTransformParameters(const ParametersType & parameters) const; /** Return the number of parameters required by the Transform */ - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return m_Transform->GetNumberOfParameters(); } /** Initialize the Metric by making sure that all the components @@ -126,8 +126,8 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetric:public MultipleValuedCostFunc protected: PointSetToPointSetMetric(); - virtual ~PointSetToPointSetMetric() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PointSetToPointSetMetric() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; FixedPointSetConstPointer m_FixedPointSet; diff --git a/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx b/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx index 28449c50509..524c1de0509 100644 --- a/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx +++ b/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx @@ -27,9 +27,9 @@ template< typename TFixedPointSet, typename TMovingPointSet > PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet > ::PointSetToPointSetMetric() { - m_FixedPointSet = ITK_NULLPTR; // has to be provided by the user. - m_MovingPointSet = ITK_NULLPTR; // has to be provided by the user. - m_Transform = ITK_NULLPTR; // has to be provided by the user. + m_FixedPointSet = nullptr; // has to be provided by the user. + m_MovingPointSet = nullptr; // has to be provided by the user. + m_Transform = nullptr; // has to be provided by the user. } /** Set the parameters that define a unique transform */ diff --git a/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h b/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h index a595b780bd0..27035b3a7e2 100644 --- a/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h +++ b/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h @@ -149,16 +149,16 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetRegistrationMethod : public ProcessO * output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; - virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE; + ModifiedTimeType GetMTime() const override; protected: PointSetToPointSetRegistrationMethod(); - virtual ~PointSetToPointSetRegistrationMethod() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PointSetToPointSetRegistrationMethod() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PointSetToPointSetRegistrationMethod); diff --git a/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx b/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx index 155c6070254..0e12227ecd3 100644 --- a/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx @@ -166,7 +166,7 @@ PointSetToPointSetRegistrationMethod< TFixedPointSet, TMovingPointSet > break; default: itkExceptionMacro("MakeOutput request for an output number larger than the expected number of outputs"); - return ITK_NULLPTR; + return nullptr; } } diff --git a/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h b/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h index 3c5aee4126e..478822ad145 100644 --- a/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h +++ b/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h @@ -83,8 +83,8 @@ class ITK_TEMPLATE_EXPORT PointSetToSpatialObjectDemonsRegistration:public Proce protected: PointSetToSpatialObjectDemonsRegistration(); - virtual ~PointSetToSpatialObjectDemonsRegistration() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PointSetToSpatialObjectDemonsRegistration() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PointSetToSpatialObjectDemonsRegistration); diff --git a/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx b/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx index 39823f56b62..62af56c875e 100644 --- a/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx +++ b/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx @@ -29,8 +29,8 @@ template< typename TFixedPointSet, typename TMovingSpatialObject > PointSetToSpatialObjectDemonsRegistration< TFixedPointSet, TMovingSpatialObject > ::PointSetToSpatialObjectDemonsRegistration() { - m_FixedPointSet = ITK_NULLPTR; // has to be provided by the user. - m_MovingSpatialObject = ITK_NULLPTR; // has to be provided by the user. + m_FixedPointSet = nullptr; // has to be provided by the user. + m_MovingSpatialObject = nullptr; // has to be provided by the user. } /** diff --git a/Modules/Registration/Common/include/itkPointsLocator.h b/Modules/Registration/Common/include/itkPointsLocator.h index 3848dff721b..70e6f71172d 100644 --- a/Modules/Registration/Common/include/itkPointsLocator.h +++ b/Modules/Registration/Common/include/itkPointsLocator.h @@ -111,8 +111,8 @@ class ITK_TEMPLATE_EXPORT PointsLocator : public Object protected: PointsLocator(); - ~PointsLocator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~PointsLocator() override; + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PointsLocator); diff --git a/Modules/Registration/Common/include/itkPointsLocator.hxx b/Modules/Registration/Common/include/itkPointsLocator.hxx index 14a21bf122a..d7c9ebf878d 100644 --- a/Modules/Registration/Common/include/itkPointsLocator.hxx +++ b/Modules/Registration/Common/include/itkPointsLocator.hxx @@ -43,7 +43,7 @@ PointsLocator { if( !this->m_Points ) { - itkExceptionMacro( "The points have not been set (m_Points == ITK_NULLPTR)" ); + itkExceptionMacro( "The points have not been set (m_Points == nullptr)" ); } if( this->m_Points->Size() == 0 ) { diff --git a/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.h b/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.h index 9d6f9dbeb7c..7bdbd68fc8b 100644 --- a/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.h +++ b/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.h @@ -98,7 +98,7 @@ class ITK_TEMPLATE_EXPORT RecursiveMultiResolutionPyramidImageFilter: * output images. * The original documentation of this method is below. * \sa ProcessObject::GenerateOutputRequestedRegion(); */ - virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void GenerateOutputRequestedRegion(DataObject *output) override; /** RecursiveMultiResolutionPyramidImageFilter requires a larger input * requested region than the output requested regions to accommodate the @@ -106,15 +106,15 @@ class ITK_TEMPLATE_EXPORT RecursiveMultiResolutionPyramidImageFilter: * MultiResolutionPyramidImageFilter needs to provide an implementation for * GenerateInputRequestedRegion(). The original documentation of this * method is below. \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; protected: RecursiveMultiResolutionPyramidImageFilter(); - ~RecursiveMultiResolutionPyramidImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RecursiveMultiResolutionPyramidImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate the output data. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RecursiveMultiResolutionPyramidImageFilter); diff --git a/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h b/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h index 99f2a17349e..debe987caf5 100644 --- a/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h +++ b/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h @@ -80,7 +80,7 @@ class SimpleMultiResolutionImageRegistrationUI2 : SimpleMultiResolutionImageRegistrationUI2( TRegistration * ptr ) : Superclass(ptr) {}; - virtual ~SimpleMultiResolutionImageRegistrationUI2(){} + ~SimpleMultiResolutionImageRegistrationUI2() override{} void SetNumberOfIterations( itk::Array & iter ) { @@ -92,7 +92,7 @@ class SimpleMultiResolutionImageRegistrationUI2 : m_LearningRates = rates; } - virtual void StartNewLevel() + void StartNewLevel() override { // call the superclass's implementation diff --git a/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.h index 782eb64cf45..0284fb4c89e 100644 --- a/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.h @@ -181,15 +181,15 @@ class ITK_TEMPLATE_EXPORT TimeVaryingBSplineVelocityFieldTransformParametersAdap } /** Initialize the transform using the specified fixed parameters */ - virtual void AdaptTransformParameters() ITK_OVERRIDE; + void AdaptTransformParameters() override; - virtual void SetRequiredFixedParameters( const FixedParametersType ) ITK_OVERRIDE; + void SetRequiredFixedParameters( const FixedParametersType ) override; protected: TimeVaryingBSplineVelocityFieldTransformParametersAdaptor(); - ~TimeVaryingBSplineVelocityFieldTransformParametersAdaptor() ITK_OVERRIDE; + ~TimeVaryingBSplineVelocityFieldTransformParametersAdaptor() override; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TimeVaryingBSplineVelocityFieldTransformParametersAdaptor); diff --git a/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.h index 2c93c352540..3eb77785028 100644 --- a/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.h @@ -119,11 +119,11 @@ class ITK_TEMPLATE_EXPORT TimeVaryingVelocityFieldTransformParametersAdaptor virtual const DirectionType GetRequiredDirection() const; /** Initialize the transform using the specified fixed parameters */ - virtual void AdaptTransformParameters() ITK_OVERRIDE; + void AdaptTransformParameters() override; protected: TimeVaryingVelocityFieldTransformParametersAdaptor(); - ~TimeVaryingVelocityFieldTransformParametersAdaptor() ITK_OVERRIDE; + ~TimeVaryingVelocityFieldTransformParametersAdaptor() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TimeVaryingVelocityFieldTransformParametersAdaptor); diff --git a/Modules/Registration/Common/include/itkTransformParametersAdaptor.h b/Modules/Registration/Common/include/itkTransformParametersAdaptor.h index bb4d9ecd83f..7523a4bd33a 100644 --- a/Modules/Registration/Common/include/itkTransformParametersAdaptor.h +++ b/Modules/Registration/Common/include/itkTransformParametersAdaptor.h @@ -79,10 +79,10 @@ class TransformParametersAdaptor /** Set the transform to be adapted */ itkSetObjectMacro( Transform, TransformType ); - virtual void SetTransform( TransformBaseType * _arg, void * ) ITK_OVERRIDE + void SetTransform( TransformBaseType * _arg, void * ) override { TransformType *tx = dynamic_cast(_arg); - itkAssertOrThrowMacro( tx != ITK_NULLPTR, "Unable to convert Transform to require concrete transform!" ); + itkAssertOrThrowMacro( tx != nullptr, "Unable to convert Transform to require concrete transform!" ); this->SetTransform(tx); } @@ -90,7 +90,7 @@ class TransformParametersAdaptor itkNewMacro( Self ); /** Set the fixed parameters */ - virtual void SetRequiredFixedParameters( const FixedParametersType fixedParameters ) ITK_OVERRIDE + void SetRequiredFixedParameters( const FixedParametersType fixedParameters ) override { itkDebugMacro("setting RequiredFixedParameters to " << fixedParameters ); if ( this->m_RequiredFixedParameters != fixedParameters ) @@ -101,19 +101,19 @@ class TransformParametersAdaptor } /** Get the fixed parameters */ - virtual const FixedParametersType & GetRequiredFixedParameters() const ITK_OVERRIDE + const FixedParametersType & GetRequiredFixedParameters() const override { return this->m_RequiredFixedParameters; } /** Initialize the transform using the specified fixed parameters */ - virtual void AdaptTransformParameters() ITK_OVERRIDE {}; + void AdaptTransformParameters() override {}; protected: TransformParametersAdaptor() {} - ~TransformParametersAdaptor() ITK_OVERRIDE {} + ~TransformParametersAdaptor() override {} - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE + void PrintSelf( std::ostream & os, Indent indent ) const override { Superclass::PrintSelf( os, indent ); itkPrintSelfObjectMacro( Transform ); diff --git a/Modules/Registration/Common/include/itkTransformParametersAdaptorBase.h b/Modules/Registration/Common/include/itkTransformParametersAdaptorBase.h index 2a3c114cb1f..6d2cba38dc7 100644 --- a/Modules/Registration/Common/include/itkTransformParametersAdaptorBase.h +++ b/Modules/Registration/Common/include/itkTransformParametersAdaptorBase.h @@ -76,7 +76,7 @@ class TransformParametersAdaptorBase // note: the void pointer is use to ensure this method has lower // overloaded priority and avoid an ambiguous overloaded method - virtual void SetTransform( TransformBaseType *_arg, void * priorityLower = ITK_NULLPTR ) = 0; + virtual void SetTransform( TransformBaseType *_arg, void * priorityLower = nullptr ) = 0; /** Set the fixed parameters */ itkSetMacro( RequiredFixedParameters, FixedParametersType ); @@ -89,9 +89,9 @@ class TransformParametersAdaptorBase protected: TransformParametersAdaptorBase() {} - ~TransformParametersAdaptorBase() ITK_OVERRIDE {} + ~TransformParametersAdaptorBase() override {} - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE + void PrintSelf( std::ostream & os, Indent indent ) const override { Superclass::PrintSelf( os, indent ); os << "Fixed parameters" << this->m_RequiredFixedParameters << std::endl; diff --git a/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx b/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx index 76f7efdffd8..bb2bfaabf10 100644 --- a/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx +++ b/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx @@ -149,13 +149,13 @@ int itkBlockMatchingImageFilterTest( int argc, char * argv[] ) // Exercise the following methods BlockMatchingFilterType::DisplacementsType * displacements = blockMatchingFilter->GetDisplacements(); - if( displacements == ITK_NULLPTR ) + if( displacements == nullptr ) { std::cerr << "GetDisplacements() failed." << std::endl; return EXIT_FAILURE; } BlockMatchingFilterType::SimilaritiesType * similarities = blockMatchingFilter->GetSimilarities(); - if( similarities == ITK_NULLPTR ) + if( similarities == nullptr ) { std::cerr << "GetSimilarities() failed." << std::endl; return EXIT_FAILURE; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest.cxx index df6b4d01e58..8965f040cb8 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest.cxx @@ -141,12 +141,12 @@ int itkImageRegistrationMethodTest(int, char* [] ) } TEST_INITIALIZATION_ERROR( InitialTransformParameters, badParameters, initialParameters ); - TEST_INITIALIZATION_ERROR( Metric, ITK_NULLPTR, metric ); - TEST_INITIALIZATION_ERROR( Optimizer, ITK_NULLPTR, optimizer ); - TEST_INITIALIZATION_ERROR( Transform, ITK_NULLPTR, transform ); - TEST_INITIALIZATION_ERROR( FixedImage, ITK_NULLPTR, fixedImage ); - TEST_INITIALIZATION_ERROR( MovingImage, ITK_NULLPTR, movingImage ); - TEST_INITIALIZATION_ERROR( Interpolator, ITK_NULLPTR, interpolator ); + TEST_INITIALIZATION_ERROR( Metric, nullptr, metric ); + TEST_INITIALIZATION_ERROR( Optimizer, nullptr, optimizer ); + TEST_INITIALIZATION_ERROR( Transform, nullptr, transform ); + TEST_INITIALIZATION_ERROR( FixedImage, nullptr, fixedImage ); + TEST_INITIALIZATION_ERROR( MovingImage, nullptr, movingImage ); + TEST_INITIALIZATION_ERROR( Interpolator, nullptr, interpolator ); std::cout << "Test passed." << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx index 1d5f8c3929f..ed85f5b7c23 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_11.cxx @@ -120,14 +120,14 @@ int itkImageRegistrationMethodTest_11(int, char* [] ) // - // Now verify that they can be set to ITK_NULLPTR + // Now verify that they can be set to nullptr // - MetricType::Pointer metric3 = ITK_NULLPTR; - TransformType::Pointer transform3 = ITK_NULLPTR; - OptimizerType::Pointer optimizer3 = ITK_NULLPTR; - FixedImageType::Pointer fixedImage3 = ITK_NULLPTR; - MovingImageType::Pointer movingImage3 = ITK_NULLPTR; - InterpolatorType::Pointer interpolator3 = ITK_NULLPTR; + MetricType::Pointer metric3 = nullptr; + TransformType::Pointer transform3 = nullptr; + OptimizerType::Pointer optimizer3 = nullptr; + FixedImageType::Pointer fixedImage3 = nullptr; + MovingImageType::Pointer movingImage3 = nullptr; + InterpolatorType::Pointer interpolator3 = nullptr; registration->SetMetric( metric3 ); diff --git a/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx b/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx index e3c708463f6..e7a2c5de95e 100644 --- a/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx +++ b/Modules/Registration/Common/test/itkImageToSpatialObjectRegistrationTest.cxx @@ -56,12 +56,12 @@ class IterationCallback : public Command /** Execute method will print data at each iteration */ - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object *, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object *, const itk::EventObject & event) override { if( typeid( event ) == typeid( itk::StartEvent ) ) { @@ -120,7 +120,7 @@ class SimpleImageToSpatialObjectMetric : public ImageToSpatialObjectMetricm_FixedImage) { @@ -154,13 +154,13 @@ class SimpleImageToSpatialObjectMetric : public ImageToSpatialObjectMetricm_Transform->SetParameters(parameters); @@ -187,7 +187,7 @@ class SimpleImageToSpatialObjectMetric : public ImageToSpatialObjectMetricGetValue(parameters); this->GetDerivative(parameters,Derivative); diff --git a/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx index 0d10958d003..f0fefcd0953 100644 --- a/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkKappaStatisticImageToImageMetricTest.cxx @@ -137,7 +137,7 @@ int itkKappaStatisticImageToImageMetricTest(int, char* [] ) TRY_EXPECT_NO_EXCEPTION( metric->Initialize() ); - metric->SetFixedImage( NULL ); + metric->SetFixedImage( nullptr ); TRY_EXPECT_EXCEPTION( metric->GetDerivative( parameters, derivative ) ); metric->SetFixedImage( fixedImage ); diff --git a/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx index 7b11e59ba9e..8f960d6b35e 100644 --- a/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx @@ -334,9 +334,9 @@ int itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char* [] ) // // reset standard deviation // metric->SetFixedImageStandardDeviation( 5.0 ); - std::cout << "Try causing a exception by making fixed image ITK_NULLPTR"; + std::cout << "Try causing a exception by making fixed image nullptr"; std::cout << std::endl; - metric->SetFixedImage( ITK_NULLPTR ); + metric->SetFixedImage( nullptr ); try { metric->Initialize(); diff --git a/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx index ba927dbaf9c..ccee5620f6a 100644 --- a/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx @@ -189,7 +189,7 @@ int TestMattesMetricWithAffineTransform( typename MetricType::Pointer metric = MetricType::New(); - // Sanity check before metric is run, these should be ITK_NULLPTR; + // Sanity check before metric is run, these should be nullptr; if( metric->GetJointPDFDerivatives().IsNotNull() ) { return EXIT_FAILURE; diff --git a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx index bf1608ac75a..0d3f06c3bb1 100644 --- a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferenceImageMetricTest.cxx @@ -212,8 +212,8 @@ int itkMeanReciprocalSquareDifferenceImageMetricTest(int, char* [] ) //------------------------------------------------------- // exercise misc member functions //------------------------------------------------------- - std::cout << "Check case when Target is ITK_NULLPTR" << std::endl; - metric->SetFixedImage( ITK_NULLPTR ); + std::cout << "Check case when Target is nullptr" << std::endl; + metric->SetFixedImage( nullptr ); try { std::cout << "Value = " << metric->GetValue( parameters ); diff --git a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx index 6307aaed53c..8210ad9df09 100644 --- a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx @@ -257,8 +257,8 @@ int itkMeanReciprocalSquareDifferencePointSetToImageMetricTest(int, char* [] ) //------------------------------------------------------- // exercise misc member functions //------------------------------------------------------- - std::cout << "Check case when Target is ITK_NULLPTR" << std::endl; - metric->SetFixedPointSet( ITK_NULLPTR ); + std::cout << "Check case when Target is nullptr" << std::endl; + metric->SetFixedPointSet( nullptr ); try { std::cout << "Value = " << metric->GetValue( parameters ); diff --git a/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx index 4b6ed1d958c..99d2249b838 100644 --- a/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanSquaresImageMetricTest.cxx @@ -313,8 +313,8 @@ int itkMeanSquaresImageMetricTest(int, char* [] ) std::cout << "NumberOfPixelsCounted: " << metric->GetNumberOfPixelsCounted() << std::endl; std::cout << "FixedImageRegion: " << metric->GetFixedImageRegion() << std::endl; - std::cout << "Check case when Target is ITK_NULLPTR" << std::endl; - metric->SetFixedImage( ITK_NULLPTR ); + std::cout << "Check case when Target is nullptr" << std::endl; + metric->SetFixedImage( nullptr ); try { std::cout << "Value = " << metric->GetValue( parameters ); @@ -370,10 +370,10 @@ int itkMeanSquaresImageMetricTest(int, char* [] ) return EXIT_FAILURE; \ } - TEST_INITIALIZATION_ERROR( Transform, ITK_NULLPTR, transform ); - TEST_INITIALIZATION_ERROR( FixedImage, ITK_NULLPTR, fixedImage ); - TEST_INITIALIZATION_ERROR( MovingImage, ITK_NULLPTR, movingImage ); - TEST_INITIALIZATION_ERROR( Interpolator, ITK_NULLPTR, interpolator ); + TEST_INITIALIZATION_ERROR( Transform, nullptr, transform ); + TEST_INITIALIZATION_ERROR( FixedImage, nullptr, fixedImage ); + TEST_INITIALIZATION_ERROR( MovingImage, nullptr, movingImage ); + TEST_INITIALIZATION_ERROR( Interpolator, nullptr, interpolator ); std::cout << "Test passed. " << std::endl; return EXIT_SUCCESS; diff --git a/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx index 98dae358c29..d419e2ecd3f 100644 --- a/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx @@ -258,8 +258,8 @@ int itkMeanSquaresPointSetToImageMetricTest(int, char* [] ) //------------------------------------------------------- // exercise misc member functions //------------------------------------------------------- - std::cout << "Check case when Target is ITK_NULLPTR" << std::endl; - metric->SetFixedPointSet( ITK_NULLPTR ); + std::cout << "Check case when Target is nullptr" << std::endl; + metric->SetFixedPointSet( nullptr ); try { std::cout << "Value = " << metric->GetValue( parameters ); diff --git a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest.cxx b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest.cxx index b3f99c30e11..2f1e8ad6ad1 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest.cxx @@ -168,14 +168,14 @@ int itkMultiResolutionImageRegistrationMethodTest(int, char* [] ) return EXIT_FAILURE; \ } - TEST_INITIALIZATION_ERROR( Metric, ITK_NULLPTR, metric ); - TEST_INITIALIZATION_ERROR( Optimizer, ITK_NULLPTR, optimizer ); - TEST_INITIALIZATION_ERROR( Transform, ITK_NULLPTR, transform ); - TEST_INITIALIZATION_ERROR( FixedImage, ITK_NULLPTR, fixedImage ); - TEST_INITIALIZATION_ERROR( MovingImage, ITK_NULLPTR, movingImage ); - TEST_INITIALIZATION_ERROR( Interpolator, ITK_NULLPTR, interpolator ); - TEST_INITIALIZATION_ERROR( FixedImagePyramid, ITK_NULLPTR, fixedImagePyramid ); - TEST_INITIALIZATION_ERROR( MovingImagePyramid, ITK_NULLPTR, movingImagePyramid ); + TEST_INITIALIZATION_ERROR( Metric, nullptr, metric ); + TEST_INITIALIZATION_ERROR( Optimizer, nullptr, optimizer ); + TEST_INITIALIZATION_ERROR( Transform, nullptr, transform ); + TEST_INITIALIZATION_ERROR( FixedImage, nullptr, fixedImage ); + TEST_INITIALIZATION_ERROR( MovingImage, nullptr, movingImage ); + TEST_INITIALIZATION_ERROR( Interpolator, nullptr, interpolator ); + TEST_INITIALIZATION_ERROR( FixedImagePyramid, nullptr, fixedImagePyramid ); + TEST_INITIALIZATION_ERROR( MovingImagePyramid, nullptr, movingImagePyramid ); TEST_INITIALIZATION_ERROR( InitialTransformParameters, ParametersType(1), initialParameters ); diff --git a/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx b/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx index 27dd964dec0..6b149280dde 100644 --- a/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx @@ -252,9 +252,9 @@ int itkMutualInformationMetricTest(int, char* [] ) // reset standard deviation metric->SetFixedImageStandardDeviation( 5.0 ); - std::cout << "Try causing a exception by making fixed image ITK_NULLPTR"; + std::cout << "Try causing a exception by making fixed image nullptr"; std::cout << std::endl; - metric->SetFixedImage( ITK_NULLPTR ); + metric->SetFixedImage( nullptr ); try { metric->Initialize(); diff --git a/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx b/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx index 138a65acf24..000632a7fcb 100644 --- a/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkNormalizedCorrelationImageMetricTest.cxx @@ -212,8 +212,8 @@ int itkNormalizedCorrelationImageMetricTest(int, char* [] ) //------------------------------------------------------- // exercise misc member functions //------------------------------------------------------- - std::cout << "Check case when Target is ITK_NULLPTR" << std::endl; - metric->SetFixedImage( ITK_NULLPTR ); + std::cout << "Check case when Target is nullptr" << std::endl; + metric->SetFixedImage( nullptr ); try { std::cout << "Value = " << metric->GetValue( parameters ); diff --git a/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx index 3f57a766fd8..226d585a3bf 100644 --- a/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx @@ -262,8 +262,8 @@ int itkNormalizedCorrelationPointSetToImageMetricTest(int, char* [] ) //------------------------------------------------------- // exercise misc member functions //------------------------------------------------------- - std::cout << "Check case when Target is ITK_NULLPTR" << std::endl; - metric->SetFixedPointSet( ITK_NULLPTR ); + std::cout << "Check case when Target is nullptr" << std::endl; + metric->SetFixedPointSet( nullptr ); try { std::cout << "Value = " << metric->GetValue( parameters ); diff --git a/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.h b/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.h index 4cfaf1a527f..f8b0c3a9fe7 100644 --- a/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.h +++ b/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.h @@ -82,7 +82,7 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceFunctionLoad : public LoadElement /** CreateAnother method will clone the existing instance of this type, * including its internal member variables. */ - virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE; + ::itk::LightObject::Pointer CreateAnother(void) const override; // Necessary typedefs for dealing with images BEGIN typedef typename LoadElement::Float Float; @@ -255,12 +255,12 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceFunctionLoad : public LoadElement m_Gamma = s; } - virtual void SetSolution(Solution::ConstPointer ptr) ITK_OVERRIDE + void SetSolution(Solution::ConstPointer ptr) override { m_Solution = ptr; } - virtual Solution::ConstPointer GetSolution() ITK_OVERRIDE + Solution::ConstPointer GetSolution() override { return m_Solution; } @@ -301,11 +301,11 @@ class ITK_TEMPLATE_EXPORT FiniteDifferenceFunctionLoad : public LoadElement void SetCurrentEnergy( double e = 0.0 ); - virtual void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) ITK_OVERRIDE; + void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) override; protected: - virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: FiniteDifferenceFunctionLoad(); // cannot be private until we always use smart pointers diff --git a/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx b/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx index 0870d1b77b2..20d096bffe1 100644 --- a/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx +++ b/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx @@ -27,13 +27,13 @@ namespace fem template FiniteDifferenceFunctionLoad::FiniteDifferenceFunctionLoad() : - m_MovingImage(ITK_NULLPTR ), - m_FixedImage( ITK_NULLPTR ), + m_MovingImage(nullptr ), + m_FixedImage( nullptr ), m_NumberOfIntegrationPoints( 0 ), m_SolutionIndex( 1 ), m_SolutionIndex2( 0 ), m_Gamma( NumericTraits< Float >::ZeroValue() ), - m_Solution( ITK_NULLPTR ), + m_Solution( nullptr ), m_GradSigma( 0.0f ), m_Sign( 1.0f ), m_WhichMetric( 0.0f ) @@ -141,7 +141,7 @@ FiniteDifferenceFunctionLoad::EvaluateMetricGivenSolution( Elem typename Element::MatrixType solmat; typename Element::Float w; - if( (el == ITK_NULLPTR) || (el->Size() < 1) ) + if( (el == nullptr) || (el->Size() < 1) ) { return 10.0; } @@ -271,7 +271,7 @@ FiniteDifferenceFunctionLoad::Fe( FEMVectorType Gpos ) m_DisplacementField->GetLargestPossibleRegion() ); nD.SetLocation(oindex); - void* globalData = ITK_NULLPTR; + void* globalData = nullptr; OutVec = m_DifferenceFunction->ComputeUpdate(nD, globalData); for( unsigned int k = 0; k < ImageDimension; k++ ) { diff --git a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h index c091133587b..5780a2445b3 100644 --- a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h +++ b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h @@ -516,15 +516,15 @@ class ITK_TEMPLATE_EXPORT FEMRegistrationFilter : public ImageToImageFilter::CreateMesh(un pixPerElement.set_size( ImageDimension ); pixPerElement.fill( PixelsPerElement ); - if( ImageDimension == 2 && dynamic_cast(&*m_Element) != ITK_NULLPTR ) + if( ImageDimension == 2 && dynamic_cast(&*m_Element) != nullptr ) { m_Material->SetYoungsModulus(this->GetElasticity(m_CurrentLevel) ); @@ -301,7 +301,7 @@ void FEMRegistrationFilter::CreateMesh(un m_FEMObject->FinalizeMesh(); itkDebugMacro( << " Generating regular mesh done " << std::endl ); } - else if( ImageDimension == 3 && dynamic_cast(&*m_Element) != ITK_NULLPTR ) + else if( ImageDimension == 3 && dynamic_cast(&*m_Element) != nullptr ) { m_Material->SetYoungsModulus( this->GetElasticity(m_CurrentLevel) ); @@ -396,7 +396,7 @@ void FEMRegistrationFilter::ApplyLoads( { for( unsigned int lmind = 0; lmind < m_LandmarkArray.size(); lmind++ ) { - m_LandmarkArray[lmind]->GetElementArray()[0] = ITK_NULLPTR; + m_LandmarkArray[lmind]->GetElementArray()[0] = nullptr; itkDebugMacro( << " Prescale Pt: " << m_LandmarkArray[lmind]->GetTarget() ); if( scaling ) @@ -1145,7 +1145,7 @@ void FEMRegistrationFilter::MultiResSolve m_FEMObject = this->GetInputFEMObject( m_CurrentLevel ); } - this->ApplyLoads(m_FullImageSize, ITK_NULLPTR); + this->ApplyLoads(m_FullImageSize, nullptr); this->ApplyImageLoads(m_MovingImage, m_FixedImage ); diff --git a/Modules/Registration/FEM/include/itkMIRegistrationFunction.h b/Modules/Registration/FEM/include/itkMIRegistrationFunction.h index ce0a73bdee6..dc16ee818dc 100644 --- a/Modules/Registration/FEM/include/itkMIRegistrationFunction.h +++ b/Modules/Registration/FEM/include/itkMIRegistrationFunction.h @@ -119,12 +119,12 @@ class ITK_TEMPLATE_EXPORT MIRegistrationFunction: { return m_MovingImageInterpolator; } /** This class uses a constant timestep of 1. */ - virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE + TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const override { return m_TimeStep; } /** Return a pointer to a global data structure that is passed to * this object from the solver at each calculation. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { GlobalDataStruct *global = new GlobalDataStruct(); @@ -132,18 +132,18 @@ class ITK_TEMPLATE_EXPORT MIRegistrationFunction: } /** Release memory for global data structure. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE + void ReleaseGlobalDataPointer(void *GlobalData) const override { delete (GlobalDataStruct *)GlobalData; } /** Set the object's state before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** Compute update at a non boundary neighbourhood. * This method is called by a finite difference solver image filter at each * pixel that does not lie on a data set boundary. */ - virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, + PixelType ComputeUpdate( const NeighborhoodType & neighborhood, void *globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0) ) ITK_OVERRIDE; + const FloatOffsetType & offset = FloatOffsetType(0.0) ) override; void SetMinNorm( float ts = 1.0 ) { m_Minnorm = ts; } @@ -153,8 +153,8 @@ class ITK_TEMPLATE_EXPORT MIRegistrationFunction: protected: MIRegistrationFunction(); - ~MIRegistrationFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MIRegistrationFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** FixedImage image neighborhood iterator type. */ typedef ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType; diff --git a/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx b/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx index 6b5eab3d566..bd91ea09182 100644 --- a/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx +++ b/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx @@ -54,8 +54,8 @@ MIRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > } this->SetRadius(r); - this->SetMovingImage(ITK_NULLPTR); - this->SetFixedImage(ITK_NULLPTR); + this->SetMovingImage(nullptr); + this->SetFixedImage(nullptr); if( m_DoInverse ) { diff --git a/Modules/Registration/FEM/include/itkNCCRegistrationFunction.h b/Modules/Registration/FEM/include/itkNCCRegistrationFunction.h index fccbb011d2f..a38e25790c9 100644 --- a/Modules/Registration/FEM/include/itkNCCRegistrationFunction.h +++ b/Modules/Registration/FEM/include/itkNCCRegistrationFunction.h @@ -121,12 +121,12 @@ class ITK_TEMPLATE_EXPORT NCCRegistrationFunction: { return m_MovingImageInterpolator; } /** This class uses a constant timestep of 1. */ - virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE + TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const override { return m_TimeStep; } /** Return a pointer to a global data structure that is passed to * this object from the solver at each calculation. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { GlobalDataStruct *global = new GlobalDataStruct(); @@ -134,23 +134,23 @@ class ITK_TEMPLATE_EXPORT NCCRegistrationFunction: } /** Release memory for global data structure. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE + void ReleaseGlobalDataPointer(void *GlobalData) const override { delete (GlobalDataStruct *)GlobalData; } /** Set the object's state before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** Compute update at a non boundary neighbourhood. * This method is called by a finite difference solver image filter at each * pixel that does not lie on a data set boundary. */ - virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, + PixelType ComputeUpdate( const NeighborhoodType & neighborhood, void *globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0) ) ITK_OVERRIDE; + const FloatOffsetType & offset = FloatOffsetType(0.0) ) override; protected: NCCRegistrationFunction(); - ~NCCRegistrationFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NCCRegistrationFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** FixedImage image neighborhood iterator type. */ typedef ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType; diff --git a/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx b/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx index b0160616100..6583e822032 100644 --- a/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx +++ b/Modules/Registration/FEM/include/itkNCCRegistrationFunction.hxx @@ -45,8 +45,8 @@ NCCRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > } this->SetRadius(r); - this->SetMovingImage(ITK_NULLPTR); - this->SetFixedImage(ITK_NULLPTR); + this->SetMovingImage(nullptr); + this->SetFixedImage(nullptr); m_FixedImageSpacing.Fill(1.0); diff --git a/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.h b/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.h index c4ef37237fb..b5931f45717 100644 --- a/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.h +++ b/Modules/Registration/FEM/include/itkPhysicsBasedNonRigidRegistrationMethod.h @@ -159,9 +159,9 @@ class ITK_TEMPLATE_EXPORT PhysicsBasedNonRigidRegistrationMethod : public ImageT protected: PhysicsBasedNonRigidRegistrationMethod(); - virtual ~PhysicsBasedNonRigidRegistrationMethod() ITK_OVERRIDE; - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; - virtual void GenerateData() ITK_OVERRIDE; + ~PhysicsBasedNonRigidRegistrationMethod() override; + void PrintSelf( std::ostream & os, Indent indent ) const override; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PhysicsBasedNonRigidRegistrationMethod); diff --git a/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.h b/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.h index cbacdd37d76..28f377023bf 100644 --- a/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.h +++ b/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.h @@ -94,11 +94,11 @@ class ITK_TEMPLATE_EXPORT VTKTetrahedralMeshReader : public MeshSource ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char* GetITKSourceVersion() const ITK_OVERRIDE + const char* GetITKSourceVersion() const override { return ITK_SOURCE_VERSION; } - const char* GetDescription() const ITK_OVERRIDE + const char* GetDescription() const override { return "A Factory for GPUDemonsRegistrationFilter"; } diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h index 14a1353ecec..a5088eeae5a 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h @@ -141,14 +141,14 @@ class ITK_TEMPLATE_EXPORT GPUDemonsRegistrationFunction : /** This class uses a constant timestep of 1. */ virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) - const ITK_OVERRIDE + const override { return m_TimeStep; } /** Return a pointer to a global data structure that is passed to * this object from the solver at each calculation. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { GlobalDataStruct *global = new GlobalDataStruct(); @@ -159,29 +159,29 @@ class ITK_TEMPLATE_EXPORT GPUDemonsRegistrationFunction : } /** Release memory for global data structure. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE; + void ReleaseGlobalDataPointer(void *GlobalData) const override; /** Allocate GPU buffers for computing metric statitics * */ - virtual void GPUAllocateMetricData(unsigned int numPixels) ITK_OVERRIDE; + void GPUAllocateMetricData(unsigned int numPixels) override; /** Release GPU buffers for computing metric statitics * */ - virtual void GPUReleaseMetricData() ITK_OVERRIDE; + void GPUReleaseMetricData() override; /** Set the object's state before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** This method is called by a finite difference solver image filter at * each pixel that does not lie on a data set boundary */ virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, void *globalData, const FloatOffsetType & offset = - FloatOffsetType(0.0) ) ITK_OVERRIDE; + FloatOffsetType(0.0) ) override; virtual void GPUComputeUpdate( const DisplacementFieldTypePointer output, DisplacementFieldTypePointer update, - void *gd) ITK_OVERRIDE; + void *gd) override; /** Get the metric value. The metric value is the mean square difference * in intensity between the fixed image and transforming moving image @@ -219,9 +219,9 @@ class ITK_TEMPLATE_EXPORT GPUDemonsRegistrationFunction : protected: GPUDemonsRegistrationFunction(); - ~GPUDemonsRegistrationFunction() ITK_OVERRIDE {} + ~GPUDemonsRegistrationFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** FixedImage image neighborhood iterator type. */ typedef ConstNeighborhoodIterator< FixedImageType > diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx index 7ba86811816..d7eab7cfda1 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx @@ -43,8 +43,8 @@ GPUDemonsRegistrationFunction< 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_Normalizer = 1.0; @@ -66,9 +66,9 @@ GPUDemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > m_UseMovingImageGradient = false; /*** Prepare GPU opencl program ***/ - m_GPUPixelCounter = ITK_NULLPTR; - m_GPUSquaredChange = ITK_NULLPTR; - m_GPUSquaredDifference = ITK_NULLPTR; + m_GPUPixelCounter = nullptr; + m_GPUSquaredChange = nullptr; + m_GPUSquaredDifference = nullptr; std::ostringstream defines; @@ -203,7 +203,7 @@ GPUDemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > ::GPUAllocateMetricData(unsigned int numPixels) { // allocate gpu buffers for statistics - // if (m_GPUPixelCounter == (GPUReduction::Pointer)ITK_NULLPTR) + // if (m_GPUPixelCounter == (GPUReduction::Pointer)nullptr) m_GPUPixelCounter = GPUReduction::New(); m_GPUSquaredChange = GPUReduction::New(); diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h index b88f451cc09..865da3d3994 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h @@ -142,22 +142,22 @@ class ITK_TEMPLATE_EXPORT GPUPDEDeformableRegistrationFilter : protected: GPUPDEDeformableRegistrationFilter(); - ~GPUPDEDeformableRegistrationFilter() ITK_OVERRIDE {} + ~GPUPDEDeformableRegistrationFilter() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** A simple method to copy the data from the input to the output. * If the input does not exist, a zero field is written to the output. */ - virtual void CopyInputToOutput() ITK_OVERRIDE; + void CopyInputToOutput() override; /** Initialize the state of filter and equation before each iteration. * Progress feeback is implemented as part of this method. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** Utility to smooth the deformation field (represented in the Output) * using a Gaussian operator. The amount of smoothing can be specified * by setting the StandardDeviations. */ - virtual void SmoothDisplacementField() ITK_OVERRIDE; + void SmoothDisplacementField() override; /** Smooth a vector field, which may be m_DisplacementField or * m_UpdateBuffer. */ @@ -170,20 +170,20 @@ class ITK_TEMPLATE_EXPORT GPUPDEDeformableRegistrationFilter : /** Utility to smooth the UpdateBuffer using a Gaussian operator. * The amount of smoothing can be specified by setting the * UpdateFieldStandardDeviations. */ - virtual void SmoothUpdateField() ITK_OVERRIDE; + void SmoothUpdateField() override; /** This method is called after the solution has been generated. In this case, * the filter release the memory of the internal buffers. */ - virtual void PostProcessOutput() ITK_OVERRIDE; + void PostProcessOutput() override; /** This method is called before iterating the solution. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** By default the output deformation field has the same Spacing, Origin * and LargestPossibleRegion as the input/initial deformation field. If * the initial deformation field is not set, the output information is * copied from the fixed image. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** It is difficult to compute in advance the input moving image region * required to compute the requested output region. Thus the safest @@ -191,7 +191,7 @@ class ITK_TEMPLATE_EXPORT GPUPDEDeformableRegistrationFilter : * * For the fixed image and deformation field, the input requested region * set to be the same as that of the output requested region. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GPUPDEDeformableRegistrationFilter); diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx index 7cef3b538d5..fc2644f7c88 100644 --- a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx +++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.hxx @@ -249,16 +249,16 @@ GPUPDEDeformableRegistrationFilterInitialize(); delete m_SmoothingKernels[dir]; - m_SmoothingKernels[dir] = ITK_NULLPTR; + m_SmoothingKernels[dir] = nullptr; m_UpdateFieldGPUSmoothingKernels[dir]->Initialize(); delete m_UpdateFieldSmoothingKernels[dir]; - m_UpdateFieldSmoothingKernels[dir] = ITK_NULLPTR; + m_UpdateFieldSmoothingKernels[dir] = nullptr; } m_GPUImageSizes->Initialize(); delete m_ImageSizes; - m_ImageSizes = ITK_NULLPTR; + m_ImageSizes = nullptr; GPUPDEDeformableRegistrationFunctionType *f = dynamic_cast @@ -406,10 +406,10 @@ GPUPDEDeformableRegistrationFilterm_GPUKernelManager->SetKernelArg(m_SmoothDisplacementFieldGPUKernelHandle, argidx++, sizeof(DeformationScalarType) * GPUSmoothingKernelSizes[indir], - ITK_NULLPTR); + nullptr); this->m_GPUKernelManager->SetKernelArg(m_SmoothDisplacementFieldGPUKernelHandle, argidx++, sizeof(DeformationScalarType) - * (localSize[indir] + GPUSmoothingKernelSizes[indir] - 1), ITK_NULLPTR); + * (localSize[indir] + GPUSmoothingKernelSizes[indir] - 1), nullptr); // launch kernel this->m_GPUKernelManager->LaunchKernel(m_SmoothDisplacementFieldGPUKernelHandle, diff --git a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx index b5b889cb6ce..299bab0af01 100644 --- a/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx +++ b/Modules/Registration/GPUPDEDeformable/test/itkGPUDemonsRegistrationFilterTest2.cxx @@ -309,7 +309,7 @@ int itkGPUDemonsRegistrationFilterTest2(int argc, char* argv[] ) bool passed = true; try { - registrator->SetInput( ITK_NULLPTR ); + registrator->SetInput( nullptr ); registrator->SetNumberOfIterations( 2 ); registrator->Update(); } @@ -329,12 +329,12 @@ int itkGPUDemonsRegistrationFilterTest2(int argc, char* argv[] ) //-------------------------------------------------------------- std::cout << "Test exception handling." << std::endl; - std::cout << "Test ITK_NULLPTR moving image. " << std::endl; + std::cout << "Test nullptr moving image. " << std::endl; passed = false; try { registrator->SetInput( caster->GetOutput() ); - registrator->SetMovingImage( ITK_NULLPTR ); + registrator->SetMovingImage( nullptr ); registrator->Update(); } catch( itk::ExceptionObject & err ) @@ -352,13 +352,13 @@ int itkGPUDemonsRegistrationFilterTest2(int argc, char* argv[] ) registrator->SetMovingImage( moving ); registrator->ResetPipeline(); - std::cout << "Test ITK_NULLPTR moving image interpolator. " << std::endl; + std::cout << "Test nullptr moving image interpolator. " << std::endl; passed = false; try { fptr = dynamic_cast( registrator->GetDifferenceFunction().GetPointer() ); - fptr->SetMovingImageInterpolator( ITK_NULLPTR ); + fptr->SetMovingImageInterpolator( nullptr ); registrator->SetInput( initField ); registrator->Update(); } diff --git a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4.h index 9cf16b58a6c..ebb963be241 100644 --- a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4.h @@ -168,11 +168,11 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4 : itkGetMacro(Radius, RadiusType); itkGetConstMacro(Radius, RadiusType); - void Initialize(void) ITK_OVERRIDE; + void Initialize(void) override; protected: ANTSNeighborhoodCorrelationImageToImageMetricv4(); - virtual ~ANTSNeighborhoodCorrelationImageToImageMetricv4() ITK_OVERRIDE; + ~ANTSNeighborhoodCorrelationImageToImageMetricv4() override; friend class ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< VirtualImageDimension >, Superclass, Self >; typedef ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< VirtualImageDimension >, Superclass, Self > @@ -182,7 +182,7 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4 : typedef ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self > ANTSNeighborhoodCorrelationImageToImageMetricv4SparseGetValueAndDerivativeThreaderType; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ANTSNeighborhoodCorrelationImageToImageMetricv4); diff --git a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h index 7ef24a8bcf7..b95bc175773 100644 --- a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -144,7 +144,7 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu protected: ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader() : - m_ANTSAssociate(ITK_NULLPTR) + m_ANTSAssociate(nullptr) {} /** @@ -180,9 +180,9 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu * TransformAndEvaluateMovingPoint, and \c ProcessPoint. * And adds entries to m_MeasurePerThread and m_LocalDerivativesPerThread, * m_NumberOfValidPointsPerThread. */ - virtual bool ProcessVirtualPoint( const VirtualIndexType & virtualIndex, + bool ProcessVirtualPoint( const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, - const ThreadIdType threadId ) ITK_OVERRIDE { + const ThreadIdType threadId ) override { return ProcessVirtualPoint_impl(IdentityHelper(), virtualIndex, virtualPoint, threadId ); } @@ -207,7 +207,7 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu /** \c ProcessPoint() must be overloaded since it is a pure virtual function. * It is not used for either sparse or dense threader. * */ - virtual bool ProcessPoint( + bool ProcessPoint( const VirtualIndexType & itkNotUsed(virtualIndex), const VirtualPointType & itkNotUsed(virtualPoint), const FixedImagePointType & itkNotUsed(mappedFixedPoint), @@ -218,13 +218,13 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu const MovingImageGradientType & itkNotUsed(mappedMovingImageGradient), MeasureType & itkNotUsed(metricValueReturn), DerivativeType & itkNotUsed(localDerivativeReturn), - const ThreadIdType itkNotUsed(threadId) ) const ITK_OVERRIDE + const ThreadIdType itkNotUsed(threadId) ) const override { itkExceptionMacro("ProcessPoint should never be reached in ANTS CC metric threader class."); } - virtual void ThreadedExecution( const DomainType& domain, - const ThreadIdType threadId ) ITK_OVERRIDE + void ThreadedExecution( const DomainType& domain, + const ThreadIdType threadId ) override { ThreadedExecution_impl(IdentityHelper(), domain, threadId ); } diff --git a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx index 58a10470b66..be2e0bd5ada 100644 --- a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx @@ -33,7 +33,7 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TD { /* Store the casted pointer to avoid dynamic casting in tight loops. */ this->m_ANTSAssociate = dynamic_cast< TNeighborhoodCorrelationMetric * >( this->m_Associate ); - if( this->m_ANTSAssociate == ITK_NULLPTR ) + if( this->m_ANTSAssociate == nullptr ) { itkExceptionMacro("Dynamic casting of associate pointer failed."); } @@ -112,7 +112,7 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TD /* call base method */ /* Store the casted pointer to avoid dynamic casting in tight loops. */ this->m_ANTSAssociate = dynamic_cast< TNeighborhoodCorrelationMetric * >( this->m_Associate ); - if( this->m_ANTSAssociate == ITK_NULLPTR ) + if( this->m_ANTSAssociate == nullptr ) { itkExceptionMacro("Dynamic casting of associate pointer failed."); } diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h index 73833925996..9a1130a999a 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h @@ -116,13 +116,13 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4 : protected: CorrelationImageToImageMetricv4(); - virtual ~CorrelationImageToImageMetricv4() ITK_OVERRIDE; + ~CorrelationImageToImageMetricv4() override; /** Perform any initialization required before each evaluation of * \c GetValueAndDerivative. This is distinct from Initialize, which * is called only once before a number of iterations, e.g. before * a registration loop. */ - virtual void InitializeForIteration() const ITK_OVERRIDE; + void InitializeForIteration() const override; friend class ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Self >; friend class ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, Self >; @@ -153,7 +153,7 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4 : mutable MeasureType m_AverageFix; mutable MeasureType m_AverageMov; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CorrelationImageToImageMetricv4); diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h index 46528300e43..38dd377623c 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -70,14 +70,14 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4GetValueAndDerivativeTh protected: CorrelationImageToImageMetricv4GetValueAndDerivativeThreader(); - virtual ~CorrelationImageToImageMetricv4GetValueAndDerivativeThreader() ITK_OVERRIDE; + ~CorrelationImageToImageMetricv4GetValueAndDerivativeThreader() override; /** Overload: Resize and initialize per thread objects: * number of valid points * moving transform jacobian * cross-correlation specific variables * */ - virtual void BeforeThreadedExecution() ITK_OVERRIDE; + void BeforeThreadedExecution() override; /** Overload: * Collects the results from each thread and sums them. Results are stored @@ -86,21 +86,21 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4GetValueAndDerivativeTh * m_NumberOfValidPoints, to average the value sum, and to average * derivative sums for global transforms only (i.e. transforms without local * support). */ - virtual void AfterThreadedExecution() ITK_OVERRIDE; + void AfterThreadedExecution() override; /** Overload to avoid execution of adding entries to m_MeasurePerThread * StorePointDerivativeResult() after this function calls ProcessPoint(). * Method called by the threaders to process the given virtual point. This * in turn calls \c TransformAndEvaluateFixedPoint, \c * TransformAndEvaluateMovingPoint, and \c ProcessPoint. */ - virtual bool ProcessVirtualPoint( const VirtualIndexType & virtualIndex, + bool ProcessVirtualPoint( const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, - const ThreadIdType threadId ) ITK_OVERRIDE; + const ThreadIdType threadId ) override; /** This function computes the local voxel-wise contribution of * the metric to the global integral of the metric/derivative. */ - virtual bool ProcessPoint(const VirtualIndexType & virtualIndex, + bool ProcessPoint(const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, const FixedImagePointType & mappedFixedPoint, const FixedImagePixelType & mappedFixedPixelValue, @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4GetValueAndDerivativeTh const MovingImageGradientType & mappedMovingImageGradient, MeasureType & metricValueReturn, DerivativeType & localDerivativeReturn, - const ThreadIdType threadId ) const ITK_OVERRIDE; + const ThreadIdType threadId ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CorrelationImageToImageMetricv4GetValueAndDerivativeThreader); diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx index 4241d83b9db..5456939abf3 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx @@ -26,8 +26,8 @@ namespace itk template CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric> ::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader() : - m_CorrelationMetricValueDerivativePerThreadVariables( ITK_NULLPTR ), - m_CorrelationAssociate( ITK_NULLPTR ) + m_CorrelationMetricValueDerivativePerThreadVariables( nullptr ), + m_CorrelationAssociate( nullptr ) {} @@ -48,7 +48,7 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner /* Store the casted pointer to avoid dynamic casting in tight loops. */ this->m_CorrelationAssociate = dynamic_cast(this->m_Associate); - if( this->m_CorrelationAssociate == ITK_NULLPTR ) + if( this->m_CorrelationAssociate == nullptr ) { itkExceptionMacro("Dynamic casting of associate pointer failed."); } diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h index e933019c94c..c0c14b64e07 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h @@ -71,10 +71,10 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4HelperThreader protected: CorrelationImageToImageMetricv4HelperThreader(); - virtual ~CorrelationImageToImageMetricv4HelperThreader() ITK_OVERRIDE; + ~CorrelationImageToImageMetricv4HelperThreader() override; /** Overload: Resize and initialize per thread objects. */ - virtual void BeforeThreadedExecution() ITK_OVERRIDE; + void BeforeThreadedExecution() override; /** Overload: * Collects the results from each thread and sums them. Results are stored @@ -83,7 +83,7 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4HelperThreader * m_NumberOfValidPoints, to average the value sum, and to average * derivative sums for global transforms only (i.e. transforms without local * support). */ - virtual void AfterThreadedExecution() ITK_OVERRIDE; + void AfterThreadedExecution() override; /* Overload: don't need to compute the image gradients and store derivatives @@ -92,15 +92,15 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4HelperThreader * in turn calls \c TransformAndEvaluateFixedPoint, \c * TransformAndEvaluateMovingPoint, and \c ProcessPoint. */ - virtual bool ProcessVirtualPoint( const VirtualIndexType & virtualIndex, + bool ProcessVirtualPoint( const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, - const ThreadIdType threadId ) ITK_OVERRIDE; + const ThreadIdType threadId ) override; /** * Not using. All processing is done in ProcessVirtualPoint. */ - virtual bool ProcessPoint( + bool ProcessPoint( const VirtualIndexType & , const VirtualPointType & , const FixedImagePointType & , @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4HelperThreader const MovingImageGradientType & , MeasureType & , DerivativeType & , - const ThreadIdType ) const ITK_OVERRIDE + const ThreadIdType ) const override { return false; } diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx index e1f07e03f99..0330a0e1ffa 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx @@ -26,8 +26,8 @@ namespace itk template CorrelationImageToImageMetricv4HelperThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric> ::CorrelationImageToImageMetricv4HelperThreader() : - m_CorrelationMetricPerThreadVariables( ITK_NULLPTR ), - m_CorrelationAssociate( ITK_NULLPTR ) + m_CorrelationMetricPerThreadVariables( nullptr ), + m_CorrelationAssociate( nullptr ) {} diff --git a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.h index 6ff259f40e1..b40ec6d2e71 100644 --- a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.h @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT DemonsImageToImageMetricv4 : itkStaticConstMacro(MovingImageDimension, ImageDimensionType, TMovingImage::ImageDimension); - virtual void Initialize(void) ITK_OVERRIDE; + void Initialize(void) override; /** Accessors for the image intensity difference threshold use * in derivative calculation */ @@ -119,7 +119,7 @@ class ITK_TEMPLATE_EXPORT DemonsImageToImageMetricv4 : itkGetConstMacro(Normalizer, TInternalComputationValueType); DemonsImageToImageMetricv4(); - virtual ~DemonsImageToImageMetricv4() ITK_OVERRIDE; + ~DemonsImageToImageMetricv4() override; friend class DemonsImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self >; friend class DemonsImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >; @@ -128,7 +128,7 @@ class ITK_TEMPLATE_EXPORT DemonsImageToImageMetricv4 : typedef DemonsImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self > DemonsSparseGetValueAndDerivativeThreaderType; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: diff --git a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h index 6bbbccc9d2b..c5c20dd570f 100644 --- a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -65,18 +65,18 @@ class ITK_TEMPLATE_EXPORT DemonsImageToImageMetricv4GetValueAndDerivativeThreade protected: DemonsImageToImageMetricv4GetValueAndDerivativeThreader() : - m_DemonsAssociate(ITK_NULLPTR) + m_DemonsAssociate(nullptr) {} /** Overload. * Get pointer to metric object. */ - virtual void BeforeThreadedExecution() ITK_OVERRIDE; + void BeforeThreadedExecution() override; /** This function computes the local voxel-wise contribution of * the metric to the global integral of the metric/derivative. */ - virtual bool ProcessPoint( + bool ProcessPoint( const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, const FixedImagePointType & mappedFixedPoint, @@ -87,7 +87,7 @@ class ITK_TEMPLATE_EXPORT DemonsImageToImageMetricv4GetValueAndDerivativeThreade const MovingImageGradientType & mappedMovingImageGradient, MeasureType & metricValueReturn, DerivativeType & localDerivativeReturn, - const ThreadIdType threadId ) const ITK_OVERRIDE; + const ThreadIdType threadId ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DemonsImageToImageMetricv4GetValueAndDerivativeThreader); diff --git a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx index d0ffb87e052..85acf86f99f 100644 --- a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx @@ -31,7 +31,7 @@ DemonsImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TIm /* Store the casted pointer to avoid dynamic casting in tight loops. */ this->m_DemonsAssociate = dynamic_cast( this->m_Associate ); - if( this->m_DemonsAssociate == ITK_NULLPTR ) + if( this->m_DemonsAssociate == nullptr ) { itkExceptionMacro("Dynamic casting of associate pointer failed."); } diff --git a/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.h b/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.h index 59de1ebe6ac..700297d6795 100644 --- a/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.h @@ -69,20 +69,20 @@ class ITK_TEMPLATE_EXPORT EuclideanDistancePointSetToPointSetMetricv4: /** * Calculates the local metric value for a single point. */ - virtual MeasureType GetLocalNeighborhoodValue( const PointType &, const PixelType & pixel = 0 ) const ITK_OVERRIDE; + MeasureType GetLocalNeighborhoodValue( const PointType &, const PixelType & pixel = 0 ) const override; /** * Calculates the local value and derivative for a single point. */ - virtual void GetLocalNeighborhoodValueAndDerivative( const PointType &, - MeasureType &, LocalDerivativeType &, const PixelType & pixel = 0 ) const ITK_OVERRIDE; + void GetLocalNeighborhoodValueAndDerivative( const PointType &, + MeasureType &, LocalDerivativeType &, const PixelType & pixel = 0 ) const override; protected: EuclideanDistancePointSetToPointSetMetricv4(); - virtual ~EuclideanDistancePointSetToPointSetMetricv4() ITK_OVERRIDE; + ~EuclideanDistancePointSetToPointSetMetricv4() override; /** PrintSelf function */ - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(EuclideanDistancePointSetToPointSetMetricv4); diff --git a/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h b/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h index 91788a50d90..976075a5910 100644 --- a/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h @@ -73,13 +73,13 @@ class ITK_TEMPLATE_EXPORT ExpectationBasedPointSetToPointSetMetricv4: /** * Calculates the local metric value for a single point. */ - virtual MeasureType GetLocalNeighborhoodValue( const PointType &, const PixelType & pixel = 0 ) const ITK_OVERRIDE; + MeasureType GetLocalNeighborhoodValue( const PointType &, const PixelType & pixel = 0 ) const override; /** * Calculates the local value and derivative for a single point. */ - virtual void GetLocalNeighborhoodValueAndDerivative( const PointType &, - MeasureType &, LocalDerivativeType &, const PixelType & pixel = 0 ) const ITK_OVERRIDE; + void GetLocalNeighborhoodValueAndDerivative( const PointType &, + MeasureType &, LocalDerivativeType &, const PixelType & pixel = 0 ) const override; /** * Each point is associated with a Gaussian characterized by m_PointSetSigma @@ -103,18 +103,18 @@ class ITK_TEMPLATE_EXPORT ExpectationBasedPointSetToPointSetMetricv4: */ itkGetConstMacro( EvaluationKNeighborhood, unsigned int ); - void Initialize( void ) ITK_OVERRIDE; + void Initialize( void ) override; /** Clone method will clone the existing instance of this type, * including its internal member variables. */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; protected: ExpectationBasedPointSetToPointSetMetricv4(); - virtual ~ExpectationBasedPointSetToPointSetMetricv4() ITK_OVERRIDE; + ~ExpectationBasedPointSetToPointSetMetricv4() override; /** PrintSelf function */ - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ExpectationBasedPointSetToPointSetMetricv4); diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h index a1385db3274..58e05dbf338 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h @@ -360,10 +360,10 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 typedef typename Superclass::NumberOfParametersType NumberOfParametersType; /** Set fixed image*/ - virtual void SetFixedObject( const ObjectType *object ) ITK_OVERRIDE + void SetFixedObject( const ObjectType *object ) override { FixedImageType *image = dynamic_cast( const_cast( object ) ); - if( image != ITK_NULLPTR ) + if( image != nullptr ) { this->SetFixedImage( image ); } @@ -374,10 +374,10 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 } /** Set moving image*/ - virtual void SetMovingObject( const ObjectType *object ) ITK_OVERRIDE + void SetMovingObject( const ObjectType *object ) override { MovingImageType *image = dynamic_cast( const_cast( object ) ); - if( image != ITK_NULLPTR ) + if( image != nullptr ) { this->SetMovingImage( image ); } @@ -480,7 +480,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 itkGetModifiableObjectMacro(MovingImageGradientImage, MovingImageGradientImageType); /** Get number of valid points from most recent update */ - virtual SizeValueType GetNumberOfValidPoints() const ITK_OVERRIDE + SizeValueType GetNumberOfValidPoints() const override { return this->m_NumberOfValidPoints; } @@ -523,25 +523,25 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 * before entering the registration loop, during which GetValue or * GetDerivative will be called repeatedly. It must be called again if * metric settings are changed before beginning a new registration. */ - virtual void Initialize(void) ITK_OVERRIDE; + void Initialize(void) override; - virtual MeasureType GetValue() const ITK_OVERRIDE; + MeasureType GetValue() const override; - virtual void GetDerivative( DerivativeType & ) const ITK_OVERRIDE; + void GetDerivative( DerivativeType & ) const override; /** Calculate and return both the value for the metric and its derivative. * This calls the SparseGetValueAndDerivativeThreader if \c UsedFixedSampledPointSet * is true, and DenseGetValueAndDerivativeThreader otherwise. The threaders * in turn call \c ProcessPoint on each point in the * domain to be examined. */ - virtual void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const ITK_OVERRIDE; + void GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const override; /** Get the number of sampled fixed sampled points that are * deemed invalid during conversion to virtual domain in Initialize(). * For informational purposes. */ itkGetConstReferenceMacro(NumberOfSkippedFixedSampledPoints, SizeValueType); - virtual bool SupportsArbitraryVirtualDomainSamples( void ) const ITK_OVERRIDE + bool SupportsArbitraryVirtualDomainSamples( void ) const override { return true; } @@ -549,7 +549,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 typedef typename Superclass::MetricCategoryType MetricCategoryType; /** Get metric category */ - virtual MetricCategoryType GetMetricCategory() const ITK_OVERRIDE + MetricCategoryType GetMetricCategory() const override { return Superclass::IMAGE_METRIC; } @@ -678,7 +678,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 * the user-provided variable does not have to be passed around. It also enables * safely sharing a derivative object between metrics during multi-variate * analsys, for memory efficiency. - * Will be ITK_NULLPTR if not set. */ + * Will be nullptr if not set. */ mutable DerivativeType * m_DerivativeResult; /** Masks */ @@ -693,9 +693,9 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 bool m_UseFixedSampledPointSet; ImageToImageMetricv4(); - virtual ~ImageToImageMetricv4() ITK_OVERRIDE; + ~ImageToImageMetricv4() override; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: /** Map the fixed point set samples to the virtual domain */ diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx index d47d595b440..9638d22e6ab 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx @@ -74,7 +74,7 @@ ImageToImageMetricv4m_NumberOfSkippedFixedSampledPoints = 0; this->m_Value = NumericTraits::max(); - this->m_DerivativeResult = ITK_NULLPTR; + this->m_DerivativeResult = nullptr; this->m_ComputeDerivative = false; } @@ -161,13 +161,13 @@ ImageToImageMetricv4m_UseFixedImageGradientFilter ) { itkDebugMacro("Initialize FixedImageGradientCalculator"); - this->m_FixedImageGradientImage = ITK_NULLPTR; + this->m_FixedImageGradientImage = nullptr; this->m_FixedImageGradientCalculator->SetInputImage(this->m_FixedImage); } if( ! this->m_UseMovingImageGradientFilter ) { itkDebugMacro("Initialize MovingImageGradientCalculator"); - this->m_MovingImageGradientImage = ITK_NULLPTR; + this->m_MovingImageGradientImage = nullptr; this->m_MovingImageGradientCalculator->SetInputImage(this->m_MovingImage); } diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h index 9a2c17ff816..338a73de326 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -98,8 +98,8 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4GetValueAndDerivativeThreader< Thr /** Walk through the given virtual image domain, and call \c ProcessVirtualPoint on every * point. */ - virtual void ThreadedExecution( const DomainType & subdomain, - const ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedExecution( const DomainType & subdomain, + const ThreadIdType threadId ) override; /** Get cached values for efficiency. Only valid once threading has started. * These methods should be used in tight loops (inlining helps measurably). @@ -170,8 +170,8 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4GetValueAndDerivativeThreader< Thr /** Walk through the given virtual image domain, and call \c ProcessVirtualPoint on every * point. */ - virtual void ThreadedExecution( const DomainType & subdomain, - const ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedExecution( const DomainType & subdomain, + const ThreadIdType threadId ) override; /** Get cached values for efficiency. Only valid once threading has started. * These methods should be used in tight loops (inlining helps measurably). diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h index df2c542c2b7..da3b7f0432f 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h @@ -92,10 +92,10 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4GetValueAndDerivativeThreaderBase protected: ImageToImageMetricv4GetValueAndDerivativeThreaderBase(); - virtual ~ImageToImageMetricv4GetValueAndDerivativeThreaderBase() ITK_OVERRIDE; + ~ImageToImageMetricv4GetValueAndDerivativeThreaderBase() override; /** Resize and initialize per thread objects. */ - virtual void BeforeThreadedExecution() ITK_OVERRIDE; + void BeforeThreadedExecution() override; /** Collects the results from each thread and sums them. Results are stored * in the enclosing class \c m_Value and \c m_DerivativeResult. Behavior @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4GetValueAndDerivativeThreaderBase * m_NumberOfValidPoints, to average the value sum, and to average * derivative sums for global transforms only (i.e. transforms without local * support). */ - virtual void AfterThreadedExecution() ITK_OVERRIDE; + void AfterThreadedExecution() override; /** Method called by the threaders to process the given virtual point. This * in turn calls \c TransformAndEvaluateFixedPoint, \c diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx index 8f6fbde0a82..3a04b8b30e2 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx @@ -27,7 +27,7 @@ namespace itk template< typename TDomainPartitioner, typename TImageToImageMetricv4 > ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 > ::ImageToImageMetricv4GetValueAndDerivativeThreaderBase(): - m_GetValueAndDerivativePerThreadVariables( ITK_NULLPTR ), + m_GetValueAndDerivativePerThreadVariables( nullptr ), m_CachedNumberOfParameters( 0 ), m_CachedNumberOfLocalParameters( 0 ) { diff --git a/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h b/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h index e4d9414a3e0..ec573e74cdd 100644 --- a/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h @@ -119,7 +119,7 @@ class ITK_TEMPLATE_EXPORT JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4 : /** Initialize the Metric by making sure that all the components * are present and plugged together correctly */ - virtual void Initialize( void ) ITK_OVERRIDE; + void Initialize( void ) override; /** * Set the alpha parameter used to tune the point-set metric from @@ -203,24 +203,24 @@ class ITK_TEMPLATE_EXPORT JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4 : /** Get the noise kernel sigma for the anistropic covariances. */ itkGetConstMacro( KernelSigma, RealType ); - virtual MeasureType GetLocalNeighborhoodValue( const PointType & point, - const PixelType & pixel = 0 ) const ITK_OVERRIDE; + MeasureType GetLocalNeighborhoodValue( const PointType & point, + const PixelType & pixel = 0 ) const override; - virtual void GetLocalNeighborhoodValueAndDerivative( const PointType &, MeasureType &, - LocalDerivativeType &, const PixelType & pixel = 0 ) const ITK_OVERRIDE; + void GetLocalNeighborhoodValueAndDerivative( const PointType &, MeasureType &, + LocalDerivativeType &, const PixelType & pixel = 0 ) const override; /** Clone method will clone the existing instance of this type, * including its internal member variables. */ - virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE; + typename LightObject::Pointer InternalClone() const override; protected: JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4(); - ~JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4() ITK_OVERRIDE; + ~JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4() override; void ComputeValueAndDerivative( const PointType & samplePoint, MeasureType & value, LocalDerivativeType &derivativeReturn, bool calcValue, bool calcDerivative ) const; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream& os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4); diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h index 8e6069ef4f6..44d1c9a32cd 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h @@ -76,8 +76,8 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationComputeJointPDFThreader JointHistogramMutualInformationComputeJointPDFThreader() {} /** Walk through the domain, and call this->ProcessPoint on every point. */ - virtual void ThreadedExecution( const DomainType & subdomain, - const ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedExecution( const DomainType & subdomain, + const ThreadIdType threadId ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(JointHistogramMutualInformationComputeJointPDFThreader); @@ -118,8 +118,8 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationComputeJointPDFThreader JointHistogramMutualInformationComputeJointPDFThreader() {} /** Walk through the domain, and call this->ProcessPoint on every point. */ - virtual void ThreadedExecution( const DomainType & subdomain, - const ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedExecution( const DomainType & subdomain, + const ThreadIdType threadId ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(JointHistogramMutualInformationComputeJointPDFThreader); diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h index 0fe490f6d07..84d04b96886 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.h @@ -63,10 +63,10 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationComputeJointPDFThreader protected: JointHistogramMutualInformationComputeJointPDFThreaderBase(); - virtual ~JointHistogramMutualInformationComputeJointPDFThreaderBase() ITK_OVERRIDE; + ~JointHistogramMutualInformationComputeJointPDFThreaderBase() override; /** Create the \c m_JointPDFPerThread's. */ - virtual void BeforeThreadedExecution() ITK_OVERRIDE; + void BeforeThreadedExecution() override; /** Called by the \c ThreadedExecution of derived classes. */ virtual void ProcessPoint( const VirtualIndexType & virtualIndex, @@ -74,7 +74,7 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationComputeJointPDFThreader const ThreadIdType threadId ); /** Collect the results per and normalize. */ - virtual void AfterThreadedExecution() ITK_OVERRIDE; + void AfterThreadedExecution() override; typedef Image< SizeValueType, 2 > JointHistogramType; //TODO: This needs updating diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx index 676555312b3..beee2148f5b 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx @@ -28,7 +28,7 @@ namespace itk template< typename TDomainPartitioner, typename TJointHistogramMetric > JointHistogramMutualInformationComputeJointPDFThreaderBase< TDomainPartitioner, TJointHistogramMetric > ::JointHistogramMutualInformationComputeJointPDFThreaderBase(): - m_JointHistogramMIPerThreadVariables( ITK_NULLPTR ) + m_JointHistogramMIPerThreadVariables( nullptr ) { } diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h index aa4de4229da..0bd4d912394 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h @@ -77,15 +77,15 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationGetValueAndDerivativeTh protected: JointHistogramMutualInformationGetValueAndDerivativeThreader(); - virtual ~JointHistogramMutualInformationGetValueAndDerivativeThreader() ITK_OVERRIDE; + ~JointHistogramMutualInformationGetValueAndDerivativeThreader() override; typedef Image< SizeValueType, 2 > JointHistogramType; - virtual void BeforeThreadedExecution() ITK_OVERRIDE; + void BeforeThreadedExecution() override; - virtual void AfterThreadedExecution() ITK_OVERRIDE; + void AfterThreadedExecution() override; - virtual bool ProcessPoint( + bool ProcessPoint( const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, const FixedImagePointType & mappedFixedPoint, @@ -96,7 +96,7 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationGetValueAndDerivativeTh const MovingImageGradientType & mappedMovingImageGradient, MeasureType & metricValueReturn, DerivativeType & localDerivativeReturn, - const ThreadIdType threadId ) const ITK_OVERRIDE; + const ThreadIdType threadId ) const override; inline InternalComputationValueType ComputeFixedImageMarginalPDFDerivative( const MarginalPDFPointType & margPDFpoint, diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx index f1a33ee9e0e..bde7649d5dc 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx @@ -26,8 +26,8 @@ namespace itk template< typename TDomainPartitioner, typename TImageToImageMetric, typename TJointHistogramMetric > JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TJointHistogramMetric > ::JointHistogramMutualInformationGetValueAndDerivativeThreader() : - m_JointHistogramMIPerThreadVariables( ITK_NULLPTR ), - m_JointAssociate( ITK_NULLPTR ) + m_JointHistogramMIPerThreadVariables( nullptr ), + m_JointAssociate( nullptr ) {} @@ -48,7 +48,7 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner /* Store the casted pointer to avoid dynamic casting in tight loops. */ this->m_JointAssociate = dynamic_cast< TJointHistogramMetric * >( this->m_Associate ); - if( this->m_JointAssociate == ITK_NULLPTR ) + if( this->m_JointAssociate == nullptr ) { itkExceptionMacro("Dynamic casting of associate pointer failed."); } diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h index 4b6e513a86e..86961da4646 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h @@ -141,18 +141,18 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationImageToImageMetricv4 : itkGetMacro(VarianceForJointPDFSmoothing, TInternalComputationValueType); /** Initialize the metric. Make sure all essential inputs are plugged in. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; - virtual MeasureType GetValue() const ITK_OVERRIDE; + MeasureType GetValue() const override; protected: JointHistogramMutualInformationImageToImageMetricv4(); - virtual ~JointHistogramMutualInformationImageToImageMetricv4() ITK_OVERRIDE; + ~JointHistogramMutualInformationImageToImageMetricv4() override; /** Update the histograms for use in GetValueAndDerivative * Results are returned in \c value and \c derivative. */ - virtual void InitializeForIteration() const ITK_OVERRIDE; + void InitializeForIteration() const override; /** Compute the metric value. For internal use. */ MeasureType ComputeValue() const; @@ -183,7 +183,7 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationImageToImageMetricv4 : JointHistogramMutualInformationSparseGetValueAndDerivativeThreaderType; /** Standard PrintSelf method. */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Count of the number of valid histogram points. */ SizeValueType m_JointHistogramTotalCount; diff --git a/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h b/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h index 835817fb67f..c145cf396bd 100644 --- a/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h @@ -91,20 +91,20 @@ class ITK_TEMPLATE_EXPORT LabeledPointSetToPointSetMetricv4: * Initialize the metric by making sure that all the components * are present and plugged together correctly. */ - virtual void Initialize( void ) ITK_OVERRIDE; + void Initialize( void ) override; /** * Calculates the local metric value for a single point. The label type * is used to segregate the computation. */ - virtual MeasureType GetLocalNeighborhoodValue( const PointType &, const LabelType & ) const ITK_OVERRIDE; + MeasureType GetLocalNeighborhoodValue( const PointType &, const LabelType & ) const override; /** * Calculates the local value and derivative for a single point. The label type * is used to segregate the computation. */ - virtual void GetLocalNeighborhoodValueAndDerivative( const PointType &, - MeasureType &, LocalDerivativeType &, const LabelType & ) const ITK_OVERRIDE; + void GetLocalNeighborhoodValueAndDerivative( const PointType &, + MeasureType &, LocalDerivativeType &, const LabelType & ) const override; /** * Set/get the specific unlabeled point set metric type. Default is @@ -120,10 +120,10 @@ class ITK_TEMPLATE_EXPORT LabeledPointSetToPointSetMetricv4: protected: LabeledPointSetToPointSetMetricv4(); - virtual ~LabeledPointSetToPointSetMetricv4() ITK_OVERRIDE; + ~LabeledPointSetToPointSetMetricv4() override; /** PrintSelf function */ - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf( std::ostream & os, Indent indent ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LabeledPointSetToPointSetMetricv4); diff --git a/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx index 1ca2c18e94c..45cfa741d23 100644 --- a/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx @@ -67,7 +67,7 @@ LabeledPointSetToPointSetMetricv4( this->m_PointSetMetric->Clone().GetPointer() ); if( metric.IsNull() ) { - itkExceptionMacro( "The metric pointer clone is ITK_NULLPTR." ); + itkExceptionMacro( "The metric pointer clone is nullptr." ); } FixedPointSetPointer fixedPointSet = this->GetLabeledFixedPointSet( *it ); diff --git a/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.h b/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.h index 95300d3c952..ca65b5bc245 100644 --- a/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.h +++ b/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.h @@ -164,10 +164,10 @@ class ITK_TEMPLATE_EXPORT ManifoldParzenWindowsPointSetFunction itkBooleanMacro( UseAnisotropicCovariances ); /** Set the input point set */ - virtual void SetInputPointSet( const InputPointSetType * ) ITK_OVERRIDE; + void SetInputPointSet( const InputPointSetType * ) override; /** Evaluate function value at specified point */ - virtual TOutput Evaluate( const InputPointType & ) const ITK_OVERRIDE; + TOutput Evaluate( const InputPointType & ) const override; /** Get Gaussian corresponding to a specific point */ GaussianConstPointer GetGaussian( PointIdentifier ) const; @@ -177,8 +177,8 @@ class ITK_TEMPLATE_EXPORT ManifoldParzenWindowsPointSetFunction protected: ManifoldParzenWindowsPointSetFunction(); - virtual ~ManifoldParzenWindowsPointSetFunction() ITK_OVERRIDE; - void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + ~ManifoldParzenWindowsPointSetFunction() override; + void PrintSelf( std::ostream& os, Indent indent ) const override; void GenerateData(); diff --git a/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx b/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx index 4a9fb71bd22..22b22d716b9 100644 --- a/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx +++ b/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx @@ -28,7 +28,7 @@ namespace itk template ManifoldParzenWindowsPointSetFunction ::ManifoldParzenWindowsPointSetFunction() : - m_PointsLocator( ITK_NULLPTR ), + m_PointsLocator( nullptr ), m_CovarianceKNeighborhood( 5 ), m_EvaluationKNeighborhood( 50 ), m_RegularizationSigma( 1.0 ), @@ -167,7 +167,7 @@ TOutput ManifoldParzenWindowsPointSetFunction ::Evaluate( const InputPointType &point ) const { - if( this->GetInputPointSet() == ITK_NULLPTR ) + if( this->GetInputPointSet() == nullptr ) { itkExceptionMacro( "The input point set has not been specified." ); } @@ -212,7 +212,7 @@ ManifoldParzenWindowsPointSetFunction } else { - return ITK_NULLPTR; + return nullptr; } } diff --git a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h index cb9595aa40b..ea4048062d8 100644 --- a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h @@ -153,7 +153,7 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4 : itkSetClampMacro( NumberOfHistogramBins, SizeValueType, 5, NumericTraits::max() ); itkGetConstReferenceMacro(NumberOfHistogramBins, SizeValueType); - virtual void Initialize(void) ITK_OVERRIDE; + void Initialize(void) override; /** The marginal PDFs are stored as std::vector. */ //NOTE: floating point precision is not as stable. @@ -172,7 +172,7 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4 : { if( this->m_ThreaderJointPDF.size() == 0 ) { - return typename JointPDFType::Pointer(ITK_NULLPTR); + return typename JointPDFType::Pointer(nullptr); } return this->m_ThreaderJointPDF[0]; } @@ -188,11 +188,11 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4 : return this->m_JointPDFDerivatives; } - virtual void FinalizeThread( const ThreadIdType threadId ) ITK_OVERRIDE; + void FinalizeThread( const ThreadIdType threadId ) override; protected: MattesMutualInformationImageToImageMetricv4(); - virtual ~MattesMutualInformationImageToImageMetricv4() ITK_OVERRIDE; + ~MattesMutualInformationImageToImageMetricv4() override; friend class MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self >; friend class MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >; @@ -201,7 +201,7 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4 : typedef MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self > MattesMutualInformationSparseGetValueAndDerivativeThreaderType; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; typedef typename JointPDFType::IndexType JointPDFIndexType; typedef typename JointPDFType::PixelType JointPDFValueType; diff --git a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx index b95c882696e..ec90362040f 100644 --- a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx @@ -39,8 +39,8 @@ MattesMutualInformationImageToImageMetricv4m_MattesAssociate = dynamic_cast(this->m_Associate); - if( this->m_MattesAssociate == ITK_NULLPTR ) + if( this->m_MattesAssociate == nullptr ) { itkExceptionMacro("Dynamic casting of associate pointer failed."); } @@ -148,7 +148,7 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai this->m_MattesAssociate->m_PRatioArray.resize(0); this->m_MattesAssociate->m_JointPdfIndex1DArray.resize(0); this->m_MattesAssociate->m_LocalDerivativeByParzenBin.resize(0); - this->m_MattesAssociate->m_JointPDFDerivatives = ITK_NULLPTR; + this->m_MattesAssociate->m_JointPDFDerivatives = nullptr; } if( this->m_MattesAssociate->GetComputeDerivative() && this->m_MattesAssociate->HasLocalSupport() ) @@ -156,7 +156,7 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai this->m_MattesAssociate->m_PRatioArray.assign( this->m_MattesAssociate->m_NumberOfHistogramBins * this->m_MattesAssociate->m_NumberOfHistogramBins, 0.0); this->m_MattesAssociate->m_JointPdfIndex1DArray.assign( this->m_MattesAssociate->GetNumberOfParameters(), 0 ); // Don't need this with local-support - this->m_MattesAssociate->m_JointPDFDerivatives = ITK_NULLPTR; + this->m_MattesAssociate->m_JointPDFDerivatives = nullptr; // This always has four entries because the parzen window size is fixed. this->m_MattesAssociate->m_LocalDerivativeByParzenBin.resize(4); // The first container cannot point to the existing derivative result diff --git a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h index 51d24c80776..459ee8c6016 100644 --- a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h @@ -81,7 +81,7 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetricv4 : protected: MeanSquaresImageToImageMetricv4(); - virtual ~MeanSquaresImageToImageMetricv4() ITK_OVERRIDE; + ~MeanSquaresImageToImageMetricv4() override; friend class MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self >; friend class MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >; @@ -90,7 +90,7 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetricv4 : typedef MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self > MeanSquaresSparseGetValueAndDerivativeThreaderType; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream& os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MeanSquaresImageToImageMetricv4); diff --git a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h index f971efd017a..c683c84fdbf 100644 --- a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -67,7 +67,7 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetricv4GetValueAndDerivativeTh /** This function computes the local voxel-wise contribution of * the metric to the global integral of the metric/derivative. */ - virtual bool ProcessPoint( + bool ProcessPoint( const VirtualIndexType & virtualIndex, const VirtualPointType & virtualPoint, const FixedImagePointType & mappedFixedPoint, @@ -78,7 +78,7 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetricv4GetValueAndDerivativeTh const MovingImageGradientType & mappedMovingImageGradient, MeasureType & metricValueReturn, DerivativeType & localDerivativeReturn, - const ThreadIdType threadId ) const ITK_OVERRIDE; + const ThreadIdType threadId ) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader); diff --git a/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h b/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h index 2af4e5ef8a5..b3470147fd1 100644 --- a/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h @@ -141,33 +141,33 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMultiMetricv4: /** Get the number of metrics */ SizeValueType GetNumberOfMetrics() const; - void Initialize(void) ITK_OVERRIDE; + void Initialize(void) override; /** Set fixed object (image, point set, etc.)*/ - virtual void SetFixedObject( const ObjectType *itkNotUsed( object ) ) ITK_OVERRIDE + void SetFixedObject( const ObjectType *itkNotUsed( object ) ) override { itkExceptionMacro( "A single object should not be specified for the multi metric."); } /** Set moving object (image, point set, etc.)*/ - virtual void SetMovingObject( const ObjectType *itkNotUsed( object ) ) ITK_OVERRIDE + void SetMovingObject( const ObjectType *itkNotUsed( object ) ) override { itkExceptionMacro( "A single object should not be specified for the multi metric."); } /** Set each of the component metrics to use this moving transform. */ - virtual void SetMovingTransform( MovingTransformType * ) ITK_OVERRIDE; + void SetMovingTransform( MovingTransformType * ) override; /** Set each of the component metrics to use this fixed transform. */ - virtual void SetFixedTransform( FixedTransformType * ) ITK_OVERRIDE; + void SetFixedTransform( FixedTransformType * ) override; /** Evaluate the metrics and return the value of only the *first* metric. * \sa GetValueArray * \sa GetWeightedValue */ - MeasureType GetValue() const ITK_OVERRIDE; + MeasureType GetValue() const override; - virtual void GetDerivative( DerivativeType & ) const ITK_OVERRIDE; + void GetDerivative( DerivativeType & ) const override; /** Evaluate the metric value and derivative. * \note \param value will contain the value of only the *first* metric on return. @@ -175,7 +175,7 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMultiMetricv4: * * \sa GetValueArray * \sa GetWeightedValue */ - void GetValueAndDerivative(MeasureType & value, DerivativeType & derivative) const ITK_OVERRIDE; + void GetValueAndDerivative(MeasureType & value, DerivativeType & derivative) const override; /** Returns an itkArray of metric values, one for each component metric. It * only has meaning after a call to GetValue(), GetDerivative() or GetValueAndDerivative(). */ @@ -188,12 +188,12 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMultiMetricv4: /** Get the metrics queue */ const MetricQueueType & GetMetricQueue() const; - virtual bool SupportsArbitraryVirtualDomainSamples( void ) const ITK_OVERRIDE; + bool SupportsArbitraryVirtualDomainSamples( void ) const override; typedef typename Superclass::MetricCategoryType MetricCategoryType; /** Get metric category */ - virtual MetricCategoryType GetMetricCategory() const ITK_OVERRIDE + MetricCategoryType GetMetricCategory() const override { return Superclass::MULTI_METRIC; } @@ -201,8 +201,8 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMultiMetricv4: protected: ObjectToObjectMultiMetricv4(); - virtual ~ObjectToObjectMultiMetricv4() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ObjectToObjectMultiMetricv4() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ObjectToObjectMultiMetricv4); diff --git a/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx index ba04b1a0dc0..b39bbe3e52d 100644 --- a/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx @@ -31,8 +31,8 @@ ObjectToObjectMultiMetricv4m_MetricQueue.clear(); - //We want the moving transform to be ITK_NULLPTR by default - this->m_MovingTransform = ITK_NULLPTR; + //We want the moving transform to be nullptr by default + this->m_MovingTransform = nullptr; } /** Destructor */ @@ -146,7 +146,7 @@ ObjectToObjectMultiMetricv4m_MetricValueArray.SetSize( this->GetNumberOfMetrics() ); /* Verify the same transform is in all metrics. */ - const MovingTransformType * firstTransform = ITK_NULLPTR; + const MovingTransformType * firstTransform = nullptr; for (SizeValueType j = 0; j < this->GetNumberOfMetrics(); j++) { const MovingTransformType * transform = this->m_MetricQueue[j]->GetMovingTransform(); @@ -154,7 +154,7 @@ ObjectToObjectMultiMetricv4 CompositeType; const CompositeType * composite = dynamic_cast(transform); - if( composite != ITK_NULLPTR ) + if( composite != nullptr ) { SizeValueType count = 0; for( size_t n = 0; n < composite->GetNumberOfTransforms(); n++ ) diff --git a/Modules/Registration/Metricsv4/include/itkPointSetFunction.h b/Modules/Registration/Metricsv4/include/itkPointSetFunction.h index 3840f8d2dde..56cb9c02c24 100644 --- a/Modules/Registration/Metricsv4/include/itkPointSetFunction.h +++ b/Modules/Registration/Metricsv4/include/itkPointSetFunction.h @@ -103,12 +103,12 @@ class ITK_TEMPLATE_EXPORT PointSetFunction : /** Evaluate the function at specified Point position. * Subclasses must provide this method. */ - virtual TOutput Evaluate( const InputPointType& point ) const ITK_OVERRIDE = 0; + TOutput Evaluate( const InputPointType& point ) const override = 0; protected: PointSetFunction(); - virtual ~PointSetFunction() ITK_OVERRIDE; - void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; + ~PointSetFunction() override; + void PrintSelf(std::ostream& os, Indent indent) const override; /** Const pointer to the input image. */ InputPointSetConstPointer m_PointSet; diff --git a/Modules/Registration/Metricsv4/include/itkPointSetFunction.hxx b/Modules/Registration/Metricsv4/include/itkPointSetFunction.hxx index 1b6a66944c1..12c1efd7540 100644 --- a/Modules/Registration/Metricsv4/include/itkPointSetFunction.hxx +++ b/Modules/Registration/Metricsv4/include/itkPointSetFunction.hxx @@ -30,7 +30,7 @@ template PointSetFunction ::PointSetFunction() { - this->m_PointSet = ITK_NULLPTR; + this->m_PointSet = nullptr; } /** diff --git a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h index 42ff7acb3b5..2d0be3118c4 100644 --- a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h @@ -178,10 +178,10 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricv4 typedef typename Superclass::VirtualPointSetPointer VirtualPointSetPointer; /** Set fixed point set*/ - virtual void SetFixedObject( const ObjectType *object ) ITK_OVERRIDE + void SetFixedObject( const ObjectType *object ) override { FixedPointSetType *pointSet = dynamic_cast( const_cast( object ) ); - if( pointSet != ITK_NULLPTR ) + if( pointSet != nullptr ) { this->SetFixedPointSet( pointSet ); } @@ -192,10 +192,10 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricv4 } /** Set moving point set*/ - virtual void SetMovingObject( const ObjectType *object ) ITK_OVERRIDE + void SetMovingObject( const ObjectType *object ) override { MovingPointSetType *pointSet = dynamic_cast( const_cast( object ) ); - if( pointSet != ITK_NULLPTR ) + if( pointSet != nullptr ) { this->SetMovingPointSet( pointSet ); } @@ -234,7 +234,7 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricv4 * point set metrics. For those cases, the developer will have to redefine * the GetValue() function. */ - virtual MeasureType GetValue() const ITK_OVERRIDE; + MeasureType GetValue() const override; /** * This method returns the derivative based on the current @@ -246,7 +246,7 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricv4 * those cases, the developer will have to redefine the GetDerivative() * function. */ - virtual void GetDerivative( DerivativeType & ) const ITK_OVERRIDE; + void GetDerivative( DerivativeType & ) const override; /** * This method returns the derivative and value based on the current @@ -258,7 +258,7 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricv4 * point set metrics. For those cases, the developer will have to redefine * the GetValue() and GetDerivative() functions. */ - virtual void GetValueAndDerivative( MeasureType &, DerivativeType & ) const ITK_OVERRIDE; + void GetValueAndDerivative( MeasureType &, DerivativeType & ) const override; /** * Function to be defined in the appropriate derived classes. Calculates @@ -290,9 +290,9 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricv4 * Initialize the metric by making sure that all the components * are present and plugged together correctly. */ - virtual void Initialize( void ) ITK_OVERRIDE; + void Initialize( void ) override; - virtual bool SupportsArbitraryVirtualDomainSamples( void ) const ITK_OVERRIDE + bool SupportsArbitraryVirtualDomainSamples( void ) const override { /* An arbitrary point in the virtual domain will not always * correspond to a point within either point set. */ @@ -323,8 +323,8 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricv4 protected: PointSetToPointSetMetricv4(); - virtual ~PointSetToPointSetMetricv4() ITK_OVERRIDE; - void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + ~PointSetToPointSetMetricv4() override; + void PrintSelf( std::ostream & os, Indent indent ) const override; typename FixedPointSetType::ConstPointer m_FixedPointSet; mutable typename FixedTransformedPointSetType::Pointer m_FixedTransformedPointSet; @@ -406,7 +406,7 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricv4 typedef typename Superclass::MetricCategoryType MetricCategoryType; /** Get metric category */ - virtual MetricCategoryType GetMetricCategory() const ITK_OVERRIDE + MetricCategoryType GetMetricCategory() const override { return Superclass::POINT_SET_METRIC; } diff --git a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx index 35488dc4297..e3e1094d500 100644 --- a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx @@ -29,15 +29,15 @@ template ::PointSetToPointSetMetricv4() { - this->m_FixedPointSet = ITK_NULLPTR; // has to be provided by the user. - this->m_MovingPointSet = ITK_NULLPTR; // has to be provided by the user. + this->m_FixedPointSet = nullptr; // has to be provided by the user. + this->m_MovingPointSet = nullptr; // has to be provided by the user. - this->m_FixedTransformedPointSet = ITK_NULLPTR; - this->m_MovingTransformedPointSet = ITK_NULLPTR; - this->m_VirtualTransformedPointSet = ITK_NULLPTR; + this->m_FixedTransformedPointSet = nullptr; + this->m_MovingTransformedPointSet = nullptr; + this->m_VirtualTransformedPointSet = nullptr; - this->m_FixedTransformedPointsLocator = ITK_NULLPTR; - this->m_MovingTransformedPointsLocator = ITK_NULLPTR; + this->m_FixedTransformedPointsLocator = nullptr; + this->m_MovingTransformedPointsLocator = nullptr; this->m_MovingTransformPointLocatorsNeedInitialization = false; this->m_FixedTransformPointLocatorsNeedInitialization = false; diff --git a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx index eb7ee751d0a..622d209b0ce 100644 --- a/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkANTSNeighborhoodCorrelationImageToImageMetricv4Test.cxx @@ -131,7 +131,7 @@ int itkANTSNeighborhoodCorrelationImageToImageMetricv4Test( int, char ** const ) IdentityTransformType::Pointer transformMId = IdentityTransformType::New(); if(transformMId.IsNull()) { - std::cerr << "transformMId == ITK_NULLPTR" << std::endl; + std::cerr << "transformMId == nullptr" << std::endl; return EXIT_FAILURE; } DisplacementTransformType::Pointer transformMdisplacement = DisplacementTransformType::New(); diff --git a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx index e92c724fe13..b51fa5eee1f 100644 --- a/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkDemonsImageToImageMetricv4RegistrationTest.cxx @@ -59,12 +59,12 @@ class itkDemonsImageToImageMetricv4RegistrationTestCommandIterationUpdate : publ public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { if( typeid( event ) != typeid( itk::IterationEvent ) ) { diff --git a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx index cb435148cfd..ee5257b579b 100644 --- a/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkEuclideanDistancePointSetMetricRegistrationTest.cxx @@ -38,12 +38,12 @@ class itkEuclideanDistancePointSetMetricRegistrationTestCommandIterationUpdate : public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { if( typeid( event ) != typeid( itk::IterationEvent ) ) { diff --git a/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx index 7d7cbc48848..9f01728bb31 100644 --- a/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkExpectationBasedPointSetMetricRegistrationTest.cxx @@ -40,12 +40,12 @@ class itkExpectationBasedPointSetMetricRegistrationTestCommandIterationUpdate : public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { if( typeid( event ) != typeid( itk::IterationEvent ) ) { diff --git a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx index d1c29b6c4ec..f1b08786b0c 100644 --- a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx @@ -71,7 +71,7 @@ class TestImageToImageGetValueAndDerivativeThreader TestImageToImageGetValueAndDerivativeThreader() { } /* Provide the worker routine to process each point */ - virtual bool ProcessPoint( + bool ProcessPoint( const VirtualIndexType & itkNotUsed(virtualIndex), const VirtualPointType & itkNotUsed(virtualPoint), const FixedImagePointType & itkNotUsed(mappedFixedPoint), @@ -82,7 +82,7 @@ class TestImageToImageGetValueAndDerivativeThreader const MovingImageGradientType & mappedMovingImageGradient, MeasureType & metricValueResult, DerivativeType & localDerivativeReturn, - const itk::ThreadIdType itkNotUsed(threadId) ) const ITK_OVERRIDE + const itk::ThreadIdType itkNotUsed(threadId) ) const override { /* Just return some test values that can verify proper mechanics */ metricValueResult = mappedFixedPixelValue + mappedMovingPixelValue; @@ -158,9 +158,9 @@ class ImageToImageMetricv4TestMetric this->m_DenseGetValueAndDerivativeThreader = DenseThreaderType::New(); this->m_SparseGetValueAndDerivativeThreader = SparseThreaderType::New(); } - virtual ~ImageToImageMetricv4TestMetric() ITK_OVERRIDE {} + ~ImageToImageMetricv4TestMetric() override {} - void PrintSelf(std::ostream& stream, itk::Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream& stream, itk::Indent indent) const override { Superclass::PrintSelf( stream, indent ); } diff --git a/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest.cxx index 9d09159e1b4..bfb78e58edd 100644 --- a/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTest.cxx @@ -40,12 +40,12 @@ class itkJensenHavrdaCharvatTsallisPointSetMetricRegistrationTestCommandIteratio public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { if( typeid( event ) != typeid( itk::IterationEvent ) ) { diff --git a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx index 4e53babdf38..73380a3e878 100644 --- a/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkJointHistogramMutualInformationImageToImageRegistrationTest.cxx @@ -66,16 +66,16 @@ class JointPDFStatus: public itk::Command this->m_OutputFileNameBase = filename; } - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *)caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const OptimizerType * optimizer = dynamic_cast< const OptimizerType * >( object ); - if(optimizer == ITK_NULLPTR) + if(optimizer == nullptr) { return; } @@ -116,7 +116,7 @@ class JointPDFStatus: public itk::Command protected: JointPDFStatus() : - m_MIMetric( ITK_NULLPTR ), + m_MIMetric( nullptr ), m_Count( 0 ) { this->m_Writer = WriterType::New(); diff --git a/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricRegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricRegistrationTest.cxx index 6b57df12082..8ebdfb29c74 100644 --- a/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricRegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkLabeledPointSetMetricRegistrationTest.cxx @@ -43,12 +43,12 @@ class itkLabeledPointSetMetricRegistrationTestCommandIterationUpdate : public it public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { if( typeid( event ) != typeid( itk::IterationEvent ) ) { diff --git a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx index 0f5fb9eaeee..113284b0018 100644 --- a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx @@ -201,7 +201,7 @@ int TestMattesMetricWithAffineTransform( typename MetricType::Pointer metric = MetricType::New(); - // Sanity check before metric is run, these should be ITK_NULLPTR; + // Sanity check before metric is run, these should be nullptr; if( metric->GetJointPDFDerivatives().IsNotNull() ) { return EXIT_FAILURE; diff --git a/Modules/Registration/Metricsv4/test/itkMetricImageGradientTest.cxx b/Modules/Registration/Metricsv4/test/itkMetricImageGradientTest.cxx index 7da1a950845..f0309eb1a2f 100644 --- a/Modules/Registration/Metricsv4/test/itkMetricImageGradientTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkMetricImageGradientTest.cxx @@ -101,7 +101,7 @@ class VanilaImageToImageMetricv4GetValueAndDerivativeThreader /** This function computes the local voxel-wise contribution of * the metric to the global integral of the metric/derivative. */ - virtual bool ProcessPoint( + bool ProcessPoint( const VirtualIndexType & itkNotUsed(virtualIndex), const VirtualPointType & itkNotUsed(virtualPoint), const FixedImagePointType & itkNotUsed(mappedFixedPoint), @@ -112,7 +112,7 @@ class VanilaImageToImageMetricv4GetValueAndDerivativeThreader const MovingImageGradientType & itkNotUsed(mappedMovingImageGradient), MeasureType & itkNotUsed(metricValueReturn), DerivativeType & itkNotUsed(localDerivativeReturn), - const ThreadIdType itkNotUsed(threadId) ) const ITK_OVERRIDE + const ThreadIdType itkNotUsed(threadId) ) const override { return false; } @@ -174,7 +174,7 @@ class VanillaImageToImageMetricv4 : public ImageToImageMetricv4m_SparseGetValueAndDerivativeThreader = VanillaSparseGetValueAndDerivativeThreaderType::New(); } - virtual ~VanillaImageToImageMetricv4() ITK_OVERRIDE {} + ~VanillaImageToImageMetricv4() override {} // template // template <> diff --git a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4RegistrationTest.cxx b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4RegistrationTest.cxx index 31d52c98adf..c04558aa643 100644 --- a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4RegistrationTest.cxx +++ b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4RegistrationTest.cxx @@ -49,12 +49,12 @@ class itkObjectToObjectMultiMetricv4RegistrationTestCommandIterationUpdate : pub public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { if( typeid( event ) != typeid( itk::IterationEvent ) ) { @@ -202,7 +202,7 @@ int itkObjectToObjectMultiMetricv4RegistrationTest(int argc, char *argv[]) translationTransform->SetIdentity(); // create images - ImageType::Pointer fixedImage = ITK_NULLPTR, movingImage = ITK_NULLPTR; + ImageType::Pointer fixedImage = nullptr, movingImage = nullptr; ImageType::OffsetType imageShift; imageShift.Fill(0); ObjectToObjectMultiMetricv4RegistrationTestCreateImages( fixedImage, movingImage, imageShift ); diff --git a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx index 2d15f3d5e4e..9f8e27acad8 100644 --- a/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkObjectToObjectMultiMetricv4Test.cxx @@ -313,10 +313,10 @@ int itkObjectToObjectMultiMetricv4TestRun(bool useDisplacementTransform ) std::cerr << "Automatic transform assignment failed. transform: " << transform.GetPointer() << " GetMovingTranform: " << multiVariateMetric->GetMovingTransform() << std::endl; return EXIT_FAILURE; } - multiVariateMetric->SetMovingTransform( ITK_NULLPTR ); + multiVariateMetric->SetMovingTransform( nullptr ); for( itk::SizeValueType n = 0; n < multiVariateMetric->GetNumberOfMetrics(); n++ ) { - if( multiVariateMetric->GetMovingTransform() != ITK_NULLPTR || multiVariateMetric->GetMetricQueue()[n]->GetMovingTransform() != ITK_NULLPTR ) + if( multiVariateMetric->GetMovingTransform() != nullptr || multiVariateMetric->GetMetricQueue()[n]->GetMovingTransform() != nullptr ) { std::cerr << "Assignment of null transform failed. multiVariateMetric->GetMovingTransform(): " << multiVariateMetric->GetMovingTransform() << " multiVariateMetric->GetMetricQueue()[" << n << "]->GetMovingTransform(): " diff --git a/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.h b/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.h index e24d380e543..1e2a86e3731 100644 --- a/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.h +++ b/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.h @@ -173,14 +173,14 @@ class ITK_TEMPLATE_EXPORT CurvatureRegistrationFilter: protected: CurvatureRegistrationFilter(); - ~CurvatureRegistrationFilter(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~CurvatureRegistrationFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Initialize the state of filter before starting first iteration. */ - virtual void Initialize(); + void Initialize() override; /** Apply update. */ - virtual void ApplyUpdate(const TimeStepType& dt); + void ApplyUpdate(const TimeStepType& dt) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CurvatureRegistrationFilter); diff --git a/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx index 8372918c826..0b3f0e70fbd 100644 --- a/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx @@ -43,12 +43,12 @@ CurvatureRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField, TIma this->SetTimeStep(100.0); this->SetConstraintWeight(0.01); - m_PlanBackwardDCT = m_PlanForwardDCT = ITK_NULLPTR; - m_DisplacementFieldComponentImage = m_DisplacementFieldComponentImageDCT = ITK_NULLPTR; + m_PlanBackwardDCT = m_PlanForwardDCT = nullptr; + m_DisplacementFieldComponentImage = m_DisplacementFieldComponentImageDCT = nullptr; for ( unsigned int dim = 0; dim < ImageDimension; ++dim ) { - m_DiagonalElements[dim] = ITK_NULLPTR; + m_DiagonalElements[dim] = nullptr; } } diff --git a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.h b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.h index 62aadfa4d00..8f435175ed7 100644 --- a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.h +++ b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.h @@ -125,20 +125,20 @@ class ITK_TEMPLATE_EXPORT DemonsRegistrationFilter: protected: DemonsRegistrationFilter(); // ~DemonsRegistrationFilter() {} default implementation ok - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Initialize the state of filter and equation before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** Apply update. */ - virtual void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE; + void ApplyUpdate(const TimeStepType& dt) override; /** Override VeriyInputInformation() since this filter's inputs do * not need to occoupy the same physical space. * * \sa ProcessObject::VerifyInputInformation */ - virtual void VerifyInputInformation() ITK_OVERRIDE {} + void VerifyInputInformation() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(DemonsRegistrationFilter); diff --git a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h index 8ebdffe7543..fba465b131a 100644 --- a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h +++ b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.h @@ -126,12 +126,12 @@ class ITK_TEMPLATE_EXPORT DemonsRegistrationFunction: { return m_MovingImageInterpolator; } /** This class uses a constant timestep of 1. */ - virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE + TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const override { return m_TimeStep; } /** Return a pointer to a global data structure that is passed to * this object from the solver at each calculation. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { GlobalDataStruct *global = new GlobalDataStruct(); @@ -142,17 +142,17 @@ class ITK_TEMPLATE_EXPORT DemonsRegistrationFunction: } /** Release memory for global data structure. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE; + void ReleaseGlobalDataPointer(void *GlobalData) const override; /** Set the object's state before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** This method is called by a finite difference solver image filter at * each pixel that does not lie on a data set boundary */ - virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, + PixelType ComputeUpdate( const NeighborhoodType & neighborhood, void *globalData, const FloatOffsetType & offset = - FloatOffsetType(0.0) ) ITK_OVERRIDE; + FloatOffsetType(0.0) ) override; /** Get the metric value. The metric value is the mean square difference * in intensity between the fixed image and transforming moving image @@ -182,8 +182,8 @@ class ITK_TEMPLATE_EXPORT DemonsRegistrationFunction: protected: DemonsRegistrationFunction(); - ~DemonsRegistrationFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DemonsRegistrationFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** FixedImage image neighborhood iterator type. */ typedef ConstNeighborhoodIterator< FixedImageType > diff --git a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx index dfc36ef3385..a611e7840f9 100644 --- a/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx @@ -43,8 +43,8 @@ DemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > m_TimeStep = 1.0; m_DenominatorThreshold = 1e-9; m_IntensityDifferenceThreshold = 0.001; - this->SetMovingImage(ITK_NULLPTR); - this->SetFixedImage(ITK_NULLPTR); + this->SetMovingImage(nullptr); + this->SetFixedImage(nullptr); //m_FixedImageSpacing.Fill( 1.0 ); //m_FixedImageOrigin.Fill( 0.0 ); m_Normalizer = 1.0; diff --git a/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.h b/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.h index 7ae19856134..7e7eeb1d565 100644 --- a/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.h +++ b/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.h @@ -124,7 +124,7 @@ class ITK_TEMPLATE_EXPORT DiffeomorphicDemonsRegistrationFilter: * This value is calculated for the current iteration */ virtual double GetMetric() const; - virtual const double & GetRMSChange() const ITK_OVERRIDE; + const double & GetRMSChange() const override; virtual void SetUseGradientType(GradientType gtype); @@ -153,18 +153,18 @@ class ITK_TEMPLATE_EXPORT DiffeomorphicDemonsRegistrationFilter: protected: DiffeomorphicDemonsRegistrationFilter(); - ~DiffeomorphicDemonsRegistrationFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~DiffeomorphicDemonsRegistrationFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Initialize the state of filter and equation before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** This method allocates storage in m_UpdateBuffer. It is called from * FiniteDifferenceFilter::GenerateData(). */ - virtual void AllocateUpdateBuffer() ITK_OVERRIDE; + void AllocateUpdateBuffer() override; /** Apply update. */ - virtual void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE; + void ApplyUpdate(const TimeStepType& dt) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DiffeomorphicDemonsRegistrationFilter); diff --git a/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h b/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h index d407476f6a2..3ff3fc65441 100644 --- a/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h +++ b/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h @@ -143,12 +143,12 @@ class ITK_TEMPLATE_EXPORT ESMDemonsRegistrationFunction: { return m_MovingImageInterpolator; } /** This class uses a constant timestep of 1. */ - virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE + TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const override { return m_TimeStep; } /** Return a pointer to a global data structure that is passed to * this object from the solver at each calculation. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { GlobalDataStruct *global = new GlobalDataStruct(); @@ -159,16 +159,16 @@ class ITK_TEMPLATE_EXPORT ESMDemonsRegistrationFunction: } /** Release memory for global data structure. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE; + void ReleaseGlobalDataPointer(void *GlobalData) const override; /** Set the object's state before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** This method is called by a finite difference solver image filter at * each pixel that does not lie on a data set boundary */ - virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, + PixelType ComputeUpdate( const NeighborhoodType & neighborhood, void *globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0) ) ITK_OVERRIDE; + const FloatOffsetType & offset = FloatOffsetType(0.0) ) override; /** Get the metric value. The metric value is the mean square difference * in intensity between the fixed image and transforming moving image @@ -217,8 +217,8 @@ class ITK_TEMPLATE_EXPORT ESMDemonsRegistrationFunction: protected: ESMDemonsRegistrationFunction(); - ~ESMDemonsRegistrationFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ESMDemonsRegistrationFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** FixedImage image neighborhood iterator type. */ typedef ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType; diff --git a/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.hxx index 4034da94d5d..9bfe125532e 100644 --- a/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.hxx @@ -45,8 +45,8 @@ ESMDemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > m_IntensityDifferenceThreshold = 0.001; m_MaximumUpdateStepLength = 0.5; - 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_FixedImageDirection.SetIdentity(); @@ -70,7 +70,7 @@ ESMDemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > m_MovingImageWarper->SetInterpolator(m_MovingImageInterpolator); m_MovingImageWarper->SetEdgePaddingValue( NumericTraits< MovingPixelType >::max() ); - m_MovingImageWarperOutput = ITK_NULLPTR; + m_MovingImageWarperOutput = nullptr; m_Metric = NumericTraits< double >::max(); m_SumOfSquaredDifference = 0.0; diff --git a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.h b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.h index 89fd2de2c32..e92a56a9111 100644 --- a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.h +++ b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.h @@ -109,7 +109,7 @@ class ITK_TEMPLATE_EXPORT FastSymmetricForcesDemonsRegistrationFilter: * This value is calculated for the current iteration */ virtual double GetMetric() const; - virtual const double & GetRMSChange() const ITK_OVERRIDE; + const double & GetRMSChange() const override; /** DemonsRegistrationFilterFunction type. * @@ -139,15 +139,15 @@ class ITK_TEMPLATE_EXPORT FastSymmetricForcesDemonsRegistrationFilter: protected: FastSymmetricForcesDemonsRegistrationFilter(); - ~FastSymmetricForcesDemonsRegistrationFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FastSymmetricForcesDemonsRegistrationFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Initialize the state of filter and equation before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** This method allocates storage in m_UpdateBuffer. It is called from * FiniteDifferenceFilter::GenerateData(). */ - virtual void AllocateUpdateBuffer() ITK_OVERRIDE; + void AllocateUpdateBuffer() override; /** FiniteDifferenceFunction type. */ typedef typename @@ -158,7 +158,7 @@ class ITK_TEMPLATE_EXPORT FastSymmetricForcesDemonsRegistrationFilter: FiniteDifferenceFunctionType::TimeStepType TimeStepType; /** Apply update. */ - virtual void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE; + void ApplyUpdate(const TimeStepType& dt) override; /** other typedefs */ typedef MultiplyImageFilter< diff --git a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.h b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.h index 3fa9fe1bc98..99bb41642b9 100644 --- a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.h +++ b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.h @@ -123,14 +123,14 @@ class ITK_TEMPLATE_EXPORT FastSymmetricForcesDemonsRegistrationFunction: } /** This class uses a constant timestep of 1. */ - virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const + TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const override { return m_TimeStep; } /** Return a pointer to a global data structure that is passed to * this object from the solver at each calculation. */ - virtual void * GetGlobalDataPointer() const + void * GetGlobalDataPointer() const override { GlobalDataStruct *global = new GlobalDataStruct(); @@ -141,16 +141,16 @@ class ITK_TEMPLATE_EXPORT FastSymmetricForcesDemonsRegistrationFunction: } /** Release memory for global data structure. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const; + void ReleaseGlobalDataPointer(void *GlobalData) const override; /** Set the object's state before each iteration. */ - virtual void InitializeIteration(); + void InitializeIteration() override; /** This method is called by a finite difference solver image filter at * each pixel that does not lie on a data set boundary */ - virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, + PixelType ComputeUpdate( const NeighborhoodType & neighborhood, void *globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0) ); + const FloatOffsetType & offset = FloatOffsetType(0.0) ) override; /** Get the metric value. The metric value is the mean square difference * in intensity between the fixed image and transforming moving image @@ -176,8 +176,8 @@ class ITK_TEMPLATE_EXPORT FastSymmetricForcesDemonsRegistrationFunction: protected: FastSymmetricForcesDemonsRegistrationFunction(); - ~FastSymmetricForcesDemonsRegistrationFunction() {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~FastSymmetricForcesDemonsRegistrationFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** FixedImage image neighborhood iterator type. */ typedef ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType; diff --git a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx index 4a4b1eb8cd8..27bb2c9c2bf 100644 --- a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx @@ -43,8 +43,8 @@ FastSymmetricForcesDemonsRegistrationFunction< TFixedImage, TMovingImage, TDispl 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_Normalizer = 0.0; m_FixedImageGradientCalculator = GradientCalculatorType::New(); diff --git a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFilter.h b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFilter.h index 814be86f9cb..af66d21b792 100644 --- a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFilter.h +++ b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFilter.h @@ -180,20 +180,20 @@ class ITK_TEMPLATE_EXPORT LevelSetMotionRegistrationFilter: protected: LevelSetMotionRegistrationFilter(); - ~LevelSetMotionRegistrationFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LevelSetMotionRegistrationFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Initialize the state of filter and equation before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** Apply update. */ - virtual void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE; + void ApplyUpdate(const TimeStepType& dt) override; /** This method returns true when the current iterative solution of the * equation has met the criteria to stop solving. This version * calls the superclass' version but also Halts if the RMSChange is zero. */ - virtual bool Halt() ITK_OVERRIDE; + bool Halt() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetMotionRegistrationFilter); diff --git a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.h b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.h index 6d374feb4ce..1870e65a7d0 100644 --- a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.h +++ b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.h @@ -130,11 +130,11 @@ class ITK_TEMPLATE_EXPORT LevelSetMotionRegistrationFunction: /** Compute the time step that can taken for this iterations. In * this context, the timestep is a function of the maximum gradients. */ - virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const ITK_OVERRIDE; + TimeStepType ComputeGlobalTimeStep(void *GlobalData) const override; /** Return a pointer to a global data structure that is passed to * this object from the solver at each calculation. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { GlobalDataStruct *global = new GlobalDataStruct(); @@ -146,17 +146,17 @@ class ITK_TEMPLATE_EXPORT LevelSetMotionRegistrationFunction: } /** Release memory for global data structure. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE; + void ReleaseGlobalDataPointer(void *GlobalData) const override; /** Set the object's state before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** This method is called by a finite difference solver image filter at * each pixel that does not lie on a data set boundary */ - virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, + PixelType ComputeUpdate( const NeighborhoodType & neighborhood, void *globalData, const FloatOffsetType & offset = - FloatOffsetType(0.0) ) ITK_OVERRIDE; + FloatOffsetType(0.0) ) override; /** Get the metric value. The metric value is the mean square difference * in intensity between the fixed image and transforming moving image @@ -207,8 +207,8 @@ class ITK_TEMPLATE_EXPORT LevelSetMotionRegistrationFunction: protected: LevelSetMotionRegistrationFunction(); - ~LevelSetMotionRegistrationFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LevelSetMotionRegistrationFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** FixedImage image neighborhood iterator type. */ typedef ConstNeighborhoodIterator< FixedImageType > diff --git a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx index 3134ba2c68f..62e4634fbb4 100644 --- a/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx @@ -44,8 +44,8 @@ LevelSetMotionRegistrationFunction< TFixedImage, TMovingImage, TDisplacementFiel m_GradientMagnitudeThreshold = 1e-9; m_IntensityDifferenceThreshold = 0.001; m_GradientSmoothingStandardDeviations = 1.0; - this->SetMovingImage(ITK_NULLPTR); - this->SetFixedImage(ITK_NULLPTR); + this->SetMovingImage(nullptr); + this->SetFixedImage(nullptr); typename DefaultInterpolatorType::Pointer interp = DefaultInterpolatorType::New(); diff --git a/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.h b/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.h index b406d20e047..c3bbefdcea6 100644 --- a/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.h +++ b/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.h @@ -174,7 +174,7 @@ class ITK_TEMPLATE_EXPORT MultiResolutionPDEDeformableRegistration: * MultiResolutionPDEDeformableRegistration can take a third input * as an initial deformation field, this input is not a required input. */ - virtual std::vector< SmartPointer< DataObject > >::size_type GetNumberOfValidRequiredInputs() const ITK_OVERRIDE; + std::vector< SmartPointer< DataObject > >::size_type GetNumberOfValidRequiredInputs() const override; /** Get/Set the internal registrator. */ itkSetObjectMacro(RegistrationFilter, RegistrationType); @@ -215,16 +215,16 @@ class ITK_TEMPLATE_EXPORT MultiResolutionPDEDeformableRegistration: MultiResolutionPDEDeformableRegistration(); // ~MultiResolutionPDEDeformableRegistration() {} default implementation ok - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate output data by performing the registration * at each resolution level. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** The current implementation of this class does not support * streaming. As such it requires the largest possible region * for the moving, fixed and input deformation field. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** By default, the output deformation field has the same * spacing, origin and LargestPossibleRegion as the input/initial @@ -232,12 +232,12 @@ class ITK_TEMPLATE_EXPORT MultiResolutionPDEDeformableRegistration: * * If the initial deformation field is not set, the output * information is copied from the fixed image. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** The current implementation of this class does not supprot * streaming. As such it produces the output for the largest * possible region. */ - virtual void EnlargeOutputRequestedRegion(DataObject *ptr) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *ptr) override; /** This method returns true to indicate that the registration should * terminate at the current resolution level. */ @@ -248,7 +248,7 @@ class ITK_TEMPLATE_EXPORT MultiResolutionPDEDeformableRegistration: * * \sa ProcessObject::VerifyInputInformation */ - virtual void VerifyInputInformation() ITK_OVERRIDE {} + void VerifyInputInformation() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(MultiResolutionPDEDeformableRegistration); diff --git a/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx b/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx index fabf6427c73..008b897955c 100644 --- a/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx +++ b/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx @@ -44,7 +44,7 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme m_MovingImagePyramid = MovingImagePyramidType::New(); m_FixedImagePyramid = FixedImagePyramidType::New(); m_FieldExpander = FieldExpanderType::New(); - m_InitialDisplacementField = ITK_NULLPTR; + m_InitialDisplacementField = nullptr; m_NumberOfLevels = 3; m_NumberOfIterations.SetSize(m_NumberOfLevels); @@ -212,7 +212,7 @@ void MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplacementField, TRealType > ::GenerateData() { - // Check for ITK_NULLPTR images and pointers + // Check for nullptr images and pointers MovingImageConstPointer movingImage = this->GetMovingImage(); FixedImageConstPointer fixedImage = this->GetFixedImage(); @@ -262,7 +262,7 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme unsigned int fixedLevel = std::min( (int)m_CurrentLevel, (int)m_FixedImagePyramid->GetNumberOfLevels() ); - DisplacementFieldPointer tempField = ITK_NULLPTR; + DisplacementFieldPointer tempField = nullptr; DisplacementFieldPointer inputPtr = const_cast< DisplacementFieldType * >( this->GetInput(0) ); @@ -318,7 +318,7 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme m_FieldExpander->SetOutputDirection( fi->GetDirection() ); m_FieldExpander->UpdateLargestPossibleRegion(); - m_FieldExpander->SetInput(ITK_NULLPTR); + m_FieldExpander->SetInput(nullptr); tempField = m_FieldExpander->GetOutput(); tempField->DisconnectPipeline(); } @@ -329,7 +329,7 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme { if ( tempField.IsNull() ) { - m_RegistrationFilter->SetInitialDisplacementField(ITK_NULLPTR); + m_RegistrationFilter->SetInitialDisplacementField(nullptr); } else { @@ -348,7 +348,7 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme m_FieldExpander->SetOutputDirection( fi->GetDirection() ); m_FieldExpander->UpdateLargestPossibleRegion(); - m_FieldExpander->SetInput(ITK_NULLPTR); + m_FieldExpander->SetInput(nullptr); tempField = m_FieldExpander->GetOutput(); tempField->DisconnectPipeline(); @@ -427,9 +427,9 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme } // Release memory - m_FieldExpander->SetInput(ITK_NULLPTR); + m_FieldExpander->SetInput(nullptr); m_FieldExpander->GetOutput()->ReleaseData(); - m_RegistrationFilter->SetInput(ITK_NULLPTR); + m_RegistrationFilter->SetInput(nullptr); m_RegistrationFilter->GetOutput()->ReleaseData(); } diff --git a/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.h b/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.h index 5ea17f363bc..c1023424ae5 100644 --- a/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.h +++ b/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.h @@ -143,7 +143,7 @@ class ITK_TEMPLATE_EXPORT PDEDeformableRegistrationFilter: * set. While PDEDeformableRegistration can take a third input as an * initial displacement field, this input is not a required input. */ - virtual std::vector< SmartPointer< DataObject > >::size_type GetNumberOfValidRequiredInputs() const ITK_OVERRIDE; + std::vector< SmartPointer< DataObject > >::size_type GetNumberOfValidRequiredInputs() const override; /** Set/Get whether the displacement field is smoothed * (regularized). Smoothing the displacement yields a solution @@ -200,12 +200,12 @@ class ITK_TEMPLATE_EXPORT PDEDeformableRegistrationFilter: protected: PDEDeformableRegistrationFilter(); - ~PDEDeformableRegistrationFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~PDEDeformableRegistrationFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Supplies the halting criteria for this class of filters. The * algorithm will stop after a user-specified number of iterations. */ - virtual bool Halt() ITK_OVERRIDE + bool Halt() override { if ( m_StopRegistrationFlag ) { @@ -217,11 +217,11 @@ class ITK_TEMPLATE_EXPORT PDEDeformableRegistrationFilter: /** A simple method to copy the data from the input to the output. * If the input does not exist, a zero field is written to the output. */ - virtual void CopyInputToOutput() ITK_OVERRIDE; + void CopyInputToOutput() override; /** Initialize the state of filter and equation before each iteration. * Progress feeback is implemented as part of this method. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** Utility to smooth the displacement field (represented in the Output) * using a Gaussian operator. The amount of smoothing can be specified @@ -235,16 +235,16 @@ class ITK_TEMPLATE_EXPORT PDEDeformableRegistrationFilter: /** This method is called after the solution has been generated. In this case, * the filter release the memory of the internal buffers. */ - virtual void PostProcessOutput() ITK_OVERRIDE; + void PostProcessOutput() override; /** This method is called before iterating the solution. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** By default the output displacement field has the same Spacing, Origin * and LargestPossibleRegion as the input/initial displacement field. If * the initial displacement field is not set, the output information is * copied from the fixed image. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** It is difficult to compute in advance the input moving image region * required to compute the requested output region. Thus the safest @@ -252,7 +252,7 @@ class ITK_TEMPLATE_EXPORT PDEDeformableRegistrationFilter: * * For the fixed image and displacement field, the input requested region * set to be the same as that of the output requested region. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PDEDeformableRegistrationFilter); diff --git a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFilter.h b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFilter.h index b7b50453a7f..3d19b74cc96 100644 --- a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFilter.h +++ b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFilter.h @@ -116,7 +116,7 @@ class ITK_TEMPLATE_EXPORT SymmetricForcesDemonsRegistrationFilter: * This value is calculated for the current iteration */ virtual double GetMetric() const; - virtual const double & GetRMSChange() const ITK_OVERRIDE; + const double & GetRMSChange() const override; /** Set/Get the threshold below which the absolute difference of * intensity yields a match. When the intensities match between a @@ -128,14 +128,14 @@ class ITK_TEMPLATE_EXPORT SymmetricForcesDemonsRegistrationFilter: protected: SymmetricForcesDemonsRegistrationFilter(); - ~SymmetricForcesDemonsRegistrationFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SymmetricForcesDemonsRegistrationFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Initialize the state of filter and equation before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** Apply update. */ - virtual void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE; + void ApplyUpdate(const TimeStepType& dt) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SymmetricForcesDemonsRegistrationFilter); diff --git a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.h b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.h index c649df8c8b1..7ca70802b34 100644 --- a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.h +++ b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.h @@ -127,12 +127,12 @@ class ITK_TEMPLATE_EXPORT SymmetricForcesDemonsRegistrationFunction: { return m_MovingImageInterpolator; } /** This class uses a constant timestep of 1. */ - virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE + TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const override { return m_TimeStep; } /** Return a pointer to a global data structure that is passed to * this object from the solver at each calculation. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { GlobalDataStruct *global = new GlobalDataStruct(); @@ -143,16 +143,16 @@ class ITK_TEMPLATE_EXPORT SymmetricForcesDemonsRegistrationFunction: } /** Release memory for global data structure. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE; + void ReleaseGlobalDataPointer(void *GlobalData) const override; /** Set the object's state before each iteration. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** This method is called by a finite difference solver image filter at * each pixel that does not lie on a data set boundary */ - virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, + PixelType ComputeUpdate( const NeighborhoodType & neighborhood, void *globalData, - const FloatOffsetType & offset = FloatOffsetType(0.0) ) ITK_OVERRIDE; + const FloatOffsetType & offset = FloatOffsetType(0.0) ) override; /** Get the metric value. The metric value is the mean square difference * in intensity between the fixed image and transforming moving image @@ -174,8 +174,8 @@ class ITK_TEMPLATE_EXPORT SymmetricForcesDemonsRegistrationFunction: protected: SymmetricForcesDemonsRegistrationFunction(); - ~SymmetricForcesDemonsRegistrationFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SymmetricForcesDemonsRegistrationFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** FixedImage image neighborhood iterator type. */ typedef ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType; diff --git a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx index c1c3d938392..edef5b20bb9 100644 --- a/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx +++ b/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx @@ -39,8 +39,8 @@ SymmetricForcesDemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacem m_TimeStep = 1.0; m_DenominatorThreshold = 1e-9; m_IntensityDifferenceThreshold = 0.001; - this->SetMovingImage(ITK_NULLPTR); - this->SetFixedImage(ITK_NULLPTR); + this->SetMovingImage(nullptr); + this->SetFixedImage(nullptr); m_FixedImageSpacing.Fill(1.0); m_Normalizer = 0.0; m_FixedImageGradientCalculator = GradientCalculatorType::New(); diff --git a/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx index c45f3d17755..2ae36dbda80 100644 --- a/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkCurvatureRegistrationFilterTest.cxx @@ -265,7 +265,7 @@ int itkCurvatureRegistrationFilterTest(int, char* [] ) bool passed = true; try { - registrator->SetInput( ITK_NULLPTR ); + registrator->SetInput( nullptr ); registrator->SetNumberOfIterations( 2 ); registrator->Update(); } @@ -285,12 +285,12 @@ int itkCurvatureRegistrationFilterTest(int, char* [] ) //-------------------------------------------------------------- std::cout << "Test exception handling." << std::endl; - std::cout << "Test ITK_NULLPTR moving image. " << std::endl; + std::cout << "Test nullptr moving image. " << std::endl; passed = false; try { registrator->SetInput( initField ); - registrator->SetMovingImage( ITK_NULLPTR ); + registrator->SetMovingImage( nullptr ); registrator->Update(); } catch( itk::ExceptionObject & err ) @@ -308,13 +308,13 @@ int itkCurvatureRegistrationFilterTest(int, char* [] ) registrator->SetMovingImage( moving ); registrator->ResetPipeline(); - std::cout << "Test ITK_NULLPTR moving image interpolator. " << std::endl; + std::cout << "Test nullptr moving image interpolator. " << std::endl; passed = false; try { fptr = dynamic_cast( registrator->GetDifferenceFunction().GetPointer() ); - fptr->SetMovingImageInterpolator( ITK_NULLPTR ); + fptr->SetMovingImageInterpolator( nullptr ); registrator->SetInput( initField ); registrator->Update(); } diff --git a/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx index e493e9c8bce..45d24c66ca0 100644 --- a/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkDemonsRegistrationFilterTest.cxx @@ -188,7 +188,7 @@ int itkDemonsRegistrationFilterTest(int, char* [] ) typedef RegistrationType::DemonsRegistrationFunctionType FunctionType; FunctionType * fptr = dynamic_cast(registrator->GetDifferenceFunction().GetPointer() ); - if(fptr != ITK_NULLPTR) + if(fptr != nullptr) { fptr->Print( std::cout ); } @@ -273,7 +273,7 @@ int itkDemonsRegistrationFilterTest(int, char* [] ) bool passed = true; try { - registrator->SetInput( ITK_NULLPTR ); + registrator->SetInput( nullptr ); registrator->SetNumberOfIterations( 2 ); registrator->Update(); } @@ -293,12 +293,12 @@ int itkDemonsRegistrationFilterTest(int, char* [] ) //-------------------------------------------------------------- std::cout << "Test exception handling." << std::endl; - std::cout << "Test ITK_NULLPTR moving image. " << std::endl; + std::cout << "Test nullptr moving image. " << std::endl; passed = false; try { registrator->SetInput( caster->GetOutput() ); - registrator->SetMovingImage( ITK_NULLPTR ); + registrator->SetMovingImage( nullptr ); registrator->Update(); } catch( itk::ExceptionObject & err ) @@ -316,17 +316,17 @@ int itkDemonsRegistrationFilterTest(int, char* [] ) registrator->SetMovingImage( moving ); registrator->ResetPipeline(); - std::cout << "Test ITK_NULLPTR moving image interpolator. " << std::endl; + std::cout << "Test nullptr moving image interpolator. " << std::endl; passed = false; try { fptr = dynamic_cast(registrator->GetDifferenceFunction().GetPointer() ); - if(fptr == ITK_NULLPTR) + if(fptr == nullptr) { std::cerr << "dynamic_cast failed" << std::endl; return EXIT_FAILURE; } - fptr->SetMovingImageInterpolator( ITK_NULLPTR ); + fptr->SetMovingImageInterpolator( nullptr ); registrator->SetInput( initField ); registrator->Update(); } diff --git a/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx index 7789b2d7e9f..ab96b9f50da 100644 --- a/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkDiffeomorphicDemonsRegistrationFilterTest.cxx @@ -354,7 +354,7 @@ int itkDiffeomorphicDemonsRegistrationFilterTest(int argc, char * argv [] ) bool passed = true; try { - registrator->SetInput( ITK_NULLPTR ); + registrator->SetInput( nullptr ); registrator->SetNumberOfIterations( 2 ); registrator->Update(); } @@ -374,12 +374,12 @@ int itkDiffeomorphicDemonsRegistrationFilterTest(int argc, char * argv [] ) //-------------------------------------------------------------- std::cout << "Test exception handling." << std::endl; - std::cout << "Test ITK_NULLPTR moving image. " << std::endl; + std::cout << "Test nullptr moving image. " << std::endl; passed = false; try { registrator->SetInput( caster->GetOutput() ); - registrator->SetMovingImage( ITK_NULLPTR ); + registrator->SetMovingImage( nullptr ); registrator->Update(); } catch( itk::ExceptionObject & err ) @@ -397,13 +397,13 @@ int itkDiffeomorphicDemonsRegistrationFilterTest(int argc, char * argv [] ) registrator->SetMovingImage( moving ); registrator->ResetPipeline(); - std::cout << "Test ITK_NULLPTR moving image interpolator. " << std::endl; + std::cout << "Test nullptr moving image interpolator. " << std::endl; passed = false; try { fptr = dynamic_cast( registrator->GetDifferenceFunction().GetPointer() ); - fptr->SetMovingImageInterpolator( ITK_NULLPTR ); + fptr->SetMovingImageInterpolator( nullptr ); registrator->SetInput( initField ); registrator->Update(); } diff --git a/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx index 30f9df6366c..7904d09c8d0 100644 --- a/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkFastSymmetricForcesDemonsRegistrationFilterTest.cxx @@ -267,7 +267,7 @@ int itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char* [] ) bool passed = true; try { - registrator->SetInput( ITK_NULLPTR ); + registrator->SetInput( nullptr ); registrator->SetNumberOfIterations( 2 ); registrator->Update(); } @@ -287,12 +287,12 @@ int itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char* [] ) //-------------------------------------------------------------- std::cout << "Test exception handling." << std::endl; - std::cout << "Test ITK_NULLPTR moving image. " << std::endl; + std::cout << "Test nullptr moving image. " << std::endl; passed = false; try { registrator->SetInput( caster->GetOutput() ); - registrator->SetMovingImage( ITK_NULLPTR ); + registrator->SetMovingImage( nullptr ); registrator->Update(); } catch( itk::ExceptionObject & err ) @@ -310,13 +310,13 @@ int itkFastSymmetricForcesDemonsRegistrationFilterTest(int, char* [] ) registrator->SetMovingImage( moving ); registrator->ResetPipeline(); - std::cout << "Test ITK_NULLPTR moving image interpolator. " << std::endl; + std::cout << "Test nullptr moving image interpolator. " << std::endl; passed = false; try { fptr = dynamic_cast( registrator->GetDifferenceFunction().GetPointer() ); - fptr->SetMovingImageInterpolator( ITK_NULLPTR ); + fptr->SetMovingImageInterpolator( nullptr ); registrator->SetInput( initField ); registrator->Update(); } diff --git a/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx index 616ea136ef6..f13b0af24ed 100644 --- a/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkLevelSetMotionRegistrationFilterTest.cxx @@ -210,7 +210,7 @@ int itkLevelSetMotionRegistrationFilterTest(int argc, char * argv [] ) FunctionType * fptr = dynamic_cast( registrator->GetDifferenceFunction().GetPointer() ); - if(fptr != ITK_NULLPTR) + if(fptr != nullptr) { fptr->Print( std::cout ); } @@ -324,7 +324,7 @@ int itkLevelSetMotionRegistrationFilterTest(int argc, char * argv [] ) bool passed = true; try { - registrator->SetInput( ITK_NULLPTR ); + registrator->SetInput( nullptr ); registrator->SetNumberOfIterations( 2 ); registrator->Update(); } @@ -344,12 +344,12 @@ int itkLevelSetMotionRegistrationFilterTest(int argc, char * argv [] ) //-------------------------------------------------------------- std::cout << "Test exception handling." << std::endl; - std::cout << "Test ITK_NULLPTR moving image. " << std::endl; + std::cout << "Test nullptr moving image. " << std::endl; passed = false; try { registrator->SetInput( caster->GetOutput() ); - registrator->SetMovingImage( ITK_NULLPTR ); + registrator->SetMovingImage( nullptr ); registrator->Update(); } catch( itk::ExceptionObject & err ) @@ -367,17 +367,17 @@ int itkLevelSetMotionRegistrationFilterTest(int argc, char * argv [] ) registrator->SetMovingImage( moving ); registrator->ResetPipeline(); - std::cout << "Test ITK_NULLPTR moving image interpolator. " << std::endl; + std::cout << "Test nullptr moving image interpolator. " << std::endl; passed = false; try { fptr = dynamic_cast(registrator->GetDifferenceFunction().GetPointer() ); - if(fptr == ITK_NULLPTR) + if(fptr == nullptr) { std::cout << "Test failed - too many pixels different." << std::endl; return EXIT_FAILURE; } - fptr->SetMovingImageInterpolator( ITK_NULLPTR ); + fptr->SetMovingImageInterpolator( nullptr ); registrator->SetInput( initField ); registrator->Update(); } diff --git a/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx b/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx index d5ba6d62117..ac47c40bf42 100644 --- a/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkMultiResolutionPDEDeformableRegistrationTest.cxx @@ -366,8 +366,8 @@ int itkMultiResolutionPDEDeformableRegistrationTest(int argc, char* argv[] ) try { passed = false; - std::cout << "Set RegistrationFilter to ITK_NULLPTR" << std::endl; - registrator->SetRegistrationFilter( ITK_NULLPTR ); + std::cout << "Set RegistrationFilter to nullptr" << std::endl; + registrator->SetRegistrationFilter( nullptr ); registrator->Update(); } catch( itk::ExceptionObject& err ) @@ -389,8 +389,8 @@ int itkMultiResolutionPDEDeformableRegistrationTest(int argc, char* argv[] ) try { passed = false; - std::cout << "Set FixedImagePyramid to ITK_NULLPTR" << std::endl; - registrator->SetFixedImagePyramid( ITK_NULLPTR ); + std::cout << "Set FixedImagePyramid to nullptr" << std::endl; + registrator->SetFixedImagePyramid( nullptr ); registrator->Update(); } catch( itk::ExceptionObject& err ) @@ -413,8 +413,8 @@ int itkMultiResolutionPDEDeformableRegistrationTest(int argc, char* argv[] ) try { passed = false; - std::cout << "Set MovingImagePyramid to ITK_NULLPTR" << std::endl; - registrator->SetMovingImagePyramid( ITK_NULLPTR ); + std::cout << "Set MovingImagePyramid to nullptr" << std::endl; + registrator->SetMovingImagePyramid( nullptr ); registrator->Update(); } catch( itk::ExceptionObject& err ) @@ -435,8 +435,8 @@ int itkMultiResolutionPDEDeformableRegistrationTest(int argc, char* argv[] ) try { passed = false; - std::cout << "Set FixedImage to ITK_NULLPTR" << std::endl; - registrator->SetFixedImage( ITK_NULLPTR ); + std::cout << "Set FixedImage to nullptr" << std::endl; + registrator->SetFixedImage( nullptr ); registrator->Update(); } catch( itk::ExceptionObject& err ) diff --git a/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx b/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx index 1599149c2f6..6a9c40a31a4 100644 --- a/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx +++ b/Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx @@ -170,7 +170,7 @@ int itkSymmetricForcesDemonsRegistrationFilterTest(int, char* [] ) typedef RegistrationType::DemonsRegistrationFunctionType FunctionType; FunctionType * fptr = dynamic_cast(registrator->GetDifferenceFunction().GetPointer() ); - if(fptr != ITK_NULLPTR) + if(fptr != nullptr) { fptr->Print( std::cout ); } @@ -248,7 +248,7 @@ int itkSymmetricForcesDemonsRegistrationFilterTest(int, char* [] ) bool passed = true; try { - registrator->SetInput( ITK_NULLPTR ); + registrator->SetInput( nullptr ); registrator->SetNumberOfIterations( 2 ); registrator->Update(); } @@ -268,12 +268,12 @@ int itkSymmetricForcesDemonsRegistrationFilterTest(int, char* [] ) //-------------------------------------------------------------- std::cout << "Test exception handling." << std::endl; - std::cout << "Test ITK_NULLPTR moving image. " << std::endl; + std::cout << "Test nullptr moving image. " << std::endl; passed = false; try { registrator->SetInput( initField ); - registrator->SetMovingImage( ITK_NULLPTR ); + registrator->SetMovingImage( nullptr ); registrator->Update(); } catch( itk::ExceptionObject & err ) @@ -291,18 +291,18 @@ int itkSymmetricForcesDemonsRegistrationFilterTest(int, char* [] ) registrator->SetMovingImage( moving ); registrator->ResetPipeline(); - std::cout << "Test ITK_NULLPTR moving image interpolator. " << std::endl; + std::cout << "Test nullptr moving image interpolator. " << std::endl; passed = false; try { fptr = dynamic_cast(registrator->GetDifferenceFunction().GetPointer() ); - if(fptr == ITK_NULLPTR) + if(fptr == nullptr) { std::cerr << "dynamic_cast of registrator difference function failed"; return EXIT_FAILURE; } - fptr->SetMovingImageInterpolator( ITK_NULLPTR ); + fptr->SetMovingImageInterpolator( nullptr ); registrator->SetInput( initField ); registrator->Update(); } diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h b/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h index ce3f78d517f..5ac1d5ff7aa 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h @@ -127,17 +127,17 @@ class ITK_TEMPLATE_EXPORT BSplineSyNImageRegistrationMethod protected: BSplineSyNImageRegistrationMethod(); - virtual ~BSplineSyNImageRegistrationMethod() ITK_OVERRIDE; + ~BSplineSyNImageRegistrationMethod() override; /** Handle optimization internally */ - virtual void StartOptimization() ITK_OVERRIDE; + void StartOptimization() override; - virtual void InitializeRegistrationAtEachLevel( const SizeValueType ) ITK_OVERRIDE; + void InitializeRegistrationAtEachLevel( const SizeValueType ) override; - virtual DisplacementFieldPointer ComputeUpdateField( const FixedImagesContainerType, const PointSetsContainerType, + DisplacementFieldPointer ComputeUpdateField( const FixedImagesContainerType, const PointSetsContainerType, const TransformBaseType *, const MovingImagesContainerType, const PointSetsContainerType, const TransformBaseType *, const FixedImageMasksContainerType, const MovingImageMasksContainerType, - MeasureType & ) ITK_OVERRIDE; + MeasureType & ) override; virtual DisplacementFieldPointer BSplineSmoothDisplacementField( const DisplacementFieldType *, const ArrayType &, const WeightedMaskImageType *, const BSplinePointSetType * ); diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx b/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx index fbb310603b6..630e5da3a3b 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx +++ b/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx @@ -98,7 +98,7 @@ BSplineSyNImageRegistrationMethodm_CurrentIteration++ < this->m_NumberOfIterationsPerLevel[this->m_CurrentLevel] && !this->m_IsConverged ) { typename CompositeTransformType::Pointer fixedComposite = CompositeTransformType::New(); - if( fixedInitialTransform != ITK_NULLPTR ) + if( fixedInitialTransform != nullptr ) { fixedComposite->AddTransform( fixedInitialTransform ); } @@ -148,7 +148,7 @@ BSplineSyNImageRegistrationMethodUpdate(); DisplacementFieldPointer fixedToMiddleSmoothTotalFieldTmp = this->BSplineSmoothDisplacementField( fixedComposer->GetOutput(), - this->m_FixedToMiddleTransform->GetNumberOfControlPointsForTheTotalField(), ITK_NULLPTR, ITK_NULLPTR ); + this->m_FixedToMiddleTransform->GetNumberOfControlPointsForTheTotalField(), nullptr, nullptr ); typename ComposerType::Pointer movingComposer = ComposerType::New(); movingComposer->SetDisplacementField( movingToMiddleSmoothUpdateField ); @@ -156,7 +156,7 @@ BSplineSyNImageRegistrationMethodUpdate(); DisplacementFieldPointer movingToMiddleSmoothTotalFieldTmp = this->BSplineSmoothDisplacementField( movingComposer->GetOutput(), - this->m_MovingToMiddleTransform->GetNumberOfControlPointsForTheTotalField(), ITK_NULLPTR, ITK_NULLPTR ); + this->m_MovingToMiddleTransform->GetNumberOfControlPointsForTheTotalField(), nullptr, nullptr ); // Iteratively estimate the inverse fields. @@ -194,10 +194,10 @@ BSplineSyNImageRegistrationMethodDisconnectPipeline(); } updateField = this->BSplineSmoothDisplacementField( metricGradientField, - this->m_FixedToMiddleTransform->GetNumberOfControlPointsForTheUpdateField(), weightedMask, ITK_NULLPTR ); + this->m_FixedToMiddleTransform->GetNumberOfControlPointsForTheUpdateField(), weightedMask, nullptr ); } DisplacementFieldPointer scaledUpdateField = this->ScaleUpdateField( updateField ); diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h index 53f8fc140d0..40ff26f49a4 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h @@ -380,7 +380,7 @@ class ITK_TEMPLATE_EXPORT ImageRegistrationMethodv4 /** Make a DataObject of the correct type to be used as the specified output. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType ) ITK_OVERRIDE; + DataObjectPointer MakeOutput( DataObjectPointerArraySizeType ) override; /** Returns the transform resulting from the registration process */ virtual DecoratedOutputTransformType * GetOutput(); @@ -439,11 +439,11 @@ class ITK_TEMPLATE_EXPORT ImageRegistrationMethodv4 protected: ImageRegistrationMethodv4(); - virtual ~ImageRegistrationMethodv4() ITK_OVERRIDE; - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + ~ImageRegistrationMethodv4() override; + void PrintSelf( std::ostream & os, Indent indent ) const override; /** Perform the registration. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; virtual void AllocateOutputs(); diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx index 3c2d6cfe149..432319bb3e4 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx +++ b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx @@ -48,11 +48,11 @@ ImageRegistrationMethodv4m_VirtualDomainImage = ITK_NULLPTR; + this->m_VirtualDomainImage = nullptr; Self::ReleaseDataBeforeUpdateFlagOff(); @@ -318,7 +318,7 @@ ImageRegistrationMethodv4m_NumberOfMetrics = 1; } - // The number of image pairs also includes ITK_NULLPTR image pairs for the point set + // The number of image pairs also includes nullptr image pairs for the point set // metrics if( this->m_NumberOfFixedObjects != this->m_NumberOfMovingObjects ) { @@ -371,7 +371,7 @@ ImageRegistrationMethodv4GetNameOfClass() ) != std::string( "IdentityTransform" ) ) { this->m_CompositeTransform->AddTransform( movingInitialTransform ); @@ -430,8 +430,8 @@ ImageRegistrationMethodv4m_NumberOfMetrics; n++ ) { - this->m_FixedImageMasks[n] = ITK_NULLPTR; - this->m_MovingImageMasks[n] = ITK_NULLPTR; + this->m_FixedImageMasks[n] = nullptr; + this->m_MovingImageMasks[n] = nullptr; if( this->m_Metric->GetMetricCategory() == MetricType::IMAGE_METRIC || ( this->m_Metric->GetMetricCategory() == MetricType::MULTI_METRIC && @@ -461,7 +461,7 @@ ImageRegistrationMethodv4m_VirtualDomainImage.IsNotNull() ) { typename ShrinkFilterType::Pointer shrinkFilter = ShrinkFilterType::New(); @@ -593,10 +593,10 @@ ImageRegistrationMethodv4m_NumberOfMetrics; n++ ) { - this->m_FixedSmoothImages[n] = ITK_NULLPTR; - this->m_MovingSmoothImages[n] = ITK_NULLPTR; - this->m_FixedPointSets[n] = ITK_NULLPTR; - this->m_MovingPointSets[n] = ITK_NULLPTR; + this->m_FixedSmoothImages[n] = nullptr; + this->m_MovingSmoothImages[n] = nullptr; + this->m_FixedPointSets[n] = nullptr; + this->m_MovingPointSets[n] = nullptr; if( this->m_Metric->GetMetricCategory() == MetricType::IMAGE_METRIC || ( this->m_Metric->GetMetricCategory() == MetricType::MULTI_METRIC && @@ -855,7 +855,7 @@ ImageRegistrationMethodv4m_TransformParametersAdaptorsPerLevel.clear(); for( SizeValueType level = 0; level < this->m_NumberOfLevels; level++ ) { - this->m_TransformParametersAdaptorsPerLevel.push_back( ITK_NULLPTR ); + this->m_TransformParametersAdaptorsPerLevel.push_back( nullptr ); } for( SizeValueType level = 0; level < this->m_NumberOfLevels; ++level ) @@ -886,8 +886,8 @@ ImageRegistrationMethodv4m_Metric->GetMetricCategory() == MetricType::IMAGE_METRIC ) { currentLevelVirtualDomainImage = dynamic_cast( this->m_Metric.GetPointer() )->GetVirtualImage(); @@ -1191,7 +1191,7 @@ ImageRegistrationMethodv4GetOutput(); // required outputs of process object should always exits - itkAssertInDebugAndIgnoreInReleaseMacro( temp != ITK_NULLPTR ); + itkAssertInDebugAndIgnoreInReleaseMacro( temp != nullptr ); return temp->GetModifiable(); } @@ -1202,7 +1202,7 @@ ImageRegistrationMethodv4GetOutput(); // required outputs of process object should always exits - itkAssertInDebugAndIgnoreInReleaseMacro( temp != ITK_NULLPTR ); + itkAssertInDebugAndIgnoreInReleaseMacro( temp != nullptr ); return temp->Get(); } @@ -1223,7 +1223,7 @@ ImageRegistrationMethodv4m_NumberOfIterationsPerLevel[2] = 40; this->m_DownsampleImagesForMetricDerivatives = true; this->m_AverageMidPointGradients = false; - this->m_FixedToMiddleTransform = ITK_NULLPTR; - this->m_MovingToMiddleTransform = ITK_NULLPTR; + this->m_FixedToMiddleTransform = nullptr; + this->m_MovingToMiddleTransform = nullptr; } template @@ -165,7 +165,7 @@ SyNImageRegistrationMethodm_CurrentIteration++ < this->m_NumberOfIterationsPerLevel[this->m_CurrentLevel] && !this->m_IsConverged ) { typename CompositeTransformType::Pointer fixedComposite = CompositeTransformType::New(); - if ( fixedInitialTransform != ITK_NULLPTR ) + if ( fixedInitialTransform != nullptr ) { fixedComposite->AddTransform( fixedInitialTransform ); } diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h index e3b9b396cad..0ce48fb3122 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h @@ -202,11 +202,11 @@ class ITK_TEMPLATE_EXPORT TimeVaryingBSplineVelocityFieldImageRegistrationMethod protected: TimeVaryingBSplineVelocityFieldImageRegistrationMethod(); - virtual ~TimeVaryingBSplineVelocityFieldImageRegistrationMethod() ITK_OVERRIDE; - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + ~TimeVaryingBSplineVelocityFieldImageRegistrationMethod() override; + void PrintSelf( std::ostream & os, Indent indent ) const override; /** Perform the registration. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Handle optimization internally */ virtual void StartOptimization(); diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx index ec50c3bde42..3d5322914d5 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx +++ b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx @@ -95,7 +95,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethodGetCurrentLevelVirtualDomainImage(); - typename FixedImageMaskType::ConstPointer fixedImageMask = ITK_NULLPTR; + typename FixedImageMaskType::ConstPointer fixedImageMask = nullptr; if( virtualDomainImage.IsNull() ) { @@ -262,7 +262,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethodGetPhiLattice(); - TimeVaryingVelocityFieldPointer velocityField = ITK_NULLPTR; + TimeVaryingVelocityFieldPointer velocityField = nullptr; if( this->GetDebug() ) { velocityField = bspliner->GetOutput(); @@ -400,7 +400,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod( this->GetFixedInitialTransform() ); typename CompositeTransformType::Pointer fixedComposite = CompositeTransformType::New(); - if( fixedInitialTransform != ITK_NULLPTR ) + if( fixedInitialTransform != nullptr ) { fixedComposite->AddTransform( fixedInitialTransform ); } @@ -731,7 +731,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod FixedMaskResamplerType; diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h index bf02bd89289..3991976a2ba 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h @@ -155,11 +155,11 @@ class ITK_TEMPLATE_EXPORT TimeVaryingVelocityFieldImageRegistrationMethodv4 protected: TimeVaryingVelocityFieldImageRegistrationMethodv4(); - virtual ~TimeVaryingVelocityFieldImageRegistrationMethodv4() ITK_OVERRIDE; - virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE; + ~TimeVaryingVelocityFieldImageRegistrationMethodv4() override; + void PrintSelf( std::ostream & os, Indent indent ) const override; /** Perform the registration. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Multithreaded function which calculates the norm of the velocity field. */ void ThreadedGenerateData( const RegionType &, ThreadIdType ); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineExponentialImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineExponentialImageRegistrationTest.cxx index 29fad920325..b9ff93f7485 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineExponentialImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineExponentialImageRegistrationTest.cxx @@ -43,12 +43,12 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const TFilter * filter = static_cast< const TFilter * >( object ); if( typeid( event ) != typeid( itk::IterationEvent ) ) @@ -267,7 +267,7 @@ int PerformBSplineExpImageRegistration( int argc, char *argv[] ) #else optimizer->SetNumberOfIterations( 1 ); #endif - optimizer->SetScalesEstimator( ITK_NULLPTR ); + optimizer->SetScalesEstimator( nullptr ); optimizer->SetDoEstimateLearningRateOnce( false ); //true by default optimizer->SetDoEstimateLearningRateAtEachIteration( true ); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx index bd4d58f03fc..722f8194bef 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineImageRegistrationTest.cxx @@ -40,12 +40,12 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const TFilter * filter = dynamic_cast< const TFilter * >( object ); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx index c0d0d479991..3ff6c73485f 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkBSplineSyNImageRegistrationTest.cxx @@ -44,12 +44,12 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const TFilter * filter = dynamic_cast< const TFilter * >( object ); @@ -111,7 +111,7 @@ int PerformBSplineSyNImageRegistration( int itkNotUsed( argc ), char *argv[] ) // Set the number of iterations typedef itk::GradientDescentOptimizerv4 GradientDescentOptimizerv4Type; GradientDescentOptimizerv4Type * optimizer = dynamic_cast( affineSimple->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( optimizer != ITK_NULLPTR ); + TEST_EXPECT_TRUE( optimizer != nullptr ); #ifdef NDEBUG optimizer->SetNumberOfIterations( 100 ); #else diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx index 8e4420a83f1..a5d60c1a63a 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkExponentialImageRegistrationTest.cxx @@ -45,12 +45,12 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const TFilter * filter = static_cast< const TFilter * >( object ); if( typeid( event ) != typeid( itk::IterationEvent ) ) @@ -270,7 +270,7 @@ int PerformExpImageRegistration( int argc, char *argv[] ) #else optimizer->SetNumberOfIterations( 1 ); #endif - optimizer->SetScalesEstimator( ITK_NULLPTR ); + optimizer->SetScalesEstimator( nullptr ); optimizer->SetDoEstimateLearningRateOnce( false ); //true by default optimizer->SetDoEstimateLearningRateAtEachIteration( true ); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx index 55299bd8663..7cbde129024 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest.cxx @@ -42,14 +42,14 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { - if(object == ITK_NULLPTR) + if(object == nullptr) { itkExceptionMacro(<< "Command update on null object"); } @@ -61,7 +61,7 @@ class CommandIterationUpdate : public itk::Command std::cout << std::endl; const TFilter * filter = static_cast< const TFilter * >( object ); - if( typeid( event ) != typeid( itk::MultiResolutionIterationEvent ) || object == ITK_NULLPTR ) + if( typeid( event ) != typeid( itk::MultiResolutionIterationEvent ) || object == nullptr ) { return; } unsigned int currentLevel = filter->GetCurrentLevel(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx index 6e157c585b4..ae08ff9870e 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest2.cxx @@ -65,12 +65,12 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const TFilter * filter = dynamic_cast< const TFilter * >( object ); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx index 442614379ad..20702923991 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest3.cxx @@ -87,12 +87,12 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const TFilter * filter = dynamic_cast< const TFilter * >( object ); @@ -201,7 +201,7 @@ int PerformCompositeImageRegistration( int itkNotUsed( argc ), char *argv[] ) typedef itk::GradientDescentOptimizerv4 GradientDescentOptimizerv4Type; GradientDescentOptimizerv4Type * rigidOptimizer = dynamic_cast( rigidRegistration->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( rigidOptimizer != ITK_NULLPTR ); + TEST_EXPECT_TRUE( rigidOptimizer != nullptr ); rigidOptimizer->SetLearningRate( 0.1 ); #ifdef NDEBUG rigidOptimizer->SetNumberOfIterations( 100 ); @@ -255,7 +255,7 @@ int PerformCompositeImageRegistration( int itkNotUsed( argc ), char *argv[] ) typedef itk::GradientDescentOptimizerv4 GradientDescentOptimizerv4Type; GradientDescentOptimizerv4Type * affineOptimizer = dynamic_cast( affineRegistration->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( affineOptimizer != ITK_NULLPTR ); + TEST_EXPECT_TRUE( affineOptimizer != nullptr ); affineOptimizer->SetLearningRate( 0.1 ); #ifdef NDEBUG affineOptimizer->SetNumberOfIterations( 100 ); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx index 9b1e4ed9558..fda4d6f5426 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTest4.cxx @@ -48,12 +48,12 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const TOptimizer *optimizer = dynamic_cast< const TOptimizer * > (object); @@ -62,7 +62,7 @@ class CommandIterationUpdate : public itk::Command { return; } // stash the stream state - std::ios state(NULL); + std::ios state(nullptr); state.copyfmt(std::cout); std::cout << std::fixed << std::setfill(' ') << std::setprecision( 5 ); std::cout << std::setw(3) << optimizer->GetCurrentIteration(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx index 13d3d4bc940..9f27d55a508 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimpleImageRegistrationTestWithMaskAndSampling.cxx @@ -42,14 +42,14 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { - if(object == ITK_NULLPTR) + if(object == nullptr) { itkExceptionMacro(<< "Command update on null object"); } @@ -61,7 +61,7 @@ class CommandIterationUpdate : public itk::Command std::cout << std::endl; const TFilter * filter = static_cast< const TFilter * >( object ); - if( typeid( event ) != typeid( itk::MultiResolutionIterationEvent ) || object == ITK_NULLPTR ) + if( typeid( event ) != typeid( itk::MultiResolutionIterationEvent ) || object == nullptr ) { return; } unsigned int currentLevel = filter->GetCurrentLevel(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx index 6880e352d8d..6c00ff88c25 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSimplePointSetRegistrationTest.cxx @@ -36,14 +36,14 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { - if(object == ITK_NULLPTR) + if(object == nullptr) { itkExceptionMacro(<< "Command update on null object"); } @@ -55,7 +55,7 @@ class CommandIterationUpdate : public itk::Command std::cout << std::endl; const TFilter * filter = static_cast< const TFilter * >( object ); - if( typeid( event ) != typeid( itk::MultiResolutionIterationEvent ) || object == ITK_NULLPTR ) + if( typeid( event ) != typeid( itk::MultiResolutionIterationEvent ) || object == nullptr ) { return; } unsigned int currentLevel = filter->GetCurrentLevel(); diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx index 2d11bde5059..0357294f6fe 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkSyNImageRegistrationTest.cxx @@ -51,12 +51,12 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const TFilter * filter = dynamic_cast< const TFilter * >( object ); @@ -145,7 +145,7 @@ int PerformDisplacementFieldImageRegistration( int itkNotUsed( argc ), char *arg // Set the number of iterations typedef itk::GradientDescentOptimizerv4 GradientDescentOptimizerv4Type; GradientDescentOptimizerv4Type * optimizer = dynamic_cast( affineSimple->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( optimizer != ITK_NULLPTR ); + TEST_EXPECT_TRUE( optimizer != nullptr ); #ifdef NDEBUG optimizer->SetNumberOfIterations( 100 ); #else diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx index 080c9935ab5..b2929d9631a 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingBSplineVelocityFieldImageRegistrationTest.cxx @@ -43,12 +43,12 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const TFilter * filter = dynamic_cast< const TFilter * >( object ); @@ -138,7 +138,7 @@ int PerformTimeVaryingBSplineVelocityFieldImageRegistration( int argc, char *arg // Set the number of iterations typedef itk::GradientDescentOptimizerv4 GradientDescentOptimizerType; GradientDescentOptimizerType * optimizer = dynamic_cast( affineSimple->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( optimizer != ITK_NULLPTR ); + TEST_EXPECT_TRUE( optimizer != nullptr ); optimizer->SetNumberOfIterations( numberOfAffineIterations ); std::cout << "number of affine iterations: " << numberOfAffineIterations << std::endl; diff --git a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx index f096665f84f..e0f38bc98b2 100644 --- a/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx +++ b/Modules/Registration/RegistrationMethodsv4/test/itkTimeVaryingVelocityFieldImageRegistrationTest.cxx @@ -43,12 +43,12 @@ class CommandIterationUpdate : public itk::Command public: - virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE + void Execute(itk::Object *caller, const itk::EventObject & event) override { Execute( (const itk::Object *) caller, event); } - virtual void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE + void Execute(const itk::Object * object, const itk::EventObject & event) override { const TFilter * filter = dynamic_cast< const TFilter * >( object ); @@ -138,7 +138,7 @@ int PerformTimeVaryingVelocityFieldImageRegistration( int argc, char *argv[] ) // Set the number of iterations typedef itk::GradientDescentOptimizerv4 GradientDescentOptimizerv4Type; GradientDescentOptimizerv4Type * optimizer = dynamic_cast( affineSimple->GetModifiableOptimizer() ); - TEST_EXPECT_TRUE( optimizer != ITK_NULLPTR ); + TEST_EXPECT_TRUE( optimizer != nullptr ); optimizer->SetNumberOfIterations( numberOfAffineIterations ); std::cout << "number of affine iterations: " << numberOfAffineIterations << std::endl; diff --git a/Modules/Remote/AnalyzeObjectMapIO.remote.cmake b/Modules/Remote/AnalyzeObjectMapIO.remote.cmake index 181138d5b44..be9b4c8aaf0 100644 --- a/Modules/Remote/AnalyzeObjectMapIO.remote.cmake +++ b/Modules/Remote/AnalyzeObjectMapIO.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(AnalyzeObjectMapIO "AnalyzeObjectMapIO plugin for ITK. From Insight Journal article with handle: https://hdl.handle.net/1926/593" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/itkAnalyzeObjectMap.git - GIT_TAG aa582d9f7b98bad456201c16d3ba34e8e4f7f25b + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake b/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake index ebb228d345f..66d3dbdda70 100644 --- a/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake +++ b/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake @@ -20,5 +20,5 @@ itk_fetch_module(AnisotropicDiffusionLBR http://insight-journal.org/browse/publication/953 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR.git - GIT_TAG 50acf46da9fa1480eb502a0bb550c36d518893eb + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/BridgeNumPy.remote.cmake b/Modules/Remote/BridgeNumPy.remote.cmake index 222e5d5e461..8e8ac9024fa 100644 --- a/Modules/Remote/BridgeNumPy.remote.cmake +++ b/Modules/Remote/BridgeNumPy.remote.cmake @@ -21,5 +21,5 @@ itk_fetch_module(BridgeNumPy See http://insight-journal.org/browse/publication/85 https://hdl.handle.net/1926/188" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBridgeNumPy.git - GIT_TAG 5ffa0941ecf9c605583e32aede55a644b6b65df2 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/Cuberille.remote.cmake b/Modules/Remote/Cuberille.remote.cmake index 1eb8a332651..daa69f23c8d 100644 --- a/Modules/Remote/Cuberille.remote.cmake +++ b/Modules/Remote/Cuberille.remote.cmake @@ -17,5 +17,5 @@ A more detailed description can be found in the Insight Journal article: http://www.insight-journal.org/browse/publication/213 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKCuberille.git - GIT_TAG f664b26e1ba24d8ae64d88d86dce1f6898202d59 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/DVMeshNoise.remote.cmake b/Modules/Remote/DVMeshNoise.remote.cmake index bf94bc47196..7c0952914b2 100644 --- a/Modules/Remote/DVMeshNoise.remote.cmake +++ b/Modules/Remote/DVMeshNoise.remote.cmake @@ -6,4 +6,5 @@ itk_fetch_module(DVMeshNoise http://hdl.handle.net/10380/3567 " GIT_REPOSITORY ${git_protocol}://github.com/DVigneault/DVMeshNoise - GIT_TAG e7a360ec0aad87035d0b231741f63833c0ffe6f7) + GIT_TAG ITKv5 +) diff --git a/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake b/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake index 05d41b7cac8..3069130d943 100644 --- a/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake +++ b/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(FixedPointInverseDisplacementField "Computes the inverse of a displacement field." GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKFixedPointInverseDisplacementField.git - GIT_TAG 57eec80969458bb1ff9c0da79548f7965e15851f + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/GenericLabelInterpolator.remote.cmake b/Modules/Remote/GenericLabelInterpolator.remote.cmake index 0ca15ecac52..e9b69cd1d32 100644 --- a/Modules/Remote/GenericLabelInterpolator.remote.cmake +++ b/Modules/Remote/GenericLabelInterpolator.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(GenericLabelInterpolator "A generic interpolator for multi-label images." GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator.git - GIT_TAG 210c3e6eeece4875ac7d331460b3a4d2e4f6db60 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/HigherOrderAccurateGradient.remote.cmake b/Modules/Remote/HigherOrderAccurateGradient.remote.cmake index 77ace75469f..db8667a137c 100644 --- a/Modules/Remote/HigherOrderAccurateGradient.remote.cmake +++ b/Modules/Remote/HigherOrderAccurateGradient.remote.cmake @@ -7,5 +7,5 @@ itk_fetch_module(HigherOrderAccurateGradient http://www.insight-journal.org/browse/publication/775 https://hdl.handle.net/10380/3231" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKHigherOrderAccurateGradient.git - GIT_TAG 25e3ff135678fad2492db6aa5aa9fadc26d725e8 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/IOFDF.remote.cmake b/Modules/Remote/IOFDF.remote.cmake index f6fd0b9ca18..388a91f7ae2 100644 --- a/Modules/Remote/IOFDF.remote.cmake +++ b/Modules/Remote/IOFDF.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(IOFDF "FDFImageIO plugin for ITK. Authors Gleen Pierce/Nick Tustison/Kent Williams" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/itkFDFImageIO.git - GIT_TAG 9624e4315629541d309eec377d122f152a5d61a6 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/IOSTL.remote.cmake b/Modules/Remote/IOSTL.remote.cmake index d53e06f323d..f88b594eba8 100644 --- a/Modules/Remote/IOSTL.remote.cmake +++ b/Modules/Remote/IOSTL.remote.cmake @@ -3,5 +3,5 @@ itk_fetch_module(IOSTL "This module contains classes for reading and writing QuadEdgeMeshes using the STL (STereoLithography)file format. https://hdl.handle.net/10380/3452" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSTLMeshIO.git - GIT_TAG 6e01a0e741a3c80533bf1c773d01daafe1dc263e + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/IOTransformDCMTK.remote.cmake b/Modules/Remote/IOTransformDCMTK.remote.cmake index fb4f4a7fc67..131af933b9b 100644 --- a/Modules/Remote/IOTransformDCMTK.remote.cmake +++ b/Modules/Remote/IOTransformDCMTK.remote.cmake @@ -4,5 +4,5 @@ itk_fetch_module(IOTransformDCMTK files. See http://www.insight-journal.org/browse/publication/923 https://hdl.handle.net/10380/3468" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOTransformDCMTK.git - GIT_TAG f6372c4861e7a77ebeab33b3c5e7d29f6502aa58 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/IsotropicWavelets.remote.cmake b/Modules/Remote/IsotropicWavelets.remote.cmake index 9770b86ad97..b8d632c6340 100644 --- a/Modules/Remote/IsotropicWavelets.remote.cmake +++ b/Modules/Remote/IsotropicWavelets.remote.cmake @@ -8,4 +8,5 @@ Cerdan, P.H. \"Steerable Isotropic Wavelets for Multiscale and Phase Analysis\". November, 2016. " GIT_REPOSITORY ${git_protocol}://github.com/phcerdan/ITKIsotropicWavelets.git - GIT_TAG 3ca6f7b154611c128eb67af6d3b1fa76fea2ef02) + GIT_TAG ITKv5 +) diff --git a/Modules/Remote/LabelErodeDilate.remote.cmake b/Modules/Remote/LabelErodeDilate.remote.cmake index e123e36b9f3..954908cf2b2 100644 --- a/Modules/Remote/LabelErodeDilate.remote.cmake +++ b/Modules/Remote/LabelErodeDilate.remote.cmake @@ -7,5 +7,5 @@ itk_fetch_module(LabelErodeDilate http://www.insight-journal.org/browse/publication/228 https://hdl.handle.net/10380/3399" GIT_REPOSITORY ${git_protocol}://github.com/richardbeare/LabelErodeDilate.git - GIT_TAG efccdb0b6c8c3dab4d3e6782626ced48b4fc1042 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/LesionSizingToolkit.remote.cmake b/Modules/Remote/LesionSizingToolkit.remote.cmake index f675431e714..1e70e05f85e 100644 --- a/Modules/Remote/LesionSizingToolkit.remote.cmake +++ b/Modules/Remote/LesionSizingToolkit.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(LesionSizingToolkit "Framework for determining the sizes of lesions in medical images." GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/LesionSizingToolkit.git - GIT_TAG d2da44b029795d38b02d29a88c62487efb73e363 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/MGHIO.remote.cmake b/Modules/Remote/MGHIO.remote.cmake index 123f981ffd8..b084a3b5921 100644 --- a/Modules/Remote/MGHIO.remote.cmake +++ b/Modules/Remote/MGHIO.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(MGHIO "MGHIO ImageIO plugin for ITK" GIT_REPOSITORY ${git_protocol}://github.com/Slicer/itkMGHImageIO.git - GIT_TAG 382741bfc68e48d24dc34cbb8906825ed389e1af + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/MinimalPathExtraction.remote.cmake b/Modules/Remote/MinimalPathExtraction.remote.cmake index 21baef91279..4cc4db650bc 100644 --- a/Modules/Remote/MinimalPathExtraction.remote.cmake +++ b/Modules/Remote/MinimalPathExtraction.remote.cmake @@ -3,5 +3,5 @@ itk_fetch_module(MinimalPathExtraction "http://www.insight-journal.org/browse/publication/213 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMinimalPathExtraction.git - GIT_TAG 5a2017ef5d5c25db518ecae49408598f906dd307 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/MorphologicalContourInterpolation.remote.cmake b/Modules/Remote/MorphologicalContourInterpolation.remote.cmake index 41ffc5db709..67a1712eeae 100644 --- a/Modules/Remote/MorphologicalContourInterpolation.remote.cmake +++ b/Modules/Remote/MorphologicalContourInterpolation.remote.cmake @@ -14,5 +14,5 @@ IEEE Trans Biomed Eng. 2008 Aug;55(8):2022-38. doi: 10.1109/TBME.2008.921158. This work is supported by NIH grant R01 EB014346 'Continued development and maintenance of the ITK-SNAP 3D image segmentation software'." GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKMorphologicalContourInterpolation.git - GIT_TAG 608853faf597c38132eaff8586f1f9c5c31f70aa + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/MultipleImageIterator.remote.cmake b/Modules/Remote/MultipleImageIterator.remote.cmake index 8b9b428c8d6..e8787041508 100644 --- a/Modules/Remote/MultipleImageIterator.remote.cmake +++ b/Modules/Remote/MultipleImageIterator.remote.cmake @@ -13,5 +13,5 @@ Schaerer J. \"A MultipleImageIterator for iterating over multiple images simulta December, 2014. " GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/MultipleImageIterator.git - GIT_TAG 1105469ce1c2cc289008d9cb6bebde487a39ae3e + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/ParabolicMorphology.remote.cmake b/Modules/Remote/ParabolicMorphology.remote.cmake index 91c85186e3b..d9deb0d52a7 100644 --- a/Modules/Remote/ParabolicMorphology.remote.cmake +++ b/Modules/Remote/ParabolicMorphology.remote.cmake @@ -5,5 +5,5 @@ itk_fetch_module(ParabolicMorphology http://www.insight-journal.org/browse/publication/228 https://hdl.handle.net/1926/1370" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/parabolicMorphology.git - GIT_TAG 3c5fd312a642f7d26663e58d0c7132d50a14eff4 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/PerformanceBenchmarking.remote.cmake b/Modules/Remote/PerformanceBenchmarking.remote.cmake index 4861b812bbc..89adc6139d0 100644 --- a/Modules/Remote/PerformanceBenchmarking.remote.cmake +++ b/Modules/Remote/PerformanceBenchmarking.remote.cmake @@ -15,5 +15,5 @@ For more information, see:: http://insight-journal.org/browse/publication/972 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPerformanceBenchmarking.git - GIT_TAG e07106507f6b7fd4fe0707c2ee463f56f53e637d + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake b/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake index b9330c78dac..efb81b2a828 100644 --- a/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake +++ b/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake @@ -8,5 +8,5 @@ A more detailed description can be found in the Insight Journal article: August, 2013. " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPrincipalComponentsAnalysis.git - GIT_TAG 36120bcc4937f9a9e558280609088755ab180c1e + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/RLEImage.remote.cmake b/Modules/Remote/RLEImage.remote.cmake index 765cba8b16e..98a9a7959de 100644 --- a/Modules/Remote/RLEImage.remote.cmake +++ b/Modules/Remote/RLEImage.remote.cmake @@ -9,5 +9,5 @@ http://hdl.handle.net/10380/3562 This work is supported by NIH grant R01 EB014346 'Continued development and maintenance of the ITK-SNAP 3D image segmentation software'." GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKRLEImage.git - GIT_TAG c7401fa08823acfd69c7c477f9b7fd2224bcab22 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/SCIFIO.remote.cmake b/Modules/Remote/SCIFIO.remote.cmake index 92bb74cfacf..17b21aeaa0b 100644 --- a/Modules/Remote/SCIFIO.remote.cmake +++ b/Modules/Remote/SCIFIO.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(SCIFIO "SCIFIO (Bioformats) ImageIO plugin for ITK" GIT_REPOSITORY ${git_protocol}://github.com/scifio/scifio-imageio.git - GIT_TAG 853c9e8beb48d6b62f6cffa2bb010f59b7240fcc + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/SimpleITKFilters.remote.cmake b/Modules/Remote/SimpleITKFilters.remote.cmake index 68cf5658e99..4e93fdd5f2f 100644 --- a/Modules/Remote/SimpleITKFilters.remote.cmake +++ b/Modules/Remote/SimpleITKFilters.remote.cmake @@ -5,5 +5,5 @@ itk_fetch_module(SimpleITKFilters implementations designed for SimpleITK's requirements. Currently it contains a discrete hessian, and a composite filter to compute objectness." GIT_REPOSITORY ${git_protocol}://github.com/SimpleITK/ITKSimpleITKFilters.git - GIT_TAG a1698352ab83cffd0a06a6d97116b48650a3edbd + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/SkullStrip.remote.cmake b/Modules/Remote/SkullStrip.remote.cmake index 0c65229e533..a62b4e3abf4 100644 --- a/Modules/Remote/SkullStrip.remote.cmake +++ b/Modules/Remote/SkullStrip.remote.cmake @@ -2,5 +2,5 @@ itk_fetch_module(SkullStrip "A class to perform automatic skull-stripping for neuroimage analysis." GIT_REPOSITORY ${git_protocol}://github.com/lorensen/skullStrip.git # April 7, 2015 Fixed KWStyle issues - GIT_TAG 2c4ded1afd24607de921e37cf56693cc5fa05570 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake b/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake index 11832fb698a..35653131ccd 100644 --- a/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake +++ b/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake @@ -2,5 +2,5 @@ itk_fetch_module(SmoothingRecursiveYvvGaussianFilter "GPU and CPU Young & Van Vliet Recursive Gaussian Smoothing Filter: https://hdl.handle.net/10380/3425" GIT_REPOSITORY ${git_protocol}://github.com/Inria-Asclepios/SmoothingRecursiveYvvGaussianFilter - GIT_TAG 9d25453217feff0df4b5854c7b8be186b5a3a0e2 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/SphinxExamples.remote.cmake b/Modules/Remote/SphinxExamples.remote.cmake index f9f658bf6a0..556f20e3ef9 100644 --- a/Modules/Remote/SphinxExamples.remote.cmake +++ b/Modules/Remote/SphinxExamples.remote.cmake @@ -2,5 +2,5 @@ itk_fetch_module(SphinxExamples "This module builds the examples found at https://itk.org/ITKExamples/" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKExamples.git - GIT_TAG 4970ffa55532d80dc01bb553d277288d31a22611 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/SplitComponents.remote.cmake b/Modules/Remote/SplitComponents.remote.cmake index 2f39afcfc30..c55ed6c9505 100644 --- a/Modules/Remote/SplitComponents.remote.cmake +++ b/Modules/Remote/SplitComponents.remote.cmake @@ -5,5 +5,5 @@ itk::SplitComponentsImageFilter. This filter generates component images from an itk::Image of, for example, itk::Vector, itk::CovariantVector, or itk::SymmetricSecondRankTensor. https://hdl.handle.net/10380/3230" GIT_REPOSITORY ${git_protocol}://github.com/thewtex/ITKSplitComponents/ - GIT_TAG cbdffce3996cb4a1de856bde99cfc4cf7f99cd5b + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/Strain.remote.cmake b/Modules/Remote/Strain.remote.cmake index 419a2649f20..0a13a339163 100644 --- a/Modules/Remote/Strain.remote.cmake +++ b/Modules/Remote/Strain.remote.cmake @@ -12,5 +12,5 @@ For more information, see: http://insight-journal.org/browse/publication/984 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKStrain.git - GIT_TAG 337f5c26efaf851a06e24beb6d8dbdd3f21f9853 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/SubdivisionQuadEdgeMeshFilter.remote.cmake b/Modules/Remote/SubdivisionQuadEdgeMeshFilter.remote.cmake index bbbf1672674..9dacdf83134 100644 --- a/Modules/Remote/SubdivisionQuadEdgeMeshFilter.remote.cmake +++ b/Modules/Remote/SubdivisionQuadEdgeMeshFilter.remote.cmake @@ -7,5 +7,5 @@ See the following Insight Journal's publication: http://www.insight-journal.org/browse/publication/831 https://hdl.handle.net/10380/3307" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/itkSubdivisionQuadEdgeMeshFilter - GIT_TAG 180b32531835b274319ed9bc1f4eed9aeeec0d3b + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/TBBImageToImageFilter.remote.cmake b/Modules/Remote/TBBImageToImageFilter.remote.cmake index e98cb0339cb..977d29d28cb 100644 --- a/Modules/Remote/TBBImageToImageFilter.remote.cmake +++ b/Modules/Remote/TBBImageToImageFilter.remote.cmake @@ -4,5 +4,5 @@ itk_fetch_module(TBBImageToImageFilter This module contains a class inheriting from `itk::ImageToimageFilter` that aim to optimize thread management using the TBB library. Insight Journal article: http://www.insight-journal.org/browse/publication/974" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTBBImageToImageFilter.git - GIT_TAG 8f84d0dc9d09a5ff47460646fd99905c3c2b759e + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/TextureFeatures.remote.cmake b/Modules/Remote/TextureFeatures.remote.cmake index e20d760faf4..3a46820161a 100644 --- a/Modules/Remote/TextureFeatures.remote.cmake +++ b/Modules/Remote/TextureFeatures.remote.cmake @@ -14,5 +14,5 @@ For more information, see: " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTextureFeatures.git # Git master 2017-11-01 - GIT_TAG 9eaa9a533b21f1c614647487e409619165752746 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/TwoProjectionRegistration.remote.cmake b/Modules/Remote/TwoProjectionRegistration.remote.cmake index 151558dce32..bc322b0533d 100644 --- a/Modules/Remote/TwoProjectionRegistration.remote.cmake +++ b/Modules/Remote/TwoProjectionRegistration.remote.cmake @@ -18,5 +18,5 @@ Wu, J. \"ITK-Based Implementation of Two-Projection 2D/3D Registration Method wi December, 2010. " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTwoProjectionRegistration.git - GIT_TAG 131418cc963f00d750beb2105fd96e5ed64ebfc6 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/VariationalRegistration.remote.cmake b/Modules/Remote/VariationalRegistration.remote.cmake index 640256da59b..839207cfa61 100644 --- a/Modules/Remote/VariationalRegistration.remote.cmake +++ b/Modules/Remote/VariationalRegistration.remote.cmake @@ -5,5 +5,5 @@ itk_fetch_module(VariationalRegistration "A module to perform variational image registration. https://hdl.handle.net/10380/3460" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKVariationalRegistration.git - GIT_TAG 5c6fb14e84ad27a38d1a794f0b279ad3190484b3 + GIT_TAG ITKv5 ) diff --git a/Modules/Remote/WikiExamples.remote.cmake b/Modules/Remote/WikiExamples.remote.cmake index 0d383b5d47e..ce2214515e2 100644 --- a/Modules/Remote/WikiExamples.remote.cmake +++ b/Modules/Remote/WikiExamples.remote.cmake @@ -5,7 +5,7 @@ # If the environment var WikiExamplesTag exists, use it if (NOT DEFINED ENV{WikiExamplesTag}) # December 26, 2016 - set(GIT_TAG ef997a295367dbc169118066069748cdf61fdc14) + set(GIT_TAG ITKv5) else() set(GIT_TAG $ENV{WikiExamplesTag}) endif() diff --git a/Modules/Segmentation/BioCell/include/itkBioCell.h b/Modules/Segmentation/BioCell/include/itkBioCell.h index ece5c941e02..b28814e8a55 100644 --- a/Modules/Segmentation/BioCell/include/itkBioCell.h +++ b/Modules/Segmentation/BioCell/include/itkBioCell.h @@ -47,7 +47,7 @@ class ITK_TEMPLATE_EXPORT Cell:public CellBase friend class CellularAggregateBase; // need to give access to the constructor. public: - virtual ~Cell() ITK_OVERRIDE; + ~Cell() override; virtual void ClearForce(); virtual void AddForce(const VectorType & force); @@ -56,7 +56,7 @@ class ITK_TEMPLATE_EXPORT Cell:public CellBase virtual void Mitosis(); - virtual void Apoptosis(void) ITK_OVERRIDE; + void Apoptosis(void) override; virtual void ReceptorsReading(); @@ -71,7 +71,7 @@ class ITK_TEMPLATE_EXPORT Cell:public CellBase return "Primitive Cell"; } - virtual bool CheckPointApoptosis() ITK_OVERRIDE + bool CheckPointApoptosis() override { return CellBase::CheckPointApoptosis(); } static Cell * CreateEgg(); diff --git a/Modules/Segmentation/BioCell/include/itkBioCell.hxx b/Modules/Segmentation/BioCell/include/itkBioCell.hxx index 789c40cb11b..32451604f4a 100644 --- a/Modules/Segmentation/BioCell/include/itkBioCell.hxx +++ b/Modules/Segmentation/BioCell/include/itkBioCell.hxx @@ -33,11 +33,11 @@ namespace bio template< unsigned int NSpaceDimension > Cell< NSpaceDimension > ::Cell() : - m_Aggregate(ITK_NULLPTR) + m_Aggregate(nullptr) { m_Force.Fill(0.0f); - // Genome pointers are set to ITK_NULLPTR in the superclass. + // Genome pointers are set to nullptr in the superclass. } /** @@ -86,8 +86,8 @@ Cell< NSpaceDimension > siblingB->m_Genome = m_GenomeCopy; // Mark that the genome pointer is not owned by this cell anymore. - m_Genome = ITK_NULLPTR; - m_GenomeCopy = ITK_NULLPTR; + m_Genome = nullptr; + m_GenomeCopy = nullptr; // Register both daughter cells with the CellularAggregate. CellularAggregateBase *aggregate = this->GetCellularAggregate(); diff --git a/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.h b/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.h index 331fa861bbb..fd6c56719a1 100644 --- a/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.h +++ b/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.h @@ -128,9 +128,9 @@ class ITK_TEMPLATE_EXPORT CellularAggregate:public CellularAggregateBase virtual void Add(CellBase *cell, const VectorType & perturbation); - virtual void Add(CellBase *cellA, CellBase *cellB, double perturbationLength) ITK_OVERRIDE; + void Add(CellBase *cellA, CellBase *cellB, double perturbationLength) override; - virtual void Remove(CellBase *cell) ITK_OVERRIDE; + void Remove(CellBase *cell) override; virtual void GetVoronoi(IdentifierType cellId, VoronoiRegionAutoPointer &) const; @@ -140,18 +140,18 @@ class ITK_TEMPLATE_EXPORT CellularAggregate:public CellularAggregateBase virtual SubstratesVector & GetSubstrates(); - virtual SubstrateValueType GetSubstrateValue(IdentifierType cellId, - unsigned int substrateId) const ITK_OVERRIDE; + SubstrateValueType GetSubstrateValue(IdentifierType cellId, + unsigned int substrateId) const override; virtual void KillAll(); protected: CellularAggregate(); - virtual ~CellularAggregate() ITK_OVERRIDE; + ~CellularAggregate() override; CellularAggregate(const Self &); void operator=(const Self &); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; virtual void ComputeForces(); diff --git a/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.hxx b/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.hxx index 78320dff45b..41ada7f66ce 100644 --- a/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.hxx +++ b/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.hxx @@ -256,7 +256,7 @@ CellularAggregate< NSpaceDimension > ::Add(CellBase *cellBase, const VectorType & perturbation) { BioCellType * cell = dynamic_cast< BioCellType * >( cellBase ); - if(cell == ITK_NULLPTR) + if(cell == nullptr) { itkExceptionMacro(<< "dynamic_cast failed."); } @@ -457,7 +457,7 @@ CellularAggregate< NSpaceDimension > { const IdentifierType cell2Id = ( *neighbor ); - BioCellType *cell2 = ITK_NULLPTR; + BioCellType *cell2 = nullptr; PointType position2; if ( !m_Mesh->GetPoint(cell2Id, &position2) ) @@ -510,7 +510,7 @@ CellularAggregate< NSpaceDimension > PointsConstIterator point2It = beginPoints; - BioCellType *cell1 = ITK_NULLPTR; + BioCellType *cell1 = nullptr; IdentifierType cell1Id = point1It.Index(); m_Mesh->GetPointData(cell1Id, &cell1); diff --git a/Modules/Segmentation/BioCell/include/itkBioCellularAggregateBase.h b/Modules/Segmentation/BioCell/include/itkBioCellularAggregateBase.h index d7dc61852de..2fddf83c485 100644 --- a/Modules/Segmentation/BioCell/include/itkBioCellularAggregateBase.h +++ b/Modules/Segmentation/BioCell/include/itkBioCellularAggregateBase.h @@ -66,9 +66,9 @@ class ITKBioCell_EXPORT CellularAggregateBase:public Object protected: CellularAggregateBase(); - virtual ~CellularAggregateBase() ITK_OVERRIDE; + ~CellularAggregateBase() override; CellularAggregateBase(const Self &); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; }; } // end namespace bio } // end namespace itk diff --git a/Modules/Segmentation/BioCell/src/itkBioCellBase.cxx b/Modules/Segmentation/BioCell/src/itkBioCellBase.cxx index f7463ad9713..06825fed48e 100644 --- a/Modules/Segmentation/BioCell/src/itkBioCellBase.cxx +++ b/Modules/Segmentation/BioCell/src/itkBioCellBase.cxx @@ -64,8 +64,8 @@ CellBase::ColorType CellBase:: StarvingColor; CellBase ::CellBase() { - m_Genome = ITK_NULLPTR; - m_GenomeCopy = ITK_NULLPTR; + m_Genome = nullptr; + m_GenomeCopy = nullptr; m_Radius = DefaultRadius; m_Color = DefaultColor; @@ -107,9 +107,9 @@ CellBase ::~CellBase() { delete m_Genome; - m_Genome = ITK_NULLPTR; + m_Genome = nullptr; delete m_GenomeCopy; - m_GenomeCopy = ITK_NULLPTR; + m_GenomeCopy = nullptr; } /** @@ -132,9 +132,9 @@ CellBase ::Apoptosis(void) { delete m_Genome; - m_Genome = ITK_NULLPTR; + m_Genome = nullptr; delete m_GenomeCopy; - m_GenomeCopy = ITK_NULLPTR; + m_GenomeCopy = nullptr; } /** diff --git a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.h b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.h index de2b54587ad..5940dd22d59 100644 --- a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.h +++ b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.h @@ -180,7 +180,7 @@ class ITK_TEMPLATE_EXPORT BayesianClassifierImageFilter: /** This is overloaded to create the Posteriors output image. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -205,12 +205,12 @@ class ITK_TEMPLATE_EXPORT BayesianClassifierImageFilter: protected: BayesianClassifierImageFilter(); - virtual ~BayesianClassifierImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BayesianClassifierImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - virtual void GenerateOutputInformation(void) ITK_OVERRIDE; + void GenerateOutputInformation(void) override; /** Compute the posteriors using the Bayes rule. If no priors are available, * then the posteriors are just a copy of the memberships. diff --git a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx index 893e979abf4..7a90313744d 100644 --- a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx +++ b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx @@ -41,7 +41,7 @@ BayesianClassifierImageFilter< TInputVectorImage, TLabelsType, ::BayesianClassifierImageFilter() : m_UserProvidedPriors( false ), m_UserProvidedSmoothingFilter( false ), - m_SmoothingFilter( ITK_NULLPTR ), + m_SmoothingFilter( nullptr ), m_NumberOfSmoothingIterations( 0 ) { this->SetNumberOfRequiredOutputs( 2 ); @@ -148,7 +148,7 @@ BayesianClassifierImageFilter< TInputVectorImage, TLabelsType, const PriorsImageType *priorsImage = dynamic_cast< const PriorsImageType * >( this->GetInput(1) ); - if ( priorsImage == ITK_NULLPTR ) + if ( priorsImage == nullptr ) { itkExceptionMacro("Second input type does not correspond to expected Priors Image Type"); } @@ -156,7 +156,7 @@ BayesianClassifierImageFilter< TInputVectorImage, TLabelsType, PosteriorsImageType *posteriorsImage = dynamic_cast< PosteriorsImageType * >( this->GetPosteriorImage() ); - if ( posteriorsImage == ITK_NULLPTR ) + if ( posteriorsImage == nullptr ) { itkExceptionMacro("Second output type does not correspond to expected Posteriors Image Type"); } @@ -193,7 +193,7 @@ BayesianClassifierImageFilter< TInputVectorImage, TLabelsType, PosteriorsImageType *posteriorsImage = dynamic_cast< PosteriorsImageType * >( this->GetPosteriorImage() ); - if ( posteriorsImage == ITK_NULLPTR ) + if ( posteriorsImage == nullptr ) { itkExceptionMacro("Second output type does not correspond to expected Posteriors Image Type"); } @@ -330,7 +330,7 @@ BayesianClassifierImageFilter< TInputVectorImage, TLabelsType, PosteriorsImageType *posteriorsImage = dynamic_cast< PosteriorsImageType * >( this->GetPosteriorImage() ); - if ( posteriorsImage == ITK_NULLPTR ) + if ( posteriorsImage == nullptr ) { itkExceptionMacro("Second output type does not correspond to expected Posteriors Image Type"); } diff --git a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.h b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.h index d28837c948d..41d6c05e278 100644 --- a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.h +++ b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.h @@ -142,7 +142,7 @@ class ITK_TEMPLATE_EXPORT BayesianClassifierInitializationImageFilter: itkSetMacro(NumberOfClasses, unsigned int); itkGetConstMacro(NumberOfClasses, unsigned int); - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -161,8 +161,8 @@ class ITK_TEMPLATE_EXPORT BayesianClassifierInitializationImageFilter: protected: BayesianClassifierInitializationImageFilter(); - virtual ~BayesianClassifierInitializationImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BayesianClassifierInitializationImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Initialize the membership functions. This will be called only if the membership * function hasn't already been set. This method initializes membership functions @@ -173,7 +173,7 @@ class ITK_TEMPLATE_EXPORT BayesianClassifierInitializationImageFilter: /** Here is where the prior and membership probability vector images are created.*/ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BayesianClassifierInitializationImageFilter); diff --git a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx index c2a2e51bf4e..7300b800961 100644 --- a/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx +++ b/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx @@ -41,7 +41,7 @@ BayesianClassifierInitializationImageFilter< TInputImage, TProbabilityPrecisionT m_UserSuppliesMembershipFunctions(false), m_NumberOfClasses(0) { - m_MembershipFunctionContainer = ITK_NULLPTR; + m_MembershipFunctionContainer = nullptr; } // GenerateOutputInformation method. Here we force update on the entire input diff --git a/Modules/Segmentation/Classifiers/include/itkClassifierBase.h b/Modules/Segmentation/Classifiers/include/itkClassifierBase.h index e84e60c4762..3da14c34163 100644 --- a/Modules/Segmentation/Classifiers/include/itkClassifierBase.h +++ b/Modules/Segmentation/Classifiers/include/itkClassifierBase.h @@ -149,12 +149,12 @@ class ITK_TEMPLATE_EXPORT ClassifierBase:public LightProcessObject protected: ClassifierBase(); - ~ClassifierBase() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ClassifierBase() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** The real classification logic implementaion. All the subclasses * of this class should implement this method. */ - virtual void GenerateData() ITK_OVERRIDE = 0; + void GenerateData() override = 0; private: ITK_DISALLOW_COPY_AND_ASSIGN(ClassifierBase); diff --git a/Modules/Segmentation/Classifiers/include/itkClassifierBase.hxx b/Modules/Segmentation/Classifiers/include/itkClassifierBase.hxx index d338f0f05e0..19ea4740e1d 100644 --- a/Modules/Segmentation/Classifiers/include/itkClassifierBase.hxx +++ b/Modules/Segmentation/Classifiers/include/itkClassifierBase.hxx @@ -28,7 +28,7 @@ ClassifierBase< TDataContainer > ::ClassifierBase() { m_NumberOfClasses = 0; - m_DecisionRule = ITK_NULLPTR; + m_DecisionRule = nullptr; m_MembershipFunctions.resize(0); } diff --git a/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.h b/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.h index 34a585345d5..e987b1e8880 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.h +++ b/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.h @@ -139,14 +139,14 @@ class ITK_TEMPLATE_EXPORT ImageClassifierBase: protected: ImageClassifierBase(); - ~ImageClassifierBase() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageClassifierBase() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Allocate memory for the classified image. */ void Allocate(); /** Starts the classification process */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageClassifierBase); diff --git a/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.h b/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.h index 8de9fd6ba97..c589d7bb286 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.h +++ b/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.h @@ -124,11 +124,11 @@ class ITK_TEMPLATE_EXPORT ImageGaussianModelEstimator: protected: ImageGaussianModelEstimator(); - ~ImageGaussianModelEstimator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageGaussianModelEstimator() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Starts the image modelling process */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageGaussianModelEstimator); @@ -150,7 +150,7 @@ class ITK_TEMPLATE_EXPORT ImageGaussianModelEstimator: /** A function that generates the * model based on the training input data. * Achieves the goal of training the classifier. */ - virtual void EstimateModels() ITK_OVERRIDE; + void EstimateModels() override; void EstimateGaussianModelParameters(); }; // class ImageGaussianModelEstimator diff --git a/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx b/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx index 12c58e659dd..6c5d362ec2b 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx +++ b/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx @@ -29,7 +29,7 @@ template< typename TInputImage, typename TTrainingImage > ImageGaussianModelEstimator< TInputImage, TMembershipFunction, TTrainingImage > ::ImageGaussianModelEstimator(void): - m_Covariance(ITK_NULLPTR) + m_Covariance(nullptr) {} template< typename TInputImage, diff --git a/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.h b/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.h index 635b2c78ec7..554584df907 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.h +++ b/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.h @@ -210,11 +210,11 @@ class ITK_TEMPLATE_EXPORT ImageKmeansModelEstimator: protected: ImageKmeansModelEstimator(); - ~ImageKmeansModelEstimator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageKmeansModelEstimator() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Starts the image modelling process */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Allocate memory for the output model. */ void Allocate(); @@ -231,7 +231,7 @@ class ITK_TEMPLATE_EXPORT ImageKmeansModelEstimator: * determine the cluster centers or the Kmeans model. This is the * the base function to call the K-means classifier. */ - virtual void EstimateModels() ITK_OVERRIDE; + void EstimateModels() override; void EstimateKmeansModelParameters(); diff --git a/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx b/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx index 348293f4f5a..3c61ea47035 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx +++ b/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx @@ -620,7 +620,7 @@ ImageKmeansModelEstimator< TInputImage, TMembershipFunction > for ( i = 0; i < m_VectorDimension; i++ ) { - srand( (unsigned)time(ITK_NULLPTR) ); + srand( (unsigned)time(nullptr) ); rand_num = ( rand() ) / ( (double)RAND_MAX ); if ( oldCodeword[i] == 0.0 ) diff --git a/Modules/Segmentation/Classifiers/include/itkImageModelEstimatorBase.h b/Modules/Segmentation/Classifiers/include/itkImageModelEstimatorBase.h index 71320cd297d..da6ce311773 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageModelEstimatorBase.h +++ b/Modules/Segmentation/Classifiers/include/itkImageModelEstimatorBase.h @@ -130,10 +130,10 @@ class ITK_TEMPLATE_EXPORT ImageModelEstimatorBase:public LightProcessObject protected: ImageModelEstimatorBase(); - ~ImageModelEstimatorBase() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImageModelEstimatorBase() override; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: diff --git a/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.h b/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.h index c546e3c3eeb..d58686a75a6 100644 --- a/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.h +++ b/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.h @@ -152,19 +152,19 @@ class ITK_TEMPLATE_EXPORT ScalarImageKmeansImageFilter: protected: ScalarImageKmeansImageFilter(); - virtual ~ScalarImageKmeansImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ScalarImageKmeansImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** This method runs the statistical methods that identify the means of the * classes and the use the distances to those means in order to label the * image pixels. * \sa ImageToImageFilter::GenerateData() */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /* See superclass for doxygen. This methods additionally checks that * the number of means is not 0. */ - virtual void VerifyPreconditions() ITK_OVERRIDE; + void VerifyPreconditions() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarImageKmeansImageFilter); diff --git a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest1.cxx b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest1.cxx index ba93a433e51..774acf3c360 100644 --- a/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest1.cxx +++ b/Modules/Segmentation/Classifiers/test/itkSampleClassifierFilterTest1.cxx @@ -47,16 +47,16 @@ int itkSampleClassifierFilterTest1( int, char * [] ) sample->SetMeasurementVectorSize( numberOfComponents ); // Test GetInput() before setting the input - if( filter->GetInput() != ITK_NULLPTR ) + if( filter->GetInput() != nullptr ) { - std::cerr << "GetInput() should have returned ITK_NULLPTR" << std::endl; + std::cerr << "GetInput() should have returned nullptr" << std::endl; return EXIT_FAILURE; } // Test GetOutput() before creating the output - if( filter->GetOutput() == ITK_NULLPTR ) + if( filter->GetOutput() == nullptr ) { - std::cerr << "GetOutput() should have returned NON-ITK_NULLPTR" << std::endl; + std::cerr << "GetOutput() should have returned NON-nullptr" << std::endl; return EXIT_FAILURE; } @@ -224,9 +224,9 @@ int itkSampleClassifierFilterTest1( int, char * [] ) } // Test GetOutput() after creating the output - if( filter->GetOutput() == ITK_NULLPTR ) + if( filter->GetOutput() == nullptr ) { - std::cerr << "GetOutput() should have returned NON-ITK_NULLPTR" << std::endl; + std::cerr << "GetOutput() should have returned NON-nullptr" << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.h b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.h index 7bfc4cca1bf..3f5a6a31984 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.h +++ b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.h @@ -153,7 +153,7 @@ class ITK_TEMPLATE_EXPORT ConnectedComponentFunctorImageFilter: protected: ConnectedComponentFunctorImageFilter() {} - virtual ~ConnectedComponentFunctorImageFilter() ITK_OVERRIDE {} + ~ConnectedComponentFunctorImageFilter() override {} ConnectedComponentFunctorImageFilter(const Self &) {} FunctorType m_Functor; @@ -161,7 +161,7 @@ class ITK_TEMPLATE_EXPORT ConnectedComponentFunctorImageFilter: /** * Standard pipeline method. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; }; } // end namespace itk diff --git a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.h b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.h index 0411cde103b..b3f8a92059a 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.h +++ b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.h @@ -169,28 +169,28 @@ class ITK_TEMPLATE_EXPORT ConnectedComponentImageFilter: Self::AddOptionalInputName("MaskImage",1); } - virtual ~ConnectedComponentImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ConnectedComponentImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Standard pipeline methods. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; - void ThreadedGenerateData(const RegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + void ThreadedGenerateData(const RegionType & outputRegionForThread, ThreadIdType threadId) override; /** ConnectedComponentImageFilter needs the entire input. Therefore * it must provide an implementation GenerateInputRequestedRegion(). * \sa ProcessObject::GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** ConnectedComponentImageFilter will produce all of the output. * Therefore it must provide an implementation of * EnlargeOutputRequestedRegion(). * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject * itkNotUsed(output) ) override; bool m_FullyConnected; diff --git a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx index cef97736b68..5ea9e464f31 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx +++ b/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx @@ -407,9 +407,9 @@ ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage > ::AfterThreadedGenerateData() { m_NumberOfLabels.clear(); - m_Barrier = ITK_NULLPTR; + m_Barrier = nullptr; m_LineMap.clear(); - m_Input = ITK_NULLPTR; + m_Input = nullptr; } template< typename TInputImage, typename TOutputImage, typename TMaskImage > diff --git a/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.h b/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.h index e441bcd5bfa..9d663e9d487 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.h +++ b/Modules/Segmentation/ConnectedComponents/include/itkHardConnectedComponentImageFilter.h @@ -114,14 +114,14 @@ class ITK_TEMPLATE_EXPORT HardConnectedComponentImageFilter: protected: HardConnectedComponentImageFilter() {} - virtual ~HardConnectedComponentImageFilter() ITK_OVERRIDE {} + ~HardConnectedComponentImageFilter() override {} /** * Standard pipeline method. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); } private: diff --git a/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.h b/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.h index 5dbe45c98cd..972b648c98a 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.h +++ b/Modules/Segmentation/ConnectedComponents/include/itkRelabelComponentImageFilter.h @@ -253,20 +253,20 @@ class ITK_TEMPLATE_EXPORT RelabelComponentImageFilter: m_OriginalNumberOfObjects(0), m_MinimumObjectSize(0), m_SortByObjectSize(true) { this->InPlaceOff(); } - virtual ~RelabelComponentImageFilter() ITK_OVERRIDE {} + ~RelabelComponentImageFilter() override {} /** * Standard pipeline method. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** RelabelComponentImageFilter needs the entire input. Therefore * it must provide an implementation GenerateInputRequestedRegion(). * \sa ProcessObject::GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Standard printself method */ - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; struct RelabelComponentObjectType { LabelType m_ObjectNumber; diff --git a/Modules/Segmentation/ConnectedComponents/include/itkScalarConnectedComponentImageFilter.h b/Modules/Segmentation/ConnectedComponents/include/itkScalarConnectedComponentImageFilter.h index d3bcce5e460..892c0a349b1 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkScalarConnectedComponentImageFilter.h +++ b/Modules/Segmentation/ConnectedComponents/include/itkScalarConnectedComponentImageFilter.h @@ -152,7 +152,7 @@ class ScalarConnectedComponentImageFilter: protected: ScalarConnectedComponentImageFilter() {} - virtual ~ScalarConnectedComponentImageFilter() ITK_OVERRIDE {} + ~ScalarConnectedComponentImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(ScalarConnectedComponentImageFilter); diff --git a/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h b/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h index cd9e42f5299..695cdd110dd 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h +++ b/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h @@ -150,10 +150,10 @@ class ITK_TEMPLATE_EXPORT ThresholdMaximumConnectedComponentsImageFilter: protected: ThresholdMaximumConnectedComponentsImageFilter(); - ~ThresholdMaximumConnectedComponentsImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ThresholdMaximumConnectedComponentsImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; /** * Runs a series of filters that thresholds the image, diff --git a/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h b/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h index ce04a52616a..decbb741c19 100644 --- a/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h +++ b/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h @@ -134,7 +134,7 @@ class VectorConnectedComponentImageFilter: protected: VectorConnectedComponentImageFilter() {} - virtual ~VectorConnectedComponentImageFilter() ITK_OVERRIDE {} + ~VectorConnectedComponentImageFilter() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorConnectedComponentImageFilter); diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.h b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.h index 82b48e86927..111ab8c0423 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.h +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.h @@ -91,19 +91,19 @@ class ITK_TEMPLATE_EXPORT DeformableSimplexMesh3DBalloonForceFilter:public Defor protected: DeformableSimplexMesh3DBalloonForceFilter(); - ~DeformableSimplexMesh3DBalloonForceFilter() ITK_OVERRIDE; + ~DeformableSimplexMesh3DBalloonForceFilter() override; DeformableSimplexMesh3DBalloonForceFilter(const Self &) {} void operator=(const Self &) {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Compute the external force component */ - virtual void ComputeExternalForce(SimplexMeshGeometry *data,const GradientImageType *gradientImage) ITK_OVERRIDE; + void ComputeExternalForce(SimplexMeshGeometry *data,const GradientImageType *gradientImage) override; /** Parameters definitions. */ diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.h b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.h index faa8d5307db..1b861914a11 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.h +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.h @@ -201,13 +201,13 @@ class ITK_TEMPLATE_EXPORT DeformableSimplexMesh3DFilter:public MeshToMeshFilter< protected: DeformableSimplexMesh3DFilter(); - ~DeformableSimplexMesh3DFilter() ITK_OVERRIDE; + ~DeformableSimplexMesh3DFilter() override; ITK_DISALLOW_COPY_AND_ASSIGN(DeformableSimplexMesh3DFilter); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** * Initializes the datastructures necessary for mesh diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx index e20f4c6408a..8e919da8dc6 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx @@ -67,7 +67,7 @@ DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh > this->ProcessObject::SetNumberOfRequiredOutputs(1); this->ProcessObject::SetNthOutput( 0, output.GetPointer() ); - this->m_Data = ITK_NULLPTR; + this->m_Data = nullptr; } template< typename TInputMesh, typename TOutputMesh > @@ -151,7 +151,7 @@ DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh > IdentifierType idx = pointItr.Index(); data = this->m_Data->GetElement(idx); delete data->neighborSet; - data->neighborSet = ITK_NULLPTR; + data->neighborSet = nullptr; pointItr++; } diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h index 3167f0c8d6b..8df0291f906 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h @@ -148,15 +148,15 @@ class ITK_TEMPLATE_EXPORT DeformableSimplexMesh3DGradientConstraintForceFilter : protected: DeformableSimplexMesh3DGradientConstraintForceFilter(); - ~DeformableSimplexMesh3DGradientConstraintForceFilter() ITK_OVERRIDE; + ~DeformableSimplexMesh3DGradientConstraintForceFilter() override; DeformableSimplexMesh3DGradientConstraintForceFilter(const Self &) {} void operator=(const Self &){} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Compute the external force component */ - virtual void ComputeExternalForce(SimplexMeshGeometry *data, const GradientImageType *gradientImage) ITK_OVERRIDE; + void ComputeExternalForce(SimplexMeshGeometry *data, const GradientImageType *gradientImage) override; /** * Range of search for Bresenham algorithm (normal line at each vertex) diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx index e878eaa104b..d7dcc2eb630 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx @@ -33,7 +33,7 @@ DeformableSimplexMesh3DGradientConstraintForceFilter< TInputMesh, TOutputMesh > ::DeformableSimplexMesh3DGradientConstraintForceFilter() { m_Range = 1; - m_StartVoxel = ITK_NULLPTR; + m_StartVoxel = nullptr; } template< typename TInputMesh, typename TOutputMesh > @@ -59,7 +59,7 @@ DeformableSimplexMesh3DGradientConstraintForceFilter< TInputMesh, TOutputMesh > ::Clear() { delete m_StartVoxel; - m_StartVoxel = ITK_NULLPTR; + m_StartVoxel = nullptr; std::vector< ImageVoxel * >::iterator it; for ( it = m_Positive.begin(); it != m_Positive.end(); it++ ) { @@ -367,7 +367,7 @@ DeformableSimplexMesh3DGradientConstraintForceFilter< TInputMesh, TOutputMesh > } else { - m_StartVoxel = ITK_NULLPTR; + m_StartVoxel = nullptr; } // now fun begins try to use all the above diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.h b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.h index 56ca27832c5..5e4ea8a1f95 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.h +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.h @@ -302,33 +302,33 @@ class ITK_TEMPLATE_EXPORT KLMRegionGrowImageFilter:public RegionGrowImageFilter< protected: KLMRegionGrowImageFilter(); - ~KLMRegionGrowImageFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~KLMRegionGrowImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** * Standard pipeline method. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** KLMRegionGrowImageFilter needs the entire input. Therefore * it must provide an implementation GenerateInputRequestedRegion(). * \sa ProcessObject::GenerateInputRequestedRegion(). */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** KLMRegionGrowImageFilter will produce all of the output. * Therefore it must provide an implementation of * EnlargeOutputRequestedRegion(). * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - virtual void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *) override; /** This is the interface function that calls the specific algorithm * implementation of region growing. */ - void ApplyRegionGrowImageFilter() ITK_OVERRIDE; + void ApplyRegionGrowImageFilter() override; /** Function to merge two regions. * The smaller label is always assigned to the new region. This is * consistent with the connected components algorithm. */ - virtual void MergeRegions() ITK_OVERRIDE; + void MergeRegions() override; /** Generate output approximated image. */ virtual void GenerateOutputImage(); diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx index 8800925b1b8..8380916535d 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx @@ -29,7 +29,7 @@ KLMRegionGrowImageFilter< TInputImage, TOutputImage > m_InternalLambda(0), m_InitialNumberOfRegions(0), m_TotalBorderLength(0.0), - m_BorderCandidate(ITK_NULLPTR), + m_BorderCandidate(nullptr), m_InitialRegionArea(0) { m_InitialRegionMean.set_size(InputImageVectorDimension); @@ -687,7 +687,7 @@ KLMRegionGrowImageFilter< TInputImage, TOutputImage > } // If any duplicate borders are found during SpliceRegionBorders, - // lambda is set to -1.0, and pRegion1 and pRegion2 are set ITK_NULLPTR + // lambda is set to -1.0, and pRegion1 and pRegion2 are set nullptr // so that after this sort, the duplicate border will be the last // entry in m_BordersDynamicPointer @@ -702,9 +702,9 @@ KLMRegionGrowImageFilter< TInputImage, TOutputImage > m_InternalLambda = m_BorderCandidate->m_Pointer->GetLambda(); // Remove any duplicate borders found during SpliceRegionBorders: - // lambda = -1.0, pRegion1 and pRegion2 = ITK_NULLPTR - while ( m_BorderCandidate->m_Pointer->GetRegion1() == ITK_NULLPTR - || m_BorderCandidate->m_Pointer->GetRegion2() == ITK_NULLPTR ) + // lambda = -1.0, pRegion1 and pRegion2 = nullptr + while ( m_BorderCandidate->m_Pointer->GetRegion1() == nullptr + || m_BorderCandidate->m_Pointer->GetRegion2() == nullptr ) { m_BordersDynamicPointer.erase(m_BordersDynamicPointer.end() - 1); diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h index 8c1bd3d83e9..ed8bb39988d 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h @@ -179,10 +179,10 @@ class ITKKLMRegionGrowing_EXPORT KLMSegmentationBorder:public SegmentationBorder KLMSegmentationBorder(); /** Destructor. */ - ~KLMSegmentationBorder() ITK_OVERRIDE; + ~KLMSegmentationBorder() override; /** Print self identity */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(KLMSegmentationBorder); diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h index 6f4f0eda413..9892b9abfe6 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h @@ -186,7 +186,7 @@ class ITKKLMRegionGrowing_EXPORT KLMSegmentationRegion:public SegmentationRegion /** Splice the regions borders from the new region into the current * region. If duplicate borders are found, the duplicate border * region is not inserted into the new region borders list, rather, - * it has its pointers to region1 and region2 set to ITK_NULLPTR and + * it has its pointers to region1 and region2 set to nullptr and * Lambda set to -1.0. * * For example, take an image with 3 regions A, B, C @@ -207,7 +207,7 @@ class ITKKLMRegionGrowing_EXPORT KLMSegmentationRegion:public SegmentationRegion * A-C is given the combined length of the two former borders * and is put into the region borders list. The other is * nullified by having its pointers to region1 and region2 set - * to ITK_NULLPTR and its Lambda value set to -1.0. + * to nullptr and its Lambda value set to -1.0. */ void SpliceRegionBorders(Self *region); @@ -217,8 +217,8 @@ class ITKKLMRegionGrowing_EXPORT KLMSegmentationRegion:public SegmentationRegion protected: KLMSegmentationRegion(); - ~KLMSegmentationRegion() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~KLMSegmentationRegion() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(KLMSegmentationRegion); diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkRegionGrowImageFilter.h b/Modules/Segmentation/KLMRegionGrowing/include/itkRegionGrowImageFilter.h index b89800cd278..7945262ae43 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkRegionGrowImageFilter.h +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkRegionGrowImageFilter.h @@ -124,8 +124,8 @@ class ITK_TEMPLATE_EXPORT RegionGrowImageFilter: protected: RegionGrowImageFilter(); - ~RegionGrowImageFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RegionGrowImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(RegionGrowImageFilter); diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationBorder.h b/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationBorder.h index 2ca2401ce9b..50a8547eba8 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationBorder.h +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationBorder.h @@ -70,8 +70,8 @@ class ITKKLMRegionGrowing_EXPORT SegmentationBorder:public Object protected: SegmentationBorder(); - ~SegmentationBorder() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SegmentationBorder() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SegmentationBorder); diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h b/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h index 07195324a9a..213a3126f29 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h @@ -78,8 +78,8 @@ class ITKKLMRegionGrowing_EXPORT SegmentationRegion:public Object protected: SegmentationRegion(); - ~SegmentationRegion() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SegmentationRegion() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SegmentationRegion); diff --git a/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationBorder.cxx b/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationBorder.cxx index e576c96e68b..c1c290c9a91 100644 --- a/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationBorder.cxx +++ b/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationBorder.cxx @@ -23,8 +23,8 @@ KLMSegmentationBorder ::KLMSegmentationBorder(void) { m_Lambda = 0.0; - m_Region1 = ITK_NULLPTR; - m_Region2 = ITK_NULLPTR; + m_Region1 = nullptr; + m_Region2 = nullptr; } KLMSegmentationBorder diff --git a/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx b/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx index 2b54d6c6371..028dd619c41 100644 --- a/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx +++ b/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx @@ -97,7 +97,7 @@ void KLMSegmentationRegion ::DeleteRegionBorder(KLMSegmentationBorder *pBorderCandidate) { - if ( pBorderCandidate == ITK_NULLPTR ) + if ( pBorderCandidate == nullptr ) { itkExceptionMacro(<< "Null pointer to segmentation region border"); } @@ -130,7 +130,7 @@ void KLMSegmentationRegion ::PushBackRegionBorder(KLMSegmentationBorder *pBorderCandidate) { - if ( pBorderCandidate == ITK_NULLPTR ) + if ( pBorderCandidate == nullptr ) { itkExceptionMacro(<< "Null pointer to segmentation region border"); } @@ -141,7 +141,7 @@ void KLMSegmentationRegion ::PushFrontRegionBorder(KLMSegmentationBorder *pBorderCandidate) { - if ( pBorderCandidate == ITK_NULLPTR ) + if ( pBorderCandidate == nullptr ) { itkExceptionMacro(<< "Null pointer to segmentation region border"); } @@ -153,7 +153,7 @@ KLMSegmentationRegion ::InsertRegionBorder(KLMSegmentationBorder *pBorderCandidate) { // Ensure that the border candidate is not a null pointer - if ( pBorderCandidate == ITK_NULLPTR ) + if ( pBorderCandidate == nullptr ) { itkExceptionMacro(<< "Null pointer to segmentation region border"); } @@ -209,7 +209,7 @@ ::InsertRegionBorder(RegionBorderVectorIterator RegionBorderVectorIt, KLMSegmentationBorder *pBorderCandidate) { // Ensure that the border candidate is not a null pointer - if ( pBorderCandidate == ITK_NULLPTR ) + if ( pBorderCandidate == nullptr ) { itkExceptionMacro(<< "Null pointer to segmentation region border"); } @@ -379,8 +379,8 @@ ::SpliceRegionBorders(Self *region) } // end else // Nullify the duplicate border so it can be identified and removed. - ( *thatRegionBordersIt )->SetRegion1(ITK_NULLPTR); - ( *thatRegionBordersIt )->SetRegion2(ITK_NULLPTR); + ( *thatRegionBordersIt )->SetRegion1(nullptr); + ( *thatRegionBordersIt )->SetRegion2(nullptr); ( *thatRegionBordersIt )->SetLambda(-1.0); thisRegionBordersIt++; @@ -439,10 +439,10 @@ void KLMSegmentationRegion ::UpdateRegionBorderLambda() { - // Check if the number of borders for this region is ITK_NULLPTR + // Check if the number of borders for this region is nullptr if ( m_RegionBorderVector.empty() ) { - itkExceptionMacro(<< "The region border for computing Lambda is ITK_NULLPTR"); + itkExceptionMacro(<< "The region border for computing Lambda is nullptr"); } // Set up the iterator to loop through the region border vector diff --git a/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.h b/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.h index 813e79414f5..060b8bcbd9f 100644 --- a/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.h +++ b/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.h @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT BinaryMedianImageFilter: * in order to inform the pipeline execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -121,8 +121,8 @@ class ITK_TEMPLATE_EXPORT BinaryMedianImageFilter: protected: BinaryMedianImageFilter(); - virtual ~BinaryMedianImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryMedianImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** BinaryMedianImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() @@ -135,7 +135,7 @@ class ITK_TEMPLATE_EXPORT BinaryMedianImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryMedianImageFilter); diff --git a/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.h b/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.h index 2a633c1aa70..264075047d9 100644 --- a/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.h +++ b/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.h @@ -164,16 +164,16 @@ class ITK_TEMPLATE_EXPORT LabelVotingImageFilter: protected: LabelVotingImageFilter(); - virtual ~LabelVotingImageFilter() ITK_OVERRIDE {} + ~LabelVotingImageFilter() override {} /** Determine maximum label value in all input images and initialize * global data. */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; void ThreadedGenerateData - (const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE; + (const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override; - void PrintSelf(std::ostream &, Indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream &, Indent) const override; /** Determine maximum value among all input images' pixels. */ InputPixelType ComputeMaximumInputValue(); diff --git a/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h b/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h index 57414340a81..c878478f853 100644 --- a/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h +++ b/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h @@ -278,20 +278,20 @@ class ITK_TEMPLATE_EXPORT MultiLabelSTAPLEImageFilter : m_TerminationUpdateThreshold(1e-5) { } - virtual ~MultiLabelSTAPLEImageFilter() ITK_OVERRIDE {} + ~MultiLabelSTAPLEImageFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream&, Indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream&, Indent) const override; /** Determine maximum value among all input images' pixels */ typename TInputImage::PixelType ComputeMaximumInputValue(); // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion( DataObject * ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject * ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MultiLabelSTAPLEImageFilter); diff --git a/Modules/Segmentation/LabelVoting/include/itkVotingBinaryHoleFillingImageFilter.h b/Modules/Segmentation/LabelVoting/include/itkVotingBinaryHoleFillingImageFilter.h index ea2322e4155..f3b6702f224 100644 --- a/Modules/Segmentation/LabelVoting/include/itkVotingBinaryHoleFillingImageFilter.h +++ b/Modules/Segmentation/LabelVoting/include/itkVotingBinaryHoleFillingImageFilter.h @@ -97,15 +97,15 @@ class ITK_TEMPLATE_EXPORT VotingBinaryHoleFillingImageFilter: protected: VotingBinaryHoleFillingImageFilter(); - virtual ~VotingBinaryHoleFillingImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VotingBinaryHoleFillingImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Make protected the methods SetBirthThreshold() and * SetSurvivalThreshold() so users of this filter do not have access to * them. */ - void SetBirthThreshold(const unsigned int value) ITK_OVERRIDE + void SetBirthThreshold(const unsigned int value) override { this->Superclass::SetBirthThreshold(value); } - void SetSurvivalThreshold(const unsigned int value) ITK_OVERRIDE + void SetSurvivalThreshold(const unsigned int value) override { this->Superclass::SetSurvivalThreshold(value); } /** VotingBinaryHoleFillingImageFilter can be implemented as a multithreaded filter. @@ -119,13 +119,13 @@ class ITK_TEMPLATE_EXPORT VotingBinaryHoleFillingImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; /** Methods to be called before and after the invokation of * ThreadedGenerateData(). */ - void BeforeThreadedGenerateData() ITK_OVERRIDE; + void BeforeThreadedGenerateData() override; - void AfterThreadedGenerateData() ITK_OVERRIDE; + void AfterThreadedGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VotingBinaryHoleFillingImageFilter); diff --git a/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.h b/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.h index e00c6f17753..9d81ff66156 100644 --- a/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.h +++ b/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.h @@ -103,7 +103,7 @@ class ITK_TEMPLATE_EXPORT VotingBinaryImageFilter: * in order to inform the pipeline execution model. * * \sa ImageToImageFilter::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -122,8 +122,8 @@ class ITK_TEMPLATE_EXPORT VotingBinaryImageFilter: protected: VotingBinaryImageFilter(); - virtual ~VotingBinaryImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VotingBinaryImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** VotingBinaryImageFilter can be implemented as a multithreaded filter. * Therefore, this implementation provides a ThreadedGenerateData() @@ -136,7 +136,7 @@ class ITK_TEMPLATE_EXPORT VotingBinaryImageFilter: * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, - ThreadIdType threadId) ITK_OVERRIDE; + ThreadIdType threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VotingBinaryImageFilter); diff --git a/Modules/Segmentation/LabelVoting/include/itkVotingBinaryIterativeHoleFillingImageFilter.h b/Modules/Segmentation/LabelVoting/include/itkVotingBinaryIterativeHoleFillingImageFilter.h index 5ff3b3985c4..c841341202a 100644 --- a/Modules/Segmentation/LabelVoting/include/itkVotingBinaryIterativeHoleFillingImageFilter.h +++ b/Modules/Segmentation/LabelVoting/include/itkVotingBinaryIterativeHoleFillingImageFilter.h @@ -140,13 +140,13 @@ class ITK_TEMPLATE_EXPORT VotingBinaryIterativeHoleFillingImageFilter: protected: VotingBinaryIterativeHoleFillingImageFilter(); - virtual ~VotingBinaryIterativeHoleFillingImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VotingBinaryIterativeHoleFillingImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VotingBinaryIterativeHoleFillingImageFilter); diff --git a/Modules/Segmentation/LevelSets/include/itkAnisotropicFourthOrderLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkAnisotropicFourthOrderLevelSetImageFilter.h index 547efe67645..1cde6ea5671 100644 --- a/Modules/Segmentation/LevelSets/include/itkAnisotropicFourthOrderLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkAnisotropicFourthOrderLevelSetImageFilter.h @@ -114,11 +114,11 @@ class ITK_TEMPLATE_EXPORT AnisotropicFourthOrderLevelSetImageFilter: protected: AnisotropicFourthOrderLevelSetImageFilter(); - ~AnisotropicFourthOrderLevelSetImageFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~AnisotropicFourthOrderLevelSetImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** This filter halts when the iteration count reaches the specified count. */ - virtual bool Halt() ITK_OVERRIDE + bool Halt() override { if ( this->GetElapsedIterations() == m_MaxFilterIteration ) { diff --git a/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.h b/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.h index d8dc900d151..4ea4b9a0712 100644 --- a/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.h @@ -120,10 +120,10 @@ class ITK_TEMPLATE_EXPORT BinaryMaskToNarrowBandPointSetFilter: TOutputMesh::PointDimension); /** Some typedefs associated with the output mesh. */ - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; /** Some typedefs associated with the output mesh. */ - void GenerateOutputInformation(void) ITK_OVERRIDE; + void GenerateOutputInformation(void) override; /** accept the input image */ using Superclass::SetInput; @@ -138,8 +138,8 @@ class ITK_TEMPLATE_EXPORT BinaryMaskToNarrowBandPointSetFilter: protected: BinaryMaskToNarrowBandPointSetFilter(); - ~BinaryMaskToNarrowBandPointSetFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~BinaryMaskToNarrowBandPointSetFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryMaskToNarrowBandPointSetFilter); diff --git a/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetFunction.h index 6aa39513c83..f742c66a8d5 100644 --- a/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetFunction.h @@ -74,17 +74,17 @@ class ITK_TEMPLATE_EXPORT CannySegmentationLevelSetFunction: /** Compute the Speed Image. The Speed Image is the distance to the canny edges. */ - virtual void CalculateSpeedImage() ITK_OVERRIDE; + void CalculateSpeedImage() override; /** Compute the advection image. The Advection Image is the gradeint image attenuated with the distance to the canny edges. */ - virtual void CalculateAdvectionImage() ITK_OVERRIDE; + void CalculateAdvectionImage() override; /** Compute the distance image. This is the distance to the canny * edges. */ virtual void CalculateDistanceImage(); - virtual void Initialize(const RadiusType & r) ITK_OVERRIDE + void Initialize(const RadiusType & r) override { Superclass::Initialize(r); @@ -106,7 +106,7 @@ class ITK_TEMPLATE_EXPORT CannySegmentationLevelSetFunction: m_Distance = DanielssonDistanceMapImageFilter< ImageType, ImageType >::New(); } - virtual ~CannySegmentationLevelSetFunction() ITK_OVERRIDE {} + ~CannySegmentationLevelSetFunction() override {} ITK_DISALLOW_COPY_AND_ASSIGN(CannySegmentationLevelSetFunction); diff --git a/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetImageFilter.h index 79927995a9c..a1cd16f374b 100644 --- a/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkCannySegmentationLevelSetImageFilter.h @@ -186,7 +186,7 @@ class ITK_TEMPLATE_EXPORT CannySegmentationLevelSetImageFilter: #endif protected: - ~CannySegmentationLevelSetImageFilter() ITK_OVERRIDE {} + ~CannySegmentationLevelSetImageFilter() override {} CannySegmentationLevelSetImageFilter(); private: diff --git a/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.h b/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.h index dfad69c2208..1d12ca1fceb 100644 --- a/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.h @@ -157,11 +157,11 @@ class ITK_TEMPLATE_EXPORT CollidingFrontsImageFilter: protected: CollidingFrontsImageFilter(); - virtual ~CollidingFrontsImageFilter() ITK_OVERRIDE {} + ~CollidingFrontsImageFilter() override {} - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void PrintSelf(std::ostream &, Indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream &, Indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(CollidingFrontsImageFilter); diff --git a/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx index 2673440c1d1..d0aed11e323 100644 --- a/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx @@ -29,8 +29,8 @@ template< typename TInputImage, typename TOutputImage > CollidingFrontsImageFilter< TInputImage, TOutputImage > ::CollidingFrontsImageFilter() { - m_SeedPoints1 = ITK_NULLPTR; - m_SeedPoints2 = ITK_NULLPTR; + m_SeedPoints1 = nullptr; + m_SeedPoints2 = nullptr; m_StopOnTargets = false; m_ApplyConnectivity = true; m_NegativeEpsilon = -1E-6; diff --git a/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h index 47f1077dff1..70cd1affbbc 100644 --- a/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h @@ -93,14 +93,14 @@ class ITK_TEMPLATE_EXPORT CurvesLevelSetFunction: Superclass::ImageDimension); /** Compute speed image from feature image. */ - virtual void CalculateSpeedImage() ITK_OVERRIDE; + void CalculateSpeedImage() override; /** Compute the advection field from feature image. */ - virtual void CalculateAdvectionImage() ITK_OVERRIDE; + void CalculateAdvectionImage() override; /** The curvature speed is same as the propagation speed. */ - virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, GlobalDataStruct *gd) const ITK_OVERRIDE + ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, + const FloatOffsetType & offset, GlobalDataStruct *gd) const override { return this->PropagationSpeed(neighborhood, offset, gd); } /** Set/Get the sigma for the Gaussian kernel used to compute the gradient @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT CurvesLevelSetFunction: double GetDerivativeSigma() { return m_DerivativeSigma; } - virtual void Initialize(const RadiusType & r) ITK_OVERRIDE; + void Initialize(const RadiusType & r) override; protected: CurvesLevelSetFunction() : @@ -124,11 +124,11 @@ class ITK_TEMPLATE_EXPORT CurvesLevelSetFunction: this->SetCurvatureWeight(NumericTraits< ScalarValueType >::OneValue()); } - virtual ~CurvesLevelSetFunction() ITK_OVERRIDE {} + ~CurvesLevelSetFunction() override {} ITK_DISALLOW_COPY_AND_ASSIGN(CurvesLevelSetFunction); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "DerivativeSigma: " << m_DerivativeSigma << std::endl; diff --git a/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetImageFilter.h index 63eea37c8e8..18e2494fe3b 100644 --- a/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetImageFilter.h @@ -144,16 +144,16 @@ class ITK_TEMPLATE_EXPORT CurvesLevelSetImageFilter: #endif protected: - ~CurvesLevelSetImageFilter() ITK_OVERRIDE {} + ~CurvesLevelSetImageFilter() override {} CurvesLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; ITK_DISALLOW_COPY_AND_ASSIGN(CurvesLevelSetImageFilter); /** Overridden from Superclass to handle the case when PropagationScaling is zero.*/ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: CurvesFunctionPointer m_CurvesFunction; diff --git a/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.h b/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.h index 3d39bcb497b..eadfcb5b899 100644 --- a/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.h @@ -113,15 +113,15 @@ class ITK_TEMPLATE_EXPORT ExtensionVelocitiesImageFilter: protected: ExtensionVelocitiesImageFilter(); - ~ExtensionVelocitiesImageFilter() ITK_OVERRIDE {} + ~ExtensionVelocitiesImageFilter() override {} - virtual void GenerateDataFull() ITK_OVERRIDE; + void GenerateDataFull() override; - virtual void GenerateDataNarrowBand() ITK_OVERRIDE; + void GenerateDataNarrowBand() override; - virtual void AllocateOutput() ITK_OVERRIDE; + void AllocateOutput() override; - virtual void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ExtensionVelocitiesImageFilter); diff --git a/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx index e1a55f279e8..6638fdee8d0 100644 --- a/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx @@ -74,7 +74,7 @@ ExtensionVelocitiesImageFilter< TLevelSet, TAuxValue, VAuxDimension > { if ( idx >= VAuxDimension || this->GetNumberOfIndexedInputs() < idx + 2 ) { - return ITK_NULLPTR; + return nullptr; } return dynamic_cast< AuxImageType * >( @@ -92,7 +92,7 @@ ExtensionVelocitiesImageFilter< TLevelSet, TAuxValue, VAuxDimension > { if ( idx >= VAuxDimension || this->GetNumberOfIndexedOutputs() < idx + 2 ) { - return ITK_NULLPTR; + return nullptr; } return itkDynamicCastInDebugMode< AuxImageType * >(this->ProcessObject::GetOutput(idx + 1) ); diff --git a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetFunction.h index f18684682ff..f66e056fb17 100644 --- a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetFunction.h @@ -107,14 +107,14 @@ class ITK_TEMPLATE_EXPORT GeodesicActiveContourLevelSetFunction: Superclass::ImageDimension); /** Compute speed image from feature image. */ - virtual void CalculateSpeedImage() ITK_OVERRIDE; + void CalculateSpeedImage() override; /** Compute the advection field from feature image. */ - virtual void CalculateAdvectionImage() ITK_OVERRIDE; + void CalculateAdvectionImage() override; /** The curvature speed is same as the propagation speed. */ - virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, GlobalDataStruct *gd) const ITK_OVERRIDE + ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, + const FloatOffsetType & offset, GlobalDataStruct *gd) const override { return this->PropagationSpeed(neighborhood, offset, gd); } @@ -126,7 +126,7 @@ class ITK_TEMPLATE_EXPORT GeodesicActiveContourLevelSetFunction: double GetDerivativeSigma() { return m_DerivativeSigma; } - virtual void Initialize(const RadiusType & r) ITK_OVERRIDE + void Initialize(const RadiusType & r) override { Superclass::Initialize(r); @@ -145,11 +145,11 @@ class ITK_TEMPLATE_EXPORT GeodesicActiveContourLevelSetFunction: m_DerivativeSigma = 1.0; } - virtual ~GeodesicActiveContourLevelSetFunction() ITK_OVERRIDE {} + ~GeodesicActiveContourLevelSetFunction() override {} ITK_DISALLOW_COPY_AND_ASSIGN(GeodesicActiveContourLevelSetFunction); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: double m_DerivativeSigma; diff --git a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetImageFilter.h index 3f8a9c18458..b8bd1e322cf 100644 --- a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourLevelSetImageFilter.h @@ -150,16 +150,16 @@ class ITK_TEMPLATE_EXPORT GeodesicActiveContourLevelSetImageFilter: { return m_GeodesicActiveContourFunction->GetDerivativeSigma(); } protected: - ~GeodesicActiveContourLevelSetImageFilter() ITK_OVERRIDE {} + ~GeodesicActiveContourLevelSetImageFilter() override {} GeodesicActiveContourLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; ITK_DISALLOW_COPY_AND_ASSIGN(GeodesicActiveContourLevelSetImageFilter); /** Overridden from Superclass to handle the case when PropagationScaling is zero.*/ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: GeodesicActiveContourFunctionPointer m_GeodesicActiveContourFunction; diff --git a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.h index 26a21cf74aa..f4f0b32d91d 100644 --- a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.h @@ -124,14 +124,14 @@ class ITK_TEMPLATE_EXPORT GeodesicActiveContourShapePriorLevelSetFunction: Superclass::ImageDimension); /** Compute speed image from feature image. */ - virtual void CalculateSpeedImage() ITK_OVERRIDE; + void CalculateSpeedImage() override; /** Compute the advection field from feature image. */ - virtual void CalculateAdvectionImage() ITK_OVERRIDE; + void CalculateAdvectionImage() override; /** The curvature speed is same as the propagation speed. */ - virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, GlobalDataStruct *gd) const ITK_OVERRIDE + ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, + const FloatOffsetType & offset, GlobalDataStruct *gd) const override { return this->PropagationSpeed(neighborhood, offset, gd); } /** Set/Get the sigma for the Gaussian kernel used to compute the gradient @@ -141,7 +141,7 @@ class ITK_TEMPLATE_EXPORT GeodesicActiveContourShapePriorLevelSetFunction: double GetDerivativeSigma() { return m_DerivativeSigma; } - virtual void Initialize(const RadiusType & r) ITK_OVERRIDE + void Initialize(const RadiusType & r) override { Superclass::Initialize(r); @@ -162,11 +162,11 @@ class ITK_TEMPLATE_EXPORT GeodesicActiveContourShapePriorLevelSetFunction: m_DerivativeSigma = 1.0; } - virtual ~GeodesicActiveContourShapePriorLevelSetFunction() ITK_OVERRIDE {} + ~GeodesicActiveContourShapePriorLevelSetFunction() override {} ITK_DISALLOW_COPY_AND_ASSIGN(GeodesicActiveContourShapePriorLevelSetFunction); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: double m_DerivativeSigma; diff --git a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetImageFilter.h index 8eb3e2f120a..d543e670a91 100644 --- a/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetImageFilter.h @@ -161,15 +161,15 @@ class ITK_TEMPLATE_EXPORT GeodesicActiveContourShapePriorLevelSetImageFilter: { return m_GeodesicActiveContourFunction->GetDerivativeSigma(); } protected: - ~GeodesicActiveContourShapePriorLevelSetImageFilter() ITK_OVERRIDE {} + ~GeodesicActiveContourShapePriorLevelSetImageFilter() override {} GeodesicActiveContourShapePriorLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Overridden from Superclass to handle the case when PropagationScaling is zero * and CurvatureScaling is non-zero.*/ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(GeodesicActiveContourShapePriorLevelSetImageFilter); diff --git a/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.h b/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.h index d39bcd37cb8..4c6e9c7e8cf 100644 --- a/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.h @@ -133,11 +133,11 @@ class ITK_TEMPLATE_EXPORT ImplicitManifoldNormalVectorFilter: protected: ImplicitManifoldNormalVectorFilter(); - ~ImplicitManifoldNormalVectorFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ImplicitManifoldNormalVectorFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** This calls SetNormalBand to create the band of normals to process. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** This function sets the band for normal vector processing. */ void SetNormalBand(); @@ -149,11 +149,11 @@ class ITK_TEMPLATE_EXPORT ImplicitManifoldNormalVectorFilter: /** This function does nothing. The output initialization is handled by Initialize. */ - virtual void CopyInputToOutput() ITK_OVERRIDE {} + void CopyInputToOutput() override {} /** This is the stopping criterion function used in the iterative finite difference scheme. */ - virtual bool Halt() ITK_OVERRIDE + bool Halt() override { if ( this->GetElapsedIterations() == m_MaxIteration ) { @@ -167,7 +167,7 @@ class ITK_TEMPLATE_EXPORT ImplicitManifoldNormalVectorFilter: protected: /** This function implements the unit norm constraint for normal vectors. */ - virtual NormalVectorType DataConstraint(const NormalVectorType & data) const ITK_OVERRIDE + NormalVectorType DataConstraint(const NormalVectorType & data) const override { return ( data / ( m_MinVectorNorm + data.GetNorm() ) ); } @@ -175,7 +175,7 @@ class ITK_TEMPLATE_EXPORT ImplicitManifoldNormalVectorFilter: /** This function implements unsharp masking which is turned ON/OFF by the UnsharpMaskingFlag and controlled by the UnsharpMaskingWeight parameters. */ - virtual void PostProcessOutput() ITK_OVERRIDE; + void PostProcessOutput() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImplicitManifoldNormalVectorFilter); diff --git a/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx b/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx index 5c9c8918d2d..6344687dda8 100644 --- a/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx @@ -28,7 +28,7 @@ ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage > ::ImplicitManifoldNormalVectorFilter() { this->SetPrecomputeFlag(true); - m_NormalFunction = ITK_NULLPTR; + m_NormalFunction = nullptr; // set defaults for parameters m_IsoLevelLow = NumericTraits< NodeValueType >::ZeroValue(); @@ -113,7 +113,7 @@ ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage > } else { - output->SetPixel(index, ITK_NULLPTR); + output->SetPixel(index, nullptr); } ++it; } diff --git a/Modules/Segmentation/LevelSets/include/itkIsotropicFourthOrderLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkIsotropicFourthOrderLevelSetImageFilter.h index 9a98e044dd5..922f6bef00a 100644 --- a/Modules/Segmentation/LevelSets/include/itkIsotropicFourthOrderLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkIsotropicFourthOrderLevelSetImageFilter.h @@ -104,8 +104,8 @@ class ITK_TEMPLATE_EXPORT IsotropicFourthOrderLevelSetImageFilter: protected: IsotropicFourthOrderLevelSetImageFilter(); - ~IsotropicFourthOrderLevelSetImageFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~IsotropicFourthOrderLevelSetImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** The LevelSetFunctionWithRefitTerm object. */ typename FunctionType::Pointer m_Function; @@ -114,7 +114,7 @@ class ITK_TEMPLATE_EXPORT IsotropicFourthOrderLevelSetImageFilter: unsigned int m_MaxFilterIteration; /** This filter halts when the iteration count reaches the specified count. */ - virtual bool Halt() ITK_OVERRIDE + bool Halt() override { if ( this->GetElapsedIterations() == m_MaxFilterIteration ) { return true; } else { return false; } diff --git a/Modules/Segmentation/LevelSets/include/itkLaplacianSegmentationLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkLaplacianSegmentationLevelSetFunction.h index b1e2705c648..f6b71e2b95c 100644 --- a/Modules/Segmentation/LevelSets/include/itkLaplacianSegmentationLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkLaplacianSegmentationLevelSetFunction.h @@ -59,9 +59,9 @@ class ITK_TEMPLATE_EXPORT LaplacianSegmentationLevelSetFunction: itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension); - virtual void CalculateSpeedImage() ITK_OVERRIDE; + void CalculateSpeedImage() override; - virtual void Initialize(const RadiusType & r) ITK_OVERRIDE + void Initialize(const RadiusType & r) override { Superclass::Initialize(r); @@ -76,7 +76,7 @@ class ITK_TEMPLATE_EXPORT LaplacianSegmentationLevelSetFunction: * otherwise. in fact, SegmentationLevelSetImageFilter tries to set * it when SetFeatureScaling is called. */ - void SetAdvectionWeight(const ScalarValueType value) ITK_OVERRIDE + void SetAdvectionWeight(const ScalarValueType value) override { if ( Math::ExactlyEquals(value, NumericTraits< ScalarValueType >::ZeroValue()) ) { @@ -93,7 +93,7 @@ class ITK_TEMPLATE_EXPORT LaplacianSegmentationLevelSetFunction: this->SetCurvatureWeight(1.0); } - virtual ~LaplacianSegmentationLevelSetFunction() ITK_OVERRIDE {} + ~LaplacianSegmentationLevelSetFunction() override {} ITK_DISALLOW_COPY_AND_ASSIGN(LaplacianSegmentationLevelSetFunction); }; diff --git a/Modules/Segmentation/LevelSets/include/itkLaplacianSegmentationLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkLaplacianSegmentationLevelSetImageFilter.h index 1045f8ef0b6..73f1e7166ce 100644 --- a/Modules/Segmentation/LevelSets/include/itkLaplacianSegmentationLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkLaplacianSegmentationLevelSetImageFilter.h @@ -128,10 +128,10 @@ class ITK_TEMPLATE_EXPORT LaplacianSegmentationLevelSetImageFilter: itkNewMacro(Self); protected: - ~LaplacianSegmentationLevelSetImageFilter() ITK_OVERRIDE {} + ~LaplacianSegmentationLevelSetImageFilter() override {} LaplacianSegmentationLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LaplacianSegmentationLevelSetImageFilter); diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h index 2ca2f97a605..c33e5ee96cd 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h @@ -136,7 +136,7 @@ class ITK_TEMPLATE_EXPORT LevelSetFunction: /** Curvature speed. Can be used to spatially modify the effects of curvature . The default implementation returns one. */ virtual ScalarValueType CurvatureSpeed(const NeighborhoodType &, - const FloatOffsetType &, GlobalDataStruct * = 0 + const FloatOffsetType &, GlobalDataStruct * = nullptr ) const { return NumericTraits< ScalarValueType >::OneValue(); } @@ -178,9 +178,9 @@ class ITK_TEMPLATE_EXPORT LevelSetFunction: { return m_EpsilonMagnitude; } /** Compute the equation value. */ - virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, + PixelType ComputeUpdate( const NeighborhoodType & neighborhood, void *globalData, - const FloatOffsetType & = FloatOffsetType(0.0) ) ITK_OVERRIDE; + const FloatOffsetType & = FloatOffsetType(0.0) ) override; /** Computes the time step for an update given a global data structure. * The data used in the computation may take different forms depending on @@ -188,7 +188,7 @@ class ITK_TEMPLATE_EXPORT LevelSetFunction: * instance of the equation object itself since the equation object must * remain stateless for thread safety. The global data is therefore managed * for each thread by the finite difference solver filters. */ - virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const ITK_OVERRIDE; + TimeStepType ComputeGlobalTimeStep(void *GlobalData) const override; /** Returns a pointer to a global data structure that is passed to this * object from the solver at each calculation. The idea is that the solver @@ -197,7 +197,7 @@ class ITK_TEMPLATE_EXPORT LevelSetFunction: * data should also be initialized in this method. Global data can be used * for caching any values used or reused by the FunctionObject. Each thread * should receive its own global data struct. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { GlobalDataStruct *ans = new GlobalDataStruct(); @@ -216,7 +216,7 @@ class ITK_TEMPLATE_EXPORT LevelSetFunction: * data pointer, it passes it to this method, which frees the memory. * The solver cannot free the memory because it does not know the type * to which the pointer points. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE + void ReleaseGlobalDataPointer(void *GlobalData) const override { delete (GlobalDataStruct *)GlobalData; } /** */ @@ -301,8 +301,8 @@ class ITK_TEMPLATE_EXPORT LevelSetFunction: { } - virtual ~LevelSetFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & s, Indent indent) const ITK_OVERRIDE; + ~LevelSetFunction() override {} + void PrintSelf(std::ostream & s, Indent indent) const override; /** Constants used in the time step calculation. */ static double m_WaveDT; diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.h b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.h index f9ccac8eba6..0b951dd6bba 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.h +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.h @@ -114,7 +114,7 @@ class ITK_TEMPLATE_EXPORT LevelSetFunctionWithRefitTerm: * This calls the ComputeGlobalTimeStep method defined in LevelSetFunction * and then imposes our own restrictions for the refitting term on the * returned value. */ - virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const ITK_OVERRIDE; + TimeStepType ComputeGlobalTimeStep(void *GlobalData) const override; protected: /** The weight for the refitting term. */ @@ -125,7 +125,7 @@ class ITK_TEMPLATE_EXPORT LevelSetFunctionWithRefitTerm: ScalarValueType m_OtherPropagationWeight; LevelSetFunctionWithRefitTerm (); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Computes the curvature of a level set neighbothood in a way that matches the curvature computation from normal vectors. */ @@ -134,9 +134,9 @@ class ITK_TEMPLATE_EXPORT LevelSetFunctionWithRefitTerm: /** Defines the virtual function in LevelSetFunction to add the refitting * term. This function also calls OtherPropagationSpeed to provide a * mechanism for subclasses to define other propagation terms. */ - virtual ScalarValueType PropagationSpeed(const NeighborhoodType &, + ScalarValueType PropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, - GlobalDataStruct * = 0) const ITK_OVERRIDE; + GlobalDataStruct * = 0) const override; /** Called by PropagationSpeed and added on to the refitting term. Function * classes derived from this class should define this method for their diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx index 1f07527b08d..65b61038e73 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx @@ -166,9 +166,9 @@ LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType > NodeType * targetnode = m_SparseTargetImage->GetPixel (idx); ScalarValueType refitterm, cv, tcv; - if ( ( targetnode == ITK_NULLPTR ) || ( targetnode->m_CurvatureFlag == false ) ) + if ( ( targetnode == nullptr ) || ( targetnode->m_CurvatureFlag == false ) ) { - if ( targetnode == ITK_NULLPTR ) + if ( targetnode == nullptr ) { itkExceptionMacro(<< "required node has null pointer\n"); } diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h b/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h index dedd6a7ae8a..a31c91b817c 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h @@ -132,8 +132,8 @@ class ITK_TEMPLATE_EXPORT LevelSetNeighborhoodExtractor: protected: LevelSetNeighborhoodExtractor(); - ~LevelSetNeighborhoodExtractor() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LevelSetNeighborhoodExtractor() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; typename LevelSetImageType::PixelType GetLargeValue() const { return m_LargeValue; } @@ -145,7 +145,7 @@ class ITK_TEMPLATE_EXPORT LevelSetNeighborhoodExtractor: virtual double CalculateDistance(IndexType & index); - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; bool GetLastPointIsInside() const { return m_LastPointIsInside; } diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx b/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx index e9906c19299..6a321bf3057 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx @@ -34,12 +34,12 @@ template< typename TLevelSet > LevelSetNeighborhoodExtractor< TLevelSet > ::LevelSetNeighborhoodExtractor() : m_LevelSetValue(0.0), - m_InsidePoints(ITK_NULLPTR), - m_OutsidePoints(ITK_NULLPTR), - m_InputLevelSet(ITK_NULLPTR), + m_InsidePoints(nullptr), + m_OutsidePoints(nullptr), + m_InputLevelSet(nullptr), m_NarrowBanding(false), m_NarrowBandwidth(12.0), - m_InputNarrowBand(ITK_NULLPTR), + m_InputNarrowBand(nullptr), m_LargeValue(NumericTraits< PixelType >::max()), m_LastPointIsInside(false) { @@ -116,7 +116,7 @@ LevelSetNeighborhoodExtractor< TLevelSet > { if ( !m_InputLevelSet ) { - itkExceptionMacro(<< "Input level set is ITK_NULLPTR"); + itkExceptionMacro(<< "Input level set is nullptr"); } this->Initialize(); diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h b/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h index d3d30d27174..b0038153f24 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT LevelSetVelocityNeighborhoodExtractor: { if ( idx >= VAuxDimension ) { - return ITK_NULLPTR; + return nullptr; } else { @@ -125,12 +125,12 @@ class ITK_TEMPLATE_EXPORT LevelSetVelocityNeighborhoodExtractor: protected: LevelSetVelocityNeighborhoodExtractor(); - ~LevelSetVelocityNeighborhoodExtractor() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~LevelSetVelocityNeighborhoodExtractor() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; - virtual double CalculateDistance(Index & index) ITK_OVERRIDE; + double CalculateDistance(Index & index) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetVelocityNeighborhoodExtractor); diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx b/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx index 74012ab71b3..89387b1a940 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx @@ -31,11 +31,11 @@ template< typename TLevelSet, typename TAuxValue, LevelSetVelocityNeighborhoodExtractor< TLevelSet, TAuxValue, VAuxDimension > ::LevelSetVelocityNeighborhoodExtractor() { - m_AuxInsideValues = ITK_NULLPTR; - m_AuxOutsideValues = ITK_NULLPTR; + m_AuxInsideValues = nullptr; + m_AuxOutsideValues = nullptr; for ( unsigned int i = 0; i < VAuxDimension; ++i ) { - m_AuxImage[i] = ITK_NULLPTR; + m_AuxImage[i] = nullptr; } } diff --git a/Modules/Segmentation/LevelSets/include/itkNarrowBandCurvesLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkNarrowBandCurvesLevelSetImageFilter.h index fcb798c82c0..ffdfaa4cde7 100644 --- a/Modules/Segmentation/LevelSets/include/itkNarrowBandCurvesLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkNarrowBandCurvesLevelSetImageFilter.h @@ -150,16 +150,16 @@ class ITK_TEMPLATE_EXPORT NarrowBandCurvesLevelSetImageFilter: #endif protected: - ~NarrowBandCurvesLevelSetImageFilter() ITK_OVERRIDE {} + ~NarrowBandCurvesLevelSetImageFilter() override {} NarrowBandCurvesLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; ITK_DISALLOW_COPY_AND_ASSIGN(NarrowBandCurvesLevelSetImageFilter); /** Overridden from Superclass to handle the case when Propagation * Scaling is zero.*/ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: CurvesFunctionPointer m_CurvesFunction; diff --git a/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.h index 2362d9a0c2b..83b72c30ea3 100644 --- a/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.h @@ -342,7 +342,7 @@ class ITK_TEMPLATE_EXPORT NarrowBandLevelSetImageFilter: return this->GetNumberOfIterations(); } - virtual void SetMaximumRMSError(const double) ITK_OVERRIDE + void SetMaximumRMSError(const double) override { itkWarningMacro( "The current implmentation of this solver does not compute maximum RMS change. The maximum RMS error value will not be set or used."); @@ -356,14 +356,14 @@ class ITK_TEMPLATE_EXPORT NarrowBandLevelSetImageFilter: #endif protected: - virtual ~NarrowBandLevelSetImageFilter() ITK_OVERRIDE {} + ~NarrowBandLevelSetImageFilter() override {} NarrowBandLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Overrides parent implementation */ - virtual void InitializeIteration() ITK_OVERRIDE + void InitializeIteration() override { Superclass::InitializeIteration(); // Estimate the progress of the filter @@ -374,11 +374,11 @@ class ITK_TEMPLATE_EXPORT NarrowBandLevelSetImageFilter: /** Tells the solver how to reinitialize the narrowband when the reinitialization * criterion meets */ - virtual void CreateNarrowBand() ITK_OVERRIDE; + void CreateNarrowBand() override; /** Overridden from ProcessObject to set certain values before starting the * finite difference solver and then create an appropriate output */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Flag which sets the inward/outward direction of propagation speed. See SetReverseExpansionDirection for more information. */ diff --git a/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx index a0c58cdc87d..9b4ba64cc91 100644 --- a/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx @@ -41,7 +41,7 @@ NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, TOu this->SetNumberOfRequiredInputs(2); //this->SetNarrowBandInnerRadius(); //this->SetNarrowBandTotalRadius(); - m_SegmentationFunction = ITK_NULLPTR; + m_SegmentationFunction = nullptr; m_IsoFilter = IsoFilterType::New(); m_ChamferFilter = ChamferFilterType::New(); @@ -78,7 +78,7 @@ void NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, TOutputImage > ::GenerateData() { - if ( m_SegmentationFunction == ITK_NULLPTR ) + if ( m_SegmentationFunction == nullptr ) { itkExceptionMacro("No finite difference function was specified."); } // A positive speed value causes surface expansion, the opposite of the @@ -138,8 +138,8 @@ NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, TOu m_ChamferFilter->Update(); this->GraftOutput( m_ChamferFilter->GetOutput() ); - m_IsoFilter->SetInput(ITK_NULLPTR); - m_ChamferFilter->SetInput(ITK_NULLPTR); + m_IsoFilter->SetInput(nullptr); + m_ChamferFilter->SetInput(nullptr); } } // end namespace itk diff --git a/Modules/Segmentation/LevelSets/include/itkNarrowBandThresholdSegmentationLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkNarrowBandThresholdSegmentationLevelSetImageFilter.h index 3173b23c96f..112f830a02c 100644 --- a/Modules/Segmentation/LevelSets/include/itkNarrowBandThresholdSegmentationLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkNarrowBandThresholdSegmentationLevelSetImageFilter.h @@ -202,10 +202,10 @@ class ITK_TEMPLATE_EXPORT NarrowBandThresholdSegmentationLevelSetImageFilter: #endif protected: - ~NarrowBandThresholdSegmentationLevelSetImageFilter() ITK_OVERRIDE {} + ~NarrowBandThresholdSegmentationLevelSetImageFilter() override {} NarrowBandThresholdSegmentationLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; NarrowBandThresholdSegmentationLevelSetImageFilter(const Self &); // purposely // not impl. diff --git a/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.h b/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.h index e51a0d29a45..4f001be3e1b 100644 --- a/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.h @@ -125,17 +125,17 @@ class ITK_TEMPLATE_EXPORT NormalVectorDiffusionFunction: * nodes to compute and store the flux vectors (first derivatives of the * normal vectors. ComputeUpdateNormal then takes derivatives of the flux * vectors. This way we avoid repeating the same flux computations. */ - virtual void PrecomputeSparseUpdate(NeighborhoodType & it) const ITK_OVERRIDE; + void PrecomputeSparseUpdate(NeighborhoodType & it) const override; /** The actual update rule for the normal vectors. */ - virtual NormalVectorType ComputeSparseUpdate(NeighborhoodType & neighborhood, + NormalVectorType ComputeSparseUpdate(NeighborhoodType & neighborhood, void *globalData, - const FloatOffsetType & offset) const ITK_OVERRIDE; + const FloatOffsetType & offset) const override; protected: NormalVectorDiffusionFunction(); - ~NormalVectorDiffusionFunction() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NormalVectorDiffusionFunction() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** The method called in anisotropic diffusion to inhibit diffusion across areas with large curvature. */ diff --git a/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx b/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx index c7307e9b052..d9f4b10dfec 100644 --- a/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx @@ -84,7 +84,7 @@ NormalVectorDiffusionFunction< TSparseImageType > for ( i = 0; i < ImageDimension; i++ ) // flux offset axis { PreviousNode = it.GetPrevious (i); - if ( PreviousNode == ITK_NULLPTR ) + if ( PreviousNode == nullptr ) { for ( j = 0; j < ImageDimension; j++ ) { @@ -100,7 +100,7 @@ NormalVectorDiffusionFunction< TSparseImageType > { // compute differences (j-axis) in line with center pixel OtherNode = it.GetPrevious (j); - if ( OtherNode == ITK_NULLPTR ) + if ( OtherNode == nullptr ) { NegativeSidePixel[0] = CenterPixel; } @@ -109,7 +109,7 @@ NormalVectorDiffusionFunction< TSparseImageType > NegativeSidePixel[0] = OtherNode->m_Data; } OtherNode = it.GetNext (j); - if ( OtherNode == ITK_NULLPTR ) + if ( OtherNode == nullptr ) { PositiveSidePixel[0] = CenterPixel; } @@ -120,7 +120,7 @@ NormalVectorDiffusionFunction< TSparseImageType > // compute derivative (j-axis) offset from center pixel on i-axis OtherNode = it.GetPixel (center - stride[i] - stride[j]); - if ( OtherNode == ITK_NULLPTR ) + if ( OtherNode == nullptr ) { NegativeSidePixel[1] = PreviousPixel; } @@ -129,7 +129,7 @@ NormalVectorDiffusionFunction< TSparseImageType > NegativeSidePixel[1] = OtherNode->m_Data; } OtherNode = it.GetPixel (center - stride[i] + stride[j]); - if ( OtherNode == ITK_NULLPTR ) + if ( OtherNode == nullptr ) { PositiveSidePixel[1] = PreviousPixel; } @@ -194,7 +194,7 @@ NormalVectorDiffusionFunction< TSparseImageType > for ( i = 0; i < ImageDimension; i++ ) // flux offset axis { NextNode = it.GetNext (i); - if ( NextNode == ITK_NULLPTR ) + if ( NextNode == nullptr ) { change -= CenterNode->m_Flux[i] * neighborhoodScales[i]; } diff --git a/Modules/Segmentation/LevelSets/include/itkNormalVectorFunctionBase.h b/Modules/Segmentation/LevelSets/include/itkNormalVectorFunctionBase.h index 134796c9822..d4efbdf4e68 100644 --- a/Modules/Segmentation/LevelSets/include/itkNormalVectorFunctionBase.h +++ b/Modules/Segmentation/LevelSets/include/itkNormalVectorFunctionBase.h @@ -83,11 +83,11 @@ class ITK_TEMPLATE_EXPORT NormalVectorFunctionBase: typedef typename NodeType::NodeDataType NormalVectorType; /** Globaldata methods are not needed in this class. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE { return ITK_NULLPTR; } - virtual void ReleaseGlobalDataPointer(void *) const ITK_OVERRIDE {} + void * GetGlobalDataPointer() const override { return nullptr; } + void ReleaseGlobalDataPointer(void *) const override {} /** For the global time step, we return the time step parameter. */ - virtual TimeStepType ComputeGlobalTimeStep(void *) const ITK_OVERRIDE + TimeStepType ComputeGlobalTimeStep(void *) const override { return m_TimeStep; } /** Sets the time step. */ @@ -100,8 +100,8 @@ class ITK_TEMPLATE_EXPORT NormalVectorFunctionBase: protected: NormalVectorFunctionBase(); - ~NormalVectorFunctionBase() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~NormalVectorFunctionBase() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: /** The time step for normal vector finite difference computations. */ diff --git a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h index d6269694d91..0400133942b 100644 --- a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.h @@ -340,8 +340,8 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter: protected: ParallelSparseFieldLevelSetImageFilter(); - ~ParallelSparseFieldLevelSetImageFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ParallelSparseFieldLevelSetImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Connectivity information for examining neighbor pixels. */ ParallelSparseFieldCityBlockNeighborList< NeighborhoodIterator< OutputImageType > > @@ -417,20 +417,20 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter: /** Reimplement the GenerateData() function from FiniteDifferenceImageFilter * for more effective multithreading */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Copies the input to the output image. Processing occurs on the output * image, so the data type of the output image determines the precision of * the calculations (i.e. double or float). This method overrides the * parent class method to do some additional processing. */ - void CopyInputToOutput() ITK_OVERRIDE; + void CopyInputToOutput() override; /** Reserves memory in the update buffer */ - void AllocateUpdateBuffer() ITK_OVERRIDE {} + void AllocateUpdateBuffer() override {} /** Constructs the sparse field layers and initializes their values. Also * creates data structures that are NOT local to a thread. */ - void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Constructs the active layer and initialize the first layers inside and * outside of the active layer. The active layer defines the position of the @@ -538,14 +538,14 @@ class ITK_TEMPLATE_EXPORT ParallelSparseFieldLevelSetImageFilter: ThreadIdType itkNotUsed(ThreadId) ); /** This method is not implemented or necessary for this solver */ - void ApplyUpdate(const TimeStepType&) ITK_OVERRIDE {} + void ApplyUpdate(const TimeStepType&) override {} /** Does the actual work of updating the output from the UpdateContainer over * an output region supplied by the multithreading mechanism. */ virtual void ThreadedApplyUpdate(const TimeStepType& dt, ThreadIdType ThreadId); /** This method is not implemented or necessary for this solver */ - TimeStepType CalculateChange() ITK_OVERRIDE + TimeStepType CalculateChange() override { return NumericTraits< TimeStepType >::ZeroValue(); } diff --git a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx index b595f692943..d8f1a049861 100644 --- a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx @@ -137,11 +137,11 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage > m_SplitAxis(0), m_ZSize(0), m_BoundaryChanged(false), - m_Boundary(ITK_NULLPTR), - m_GlobalZHistogram(ITK_NULLPTR), - m_MapZToThreadNumber(ITK_NULLPTR), - m_ZCumulativeFrequency(ITK_NULLPTR), - m_Data(ITK_NULLPTR), + m_Boundary(nullptr), + m_GlobalZHistogram(nullptr), + m_MapZToThreadNumber(nullptr), + m_ZCumulativeFrequency(nullptr), + m_Data(nullptr), m_Stop(false), m_InterpolateSurfaceLocation(true), m_BoundsCheckingActive(false) @@ -722,7 +722,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage > } // deallocate the shifted-image - m_ShiftedImage = ITK_NULLPTR; + m_ShiftedImage = nullptr; } template< typename TInputImage, typename TOutputImage > @@ -980,16 +980,16 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage > // Delete data structures used for load distribution and balancing. delete[] m_GlobalZHistogram; - m_GlobalZHistogram = ITK_NULLPTR; + m_GlobalZHistogram = nullptr; delete[] m_ZCumulativeFrequency; - m_ZCumulativeFrequency = ITK_NULLPTR; + m_ZCumulativeFrequency = nullptr; delete[] m_MapZToThreadNumber; - m_MapZToThreadNumber = ITK_NULLPTR; + m_MapZToThreadNumber = nullptr; delete[] m_Boundary; - m_Boundary = ITK_NULLPTR; + m_Boundary = nullptr; // Deallocate the status image. - m_StatusImage = ITK_NULLPTR; + m_StatusImage = nullptr; // Remove the barrier from the system. // m_Barrier->Remove (); @@ -1000,7 +1000,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage > for ( i = 0; i < 2 * static_cast< unsigned int >( m_NumberOfLayers ) + 1; i++ ) { // return all the nodes in layer i to the main node pool - LayerNodeType * nodePtr = ITK_NULLPTR; + LayerNodeType * nodePtr = nullptr; LayerPointerType layerPtr = m_Layers[i]; while ( !layerPtr->Empty() ) { @@ -1016,7 +1016,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage > m_Layers.clear(); } - if ( m_Data != ITK_NULLPTR ) + if ( m_Data != nullptr ) { // Deallocate the thread local data structures. for ( ThreadIdType ThreadId = 0; ThreadId < m_NumOfThreads; ThreadId++ ) @@ -1025,10 +1025,10 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage > delete[] m_Data[ThreadId].m_ZHistogram; - if ( m_Data[ThreadId].globalData != ITK_NULLPTR ) + if ( m_Data[ThreadId].globalData != nullptr ) { this->GetDifferenceFunction()->ReleaseGlobalDataPointer (m_Data[ThreadId].globalData); - m_Data[ThreadId].globalData = ITK_NULLPTR; + m_Data[ThreadId].globalData = nullptr; } // 1. delete nodes on the thread layers @@ -1108,7 +1108,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage > delete[] m_Data; } // if m_data != 0 - m_Data = ITK_NULLPTR; + m_Data = nullptr; } template< typename TInputImage, typename TOutputImage > @@ -1203,13 +1203,13 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage > if ( ThreadId == 0 ) { - str->Filter->m_StatusImage = ITK_NULLPTR; + str->Filter->m_StatusImage = nullptr; str->Filter->m_StatusImage = str->Filter->m_StatusImageTemp; - str->Filter->m_StatusImageTemp = ITK_NULLPTR; + str->Filter->m_StatusImageTemp = nullptr; - str->Filter->m_OutputImage = ITK_NULLPTR; + str->Filter->m_OutputImage = nullptr; str->Filter->m_OutputImage = str->Filter->m_OutputImageTemp; - str->Filter->m_OutputImageTemp = ITK_NULLPTR; + str->Filter->m_OutputImageTemp = nullptr; // str->Filter->GraftOutput(str->Filter->m_OutputImage); } @@ -2671,7 +2671,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage > for ( ThreadId = 0; ThreadId < m_NumOfThreads; ThreadId++ ) { os << indent << "ThreadId: " << ThreadId << std::endl; - if ( m_Data != ITK_NULLPTR ) + if ( m_Data != nullptr ) { for ( i = 0; i < m_Data[ThreadId].m_Layers.size(); i++ ) { diff --git a/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.h index a5cb7e0c3e9..31bc0eca277 100644 --- a/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.h @@ -132,15 +132,15 @@ class ITK_TEMPLATE_EXPORT ReinitializeLevelSetImageFilter: protected: ReinitializeLevelSetImageFilter(); - ~ReinitializeLevelSetImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~ReinitializeLevelSetImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** Internal typedefs. */ typedef Image< float, itkGetStaticConstMacro(SetDimension) > SpeedImageType; typedef LevelSetNeighborhoodExtractor< TLevelSet > LocatorType; typedef FastMarchingImageFilter< TLevelSet, SpeedImageType > FastMarchingImageFilterType; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; virtual void GenerateDataFull(); @@ -148,9 +148,9 @@ class ITK_TEMPLATE_EXPORT ReinitializeLevelSetImageFilter: virtual void AllocateOutput(); - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - virtual void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *) override; void SetOutputNarrowBand(NodeContainer *ptr) { m_OutputNarrowBand = ptr; } diff --git a/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx index f267ddff208..f424925dd9e 100644 --- a/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx @@ -39,8 +39,8 @@ ReinitializeLevelSetImageFilter< TLevelSet > m_NarrowBanding = false; m_InputNarrowBandwidth = 12.0; m_OutputNarrowBandwidth = 12.0; - m_InputNarrowBand = ITK_NULLPTR; - m_OutputNarrowBand = ITK_NULLPTR; + m_InputNarrowBand = nullptr; + m_OutputNarrowBand = nullptr; } /* diff --git a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetFunction.h index 1195ae454cd..89196cfa23e 100644 --- a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetFunction.h @@ -104,7 +104,7 @@ class ITK_TEMPLATE_EXPORT SegmentationLevelSetFunction: /** This method creates the appropriate member variable operators for the * level-set calculations. The argument to this function is a the radius * necessary for performing the level-set calculations. */ - virtual void Initialize(const RadiusType & r) ITK_OVERRIDE; + void Initialize(const RadiusType & r) override; /** This method must be defined in a subclass to implement a working function * object. This method is called before the solver begins its work to @@ -153,14 +153,14 @@ class ITK_TEMPLATE_EXPORT SegmentationLevelSetFunction: VectorType > m_VectorCast; /** Returns the propagation speed from the precalculated speed image.*/ - virtual ScalarValueType PropagationSpeed(const NeighborhoodType &, - const FloatOffsetType &, GlobalDataStruct *gd) const ITK_OVERRIDE; + ScalarValueType PropagationSpeed(const NeighborhoodType &, + const FloatOffsetType &, GlobalDataStruct *gd) const override; /** Advection field. Returns a vector from the computed advectionfield.*/ - virtual VectorType AdvectionField(const NeighborhoodType &, - const FloatOffsetType &, GlobalDataStruct *gd) const ITK_OVERRIDE; + VectorType AdvectionField(const NeighborhoodType &, + const FloatOffsetType &, GlobalDataStruct *gd) const override; - virtual ~SegmentationLevelSetFunction() ITK_OVERRIDE {} + ~SegmentationLevelSetFunction() override {} SegmentationLevelSetFunction() { m_SpeedImage = ImageType::New(); diff --git a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.h index f5ea5a017a9..79d26597a7b 100644 --- a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.h @@ -473,13 +473,13 @@ class ITK_TEMPLATE_EXPORT SegmentationLevelSetImageFilter: #endif protected: - virtual ~SegmentationLevelSetImageFilter() ITK_OVERRIDE {} + ~SegmentationLevelSetImageFilter() override {} SegmentationLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Overrides parent implementation */ - virtual void InitializeIteration() ITK_OVERRIDE + void InitializeIteration() override { Superclass::InitializeIteration(); // Estimate the progress of the filter @@ -489,7 +489,7 @@ class ITK_TEMPLATE_EXPORT SegmentationLevelSetImageFilter: /** Overridden from ProcessObject to set certain values before starting the * finite difference solver and then create an appropriate output */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Flag which sets the inward/outward direction of propagation speed. See SetReverseExpansionDirection for more information. */ diff --git a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx index b4dfdbf8cd0..c0ea42fec8b 100644 --- a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx @@ -36,7 +36,7 @@ SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType > this->SetNumberOfRequiredInputs(2); this->SetNumberOfLayers(TInputImage::ImageDimension); - m_SegmentationFunction = ITK_NULLPTR; + m_SegmentationFunction = nullptr; m_AutoGenerateSpeedAdvection = true; this->SetIsoSurfaceValue(NumericTraits< ValueType >::ZeroValue()); @@ -70,7 +70,7 @@ void SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType > ::GenerateData() { - if ( m_SegmentationFunction == ITK_NULLPTR ) + if ( m_SegmentationFunction == nullptr ) { itkExceptionMacro("No finite difference function was specified."); } diff --git a/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetFunction.h index b4d1fa71d10..c859ba53bdf 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetFunction.h @@ -99,14 +99,14 @@ class ITK_TEMPLATE_EXPORT ShapeDetectionLevelSetFunction: itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension); - virtual void CalculateSpeedImage() ITK_OVERRIDE; + void CalculateSpeedImage() override; /** The curvature speed is same as the propagation speed. */ - virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, - const FloatOffsetType & offset, GlobalDataStruct *gd) const ITK_OVERRIDE + ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood, + const FloatOffsetType & offset, GlobalDataStruct *gd) const override { return this->PropagationSpeed(neighborhood, offset, gd); } - virtual void Initialize(const RadiusType & r) ITK_OVERRIDE + void Initialize(const RadiusType & r) override { Superclass::Initialize(r); @@ -123,7 +123,7 @@ class ITK_TEMPLATE_EXPORT ShapeDetectionLevelSetFunction: this->SetCurvatureWeight(NumericTraits< ScalarValueType >::OneValue()); } - virtual ~ShapeDetectionLevelSetFunction() ITK_OVERRIDE {} + ~ShapeDetectionLevelSetFunction() override {} ITK_DISALLOW_COPY_AND_ASSIGN(ShapeDetectionLevelSetFunction); }; diff --git a/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.h index 0750da65dbf..5e36bc6f8e4 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.h @@ -133,16 +133,16 @@ class ITK_TEMPLATE_EXPORT ShapeDetectionLevelSetImageFilter: itkNewMacro(Self); protected: - ~ShapeDetectionLevelSetImageFilter() ITK_OVERRIDE {} + ~ShapeDetectionLevelSetImageFilter() override {} ShapeDetectionLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; ITK_DISALLOW_COPY_AND_ASSIGN(ShapeDetectionLevelSetImageFilter); /** Overridden from Superclass to handle the case when PropagationScaling is zero * and CurvatureScaling is non-zero.*/ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ShapeDetectionFunctionPointer m_ShapeDetectionFunction; diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.h b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.h index 7bbd14ceb2e..0bc31950811 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.h @@ -115,35 +115,35 @@ class ITK_TEMPLATE_EXPORT ShapePriorMAPCostFunction: * the current contour (defined by nodes of the active region * that are less than zero) which are outside the shape * specified by the input parameters. */ - virtual MeasureType ComputeLogInsideTerm(const ParametersType & parameters) const ITK_OVERRIDE; + MeasureType ComputeLogInsideTerm(const ParametersType & parameters) const override; /** Compute the gradient term component of the MAP cost function. * In particular, this method assume that ( 1 - FeatureImage ) approximates * a Gaussian (zero mean, unit variance) algon the normal of the evolving contour. * The gradient term is then given by a Laplacian of the goodness of fit of * the Gaussian. */ - virtual MeasureType ComputeLogGradientTerm(const ParametersType & parameters) const ITK_OVERRIDE; + MeasureType ComputeLogGradientTerm(const ParametersType & parameters) const override; /** Compute the shape prior component of the MAP cost function. * In particular, the method assumes that the shape parameters comes from * independent Gaussian distributions defined by the ShapeParameterMeans * and ShapeParameterVariances array. */ - virtual MeasureType ComputeLogShapePriorTerm(const ParametersType & parameters) const ITK_OVERRIDE; + MeasureType ComputeLogShapePriorTerm(const ParametersType & parameters) const override; /** Compute the pose prior component of the MAP cost function. * In particular, this method assumes that the pose parameters are * uniformly distributed and returns a constant of zero. */ - virtual MeasureType ComputeLogPosePriorTerm(const ParametersType & parameters) const ITK_OVERRIDE; + MeasureType ComputeLogPosePriorTerm(const ParametersType & parameters) const override; /** Initialize the cost function by making sure that all the components * are present. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; protected: ShapePriorMAPCostFunction(); - virtual ~ShapePriorMAPCostFunction() ITK_OVERRIDE {} + ~ShapePriorMAPCostFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ShapePriorMAPCostFunction); diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h index efa70a6de46..7103390458b 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h @@ -106,15 +106,15 @@ class ITK_TEMPLATE_EXPORT ShapePriorMAPCostFunctionBase: /** This method returns the value of the cost function corresponding * to the specified parameters. */ - virtual MeasureType GetValue(const ParametersType & parameters) const ITK_OVERRIDE; + MeasureType GetValue(const ParametersType & parameters) const override; /** This method returns the derivative of the cost function corresponding * to the specified parameters. */ - virtual void GetDerivative(const ParametersType &, DerivativeType &) const ITK_OVERRIDE + void GetDerivative(const ParametersType &, DerivativeType &) const override { itkExceptionMacro(<< "This function is currently not supported."); } /** Return the number of parameters. */ - virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfParameters(void) const override { return m_ShapeFunction->GetNumberOfParameters(); } /** Compute the inside term component of the MAP cost function. @@ -139,9 +139,9 @@ class ITK_TEMPLATE_EXPORT ShapePriorMAPCostFunctionBase: protected: ShapePriorMAPCostFunctionBase(); - virtual ~ShapePriorMAPCostFunctionBase() ITK_OVERRIDE {} + ~ShapePriorMAPCostFunctionBase() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; ShapeFunctionPointer m_ShapeFunction; NodeContainerPointer m_ActiveRegion; diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx index e1fcbdeb80e..3ac9e1a0658 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx @@ -29,9 +29,9 @@ template< typename TFeatureImage, typename TOutputPixel > ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel > ::ShapePriorMAPCostFunctionBase() { - m_ShapeFunction = ITK_NULLPTR; - m_ActiveRegion = ITK_NULLPTR; - m_FeatureImage = ITK_NULLPTR; + m_ShapeFunction = nullptr; + m_ActiveRegion = nullptr; + m_FeatureImage = nullptr; } /** diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.h index 31d1ae73918..4132eac53d6 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.h @@ -106,12 +106,12 @@ class ITK_TEMPLATE_EXPORT ShapePriorSegmentationLevelSetFunction: { return m_ShapeFunction; } /** Compute the equation value with the additional shape prior term. */ - virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood, + PixelType ComputeUpdate( const NeighborhoodType & neighborhood, void *globalData, - const FloatOffsetType & = FloatOffsetType(0.0) ) ITK_OVERRIDE; + const FloatOffsetType & = FloatOffsetType(0.0) ) override; /** Compute global time step from the global data structure. */ - virtual TimeStepType ComputeGlobalTimeStep(void *globalData) const ITK_OVERRIDE; + TimeStepType ComputeGlobalTimeStep(void *globalData) const override; /** A global data type used to store values needed to compute the time step. */ @@ -121,7 +121,7 @@ class ITK_TEMPLATE_EXPORT ShapePriorSegmentationLevelSetFunction: }; /** Returns a pointer to a global data structure for computing time step. */ - virtual void * GetGlobalDataPointer() const ITK_OVERRIDE + void * GetGlobalDataPointer() const override { ShapePriorGlobalDataStruct *ans = new ShapePriorGlobalDataStruct(); @@ -133,16 +133,16 @@ class ITK_TEMPLATE_EXPORT ShapePriorSegmentationLevelSetFunction: } /** Release the global data structure. */ - virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE + void ReleaseGlobalDataPointer(void *GlobalData) const override { delete (ShapePriorGlobalDataStruct *)GlobalData; } protected: ShapePriorSegmentationLevelSetFunction(); - virtual ~ShapePriorSegmentationLevelSetFunction() ITK_OVERRIDE {} + ~ShapePriorSegmentationLevelSetFunction() override {} ITK_DISALLOW_COPY_AND_ASSIGN(ShapePriorSegmentationLevelSetFunction); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx index 1c519c98d28..a7ff7793781 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx @@ -30,7 +30,7 @@ template< typename TImageType, typename TFeatureImageType > ShapePriorSegmentationLevelSetFunction< TImageType, TFeatureImageType > ::ShapePriorSegmentationLevelSetFunction() { - m_ShapeFunction = ITK_NULLPTR; + m_ShapeFunction = nullptr; m_ShapePriorWeight = NumericTraits< ScalarValueType >::ZeroValue(); } diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.h index a0773d4167a..5e14da7bc78 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.h @@ -168,18 +168,18 @@ class ITK_TEMPLATE_EXPORT ShapePriorSegmentationLevelSetImageFilter: itkGetConstReferenceMacro(CurrentParameters, ParametersType); protected: - virtual ~ShapePriorSegmentationLevelSetImageFilter() ITK_OVERRIDE {} + ~ShapePriorSegmentationLevelSetImageFilter() override {} ShapePriorSegmentationLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Overrides parent implementation. MAP estimates of the shape and pose parameters is computed in this method. */ - virtual void InitializeIteration() ITK_OVERRIDE; + void InitializeIteration() override; /** Overridden from ProcessObject to set certain values before starting the * finite difference solver and then create an appropriate output */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Extract node of active region into a NodeContainer */ void ExtractActiveRegion(NodeContainerType *ptr); diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx index dca50de5393..d6a7bacfefc 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx @@ -40,10 +40,10 @@ template< typename TInputImage, typename TFeatureImage, typename TOutputPixelTyp ShapePriorSegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType > ::ShapePriorSegmentationLevelSetImageFilter() { - m_ShapeFunction = ITK_NULLPTR; - m_Optimizer = ITK_NULLPTR; - m_CostFunction = ITK_NULLPTR; - m_ShapePriorSegmentationFunction = ITK_NULLPTR; + m_ShapeFunction = nullptr; + m_Optimizer = nullptr; + m_CostFunction = nullptr; + m_ShapePriorSegmentationFunction = nullptr; } template< typename TInputImage, typename TFeatureImage, typename TOutputPixelType > diff --git a/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h index daf8651c4cd..4815393c1a3 100644 --- a/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h @@ -239,7 +239,7 @@ class ITK_TEMPLATE_EXPORT SparseFieldFourthOrderLevelSetImageFilter: /** This overrides SparseFieldLevelSetImageFilter's SetNumberOfLayers to make sure we have enough layers to do what we need. */ - virtual void SetNumberOfLayers(const unsigned int n) ITK_OVERRIDE + void SetNumberOfLayers(const unsigned int n) override { unsigned int nm = std::max (this->GetMinimumNumberOfLayers (), n); @@ -252,7 +252,7 @@ class ITK_TEMPLATE_EXPORT SparseFieldFourthOrderLevelSetImageFilter: /** This method first calls the Superclass InitializeIteration method. Then it determines whether ProcessNormals should be called. */ - virtual void InitializeIteration() ITK_OVERRIDE + void InitializeIteration() override { Superclass::InitializeIteration(); ValueType rmschange = this->GetRMSChange(); @@ -285,8 +285,8 @@ class ITK_TEMPLATE_EXPORT SparseFieldFourthOrderLevelSetImageFilter: protected: SparseFieldFourthOrderLevelSetImageFilter(); - ~SparseFieldFourthOrderLevelSetImageFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SparseFieldFourthOrderLevelSetImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** This method computes curvature from normal vectors stored in a sparse image neighborhood. */ diff --git a/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx index 528bad52222..1b0bdb49e92 100644 --- a/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx @@ -41,7 +41,7 @@ SparseFieldFourthOrderLevelSetImageFilter< TInputImage, TOutputImage > ::SparseFieldFourthOrderLevelSetImageFilter() { m_RefitIteration = 0; - m_LevelSetFunction = ITK_NULLPTR; + m_LevelSetFunction = nullptr; m_ConvergenceFlag = false; this->SetIsoSurfaceValue(0); @@ -122,7 +122,7 @@ SparseFieldFourthOrderLevelSetImageFilter< TInputImage, TOutputImage > position -= stride[k]; } } - if ( it.GetPixel (position) == ITK_NULLPTR ) + if ( it.GetPixel (position) == nullptr ) { flag = true; } @@ -186,7 +186,7 @@ SparseFieldFourthOrderLevelSetImageFilter< TInputImage, TOutputImage > } else { - if ( node != ITK_NULLPTR ) + if ( node != nullptr ) { node->m_CurvatureFlag = false; } @@ -211,7 +211,7 @@ SparseFieldFourthOrderLevelSetImageFilter< TInputImage, TOutputImage > while ( layerIt != this->m_Layers[0]->End() ) { node = im->GetPixel(layerIt->m_Value); - if ( ( node == ITK_NULLPTR ) + if ( ( node == nullptr ) || ( node->m_CurvatureFlag == false ) ) { //level set touching edge of normal band diff --git a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h index 84d1673269c..e532d797046 100644 --- a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h @@ -325,8 +325,8 @@ class ITK_TEMPLATE_EXPORT SparseFieldLevelSetImageFilter: protected: SparseFieldLevelSetImageFilter(); - ~SparseFieldLevelSetImageFilter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~SparseFieldLevelSetImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /**This function allows a subclass to override the way in which updates to * output values are applied during each iteration. The default simply @@ -342,7 +342,7 @@ class ITK_TEMPLATE_EXPORT SparseFieldLevelSetImageFilter: /**This method packages the output(s) into a consistent format. The default * implementation produces a volume with the final solution values in the * sparse field, and inside and outside values elsewhere as appropriate. */ - virtual void PostProcessOutput() ITK_OVERRIDE; + void PostProcessOutput() override; /**This method pre-processes pixels inside and outside the sparse field * layers. The default is to set them to positive and negative values, @@ -351,24 +351,24 @@ class ITK_TEMPLATE_EXPORT SparseFieldLevelSetImageFilter: virtual void InitializeBackgroundPixels(); /** Constructs the sparse field layers and initializes their values. */ - void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Copies the input to the output image. Processing occurs on the output * image, so the data type of the output image determines the precision of * the calculations (i.e. double or float). This method overrides the * parent class method to do some additional processing. */ - void CopyInputToOutput() ITK_OVERRIDE; + void CopyInputToOutput() override; /** Reserves memory in the update buffer. Called before each iteration. */ - void AllocateUpdateBuffer() ITK_OVERRIDE; + void AllocateUpdateBuffer() override; /** Applies the update buffer values to the active layer and reconstructs the * sparse field layers for the next iteration. */ - void ApplyUpdate(const TimeStepType& dt) ITK_OVERRIDE; + void ApplyUpdate(const TimeStepType& dt) override; /** Traverses the active layer list and calculates the change at these * indices to be applied in the current iteration. */ - TimeStepType CalculateChange() ITK_OVERRIDE; + TimeStepType CalculateChange() override; /** Initializes a layer of the sparse field using a previously initialized * layer. Builds the list of nodes in m_Layer[to] using m_Layer[from]. diff --git a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx index 8caba42c9db..ccd3274d9d2 100644 --- a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx @@ -134,8 +134,8 @@ SparseFieldLevelSetImageFilter< TInputImage, TOutputImage > m_NumberOfLayers(2), m_IsoSurfaceValue(m_ValueZero), m_InterpolateSurfaceLocation(true), - m_InputImage(ITK_NULLPTR), - m_OutputImage(ITK_NULLPTR), + m_InputImage(nullptr), + m_OutputImage(nullptr), m_BoundsCheckingActive(false) { m_LayerNodeStore = LayerNodeStorageType::New(); diff --git a/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.h index 3cc9f0bbcc6..d07825f3d14 100644 --- a/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetFunction.h @@ -91,9 +91,9 @@ class ITK_TEMPLATE_EXPORT ThresholdSegmentationLevelSetFunction: FeatureScalarType GetLowerThreshold() const { return m_LowerThreshold; } - virtual void CalculateSpeedImage() ITK_OVERRIDE; + void CalculateSpeedImage() override; - virtual void Initialize(const RadiusType & r) ITK_OVERRIDE + void Initialize(const RadiusType & r) override { Superclass::Initialize(r); @@ -167,11 +167,11 @@ class ITK_TEMPLATE_EXPORT ThresholdSegmentationLevelSetFunction: this->SetEdgeWeight(0.0); } - virtual ~ThresholdSegmentationLevelSetFunction() ITK_OVERRIDE {} + ~ThresholdSegmentationLevelSetFunction() override {} ITK_DISALLOW_COPY_AND_ASSIGN(ThresholdSegmentationLevelSetFunction); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "UpperThreshold: " << m_UpperThreshold << std::endl; diff --git a/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetImageFilter.h index 6e37499076f..ba1a78955d4 100644 --- a/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkThresholdSegmentationLevelSetImageFilter.h @@ -190,10 +190,10 @@ class ITK_TEMPLATE_EXPORT ThresholdSegmentationLevelSetImageFilter: } protected: - ~ThresholdSegmentationLevelSetImageFilter() ITK_OVERRIDE {} + ~ThresholdSegmentationLevelSetImageFilter() override {} ThresholdSegmentationLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; ITK_DISALLOW_COPY_AND_ASSIGN(ThresholdSegmentationLevelSetImageFilter); diff --git a/Modules/Segmentation/LevelSets/include/itkUnsharpMaskLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkUnsharpMaskLevelSetImageFilter.h index be03611cfe2..23be4f4513c 100644 --- a/Modules/Segmentation/LevelSets/include/itkUnsharpMaskLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkUnsharpMaskLevelSetImageFilter.h @@ -96,8 +96,8 @@ class ITK_TEMPLATE_EXPORT UnsharpMaskLevelSetImageFilter: protected: UnsharpMaskLevelSetImageFilter(); - ~UnsharpMaskLevelSetImageFilter() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~UnsharpMaskLevelSetImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** The LevelSetFunctionWithRefitTerm object. */ typename FunctionType::Pointer m_Function; @@ -106,7 +106,7 @@ class ITK_TEMPLATE_EXPORT UnsharpMaskLevelSetImageFilter: unsigned int m_MaxFilterIteration; /** This filter halts when the iteration count reaches the specified count. */ - virtual bool Halt() ITK_OVERRIDE + bool Halt() override { if ( this->GetElapsedIterations() == m_MaxFilterIteration ) { diff --git a/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.h b/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.h index c67b43ba74a..0e058b1054e 100644 --- a/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.h +++ b/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.h @@ -111,9 +111,9 @@ class ITK_TEMPLATE_EXPORT VectorThresholdSegmentationLevelSetFunction: return m_Threshold; } - virtual void CalculateSpeedImage() ITK_OVERRIDE; + void CalculateSpeedImage() override; - virtual void Initialize(const RadiusType & r) ITK_OVERRIDE + void Initialize(const RadiusType & r) override { Superclass::Initialize(r); @@ -140,11 +140,11 @@ class ITK_TEMPLATE_EXPORT VectorThresholdSegmentationLevelSetFunction: this->SetThreshold(1.8); } - virtual ~VectorThresholdSegmentationLevelSetFunction() ITK_OVERRIDE {} + ~VectorThresholdSegmentationLevelSetFunction() override {} ITK_DISALLOW_COPY_AND_ASSIGN(VectorThresholdSegmentationLevelSetFunction); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); os << indent << "MahalanobisFunction: " << m_Mahalanobis << std::endl; diff --git a/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetImageFilter.h index dbb410cafe1..b31cf92ee62 100644 --- a/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetImageFilter.h @@ -153,10 +153,10 @@ class ITK_TEMPLATE_EXPORT VectorThresholdSegmentationLevelSetImageFilter: } protected: - ~VectorThresholdSegmentationLevelSetImageFilter() ITK_OVERRIDE {} + ~VectorThresholdSegmentationLevelSetImageFilter() override {} VectorThresholdSegmentationLevelSetImageFilter(); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; ITK_DISALLOW_COPY_AND_ASSIGN(VectorThresholdSegmentationLevelSetImageFilter); diff --git a/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx index 74f83436395..e5694aad957 100644 --- a/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkCannySegmentationLevelSetImageFilterTest.cxx @@ -117,7 +117,7 @@ class RMSCommand : public Command itkNewMacro(Self); /** Standard Command virtual methods */ - virtual void Execute(Object *caller, const EventObject &) ITK_OVERRIDE + void Execute(Object *caller, const EventObject &) override { std::cout << (dynamic_cast *>(caller))->GetRMSChange() @@ -127,7 +127,7 @@ class RMSCommand : public Command << std::endl; } - virtual void Execute(const Object *, const EventObject &) ITK_OVERRIDE + void Execute(const Object *, const EventObject &) override { std::cout << "ack" << std::endl; @@ -135,7 +135,7 @@ class RMSCommand : public Command protected: RMSCommand() {} - virtual ~RMSCommand() ITK_OVERRIDE {} + ~RMSCommand() override {} }; } diff --git a/Modules/Segmentation/LevelSets/test/itkExtensionVelocitiesImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkExtensionVelocitiesImageFilterTest.cxx index 8a21e9e4611..372bbf5eb51 100644 --- a/Modules/Segmentation/LevelSets/test/itkExtensionVelocitiesImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkExtensionVelocitiesImageFilterTest.cxx @@ -294,14 +294,14 @@ int itkExtensionVelocitiesImageFilterTest(int, char* [] ) if( reinitializer->GetInputVelocityImage( 2 ) ) { - std::cout << "GetInputVelocityImage(2) should have returned ITK_NULLPTR" << std::endl; + std::cout << "GetInputVelocityImage(2) should have returned nullptr" << std::endl; std::cout << "Test failed" << std::endl; return EXIT_FAILURE; } if( reinitializer->GetOutputVelocityImage( 2 ) ) { - std::cout << "GetOutputVelocityImage(2) should have returned ITK_NULLPTR" << std::endl; + std::cout << "GetOutputVelocityImage(2) should have returned nullptr" << std::endl; std::cout << "Test failed" << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx index 21fed2b7bfc..c565778d710 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx @@ -415,9 +415,9 @@ int itkGeodesicActiveContourShapePriorLevelSetImageFilterTest( int, char *[] ) return EXIT_FAILURE; \ } - TEST_INITIALIZATION_ERROR( ShapeFunction, ITK_NULLPTR, shape ); - TEST_INITIALIZATION_ERROR( CostFunction, ITK_NULLPTR, costFunction ); - TEST_INITIALIZATION_ERROR( Optimizer, ITK_NULLPTR, optimizer ); + TEST_INITIALIZATION_ERROR( ShapeFunction, nullptr, shape ); + TEST_INITIALIZATION_ERROR( CostFunction, nullptr, costFunction ); + TEST_INITIALIZATION_ERROR( Optimizer, nullptr, optimizer ); CostFunctionType::ArrayType badParameters( shape->GetNumberOfShapeParameters() - 1 ); badParameters.Fill( 2.0 ); diff --git a/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx index c40a706c662..5e0b6974327 100644 --- a/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkLaplacianSegmentationLevelSetImageFilterTest.cxx @@ -117,7 +117,7 @@ class RMSCommand : public Command itkNewMacro(Self); /** Standard Command virtual methods */ - virtual void Execute(Object *caller, const EventObject &) ITK_OVERRIDE + void Execute(Object *caller, const EventObject &) override { std::cout << (dynamic_cast *>(caller))->GetRMSChange() @@ -127,7 +127,7 @@ class RMSCommand : public Command << std::endl; } - virtual void Execute(const Object *, const EventObject &) ITK_OVERRIDE + void Execute(const Object *, const EventObject &) override { std::cout << "ack" << std::endl; @@ -135,7 +135,7 @@ class RMSCommand : public Command protected: RMSCommand() {} - virtual ~RMSCommand() ITK_OVERRIDE {} + ~RMSCommand() override {} }; } diff --git a/Modules/Segmentation/LevelSets/test/itkLevelSetFunctionTest.cxx b/Modules/Segmentation/LevelSets/test/itkLevelSetFunctionTest.cxx index 717180e4cef..1a2cd983de8 100644 --- a/Modules/Segmentation/LevelSets/test/itkLevelSetFunctionTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkLevelSetFunctionTest.cxx @@ -117,7 +117,7 @@ class MorphFunction : public ::itk::LevelSetFunction< ::itk::Image > itkNewMacro(Self); protected: - ~MorphFunction() ITK_OVERRIDE {} + ~MorphFunction() override {} MorphFunction() { @@ -128,11 +128,11 @@ class MorphFunction : public ::itk::LevelSetFunction< ::itk::Image > private: ::itk::Image::Pointer m_DistanceTransform; - virtual ScalarValueType PropagationSpeed( + ScalarValueType PropagationSpeed( const NeighborhoodType& neighborhood, const FloatOffsetType &, GlobalDataStruct * - ) const ITK_OVERRIDE + ) const override { ::itk::Index<2> idx = neighborhood.GetIndex(); return m_DistanceTransform->GetPixel(idx); @@ -167,7 +167,7 @@ ::itk::DenseFiniteDifferenceImageFilter< ::itk::Image, ::itk::Image *im) { MorphFunction *func = dynamic_cast( this->GetDifferenceFunction().GetPointer()); - if( func == ITK_NULLPTR ) + if( func == nullptr ) { itkGenericExceptionMacro("MorphFunction cast failed"); } @@ -175,7 +175,7 @@ ::itk::DenseFiniteDifferenceImageFilter< ::itk::Image, ::itk::Image, ::itk::ImageGetElapsedIterations() == m_Iterations) return true; else return false; diff --git a/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx b/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx index 40d18e79b0d..0cc5287a0ce 100644 --- a/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkLevelSetNeighborhoodExtractorTest.cxx @@ -93,12 +93,12 @@ int itkLevelSetNeighborhoodExtractorTest(int, char* [] ) // exercise error handling bool passed; - std::cout << "Testing ITK_NULLPTR inputs" << std::endl; + std::cout << "Testing nullptr inputs" << std::endl; try { passed = false; - extractor->SetInputLevelSet( ITK_NULLPTR ); + extractor->SetInputLevelSet( nullptr ); extractor->Locate(); } catch( itk::ExceptionObject& err ) @@ -118,7 +118,7 @@ int itkLevelSetNeighborhoodExtractorTest(int, char* [] ) { passed = false; extractor->NarrowBandingOn(); - extractor->SetInputNarrowBand( ITK_NULLPTR ); + extractor->SetInputNarrowBand( nullptr ); extractor->Locate(); } catch( itk::ExceptionObject& err ) diff --git a/Modules/Segmentation/LevelSets/test/itkLevelSetVelocityNeighborhoodExtractorTest.cxx b/Modules/Segmentation/LevelSets/test/itkLevelSetVelocityNeighborhoodExtractorTest.cxx index 068f48e75d7..6b1174610e5 100644 --- a/Modules/Segmentation/LevelSets/test/itkLevelSetVelocityNeighborhoodExtractorTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkLevelSetVelocityNeighborhoodExtractorTest.cxx @@ -121,7 +121,7 @@ int itkLevelSetVelocityNeighborhoodExtractorTest(int, char* [] ) if ( extractor->GetAuxImage( 2 ) ) { - std::cout << "Out of range index should return ITK_NULLPTR pointer" << std::endl; + std::cout << "Out of range index should return nullptr pointer" << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx index 3e71b63fb57..13555876267 100644 --- a/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkNarrowBandThresholdSegmentationLevelSetImageFilterTest.cxx @@ -79,7 +79,7 @@ class NBRMSCommand : public Command itkNewMacro(Self); /** Standard Command virtual methods */ - virtual void Execute(Object *caller, const EventObject &) ITK_OVERRIDE + void Execute(Object *caller, const EventObject &) override { std::cout << (dynamic_cast > itkNewMacro(Self); protected: - ~MorphFunction() ITK_OVERRIDE {} + ~MorphFunction() override {} MorphFunction() { @@ -141,11 +141,11 @@ class MorphFunction : public ::itk::LevelSetFunction< ::itk::Image > private: ::itk::Image::Pointer m_DistanceTransform; - virtual ScalarValueType PropagationSpeed( + ScalarValueType PropagationSpeed( const NeighborhoodType& neighborhood, const FloatOffsetType &, GlobalDataStruct * - ) const ITK_OVERRIDE + ) const override { ::itk::Index<3> idx = neighborhood.GetIndex(); return m_DistanceTransform->GetPixel(idx); @@ -179,7 +179,7 @@ ::itk::ParallelSparseFieldLevelSetImageFilter< ::itk::Image, ::itk::Im void SetDistanceTransform(::itk::Image *im) { MorphFunction *func = dynamic_cast( this->GetDifferenceFunction().GetPointer()); - if( func == ITK_NULLPTR ) + if( func == nullptr ) { itkGenericExceptionMacro("MorphFunction cast failed"); } @@ -187,7 +187,7 @@ ::itk::ParallelSparseFieldLevelSetImageFilter< ::itk::Image, ::itk::Im } protected: - ~MorphFilter() ITK_OVERRIDE {} + ~MorphFilter() override {} MorphFilter() { MorphFunction::Pointer p = MorphFunction::New(); @@ -202,7 +202,7 @@ ::itk::ParallelSparseFieldLevelSetImageFilter< ::itk::Image, ::itk::Im ITK_DISALLOW_COPY_AND_ASSIGN(MorphFilter); unsigned int m_Iterations; - virtual bool Halt() ITK_OVERRIDE + bool Halt() override { if (this->GetElapsedIterations() == m_Iterations) return true; else return false; diff --git a/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx b/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx index 46a7aa0585d..4ec5aec133d 100644 --- a/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkShapePriorMAPCostFunctionTest.cxx @@ -245,9 +245,9 @@ int itkShapePriorMAPCostFunctionTest( int, char *[]) return EXIT_FAILURE; \ } - TEST_INITIALIZATION_ERROR( ShapeFunction, ITK_NULLPTR, shape ); - TEST_INITIALIZATION_ERROR( ActiveRegion, ITK_NULLPTR, activeRegion ); - TEST_INITIALIZATION_ERROR( FeatureImage, ITK_NULLPTR, edgeMap ); + TEST_INITIALIZATION_ERROR( ShapeFunction, nullptr, shape ); + TEST_INITIALIZATION_ERROR( ActiveRegion, nullptr, activeRegion ); + TEST_INITIALIZATION_ERROR( FeatureImage, nullptr, edgeMap ); CostFunctionType::ParametersType badParameters( shape->GetNumberOfShapeParameters() - 1 ); badParameters.Fill( 2.0 ); diff --git a/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx b/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx index 609677df868..3ce0a719b64 100644 --- a/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkShapePriorSegmentationLevelSetFunctionTest.cxx @@ -53,7 +53,7 @@ class SimpleTestFilter : public DenseFiniteDifferenceImageFilter< TImage, TImage typedef SmartPointer ConstPointer; itkTypeMacro( SimpleTestFilter, DenseFiniteDifferenceImageFilter ); itkNewMacro( Self ); - virtual void SetNumberOfIterations( const IdentifierType numberOfIterations ) ITK_OVERRIDE + void SetNumberOfIterations( const IdentifierType numberOfIterations ) override { if ( this->m_NumberOfIterations != numberOfIterations ) { @@ -89,7 +89,7 @@ class SimpleTestFilter : public DenseFiniteDifferenceImageFilter< TImage, TImage unsigned int m_NumberOfIterations; typename ShapePriorFunctionType::Pointer m_ShapePriorFunction; - virtual bool Halt() ITK_OVERRIDE + bool Halt() override { if ( this->GetElapsedIterations() == m_NumberOfIterations ) return true; else return false; diff --git a/Modules/Segmentation/LevelSets/test/itkSparseFieldFourthOrderLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkSparseFieldFourthOrderLevelSetImageFilterTest.cxx index a2c865e0dce..04f1307c7bb 100644 --- a/Modules/Segmentation/LevelSets/test/itkSparseFieldFourthOrderLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkSparseFieldFourthOrderLevelSetImageFilterTest.cxx @@ -119,7 +119,7 @@ class IsotropicDiffusionLevelSetFilter m_Function->Print(std::cout); } - virtual bool Halt () ITK_OVERRIDE + bool Halt () override { if (this->GetElapsedIterations() == 50) { diff --git a/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx index 108f6b69123..93e494898ac 100644 --- a/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkThresholdSegmentationLevelSetImageFilterTest.cxx @@ -79,7 +79,7 @@ class RMSCommand : public Command itkNewMacro(Self); /** Standard Command virtual methods */ - virtual void Execute(Object *caller, const EventObject &) ITK_OVERRIDE + void Execute(Object *caller, const EventObject &) override { std::cout << (dynamic_cast *>(caller))->GetRMSChange() @@ -89,7 +89,7 @@ class RMSCommand : public Command << std::endl; } - virtual void Execute(const Object *, const EventObject &) ITK_OVERRIDE + void Execute(const Object *, const EventObject &) override { std::cout << "ack" << std::endl; @@ -97,7 +97,7 @@ class RMSCommand : public Command protected: RMSCommand() {} - virtual ~RMSCommand() ITK_OVERRIDE {} + ~RMSCommand() override {} }; @@ -113,12 +113,12 @@ class TSIFTNProgressCommand : public Command itkNewMacro(Self); /** Standard Command virtual methods */ - virtual void Execute(Object *caller, const EventObject &) ITK_OVERRIDE + void Execute(Object *caller, const EventObject &) override { const ProcessObject * process = dynamic_cast(caller); std::cout << "Progress = " << process->GetProgress() << std::endl; } - virtual void Execute(const Object *, const EventObject &) ITK_OVERRIDE + void Execute(const Object *, const EventObject &) override { std::cout << "ack" << std::endl; @@ -126,7 +126,7 @@ class TSIFTNProgressCommand : public Command protected: TSIFTNProgressCommand() {} - virtual ~TSIFTNProgressCommand() ITK_OVERRIDE {} + ~TSIFTNProgressCommand() override {} }; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.h b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.h index 466d931443c..29cb3ac2808 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.h @@ -101,14 +101,14 @@ public BinaryImageToLevelSetImageAdaptorBase< /** * Input is a binary image m_InputImage * Output is a WhitakerSparseLevelSetImagePointer */ - void Initialize() ITK_OVERRIDE; + void Initialize() override; protected: /** Constructor */ BinaryImageToLevelSetImageAdaptor(); /** Destructor */ - virtual ~BinaryImageToLevelSetImageAdaptor() ITK_OVERRIDE; + ~BinaryImageToLevelSetImageAdaptor() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(BinaryImageToLevelSetImageAdaptor); @@ -179,7 +179,7 @@ class ITK_TEMPLATE_EXPORT BinaryImageToSparseLevelSetImageAdaptorBase : protected: BinaryImageToSparseLevelSetImageAdaptorBase() : Superclass() {} - virtual ~BinaryImageToSparseLevelSetImageAdaptorBase() ITK_OVERRIDE {} + ~BinaryImageToSparseLevelSetImageAdaptorBase() override {} LevelSetLabelMapPointer m_LabelMap; @@ -257,14 +257,14 @@ class ITK_TEMPLATE_EXPORT BinaryImageToLevelSetImageAdaptor< typedef typename Superclass::NeighborhoodIteratorType NeighborhoodIteratorType; - void Initialize() ITK_OVERRIDE; + void Initialize() override; protected: /** Constructor */ BinaryImageToLevelSetImageAdaptor(); /** Destructor */ - virtual ~BinaryImageToLevelSetImageAdaptor() ITK_OVERRIDE; + ~BinaryImageToLevelSetImageAdaptor() override; private: @@ -348,14 +348,14 @@ public BinaryImageToSparseLevelSetImageAdaptorBase< typedef typename Superclass::NeighborhoodIteratorType NeighborhoodIteratorType; - void Initialize() ITK_OVERRIDE; + void Initialize() override; protected: /** Constructor */ BinaryImageToLevelSetImageAdaptor(); /** Destructor */ - ~BinaryImageToLevelSetImageAdaptor() ITK_OVERRIDE; + ~BinaryImageToLevelSetImageAdaptor() override; /** Find the active layer separating the foreground and background regions */ void FindActiveLayer(); @@ -431,14 +431,14 @@ class ITK_TEMPLATE_EXPORT BinaryImageToLevelSetImageAdaptor< typedef typename Superclass::NeighborhoodIteratorType NeighborhoodIteratorType; - void Initialize() ITK_OVERRIDE; + void Initialize() override; protected: /** Constructor */ BinaryImageToLevelSetImageAdaptor(); /** Destructor */ - virtual ~BinaryImageToLevelSetImageAdaptor() ITK_OVERRIDE; + ~BinaryImageToLevelSetImageAdaptor() override; /** Find the active layer separating the foreground and background regions */ void FindActiveLayer(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx index add18c603b8..bb357a5ba25 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx @@ -43,12 +43,12 @@ BinaryImageToLevelSetImageAdaptor< TInputImage, LevelSetDenseImage< TLevelSetIma { if( this->m_InputImage.IsNull() ) { - itkGenericExceptionMacro( "m_InputImage is ITK_NULLPTR" ); + itkGenericExceptionMacro( "m_InputImage is nullptr" ); } if( m_SignedDistanceTransformFilter.IsNull() ) { - itkGenericExceptionMacro( "m_SignedDistanceTransformFilter is ITK_NULLPTR" ); + itkGenericExceptionMacro( "m_SignedDistanceTransformFilter is nullptr" ); } m_SignedDistanceTransformFilter->SetInput( this->m_InputImage ); m_SignedDistanceTransformFilter->Update(); @@ -85,7 +85,7 @@ BinaryImageToLevelSetImageAdaptor< { if( this->m_InputImage.IsNull() ) { - itkGenericExceptionMacro( << "m_InputImage is ITK_NULLPTR" ); + itkGenericExceptionMacro( << "m_InputImage is nullptr" ); } this->m_LabelMap = LevelSetLabelMapType::New(); @@ -139,7 +139,7 @@ BinaryImageToLevelSetImageAdaptor< this->m_LevelSet->SetLabelMap( this->m_LabelMap ); // release the memory - this->m_InternalImage = ITK_NULLPTR; + this->m_InternalImage = nullptr; } template< typename TInput, typename TOutput > @@ -422,7 +422,7 @@ void BinaryImageToLevelSetImageAdaptor< TInput, ShiSparseLevelSetImage< TInput:: { if( this->m_InputImage.IsNull() ) { - itkGenericExceptionMacro( << "m_InputImage is ITK_NULLPTR" ); + itkGenericExceptionMacro( << "m_InputImage is nullptr" ); } this->m_LabelMap = LevelSetLabelMapType::New(); @@ -463,7 +463,7 @@ void BinaryImageToLevelSetImageAdaptor< TInput, ShiSparseLevelSetImage< TInput:: FindActiveLayer(); this->m_LevelSet->SetLabelMap( this->m_LabelMap ); - this->m_InternalImage = ITK_NULLPTR; + this->m_InternalImage = nullptr; } @@ -579,7 +579,7 @@ void BinaryImageToLevelSetImageAdaptor< TInput,MalcolmSparseLevelSetImage< TInpu { if( this->m_InputImage.IsNull() ) { - itkGenericExceptionMacro( << "m_InputImage is ITK_NULLPTR" ); + itkGenericExceptionMacro( << "m_InputImage is nullptr" ); } this->m_LabelMap = LevelSetLabelMapType::New(); @@ -622,7 +622,7 @@ void BinaryImageToLevelSetImageAdaptor< TInput,MalcolmSparseLevelSetImage< TInpu this->CreateMinimalInterface(); this->m_LevelSet->SetLabelMap( this->m_LabelMap ); - this->m_InternalImage = ITK_NULLPTR; + this->m_InternalImage = nullptr; } template< typename TInput > diff --git a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptorBase.h b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptorBase.h index 12bdc07fe38..56d856bdc72 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptorBase.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptorBase.h @@ -73,7 +73,7 @@ class BinaryImageToLevelSetImageAdaptorBase : public Object } /** Destructor */ - virtual ~BinaryImageToLevelSetImageAdaptorBase() ITK_OVERRIDE {} + ~BinaryImageToLevelSetImageAdaptorBase() override {} InputImagePointer m_InputImage; LevelSetPointer m_LevelSet; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.h b/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.h index 010a07141b3..20838ffa729 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.h @@ -57,64 +57,64 @@ class ITK_TEMPLATE_EXPORT DiscreteLevelSetImage : typedef typename Superclass::LevelSetDataType LevelSetDataType; /** Returns the gradient of the level set function at a given location inputIndex */ - virtual OutputType Evaluate( const InputType& inputIndex ) const ITK_OVERRIDE = 0; + OutputType Evaluate( const InputType& inputIndex ) const override = 0; /** Returns the image gradient of the level set function at a given location inputIndex */ - virtual GradientType EvaluateGradient( const InputType& inputIndex ) const ITK_OVERRIDE; + GradientType EvaluateGradient( const InputType& inputIndex ) const override; /** Returns the image hessian of the level set function at a given location inputIndex */ - virtual HessianType EvaluateHessian( const InputType& inputIndex ) const ITK_OVERRIDE; + HessianType EvaluateHessian( const InputType& inputIndex ) const override; /** Returns the image Laplacian of the level set function at a given location inputIndex */ - virtual OutputRealType EvaluateLaplacian( const InputType& inputIndex ) const ITK_OVERRIDE; + OutputRealType EvaluateLaplacian( const InputType& inputIndex ) const override; /** Returns the mean curvature of the level set function at a given location inputIndex */ - virtual OutputRealType EvaluateMeanCurvature( const InputType& inputIndex ) const ITK_OVERRIDE; + OutputRealType EvaluateMeanCurvature( const InputType& inputIndex ) const override; virtual GradientType EvaluateForwardGradient( const InputType& inputIndex ) const; virtual GradientType EvaluateBackwardGradient( const InputType& inputIndex ) const; /** Returns the value of the level set function at a given location inputIndex */ - virtual void Evaluate( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE; + void Evaluate( const InputType& inputIndex, LevelSetDataType& data ) const override; /** Returns the gradient of the level set function at a given location inputIndex * as part of the LevelSetDataType */ - virtual void EvaluateGradient( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE; + void EvaluateGradient( const InputType& inputIndex, LevelSetDataType& data ) const override; /** Returns the Hessian of the level set function at a given location inputIndex * as part of the LevelSetDataType */ - virtual void EvaluateHessian( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE; + void EvaluateHessian( const InputType& inputIndex, LevelSetDataType& data ) const override; /** Returns the Hessian of the level set function at a given location inputIndex * as part of the LevelSetDataType */ - virtual void EvaluateMeanCurvature( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE; + void EvaluateMeanCurvature( const InputType& inputIndex, LevelSetDataType& data ) const override; /** Returns the Laplacian of the level set function at a given location inputIndex * as part of the LevelSetDataType */ - virtual void EvaluateLaplacian( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE; + void EvaluateLaplacian( const InputType& inputIndex, LevelSetDataType& data ) const override; /** Returns the gradient of the level set function at a given location inputIndex * as part of the LevelSetDataType */ - virtual void EvaluateForwardGradient( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE; + void EvaluateForwardGradient( const InputType& inputIndex, LevelSetDataType& data ) const override; /** Returns the gradient of the level set function at a given location inputIndex * as part of the LevelSetDataType */ - virtual void EvaluateBackwardGradient( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE; + void EvaluateBackwardGradient( const InputType& inputIndex, LevelSetDataType& data ) const override; protected: DiscreteLevelSetImage(); - virtual ~DiscreteLevelSetImage() ITK_OVERRIDE; + ~DiscreteLevelSetImage() override; /** Initial the level set pointer */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Copy level set information from data object */ - virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override; /** Graft data object as level set object */ - virtual void Graft( const DataObject* data ) ITK_OVERRIDE; + void Graft( const DataObject* data ) override; private: diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h index 7311a6efa51..54f210a06db 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h @@ -178,26 +178,26 @@ class ITK_TEMPLATE_EXPORT LevelSetBase : public DataObject itkGetConstMacro(MaximumNumberOfRegions, RegionType); /** Initialize the level set function */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Methods to manage streaming. */ - virtual void UpdateOutputInformation() ITK_OVERRIDE; + void UpdateOutputInformation() override; - virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE; + void SetRequestedRegionToLargestPossibleRegion() override; - virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override; - virtual void Graft(const DataObject *data) ITK_OVERRIDE; + void Graft(const DataObject *data) override; - virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE; + bool RequestedRegionIsOutsideOfTheBufferedRegion() override; - virtual bool VerifyRequestedRegion() ITK_OVERRIDE; + bool VerifyRequestedRegion() override; /** Set the requested region from this data object to match the requested * region of the data object passed in as a parameter. This method * implements the API from DataObject. The data object parameter must be * castable to a PointSet. */ - virtual void SetRequestedRegion( const DataObject *data) ITK_OVERRIDE; + void SetRequestedRegion( const DataObject *data) override; /** Set/Get the Requested region */ virtual void SetRequestedRegion(const RegionType & region); @@ -211,7 +211,7 @@ class ITK_TEMPLATE_EXPORT LevelSetBase : public DataObject protected: LevelSetBase(); - virtual ~LevelSetBase() ITK_OVERRIDE {} + ~LevelSetBase() override {} // If the RegionType is ITK_UNSTRUCTURED_REGION, then the following // variables represent the maximum number of region that the data diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainer.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainer.h index eadc1c45595..494cbdfacae 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainer.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainer.h @@ -82,7 +82,7 @@ public LevelSetContainerBase< TIdentifier, TLevelSet > protected: LevelSetContainer() {} - ~LevelSetContainer() ITK_OVERRIDE {} + ~LevelSetContainer() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetContainer); @@ -181,7 +181,7 @@ public LevelSetContainerBase< TIdentifier, LevelSetDenseImage< TImage > > protected: LevelSetContainer() {} - ~LevelSetContainer() ITK_OVERRIDE {} + ~LevelSetContainer() override {} private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetContainer); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h index a32ad298cd8..92e6cf8eafb 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h @@ -236,7 +236,7 @@ class ITK_TEMPLATE_EXPORT LevelSetContainerBase : public Object /** \brief Get the level set function given its id \param[in] iId - \return the level set function if it is in the container, else ITK_NULLPTR. + \return the level set function if it is in the container, else nullptr. */ LevelSetPointer GetLevelSet( const LevelSetIdentifierType& iId ) const; @@ -276,7 +276,7 @@ class ITK_TEMPLATE_EXPORT LevelSetContainerBase : public Object LevelSetContainerBase(); /** \brief Default Destructor */ - ~LevelSetContainerBase() ITK_OVERRIDE; + ~LevelSetContainerBase() override; const LevelSetContainerType& GetContainer() const; void SetContainer( const LevelSetContainerType& iContainer ); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx index 9711d275a24..2fff6775813 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx @@ -100,7 +100,7 @@ LevelSetContainerBase< TIdentifier, TLevelSet > } else { - return ITK_NULLPTR; + return nullptr; } } @@ -151,7 +151,7 @@ LevelSetContainerBase< TIdentifier, TLevelSet > if( it != m_Container.end() ) { - it->second = ITK_NULLPTR; + it->second = nullptr; m_Container.erase( it ); this->Modified(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.h index db438b621e5..998e045db98 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.h @@ -72,26 +72,26 @@ class ITK_TEMPLATE_EXPORT LevelSetDenseImage : itkGetModifiableObjectMacro(Image, ImageType ); /** Returns the value of the level set function at a given location inputIndex */ - virtual OutputType Evaluate( const InputType& inputIndex ) const ITK_OVERRIDE; - virtual void Evaluate( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE; + OutputType Evaluate( const InputType& inputIndex ) const override; + void Evaluate( const InputType& inputIndex, LevelSetDataType& data ) const override; protected: LevelSetDenseImage(); - virtual ~LevelSetDenseImage() ITK_OVERRIDE; + ~LevelSetDenseImage() override; ImagePointer m_Image; - virtual bool IsInsideDomain( const InputType& inputIndex ) const ITK_OVERRIDE; + bool IsInsideDomain( const InputType& inputIndex ) const override; /** Initial the level set pointer */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Copy level set information from data object */ - virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE; + void CopyInformation(const DataObject *data) override; /** Graft data object as level set object */ - virtual void Graft( const DataObject* data ) ITK_OVERRIDE; + void Graft( const DataObject* data ) override; private: diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx index cc2a773bd99..07351631f33 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx @@ -77,7 +77,7 @@ LevelSetDenseImage< TImage > { Superclass::Initialize(); - this->m_Image = ITK_NULLPTR; + this->m_Image = nullptr; } // ---------------------------------------------------------------------------- diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.h index 709212eff7f..892aa139d9d 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.h @@ -111,7 +111,7 @@ class ITK_TEMPLATE_EXPORT LevelSetDomainMapImageFilter : public ImageToImageFilt protected: LevelSetDomainMapImageFilter(); - ~LevelSetDomainMapImageFilter() ITK_OVERRIDE; + ~LevelSetDomainMapImageFilter() override; /** Computes a consistent region for the same set of overlapping * level set support. */ @@ -119,10 +119,10 @@ class ITK_TEMPLATE_EXPORT LevelSetDomainMapImageFilter : public ImageToImageFilt /** Identify image partitions where each partition has the same overlapping * level set support */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Display */ - virtual void PrintSelf ( std::ostream& os, Indent indent ) const ITK_OVERRIDE; + void PrintSelf ( std::ostream& os, Indent indent ) const override; private: DomainMapType m_DomainMap; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx index 0d2d1ed2c32..de2e864eed0 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx @@ -29,8 +29,8 @@ LevelSetDomainMapImageFilter< TInputImage, TOutputImage > { this->Superclass::SetNumberOfRequiredInputs ( 1 ); this->Superclass::SetNumberOfRequiredOutputs ( 1 ); - this->m_InputImage = ITK_NULLPTR; - this->m_OutputImage = ITK_NULLPTR; + this->m_InputImage = nullptr; + this->m_OutputImage = nullptr; } diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionBase.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionBase.h index 027a5f40467..a6f18e9c01c 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionBase.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionBase.h @@ -54,7 +54,7 @@ class ITK_TEMPLATE_EXPORT LevelSetDomainPartitionBase : public Object LevelSetDomainPartitionBase(); /** \brief Destructor */ - virtual ~LevelSetDomainPartitionBase() ITK_OVERRIDE; + ~LevelSetDomainPartitionBase() override; virtual void AllocateListDomain() = 0; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.h index 251718531bb..32497331e60 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.h @@ -86,15 +86,15 @@ class ITK_TEMPLATE_EXPORT LevelSetDomainPartitionImage : public LevelSetDomainPa /** Populate a list image with each pixel being a list of overlapping * level set support at that pixel */ - virtual void PopulateListDomain() ITK_OVERRIDE; + void PopulateListDomain() override; protected: LevelSetDomainPartitionImage(); - virtual ~LevelSetDomainPartitionImage() ITK_OVERRIDE; + ~LevelSetDomainPartitionImage() override; /** Allocate a list image with each pixel being a list of overlapping * level set support at that pixel */ - void AllocateListDomain() ITK_OVERRIDE; + void AllocateListDomain() override; ImageConstPointer m_Image; ListImagePointer m_ListDomain; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.h index fa338b76e94..94d9b3a49a2 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.h @@ -74,11 +74,11 @@ class ITK_TEMPLATE_EXPORT LevelSetDomainPartitionImageWithKdTree: /** Populate a list image with each pixel being a list of overlapping * level set support at that pixel */ - void PopulateListDomain() ITK_OVERRIDE; + void PopulateListDomain() override; protected: LevelSetDomainPartitionImageWithKdTree(); - ~LevelSetDomainPartitionImageWithKdTree() ITK_OVERRIDE; + ~LevelSetDomainPartitionImageWithKdTree() override; /** Populate a list image with each pixel being a list of overlapping * level set support at that pixel */ diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx index e8d9da8f1ce..4beb3e0dc52 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx @@ -25,7 +25,7 @@ namespace itk template< typename TImage > LevelSetDomainPartitionImageWithKdTree< TImage > ::LevelSetDomainPartitionImageWithKdTree() : - m_KdTree(ITK_NULLPTR), m_NumberOfNeighbors( 10 ) + m_KdTree(nullptr), m_NumberOfNeighbors( 10 ) { } diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.h index 101d969257a..03ec7edf382 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.h @@ -107,23 +107,23 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationAdvectionTerm : typedef Vector< LevelSetOutputRealType, itkGetStaticConstMacro(ImageDimension) > NeighborhoodScalesType; /** \todo to be documented. */ - virtual void Update() ITK_OVERRIDE; + void Update() override; /** Initialize the parameters in the terms prior to an iteration */ - virtual void InitializeParameters() ITK_OVERRIDE; + void InitializeParameters() override; /** \todo to be documented. */ - virtual void Initialize( const LevelSetInputIndexType& ) ITK_OVERRIDE; + void Initialize( const LevelSetInputIndexType& ) override; /** Supply updates at pixels to keep the term parameters always updated */ - virtual void UpdatePixel( const LevelSetInputIndexType& iP, + void UpdatePixel( const LevelSetInputIndexType& iP, const LevelSetOutputRealType& oldValue, - const LevelSetOutputRealType& newValue ) ITK_OVERRIDE; + const LevelSetOutputRealType& newValue ) override; protected: LevelSetEquationAdvectionTerm(); - virtual ~LevelSetEquationAdvectionTerm() ITK_OVERRIDE; + ~LevelSetEquationAdvectionTerm() override; AdvectionImagePointer m_AdvectionImage; @@ -133,9 +133,9 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationAdvectionTerm : /** Returns the term contribution for a given location iP, i.e. * \f$ \omega_i( p ) \f$. */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) ITK_OVERRIDE; - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, - const LevelSetDataType& iData ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) override; + LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, + const LevelSetDataType& iData ) override; LevelSetOutputRealType m_NeighborhoodScales[ImageDimension]; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.h index a21d1ac768b..a34da9beae6 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.h @@ -85,32 +85,32 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationBinaryMaskTerm : itkSetObjectMacro( Mask, InputImageType ); /** Update the term parameter values at end of iteration */ - virtual void Update() ITK_OVERRIDE; + void Update() override; /** Initialize parameters in the terms prior to an iteration */ - virtual void InitializeParameters() ITK_OVERRIDE; + void InitializeParameters() override; /** Initialize term parameters in the dense case by computing for each pixel location */ - virtual void Initialize( const LevelSetInputIndexType& iP ) ITK_OVERRIDE; + void Initialize( const LevelSetInputIndexType& iP ) override; /** Supply updates at pixels to keep the term parameters always updated */ - virtual void UpdatePixel( const LevelSetInputIndexType& iP, + void UpdatePixel( const LevelSetInputIndexType& iP, const LevelSetOutputRealType & oldValue, - const LevelSetOutputRealType & newValue ) ITK_OVERRIDE; + const LevelSetOutputRealType & newValue ) override; protected: LevelSetEquationBinaryMaskTerm(); - virtual ~LevelSetEquationBinaryMaskTerm() ITK_OVERRIDE; + ~LevelSetEquationBinaryMaskTerm() override; /** Returns the term contribution for a given location iP, i.e. * \f$ \omega_i( p ) \f$. */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) override; /** Returns the term contribution for a given location iP, i.e. * \f$ \omega_i( p ) \f$. */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, - const LevelSetDataType& iData ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, + const LevelSetDataType& iData ) override; InputImagePointer m_Mask; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.h index 62bfcdf7eb1..b4cd8ed4db7 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.h @@ -93,22 +93,22 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationChanAndVeseExternalTerm : typedef typename Superclass::HeavisideConstPointer HeavisideConstPointer; /** Compute the product of Heaviside functions in the multi-levelset cases */ - virtual void ComputeProduct( const LevelSetInputIndexType& iP, - LevelSetOutputRealType& prod ) ITK_OVERRIDE; + void ComputeProduct( const LevelSetInputIndexType& iP, + LevelSetOutputRealType& prod ) override; /** Compute the product of Heaviside functions in the multi-levelset cases * except the current levelset */ - virtual void ComputeProductTerm( const LevelSetInputIndexType& iP, - LevelSetOutputRealType& prod ) ITK_OVERRIDE; + void ComputeProductTerm( const LevelSetInputIndexType& iP, + LevelSetOutputRealType& prod ) override; /** Supply updates at pixels to keep the term parameters always updated */ - virtual void UpdatePixel( const LevelSetInputIndexType& iP, + void UpdatePixel( const LevelSetInputIndexType& iP, const LevelSetOutputRealType & oldValue, - const LevelSetOutputRealType & newValue ) ITK_OVERRIDE; + const LevelSetOutputRealType & newValue ) override; protected: LevelSetEquationChanAndVeseExternalTerm(); - virtual ~LevelSetEquationChanAndVeseExternalTerm() ITK_OVERRIDE; + ~LevelSetEquationChanAndVeseExternalTerm() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEquationChanAndVeseExternalTerm); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx index 732a41b5463..1fdf9a61ef5 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx @@ -29,8 +29,8 @@ LevelSetEquationChanAndVeseExternalTerm< TInput, TLevelSetContainer > { this->m_TermName = "External Chan And Vese term"; this->m_RequiredData.insert( "Value" ); - this->m_DomainMapImageFilter = ITK_NULLPTR; - this->m_CacheImage = ITK_NULLPTR; + this->m_DomainMapImageFilter = nullptr; + this->m_CacheImage = nullptr; } template< typename TInput, typename TLevelSetContainer > @@ -58,7 +58,7 @@ void LevelSetEquationChanAndVeseExternalTerm< TInput, TLevelSetContainer > if( this->m_LevelSetContainer->HasDomainMap() ) { - if(this->m_DomainMapImageFilter == ITK_NULLPTR) + if(this->m_DomainMapImageFilter == nullptr) { this->m_DomainMapImageFilter = this->m_LevelSetContainer->GetModifiableDomainMapFilter(); this->m_CacheImage = this->m_DomainMapImageFilter->GetOutput(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.h index 18fae5f3a26..b763294bb24 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.h @@ -90,13 +90,13 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationChanAndVeseInternalTerm : itkGetMacro( Mean, InputPixelRealType ); /** Update the term parameter values at end of iteration */ - virtual void Update() ITK_OVERRIDE; + void Update() override; /** Initialize parameters in the terms prior to an iteration */ - virtual void InitializeParameters() ITK_OVERRIDE; + void InitializeParameters() override; /** Initialize term parameters in the dense case by computing for each pixel location */ - virtual void Initialize( const LevelSetInputIndexType& inputIndex ) ITK_OVERRIDE; + void Initialize( const LevelSetInputIndexType& inputIndex ) override; /** Compute the product of Heaviside functions in the multi-levelset cases */ virtual void ComputeProduct( const LevelSetInputIndexType& inputPixel, @@ -109,23 +109,23 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationChanAndVeseInternalTerm : {} /** Supply updates at pixels to keep the term parameters always updated */ - virtual void UpdatePixel( const LevelSetInputIndexType& inputPixel, + void UpdatePixel( const LevelSetInputIndexType& inputPixel, const LevelSetOutputRealType & oldValue, - const LevelSetOutputRealType & newValue ) ITK_OVERRIDE; + const LevelSetOutputRealType & newValue ) override; protected: LevelSetEquationChanAndVeseInternalTerm(); - virtual ~LevelSetEquationChanAndVeseInternalTerm() ITK_OVERRIDE; + ~LevelSetEquationChanAndVeseInternalTerm() override; /** Returns the term contribution for a given location inputPixel, i.e. * \f$ \omega_i( p ) \f$. */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& inputPixel ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& inputPixel ) override; /** Returns the term contribution for a given location inputPixel, i.e. * \f$ \omega_i( p ) \f$. */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& inputPixel, - const LevelSetDataType& data ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& inputPixel, + const LevelSetDataType& data ) override; /** Accumulate contribution to term parameters from a given pixel */ void Accumulate( const InputPixelType& inputPixel, diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx index aa836b71a89..9532982a550 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx @@ -83,7 +83,7 @@ void LevelSetEquationChanAndVeseInternalTerm< TInput, TLevelSetContainer > } else { - itkWarningMacro( << "m_Heaviside is ITK_NULLPTR" ); + itkWarningMacro( << "m_Heaviside is nullptr" ); } } @@ -139,7 +139,7 @@ LevelSetEquationChanAndVeseInternalTerm< TInput, TLevelSetContainer > } else { - itkWarningMacro( << "m_Heaviside is ITK_NULLPTR" ); + itkWarningMacro( << "m_Heaviside is nullptr" ); } return NumericTraits< LevelSetOutputPixelType >::ZeroValue(); } @@ -168,7 +168,7 @@ LevelSetEquationChanAndVeseInternalTerm< TInput, TLevelSetContainer > } else { - itkWarningMacro( << "m_Heaviside is ITK_NULLPTR" ); + itkWarningMacro( << "m_Heaviside is nullptr" ); } return NumericTraits< LevelSetOutputPixelType >::ZeroValue(); } diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h index 06ff38534dc..f0991da634b 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h @@ -253,7 +253,7 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationContainer : public Object protected: LevelSetEquationContainer(); - virtual ~LevelSetEquationContainer() ITK_OVERRIDE; + ~LevelSetEquationContainer() override; LevelSetContainerPointer m_LevelSetContainer; MapContainerType m_Container; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx index 9d7bae572c0..388e079035c 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx @@ -52,7 +52,7 @@ LevelSetEquationContainer< TTermContainer > { if( ! iEquation->GetLevelSetContainer() ) { - itkGenericExceptionMacro( << "m_LevelSetContainer and iEquation->GetLevelSetContainer() are ITK_NULLPTR" ); + itkGenericExceptionMacro( << "m_LevelSetContainer and iEquation->GetLevelSetContainer() are nullptr" ); } } this->m_Container[iId] = iEquation; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.h index 59fd1a240e3..523030a4c93 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.h @@ -107,31 +107,31 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationCurvatureTerm : typedef Vector< LevelSetOutputRealType, itkGetStaticConstMacro(ImageDimension) > NeighborhoodScalesType; /** Update the term parameter values at end of iteration */ - virtual void Update() ITK_OVERRIDE; + void Update() override; /** Initialize the parameters in the terms prior to an iteration */ - virtual void InitializeParameters() ITK_OVERRIDE; + void InitializeParameters() override; /** Initialize term parameters in the dense case by computing for each pixel location */ - virtual void Initialize( const LevelSetInputIndexType& ) ITK_OVERRIDE; + void Initialize( const LevelSetInputIndexType& ) override; /** Supply updates at pixels to keep the term parameters always updated */ - virtual void UpdatePixel( const LevelSetInputIndexType& iP, + void UpdatePixel( const LevelSetInputIndexType& iP, const LevelSetOutputRealType& oldValue, - const LevelSetOutputRealType& newValue ) ITK_OVERRIDE; + const LevelSetOutputRealType& newValue ) override; protected: LevelSetEquationCurvatureTerm(); - virtual ~LevelSetEquationCurvatureTerm() ITK_OVERRIDE; + ~LevelSetEquationCurvatureTerm() override; /** Returns the term contribution for a given location iP, i.e. * \f$ \omega_i( p ) \f$. */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) override; /** Returns the term contribution for a given location iP, i.e. * \f$ \omega_i( p ) \f$. */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, const LevelSetDataType& iData ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, const LevelSetDataType& iData ) override; LevelSetOutputRealType m_NeighborhoodScales[ImageDimension]; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.h index 3bd406b8d02..b9f7b59c4d2 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.h @@ -92,23 +92,23 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationLaplacianTerm : typedef Vector< LevelSetOutputRealType, itkGetStaticConstMacro(ImageDimension) > NeighborhoodScalesType; /** Update the term parameter values at end of iteration */ - virtual void Update() ITK_OVERRIDE; + void Update() override; /** Initialize the parameters in the terms prior to an iteration */ - virtual void InitializeParameters() ITK_OVERRIDE; + void InitializeParameters() override; /** \todo to be documented. */ - virtual void Initialize( const LevelSetInputIndexType& ) ITK_OVERRIDE; + void Initialize( const LevelSetInputIndexType& ) override; /** Supply updates at pixels to keep the term parameters always updated */ - virtual void UpdatePixel( const LevelSetInputIndexType& iP, + void UpdatePixel( const LevelSetInputIndexType& iP, const LevelSetOutputRealType& oldValue, - const LevelSetOutputRealType& newValue ) ITK_OVERRIDE; + const LevelSetOutputRealType& newValue ) override; protected: LevelSetEquationLaplacianTerm(); - virtual ~LevelSetEquationLaplacianTerm() ITK_OVERRIDE; + ~LevelSetEquationLaplacianTerm() override; /** Return the spatial speed dependence a given pixel location * Usually, it is constant across the image domain */ @@ -116,12 +116,12 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationLaplacianTerm : /** Returns the term contribution for a given location iP, i.e. * \f$ \omega_i( p ) \f$. */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) override; /** Returns the term contribution for a given location iP, i.e. * \f$ \omega_i( p ) \f$. */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, - const LevelSetDataType& iData ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, + const LevelSetDataType& iData ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEquationLaplacianTerm); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.h index 725405d717b..7793094e1b2 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.h @@ -91,13 +91,13 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationOverlapPenaltyTerm : /** Update the term parameter values at end of iteration */ - virtual void Update() ITK_OVERRIDE; + void Update() override; /** Initialize parameters in the terms prior to an iteration */ - virtual void InitializeParameters() ITK_OVERRIDE; + void InitializeParameters() override; /** Initialize term parameters in the dense case by computing for each pixel location */ - virtual void Initialize( const LevelSetInputIndexType& index ) ITK_OVERRIDE; + void Initialize( const LevelSetInputIndexType& index ) override; /** Compute the sum of Heaviside functions in the multi-levelset cases * except the current levelset */ @@ -105,22 +105,22 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationOverlapPenaltyTerm : LevelSetOutputRealType& sum ); /** Supply updates at pixels to keep the term parameters always updated */ - virtual void UpdatePixel( const LevelSetInputIndexType& index, + void UpdatePixel( const LevelSetInputIndexType& index, const LevelSetOutputRealType& oldValue, - const LevelSetOutputRealType& newValue ) ITK_OVERRIDE; + const LevelSetOutputRealType& newValue ) override; protected: LevelSetEquationOverlapPenaltyTerm(); - virtual ~LevelSetEquationOverlapPenaltyTerm() ITK_OVERRIDE; + ~LevelSetEquationOverlapPenaltyTerm() override; /** Returns the term contribution for a given location index */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& index ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& index ) override; /** Returns the term contribution for a given location index */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& index, - const LevelSetDataType& data ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& index, + const LevelSetDataType& data ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEquationOverlapPenaltyTerm); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx index 4396a3735e5..87040ca1c6b 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx @@ -30,8 +30,8 @@ LevelSetEquationOverlapPenaltyTerm< TInput, TLevelSetContainer > { this->m_TermName = "Overlap term"; this->m_RequiredData.insert( "" ); - this->m_DomainMapImageFilter = ITK_NULLPTR; - this->m_CacheImage = ITK_NULLPTR; + this->m_DomainMapImageFilter = nullptr; + this->m_CacheImage = nullptr; } template< typename TInput, typename TLevelSetContainer > @@ -98,7 +98,7 @@ void LevelSetEquationOverlapPenaltyTerm< TInput, TLevelSetContainer > if( this->m_LevelSetContainer->HasDomainMap() ) { - if(this->m_DomainMapImageFilter == ITK_NULLPTR) + if(this->m_DomainMapImageFilter == nullptr) { this->m_DomainMapImageFilter = this->m_LevelSetContainer->GetModifiableDomainMapFilter(); this->m_CacheImage = this->m_DomainMapImageFilter->GetOutput(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.h index f8cdeb80031..91f9be15f10 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.h @@ -102,23 +102,23 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationPropagationTerm : itkGetModifiableObjectMacro(PropagationImage, PropagationImageType ); /** \todo to be documented. */ - virtual void Update() ITK_OVERRIDE; + void Update() override; /** Initialize the parameters in the terms prior to an iteration */ - virtual void InitializeParameters() ITK_OVERRIDE; + void InitializeParameters() override; /** \todo to be documented. */ - virtual void Initialize( const LevelSetInputIndexType& ) ITK_OVERRIDE; + void Initialize( const LevelSetInputIndexType& ) override; /** Supply updates at pixels to keep the term parameters always updated */ - virtual void UpdatePixel( const LevelSetInputIndexType& iP, + void UpdatePixel( const LevelSetInputIndexType& iP, const LevelSetOutputRealType& oldValue, - const LevelSetOutputRealType& newValue ) ITK_OVERRIDE; + const LevelSetOutputRealType& newValue ) override; protected: LevelSetEquationPropagationTerm(); - virtual ~LevelSetEquationPropagationTerm() ITK_OVERRIDE; + ~LevelSetEquationPropagationTerm() override; PropagationImagePointer m_PropagationImage; @@ -128,9 +128,9 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationPropagationTerm : /** Returns the term contribution for a given location iP, i.e. * \f$ \omega_i( p ) \f$. */ - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) ITK_OVERRIDE; - virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, - const LevelSetDataType& iData ) ITK_OVERRIDE; + LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) override; + LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, + const LevelSetDataType& iData ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEquationPropagationTerm); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.h index bafdad5743e..de802a0c616 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.h @@ -140,7 +140,7 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationTermBase : public Object LevelSetEquationTermBase(); /** Destructor */ - virtual ~LevelSetEquationTermBase() ITK_OVERRIDE; + ~LevelSetEquationTermBase() override; void SetUp(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx index 4e605fcdbab..4b62b2a3b0b 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx @@ -67,7 +67,7 @@ LevelSetEquationTermBase< TInputImage, TLevelSetContainer > } else { - itkGenericExceptionMacro( << "iContainer is ITK_NULLPTR" ); + itkGenericExceptionMacro( << "iContainer is nullptr" ); } } @@ -122,7 +122,7 @@ LevelSetEquationTermBase< TInputImage, TLevelSetContainer > { if( this->m_LevelSetContainer.IsNull() ) { - itkGenericExceptionMacro( <<"m_LevelSetContainer is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"m_LevelSetContainer is nullptr" ); } this->m_CurrentLevelSetPointer = this->m_LevelSetContainer->GetLevelSet( this->m_CurrentLevelSetId ); @@ -135,7 +135,7 @@ LevelSetEquationTermBase< TInputImage, TLevelSetContainer > if( !this->m_Heaviside.IsNotNull() ) { - itkWarningMacro( << "m_Heaviside is ITK_NULLPTR" ); + itkWarningMacro( << "m_Heaviside is nullptr" ); } } // ---------------------------------------------------------------------------- diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h index e1f8cdf8897..bde39e5ec3b 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h @@ -271,7 +271,7 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationTermContainer : public Object protected: LevelSetEquationTermContainer(); - virtual ~LevelSetEquationTermContainer() ITK_OVERRIDE; + ~LevelSetEquationTermContainer() override; LevelSetIdentifierType m_CurrentLevelSetId; LevelSetContainerPointer m_LevelSetContainer; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx index 3ac47ed5d74..c0ea93dc84f 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx @@ -95,7 +95,7 @@ LevelSetEquationTermContainer< TInputImage, TLevelSetContainer > } else { - itkGenericExceptionMacro( <<"m_Input and iTerm->GetInput are ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"m_Input and iTerm->GetInput are nullptr" ); } } iTerm->SetCurrentLevelSetId( this->m_CurrentLevelSetId ); @@ -108,7 +108,7 @@ LevelSetEquationTermContainer< TInputImage, TLevelSetContainer > { if( ! iTerm->GetLevelSetContainer() ) { - itkGenericExceptionMacro( <<"m_LevelSetContainer and iTerm->GetLevelSetContainer() are ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"m_LevelSetContainer and iTerm->GetLevelSetContainer() are nullptr" ); } } @@ -151,7 +151,7 @@ LevelSetEquationTermContainer< TInputImage, TLevelSetContainer > } else { - itkGenericExceptionMacro( <<"m_Input and iTerm->GetInput are ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"m_Input and iTerm->GetInput are nullptr" ); } } @@ -165,7 +165,7 @@ LevelSetEquationTermContainer< TInputImage, TLevelSetContainer > { if( ! iTerm->GetLevelSetContainer() ) { - itkGenericExceptionMacro( <<"m_LevelSetContainer and iTerm->GetLevelSetContainer() are ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"m_LevelSetContainer and iTerm->GetLevelSetContainer() are nullptr" ); } } diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.h index 77a8cb98f76..d52388a93e4 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.h @@ -122,23 +122,23 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolution< TEquationContainer, protected: LevelSetEvolution(); - ~LevelSetEvolution() ITK_OVERRIDE; + ~LevelSetEvolution() override; /** Initialize the update buffers for all level sets to hold the updates of * equations in each iteration */ - virtual void AllocateUpdateBuffer() ITK_OVERRIDE; + void AllocateUpdateBuffer() override; /** Computer the update at each pixel and store in the update buffer */ - virtual void ComputeIteration() ITK_OVERRIDE; + void ComputeIteration() override; /** Compute the time-step for the next iteration */ - virtual void ComputeTimeStepForNextIteration() ITK_OVERRIDE; + void ComputeTimeStepForNextIteration() override; /** Update the levelset by 1 iteration from the computed updates */ - virtual void UpdateLevelSets() ITK_OVERRIDE; + void UpdateLevelSets() override; /** Update the equations at the end of 1 iteration */ - virtual void UpdateEquations() ITK_OVERRIDE; + void UpdateEquations() override; /** Reinitialize the level set functions to a signed distance function */ void ReinitializeToSignedDistance(); @@ -233,7 +233,7 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolution< TEquationContainer, WhitakerSparseL protected: LevelSetEvolution(); - ~LevelSetEvolution() ITK_OVERRIDE; + ~LevelSetEvolution() override; typedef std::pair< LevelSetInputType, LevelSetOutputType > NodePairType; @@ -242,19 +242,19 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolution< TEquationContainer, WhitakerSparseL /** Initialize the update buffers for all level sets to hold the updates of * equations in each iteration */ - virtual void AllocateUpdateBuffer() ITK_OVERRIDE; + void AllocateUpdateBuffer() override; /** Compute the update at each pixel and store in the update buffer */ - virtual void ComputeIteration() ITK_OVERRIDE; + void ComputeIteration() override; /** Compute the time-step for the next iteration */ - virtual void ComputeTimeStepForNextIteration() ITK_OVERRIDE; + void ComputeTimeStepForNextIteration() override; /** Update the levelset by 1 iteration from the computed updates */ - virtual void UpdateLevelSets() ITK_OVERRIDE; + void UpdateLevelSets() override; /** Update the equations at the end of 1 iteration */ - virtual void UpdateEquations() ITK_OVERRIDE; + void UpdateEquations() override; typedef ThreadedIteratorRangePartitioner< typename LevelSetType::LayerConstIterator > SplitLevelSetPartitionerType; friend class LevelSetEvolutionComputeIterationThreader< LevelSetType, SplitLevelSetPartitionerType, Self >; @@ -334,13 +334,13 @@ public LevelSetEvolutionBase< TEquationContainer, ShiSparseLevelSetImage< VDimen protected: LevelSetEvolution(); - ~LevelSetEvolution() ITK_OVERRIDE; + ~LevelSetEvolution() override; /** Update the levelset by 1 iteration from the computed updates */ - virtual void UpdateLevelSets() ITK_OVERRIDE; + void UpdateLevelSets() override; /** Update the equations at the end of 1 iteration */ - virtual void UpdateEquations() ITK_OVERRIDE; + void UpdateEquations() override; private: LevelSetEvolution( const Self& ); @@ -414,11 +414,11 @@ public LevelSetEvolutionBase< TEquationContainer, MalcolmSparseLevelSetImage< VD protected: LevelSetEvolution(); - virtual ~LevelSetEvolution() ITK_OVERRIDE; + ~LevelSetEvolution() override; - virtual void UpdateLevelSets() ITK_OVERRIDE; + void UpdateLevelSets() override; - virtual void UpdateEquations() ITK_OVERRIDE; + void UpdateEquations() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEvolution); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx index 4a11f1bed2e..77e609fbeba 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx @@ -28,7 +28,7 @@ namespace itk template< typename TEquationContainer, typename TImage > LevelSetEvolution< TEquationContainer, LevelSetDenseImage< TImage > > ::LevelSetEvolution() : - m_IdListToProcessWhenThreading(ITK_NULLPTR) + m_IdListToProcessWhenThreading(nullptr) { this->m_SplitLevelSetComputeIterationThreader = SplitLevelSetComputeIterationThreaderType::New(); this->m_SplitDomainMapComputeIterationThreader = SplitDomainMapComputeIterationThreaderType::New(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.h index 4d56dc58f61..09336e160d0 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.h @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolutionBase : public Object protected: LevelSetEvolutionBase(); - virtual ~LevelSetEvolutionBase() ITK_OVERRIDE; + ~LevelSetEvolutionBase() override; void CheckSetUp(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx index 88005c8bc5b..cf02b0ab685 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionBase.hxx @@ -76,12 +76,12 @@ LevelSetEvolutionBase< TEquationContainer, TLevelSet > { if( this->m_LevelSetContainer.IsNull() ) { - itkGenericExceptionMacro( << "this->m_LevelSetContainer is ITK_NULLPTR" ); + itkGenericExceptionMacro( << "this->m_LevelSetContainer is nullptr" ); } if( this->m_EquationContainer.IsNull() ) { - itkGenericExceptionMacro( << "m_EquationContainer is ITK_NULLPTR" ); + itkGenericExceptionMacro( << "m_EquationContainer is nullptr" ); } typename EquationContainerType::Iterator eqIt = this->m_EquationContainer->Begin(); @@ -92,7 +92,7 @@ LevelSetEvolutionBase< TEquationContainer, TLevelSet > } if( !eqIt->GetEquation() ) { - itkGenericExceptionMacro( << "m_EquationContainer->GetEquation( 0 ) is ITK_NULLPTR" ); + itkGenericExceptionMacro( << "m_EquationContainer->GetEquation( 0 ) is nullptr" ); } if( this->m_LevelSetContainer != this->m_EquationContainer->GetLevelSetContainer() ) @@ -108,7 +108,7 @@ LevelSetEvolutionBase< TEquationContainer, TLevelSet > if( inputImage.IsNull() ) { - itkGenericExceptionMacro( << "input Image is ITK_NULLPTR" ); + itkGenericExceptionMacro( << "input Image is nullptr" ); } // Get the LevelSetContainer from the EquationContainer @@ -134,7 +134,7 @@ LevelSetEvolutionBase< TEquationContainer, TLevelSet > if( this->m_StoppingCriterion.IsNull() ) { - itkGenericExceptionMacro( << "m_StoppingCriterion is ITK_NULLPTR" ); + itkGenericExceptionMacro( << "m_StoppingCriterion is nullptr" ); } this->m_NumberOfIterations = 0; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.h index 81b346c03bc..4754c38ad65 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.h @@ -81,7 +81,7 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolutionComputeIterationThreader< LevelSetDen protected: LevelSetEvolutionComputeIterationThreader(); - virtual void ThreadedExecution( const DomainType & imageSubRegion, const ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedExecution( const DomainType & imageSubRegion, const ThreadIdType threadId ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEvolutionComputeIterationThreader); @@ -132,7 +132,7 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolutionComputeIterationThreader< LevelSetDen protected: LevelSetEvolutionComputeIterationThreader(); - virtual void ThreadedExecution( const DomainType & imageSubRegion, const ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedExecution( const DomainType & imageSubRegion, const ThreadIdType threadId ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEvolutionComputeIterationThreader); @@ -182,11 +182,11 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolutionComputeIterationThreader< protected: LevelSetEvolutionComputeIterationThreader(); - virtual void BeforeThreadedExecution() ITK_OVERRIDE; + void BeforeThreadedExecution() override; - virtual void ThreadedExecution( const DomainType & iteratorSubRange, const ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedExecution( const DomainType & iteratorSubRange, const ThreadIdType threadId ) override; - virtual void AfterThreadedExecution() ITK_OVERRIDE; + void AfterThreadedExecution() override; typedef std::vector< std::vector< NodePairType > > NodePairsPerThreadType; NodePairsPerThreadType m_NodePairsPerThread; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionNumberOfIterationsStoppingCriterion.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionNumberOfIterationsStoppingCriterion.h index ac84b60ee87..6858d55066e 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionNumberOfIterationsStoppingCriterion.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionNumberOfIterationsStoppingCriterion.h @@ -60,16 +60,16 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolutionNumberOfIterationsStoppingCriterion : typedef typename LevelSetContainerType::HeavisideType HeavisideType; typedef typename LevelSetContainerType::HeavisideType HeavisidePointer; - virtual bool IsSatisfied() const ITK_OVERRIDE; + bool IsSatisfied() const override; - virtual std::string GetDescription() const ITK_OVERRIDE; + std::string GetDescription() const override; protected: /** Constructor */ LevelSetEvolutionNumberOfIterationsStoppingCriterion(); /** Destructor */ - virtual ~LevelSetEvolutionNumberOfIterationsStoppingCriterion() ITK_OVERRIDE; + ~LevelSetEvolutionNumberOfIterationsStoppingCriterion() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEvolutionNumberOfIterationsStoppingCriterion); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionStoppingCriterion.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionStoppingCriterion.h index 07fb4d97ae5..30eec4c11e2 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionStoppingCriterion.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionStoppingCriterion.h @@ -77,7 +77,7 @@ namespace itk LevelSetEvolutionStoppingCriterion(); /** Destructor */ - virtual ~LevelSetEvolutionStoppingCriterion() ITK_OVERRIDE; + ~LevelSetEvolutionStoppingCriterion() override; LevelSetContainerPointer m_LevelSetContainer; OutputRealType m_RMSChangeAccumulator; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.h index 82df3e62295..4bac8f70919 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.h @@ -69,11 +69,11 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDens protected: LevelSetEvolutionUpdateLevelSetsThreader(); - virtual void BeforeThreadedExecution() ITK_OVERRIDE; + void BeforeThreadedExecution() override; - virtual void ThreadedExecution( const DomainType & imageSubRegion, const ThreadIdType threadId ) ITK_OVERRIDE; + void ThreadedExecution( const DomainType & imageSubRegion, const ThreadIdType threadId ) override; - virtual void AfterThreadedExecution() ITK_OVERRIDE; + void AfterThreadedExecution() override; typedef CompensatedSummation< LevelSetOutputRealType > RMSChangeAccumulatorType; typedef std::vector< RMSChangeAccumulatorType > RMSChangeAccumulatorPerThreadType; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetImage.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetImage.h index 6b702f0648f..955a79f9571 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetImage.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetImage.h @@ -68,7 +68,7 @@ class ITK_TEMPLATE_EXPORT LevelSetImage : protected: LevelSetImage(); - virtual ~LevelSetImage() ITK_OVERRIDE; + ~LevelSetImage() override; typedef GradientType ScalingType; ScalingType m_NeighborhoodScales; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx index e0646d99a25..d2cb9163076 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx @@ -104,7 +104,7 @@ LevelSetQuadEdgeMesh< TMesh >::Initialize() { Superclass::Initialize(); - this->m_Mesh = ITK_NULLPTR; + this->m_Mesh = nullptr; } template< typename TMesh > diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.h index af65e9d3ee6..b49f8da3292 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.h @@ -98,7 +98,7 @@ class ITK_TEMPLATE_EXPORT LevelSetSparseImage : itkGetModifiableObjectMacro(LabelMap, LabelMapType ); /** Graft data object as level set object */ - virtual void Graft( const DataObject* data ) ITK_OVERRIDE; + void Graft( const DataObject* data ) override; /** Return the label object pointer with a given id */ template< typename TLabel > @@ -106,7 +106,7 @@ class ITK_TEMPLATE_EXPORT LevelSetSparseImage : protected: LevelSetSparseImage(); - virtual ~LevelSetSparseImage() ITK_OVERRIDE; + ~LevelSetSparseImage() override; LayerMapType m_Layers; LabelMapPointer m_LabelMap; @@ -117,13 +117,13 @@ class ITK_TEMPLATE_EXPORT LevelSetSparseImage : virtual void InitializeInternalLabelList() = 0; - virtual bool IsInsideDomain( const InputType& inputIndex ) const ITK_OVERRIDE; + bool IsInsideDomain( const InputType& inputIndex ) const override; /** Initialize the label map point and the sparse-field layers */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; /** Copy level set information from data object */ - virtual void CopyInformation( const DataObject* data ) ITK_OVERRIDE; + void CopyInformation( const DataObject* data ) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetSparseImage); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx index 3826f496eee..6d8ccec787e 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx @@ -155,7 +155,7 @@ LevelSetSparseImage< TOutput, VDimension > { Superclass::Initialize(); - this->m_LabelMap = ITK_NULLPTR; + this->m_LabelMap = nullptr; this->InitializeLayers(); this->InitializeInternalLabelList(); } diff --git a/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.h b/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.h index 8b76c21af21..c5a52332d88 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.h @@ -82,20 +82,20 @@ class ITK_TEMPLATE_EXPORT MalcolmSparseLevelSetImage : /** Returns the value of the level set function at a given location inputPixel */ using Superclass::Evaluate; - virtual OutputType Evaluate( const InputType& inputPixel ) const ITK_OVERRIDE; + OutputType Evaluate( const InputType& inputPixel ) const override; /** Returns the Hessian of the level set function at a given location inputPixel */ - virtual HessianType EvaluateHessian( const InputType& inputPixel ) const ITK_OVERRIDE; + HessianType EvaluateHessian( const InputType& inputPixel ) const override; /** Returns the Laplacian of the level set function at a given location inputPixel */ - virtual OutputRealType EvaluateLaplacian( const InputType& inputPixel ) const ITK_OVERRIDE; + OutputRealType EvaluateLaplacian( const InputType& inputPixel ) const override; /** Returns the MeanCurvature of the level set function at a given location inputPixel */ - virtual OutputRealType EvaluateMeanCurvature( const InputType& inputPixel ) const ITK_OVERRIDE; + OutputRealType EvaluateMeanCurvature( const InputType& inputPixel ) const override; - virtual void EvaluateHessian( const InputType& inputPixel, LevelSetDataType& data ) const ITK_OVERRIDE; - virtual void EvaluateLaplacian( const InputType& inputPixel, LevelSetDataType& data ) const ITK_OVERRIDE; - virtual void EvaluateMeanCurvature( const InputType& inputPixel, LevelSetDataType& data ) const ITK_OVERRIDE; + void EvaluateHessian( const InputType& inputPixel, LevelSetDataType& data ) const override; + void EvaluateLaplacian( const InputType& inputPixel, LevelSetDataType& data ) const override; + void EvaluateMeanCurvature( const InputType& inputPixel, LevelSetDataType& data ) const override; static inline LayerIdType MinusOneLayer() { return -1; } static inline LayerIdType ZeroLayer() { return 0; } @@ -105,12 +105,12 @@ class ITK_TEMPLATE_EXPORT MalcolmSparseLevelSetImage : MalcolmSparseLevelSetImage(); - virtual ~MalcolmSparseLevelSetImage() ITK_OVERRIDE; + ~MalcolmSparseLevelSetImage() override; /** Initialize the sparse field layers */ - virtual void InitializeLayers() ITK_OVERRIDE; + void InitializeLayers() override; - virtual void InitializeInternalLabelList() ITK_OVERRIDE; + void InitializeInternalLabelList() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MalcolmSparseLevelSetImage); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.h b/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.h index af317a4321d..7e460a76fc1 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.h @@ -79,20 +79,20 @@ class ITK_TEMPLATE_EXPORT ShiSparseLevelSetImage : /** Returns the value of the level set function at a given location inputIndex */ using Superclass::Evaluate; - virtual OutputType Evaluate( const InputType& inputIndex ) const ITK_OVERRIDE; + OutputType Evaluate( const InputType& inputIndex ) const override; /** Returns the Hessian of the level set function at a given location inputIndex */ - virtual HessianType EvaluateHessian( const InputType& inputIndex ) const ITK_OVERRIDE; + HessianType EvaluateHessian( const InputType& inputIndex ) const override; /** Returns the Laplacian of the level set function at a given location inputIndex */ - virtual OutputRealType EvaluateLaplacian( const InputType& inputIndex ) const ITK_OVERRIDE; + OutputRealType EvaluateLaplacian( const InputType& inputIndex ) const override; /** Returns the Laplacian of the level set function at a given location inputIndex */ - virtual OutputRealType EvaluateMeanCurvature( const InputType& inputIndex ) const ITK_OVERRIDE; + OutputRealType EvaluateMeanCurvature( const InputType& inputIndex ) const override; - virtual void EvaluateHessian( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE; - virtual void EvaluateLaplacian( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE; - virtual void EvaluateMeanCurvature( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE; + void EvaluateHessian( const InputType& inputIndex, LevelSetDataType& data ) const override; + void EvaluateLaplacian( const InputType& inputIndex, LevelSetDataType& data ) const override; + void EvaluateMeanCurvature( const InputType& inputIndex, LevelSetDataType& data ) const override; static inline LayerIdType MinusThreeLayer() { return -3; } static inline LayerIdType MinusOneLayer() { return -1; } @@ -103,12 +103,12 @@ class ITK_TEMPLATE_EXPORT ShiSparseLevelSetImage : ShiSparseLevelSetImage(); - virtual ~ShiSparseLevelSetImage() ITK_OVERRIDE; + ~ShiSparseLevelSetImage() override; /** Initialize the sparse field layers */ - virtual void InitializeLayers() ITK_OVERRIDE; + void InitializeLayers() override; - virtual void InitializeInternalLabelList() ITK_OVERRIDE; + void InitializeInternalLabelList() override; private: diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.h b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.h index 2186423fac9..6914fdbdd1f 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.h @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT UpdateMalcolmSparseLevelSet : public Object protected: UpdateMalcolmSparseLevelSet(); - virtual ~UpdateMalcolmSparseLevelSet() ITK_OVERRIDE; + ~UpdateMalcolmSparseLevelSet() override; // output LevelSetPointer m_OutputLevelSet; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx index f6ae43200cc..803a2f6764e 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx @@ -50,7 +50,7 @@ UpdateMalcolmSparseLevelSet< VDimension, TEquationContainer > { if( this->m_InputLevelSet.IsNull() ) { - itkGenericExceptionMacro( <<"m_InputLevelSet is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"m_InputLevelSet is nullptr" ); } this->m_Offset = this->m_InputLevelSet->GetDomainOffset(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.h b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.h index b4bb1fb5a10..70938545608 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.h @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT UpdateShiSparseLevelSet : public Object protected: UpdateShiSparseLevelSet(); - virtual ~UpdateShiSparseLevelSet() ITK_OVERRIDE; + ~UpdateShiSparseLevelSet() override; // output LevelSetPointer m_OutputLevelSet; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx index 43b598069a3..0555c7e0b4e 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx @@ -48,7 +48,7 @@ UpdateShiSparseLevelSet< VDimension, TEquationContainer > { if( this->m_InputLevelSet.IsNull() ) { - itkGenericExceptionMacro( <<"m_InputLevelSet is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"m_InputLevelSet is nullptr" ); } this->m_Offset = this->m_InputLevelSet->GetDomainOffset(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.h b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.h index 46265cf8096..9f5734d9138 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.h @@ -125,7 +125,7 @@ class ITK_TEMPLATE_EXPORT UpdateWhitakerSparseLevelSet : public Object protected: UpdateWhitakerSparseLevelSet(); - virtual ~UpdateWhitakerSparseLevelSet() ITK_OVERRIDE; + ~UpdateWhitakerSparseLevelSet() override; /** Update zero level set layer by moving relevant points to layers -1 or 1 */ void UpdateLayerZero(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx index 559104cff8d..e7e023f1ed9 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx @@ -62,7 +62,7 @@ void UpdateWhitakerSparseLevelSet< VDimension, TLevelSetValueType, TEquationCont { if( this->m_InputLevelSet.IsNull() ) { - itkGenericExceptionMacro( <<"m_InputLevelSet is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"m_InputLevelSet is nullptr" ); } if( this->m_Update.empty() ) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.h b/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.h index 52df2ebd899..9c8c31b5b06 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.h @@ -83,7 +83,7 @@ class ITK_TEMPLATE_EXPORT WhitakerSparseLevelSetImage : /** Returns the value of the level set function at a given location iP */ using Superclass::Evaluate; - virtual OutputType Evaluate( const InputType& inputIndex ) const ITK_OVERRIDE; + OutputType Evaluate( const InputType& inputIndex ) const override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -126,12 +126,12 @@ class ITK_TEMPLATE_EXPORT WhitakerSparseLevelSetImage : protected: WhitakerSparseLevelSetImage(); - virtual ~WhitakerSparseLevelSetImage() ITK_OVERRIDE; + ~WhitakerSparseLevelSetImage() override; /** Initialize the sparse field layers */ - virtual void InitializeLayers() ITK_OVERRIDE; + void InitializeLayers() override; - virtual void InitializeInternalLabelList() ITK_OVERRIDE; + void InitializeInternalLabelList() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(WhitakerSparseLevelSetImage); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx index a256005ee50..9062c9d4993 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx @@ -87,7 +87,7 @@ WhitakerSparseLevelSetImage< TOutput, VDimension > } else { - itkGenericExceptionMacro( <<"Note: m_LabelMap is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"Note: m_LabelMap is nullptr" ); } } return rval; diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionBaseTest.cxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionBaseTest.cxx index 57445f1e2a7..9945bc4460f 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionBaseTest.cxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetDomainPartitionBaseTest.cxx @@ -39,8 +39,8 @@ class LevelSetDomainPartitionBaseHelper itkNewMacro( Self ); protected: - void AllocateListDomain() ITK_OVERRIDE {} - void PopulateListDomain() ITK_OVERRIDE {} + void AllocateListDomain() override {} + void PopulateListDomain() override {} }; } diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkImageToRGBVTKImageFilter.h b/Modules/Segmentation/LevelSetsv4Visualization/include/itkImageToRGBVTKImageFilter.h index aec428625a4..92b984a27f7 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkImageToRGBVTKImageFilter.h +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkImageToRGBVTKImageFilter.h @@ -64,11 +64,11 @@ class ITK_TEMPLATE_EXPORT ImageToRGBVTKImageFilter:public ProcessObject void SetInput(const InputImageType *); /** This call delegate the update to the importer */ - void Update(); + void Update() override; protected: ImageToRGBVTKImageFilter(); - virtual ~ImageToRGBVTKImageFilter(); + ~ImageToRGBVTKImageFilter() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ImageToRGBVTKImageFilter); diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetIterationUpdateCommand.h b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetIterationUpdateCommand.h index c6b1eb2117c..29f963e9923 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetIterationUpdateCommand.h +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetIterationUpdateCommand.h @@ -51,9 +51,9 @@ class ITK_TEMPLATE_EXPORT LevelSetIterationUpdateCommand : public Command itkNewMacro( Self ); - virtual void Execute( const Object* caller, const EventObject& event ); + void Execute( const Object* caller, const EventObject& event ) override; - virtual void Execute( Object* caller, const EventObject& event ); + void Execute( Object* caller, const EventObject& event ) override; /** Set/Get the filter to call Update() on. */ itkSetObjectMacro( FilterToUpdate, FilterToUpdateType ); @@ -66,7 +66,7 @@ class ITK_TEMPLATE_EXPORT LevelSetIterationUpdateCommand : public Command protected: LevelSetIterationUpdateCommand(); - virtual ~LevelSetIterationUpdateCommand(); + ~LevelSetIterationUpdateCommand() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetIterationUpdateCommand); diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetIterationUpdateCommand.hxx b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetIterationUpdateCommand.hxx index 5bb0e88ceb6..a135a909fbd 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetIterationUpdateCommand.hxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetIterationUpdateCommand.hxx @@ -52,7 +52,7 @@ LevelSetIterationUpdateCommand< TIteratingFilter, TFilterToUpdate > IteratingFilterType * filter = dynamic_cast< IteratingFilterType * >( caller ); // Was filter->AddObserver() called correctly? - itkAssertInDebugAndIgnoreInReleaseMacro( filter != ITK_NULLPTR ); + itkAssertInDebugAndIgnoreInReleaseMacro( filter != nullptr ); // If we have the right event. if( IterationEvent().CheckEvent( &event ) && filter->GetNumberOfIterations() % this->m_UpdatePeriod == 0 ) diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageData.h b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageData.h index 2a9f673d72d..308bae44b57 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageData.h +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageData.h @@ -62,13 +62,13 @@ class ITK_TEMPLATE_EXPORT LevelSetTovtkImageData< LevelSetDenseImage< TImage > > typedef typename LevelSetType::Pointer LevelSetPointer; - vtkImageData* GetOutput() const; + vtkImageData* GetOutput() const override; protected: LevelSetTovtkImageData(); - virtual ~LevelSetTovtkImageData(); + ~LevelSetTovtkImageData() override; - void GenerateData(); + void GenerateData() override; private: LevelSetTovtkImageData( const Self& ); @@ -101,13 +101,13 @@ class ITK_TEMPLATE_EXPORT LevelSetTovtkImageData< WhitakerSparseLevelSetImage< T typedef typename LevelSetType::Pointer LevelSetPointer; - vtkImageData* GetOutput() const; + vtkImageData* GetOutput() const override; protected: LevelSetTovtkImageData(); - virtual ~LevelSetTovtkImageData(); + ~LevelSetTovtkImageData() override; - void GenerateData(); + void GenerateData() override; private: LevelSetTovtkImageData( const Self& ); @@ -145,13 +145,13 @@ class ITK_TEMPLATE_EXPORT LevelSetTovtkImageData< ShiSparseLevelSetImage< VDimen typedef typename LevelSetType::Pointer LevelSetPointer; - vtkImageData* GetOutput() const; + vtkImageData* GetOutput() const override; protected: LevelSetTovtkImageData(); - virtual ~LevelSetTovtkImageData(); + ~LevelSetTovtkImageData() override; - void GenerateData(); + void GenerateData() override; private: LevelSetTovtkImageData( const Self& ); @@ -196,13 +196,13 @@ class ITK_TEMPLATE_EXPORT LevelSetTovtkImageData< MalcolmSparseLevelSetImage< VD typedef typename LevelSetType::Pointer LevelSetPointer; - vtkImageData* GetOutput() const; + vtkImageData* GetOutput() const override; protected: LevelSetTovtkImageData(); - virtual ~LevelSetTovtkImageData(); + ~LevelSetTovtkImageData() override; - void GenerateData(); + void GenerateData() override; private: LevelSetTovtkImageData( const Self& ); diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageData.hxx b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageData.hxx index 671e0c7ad60..a98110bac67 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageData.hxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageData.hxx @@ -61,7 +61,7 @@ LevelSetTovtkImageData< LevelSetDenseImage< TImage > > { if( !this->m_LevelSet->GetImage() ) { - itkGenericExceptionMacro( <<"this->m_LevelSet->GetImage() is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"this->m_LevelSet->GetImage() is nullptr" ); } this->m_Converter->SetInput( this->m_LevelSet->GetImage() ); this->m_Converter->Update(); @@ -94,9 +94,9 @@ void LevelSetTovtkImageData< WhitakerSparseLevelSetImage< TOutput, VDimension > > ::GenerateData() { - if( this->m_LevelSet->GetLabelMap() == ITK_NULLPTR ) + if( this->m_LevelSet->GetLabelMap() == nullptr ) { - itkGenericExceptionMacro( <<"this->m_LevelSet->GetLabelMap() is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"this->m_LevelSet->GetLabelMap() is nullptr" ); } typename LevelSetType::LabelMapConstPointer labelmap = this->m_LevelSet->GetLabelMap(); @@ -154,9 +154,9 @@ void LevelSetTovtkImageData< ShiSparseLevelSetImage< VDimension > > ::GenerateData() { - if( this->m_LevelSet->GetLabelMap() == ITK_NULLPTR ) + if( this->m_LevelSet->GetLabelMap() == nullptr ) { - itkGenericExceptionMacro( <<"this->m_LevelSet->GetLabelMap() is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"this->m_LevelSet->GetLabelMap() is nullptr" ); } LabelMapPointer labelmap = this->m_LevelSet->GetModifiableLabelMap(); @@ -197,9 +197,9 @@ void LevelSetTovtkImageData< MalcolmSparseLevelSetImage< VDimension > > ::GenerateData() { - if( this->m_LevelSet->GetLabelMap() == ITK_NULLPTR ) + if( this->m_LevelSet->GetLabelMap() == nullptr ) { - itkGenericExceptionMacro( <<"this->m_LevelSet->GetLabelMap() is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"this->m_LevelSet->GetLabelMap() is nullptr" ); } LabelMapPointer labelmap = this->m_LevelSet->GetModifiableLabelMap(); diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageDataBase.h b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageDataBase.h index 8bbef773525..4ba2ac5ebe4 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageDataBase.h +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageDataBase.h @@ -48,11 +48,11 @@ class ITK_TEMPLATE_EXPORT LevelSetTovtkImageDataBase : public ProcessObject virtual vtkImageData* GetOutput() const = 0; - void Update(); + void Update() override; protected: LevelSetTovtkImageDataBase(); - virtual ~LevelSetTovtkImageDataBase(); + ~LevelSetTovtkImageDataBase() override; LevelSetPointer m_LevelSet; diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageDataBase.hxx b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageDataBase.hxx index 1e7d5227667..e6dead61921 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageDataBase.hxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkLevelSetTovtkImageDataBase.hxx @@ -40,7 +40,7 @@ LevelSetTovtkImageDataBase< TLevelSet > { if( !iLevelSet ) { - itkGenericExceptionMacro( <<"iLevelSet is ITK_NULLPTR" ); + itkGenericExceptionMacro( <<"iLevelSet is nullptr" ); } m_LevelSet = iLevelSet; } diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DLevelSetAsElevationMap.h b/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DLevelSetAsElevationMap.h index 7fa2abd7381..fef06c9faf6 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DLevelSetAsElevationMap.h +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DLevelSetAsElevationMap.h @@ -81,9 +81,9 @@ class ITK_TEMPLATE_EXPORT VTKVisualize2DLevelSetAsElevationMap : protected: VTKVisualize2DLevelSetAsElevationMap(); - virtual ~VTKVisualize2DLevelSetAsElevationMap(); + ~VTKVisualize2DLevelSetAsElevationMap() override; - virtual void PrepareVTKPipeline(); + void PrepareVTKPipeline() override; void GenerateElevationMap(); diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DSparseLevelSetLayers.h b/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DSparseLevelSetLayers.h index b9bf072fea9..a25ad1d10c9 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DSparseLevelSetLayers.h +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DSparseLevelSetLayers.h @@ -74,11 +74,11 @@ public VTKVisualize2DSparseLevelSetLayersBase< protected: VTKVisualize2DSparseLevelSetLayers(); - virtual ~VTKVisualize2DSparseLevelSetLayers(); + ~VTKVisualize2DSparseLevelSetLayers() override; - void AddLayers(); + void AddLayers() override; - std::string GetLevelSetRepresentationName() const; + std::string GetLevelSetRepresentationName() const override; private: VTKVisualize2DSparseLevelSetLayers ( const Self& ); @@ -121,11 +121,11 @@ public VTKVisualize2DSparseLevelSetLayersBase< protected: VTKVisualize2DSparseLevelSetLayers(); - virtual ~VTKVisualize2DSparseLevelSetLayers(); + ~VTKVisualize2DSparseLevelSetLayers() override; - void AddLayers(); + void AddLayers() override; - std::string GetLevelSetRepresentationName() const; + std::string GetLevelSetRepresentationName() const override; private: VTKVisualize2DSparseLevelSetLayers ( const Self& ); @@ -169,11 +169,11 @@ public VTKVisualize2DSparseLevelSetLayersBase< protected: VTKVisualize2DSparseLevelSetLayers(); - virtual ~VTKVisualize2DSparseLevelSetLayers(); + ~VTKVisualize2DSparseLevelSetLayers() override; - void AddLayers(); + void AddLayers() override; - std::string GetLevelSetRepresentationName() const; + std::string GetLevelSetRepresentationName() const override; private: VTKVisualize2DSparseLevelSetLayers ( const Self& ); diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DSparseLevelSetLayersBase.h b/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DSparseLevelSetLayersBase.h index 3144b6f14d1..c36d25dd315 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DSparseLevelSetLayersBase.h +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualize2DSparseLevelSetLayersBase.h @@ -72,7 +72,7 @@ class ITK_TEMPLATE_EXPORT VTKVisualize2DSparseLevelSetLayersBase : typedef TLevelSet LevelSetType; typedef typename LevelSetType::Pointer LevelSetPointer; - virtual void SetInputImage( const InputImageType* image ); + void SetInputImage( const InputImageType* image ) override; void SetLevelSet( LevelSetType * levelSet ); #ifdef ITK_USE_CONCEPT_CHECKING @@ -82,13 +82,13 @@ class ITK_TEMPLATE_EXPORT VTKVisualize2DSparseLevelSetLayersBase : protected: VTKVisualize2DSparseLevelSetLayersBase(); - virtual ~VTKVisualize2DSparseLevelSetLayersBase(); + ~VTKVisualize2DSparseLevelSetLayersBase() override; LevelSetPointer m_LevelSet; vtkSmartPointer< vtkImageData > m_VTKImage; vtkSmartPointer< vtkImageActor > m_VTKImageActor; - virtual void PrepareVTKPipeline(); + void PrepareVTKPipeline() override; virtual std::string GetLevelSetRepresentationName() const = 0; diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualizeImageLevelSet.h b/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualizeImageLevelSet.h index 6179321bd5d..eb9d18ffac8 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualizeImageLevelSet.h +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualizeImageLevelSet.h @@ -86,7 +86,7 @@ class ITK_TEMPLATE_EXPORT VTKVisualizeImageLevelSet: public LightObject protected: VTKVisualizeImageLevelSet(); - virtual ~VTKVisualizeImageLevelSet(); + ~VTKVisualizeImageLevelSet() override; /** Setup the VTK pipeline for a Render() call. */ virtual void PrepareVTKPipeline() = 0; diff --git a/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualizeImageLevelSetIsoValues.h b/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualizeImageLevelSetIsoValues.h index 18598e28186..5a3ad4c28c7 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualizeImageLevelSetIsoValues.h +++ b/Modules/Segmentation/LevelSetsv4Visualization/include/itkVTKVisualizeImageLevelSetIsoValues.h @@ -94,10 +94,10 @@ class ITK_TEMPLATE_EXPORT VTKVisualizeImageLevelSetIsoValues< Image< TInputPixel protected: VTKVisualizeImageLevelSetIsoValues(); - virtual ~VTKVisualizeImageLevelSetIsoValues(); + ~VTKVisualizeImageLevelSetIsoValues() override; /** Render the visualization. */ - virtual void PrepareVTKPipeline(); + void PrepareVTKPipeline() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VTKVisualizeImageLevelSetIsoValues); @@ -147,7 +147,7 @@ class ITK_TEMPLATE_EXPORT VTKVisualizeImageLevelSetIsoValues< Image< TInputPixel typedef TLevelSet LevelSetType; - virtual void SetInputImage( const InputImageType * iImage ); + void SetInputImage( const InputImageType * iImage ) override; void SetLevelSet( LevelSetType * levelSet ); /** Set/Get the number of level set contours to visualize. */ @@ -166,10 +166,10 @@ class ITK_TEMPLATE_EXPORT VTKVisualizeImageLevelSetIsoValues< Image< TInputPixel protected: VTKVisualizeImageLevelSetIsoValues(); - virtual ~VTKVisualizeImageLevelSetIsoValues(); + ~VTKVisualizeImageLevelSetIsoValues() override; /** Render the visualization. */ - virtual void PrepareVTKPipeline(); + void PrepareVTKPipeline() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VTKVisualizeImageLevelSetIsoValues); diff --git a/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualizeLevelSetsInteractivePauseTest.cxx b/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualizeLevelSetsInteractivePauseTest.cxx index b00579897cf..3252f5d5172 100644 --- a/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualizeLevelSetsInteractivePauseTest.cxx +++ b/Modules/Segmentation/LevelSetsv4Visualization/test/itkVTKVisualizeLevelSetsInteractivePauseTest.cxx @@ -73,12 +73,12 @@ class ProcessingPauseCommand: public itk::Command ProcessingPauseCommand(){} - virtual void Execute( const itk::Object* caller, const itk::EventObject& event ) + void Execute( const itk::Object* caller, const itk::EventObject& event ) override { this->Execute( const_cast< itk::Object* >( caller ), event ); } - virtual void Execute( itk::Object* itkNotUsed(caller), const itk::EventObject& event ) + void Execute( itk::Object* itkNotUsed(caller), const itk::EventObject& event ) override { if( itk::IterationEvent().CheckEvent( &event )) { @@ -124,7 +124,7 @@ class KeypressPauseCommand: public vtkCommand return keypressPauseCommand; } - virtual void Execute( vtkObject * vtkNotUsed(caller), unsigned long eventId, void * vtkNotUsed(callData) ) + void Execute( vtkObject * vtkNotUsed(caller), unsigned long eventId, void * vtkNotUsed(callData) ) override { if( vtkCommand::TimerEvent == eventId ) { @@ -333,7 +333,7 @@ class ExitOnTimer: public vtkCommand return new ExitOnTimer; } - virtual void Execute( vtkObject * caller, unsigned long eventId, void * callData ) + void Execute( vtkObject * caller, unsigned long eventId, void * callData ) override { if( vtkCommand::TimerEvent == eventId ) { diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.h b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.h index a7519de9f06..7bfc68e5c76 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.h +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.h @@ -318,8 +318,8 @@ class ITK_TEMPLATE_EXPORT MRFImageFilter: protected: MRFImageFilter(); - ~MRFImageFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MRFImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Allocate memory for labelled images. */ void Allocate(); @@ -348,13 +348,13 @@ class ITK_TEMPLATE_EXPORT MRFImageFilter: LabelledImageNeighborhoodIterator & labelledIter, LabelStatusImageNeighborhoodIterator & labelStatusIter); - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - virtual void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *) override; - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MRFImageFilter); diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx index 181cc862955..b43fe00244a 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx @@ -32,10 +32,10 @@ MRFImageFilter< TInputImage, TClassifiedImage > m_TotalNumberOfPixelsInInputImage(1), m_ErrorTolerance(0.2), m_SmoothingFactor(1), - m_ClassProbability(ITK_NULLPTR), + m_ClassProbability(nullptr), m_NumberOfIterations(0), m_StopCondition(MaximumNumberOfIterations), - m_ClassifierPtr(ITK_NULLPTR) + m_ClassifierPtr(nullptr) { if ( (int)InputImageDimension != (int)ClassifiedImageDimension ) { diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.h b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.h index 4c70f5b4f2d..e1ff8503a82 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.h +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.h @@ -113,7 +113,7 @@ class ITK_TEMPLATE_EXPORT RGBGibbsPriorFilter:public MRFImageFilter< TInputImage void SetClassifier(typename ClassifierType::Pointer ptrToClassifier); /** Set the Number of classes. */ - virtual void SetNumberOfClasses( const unsigned int numberOfClasses ) ITK_OVERRIDE + void SetNumberOfClasses( const unsigned int numberOfClasses ) override { itkDebugMacro("setting NumberOfClasses to " << numberOfClasses ); if ( this->m_NumberOfClasses != numberOfClasses ) @@ -124,14 +124,14 @@ class ITK_TEMPLATE_EXPORT RGBGibbsPriorFilter:public MRFImageFilter< TInputImage } /** Get the Number of classes. */ - virtual unsigned int GetNumberOfClasses() const ITK_OVERRIDE + unsigned int GetNumberOfClasses() const override { return this->m_NumberOfClasses; } /** Set/Get the number of iteration of the Iterated Conditional Mode * (ICM) algorithm. A default value is set at 50 iterations. */ - virtual void SetMaximumNumberOfIterations( const unsigned int numberOfIterations ) ITK_OVERRIDE + void SetMaximumNumberOfIterations( const unsigned int numberOfIterations ) override { itkDebugMacro("setting MaximumNumberOfIterations to " << numberOfIterations); if ( this->m_MaximumNumberOfIterations != numberOfIterations ) @@ -143,7 +143,7 @@ class ITK_TEMPLATE_EXPORT RGBGibbsPriorFilter:public MRFImageFilter< TInputImage /** Get the number of iterations of the Iterated Conditional Mode * (ICM) algorithm. */ - virtual unsigned int GetMaximumNumberOfIterations() const ITK_OVERRIDE + unsigned int GetMaximumNumberOfIterations() const override { return this->m_MaximumNumberOfIterations; } @@ -183,14 +183,14 @@ class ITK_TEMPLATE_EXPORT RGBGibbsPriorFilter:public MRFImageFilter< TInputImage protected: RGBGibbsPriorFilter(); - ~RGBGibbsPriorFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~RGBGibbsPriorFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; void Allocate(); /** allocate memory space for the filter. */ - virtual void MinimizeFunctional() ITK_OVERRIDE; + void MinimizeFunctional() override; - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; virtual void ApplyGibbsLabeller(); diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx index eece86d5605..ae247ba0d6b 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx @@ -32,19 +32,19 @@ namespace itk template< typename TInputImage, typename TClassifiedImage > RGBGibbsPriorFilter< TInputImage, TClassifiedImage > ::RGBGibbsPriorFilter(void): - m_InputImage(ITK_NULLPTR), - m_TrainingImage(ITK_NULLPTR), - m_LabelledImage(ITK_NULLPTR), + m_InputImage(nullptr), + m_TrainingImage(nullptr), + m_LabelledImage(nullptr), m_NumberOfClasses(0), m_MaximumNumberOfIterations(10), - m_ClassifierPtr(ITK_NULLPTR), + m_ClassifierPtr(nullptr), m_BoundaryGradient(7), m_BoundaryWeight(1), m_GibbsPriorWeight(1), m_StartRadius(10), m_RecursiveNumber(0), - m_LabelStatus(ITK_NULLPTR), - m_MediumImage(ITK_NULLPTR), + m_LabelStatus(nullptr), + m_MediumImage(nullptr), m_Temp(0), m_ImageWidth(0), m_ImageHeight(0), @@ -53,8 +53,8 @@ RGBGibbsPriorFilter< TInputImage, TClassifiedImage > m_ObjectLabel(1), m_VecDim(0), m_LowPoint(), - m_Region(ITK_NULLPTR), - m_RegionCount(ITK_NULLPTR), + m_Region(nullptr), + m_RegionCount(nullptr), m_CliqueWeight_1(0.0), m_CliqueWeight_2(0.0), m_CliqueWeight_3(0.0), @@ -569,7 +569,7 @@ RGBGibbsPriorFilter< TInputImage, TClassifiedImage > const unsigned int rowsize = m_ImageWidth; m_Temp = 0; - srand( static_cast< unsigned int >( time(ITK_NULLPTR) ) ); + srand( static_cast< unsigned int >( time(nullptr) ) ); while ( m_Temp < 2 * size ) { diff --git a/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.h b/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.h index f7a61dd8304..12d3192d773 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.h +++ b/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.h @@ -94,7 +94,7 @@ class ITK_TEMPLATE_EXPORT ConfidenceConnectedImageFilter: typedef typename NumericTraits< InputImagePixelType >::RealType InputRealType; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Set seed point. This method is deprecated, please use AddSeed() */ void SetSeed(const IndexType & seed); @@ -147,15 +147,15 @@ class ITK_TEMPLATE_EXPORT ConfidenceConnectedImageFilter: protected: ConfidenceConnectedImageFilter(); - ~ConfidenceConnectedImageFilter() ITK_OVERRIDE {} + ~ConfidenceConnectedImageFilter() override {} // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces the entire dataset - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ConfidenceConnectedImageFilter); diff --git a/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.h b/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.h index 354b2d9c0f6..d10afb44d71 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.h +++ b/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.h @@ -65,7 +65,7 @@ class ITK_TEMPLATE_EXPORT ConnectedThresholdImageFilter: typedef typename OutputImageType::RegionType OutputImageRegionType; typedef typename OutputImageType::PixelType OutputImagePixelType; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Set seed point. */ void SetSeed(const IndexType & seed); @@ -141,15 +141,15 @@ class ITK_TEMPLATE_EXPORT ConnectedThresholdImageFilter: protected: ConnectedThresholdImageFilter(); - ~ConnectedThresholdImageFilter() ITK_OVERRIDE {} + ~ConnectedThresholdImageFilter() override {} // Override since the filter needs all the data for the algorithm. - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces the entire dataset. - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(ConnectedThresholdImageFilter); diff --git a/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.h b/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.h index 387d949faa3..6edba2e5a94 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.h +++ b/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.h @@ -102,7 +102,7 @@ class ITK_TEMPLATE_EXPORT IsolatedConnectedImageFilter: typedef typename NumericTraits< InputImagePixelType >::RealType InputRealType; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Add seed point 1. This seed will be isolated from Seed2 (if possible). * All pixels connected to this seed will be replaced with ReplaceValue. */ @@ -193,7 +193,7 @@ class ITK_TEMPLATE_EXPORT IsolatedConnectedImageFilter: protected: IsolatedConnectedImageFilter(); - ~IsolatedConnectedImageFilter() ITK_OVERRIDE {} + ~IsolatedConnectedImageFilter() override {} SeedsContainerType m_Seeds1; SeedsContainerType m_Seeds2; @@ -209,12 +209,12 @@ class ITK_TEMPLATE_EXPORT IsolatedConnectedImageFilter: bool m_ThresholdingFailed; // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces the entire dataset - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(IsolatedConnectedImageFilter); diff --git a/Modules/Segmentation/RegionGrowing/include/itkNeighborhoodConnectedImageFilter.h b/Modules/Segmentation/RegionGrowing/include/itkNeighborhoodConnectedImageFilter.h index 004d8ac671f..82a5ce5f339 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkNeighborhoodConnectedImageFilter.h +++ b/Modules/Segmentation/RegionGrowing/include/itkNeighborhoodConnectedImageFilter.h @@ -62,7 +62,7 @@ class ITK_TEMPLATE_EXPORT NeighborhoodConnectedImageFilter: typedef typename OutputImageType::RegionType OutputImageRegionType; typedef typename OutputImageType::PixelType OutputImagePixelType; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Clear the seeds */ void ClearSeeds(); @@ -117,7 +117,7 @@ class ITK_TEMPLATE_EXPORT NeighborhoodConnectedImageFilter: protected: NeighborhoodConnectedImageFilter(); - ~NeighborhoodConnectedImageFilter() ITK_OVERRIDE {} + ~NeighborhoodConnectedImageFilter() override {} std::vector< IndexType > m_Seeds; InputImagePixelType m_Lower; @@ -128,12 +128,12 @@ class ITK_TEMPLATE_EXPORT NeighborhoodConnectedImageFilter: InputImageSizeType m_Radius; // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces the entire dataset - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(NeighborhoodConnectedImageFilter); diff --git a/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.h b/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.h index 3f7f65e9473..97fc2c3d24c 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.h +++ b/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.h @@ -96,7 +96,7 @@ class ITK_TEMPLATE_EXPORT VectorConfidenceConnectedImageFilter: typedef typename DistanceThresholdFunctionType::Pointer DistanceThresholdFunctionPointer; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Set seed point. This method is deprecated, please use AddSeed() */ void SetSeed(const IndexType & seed); @@ -150,12 +150,12 @@ class ITK_TEMPLATE_EXPORT VectorConfidenceConnectedImageFilter: VectorConfidenceConnectedImageFilter(); // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces the entire dataset - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VectorConfidenceConnectedImageFilter); diff --git a/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.h b/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.h index a033db33025..3abc222d7e4 100644 --- a/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.h +++ b/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.h @@ -152,25 +152,25 @@ class ITK_TEMPLATE_EXPORT PCAShapeSignedDistanceFunction: itkGetModifiableObjectMacro(Transform, TransformType); /** A PCAShape is defined by a set of shape and pose parameters. */ - virtual void SetParameters(const ParametersType &) ITK_OVERRIDE; + void SetParameters(const ParametersType &) override; - virtual unsigned int GetNumberOfShapeParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfShapeParameters(void) const override { return m_NumberOfPrincipalComponents; } - virtual unsigned int GetNumberOfPoseParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfPoseParameters(void) const override { return m_Transform ? m_Transform->GetNumberOfParameters() : 0; } /** Evaluate the signed distance from a shape at a given position. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE; + OutputType Evaluate(const PointType & point) const override; /** Initialize must be called before the first call of Evaluate() to allow the class to validate any inputs. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; protected: PCAShapeSignedDistanceFunction(); - ~PCAShapeSignedDistanceFunction() ITK_OVERRIDE {} + ~PCAShapeSignedDistanceFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(PCAShapeSignedDistanceFunction); diff --git a/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx b/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx index d859c7dadb9..077e842541f 100644 --- a/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx +++ b/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx @@ -33,7 +33,7 @@ PCAShapeSignedDistanceFunction< TCoordRep, VSpaceDimension, TImage > m_NumberOfPrincipalComponents = 0; m_NumberOfTransformParameters = 0; - m_MeanImage = ITK_NULLPTR; + m_MeanImage = nullptr; m_PrincipalComponentImages.resize(0); m_PrincipalComponentStandardDeviations.SetSize(0); @@ -54,7 +54,7 @@ PCAShapeSignedDistanceFunction< TCoordRep, VSpaceDimension, TImage > { m_NumberOfPrincipalComponents = n; - m_PrincipalComponentImages.resize(n, ITK_NULLPTR); + m_PrincipalComponentImages.resize(n, nullptr); m_PrincipalComponentStandardDeviations.SetSize(n); m_PrincipalComponentStandardDeviations.Fill(1.0); diff --git a/Modules/Segmentation/SignedDistanceFunction/include/itkShapeSignedDistanceFunction.h b/Modules/Segmentation/SignedDistanceFunction/include/itkShapeSignedDistanceFunction.h index 55d50d35f6d..9617f108f05 100644 --- a/Modules/Segmentation/SignedDistanceFunction/include/itkShapeSignedDistanceFunction.h +++ b/Modules/Segmentation/SignedDistanceFunction/include/itkShapeSignedDistanceFunction.h @@ -95,7 +95,7 @@ class ShapeSignedDistanceFunction: { return this->GetNumberOfShapeParameters() + this->GetNumberOfPoseParameters(); } /** Evaluate the signed distance from a shape at a given position. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE = 0; + OutputType Evaluate(const PointType & point) const override = 0; /** Initialize must be called before the first call of SetParameters() or Evaluate() to allow the class to validate any inputs. */ @@ -105,9 +105,9 @@ class ShapeSignedDistanceFunction: ShapeSignedDistanceFunction() {} - ~ShapeSignedDistanceFunction() ITK_OVERRIDE {} + ~ShapeSignedDistanceFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::PrintSelf(os, indent); //FIX os << indent << "Parameters: " << m_Parameters << std::endl; diff --git a/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.h b/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.h index 7d751a61e47..0f35b5a030e 100644 --- a/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.h +++ b/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.h @@ -77,21 +77,21 @@ class ITK_TEMPLATE_EXPORT SphereSignedDistanceFunction: /** A sphere is defined by a set of shape parameters. The first parameter * is the radius and the next SpaceDimension parameters represent the center. */ - virtual void SetParameters(const ParametersType &) ITK_OVERRIDE; + void SetParameters(const ParametersType &) override; - virtual unsigned int GetNumberOfShapeParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfShapeParameters(void) const override { return 1; } - virtual unsigned int GetNumberOfPoseParameters(void) const ITK_OVERRIDE + unsigned int GetNumberOfPoseParameters(void) const override { return SpaceDimension; } /** Evaluate the signed distance from a shape at a given position. */ - virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE; + OutputType Evaluate(const PointType & point) const override; protected: SphereSignedDistanceFunction(); - ~SphereSignedDistanceFunction() ITK_OVERRIDE {} + ~SphereSignedDistanceFunction() override {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(SphereSignedDistanceFunction); diff --git a/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx b/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx index 781d8f82031..89d8d70d9bb 100644 --- a/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx +++ b/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionTest.cxx @@ -233,19 +233,19 @@ int itkPCAShapeSignedDistanceFunctionTest( int, char *[]) return EXIT_FAILURE; \ } - // ITK_NULLPTR MeanImage - TEST_INITIALIZATION_ERROR( MeanImage, ITK_NULLPTR, meanImage ); + // nullptr MeanImage + TEST_INITIALIZATION_ERROR( MeanImage, nullptr, meanImage ); // Wrong number of PC images ShapeFunction::ImagePointerVector badPCImages; badPCImages.resize(1); - badPCImages[0] = ITK_NULLPTR; + badPCImages[0] = nullptr; TEST_INITIALIZATION_ERROR( PrincipalComponentImages, badPCImages, pcImages ); - // A ITK_NULLPTR PC image + // A nullptr PC image badPCImages = pcImages; - badPCImages[1] = ITK_NULLPTR; + badPCImages[1] = nullptr; TEST_INITIALIZATION_ERROR( PrincipalComponentImages, badPCImages, pcImages ); diff --git a/Modules/Segmentation/SignedDistanceFunction/test/itkSphereSignedDistanceFunctionTest.cxx b/Modules/Segmentation/SignedDistanceFunction/test/itkSphereSignedDistanceFunctionTest.cxx index 8be642895e0..8cd99e592ef 100644 --- a/Modules/Segmentation/SignedDistanceFunction/test/itkSphereSignedDistanceFunctionTest.cxx +++ b/Modules/Segmentation/SignedDistanceFunction/test/itkSphereSignedDistanceFunctionTest.cxx @@ -47,7 +47,7 @@ int itkSphereSignedDistanceFunctionTest( int, char *[]) // cast it to a generic function FunctionType::Pointer function = dynamic_cast( sphere.GetPointer() ); - sphere = ITK_NULLPTR; + sphere = nullptr; // we must initialize the function before use function->Initialize(); diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.h b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.h index 226ff916098..6e730d17639 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.h @@ -309,8 +309,8 @@ class ITK_TEMPLATE_EXPORT VoronoiDiagram2D: protected: VoronoiDiagram2D(); - ~VoronoiDiagram2D() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VoronoiDiagram2D() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VoronoiDiagram2D); diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h index fa1a94ebedf..c335e58ecb4 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h @@ -88,7 +88,7 @@ class ITK_TEMPLATE_EXPORT VoronoiDiagram2DGenerator: void SortSeeds(); /** Produce the output information. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE {} + void GenerateOutputInformation() override {} /** Update the Voronoi Diagram after adding seed(s). */ void UpdateDiagram(); @@ -106,11 +106,11 @@ class ITK_TEMPLATE_EXPORT VoronoiDiagram2DGenerator: protected: VoronoiDiagram2DGenerator(); - ~VoronoiDiagram2DGenerator() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VoronoiDiagram2DGenerator() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generate Voronoi Diagram based on the current list of seeds. */ - void GenerateData(void) ITK_OVERRIDE; + void GenerateData(void) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VoronoiDiagram2DGenerator); @@ -169,7 +169,7 @@ class ITK_TEMPLATE_EXPORT VoronoiDiagram2DGenerator: m_C(0.0), m_Edgenbr(0) { - m_Ep[0] = m_Ep[1] = m_Reg[0] = m_Reg[1] = ITK_NULLPTR; + m_Ep[0] = m_Ep[1] = m_Reg[0] = m_Reg[1] = nullptr; } ~FortuneEdge(){} @@ -187,13 +187,13 @@ class ITK_TEMPLATE_EXPORT VoronoiDiagram2DGenerator: FortuneHalfEdge *m_Next; FortuneHalfEdge() : - m_Left(ITK_NULLPTR), - m_Right(ITK_NULLPTR), - m_Edge(ITK_NULLPTR), + m_Left(nullptr), + m_Right(nullptr), + m_Edge(nullptr), m_RorL(false), - m_Vert(ITK_NULLPTR), + m_Vert(nullptr), m_Ystar(0.0), - m_Next(ITK_NULLPTR) + m_Next(nullptr) {} FortuneHalfEdge(const FortuneHalfEdge & edge) : diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx index 4dc84ef4c47..03390e74cc7 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx @@ -45,7 +45,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::VoronoiDiagram2DGenerator() : m_PQhashsize( 0 ), m_Nedges( 0 ), m_Nvert( 0 ), - m_BottomSite( ITK_NULLPTR ), + m_BottomSite( nullptr ), m_ELhashsize( 0 ) { m_VorBoundary.Fill( 0.0 ); @@ -495,15 +495,15 @@ VoronoiDiagram2DGenerator< TCoordRepType >::createHalfEdge(FortuneHalfEdge *task { task->m_Edge = e; task->m_RorL = pm; - task->m_Next = ITK_NULLPTR; - task->m_Vert = ITK_NULLPTR; + task->m_Next = nullptr; + task->m_Vert = nullptr; } template< typename TCoordRepType > void VoronoiDiagram2DGenerator< TCoordRepType >::PQshowMin(PointType *answer) { - while ( ( m_PQHash[m_PQmin].m_Next ) == ITK_NULLPTR ) + while ( ( m_PQHash[m_PQmin].m_Next ) == nullptr ) { m_PQmin += 1; } @@ -517,7 +517,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::deletePQ(FortuneHalfEdge *task) { FortuneHalfEdge *last; - if ( ( task->m_Vert ) != ITK_NULLPTR ) + if ( ( task->m_Vert ) != nullptr ) { last = &( m_PQHash[PQbucket(task)] ); while ( ( last->m_Next ) != task ) @@ -526,7 +526,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::deletePQ(FortuneHalfEdge *task) } last->m_Next = ( task->m_Next ); m_PQcount--; - task->m_Vert = ITK_NULLPTR; + task->m_Vert = nullptr; } } @@ -570,7 +570,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::insertPQ(FortuneHalfEdge *he, Fortun FortuneHalfEdge *last = &( m_PQHash[PQbucket(he)] ); FortuneHalfEdge *enext; - while ( ( ( enext = ( last->m_Next ) ) != ITK_NULLPTR ) + while ( ( ( enext = ( last->m_Next ) ) != nullptr ) && ( ( ( he->m_Ystar ) > ( enext->m_Ystar ) ) || ( ( Math::ExactlyEquals(( he->m_Ystar ), ( enext->m_Ystar )) ) && ( ( v->m_Coord[0] ) > ( enext->m_Vert->m_Coord[0] ) ) ) ) ) @@ -598,14 +598,14 @@ VoronoiDiagram2DGenerator< TCoordRepType >::ELgethash(int b) { if ( ( b < 0 ) || ( b >= static_cast< int >( m_ELhashsize ) ) ) { - return ( ITK_NULLPTR ); + return ( nullptr ); } FortuneHalfEdge *he = m_ELHash[b]; - if ( he == ITK_NULLPTR ) + if ( he == nullptr ) { return ( he ); } - if ( he->m_Edge == ITK_NULLPTR ) + if ( he->m_Edge == nullptr ) { return ( he ); } @@ -613,9 +613,9 @@ VoronoiDiagram2DGenerator< TCoordRepType >::ELgethash(int b) { return ( he ); } - m_ELHash[b] = ITK_NULLPTR; + m_ELHash[b] = nullptr; - return ( ITK_NULLPTR ); + return ( nullptr ); } template< typename TCoordRepType > @@ -634,12 +634,12 @@ VoronoiDiagram2DGenerator< TCoordRepType >::findLeftHE(PointType *p) bucket = static_cast< int >( m_ELhashsize ) - 1; } FortuneHalfEdge *he = ELgethash(bucket); - if ( he == ITK_NULLPTR ) + if ( he == nullptr ) { for ( i = 1; 1; i++ ) { - if ( ( he = ELgethash(bucket - i) ) != ITK_NULLPTR ) { break; } - if ( ( he = ELgethash(bucket + i) ) != ITK_NULLPTR ) { break; } + if ( ( he = ELgethash(bucket - i) ) != nullptr ) { break; } + if ( ( he = ELgethash(bucket + i) ) != nullptr ) { break; } } } @@ -672,7 +672,7 @@ template< typename TCoordRepType > typename VoronoiDiagram2DGenerator< TCoordRepType >::FortuneSite * VoronoiDiagram2DGenerator< TCoordRepType >::getRightReg(FortuneHalfEdge *he) { - if ( ( he->m_Edge ) == ITK_NULLPTR ) + if ( ( he->m_Edge ) == nullptr ) { return ( m_BottomSite ); } @@ -690,7 +690,7 @@ template< typename TCoordRepType > typename VoronoiDiagram2DGenerator< TCoordRepType >::FortuneSite * VoronoiDiagram2DGenerator< TCoordRepType >::getLeftReg(FortuneHalfEdge *he) { - if ( ( he->m_Edge ) == ITK_NULLPTR ) + if ( ( he->m_Edge ) == nullptr ) { return ( m_BottomSite ); } @@ -720,8 +720,8 @@ VoronoiDiagram2DGenerator< TCoordRepType >::bisect(FortuneEdge *answer, FortuneS { answer->m_Reg[0] = s1; answer->m_Reg[1] = s2; - answer->m_Ep[0] = ITK_NULLPTR; - answer->m_Ep[1] = ITK_NULLPTR; + answer->m_Ep[0] = nullptr; + answer->m_Ep[1] = nullptr; double dx = ( s2->m_Coord[0] ) - ( s1->m_Coord[0] ); double dy = ( s2->m_Coord[1] ) - ( s1->m_Coord[1] ); @@ -758,12 +758,12 @@ VoronoiDiagram2DGenerator< TCoordRepType >::intersect(FortuneSite *newV, Fortune FortuneHalfEdge *saveHE; FortuneEdge * saveE; - if ( e1 == ITK_NULLPTR ) + if ( e1 == nullptr ) { newV->m_Sitenbr = -1; return; } - if ( e2 == ITK_NULLPTR ) + if ( e2 == nullptr ) { newV->m_Sitenbr = -2; return; @@ -844,7 +844,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::clip_line(FortuneEdge *task) int id2; if ( ( task->m_A ) == 1.0 ) { - if ( ( s1 != ITK_NULLPTR ) && ( ( s1->m_Coord[1] ) > m_Pymin ) ) + if ( ( s1 != nullptr ) && ( ( s1->m_Coord[1] ) > m_Pymin ) ) { y1 = s1->m_Coord[1]; if ( y1 > m_Pymax ) @@ -861,7 +861,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::clip_line(FortuneEdge *task) id1 = -1; } - if ( ( s2 != ITK_NULLPTR ) && ( ( s2->m_Coord[1] ) < m_Pymax ) ) + if ( ( s2 != nullptr ) && ( ( s2->m_Coord[1] ) < m_Pymax ) ) { y2 = s2->m_Coord[1]; if ( y2 < m_Pymin ) @@ -913,7 +913,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::clip_line(FortuneEdge *task) } else { - if ( ( s1 != ITK_NULLPTR ) && ( ( s1->m_Coord[0] ) > m_Pxmin ) ) + if ( ( s1 != nullptr ) && ( ( s1->m_Coord[0] ) > m_Pxmin ) ) { x1 = s1->m_Coord[0]; if ( x1 > m_Pxmax ) @@ -929,7 +929,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::clip_line(FortuneEdge *task) y1 = ( task->m_C ) - ( task->m_A ) * x1; id1 = -1; } - if ( ( s2 != ITK_NULLPTR ) && ( ( s2->m_Coord[0] ) < m_Pxmax ) ) + if ( ( s2 != nullptr ) && ( ( s2->m_Coord[0] ) < m_Pxmax ) ) { x2 = s2->m_Coord[0]; if ( x2 < m_Pxmin ) @@ -1021,7 +1021,7 @@ void VoronoiDiagram2DGenerator< TCoordRepType >::makeEndPoint(FortuneEdge *task, bool lr, FortuneSite *ends) { task->m_Ep[lr] = ends; - if ( ( task->m_Ep[1 - lr] ) == ITK_NULLPTR ) + if ( ( task->m_Ep[1 - lr] ) == nullptr ) { return; } @@ -1064,20 +1064,20 @@ VoronoiDiagram2DGenerator< TCoordRepType >::GenerateVDFortune(void) m_PQHash.resize(m_PQhashsize); for ( i = 0; i < m_PQhashsize; i++ ) { - m_PQHash[i].m_Next = ITK_NULLPTR; + m_PQHash[i].m_Next = nullptr; } m_ELhashsize = (int)( 2 * m_SqrtNSites ); m_ELHash.resize(m_ELhashsize); for ( i = 0; i < m_ELhashsize; i++ ) { - m_ELHash[i] = ITK_NULLPTR; + m_ELHash[i] = nullptr; } - createHalfEdge(&( m_ELleftend ), ITK_NULLPTR, 0); - createHalfEdge(&( m_ELrightend ), ITK_NULLPTR, 0); - m_ELleftend.m_Left = ITK_NULLPTR; + createHalfEdge(&( m_ELleftend ), nullptr, 0); + createHalfEdge(&( m_ELrightend ), nullptr, 0); + m_ELleftend.m_Left = nullptr; m_ELleftend.m_Right = &( m_ELrightend ); m_ELrightend.m_Left = &( m_ELleftend ); - m_ELrightend.m_Right = ITK_NULLPTR; + m_ELrightend.m_Right = nullptr; m_ELHash[0] = &( m_ELleftend ); m_ELHash[m_ELhashsize - 1] = &( m_ELrightend ); diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.h b/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.h index 0b43e8c6cfb..22d2c15566f 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.h @@ -64,9 +64,9 @@ class ITK_TEMPLATE_EXPORT VoronoiPartitioningImageFilter: typedef typename Superclass::NeighborIdIterator NeighborIdIterator; /** Create the output results. */ - virtual void MakeSegmentBoundary(void) ITK_OVERRIDE; + void MakeSegmentBoundary(void) override; - virtual void MakeSegmentObject(void) ITK_OVERRIDE; + void MakeSegmentObject(void) override; /** Set/Get the threshold used to determine if a Voronoi region is * homogeneous. If the standard deviation of the intensities in the @@ -92,17 +92,17 @@ class ITK_TEMPLATE_EXPORT VoronoiPartitioningImageFilter: protected: VoronoiPartitioningImageFilter(); - ~VoronoiPartitioningImageFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VoronoiPartitioningImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; // Classify all the voronoi cells as interior , exterior or boundary. - virtual void ClassifyDiagram(void) ITK_OVERRIDE; + void ClassifyDiagram(void) override; // Generate the seeds to be added by dividing the boundary cells. - virtual void GenerateAddingSeeds(void) ITK_OVERRIDE; + void GenerateAddingSeeds(void) override; // Are the pixels specified in the index list homogeneous? - virtual bool TestHomogeneity(IndexList & Plist) ITK_OVERRIDE; + bool TestHomogeneity(IndexList & Plist) override; // Threshold for homogeneity criterion double m_SigmaThreshold; diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.h b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.h index 3990b1bf0fe..3cc9faf7a34 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.h @@ -105,7 +105,7 @@ class ITK_TEMPLATE_EXPORT VoronoiSegmentationImageFilter: /** Take a prior from other segmentation node, should be an * binary object. */ - void TakeAPrior(const BinaryObjectImage *aprior) ITK_OVERRIDE; + void TakeAPrior(const BinaryObjectImage *aprior) override; /** ImageDimension enumeration */ itkStaticConstMacro(InputImageDimension, unsigned int, @@ -124,8 +124,8 @@ class ITK_TEMPLATE_EXPORT VoronoiSegmentationImageFilter: protected: VoronoiSegmentationImageFilter(); - ~VoronoiSegmentationImageFilter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VoronoiSegmentationImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: double m_Mean; @@ -135,7 +135,7 @@ class ITK_TEMPLATE_EXPORT VoronoiSegmentationImageFilter: double m_MeanPercentError; double m_STDPercentError; - virtual bool TestHomogeneity(IndexList & Plist) ITK_OVERRIDE; + bool TestHomogeneity(IndexList & Plist) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VoronoiSegmentationImageFilter); diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h index 534b398a24c..c6a86f86d60 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.h @@ -205,18 +205,18 @@ class ITK_TEMPLATE_EXPORT VoronoiSegmentationImageFilterBase: /** This filter does not stream and needs the entire image as input. * \sa ProcessObject::GenerateInputRequestedRegion(). */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This filter does not stream and needs to produce the entire output. * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - virtual void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; protected: VoronoiSegmentationImageFilterBase(); - ~VoronoiSegmentationImageFilterBase() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VoronoiSegmentationImageFilterBase() override; + void PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() ITK_OVERRIDE; //general pipeline function. + void GenerateData() override; //general pipeline function. SizeType m_Size; int m_NumberOfSeeds; diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.h b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.h index 516fb505c02..6091da5e69b 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.h +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.h @@ -123,12 +123,12 @@ class ITK_TEMPLATE_EXPORT VoronoiSegmentationRGBImageFilter: x[0] = m_TestSTD[0]; x[1] = m_TestSTD[1]; x[2] = m_TestSTD[2]; } - void TakeAPrior(const BinaryObjectImage *aprior) ITK_OVERRIDE; + void TakeAPrior(const BinaryObjectImage *aprior) override; using Superclass::SetInput; - virtual void SetInput(const InputImageType *input) ITK_OVERRIDE; + void SetInput(const InputImageType *input) override; - virtual void SetInput(unsigned int, const InputImageType *image) ITK_OVERRIDE; + void SetInput(unsigned int, const InputImageType *image) override; /** ImageDimension enumeration */ itkStaticConstMacro(InputImageDimension, unsigned int, @@ -149,8 +149,8 @@ class ITK_TEMPLATE_EXPORT VoronoiSegmentationRGBImageFilter: protected: VoronoiSegmentationRGBImageFilter(); - ~VoronoiSegmentationRGBImageFilter() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VoronoiSegmentationRGBImageFilter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: double m_Mean[6]; @@ -164,7 +164,7 @@ class ITK_TEMPLATE_EXPORT VoronoiSegmentationRGBImageFilter: unsigned int m_TestSTD[3]; typename RGBHCVImage::Pointer m_WorkingImage; - virtual bool TestHomogeneity(IndexList & Plist) ITK_OVERRIDE; + bool TestHomogeneity(IndexList & Plist) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VoronoiSegmentationRGBImageFilter); diff --git a/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.h b/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.h index 0204211400f..3144184a016 100644 --- a/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.h +++ b/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.h @@ -73,7 +73,7 @@ class ITK_TEMPLATE_EXPORT IsolatedWatershedImageFilter: typedef WatershedImageFilter< RealImageType > WatershedType; typedef GradientMagnitudeImageFilter< InputImageType, RealImageType > GradientMagnitudeType; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Set seed point 1. This seed will be isolated from Seed2 (if * possible). All pixels connected to this seed will be replaced @@ -114,7 +114,7 @@ class ITK_TEMPLATE_EXPORT IsolatedWatershedImageFilter: protected: IsolatedWatershedImageFilter(); - ~IsolatedWatershedImageFilter() ITK_OVERRIDE {} + ~IsolatedWatershedImageFilter() override {} IndexType m_Seed1; IndexType m_Seed2; @@ -131,13 +131,13 @@ class ITK_TEMPLATE_EXPORT IsolatedWatershedImageFilter: double m_UpperValueLimit; // Override since the filter needs all the data for the algorithm - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; // Override since the filter produces the entire dataset - void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *output) override; - void VerifyInputInformation() ITK_OVERRIDE; - void GenerateData() ITK_OVERRIDE; + void VerifyInputInformation() override; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(IsolatedWatershedImageFilter); diff --git a/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.h b/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.h index 7098f76dad8..10ef6772b5e 100644 --- a/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.h +++ b/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedFromMarkersImageFilter.h @@ -159,21 +159,21 @@ class ITK_TEMPLATE_EXPORT MorphologicalWatershedFromMarkersImageFilter: protected: MorphologicalWatershedFromMarkersImageFilter(); - ~MorphologicalWatershedFromMarkersImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MorphologicalWatershedFromMarkersImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** MorphologicalWatershedFromMarkersImageFilter needs to request the * entire input images. */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** This filter will enlarge the output requested region to produce * all of the output. * \sa ProcessObject::EnlargeOutputRequestedRegion() */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** The filter is single threaded. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MorphologicalWatershedFromMarkersImageFilter); diff --git a/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedImageFilter.h b/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedImageFilter.h index 50f171171dc..df6bd5b490a 100644 --- a/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedImageFilter.h +++ b/Modules/Segmentation/Watersheds/include/itkMorphologicalWatershedImageFilter.h @@ -109,20 +109,20 @@ class ITK_TEMPLATE_EXPORT MorphologicalWatershedImageFilter: protected: MorphologicalWatershedImageFilter(); - ~MorphologicalWatershedImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~MorphologicalWatershedImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** MorphologicalWatershedImageFilter needs the entire input be * available. Thus, it needs to provide an implementation of * GenerateInputRequestedRegion(). */ - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** MorphologicalWatershedImageFilter will produce the entire output. */ - void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override; /** Single-threaded version of GenerateData. This filter delegates * to GrayscaleGeodesicErodeImageFilter. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(MorphologicalWatershedImageFilter); diff --git a/Modules/Segmentation/Watersheds/include/itkOneWayEquivalencyTable.h b/Modules/Segmentation/Watersheds/include/itkOneWayEquivalencyTable.h index f844ebe73f6..7122b5d02b0 100644 --- a/Modules/Segmentation/Watersheds/include/itkOneWayEquivalencyTable.h +++ b/Modules/Segmentation/Watersheds/include/itkOneWayEquivalencyTable.h @@ -126,10 +126,10 @@ class ITKWatersheds_EXPORT OneWayEquivalencyTable:public DataObject protected: OneWayEquivalencyTable() {} - virtual ~OneWayEquivalencyTable() ITK_OVERRIDE {} + ~OneWayEquivalencyTable() override {} ITK_DISALLOW_COPY_AND_ASSIGN(OneWayEquivalencyTable); - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; HashTableType m_HashMap; }; diff --git a/Modules/Segmentation/Watersheds/include/itkTobogganImageFilter.h b/Modules/Segmentation/Watersheds/include/itkTobogganImageFilter.h index 026db2c32f9..7de39a89206 100644 --- a/Modules/Segmentation/Watersheds/include/itkTobogganImageFilter.h +++ b/Modules/Segmentation/Watersheds/include/itkTobogganImageFilter.h @@ -87,11 +87,11 @@ class ITK_TEMPLATE_EXPORT TobogganImageFilter: itkNewMacro(Self); /** Standard process object method. This filter is not multithreaded. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; - void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *) override; /** Neighborhood iterator type */ typedef ConstNeighborhoodIterator< TInputImage > @@ -108,8 +108,8 @@ class ITK_TEMPLATE_EXPORT TobogganImageFilter: protected: TobogganImageFilter(); - ~TobogganImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~TobogganImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: ITK_DISALLOW_COPY_AND_ASSIGN(TobogganImageFilter); diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.h b/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.h index 01e0c9c80a5..63e8a5352d1 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.h @@ -197,10 +197,10 @@ class ITK_TEMPLATE_EXPORT Boundary:public DataObject protected: Boundary(); - virtual ~Boundary() ITK_OVERRIDE {} + ~Boundary() override {} Boundary(const Self &) {} void operator=(const Self &) {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** The Nx2 matrix of faces of this boundary. */ std::vector< std::pair< FacePointer, FacePointer > > m_Faces; diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h b/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h index 770e5f9e232..4e6aafd0635 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h @@ -111,12 +111,12 @@ class ITK_TEMPLATE_EXPORT BoundaryResolver:public ProcessObject } /** Standard non-threaded pipeline method */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Standard itk::ProcessObject subclass method. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; protected: BoundaryResolver():m_Face(0) @@ -128,13 +128,13 @@ class ITK_TEMPLATE_EXPORT BoundaryResolver:public ProcessObject this->ProcessObject::SetNthOutput( 0, eq.GetPointer() ); } - virtual ~BoundaryResolver() ITK_OVERRIDE {} + ~BoundaryResolver() override {} BoundaryResolver(const Self &) {} void operator=(const Self &) {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; unsigned short m_Face; - virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void GenerateOutputRequestedRegion(DataObject *output) override; }; } // end namespace watershed } // end namespace itk diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.h b/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.h index 5e4924b9567..6cf159884ba 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.h @@ -106,12 +106,12 @@ class ITK_TEMPLATE_EXPORT EquivalenceRelabeler: } /** Standard non-threaded pipeline method */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Standard itk::ProcessObject subclass method. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; protected: EquivalenceRelabeler() @@ -122,14 +122,14 @@ class ITK_TEMPLATE_EXPORT EquivalenceRelabeler: this->ProcessObject::SetNthOutput( 0, img.GetPointer() ); } - virtual ~EquivalenceRelabeler() ITK_OVERRIDE {} + ~EquivalenceRelabeler() override {} EquivalenceRelabeler(const Self &) {} void operator=(const Self &) {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; - virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void GenerateOutputRequestedRegion(DataObject *output) override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; }; } // end namespace watershed } // end namespace itk diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedImageFilter.h b/Modules/Segmentation/Watersheds/include/itkWatershedImageFilter.h index caf096bdd29..006832f960d 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedImageFilter.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedImageFilter.h @@ -186,12 +186,12 @@ class ITK_TEMPLATE_EXPORT WatershedImageFilter: itkNewMacro(Self); /** Standard process object method. This filter is not multithreaded. */ - void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Overloaded to link the input to this filter with the input of the mini-pipeline */ using Superclass::SetInput; - void SetInput(const InputImageType *input) ITK_OVERRIDE + void SetInput(const InputImageType *input) override { // if the input is changed, we'll need to clear the cached tree // when we execute @@ -205,7 +205,7 @@ class ITK_TEMPLATE_EXPORT WatershedImageFilter: m_Segmenter->SetInputImage( const_cast< InputImageType * >( input ) ); } - virtual void SetInput(unsigned int i, const TInputImage *image) ITK_OVERRIDE + void SetInput(unsigned int i, const TInputImage *image) override { if ( i != 0 ) { itkExceptionMacro(<< "Filter has only one input."); } @@ -241,7 +241,7 @@ class ITK_TEMPLATE_EXPORT WatershedImageFilter: } // Override since the filter produces all of its output - void EnlargeOutputRequestedRegion(DataObject *data) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject *data) override; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -258,12 +258,12 @@ class ITK_TEMPLATE_EXPORT WatershedImageFilter: protected: WatershedImageFilter(); - virtual ~WatershedImageFilter() ITK_OVERRIDE {} - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~WatershedImageFilter() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; /** An opportunity to Allocate/Deallocate bulk data. */ - virtual void PrepareOutputs() ITK_OVERRIDE; + void PrepareOutputs() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(WatershedImageFilter); diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h b/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h index d290025104f..7bb134b2a78 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h @@ -43,9 +43,9 @@ class ITKWatersheds_EXPORT WatershedMiniPipelineProgressCommand:public Command itkNewMacro(Self); /** Standard Command virtual methods */ - virtual void Execute(Object *caller, const EventObject & event) ITK_OVERRIDE; + void Execute(Object *caller, const EventObject & event) override; - virtual void Execute(const Object *caller, const EventObject & event) ITK_OVERRIDE; + void Execute(const Object *caller, const EventObject & event) override; /** Set/Get the filter whose UpdateProgress will be set by this * command object */ @@ -64,10 +64,10 @@ class ITKWatersheds_EXPORT WatershedMiniPipelineProgressCommand:public Command itkGetConstMacro(NumberOfFilters, unsigned int); protected: - WatershedMiniPipelineProgressCommand():m_Count(0.0), m_Filter(ITK_NULLPTR), + WatershedMiniPipelineProgressCommand():m_Count(0.0), m_Filter(nullptr), m_NumberOfFilters(1) {} - virtual ~WatershedMiniPipelineProgressCommand() ITK_OVERRIDE {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~WatershedMiniPipelineProgressCommand() override {} + void PrintSelf(std::ostream & os, Indent indent) const override; private: double m_Count; diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.h b/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.h index 7728488f632..190c89b5252 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.h @@ -88,7 +88,7 @@ class ITK_TEMPLATE_EXPORT Relabeler: /** Standard itk::ProcessObject subclass method. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; /** Set/Get the input image */ void SetInputImage(ImageType *img) @@ -127,7 +127,7 @@ class ITK_TEMPLATE_EXPORT Relabeler: } /** Standard non-threaded pipeline method */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Set/Get the percentage of the maximum saliency level * to merge to. */ @@ -141,15 +141,15 @@ class ITK_TEMPLATE_EXPORT Relabeler: protected: Relabeler(); - virtual ~Relabeler() ITK_OVERRIDE {} + ~Relabeler() override {} Relabeler(const Self &) {} void operator=(const Self &) {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; double m_FloodLevel; - virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void GenerateOutputRequestedRegion(DataObject *output) override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; }; } // end namespace watershed } // end namespace itk diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h index dbf9b34cf19..c558954455e 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT SegmentTable:public DataObject { Iterator result = m_HashMap.find(a); - if ( result == m_HashMap.end() ) { return ITK_NULLPTR; } + if ( result == m_HashMap.end() ) { return nullptr; } else { return &( ( *result ).second ); } } @@ -206,7 +206,7 @@ class ITK_TEMPLATE_EXPORT SegmentTable:public DataObject SegmentTable() : m_MaximumDepth(0) {} - virtual ~SegmentTable() ITK_OVERRIDE {} + ~SegmentTable() override {} HashMapType m_HashMap; diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h index cc1d4d249b0..9d08a22a257 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h @@ -157,14 +157,14 @@ class ITK_TEMPLATE_EXPORT SegmentTree:public DataObject /** Standard DataObject routine to initialize. Returns the segment * tree to a default state, deallocating memory. */ - virtual void Initialize() ITK_OVERRIDE; + void Initialize() override; protected: SegmentTree() {} - virtual ~SegmentTree() ITK_OVERRIDE {} + ~SegmentTree() override {} SegmentTree(const Self &) {} void operator=(const Self &) {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; DequeType m_Deque; }; diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h index 77270530867..26f280067f1 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h @@ -140,7 +140,7 @@ class ITK_TEMPLATE_EXPORT SegmentTreeGenerator:public ProcessObject } /** Standard non-threaded itk pipeline method */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** Get/Set a boolean flag indicating whether or not to pre-merge the segments marked as equivalent in the EquivalencyTable. This is only @@ -190,14 +190,14 @@ class ITK_TEMPLATE_EXPORT SegmentTreeGenerator:public ProcessObject /** Standard itk::ProcessObject subclass method. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; protected: SegmentTreeGenerator(); - virtual ~SegmentTreeGenerator() ITK_OVERRIDE {} + ~SegmentTreeGenerator() override {} SegmentTreeGenerator(const Self &) {} void operator=(const Self &) {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Generates an initial list of all potentential merges in * the segment table. */ @@ -210,9 +210,9 @@ class ITK_TEMPLATE_EXPORT SegmentTreeGenerator:public ProcessObject void MergeEquivalencies(); /** Methods required by the itk pipeline */ - virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void GenerateOutputRequestedRegion(DataObject *output) override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; private: bool m_Merge; diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx index 3c1227901a3..80ba2efa02c 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx @@ -430,7 +430,7 @@ void SegmentTreeGenerator< TScalar > typename SegmentTableType::segment_t * from_seg = segments->Lookup(FROM); typename SegmentTableType::segment_t * to_seg = segments->Lookup(TO); - if ( from_seg == ITK_NULLPTR || to_seg == ITK_NULLPTR ) + if ( from_seg == nullptr || to_seg == nullptr ) { itkGenericExceptionMacro ( << diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h index d14370a4b07..48b8cf28f62 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h @@ -172,7 +172,7 @@ class ITK_TEMPLATE_EXPORT Segmenter: { this->ProcessObject::SetNthOutput(2, b); } /** Standard non-threaded pipeline execution method. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** This method is necessary until the streaming mechanisms of the Itk * pipeline are full fleshed out. It is only used for streaming @@ -199,7 +199,7 @@ class ITK_TEMPLATE_EXPORT Segmenter: /** Standard itk::ProcessObject subclass method. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; /** Gets/Sets the initial label (IdentifierType integer value) used * by the labeling algorithm. Only necessary for streaming applications. */ @@ -266,8 +266,8 @@ class ITK_TEMPLATE_EXPORT Segmenter: Segmenter(); Segmenter(const Self &) {} - virtual ~Segmenter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~Segmenter() override; + void PrintSelf(std::ostream & os, Indent indent) const override; void operator=(const Self &) {} @@ -278,11 +278,11 @@ class ITK_TEMPLATE_EXPORT Segmenter: /** This method asks for an image region that is one pixel larger * at each boundary than the region being processed. This single pixel * expansion represents an overlap with adjacent image chunks */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; - virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE; + void GenerateOutputRequestedRegion(DataObject *output) override; - virtual void UpdateOutputInformation() ITK_OVERRIDE; + void UpdateOutputInformation() override; /** Allocates boundary structure information and sets the * boundary data to null values. */ diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx index cf1aa0116c9..94fa59fa748 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx @@ -956,7 +956,7 @@ void Segmenter< TInputImage > // and update its minimum value if necessary. segment_ptr = segments->Lookup(segment_label); edge_table_entry_ptr = edgeHash.find(segment_label); - if ( segment_ptr == ITK_NULLPTR ) // This segment not yet identified. + if ( segment_ptr == nullptr ) // This segment not yet identified. { // So add it to the table. temp_segment.min = searchIt.GetPixel(hoodCenter); segments->Add(segment_label, temp_segment); @@ -1019,7 +1019,7 @@ void Segmenter< TInputImage > { // Lookup the corresponding segment entry segment_ptr = segments->Lookup( ( *edge_table_entry_ptr ).first ); - if ( segment_ptr == ITK_NULLPTR ) + if ( segment_ptr == nullptr ) { itkGenericExceptionMacro (<< "UpdateSegmentTable:: An unexpected and fatal error has occurred."); } @@ -1258,7 +1258,7 @@ Segmenter< TInputImage > { return BoundaryType::New().GetPointer(); } - else { return ITK_NULLPTR; } + else { return nullptr; } } template< typename TInputImage > @@ -1360,8 +1360,8 @@ Segmenter< TInputImage > m_CurrentLabel = 1; m_DoBoundaryAnalysis = false; m_SortEdgeLists = true; - m_Connectivity.direction = ITK_NULLPTR; - m_Connectivity.index = ITK_NULLPTR; + m_Connectivity.direction = nullptr; + m_Connectivity.index = nullptr; typename OutputImageType::Pointer img = static_cast< OutputImageType * >( this->MakeOutput(0).GetPointer() ); typename SegmentTableType::Pointer st = diff --git a/Modules/Video/BridgeOpenCV/CMakeLists.txt b/Modules/Video/BridgeOpenCV/CMakeLists.txt index 3eae1d22015..9de0d2c1265 100644 --- a/Modules/Video/BridgeOpenCV/CMakeLists.txt +++ b/Modules/Video/BridgeOpenCV/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.8.2) if(NOT ITK_SOURCE_DIR) include(itk-module-init.cmake) endif() diff --git a/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx b/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx index 9672081d32c..dc90103bd2b 100644 --- a/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx +++ b/Modules/Video/BridgeOpenCV/include/itkOpenCVImageBridge.hxx @@ -43,7 +43,7 @@ OpenCVImageBridge::IplImageToITKImage(const IplImage* in) // if (!in) { - itkGenericExceptionMacro("Input is ITK_NULLPTR"); + itkGenericExceptionMacro("Input is nullptr"); } // @@ -123,7 +123,7 @@ OpenCVImageBridge::ITKImageToIplImage(const TInputImageType* in, bool force3Chan // if (!in) { - itkGenericExceptionMacro("Input is ITK_NULLPTR"); + itkGenericExceptionMacro("Input is nullptr"); } typename ImageType::RegionType region = in->GetLargestPossibleRegion(); diff --git a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.hxx b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.hxx index 0b2de099224..bd73b583487 100644 --- a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.hxx +++ b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.hxx @@ -43,7 +43,7 @@ namespace itk template OpenCVVideoCapture::OpenCVVideoCapture() { - m_VideoStream = ITK_NULLPTR; + m_VideoStream = nullptr; // Default to reporting 24fps. This may change once RealTime is implemented m_FpS = 24; @@ -97,7 +97,7 @@ bool OpenCVVideoCapture::open(TVideoStream* videoStream) template void OpenCVVideoCapture::release() { - m_VideoStream = ITK_NULLPTR; + m_VideoStream = nullptr; } diff --git a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoIO.h b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoIO.h index a421e1845e6..d7d66baf5de 100644 --- a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoIO.h +++ b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoIO.h @@ -141,7 +141,7 @@ class ITKVideoBridgeOpenCV_EXPORT OpenCVVideoIO : public VideoIOBase OpenCVVideoIO(); ~OpenCVVideoIO(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Update the local members from the internal capture. */ void UpdateReaderProperties(); diff --git a/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx b/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx index b760d28c91c..a7b969fd6c6 100644 --- a/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx +++ b/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx @@ -33,15 +33,15 @@ OpenCVVideoIO::~OpenCVVideoIO() void OpenCVVideoIO::FinishReadingOrWriting() { - if (this->m_Writer != ITK_NULLPTR) + if (this->m_Writer != nullptr) { cvReleaseVideoWriter(&(this->m_Writer)); } - if (this->m_Capture != ITK_NULLPTR) + if (this->m_Capture != nullptr) { cvReleaseCapture(&(this->m_Capture)); } - if (this->m_CVImage != ITK_NULLPTR) + if (this->m_CVImage != nullptr) { cvReleaseImage(&(this->m_CVImage)); } @@ -319,13 +319,13 @@ void OpenCVVideoIO::Read(void *buffer) // skip to a different location. Be warned, though. SetNextFrameToRead can // only skip to I-Frames, so there can be unexpected behavior IplImage* tempIm = cvQueryFrame(this->m_Capture); - if (tempIm == ITK_NULLPTR) + if (tempIm == nullptr) { itkExceptionMacro(<< "Error reading frame " << this->m_CurrentFrame << ". May be out of bounds"); } // Convert to RGB rather than BGR - if (this->m_CVImage == ITK_NULLPTR) + if (this->m_CVImage == nullptr) { this->m_CVImage = cvCreateImage( cvSize(this->m_Dimensions[0],this->m_Dimensions[1]), IPL_DEPTH_8U, this->m_NumberOfComponents ); @@ -356,7 +356,7 @@ bool OpenCVVideoIO::SetNextFrameToRead(OpenCVVideoIO::FrameOffsetType frameNumbe return false; } - if (this->m_Capture != ITK_NULLPTR) + if (this->m_Capture != nullptr) { cvSetCaptureProperty(this->m_Capture,CV_CAP_PROP_POS_FRAMES, frameNumber); this->UpdateReaderProperties(); @@ -483,13 +483,13 @@ void OpenCVVideoIO::Write(const void *buffer) } // Place the contents of the buffer into an OpenCV image - if (this->m_CVImage == ITK_NULLPTR) + if (this->m_CVImage == nullptr) { // The output image always has to be 3 components for the OpenCV writer this->m_CVImage = cvCreateImage( cvSize(this->m_Dimensions[0],this->m_Dimensions[1]), IPL_DEPTH_8U, 3 ); } - if (this->m_TempImage == ITK_NULLPTR) + if (this->m_TempImage == nullptr) { this->m_TempImage = cvCreateImage( cvSize(this->m_Dimensions[0],this->m_Dimensions[1]), IPL_DEPTH_8U, this->m_NumberOfComponents ); @@ -549,7 +549,7 @@ void OpenCVVideoIO::OpenReader() if (this->m_ReadType == ReadFromFile) { this->m_Capture = cvCaptureFromFile( this->GetFileName() ); - if (this->m_Capture != ITK_NULLPTR) + if (this->m_Capture != nullptr) { this->m_ReaderOpen = true; } @@ -561,7 +561,7 @@ void OpenCVVideoIO::OpenReader() else if (this->m_ReadType == ReadFromCamera) { this->m_Capture = cvCaptureFromCAM( this->m_CameraIndex ); - if (this->m_Capture != ITK_NULLPTR) + if (this->m_Capture != nullptr) { this->m_ReaderOpen = true; } @@ -625,7 +625,7 @@ void OpenCVVideoIO::PrintSelf(std::ostream & os, Indent indent) const { Superclass::PrintSelf(os,indent); - if (this->m_CVImage != ITK_NULLPTR) + if (this->m_CVImage != nullptr) { os << indent << "Image dimensions : ["<< this->m_CVImage->width << "," << this->m_CVImage->height << "]" << std::endl; diff --git a/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOFactoryTest.cxx b/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOFactoryTest.cxx index 61f9f46601a..215b7241d96 100644 --- a/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOFactoryTest.cxx +++ b/Modules/Video/BridgeOpenCV/test/itkOpenCVVideoIOFactoryTest.cxx @@ -71,7 +71,7 @@ int test_OpenCVVideoIOFactory ( char* input, char* output, SizeValueType cameraN // Use openCV to see if we can even try to open the camera CvCapture* cameraCapture = cvCaptureFromCAM( cameraNumber ); - if (cameraCapture != ITK_NULLPTR) + if (cameraCapture != nullptr) { std::cout << "Trying to create IO for reading from camera " << cameraNumber << "..." << std::endl; diff --git a/Modules/Video/BridgeVXL/include/itkVXLVideoIO.h b/Modules/Video/BridgeVXL/include/itkVXLVideoIO.h index 6dc9f9ba8c0..22011f94adc 100644 --- a/Modules/Video/BridgeVXL/include/itkVXLVideoIO.h +++ b/Modules/Video/BridgeVXL/include/itkVXLVideoIO.h @@ -125,7 +125,7 @@ class VXLVideoIO:public VideoIOBase VXLVideoIO(); ~VXLVideoIO(); - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Update the local members from the internal capture */ void UpdateReaderProperties(); diff --git a/Modules/Video/BridgeVXL/include/vidl_itk_istream.h b/Modules/Video/BridgeVXL/include/vidl_itk_istream.h index fde7380c89d..0c99244eefb 100644 --- a/Modules/Video/BridgeVXL/include/vidl_itk_istream.h +++ b/Modules/Video/BridgeVXL/include/vidl_itk_istream.h @@ -69,14 +69,14 @@ class ITK_TEMPLATE_EXPORT vidl_itk_istream : public vidl_istream virtual bool open(VideoStreamType* videoStream); /** Close the stream. For our purposes, this just means set the VideoStream - * pointer to ITK_NULLPTR */ - virtual void close() { m_VideoStream = ITK_NULLPTR; } + * pointer to nullptr */ + virtual void close() { m_VideoStream = nullptr; } /**-STREAM INFORMATION-----------------------------------------------------*/ /** Return whether or not the VideoStream is null */ - virtual bool is_open() const { return m_VideoStream != ITK_NULLPTR; } + virtual bool is_open() const { return m_VideoStream != nullptr; } /** Return true if the stream is in a valid state. To comply with vxl's * standard, this will return false until advance() has been called at least diff --git a/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx b/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx index 8eb58e63bc3..3adcb771b3e 100644 --- a/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx +++ b/Modules/Video/BridgeVXL/include/vidl_itk_istream.hxx @@ -30,7 +30,7 @@ namespace itk template< typename TVideoStream > vidl_itk_istream< TVideoStream >::vidl_itk_istream() { - m_VideoStream = ITK_NULLPTR; + m_VideoStream = nullptr; m_AdvanceCalled = false; } @@ -52,7 +52,7 @@ bool vidl_itk_istream< TVideoStream >::open(TVideoStream* videoStream) { m_VideoStream = videoStream; - return (m_VideoStream == ITK_NULLPTR); + return (m_VideoStream == nullptr); } // @@ -68,7 +68,7 @@ vidl_itk_istream< TVideoStream >::is_valid() const return false; } - return (m_VideoStream == ITK_NULLPTR || m_AdvanceCalled); + return (m_VideoStream == nullptr || m_AdvanceCalled); } // @@ -341,7 +341,7 @@ vidl_itk_istream< TVideoStream >::read_frame() } else { - return ITK_NULLPTR; + return nullptr; } } @@ -355,7 +355,7 @@ vidl_itk_istream< TVideoStream >::current_frame() // Return if not valid if (!this->is_valid()) { - return ITK_NULLPTR; + return nullptr; } // Make sure the VideoSource's data is up to date diff --git a/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx b/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx index f09973c4853..35c75c6a9cf 100644 --- a/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx +++ b/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx @@ -64,9 +64,9 @@ void VXLVideoIO::PrintSelf(std::ostream & os, Indent indent) const void VXLVideoIO::FinishReadingOrWriting() { delete this->m_Writer; - this->m_Writer = ITK_NULLPTR; + this->m_Writer = nullptr; delete this->m_Reader; - this->m_Reader = ITK_NULLPTR; + this->m_Reader = nullptr; this->ResetMembers(); } @@ -732,8 +732,8 @@ void VXLVideoIO::ResetMembers() this->m_VIDLFrame = 0; this->m_VIDLFrame = 0; this->m_Encoder = vidl_ffmpeg_ostream_params::DEFAULT; - this->m_Reader = ITK_NULLPTR; - this->m_Writer = ITK_NULLPTR; + this->m_Reader = nullptr; + this->m_Writer = nullptr; this->m_WriterOpen = false; this->m_ReaderOpen = false; this->m_FramesPerSecond = 0; diff --git a/Modules/Video/Core/include/itkRingBuffer.h b/Modules/Video/Core/include/itkRingBuffer.h index f89d62e070b..70a0e02a7d1 100644 --- a/Modules/Video/Core/include/itkRingBuffer.h +++ b/Modules/Video/Core/include/itkRingBuffer.h @@ -94,8 +94,8 @@ class ITK_TEMPLATE_EXPORT RingBuffer : public Object /**-PROTECTED METHODS------------------------------------------------------*/ RingBuffer(); - virtual ~RingBuffer() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE; + ~RingBuffer() override; + void PrintSelf(std::ostream &os, Indent indent) const override; /** Get the proper buffer index from an offset */ OffsetValueType GetOffsetBufferIndex(OffsetValueType offset); diff --git a/Modules/Video/Core/include/itkRingBuffer.hxx b/Modules/Video/Core/include/itkRingBuffer.hxx index 4570c88cba9..728b4ed3203 100644 --- a/Modules/Video/Core/include/itkRingBuffer.hxx +++ b/Modules/Video/Core/include/itkRingBuffer.hxx @@ -183,7 +183,7 @@ RingBuffer< TElement > { for (size_t i = 0; i < n - currentSize; ++i) { - ElementPointer newPointer = ITK_NULLPTR; + ElementPointer newPointer = nullptr; this->m_PointerVector.insert( this->m_PointerVector.begin() + this->m_HeadIndex, newPointer ); diff --git a/Modules/Video/Core/include/itkTemporalDataObject.h b/Modules/Video/Core/include/itkTemporalDataObject.h index f52d0bb1179..182aeb82495 100644 --- a/Modules/Video/Core/include/itkTemporalDataObject.h +++ b/Modules/Video/Core/include/itkTemporalDataObject.h @@ -86,23 +86,23 @@ class ITK_FORCE_EXPORT_MACRO(ITKVideoCore) TemporalDataObject : public DataObjec * buffered region */ virtual const TemporalRegionType GetUnbufferedRequestedTemporalRegion(); - virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE; + void SetRequestedRegionToLargestPossibleRegion() override; - virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE; + bool RequestedRegionIsOutsideOfTheBufferedRegion() override; - virtual bool VerifyRequestedRegion() ITK_OVERRIDE; + bool VerifyRequestedRegion() override; - virtual void CopyInformation(const DataObject *) ITK_OVERRIDE; + void CopyInformation(const DataObject *) override; - virtual void SetRequestedRegion(const DataObject *) ITK_OVERRIDE; + void SetRequestedRegion(const DataObject *) override; - virtual void Graft(const DataObject *) ITK_OVERRIDE; + void Graft(const DataObject *) override; protected: TemporalDataObject(); - virtual ~TemporalDataObject() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~TemporalDataObject() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Buffer for holding component data objects */ BufferType::Pointer m_DataObjectBuffer; diff --git a/Modules/Video/Core/include/itkTemporalProcessObject.h b/Modules/Video/Core/include/itkTemporalProcessObject.h index ffb3117526b..b59b953ce52 100644 --- a/Modules/Video/Core/include/itkTemporalProcessObject.h +++ b/Modules/Video/Core/include/itkTemporalProcessObject.h @@ -81,11 +81,11 @@ class ITKVideoCore_EXPORT TemporalProcessObject : public ProcessObject /** Override EnlargeOutputRequestedRegion, GenerateOutputRequestedRegion, and * GenerateInputRequestedRegion to handle temporal regions */ - virtual void EnlargeOutputRequestedRegion(DataObject* output) ITK_OVERRIDE; + void EnlargeOutputRequestedRegion(DataObject* output) override; - virtual void GenerateOutputRequestedRegion(DataObject* output) ITK_OVERRIDE; + void GenerateOutputRequestedRegion(DataObject* output) override; - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Get the number of frames of input required to produce output. We don't * provide a Set method because we want some filters to be able to hold this @@ -102,7 +102,7 @@ class ITKVideoCore_EXPORT TemporalProcessObject : public ProcessObject * temporal region based on the largest possible temporal region of the input, * the unit input/output sizes for the process, and the number of frames * skipped per output*/ - virtual void UpdateOutputInformation() ITK_OVERRIDE; + void UpdateOutputInformation() override; /** Override ProcessObject's implementation of UpdateOutputData. This is * necessary because by default ProcessObject propagates the call to its @@ -115,7 +115,7 @@ class ITKVideoCore_EXPORT TemporalProcessObject : public ProcessObject * * Code: this->ProcessObject::UpdateOutputData( output ) */ - virtual void UpdateOutputData(DataObject* output) ITK_OVERRIDE; + void UpdateOutputData(DataObject* output) override; /** Override GenerateData to do temporal region streaming. This is analogous * to the ThreadedGenerateData system implemented in ImageSource, but it @@ -127,7 +127,7 @@ class ITKVideoCore_EXPORT TemporalProcessObject : public ProcessObject * the requested temporal region of the input to each input requested * temporal sub-region (in sequence) and re-propagate the temporal region * request up the pipeline. */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; /** TemporalStreamingGenerateData is in charge of producing output for a * single portion of the output requested temporal region. This is where @@ -145,10 +145,10 @@ class ITKVideoCore_EXPORT TemporalProcessObject : public ProcessObject TemporalProcessObject(); /** Empty Destructor */ - virtual ~TemporalProcessObject() ITK_OVERRIDE {} + ~TemporalProcessObject() override {} /** ITK print mechanism */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Explicitly handle temporal regions in EnlargeRequestedRegion. The default * implementation makes sure that the output requested temporal region is diff --git a/Modules/Video/Core/include/itkTemporalRegion.h b/Modules/Video/Core/include/itkTemporalRegion.h index 5e7d70a9c0d..f6b4b30bcb2 100644 --- a/Modules/Video/Core/include/itkTemporalRegion.h +++ b/Modules/Video/Core/include/itkTemporalRegion.h @@ -69,13 +69,13 @@ class ITKVideoCore_EXPORT TemporalRegion : public Region FrameOffsetType GetFrameDuration() const; /** Return RegionType (SRUCTURED_REGION) */ - virtual RegionType GetRegionType() const ITK_OVERRIDE; + RegionType GetRegionType() const override; /** Constructor */ TemporalRegion(); /** Destructor */ - virtual ~TemporalRegion() ITK_OVERRIDE; + ~TemporalRegion() override; /** Compare two temporal regions in Frame space */ virtual bool IsEqualInFrames(const Self & region) const; @@ -90,7 +90,7 @@ class ITKVideoCore_EXPORT TemporalRegion : public Region protected: - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Time boundaries */ RealTimeStamp m_RealStart; diff --git a/Modules/Video/Core/include/itkVideoSource.h b/Modules/Video/Core/include/itkVideoSource.h index fb1aa3b43e2..30a6c606802 100644 --- a/Modules/Video/Core/include/itkVideoSource.h +++ b/Modules/Video/Core/include/itkVideoSource.h @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT VideoSource : public TemporalProcessObject * multiple types of output must override this to return the proper type. */ typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType; using Superclass::MakeOutput; - virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE; + DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override; protected: @@ -114,14 +114,14 @@ class ITK_TEMPLATE_EXPORT VideoSource : public TemporalProcessObject * mid-pipeline filters will always have their outputs' requested spatial * regions set by the GenerateInputRequestedRegion call from the filter one * further down the pipeline. */ - virtual void GenerateOutputRequestedTemporalRegion(TemporalDataObject* output) ITK_OVERRIDE; + void GenerateOutputRequestedTemporalRegion(TemporalDataObject* output) override; /** We override the default implementation of TemporalStreamingGenerateData * from TemporalProcessObject to provide functionality for spatial streaming. * This implementation works exactly the same way as the implementation of * GenerateData in ImageSource. The filter-specific implementation of * ThreadedGenerateData will be responsible of accessing the correct frames. */ - virtual void TemporalStreamingGenerateData() ITK_OVERRIDE; + void TemporalStreamingGenerateData() override; /** ThreadedGenerateData here serves the same symnatic purpose as * ThreadedGenerateData in ProcessObjects that handle Images. This is to say @@ -172,8 +172,8 @@ class ITK_TEMPLATE_EXPORT VideoSource : public TemporalProcessObject }; VideoSource(); - virtual ~VideoSource() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VideoSource() override; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Video/Core/include/itkVideoSource.hxx b/Modules/Video/Core/include/itkVideoSource.hxx index c4bc13b9a64..acf9bfe9581 100644 --- a/Modules/Video/Core/include/itkVideoSource.hxx +++ b/Modules/Video/Core/include/itkVideoSource.hxx @@ -69,7 +69,7 @@ VideoSource::GetOutput() if (this->GetNumberOfOutputs() < 1) { itkWarningMacro("No outputs set"); - return ITK_NULLPTR; + return nullptr; } // Return the output @@ -87,7 +87,7 @@ VideoSource::GetOutput(unsigned int idx) (this->TemporalProcessObject::GetOutput(idx) ); // Make sure there is at least 1 output - if (out == ITK_NULLPTR) + if (out == nullptr) { itkWarningMacro("dynamic_cast to output type failed"); } @@ -121,7 +121,7 @@ GraftNthOutput(unsigned int idx, TOutputVideoStream* graft) } if (!graft) { - itkExceptionMacro("Cannot graft from a ITK_NULLPTR pointer"); + itkExceptionMacro("Cannot graft from a nullptr pointer"); } // we use the process object method since all our outputs may not be of the diff --git a/Modules/Video/Core/include/itkVideoStream.h b/Modules/Video/Core/include/itkVideoStream.h index fe4e9d1fbf7..7495b8daec0 100644 --- a/Modules/Video/Core/include/itkVideoStream.h +++ b/Modules/Video/Core/include/itkVideoStream.h @@ -273,13 +273,13 @@ class ITK_TEMPLATE_EXPORT VideoStream : public TemporalDataObject * just copies the meta information using TemporalProcessObject's Graft then * sets the internal RingBuffer pointer to point to the same buffer used by * the other VideoStream. */ - virtual void Graft(const DataObject* data) ITK_OVERRIDE; + void Graft(const DataObject* data) override; protected: VideoStream() {} - virtual ~VideoStream() ITK_OVERRIDE {} + ~VideoStream() override {} - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE + void PrintSelf(std::ostream & os, Indent indent) const override { Superclass::Print(os, indent); } diff --git a/Modules/Video/Core/include/itkVideoStream.hxx b/Modules/Video/Core/include/itkVideoStream.hxx index 177e000f548..fd11682f351 100644 --- a/Modules/Video/Core/include/itkVideoStream.hxx +++ b/Modules/Video/Core/include/itkVideoStream.hxx @@ -250,7 +250,7 @@ VideoStream // Save the indices of all frames in the currently buffered region const SizeValueType bufferedStart = m_BufferedTemporalRegion.GetFrameStart(); const SizeValueType bufferedDuration = m_BufferedTemporalRegion.GetFrameDuration(); - std::vector< DataObject * > frames( bufferedDuration - bufferedStart, ITK_NULLPTR ); + std::vector< DataObject * > frames( bufferedDuration - bufferedStart, nullptr ); for (SizeValueType i = bufferedStart; i < bufferedStart + bufferedDuration; ++i) { frames[i - bufferedStart] = m_DataObjectBuffer->GetBufferContents(i); diff --git a/Modules/Video/Core/include/itkVideoToVideoFilter.h b/Modules/Video/Core/include/itkVideoToVideoFilter.h index 5c050c61291..6d98f0dc8e7 100644 --- a/Modules/Video/Core/include/itkVideoToVideoFilter.h +++ b/Modules/Video/Core/include/itkVideoToVideoFilter.h @@ -91,7 +91,7 @@ class ITK_TEMPLATE_EXPORT VideoToVideoFilter : public VideoSource< TOutputVideoS * largest spatial region of each of the output frames. This will need to be * overwritten for filters that need different behavior (eg: need edge pixels * or different spatial regions for different frames) */ - virtual void UpdateOutputInformation() ITK_OVERRIDE; + void UpdateOutputInformation() override; protected: @@ -106,24 +106,24 @@ class ITK_TEMPLATE_EXPORT VideoToVideoFilter : public VideoSource< TOutputVideoS * requested spatial region has been set for the frames. By default, we set * the requested spatial region of each frame to be its largest possible * spatial region. */ - virtual void GenerateOutputRequestedRegion(DataObject* output) ITK_OVERRIDE; + void GenerateOutputRequestedRegion(DataObject* output) override; /** Extend the default implementation of GenerateInputRequestedRegion from * TemporalProcessObject to propagate spatial regions as well as temporal * regions. This default implementation takes the requested spatial region * from the first requested output frame and applies it to all of the * requested input frames. */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** Method that gets called before individual temporal requests are * dispatched by GenerateData. The default implementation makes sure that * the input's buffer can hold enough frames for a single input request. */ - virtual void BeforeTemporalStreamingGenerateData() ITK_OVERRIDE; + void BeforeTemporalStreamingGenerateData() override; VideoToVideoFilter(); - virtual ~VideoToVideoFilter() ITK_OVERRIDE; + ~VideoToVideoFilter() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; private: diff --git a/Modules/Video/Core/include/itkVideoToVideoFilter.hxx b/Modules/Video/Core/include/itkVideoToVideoFilter.hxx index 4b6d838ecc5..2248650605a 100644 --- a/Modules/Video/Core/include/itkVideoToVideoFilter.hxx +++ b/Modules/Video/Core/include/itkVideoToVideoFilter.hxx @@ -89,7 +89,7 @@ GetInput() const { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast< const InputVideoStreamType* >(this->ProcessObject::GetInput(0)); } diff --git a/Modules/Video/Core/src/itkTemporalProcessObject.cxx b/Modules/Video/Core/src/itkTemporalProcessObject.cxx index c2c1d4f451b..4aba8c4adc6 100644 --- a/Modules/Video/Core/src/itkTemporalProcessObject.cxx +++ b/Modules/Video/Core/src/itkTemporalProcessObject.cxx @@ -56,7 +56,7 @@ TemporalProcessObject::EnlargeOutputRequestedRegion(DataObject* output) // Check that output is a TemporalDataObject TemporalDataObject* tOutput = dynamic_cast(output); - if (tOutput != ITK_NULLPTR) + if (tOutput != nullptr) { this->EnlargeOutputRequestedTemporalRegion(tOutput); } @@ -112,7 +112,7 @@ TemporalProcessObject::GenerateOutputRequestedRegion(DataObject* output) // Check that output is a TemporalDataObject TemporalDataObject* tOutput = dynamic_cast(output); - if (tOutput != ITK_NULLPTR) + if (tOutput != nullptr) { this->GenerateOutputRequestedTemporalRegion(tOutput); } @@ -176,13 +176,13 @@ TemporalProcessObject::GenerateInputRequestedRegion() TemporalDataObject* tOutput = dynamic_cast(this->GetOutput(0)); TemporalDataObject* tInput = dynamic_cast(this->GetInput(0)); - if (tOutput == ITK_NULLPTR) + if (tOutput == nullptr) { itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateInputRequestedRegion() " << "cannot cast " << typeid(this->GetOutput(0)).name() << " to " << typeid(TemporalDataObject*).name() ); } - else if (tInput == ITK_NULLPTR) + else if (tInput == nullptr) { itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateInputRequestedRegion() " << "cannot cast " << typeid(this->GetInput(0)).name() << " to " @@ -205,13 +205,13 @@ TemporalProcessObject::GenerateInputRequestedTemporalRegion() // can validly be cast to TemporalDataObjects, so don't check cast here TemporalDataObject* input = dynamic_cast(this->GetInput(0)); TemporalDataObject* output = dynamic_cast(this->GetOutput(0)); - if (output == ITK_NULLPTR) + if (output == nullptr) { itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateInputRequestedTemporalRegion() " << "cannot cast " << typeid(this->GetOutput(0)).name() << " to " << typeid(TemporalDataObject*).name() ); } - if (input == ITK_NULLPTR) + if (input == nullptr) { itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateInputRequestedTemporalRegion() " << "cannot cast " << typeid(this->GetInput(0)).name() << " to " @@ -279,7 +279,7 @@ TemporalProcessObject::UpdateOutputInformation() TemporalDataObject* input = dynamic_cast(this->GetInput(0)); TemporalDataObject* output = dynamic_cast(this->GetOutput(0)); - if (output == ITK_NULLPTR) + if (output == nullptr) { itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateOutputRequestedTemporalRegion() " << "cannot cast " << typeid(output).name() << " to " @@ -288,7 +288,7 @@ TemporalProcessObject::UpdateOutputInformation() // Compute duration for output largest possible region TemporalRegion inputLargestRegion; - if (input == ITK_NULLPTR) + if (input == nullptr) { // If there is no input, use the default LargestTemporalRegion inputLargestRegion = this->GenerateDefaultLargestPossibleTemporalRegion(); @@ -420,7 +420,7 @@ TemporalProcessObject::GenerateData() // Get the first output frame location TemporalDataObject* output = dynamic_cast(this->GetOutput(0)); - if (output == ITK_NULLPTR) + if (output == nullptr) { itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateData() " << "cannot cast " << typeid(output).name() << " to " @@ -439,7 +439,7 @@ TemporalProcessObject::GenerateData() { // Set Input's requested region to the new request at i TemporalDataObject* input = dynamic_cast(this->GetInput(0)); - if (input == ITK_NULLPTR) + if (input == nullptr) { itkExceptionMacro(<< "itk::TemporalProcessObject::GenerateData() " << "cannot cast " << typeid(input).name() << " to " @@ -524,7 +524,7 @@ TemporalProcessObject::SplitRequestedTemporalRegion() // Get the current output TemporalDataObject TemporalDataObject* outputObject = dynamic_cast(this->GetOutput(0)); - if (outputObject == ITK_NULLPTR) + if (outputObject == nullptr) { itkExceptionMacro(<< "itk::TemporalProcessObject::SplitRequestedTemporalRegion() " << "cannot cast " << typeid(outputObject).name() << " to " diff --git a/Modules/Video/Core/test/itkTemporalProcessObjectTest.cxx b/Modules/Video/Core/test/itkTemporalProcessObjectTest.cxx index 2ffe6bfd4a6..7d993d4d444 100644 --- a/Modules/Video/Core/test/itkTemporalProcessObjectTest.cxx +++ b/Modules/Video/Core/test/itkTemporalProcessObjectTest.cxx @@ -134,14 +134,14 @@ class DummyTemporalDataObject : public TemporalDataObject itkTypeMacro(DummyTemporalDataObject, TemporalDataObject); /** Override update for debug output */ - virtual void Update() ITK_OVERRIDE + void Update() override { //std::cout << "Calling Update from temporal data object" << std::endl; Superclass::Update(); } /** Override UpdateOutputInformation for debug output */ - virtual void UpdateOutputInformation() ITK_OVERRIDE + void UpdateOutputInformation() override { //std::cout << "Calling UpdateOutputInformation from temporal data object" // << std::endl; @@ -149,13 +149,13 @@ class DummyTemporalDataObject : public TemporalDataObject } /** Override PropagateRequestedRegion for debug output */ - virtual void PropagateRequestedRegion() throw (itk::InvalidRequestedRegionError) ITK_OVERRIDE + void PropagateRequestedRegion() throw (itk::InvalidRequestedRegionError) override { Superclass::PropagateRequestedRegion(); } /** Override UpdateOutputData for debug output */ - virtual void UpdateOutputData() ITK_OVERRIDE + void UpdateOutputData() override { std::cout << " UpdateOutputData from temporal data object" << std::endl; @@ -198,7 +198,7 @@ class DummyTemporalDataObject : public TemporalDataObject // if nothing buffered, just fail if (m_BufferedTemporalRegion.GetFrameDuration() == 0) { - return ITK_NULLPTR; + return nullptr; } // make sure we have the desired frame buffered @@ -206,7 +206,7 @@ class DummyTemporalDataObject : public TemporalDataObject SizeValueType bufEnd = bufStart + m_BufferedTemporalRegion.GetFrameDuration() - 1; if (frameNumber < bufStart || frameNumber > bufEnd) { - return ITK_NULLPTR; + return nullptr; } // If we can, fetch the desired frame @@ -236,7 +236,7 @@ class DummyTemporalProcessObject : public TemporalProcessObject /*-REQUIRED IMPLEMENTATIONS------------------------------------------------*/ /** TemporalStreamingGenerateData */ - virtual void TemporalStreamingGenerateData() ITK_OVERRIDE + void TemporalStreamingGenerateData() override { // Create a START entry in the stack trace m_CallStack.push_back(CallRecord(m_IdNumber, @@ -292,7 +292,7 @@ class DummyTemporalProcessObject : public TemporalProcessObject } /** Allow the UnitInputNumberOfFrames to be set */ - virtual void SetUnitInputNumberOfFrames( const SizeValueType numberOfFrames ) ITK_OVERRIDE + void SetUnitInputNumberOfFrames( const SizeValueType numberOfFrames ) override { itkDebugMacro("setting UnitInputNumberOfFrames to " << numberOfFrames); if ( this->m_UnitInputNumberOfFrames != numberOfFrames ) @@ -303,7 +303,7 @@ class DummyTemporalProcessObject : public TemporalProcessObject } /** Allow the UnitOutputNumberOfFrames to be set */ - virtual void SetUnitOutputNumberOfFrames( const SizeValueType numberOfFrames ) ITK_OVERRIDE + void SetUnitOutputNumberOfFrames( const SizeValueType numberOfFrames ) override { itkDebugMacro("setting UnitOutputNumberOfFrames to " << numberOfFrames); if ( this->m_UnitOutputNumberOfFrames != numberOfFrames ) @@ -337,7 +337,7 @@ class DummyTemporalProcessObject : public TemporalProcessObject itkGetMacro(IdNumber, SizeValueType); /** Provide access to m_FrameSkipPerOutput */ - virtual void SetFrameSkipPerOutput ( const OffsetValueType frameSkip ) ITK_OVERRIDE + void SetFrameSkipPerOutput ( const OffsetValueType frameSkip ) override { itkDebugMacro("setting FrameSkipPerOutput to " << frameSkip); if ( this->m_FrameSkipPerOutput != frameSkip ) @@ -350,7 +350,7 @@ class DummyTemporalProcessObject : public TemporalProcessObject itkGetMacro(FrameSkipPerOutput, OffsetValueType); /** Provide access to m_InputStencilCurrentFrameIndex */ - virtual void SetInputStencilCurrentFrameIndex ( const SizeValueType inputStencil ) ITK_OVERRIDE + void SetInputStencilCurrentFrameIndex ( const SizeValueType inputStencil ) override { itkDebugMacro("setting InputStencilCurrentFrameIndex to " << inputStencil); if ( this->m_InputStencilCurrentFrameIndex != inputStencil ) @@ -359,7 +359,7 @@ class DummyTemporalProcessObject : public TemporalProcessObject this->Modified(); } } - virtual SizeValueType GetInputStencilCurrentFrameIndex() ITK_OVERRIDE + SizeValueType GetInputStencilCurrentFrameIndex() override { return this->m_InputStencilCurrentFrameIndex; } @@ -367,21 +367,21 @@ class DummyTemporalProcessObject : public TemporalProcessObject /*-DEBUG OVERRIDES---------------------------------------------------------*/ /** Override Update for debug output */ - virtual void Update() ITK_OVERRIDE + void Update() override { std::cout << "(ID = " << m_IdNumber << ") - Update" << std::endl; Superclass::Update(); } /** Override UpdateOutputData for debug output */ - virtual void UpdateOutputData(DataObject* dobj) ITK_OVERRIDE + void UpdateOutputData(DataObject* dobj) override { std::cout << "(ID = " << m_IdNumber << ") - UpdateOutputData" << std::endl; Superclass::UpdateOutputData(dobj); } /** Override GenerateData for debug output */ - virtual void GenerateData() ITK_OVERRIDE + void GenerateData() override { // Create a START entry in the stack trace m_CallStack.push_back(CallRecord(m_IdNumber, @@ -397,14 +397,14 @@ class DummyTemporalProcessObject : public TemporalProcessObject } /** Override EnlargeOutputRequestedTemporalRegion for debug output */ - virtual void EnlargeOutputRequestedTemporalRegion(TemporalDataObject* output) ITK_OVERRIDE + void EnlargeOutputRequestedTemporalRegion(TemporalDataObject* output) override { std::cout << "(ID = " << m_IdNumber << ") - EnlargeOutputRequestedTemporalRegion" << std::endl; Superclass::EnlargeOutputRequestedTemporalRegion(output); } /** Override GenerateInputRequestedTemporalRegion for debug output */ - virtual void GenerateInputRequestedTemporalRegion() ITK_OVERRIDE + void GenerateInputRequestedTemporalRegion() override { std::cout << "(ID = " << m_IdNumber << ") - GenerateInputRequestedTemporalRegion" << std::endl; Superclass::GenerateInputRequestedTemporalRegion(); diff --git a/Modules/Video/Core/test/itkVideoSourceTest.cxx b/Modules/Video/Core/test/itkVideoSourceTest.cxx index 5ee3e453721..4cbb0507169 100644 --- a/Modules/Video/Core/test/itkVideoSourceTest.cxx +++ b/Modules/Video/Core/test/itkVideoSourceTest.cxx @@ -67,9 +67,9 @@ class DummyVideoSource : public VideoSource /** Override ThreadedGenerateData to set all pixels in the requested region * to 1 */ - virtual void ThreadedGenerateData( + void ThreadedGenerateData( const OutputFrameSpatialRegionType& outputRegionForThread, - int threadId) ITK_OVERRIDE + int threadId) override { // Print out your threadId diff --git a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx index cd2b4abe986..0b5aeef4157 100644 --- a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx +++ b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx @@ -107,9 +107,9 @@ class DummyVideoToVideoFilter : } /** Override ThreadedGenerateData */ - virtual void ThreadedGenerateData( + void ThreadedGenerateData( const OutputFrameSpatialRegionType& outputRegionForThread, - int threadId) ITK_OVERRIDE + int threadId) override { const InputVideoStreamType* input = this->GetInput(); OutputVideoStreamType* output = this->GetOutput(); diff --git a/Modules/Video/Filtering/include/itkDecimateFramesVideoFilter.h b/Modules/Video/Filtering/include/itkDecimateFramesVideoFilter.h index 184e998a8e7..3fdaa8ea5ea 100644 --- a/Modules/Video/Filtering/include/itkDecimateFramesVideoFilter.h +++ b/Modules/Video/Filtering/include/itkDecimateFramesVideoFilter.h @@ -64,16 +64,16 @@ class ITK_TEMPLATE_EXPORT DecimateFramesVideoFilter : /** Constructor and Destructor */ DecimateFramesVideoFilter(); - virtual ~DecimateFramesVideoFilter() ITK_OVERRIDE {} + ~DecimateFramesVideoFilter() override {} /** PrintSelf */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** DecimateFramesVideoFilter is implemented as a temporal streaming and * spatially multithreaded filter, so we override ThreadedGenerateData */ - virtual void ThreadedGenerateData( + void ThreadedGenerateData( const FrameSpatialRegionType& outputRegionForThread, - int threadId) ITK_OVERRIDE; + int threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(DecimateFramesVideoFilter); diff --git a/Modules/Video/Filtering/include/itkFrameAverageVideoFilter.h b/Modules/Video/Filtering/include/itkFrameAverageVideoFilter.h index dd4d9953585..cf798a149f8 100644 --- a/Modules/Video/Filtering/include/itkFrameAverageVideoFilter.h +++ b/Modules/Video/Filtering/include/itkFrameAverageVideoFilter.h @@ -67,16 +67,16 @@ class ITK_TEMPLATE_EXPORT FrameAverageVideoFilter : /** Constructor and Destructor */ FrameAverageVideoFilter(); - virtual ~FrameAverageVideoFilter() ITK_OVERRIDE {} + ~FrameAverageVideoFilter() override {} /** PrintSelf */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** FrameAverageVideoFilter is implemented as a temporal streaming and * spatially multithreaded filter, so we override ThreadedGenerateData */ - virtual void ThreadedGenerateData( + void ThreadedGenerateData( const OutputFrameSpatialRegionType& outputRegionForThread, - int threadId) ITK_OVERRIDE; + int threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FrameAverageVideoFilter); diff --git a/Modules/Video/Filtering/include/itkFrameDifferenceVideoFilter.h b/Modules/Video/Filtering/include/itkFrameDifferenceVideoFilter.h index 34c5ed32076..5c586ae0286 100644 --- a/Modules/Video/Filtering/include/itkFrameDifferenceVideoFilter.h +++ b/Modules/Video/Filtering/include/itkFrameDifferenceVideoFilter.h @@ -68,16 +68,16 @@ class ITK_TEMPLATE_EXPORT FrameDifferenceVideoFilter : /** Constructor and Destructor */ FrameDifferenceVideoFilter(); - virtual ~FrameDifferenceVideoFilter() ITK_OVERRIDE {} + ~FrameDifferenceVideoFilter() override {} /** PrintSelf */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** FrameDifferenceVideoFilter is implemented as a temporal streaming and * spatially multithreaded filter, so we override ThreadedGenerateData */ - virtual void ThreadedGenerateData( + void ThreadedGenerateData( const OutputFrameSpatialRegionType& outputRegionForThread, - int threadId) ITK_OVERRIDE; + int threadId) override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FrameDifferenceVideoFilter); diff --git a/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.h b/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.h index 961d2d2b7f7..88b7eb4b26b 100644 --- a/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.h +++ b/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.h @@ -69,14 +69,14 @@ class ITK_TEMPLATE_EXPORT ImageFilterToVideoFilterWrapper : /** Constructor and Destructor */ ImageFilterToVideoFilterWrapper(); - virtual ~ImageFilterToVideoFilterWrapper() ITK_OVERRIDE {} + ~ImageFilterToVideoFilterWrapper() override {} /** PrintSelf */ - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Since we just set up a mini image pipeline inside, we override * TemporalStreamingGenerateData*/ - virtual void TemporalStreamingGenerateData() ITK_OVERRIDE; + void TemporalStreamingGenerateData() override; /** Pointer to filter to use for internal filter */ typename ImageFilterType::Pointer m_ImageFilter; diff --git a/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx b/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx index e7d784fad8f..5664129970f 100644 --- a/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx +++ b/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx @@ -36,8 +36,8 @@ ImageFilterToVideoFilterWrapper() this->TemporalProcessObject::m_InputStencilCurrentFrameIndex = 0; this->TemporalProcessObject::m_FrameSkipPerOutput = 1; - // Initialize image filter to ITK_NULLPTR - m_ImageFilter = ITK_NULLPTR; + // Initialize image filter to nullptr + m_ImageFilter = nullptr; } // diff --git a/Modules/Video/IO/include/itkFileListVideoIO.h b/Modules/Video/IO/include/itkFileListVideoIO.h index 88ae72cf7af..c94d28fadf0 100644 --- a/Modules/Video/IO/include/itkFileListVideoIO.h +++ b/Modules/Video/IO/include/itkFileListVideoIO.h @@ -58,11 +58,11 @@ class ITKVideoIO_EXPORT FileListVideoIO : public VideoIOBase itkGetConstMacro(FileNames, std::vector); /** Override SetFileName to do parsing. */ - virtual void SetFileName(const std::string& fileList) ITK_OVERRIDE; - virtual void SetFileName(const char* fileList) ITK_OVERRIDE; + void SetFileName(const std::string& fileList) override; + void SetFileName(const char* fileList) override; /** Close the reader and writer and reset members. */ - virtual void FinishReadingOrWriting() ITK_OVERRIDE; + void FinishReadingOrWriting() override; /** Split up the input file names using comma (',') as the separator character. * This method is made public so that places where FileListVideoIO is used @@ -70,86 +70,86 @@ class ITKVideoIO_EXPORT FileListVideoIO : public VideoIOBase static std::vector SplitFileNames(const std::string& fileList); /** Set to reading from file. */ - virtual void SetReadFromFile() ITK_OVERRIDE; + void SetReadFromFile() override; /** Set to reading from a camera. */ - virtual void SetReadFromCamera() ITK_OVERRIDE; + void SetReadFromCamera() override; /** Determine the file type. Returns true if this ImageIO can read the * file specified. */ - virtual bool CanReadFile(const char *) ITK_OVERRIDE; + bool CanReadFile(const char *) override; /** Return whether or not the VideoIO can read from a camera. */ - virtual bool CanReadCamera( CameraIDType cameraID )const ITK_OVERRIDE; + bool CanReadCamera( CameraIDType cameraID )const override; /** Set the spacing and dimension information for the set filename. */ - virtual void ReadImageInformation() ITK_OVERRIDE; + void ReadImageInformation() override; /** Reads the data from disk into the memory buffer provided. */ - virtual void Read(void *buffer) ITK_OVERRIDE; + void Read(void *buffer) override; /** Set the next frame that should be read. Return true if you operation * successful. */ - virtual bool SetNextFrameToRead(FrameOffsetType frameNumber) ITK_OVERRIDE; + bool SetNextFrameToRead(FrameOffsetType frameNumber) override; /** Accessor functions for video specific information. */ - virtual TemporalOffsetType GetPositionInMSec() const ITK_OVERRIDE + TemporalOffsetType GetPositionInMSec() const override { return this->m_PositionInMSec; } - virtual TemporalOffsetType GetRatio() const ITK_OVERRIDE + TemporalOffsetType GetRatio() const override { return this->m_Ratio; } - virtual FrameOffsetType GetFrameTotal() const ITK_OVERRIDE + FrameOffsetType GetFrameTotal() const override { return this->m_FrameTotal; } - virtual TemporalRatioType GetFramesPerSecond() const ITK_OVERRIDE + TemporalRatioType GetFramesPerSecond() const override { return this->m_FramesPerSecond; } - virtual FrameOffsetType GetCurrentFrame() const ITK_OVERRIDE + FrameOffsetType GetCurrentFrame() const override { return this->m_CurrentFrame; } itkGetConstMacro(IFrameInterval,FrameOffsetType); - virtual FrameOffsetType GetLastIFrame() const ITK_OVERRIDE + FrameOffsetType GetLastIFrame() const override { return this->m_LastIFrame; } /** Override accessors to pass through to internal image reader. */ - virtual double GetSpacing(unsigned int i) const ITK_OVERRIDE; + double GetSpacing(unsigned int i) const override; - virtual double GetOrigin(unsigned int i) const ITK_OVERRIDE; + double GetOrigin(unsigned int i) const override; - virtual std::vector< double > GetDirection(unsigned int i) const ITK_OVERRIDE; + std::vector< double > GetDirection(unsigned int i) const override; /** Determine the file type. Returns true if this ImageIO can write the * file specified. */ - virtual bool CanWriteFile(const char *) ITK_OVERRIDE; + bool CanWriteFile(const char *) override; /** Writes the spacing and dimensions of the image. * Assumes SetFileName has been called with a valid file name. */ - virtual void WriteImageInformation() ITK_OVERRIDE; + void WriteImageInformation() override; /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegion has been set properly. */ - virtual void Write(const void *buffer) ITK_OVERRIDE; + void Write(const void *buffer) override; /** Set Writer parameters. */ - virtual void SetWriterParameters( TemporalRatioType framesPerSecond, + void SetWriterParameters( TemporalRatioType framesPerSecond, const std::vector& dim, const char* fourCC, unsigned int nChannels, - IOComponentType componentType ) ITK_OVERRIDE; + IOComponentType componentType ) override; protected: FileListVideoIO(); - ~FileListVideoIO() ITK_OVERRIDE; + ~FileListVideoIO() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Reset member variables to empty state closed. */ void ResetMembers(); diff --git a/Modules/Video/IO/include/itkFileListVideoIOFactory.h b/Modules/Video/IO/include/itkFileListVideoIOFactory.h index dc65479a246..0db58fb5a88 100644 --- a/Modules/Video/IO/include/itkFileListVideoIOFactory.h +++ b/Modules/Video/IO/include/itkFileListVideoIOFactory.h @@ -39,9 +39,9 @@ class ITKVideoIO_EXPORT FileListVideoIOFactory : public ObjectFactoryBase typedef SmartPointer< const Self > ConstPointer; /** Class methods used to interface with the registered factories. */ - virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE; + const char * GetITKSourceVersion(void) const override; - virtual const char * GetDescription(void) const ITK_OVERRIDE; + const char * GetDescription(void) const override; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); @@ -59,7 +59,7 @@ class ITKVideoIO_EXPORT FileListVideoIOFactory : public ObjectFactoryBase protected: FileListVideoIOFactory(); - ~FileListVideoIOFactory() ITK_OVERRIDE; + ~FileListVideoIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(FileListVideoIOFactory); diff --git a/Modules/Video/IO/include/itkVideoFileReader.h b/Modules/Video/IO/include/itkVideoFileReader.h index 1404630fd41..7d9c8192d70 100644 --- a/Modules/Video/IO/include/itkVideoFileReader.h +++ b/Modules/Video/IO/include/itkVideoFileReader.h @@ -84,7 +84,7 @@ class ITK_TEMPLATE_EXPORT VideoFileReader : public VideoSource< TOutputVideoStre itkGetMacro(IFrameSafe, bool); /** Set up the output information */ - virtual void UpdateOutputInformation() ITK_OVERRIDE; + void UpdateOutputInformation() override; /** Set the internal VideoIOBase pointer. This will generally be called by * the object that creates the RingBuffer (e.g. itk::VideoFileReader) */ @@ -106,13 +106,13 @@ class ITK_TEMPLATE_EXPORT VideoFileReader : public VideoSource< TOutputVideoStre protected: VideoFileReader(); - virtual ~VideoFileReader() ITK_OVERRIDE; - void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + ~VideoFileReader() override; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Override TemporalStreamingGenerateData to generate output a single frame. * We don't override ThreadedGenerateData because we read whole frames one at * a time. As such, we have to handle the allocation of the frames here. */ - virtual void TemporalStreamingGenerateData() ITK_OVERRIDE; + void TemporalStreamingGenerateData() override; /** Convert buffer for output */ void DoConvertBuffer(void* inputData, FrameOffsetType frameNumber); diff --git a/Modules/Video/IO/include/itkVideoFileReader.hxx b/Modules/Video/IO/include/itkVideoFileReader.hxx index 5510846fa9b..a48cecd2a2e 100644 --- a/Modules/Video/IO/include/itkVideoFileReader.hxx +++ b/Modules/Video/IO/include/itkVideoFileReader.hxx @@ -32,7 +32,7 @@ VideoFileReader< TOutputVideoStream > { // Initialize members m_FileName = ""; - m_VideoIO = ITK_NULLPTR; + m_VideoIO = nullptr; m_PixelConversionNeeded = false; m_IFrameSafe = true; diff --git a/Modules/Video/IO/include/itkVideoFileWriter.h b/Modules/Video/IO/include/itkVideoFileWriter.h index 29806c49efb..7e0846375a2 100644 --- a/Modules/Video/IO/include/itkVideoFileWriter.h +++ b/Modules/Video/IO/include/itkVideoFileWriter.h @@ -99,17 +99,17 @@ class ITK_TEMPLATE_EXPORT VideoFileWriter : public TemporalProcessObject /** Aliased to the Write() method to be consistent with the rest of the * pipeline. */ - virtual void Update() ITK_OVERRIDE; + void Update() override; /** Write the entire video to a file, if possible. This is the same as * calling write or update without setting an output temporal region. */ - virtual void UpdateLargestPossibleRegion() ITK_OVERRIDE; + void UpdateLargestPossibleRegion() override; protected: VideoFileWriter(); - virtual ~VideoFileWriter() ITK_OVERRIDE; - virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE; + ~VideoFileWriter() override; + void PrintSelf(std::ostream &os, Indent indent) const override; /** Initialize output parameters. */ bool InitializeOutputParameters(); @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT VideoFileWriter : public TemporalProcessObject bool InitializeVideoIO(); /** Override TemporalStreamingGenerateData to do the actual writing. */ - virtual void TemporalStreamingGenerateData() ITK_OVERRIDE; + void TemporalStreamingGenerateData() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VideoFileWriter); diff --git a/Modules/Video/IO/include/itkVideoFileWriter.hxx b/Modules/Video/IO/include/itkVideoFileWriter.hxx index 4ba194c0c2e..703afd4ce8a 100644 --- a/Modules/Video/IO/include/itkVideoFileWriter.hxx +++ b/Modules/Video/IO/include/itkVideoFileWriter.hxx @@ -32,7 +32,7 @@ template< typename TInputVideoStream > VideoFileWriter< TInputVideoStream > ::VideoFileWriter() : m_FileName(""), - m_VideoIO(ITK_NULLPTR), + m_VideoIO(nullptr), m_FramesPerSecond(24), m_FourCC("MP42"), m_NumberOfComponents(0) @@ -66,7 +66,7 @@ VideoFileWriter< TInputVideoStream > { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast(this->ProcessObject::GetInput(0)); @@ -91,7 +91,7 @@ VideoFileWriter< TInputVideoStream > // Make sure input is available const VideoStreamType* input = this->GetInput(); - if (input == ITK_NULLPTR) + if (input == nullptr) { itkExceptionMacro("No input to writer"); } @@ -218,7 +218,7 @@ VideoFileWriter< TInputVideoStream > ::UpdateLargestPossibleRegion() { const VideoStreamType* input = this->GetInput(); - if (input == ITK_NULLPTR) + if (input == nullptr) { itkExceptionMacro("No input to writer"); } @@ -257,7 +257,7 @@ VideoFileWriter< TInputVideoStream > ::InitializeOutputParameters() { // InputImage and VideoIO must be valid - if (this->GetInput() == ITK_NULLPTR) + if (this->GetInput() == nullptr) { return false; } diff --git a/Modules/Video/IO/include/itkVideoIOBase.h b/Modules/Video/IO/include/itkVideoIOBase.h index 8d1b9c90fa0..50005a5c491 100644 --- a/Modules/Video/IO/include/itkVideoIOBase.h +++ b/Modules/Video/IO/include/itkVideoIOBase.h @@ -113,9 +113,9 @@ class ITKVideoIO_EXPORT VideoIOBase : public ImageIOBase protected: VideoIOBase(); - virtual ~VideoIOBase() ITK_OVERRIDE; + ~VideoIOBase() override; - virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, Indent indent) const override; /** Member Variables */ ReadType m_ReadType; diff --git a/Modules/Video/IO/include/itkVideoIOFactory.h b/Modules/Video/IO/include/itkVideoIOFactory.h index 3a29a2a1ce5..ceea5308646 100644 --- a/Modules/Video/IO/include/itkVideoIOFactory.h +++ b/Modules/Video/IO/include/itkVideoIOFactory.h @@ -59,7 +59,7 @@ class ITKVideoIO_EXPORT VideoIOFactory : public Object protected: VideoIOFactory(); - ~VideoIOFactory() ITK_OVERRIDE; + ~VideoIOFactory() override; private: ITK_DISALLOW_COPY_AND_ASSIGN(VideoIOFactory); diff --git a/Modules/Video/IO/src/itkFileListVideoIO.cxx b/Modules/Video/IO/src/itkFileListVideoIO.cxx index bea2842d88f..de85baa2c21 100644 --- a/Modules/Video/IO/src/itkFileListVideoIO.cxx +++ b/Modules/Video/IO/src/itkFileListVideoIO.cxx @@ -425,7 +425,7 @@ void FileListVideoIO::OpenWriter() void FileListVideoIO::ResetMembers() { - m_ImageIO = ITK_NULLPTR; + m_ImageIO = nullptr; m_FileNames.clear(); m_WriterOpen = false; m_ReaderOpen = false; diff --git a/Modules/Video/IO/src/itkVideoIOFactory.cxx b/Modules/Video/IO/src/itkVideoIOFactory.cxx index 6f98007a1b8..c78393e7109 100644 --- a/Modules/Video/IO/src/itkVideoIOFactory.cxx +++ b/Modules/Video/IO/src/itkVideoIOFactory.cxx @@ -83,7 +83,7 @@ VideoIOBase::Pointer VideoIOFactory::CreateVideoIO( IOModeType mode, const char* } // Didn't find a usable VideoIO - return ITK_NULLPTR; + return nullptr; } diff --git a/Testing/TestExternal/CMakeLists.txt b/Testing/TestExternal/CMakeLists.txt index 259c55fe207..708767fc3d8 100644 --- a/Testing/TestExternal/CMakeLists.txt +++ b/Testing/TestExternal/CMakeLists.txt @@ -1,6 +1,6 @@ # This project builds the test directories from all ITK modules as a separate # project outside the main ITK build tree as if they were an application. -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +cmake_minimum_required(VERSION 3.8.2 FATAL_ERROR) foreach(p CMP0025 # CMake 3.0 diff --git a/Utilities/Doxygen/doxygen.config.in b/Utilities/Doxygen/doxygen.config.in index 028f9edaa17..6cda0357c5b 100644 --- a/Utilities/Doxygen/doxygen.config.in +++ b/Utilities/Doxygen/doxygen.config.in @@ -2013,8 +2013,8 @@ PREDEFINED = "itkNotUsed(x)=" \ "itkMacro_h" \ "ITK_LEGACY_REMOVE" \ "ITKCommon_EXPORT_EXPLICIT" \ - "ITK_OVERRIDE= override " \ - "ITK_NULLPTR= nullptr " \ + "override= override " \ + "nullptr= nullptr " \ "ITK_NOEXCEPT= noexcept " \ "ITK_DISALLOW_COPY_AND_ASSIGN(type)="\ "ITK_FORCE_EXPORT_MACRO(X)=" diff --git a/Wrapping/CMakeLists.txt b/Wrapping/CMakeLists.txt index acac1858d2e..014c984fd5c 100644 --- a/Wrapping/CMakeLists.txt +++ b/Wrapping/CMakeLists.txt @@ -16,7 +16,7 @@ # #==========================================================================*/ -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +cmake_minimum_required(VERSION 3.8.2 FATAL_ERROR) foreach(p CMP0025 # CMake 3.0 CMP0042 # CMake 3.0 diff --git a/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx b/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx index 0551116cd4b..95055499ca5 100644 --- a/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx +++ b/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx @@ -23,7 +23,7 @@ namespace itk PyCommand::PyCommand() { - this->m_Object = ITK_NULLPTR; + this->m_Object = nullptr; } PyCommand::~PyCommand() @@ -32,7 +32,7 @@ PyCommand::~PyCommand() { Py_DECREF(this->m_Object); } - this->m_Object = ITK_NULLPTR; + this->m_Object = nullptr; } void PyCommand::SetCommandCallable(PyObject *o) @@ -87,7 +87,7 @@ void PyCommand::PyExecute() } else { - PyObject *result = PyEval_CallObject(this->m_Object, (PyObject *)ITK_NULLPTR); + PyObject *result = PyEval_CallObject(this->m_Object, (PyObject *)nullptr); if (result) { diff --git a/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx b/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx index a642416dbf5..fc722b4b26f 100644 --- a/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx +++ b/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx @@ -28,7 +28,7 @@ template PyImageFilter ::PyImageFilter() { - this->m_Object = ITK_NULLPTR; + this->m_Object = nullptr; } template @@ -39,7 +39,7 @@ PyImageFilter { Py_DECREF(this->m_Object); } - this->m_Object = ITK_NULLPTR; + this->m_Object = nullptr; } template @@ -86,7 +86,7 @@ PyImageFilter { PyObject *result; - result = PyEval_CallObject(this->m_Object, (PyObject *)ITK_NULLPTR); + result = PyEval_CallObject(this->m_Object, (PyObject *)nullptr); if (result) {