ITK  5.2.0
Insight Toolkit
itkBasicErodeImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkBasicErodeImageFilter_h
19 #define itkBasicErodeImageFilter_h
20 
22 
23 namespace itk
24 {
45 template <typename TInputImage, typename TOutputImage, typename TKernel>
46 class ITK_TEMPLATE_EXPORT BasicErodeImageFilter : public MorphologyImageFilter<TInputImage, TOutputImage, TKernel>
47 {
48 public:
49  ITK_DISALLOW_COPY_AND_MOVE(BasicErodeImageFilter);
50 
56 
58  itkNewMacro(Self);
59 
62 
64  using PixelType = typename Superclass::PixelType;
65 
67  using KernelIteratorType = typename Superclass::KernelIteratorType;
68 
70  using NeighborhoodIteratorType = typename Superclass::NeighborhoodIteratorType;
71 
73  using KernelType = typename Superclass::KernelType;
74 
76  using DefaultBoundaryConditionType = typename Superclass::DefaultBoundaryConditionType;
77 
79  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
80  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
81  static constexpr unsigned int KernelDimension = TKernel::NeighborhoodDimension;
82 
84  using KernelPixelType = typename TKernel::PixelType;
85 
86 #ifdef ITK_USE_CONCEPT_CHECKING
87  // Begin concept checking
91  itkConceptMacro(InputLessThanComparableCheck, (Concept::LessThanComparable<PixelType>));
92  itkConceptMacro(KernelGreaterThanComparableCheck, (Concept::GreaterThanComparable<KernelPixelType>));
93  // End concept checking
94 #endif
95 
96 protected:
98  ~BasicErodeImageFilter() override = default;
99 
106  PixelType
107  Evaluate(const NeighborhoodIteratorType & nit,
108  const KernelIteratorType kernelBegin,
109  const KernelIteratorType kernelEnd) override;
110 
111 private:
112  // Default boundary condition for erosion filter, defaults to
113  // NumericTraits<PixelType>::max()
115 }; // end of class
116 } // end namespace itk
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
119 # include "itkBasicErodeImageFilter.hxx"
120 #endif
121 
122 #endif
itk::Concept::GreaterThanComparable
Definition: itkConceptChecking.h:284
itk::BasicErodeImageFilter::m_ErodeBoundaryCondition
DefaultBoundaryConditionType m_ErodeBoundaryCondition
Definition: itkBasicErodeImageFilter.h:114
itk::BasicErodeImageFilter
Grayscale erosion of an image.
Definition: itkBasicErodeImageFilter.h:46
itk::SmartPointer< Self >
itk::Concept::SameDimension
Definition: itkConceptChecking.h:694
itk::BasicErodeImageFilter::KernelPixelType
typename TKernel::PixelType KernelPixelType
Definition: itkBasicErodeImageFilter.h:84
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::BasicErodeImageFilter::NeighborhoodIteratorType
typename Superclass::NeighborhoodIteratorType NeighborhoodIteratorType
Definition: itkBasicErodeImageFilter.h:70
itk::MorphologyImageFilter
Base class for the morphological operations such as erosion and dilation.
Definition: itkMorphologyImageFilter.h:72
itk::BasicErodeImageFilter::KernelIteratorType
typename Superclass::KernelIteratorType KernelIteratorType
Definition: itkBasicErodeImageFilter.h:67
itk::BasicErodeImageFilter::PixelType
typename Superclass::PixelType PixelType
Definition: itkBasicErodeImageFilter.h:64
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkMorphologyImageFilter.h
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::Concept::Convertible
Definition: itkConceptChecking.h:216
itk::KernelImageFilter::KernelType
TKernel KernelType
Definition: itkKernelImageFilter.h:71
itk::BasicErodeImageFilter::DefaultBoundaryConditionType
typename Superclass::DefaultBoundaryConditionType DefaultBoundaryConditionType
Definition: itkBasicErodeImageFilter.h:76
itk::Concept::LessThanComparable
Definition: itkConceptChecking.h:262