ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBinaryErodeImageFilter.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 itkBinaryErodeImageFilter_h
19 #define itkBinaryErodeImageFilter_h
20 
21 #include <vector>
22 #include <queue>
25 
26 namespace itk
27 {
66 template< typename TInputImage, typename TOutputImage, typename TKernel >
67 class ITK_TEMPLATE_EXPORT BinaryErodeImageFilter:
68  public BinaryMorphologyImageFilter< TInputImage, TOutputImage, TKernel >
69 {
70 public:
71  ITK_DISALLOW_COPY_AND_ASSIGN(BinaryErodeImageFilter);
72 
74  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
75  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
76 
78  static constexpr unsigned int KernelDimension = TKernel::NeighborhoodDimension;
79 
81  using InputImageType = TInputImage;
82  using OutputImageType = TOutputImage;
83  using KernelType = TKernel;
84 
89 
92 
94  itkNewMacro(Self);
95 
98 
100  using KernelIteratorType = typename KernelType::ConstIterator;
101 
103  using InputPixelType = typename InputImageType::PixelType;
104  using OutputPixelType = typename OutputImageType::PixelType;
106  using OffsetType = typename InputImageType::OffsetType;
108 
112 
116  void SetErodeValue(const InputPixelType & value)
117  { this->SetForegroundValue(value); }
118 
123  { return this->GetForegroundValue(); }
124 
125 protected:
127  ~BinaryErodeImageFilter() override = default;
128  void PrintSelf(std::ostream & os, Indent indent) const override;
129 
130  void GenerateData() override;
131 
132  // type inherited from the superclass
133  using NeighborIndexContainer = typename Superclass::NeighborIndexContainer;
134 };
135 } // end namespace itk
136 
137 #ifndef ITK_MANUAL_INSTANTIATION
138 #include "itkBinaryErodeImageFilter.hxx"
139 #endif
140 
141 #endif
Define numeric traits for std::vector.
typename TInputImage::IndexType IndexType
typename TOutputImage::PixelType OutputPixelType
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.
void SetErodeValue(const InputPixelType &value)
typename TInputImage::OffsetType OffsetType
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename TInputImage::PixelType InputPixelType
typename InputImageType::SizeType InputSizeType
typename InputImageType::RegionType InputImageRegionType
Base class for fast binary dilation and erosion.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename Superclass::NeighborIndexContainer NeighborIndexContainer
typename KernelType::ConstIterator KernelIteratorType
typename NumericTraits< InputPixelType >::RealType InputRealType
InputPixelType GetErodeValue() const