ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkGrayscaleMorphologicalOpeningImageFilter.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 itkGrayscaleMorphologicalOpeningImageFilter_h
19#define itkGrayscaleMorphologicalOpeningImageFilter_h
20
31#include "itkNeighborhood.h"
32
33namespace itk
34{
49
50template <typename TInputImage, typename TOutputImage, typename TKernel>
52 : public KernelImageFilter<TInputImage, TOutputImage, TKernel>
53{
54public:
55 ITK_DISALLOW_COPY_AND_MOVE(GrayscaleMorphologicalOpeningImageFilter);
56
62
64 itkNewMacro(Self);
65
67 itkOverrideGetNameOfClassMacro(GrayscaleMorphologicalOpeningImageFilter);
68
70 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
71
73 using InputImageType = TInputImage;
74 using OutputImageType = TOutputImage;
75 using RegionType = typename TInputImage::RegionType;
76 using SizeType = typename TInputImage::SizeType;
77 using IndexType = typename TInputImage::IndexType;
78 using PixelType = typename TInputImage::PixelType;
79 using OffsetType = typename TInputImage::OffsetType;
81
91
93 using KernelType = TKernel;
94 // using KernelSuperclass = typename KernelType::Superclass;
95 // using KernelSuperclass = Neighborhood< typename KernelType::PixelType, ImageDimension >;
96
98
99#if !defined(ITK_LEGACY_REMOVE)
101 using AlgorithmType = AlgorithmEnum;
102 // We need to expose the enum values at the class level
103 // for backwards compatibility
104 static constexpr AlgorithmType BASIC = AlgorithmEnum::BASIC;
105 static constexpr AlgorithmType HISTO = AlgorithmEnum::HISTO;
106 static constexpr AlgorithmType ANCHOR = AlgorithmEnum::ANCHOR;
107 static constexpr AlgorithmType VHGW = AlgorithmEnum::VHGW;
108#endif
109
111 void
112 SetKernel(const KernelType & kernel) override;
113
115 void
117 itkGetConstMacro(Algorithm, AlgorithmEnum);
119
122 void
123 Modified() const override;
124
127 itkSetMacro(SafeBorder, bool);
128 itkGetConstReferenceMacro(SafeBorder, bool);
129 itkBooleanMacro(SafeBorder);
131
132protected:
135 void
136 PrintSelf(std::ostream & os, Indent indent) const override;
137
138 void
139 GenerateData() override;
140
141private:
142 // the filters used internally
144
146
148
150
152
154
156
157 // and the name of the filter
158 AlgorithmEnum m_Algorithm{ AlgorithmEnum::HISTO };
159
160 bool m_SafeBorder{ true };
161}; // end of class
162} // end namespace itk
163
164#ifndef ITK_MANUAL_INSTANTIATION
165# include "itkGrayscaleMorphologicalOpeningImageFilter.hxx"
166#endif
167
168#endif
Algorithm or implementation used in the dilation/erosion operations.
Grayscale dilation of an image.
Grayscale erosion of an image.
Casts input pixels to output pixel type.
A class to support a variety of flat structuring elements, including versions created by decompositio...
void PrintSelf(std::ostream &os, Indent indent) const override
VanHerkGilWermanDilateImageFilter< TInputImage, FlatKernelType > VanHerkGilWermanDilateFilterType
MovingHistogramErodeImageFilter< TInputImage, TOutputImage, TKernel > HistogramErodeFilterType
void SetKernel(const KernelType &kernel) override
BasicDilateImageFilter< TInputImage, TOutputImage, TKernel > BasicDilateFilterType
KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass
VanHerkGilWermanErodeImageFilter< TInputImage, FlatKernelType > VanHerkGilWermanErodeFilterType
AnchorOpenImageFilter< TInputImage, FlatKernelType > AnchorFilterType
MovingHistogramDilateImageFilter< TInputImage, TOutputImage, TKernel > HistogramDilateFilterType
BasicErodeImageFilter< TInputImage, TInputImage, TKernel > BasicErodeFilterType
~GrayscaleMorphologicalOpeningImageFilter() override=default
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....