diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.h index 21021427f3b..3f0f301a556 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.h @@ -96,7 +96,7 @@ class ITK_TEMPLATE_EXPORT BinaryClosingByReconstructionImageFilter itkBooleanMacro(FullyConnected); /** @ITKEndGrouping */ protected: - BinaryClosingByReconstructionImageFilter(); + BinaryClosingByReconstructionImageFilter() = default; ~BinaryClosingByReconstructionImageFilter() override = default; void PrintSelf(std::ostream & os, Indent indent) const override; @@ -115,7 +115,7 @@ class ITK_TEMPLATE_EXPORT BinaryClosingByReconstructionImageFilter GenerateData() override; private: - InputPixelType m_ForegroundValue{}; + InputPixelType m_ForegroundValue{ NumericTraits::max() }; bool m_FullyConnected{}; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.hxx index 25adbb75b58..f19d9db8a27 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.hxx @@ -29,13 +29,6 @@ namespace itk { - -template -BinaryClosingByReconstructionImageFilter::BinaryClosingByReconstructionImageFilter() - : m_ForegroundValue(NumericTraits::max()) - -{} - template void BinaryClosingByReconstructionImageFilter::GenerateInputRequestedRegion() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.h index 259c4c9d5ac..0728ded3b31 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.h @@ -101,7 +101,7 @@ class ITK_TEMPLATE_EXPORT BinaryMorphologicalClosingImageFilter itkBooleanMacro(SafeBorder); /** @ITKEndGrouping */ protected: - BinaryMorphologicalClosingImageFilter(); + BinaryMorphologicalClosingImageFilter() = default; ~BinaryMorphologicalClosingImageFilter() override = default; void PrintSelf(std::ostream & os, Indent indent) const override; @@ -112,9 +112,9 @@ class ITK_TEMPLATE_EXPORT BinaryMorphologicalClosingImageFilter GenerateData() override; private: - InputPixelType m_ForegroundValue{}; + InputPixelType m_ForegroundValue{ NumericTraits::max() }; - bool m_SafeBorder{}; + bool m_SafeBorder{ true }; }; // end of class } // end namespace itk diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.hxx index ff83d6cd041..440f0344a19 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalClosingImageFilter.hxx @@ -37,12 +37,6 @@ namespace itk { -template -BinaryMorphologicalClosingImageFilter::BinaryMorphologicalClosingImageFilter() - : m_ForegroundValue(NumericTraits::max()) - , m_SafeBorder(true) -{} - template void BinaryMorphologicalClosingImageFilter::GenerateData() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.h index 124af9e90c2..3b557ed5be1 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.h @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT BinaryMorphologicalOpeningImageFilter itkGetConstMacro(BackgroundValue, PixelType); protected: - BinaryMorphologicalOpeningImageFilter(); + BinaryMorphologicalOpeningImageFilter() = default; ~BinaryMorphologicalOpeningImageFilter() override = default; void PrintSelf(std::ostream & os, Indent indent) const override; @@ -110,7 +110,7 @@ class ITK_TEMPLATE_EXPORT BinaryMorphologicalOpeningImageFilter GenerateData() override; private: - PixelType m_ForegroundValue{}; + PixelType m_ForegroundValue{ NumericTraits::max() }; PixelType m_BackgroundValue{}; }; // end of class diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.hxx index 304a1474991..a665926f1e9 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologicalOpeningImageFilter.hxx @@ -34,12 +34,6 @@ namespace itk { -template -BinaryMorphologicalOpeningImageFilter::BinaryMorphologicalOpeningImageFilter() - : m_ForegroundValue(NumericTraits::max()) - , m_BackgroundValue(PixelType{}) -{} - template void BinaryMorphologicalOpeningImageFilter::GenerateData() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.h index b77ea3f1da4..f3fc0c9e6c4 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.h @@ -226,10 +226,10 @@ class ITK_TEMPLATE_EXPORT BinaryMorphologyImageFilter : public KernelImageFilter private: /** Pixel value to dilate */ - InputPixelType m_ForegroundValue{}; + InputPixelType m_ForegroundValue{ NumericTraits::max() }; /** Pixel value for background */ - OutputPixelType m_BackgroundValue{}; + OutputPixelType m_BackgroundValue{ NumericTraits::NonpositiveMin() }; /** Difference sets definition */ NeighborIndexContainerContainer m_KernelDifferenceSets{}; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx index 1802c7d6aba..74c87f7e617 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx @@ -31,8 +31,6 @@ namespace itk { template BinaryMorphologyImageFilter::BinaryMorphologyImageFilter() - : m_ForegroundValue(NumericTraits::max()) - , m_BackgroundValue(NumericTraits::NonpositiveMin()) { // this->SetNumberOfWorkUnits(1); this->AnalyzeKernel(); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.h index a92bc0ddd63..87b742ed399 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.h @@ -101,7 +101,7 @@ class ITK_TEMPLATE_EXPORT BinaryOpeningByReconstructionImageFilter itkBooleanMacro(FullyConnected); /** @ITKEndGrouping */ protected: - BinaryOpeningByReconstructionImageFilter(); + BinaryOpeningByReconstructionImageFilter() = default; ~BinaryOpeningByReconstructionImageFilter() override = default; void PrintSelf(std::ostream & os, Indent indent) const override; @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT BinaryOpeningByReconstructionImageFilter GenerateData() override; private: - PixelType m_ForegroundValue{}; + PixelType m_ForegroundValue{ NumericTraits::max() }; PixelType m_BackgroundValue{}; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.hxx index 16c0cffcc1a..96e7d81691a 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryOpeningByReconstructionImageFilter.hxx @@ -25,13 +25,6 @@ namespace itk { - -template -BinaryOpeningByReconstructionImageFilter::BinaryOpeningByReconstructionImageFilter() - : m_ForegroundValue(NumericTraits::max()) - , m_BackgroundValue(PixelType{}) -{} - template void BinaryOpeningByReconstructionImageFilter::GenerateInputRequestedRegion() diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.h index 95e8577caa1..13045a009f2 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.h @@ -133,7 +133,7 @@ class ITK_TEMPLATE_EXPORT BinaryPruningImageFilter : public ImageToImageFilter BinaryPruningImageFilter::BinaryPruningImageFilter() - : m_Iteration(3) { this->SetNumberOfRequiredOutputs(1); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.hxx index 07efd4c40ab..05566d981a7 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkErodeObjectMorphologyImageFilter.hxx @@ -23,7 +23,6 @@ namespace itk { template ErodeObjectMorphologyImageFilter::ErodeObjectMorphologyImageFilter() - : m_BackgroundValue(PixelType{}) { m_ErodeBoundaryCondition.SetConstant(NumericTraits::max()); this->OverrideBoundaryCondition(&m_ErodeBoundaryCondition); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.h b/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.h index e9c5f6a1441..72cf89d6384 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.h +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.h @@ -215,7 +215,7 @@ class ITK_TEMPLATE_EXPORT ObjectMorphologyImageFilter : public ImageToImageFilte KernelType m_Kernel{}; /** Pixel value that indicates the object be operated upon */ - PixelType m_ObjectValue{}; + PixelType m_ObjectValue{ NumericTraits::OneValue() }; void BeforeThreadedGenerateData() override; diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx index f0e4ab40d72..e68b2a744aa 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx @@ -31,8 +31,6 @@ namespace itk { template ObjectMorphologyImageFilter::ObjectMorphologyImageFilter() - : m_Kernel() - , m_ObjectValue(NumericTraits::OneValue()) { m_DefaultBoundaryCondition.SetConstant(PixelType{}); m_BoundaryCondition = &m_DefaultBoundaryCondition;