ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBasicErodeImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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:
47  public MorphologyImageFilter< TInputImage, TOutputImage, TKernel >
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_ASSIGN(BasicErodeImageFilter);
51 
57 
59  itkNewMacro(Self);
60 
62  itkTypeMacro(BasicErodeImageFilter,
64 
66  using PixelType = typename Superclass::PixelType;
67 
69  using KernelIteratorType = typename Superclass::KernelIteratorType;
70 
72  using NeighborhoodIteratorType = typename Superclass::NeighborhoodIteratorType;
73 
75  using KernelType = typename Superclass::KernelType;
76 
78  using DefaultBoundaryConditionType = typename Superclass::DefaultBoundaryConditionType;
79 
81  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
82  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
83  static constexpr unsigned int KernelDimension = TKernel::NeighborhoodDimension;
84 
86  using KernelPixelType = typename TKernel::PixelType;
87 
88 #ifdef ITK_USE_CONCEPT_CHECKING
89  // Begin concept checking
90  itkConceptMacro( InputConvertibleToOutputCheck,
92  itkConceptMacro( SameDimensionCheck1,
94  itkConceptMacro( SameDimensionCheck2,
96  itkConceptMacro( InputLessThanComparableCheck,
98  itkConceptMacro( KernelGreaterThanComparableCheck,
100  // End concept checking
101 #endif
102 
103 protected:
105  ~BasicErodeImageFilter() override = default;
106 
113  PixelType Evaluate(const NeighborhoodIteratorType & nit,
114  const KernelIteratorType kernelBegin,
115  const KernelIteratorType kernelEnd) override;
116 
117 private:
118  // Default boundary condition for erosion filter, defaults to
119  // NumericTraits<PixelType>::max()
121 }; // end of class
122 } // end namespace itk
123 
124 #ifndef ITK_MANUAL_INSTANTIATION
125 #include "itkBasicErodeImageFilter.hxx"
126 #endif
127 
128 #endif
typename Superclass::KernelIteratorType KernelIteratorType
typename Superclass::PixelType PixelType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
typename Superclass::DefaultBoundaryConditionType DefaultBoundaryConditionType
Base class for all process objects that output image data.
Base class for the morphological operations such as erosion and dialation.
DefaultBoundaryConditionType m_ErodeBoundaryCondition
typename TKernel::PixelType KernelPixelType
gray scale erosion of an image
#define itkConceptMacro(name, concept)
typename Superclass::NeighborhoodIteratorType NeighborhoodIteratorType