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
26namespace itk
27{
71template <typename TInputImage, typename TOutputImage, typename TKernel>
72class ITK_TEMPLATE_EXPORT BinaryErodeImageFilter
73 : public BinaryMorphologyImageFilter<TInputImage, TOutputImage, TKernel>
74{
75public:
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
135protected:
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
Fast binary erosion of a single intensity value in the image.
~BinaryErodeImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
typename KernelType::ConstIterator KernelIteratorType
typename InputImageType::SizeType InputSizeType
typename NumericTraits< InputPixelType >::RealType InputRealType
void SetErodeValue(const InputPixelType &value)
void GenerateData() override
Base class for fast binary dilation and erosion.
typename TInputImage::PixelType InputPixelType
typename TInputImage::IndexType IndexType
typename TOutputImage::PixelType OutputPixelType
typename TInputImage::OffsetType OffsetType
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Define additional traits for native types such as int or float.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....