ITK  6.0.0
Insight Toolkit
itkBinaryErodeImageFilter.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  * https://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 {
71 template <typename TInputImage, typename TOutputImage, typename TKernel>
72 class ITK_TEMPLATE_EXPORT BinaryErodeImageFilter
73  : public BinaryMorphologyImageFilter<TInputImage, TOutputImage, TKernel>
74 {
75 public:
76  ITK_DISALLOW_COPY_AND_MOVE(BinaryErodeImageFilter);
77 
79  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
80  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
81 
83  static constexpr unsigned int KernelDimension = TKernel::NeighborhoodDimension;
84 
86  using InputImageType = TInputImage;
87  using OutputImageType = TOutputImage;
88  using KernelType = TKernel;
89 
93 
96 
98  itkNewMacro(Self);
99 
101  itkOverrideGetNameOfClassMacro(BinaryErodeImageFilter);
102 
104  using KernelIteratorType = typename KernelType::ConstIterator;
105 
107  using InputPixelType = typename InputImageType::PixelType;
108  using OutputPixelType = typename OutputImageType::PixelType;
110  using OffsetType = typename InputImageType::OffsetType;
112 
116 
120  void
122  {
123  this->SetForegroundValue(value);
124  }
125 
129  InputPixelType
131  {
132  return this->GetForegroundValue();
133  }
134 
135 protected:
137  ~BinaryErodeImageFilter() override = default;
138  void
139  PrintSelf(std::ostream & os, Indent indent) const override;
140 
141  void
142  GenerateData() override;
143 
144  // type inherited from the superclass
145  using typename Superclass::NeighborIndexContainer;
146 };
147 } // end namespace itk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
150 # include "itkBinaryErodeImageFilter.hxx"
151 #endif
152 
153 #endif
itkConstNeighborhoodIterator.h
itk::BoxImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkBoxImageFilter.h:67
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::BinaryErodeImageFilter
Fast binary erosion of a single intensity value in the image.
Definition: itkBinaryErodeImageFilter.h:72
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::BoxImageFilter::OffsetType
typename TInputImage::OffsetType OffsetType
Definition: itkBoxImageFilter.h:62
itk::BinaryErodeImageFilter::KernelIteratorType
typename KernelType::ConstIterator KernelIteratorType
Definition: itkBinaryErodeImageFilter.h:104
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::BoxImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkBoxImageFilter.h:64
itk::BoxImageFilter::IndexType
typename TInputImage::IndexType IndexType
Definition: itkBoxImageFilter.h:61
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::BinaryErodeImageFilter::GetErodeValue
InputPixelType GetErodeValue() const
Definition: itkBinaryErodeImageFilter.h:130
itk::BinaryErodeImageFilter::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkBinaryErodeImageFilter.h:115
itk::BinaryErodeImageFilter::SetErodeValue
void SetErodeValue(const InputPixelType &value)
Definition: itkBinaryErodeImageFilter.h:121
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:60
itkBinaryMorphologyImageFilter.h
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::BinaryErodeImageFilter::InputRealType
typename NumericTraits< InputPixelType >::RealType InputRealType
Definition: itkBinaryErodeImageFilter.h:109
itk::KernelImageFilter::KernelType
TKernel KernelType
Definition: itkKernelImageFilter.h:71
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::BinaryMorphologyImageFilter
Base class for fast binary dilation and erosion.
Definition: itkBinaryMorphologyImageFilter.h:103
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90