ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkErodeObjectMorphologyImageFilter.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 itkErodeObjectMorphologyImageFilter_h
19 #define itkErodeObjectMorphologyImageFilter_h
20 
22 
23 namespace itk
24 {
45 template< typename TInputImage, typename TOutputImage, typename TKernel >
46 class ITK_TEMPLATE_EXPORT ErodeObjectMorphologyImageFilter:
47  public ObjectMorphologyImageFilter< TInputImage, TOutputImage, TKernel >
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_ASSIGN(ErodeObjectMorphologyImageFilter);
51 
57 
59  itkNewMacro(Self);
60 
63 
65  using PixelType = typename Superclass::PixelType;
66 
68  using KernelType = TKernel;
69 
71  using KernelIteratorType = typename KernelType::ConstIterator;
72 
74 
76  using DefaultBoundaryConditionType = typename Superclass::DefaultBoundaryConditionType;
77 
80  void SetErodeValue(PixelType objectValue)
81  {
82  this->SetObjectValue(objectValue);
83  }
84 
88  {
89  return this->GetObjectValue();
90  }
91 
93  itkSetMacro(BackgroundValue, PixelType);
94 
96  itkGetConstMacro(BackgroundValue, PixelType);
97 
99  using KernelPixelType = typename TKernel::PixelType;
100 
101 #ifdef ITK_USE_CONCEPT_CHECKING
102  // Begin concept checking
103  itkConceptMacro( KernelGreaterThanComparableCheck,
105  // End concept checking
106 #endif
107 
108 protected:
110  ~ErodeObjectMorphologyImageFilter() override = default;
111  void PrintSelf(std::ostream & os, Indent indent) const override;
112 
117  void Evaluate(OutputNeighborhoodIteratorType & nit,
118  const KernelType & kernel) override;
119 
120 private:
122 
123  // Default boundary condition for erosion filter, defaults to
124  // NumericTraits<PixelType>::max()
126 }; // end of class
127 } // end namespace itk
128 
129 #ifndef ITK_MANUAL_INSTANTIATION
130 #include "itkErodeObjectMorphologyImageFilter.hxx"
131 #endif
132 
133 #endif
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename Superclass::DefaultBoundaryConditionType DefaultBoundaryConditionType
typename TInputImage::PixelType PixelType
typename KernelType::ConstIterator KernelIteratorType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
Base class for the morphological operations being applied to isolated objects in an image...
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.