diff --git a/CMake/ITKConfig.cmake.in b/CMake/ITKConfig.cmake.in index 7a77ae3c07a7..2286442eb030 100644 --- a/CMake/ITKConfig.cmake.in +++ b/CMake/ITKConfig.cmake.in @@ -26,9 +26,6 @@ set(ITK_VERSION_MAJOR "@ITK_VERSION_MAJOR@") set(ITK_VERSION_MINOR "@ITK_VERSION_MINOR@") set(ITK_VERSION_PATCH "@ITK_VERSION_PATCH@") -# If ITK was built with version 4 compatibility features. -set(ITKV4_COMPATIBILITY "@ITKV4_COMPATIBILITY@") - # Remove all legacy code completely. set(ITK_LEGACY_REMOVE "@ITK_LEGACY_REMOVE@") diff --git a/CMakeLists.txt b/CMakeLists.txt index 1267b1aae95b..77075e99c7d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -325,20 +325,16 @@ cmake_dependent_option( OFF "NOT ITK_LEGACY_REMOVE" OFF) -# The disabling of legacy code, and the ITKv4 compatibility option can not both be -# requested. If removal of legacy code is requested, then ITKV4_COMPATIBILITY must -# be off. -cmake_dependent_option( - ITKV4_COMPATIBILITY - "Enable LEGACY compatibility with ITK4.x when possible." - OFF - "NOT ITK_LEGACY_REMOVE" - OFF) + mark_as_advanced( ITK_LEGACY_SILENT ITK_LEGACY_REMOVE ITK_FUTURE_LEGACY_REMOVE - ITKV4_COMPATIBILITY) + ) + +if(ITKV4_COMPATIBILITY) + message(FATAL_ERROR "ITKV4_COMPATIBILITY is removed starting in ITK version 4.0, this option is no longer valid.") +endif() if(ITKV3_COMPATIBILITY) message(FATAL_ERROR "ITKV3_COMPATIBILITY is removed starting in ITK version 5.0, this option is no longer valid.") diff --git a/Documentation/docs/migration_guides/itk_6_migration_guide.md b/Documentation/docs/migration_guides/itk_6_migration_guide.md index 369cbe5e7749..6c8f525dc30b 100644 --- a/Documentation/docs/migration_guides/itk_6_migration_guide.md +++ b/Documentation/docs/migration_guides/itk_6_migration_guide.md @@ -22,6 +22,10 @@ deprecations and API changes. The new behavior is activated by setting `ITK_LEGACY_REMOVE` to `ON`. By default, compatibility with v5 is retained (`ITK_LEGACY_REMOVE=OFF`). +Remove support for ITKv4 interfaces +----------------------------------- + +ITKV4_COMPATIBILITY is no longer a supported option. Require modern C++ language feature use --------------------------------------- diff --git a/Modules/Compatibility/Deprecated/include/itkImageTransformer.hxx b/Modules/Compatibility/Deprecated/include/itkImageTransformer.hxx index 1c57cee58f29..8e7a0a12866f 100644 --- a/Modules/Compatibility/Deprecated/include/itkImageTransformer.hxx +++ b/Modules/Compatibility/Deprecated/include/itkImageTransformer.hxx @@ -323,20 +323,6 @@ ImageTransformer::ThreaderCallback(void * arg) if (threadId < total) { str->Filter->ThreadedGenerateData(splitRegion, threadId); -#if defined(ITKV4_COMPATIBILITY) - if (str->Filter->GetAbortGenerateData()) - { - std::string msg; - ProcessAborted e(__FILE__, __LINE__); - msg += "Object " + std::string(str->Filter->GetNameOfClass()) + ": AbortGenerateData was set!"; - e.SetDescription(msg); - throw e; - } - else if (str->Filter->GetProgress() == 0.0f) // progress was not set after at least the first chunk finished - { - str->Filter->UpdateProgress(static_cast(threadId + 1) / total); // this will be the only progress update - } -#endif } // else // { diff --git a/Modules/Compatibility/Deprecated/itk-module.cmake b/Modules/Compatibility/Deprecated/itk-module.cmake index a04eee547b34..c43847844851 100644 --- a/Modules/Compatibility/Deprecated/itk-module.cmake +++ b/Modules/Compatibility/Deprecated/itk-module.cmake @@ -2,9 +2,6 @@ set(DOCUMENTATION "This is a collection of classes that are intended to be removed from the toolkit.") set(ITKDeprecatedOnByDefault EXCLUDE_FROM_DEFAULT) -if(ITKV4_COMPATIBILITY) - set(ITKDeprecatedOnByDefault "") -endif() itk_module( ITKDeprecated diff --git a/Modules/Core/Common/include/itkImageSource.hxx b/Modules/Core/Common/include/itkImageSource.hxx index 3103e4256eb5..3602009a7a87 100644 --- a/Modules/Core/Common/include/itkImageSource.hxx +++ b/Modules/Core/Common/include/itkImageSource.hxx @@ -45,11 +45,7 @@ ImageSource::ImageSource() this->ProcessObject::SetNumberOfRequiredOutputs(1); this->ProcessObject::SetNthOutput(0, output.GetPointer()); -#if defined(ITKV4_COMPATIBILITY) - m_DynamicMultiThreading = false; -#else m_DynamicMultiThreading = true; -#endif // Set the default behavior of an image source to NOT release its // output bulk data prior to GenerateData() in case that bulk data @@ -287,21 +283,6 @@ ImageSource::ThreaderCallback(void * arg) if (workUnitID < total) { str->Filter->ThreadedGenerateData(splitRegion, workUnitID); -#if defined(ITKV4_COMPATIBILITY) - if (str->Filter->GetAbortGenerateData()) - { - std::string msg; - ProcessAborted e(__FILE__, __LINE__); - msg += "Object " + std::string(str->Filter->GetNameOfClass()) + ": AbortGenerateData was set!"; - e.SetDescription(msg); - throw e; - } - else if (!str->Filter->GetDynamicMultiThreading() // progress reporting is not done in MultiThreaders - && str->Filter->GetProgress() == 0.0f) // and progress was not set after at least the first chunk finished - { - str->Filter->UpdateProgress(static_cast(workUnitID + 1) / total); // this will be the only progress update - } -#endif } // else don't use this thread. Threads were not split conveniently. return ITK_THREAD_RETURN_DEFAULT_VALUE; diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h index da4ab71f0846..3370801f59ba 100644 --- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h @@ -1359,11 +1359,7 @@ compilers. * classes can be achieved with defining ITKV4_COMPATIBILITY. Code * should be migrated to no longer rely on the old virtual interface. */ -#if defined(ITKV4_COMPATIBILITY) -# define ITK_ITERATOR_VIRTUAL virtual -# define ITK_ITERATOR_OVERRIDE override -# define ITK_ITERATOR_FINAL -#elif !defined(ITK_LEGACY_REMOVE) +#if !defined(ITK_LEGACY_REMOVE) # define ITK_ITERATOR_VIRTUAL virtual # define ITK_ITERATOR_OVERRIDE override # define ITK_ITERATOR_FINAL final diff --git a/Modules/Core/Common/include/itkProcessObject.h b/Modules/Core/Common/include/itkProcessObject.h index 509fc314a7b1..068767a06d61 100644 --- a/Modules/Core/Common/include/itkProcessObject.h +++ b/Modules/Core/Common/include/itkProcessObject.h @@ -494,12 +494,6 @@ class ITKCommon_EXPORT ProcessObject : public Object itkSetClampMacro(NumberOfWorkUnits, ThreadIdType, 1, ITK_MAX_THREADS); itkGetConstReferenceMacro(NumberOfWorkUnits, ThreadIdType); -#if !defined(ITK_LEGACY_REMOVE) || defined(ITKV4_COMPATIBILITY) - itkLegacyMacro(void SetNumberOfThreads(ThreadIdType count)) { this->SetNumberOfWorkUnits(count); } - - itkLegacyMacro(ThreadIdType GetNumberOfThreads() const) { return this->GetNumberOfWorkUnits(); } -#endif // !ITK_LEGACY_REMOVE - /** Return the multithreader used by this class. */ MultiThreaderType * GetMultiThreader() const diff --git a/Modules/Core/Common/src/itkConfigure.h.in b/Modules/Core/Common/src/itkConfigure.h.in index a427cddb588a..025d8a640888 100644 --- a/Modules/Core/Common/src/itkConfigure.h.in +++ b/Modules/Core/Common/src/itkConfigure.h.in @@ -71,7 +71,6 @@ #endif #cmakedefine ITK_DYNAMIC_LOADING -#cmakedefine ITKV4_COMPATIBILITY #cmakedefine ITK_LEGACY_REMOVE #cmakedefine ITK_LEGACY_SILENT #cmakedefine ITK_FUTURE_LEGACY_REMOVE diff --git a/Modules/Core/Common/src/itkPoolMultiThreader.cxx b/Modules/Core/Common/src/itkPoolMultiThreader.cxx index 5e829449859d..1673f1bd73f1 100644 --- a/Modules/Core/Common/src/itkPoolMultiThreader.cxx +++ b/Modules/Core/Common/src/itkPoolMultiThreader.cxx @@ -86,12 +86,6 @@ PoolMultiThreader::PoolMultiThreader() } ThreadIdType defaultThreads = std::max(1u, GetGlobalDefaultNumberOfThreads()); -#if !defined(ITKV4_COMPATIBILITY) - if (defaultThreads > 1) // one work unit for only one thread - { - defaultThreads *= 4; - } -#endif m_NumberOfWorkUnits = std::min(ITK_MAX_THREADS, defaultThreads); m_MaximumNumberOfThreads = m_ThreadPool->GetMaximumNumberOfThreads(); } diff --git a/Modules/Core/Common/src/itkTBBMultiThreader.cxx b/Modules/Core/Common/src/itkTBBMultiThreader.cxx index 8fa18d81a562..7c49cac55e48 100644 --- a/Modules/Core/Common/src/itkTBBMultiThreader.cxx +++ b/Modules/Core/Common/src/itkTBBMultiThreader.cxx @@ -47,14 +47,10 @@ namespace itk TBBMultiThreader::TBBMultiThreader() { ThreadIdType defaultThreads = std::max(1u, GetGlobalDefaultNumberOfThreads()); -#if defined(ITKV4_COMPATIBILITY) - m_NumberOfWorkUnits = defaultThreads; -#else if (defaultThreads > 1) // one work unit for only one thread { m_NumberOfWorkUnits = 16 * defaultThreads; } -#endif } TBBMultiThreader::~TBBMultiThreader() = default; diff --git a/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h index 9bd40c4f22fa..be5cf071663f 100644 --- a/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkInterpolateImageFunction.h @@ -127,28 +127,13 @@ class ITK_TEMPLATE_EXPORT InterpolateImageFunction return (static_cast(this->GetInputImage()->GetPixel(index))); } -/** Get the radius required for interpolation. - * - * This defines the number of surrounding pixels required to interpolate at - * a given point. - */ -#if defined(ITKV4_COMPATIBILITY) - virtual SizeType - GetRadius() const - { - // if ITKv4 compatibility is enabled then set the radius to the - // largest by default. - const InputImageType * input = this->GetInputImage(); - if (!input) - { - itkExceptionMacro("Input image required!"); - } - return input->GetLargestPossibleRegion().GetSize(); - } -#else + /** Get the radius required for interpolation. + * + * This defines the number of surrounding pixels required to interpolate at + * a given point. + */ virtual SizeType GetRadius() const = 0; -#endif protected: InterpolateImageFunction() = default; diff --git a/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.hxx index 7c591da613e8..c3ecc9297488 100644 --- a/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkBoxMeanImageFilter.hxx @@ -64,32 +64,9 @@ BoxMeanImageFilter::DynamicThreadedGenerateData( accImage->SetRegions(accumRegion); accImage->Allocate(); -#if defined(ITKV4_COMPATIBILITY) - // Dummy reporter for compatibility - ProgressReporter progress(this, 1, 2 * accumRegion.GetNumberOfPixels()); -#endif - - BoxAccumulateFunction(inputImage, - accImage, - accumRegion, - accumRegion -#if defined(ITKV4_COMPATIBILITY) - , - progress); -#else - ); -#endif - BoxMeanCalculatorFunction(accImage.GetPointer(), - outputImage, - accumRegion, - outputRegionForThread, - this->GetRadius() -#if defined(ITKV4_COMPATIBILITY) - , - progress); -#else - ); -#endif + BoxAccumulateFunction(inputImage, accImage, accumRegion, accumRegion); + BoxMeanCalculatorFunction( + accImage.GetPointer(), outputImage, accumRegion, outputRegionForThread, this->GetRadius()); } } // end namespace itk #endif diff --git a/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.hxx index e01bf91fc5bb..134e1f11b5ed 100644 --- a/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkBoxSigmaImageFilter.hxx @@ -66,32 +66,9 @@ BoxSigmaImageFilter::DynamicThreadedGenerateData( accImage->SetRegions(accumRegion); accImage->Allocate(); -#if defined(ITKV4_COMPATIBILITY) - // Dummy reporter for compatibility - ProgressReporter progress(this, 1, 2 * accumRegion.GetNumberOfPixels()); -#endif - - BoxSquareAccumulateFunction(inputImage, - accImage, - accumRegion, - accumRegion -#if defined(ITKV4_COMPATIBILITY) - , - progress); -#else - ); -#endif - BoxSigmaCalculatorFunction(accImage, - outputImage, - accumRegion, - outputRegionForThread, - this->GetRadius() -#if defined(ITKV4_COMPATIBILITY) - , - progress); -#else - ); -#endif + BoxSquareAccumulateFunction(inputImage, accImage, accumRegion, accumRegion); + BoxSigmaCalculatorFunction( + accImage, outputImage, accumRegion, outputRegionForThread, this->GetRadius()); } } // end namespace itk #endif diff --git a/Modules/Filtering/Smoothing/include/itkBoxUtilities.h b/Modules/Filtering/Smoothing/include/itkBoxUtilities.h index 425c8c3a8479..08b7566a6351 100644 --- a/Modules/Filtering/Smoothing/include/itkBoxUtilities.h +++ b/Modules/Filtering/Smoothing/include/itkBoxUtilities.h @@ -99,13 +99,7 @@ void BoxAccumulateFunction(const TInputImage * inputImage, const TOutputImage * outputImage, typename TInputImage::RegionType inputRegion, - typename TOutputImage::RegionType outputRegion -#if defined(ITKV4_COMPATIBILITY) - , - ProgressReporter & progress) -#else -) -#endif + typename TOutputImage::RegionType outputRegion) { // type alias using InputImageType = TInputImage; @@ -162,9 +156,6 @@ BoxAccumulateFunction(const TInputImage * inputImage, sum += sIt.Get() * weights[k]; } noutIt.SetCenterPixel(sum + inIt.Get()); -#if defined(ITKV4_COMPATIBILITY) - progress.CompletedPixel(); -#endif } } @@ -207,13 +198,7 @@ BoxMeanCalculatorFunction(const TInputImage * accImage, TOutputImage * outputImage, typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion, - typename TInputImage::SizeType radius -#if defined(ITKV4_COMPATIBILITY) - , - ProgressReporter & progress) -#else -) -#endif + typename TInputImage::SizeType radius) { // type alias using InputImageType = TInputImage; @@ -313,9 +298,6 @@ BoxMeanCalculatorFunction(const TInputImage * accImage, ++(cornerItVec[k]); } oIt.Set(static_cast(sum / pixelscount)); -#if defined(ITKV4_COMPATIBILITY) - progress.CompletedPixel(); -#endif } } else @@ -378,9 +360,6 @@ BoxMeanCalculatorFunction(const TInputImage * accImage, } oIt.Set(static_cast(sum / (AccPixType)edgepixelscount)); -#if defined(ITKV4_COMPATIBILITY) - progress.CompletedPixel(); -#endif } } } @@ -392,13 +371,7 @@ BoxSigmaCalculatorFunction(const TInputImage * accImage, TOutputImage * outputImage, typename TInputImage::RegionType inputRegion, typename TOutputImage::RegionType outputRegion, - typename TInputImage::SizeType radius -#if defined(ITKV4_COMPATIBILITY) - , - ProgressReporter & progress) -#else -) -#endif + typename TInputImage::SizeType radius) { // type alias using InputImageType = TInputImage; @@ -502,9 +475,6 @@ BoxSigmaCalculatorFunction(const TInputImage * accImage, } oIt.Set(static_cast(std::sqrt((squareSum - sum * sum / pixelscount) / (pixelscount - 1)))); -#if defined(ITKV4_COMPATIBILITY) - progress.CompletedPixel(); -#endif } } else @@ -571,9 +541,6 @@ BoxSigmaCalculatorFunction(const TInputImage * accImage, oIt.Set( static_cast(std::sqrt((squareSum - sum * sum / edgepixelscount) / (edgepixelscount - 1)))); -#if defined(ITKV4_COMPATIBILITY) - progress.CompletedPixel(); -#endif } } } @@ -584,13 +551,7 @@ void BoxSquareAccumulateFunction(const TInputImage * inputImage, TOutputImage * outputImage, typename TInputImage::RegionType inputRegion, - typename TOutputImage::RegionType outputRegion -#if defined(ITKV4_COMPATIBILITY) - , - ProgressReporter & progress) -#else -) -#endif + typename TOutputImage::RegionType outputRegion) { // type alias using InputImageType = TInputImage; @@ -655,9 +616,6 @@ BoxSquareAccumulateFunction(const TInputImage * inputImage, o[0] = sum + i; o[1] = squareSum + i * i; noutIt.SetCenterPixel(o); -#if defined(ITKV4_COMPATIBILITY) - progress.CompletedPixel(); -#endif } } } // namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h index 887d562a40b5..d7f6e1a7ab8c 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.h @@ -118,11 +118,7 @@ class ITK_TEMPLATE_EXPORT OtsuMultipleThresholdsCalculator : public HistogramAlg SizeValueType m_NumberOfThresholds{ 1 }; OutputType m_Output{}; bool m_ValleyEmphasis{ false }; -#if defined(ITKV4_COMPATIBILITY) - bool m_ReturnBinMidpoint{ true }; -#else - bool m_ReturnBinMidpoint{ false }; -#endif + bool m_ReturnBinMidpoint{ false }; }; } // end of namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h index a065df157749..4bc4165bf290 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsImageFilter.h @@ -155,11 +155,7 @@ class ITK_TEMPLATE_EXPORT OtsuMultipleThresholdsImageFilter : public ImageToImag OutputPixelType m_LabelOffset{}; ThresholdVectorType m_Thresholds{}; bool m_ValleyEmphasis{ false }; -#if defined(ITKV4_COMPATIBILITY) - bool m_ReturnBinMidpoint{ true }; -#else - bool m_ReturnBinMidpoint{ false }; -#endif + bool m_ReturnBinMidpoint{ false }; }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h index 19aecbb7d505..d5cb94e66093 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h @@ -90,11 +90,7 @@ class ITK_TEMPLATE_EXPORT OtsuThresholdCalculator : public HistogramThresholdCal private: typename OtsuMultipleThresholdsCalculator::Pointer m_OtsuMultipleThresholdsCalculator{}; -#if defined(ITKV4_COMPATIBILITY) - bool m_ReturnBinMidpoint{ true }; -#else - bool m_ReturnBinMidpoint{ false }; -#endif + bool m_ReturnBinMidpoint{ false }; }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h b/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h index 793eb6925ce0..9e4d0494428a 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h +++ b/Modules/Filtering/Thresholding/include/itkOtsuThresholdImageFilter.h @@ -128,13 +128,8 @@ class ITK_TEMPLATE_EXPORT OtsuThresholdImageFilter } } - private: -#if defined(ITKV4_COMPATIBILITY) - bool m_ReturnBinMidpoint{ true }; -#else bool m_ReturnBinMidpoint{ false }; -#endif }; } // end namespace itk diff --git a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx index 79d97e084283..b935e6ea940e 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsCalculatorTest.cxx @@ -81,11 +81,7 @@ itkOtsuMultipleThresholdsCalculatorTest(int argc, char * argv[]) auto otsuThresholdCalculator = OtsuMultipleThresholdCalculatorType::New(); -#if defined(ITKV4_COMPATIBILITY) - ITK_TEST_EXPECT_TRUE(otsuThresholdCalculator->GetReturnBinMidpoint()); -#else ITK_TEST_EXPECT_TRUE(!otsuThresholdCalculator->GetReturnBinMidpoint()); -#endif otsuThresholdCalculator->SetInputHistogram(histogram); otsuThresholdCalculator->SetNumberOfThresholds(numberOfThresholds); diff --git a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx index 0e719cb3f1fa..6bbc2c559fb9 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuMultipleThresholdsImageFilterTest.cxx @@ -72,11 +72,7 @@ itkOtsuMultipleThresholdsImageFilterTest(int argc, char * argv[]) // Set up the filter parameters -#if defined(ITKV4_COMPATIBILITY) - ITK_TEST_EXPECT_TRUE(filter->GetReturnBinMidpoint()); -#else ITK_TEST_EXPECT_TRUE(!filter->GetReturnBinMidpoint()); -#endif filter->ReturnBinMidpointOff(); diff --git a/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorTest.cxx index 666d6cd5dda0..86a9e88065d8 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorTest.cxx @@ -90,12 +90,7 @@ itkOtsuThresholdCalculatorTest(int, char *[]) auto calculator = CalculatorType::New(); ITK_EXERCISE_BASIC_OBJECT_METHODS(calculator, OtsuThresholdCalculator, HistogramThresholdCalculator); - -#if defined(ITKV4_COMPATIBILITY) - bool returnBinMidpoint{ true }; -#else - bool returnBinMidpoint{ false }; -#endif + const bool returnBinMidpoint{ false }; ITK_TEST_SET_GET_BOOLEAN(calculator, ReturnBinMidpoint, returnBinMidpoint); calculator->SetInput(histGenerator->GetOutput()); diff --git a/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx index 8a791f9b38f4..e1dad12a6886 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuThresholdImageFilterTest.cxx @@ -62,13 +62,7 @@ itkOtsuThresholdImageFilterTest(int argc, char * argv[]) ITK_EXERCISE_BASIC_OBJECT_METHODS(filter, OtsuThresholdImageFilter, HistogramThresholdImageFilter); - -#if defined(ITKV4_COMPATIBILITY) - ITK_TEST_EXPECT_TRUE(filter->GetReturnBinMidpoint()); -#else ITK_TEST_EXPECT_TRUE(!filter->GetReturnBinMidpoint()); -#endif - auto numberOfHistogramBins = static_cast(std::stoi(argv[3])); filter->SetNumberOfHistogramBins(numberOfHistogramBins); diff --git a/Modules/Remote/Deprecated/NeuralNetworks.remote.cmake b/Modules/Remote/Deprecated/NeuralNetworks.remote.cmake deleted file mode 100644 index 84fe42f856da..000000000000 --- a/Modules/Remote/Deprecated/NeuralNetworks.remote.cmake +++ /dev/null @@ -1,64 +0,0 @@ -#-- # Grading Level Criteria Report -#-- EVALUATION DATE: 2020-03-01 -#-- EVALUATORS: [<>,<>] -#-- -#-- ## Compliance level 5 star (AKA ITK main modules, or remote modules that could become core modules) -#-- - [ ] Widespread community dependance -#-- - [ ] Above 90% code coverage -#-- - [ ] CI dashboards and testing monitored rigorously -#-- - [ ] All requirements of Levels 4,3,2,1 -#-- -#-- ## Compliance Level 4 star (Very high-quality code, perhaps small community dependance) -#-- - [ ] Meets all ITK code style standards -#-- - [ ] No external requirements beyond those needed by ITK proper -#-- - [ ] Builds and passes tests on all supported platforms within 1 month of each core tagged release -#-- - [ ] Active developer community dedicated to maintaining code-base -#-- - [ ] 75% code coverage demonstrated for testing suite -#-- - [ ] Continuous integration testing performed -#-- - [ ] All requirements of Levels 3,2,1 -#-- -#-- ## Compliance Level 3 star (Quality beta code) -#-- - [ ] API | executable interface is considered mostly stable and feature complete -#-- - [ ] Some tests exist and pass on at least some platform -#-- - [ ] All requirements of Levels 2,1 -#-- -#-- ## Compliance Level 2 star (Alpha code feature API development or niche community/execution environment dependance ) -#-- - [ ] Compiles for at least 1 niche set of execution envirionments, and perhaps others -#-- (may depend on specific external tools like a java environment, or specific external libraries to work ) -#-- - [ ] All requirements of Levels 1 -#-- -#-- ## Compliance Level 1 star (Pre-alpha features under development and code of unknown quality) -#-- - [ ] Code complies on at least 1 platform -#-- -#-- ## Compliance Level 0 star ( Code/Feature of known poor-quality or deprecated status ) -#-- - [X] Code reviewed and explicitly identified as not recommended for use -#-- -#-- ### Please document here any justification for the criteria above -# This outdated code is not recommended for use. It is not optimized or rigourously tested -# This module has not received updates or testing for many many years -# Core developers should *NOT* expend energy or resources keeping this codebase consistent with ITK - -if(NOT ITK_LEGACY_REMOVE - AND ITKV4_COMPATIBILITY - AND Module_ITKDeprecated) - - itk_fetch_module( - NeuralNetworks - "This deprecated remote module contains classes and support classes -for the calculation of artificial neural networks. - -This can be used, for instance, for image classification. - -This historical set of features is likely not appropriate for modern neural -network implementations due to performance issues." - MODULE_COMPLIANCE_LEVEL 0 - GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKNeuralNetworks.git - GIT_TAG c293e56699d6d102dcde567baf1cf5b704819c17 - ) - - if(NOT ITK_LEGACY_SILENT AND Module_NeuralNetworks) - message(WARNING "NeuralNetworks remote module is deprecated. - Development of this module has ended, and it will be removed - in future ITK versions.") - endif() -endif()