ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkGrayscaleErodeImageFilter.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 itkGrayscaleErodeImageFilter_h
19#define itkGrayscaleErodeImageFilter_h
20
27#include "itkCastImageFilter.h"
29#include "itkNeighborhood.h"
30
31namespace itk
32{
52
53template <typename TInputImage, typename TOutputImage, typename TKernel>
54class ITK_TEMPLATE_EXPORT GrayscaleErodeImageFilter : public KernelImageFilter<TInputImage, TOutputImage, TKernel>
55{
56public:
57 ITK_DISALLOW_COPY_AND_MOVE(GrayscaleErodeImageFilter);
58
64
66 itkNewMacro(Self);
67
69 itkOverrideGetNameOfClassMacro(GrayscaleErodeImageFilter);
70
72 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
73
75 using InputImageType = TInputImage;
76 using OutputImageType = TOutputImage;
77 using RegionType = typename TInputImage::RegionType;
78 using SizeType = typename TInputImage::SizeType;
79 using IndexType = typename TInputImage::IndexType;
80 using PixelType = typename TInputImage::PixelType;
81 using OffsetType = typename TInputImage::OffsetType;
83
86
88
92
97
99 using KernelType = TKernel;
100 // using KernelSuperclass = typename KernelType::Superclass;
101 // using KernelSuperclass = Neighborhood< typename KernelType::PixelType, ImageDimension >;
102
104
105#if !defined(ITK_LEGACY_REMOVE)
107 using AlgorithmType = AlgorithmEnum;
108 // We need to expose the enum values at the class level
109 // for backwards compatibility
110 static constexpr AlgorithmType BASIC = AlgorithmType::BASIC;
111 static constexpr AlgorithmType HISTO = AlgorithmType::HISTO;
112 static constexpr AlgorithmType ANCHOR = AlgorithmType::ANCHOR;
113 static constexpr AlgorithmType VHGW = AlgorithmType::VHGW;
114#endif
115
117 void
118 SetKernel(const KernelType & kernel) override;
119
121 void
122 SetBoundary(const PixelType value);
123
124 itkGetConstMacro(Boundary, PixelType);
125
127 void
129 itkGetConstMacro(Algorithm, AlgorithmEnum);
131
133 void
134 Modified() const override;
135
136 void
138
139protected:
141 ~GrayscaleErodeImageFilter() override = default;
142 void
143 PrintSelf(std::ostream & os, Indent indent) const override;
144
145 void
146 GenerateData() override;
147
148private:
150
151 // the filters used internally
153
155
157
159
160 // and the name of the filter
162
163 // the boundary condition need to be stored here
165}; // end of class
166} // end namespace itk
167
168#ifndef ITK_MANUAL_INSTANTIATION
169# include "itkGrayscaleErodeImageFilter.hxx"
170#endif
171
172#endif
Algorithm or implementation used in the dilation/erosion operations.
Grayscale erosion of an image.
Casts input pixels to output pixel type.
This boundary condition returns a constant value for out-of-bounds image pixels.
A class to support a variety of flat structuring elements, including versions created by decompositio...
static constexpr unsigned int ImageDimension
void SetKernel(const KernelType &kernel) override
const ImageBoundaryCondition< InputImageType > * ImageBoundaryConditionConstPointerType
typename TInputImage::IndexType IndexType
BasicErodeImageFilter< TInputImage, TOutputImage, TKernel > BasicFilterType
HistogramFilterType::Pointer m_HistogramFilter
ConstantBoundaryCondition< InputImageType > DefaultBoundaryConditionType
FlatStructuringElement< Self::ImageDimension > FlatKernelType
void SetNumberOfWorkUnits(ThreadIdType nb) override
~GrayscaleErodeImageFilter() override=default
DefaultBoundaryConditionType m_BoundaryCondition
typename TInputImage::PixelType PixelType
KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass
MathematicalMorphologyEnums::Algorithm AlgorithmEnum
void Modified() const override
CastImageFilter< TInputImage, TOutputImage > CastFilterType
VanHerkGilWermanErodeImageFilter< TInputImage, FlatKernelType > VHGWFilterType
typename TInputImage::SizeType SizeType
MovingHistogramErodeImageFilter< TInputImage, TOutputImage, TKernel > HistogramFilterType
typename TInputImage::RegionType RegionType
void PrintSelf(std::ostream &os, Indent indent) const override
void SetAlgorithm(AlgorithmEnum algo)
typename TInputImage::OffsetType OffsetType
void SetBoundary(const PixelType value)
AnchorErodeImageFilter< TInputImage, FlatKernelType > AnchorFilterType
ImageBoundaryCondition< InputImageType > * ImageBoundaryConditionPointerType
A virtual base object that defines an interface to a class of boundary condition objects for use by n...
typename OutputImageType::RegionType OutputImageRegionType
Control indentation during Print() invocation.
Definition itkIndent.h:50
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType