ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkGrayscaleMorphologicalClosingImageFilter.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 itkGrayscaleMorphologicalClosingImageFilter_h
19#define itkGrayscaleMorphologicalClosingImageFilter_h
20
30#include "itkCastImageFilter.h"
32#include "itkNeighborhood.h"
33
34namespace itk
35{
50
51template <typename TInputImage, typename TOutputImage, typename TKernel>
53 : public KernelImageFilter<TInputImage, TOutputImage, TKernel>
54{
55public:
56 ITK_DISALLOW_COPY_AND_MOVE(GrayscaleMorphologicalClosingImageFilter);
57
63
65 itkNewMacro(Self);
66
68 itkOverrideGetNameOfClassMacro(GrayscaleMorphologicalClosingImageFilter);
69
71 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
72
74 using InputImageType = TInputImage;
75 using OutputImageType = TOutputImage;
76 using RegionType = typename TInputImage::RegionType;
77 using SizeType = typename TInputImage::SizeType;
78 using IndexType = typename TInputImage::IndexType;
79 using PixelType = typename TInputImage::PixelType;
80 using OffsetType = typename TInputImage::OffsetType;
82
92
94 using KernelType = TKernel;
95 // using KernelSuperclass = typename KernelType::Superclass;
96 // using KernelSuperclass = Neighborhood< typename KernelType::PixelType, ImageDimension >;
97
99
100#if !defined(ITK_LEGACY_REMOVE)
102 using AlgorithmType = AlgorithmEnum;
103 // We need to expose the enum values at the class level
104 // for backwards compatibility
105 static constexpr AlgorithmType BASIC = AlgorithmEnum::BASIC;
106 static constexpr AlgorithmType HISTO = AlgorithmEnum::HISTO;
107 static constexpr AlgorithmType ANCHOR = AlgorithmEnum::ANCHOR;
108 static constexpr AlgorithmType VHGW = AlgorithmEnum::VHGW;
109#endif
110
112 void
113 SetKernel(const KernelType & kernel) override;
114
116 void
118 itkGetConstMacro(Algorithm, AlgorithmEnum);
120
123 void
124 Modified() const override;
125
128 itkSetMacro(SafeBorder, bool);
129 itkGetConstReferenceMacro(SafeBorder, bool);
130 itkBooleanMacro(SafeBorder);
132
133protected:
136 void
137 PrintSelf(std::ostream & os, Indent indent) const override;
138
139 void
140 GenerateData() override;
141
142private:
143 // the filters used internally
145
147
149
151
153
155
157
158 // and the name of the filter
160
162}; // end of class
163} // end namespace itk
164
165#ifndef ITK_MANUAL_INSTANTIATION
166# include "itkGrayscaleMorphologicalClosingImageFilter.hxx"
167#endif
168
169#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...
BasicErodeImageFilter< TInputImage, TOutputImage, TKernel > BasicErodeFilterType
MovingHistogramErodeImageFilter< TInputImage, TOutputImage, TKernel > HistogramErodeFilterType
AnchorCloseImageFilter< TInputImage, FlatKernelType > AnchorFilterType
void SetKernel(const KernelType &kernel) override
void PrintSelf(std::ostream &os, Indent indent) const override
VanHerkGilWermanErodeImageFilter< TInputImage, FlatKernelType > VanHerkGilWermanErodeFilterType
~GrayscaleMorphologicalClosingImageFilter() override=default
MovingHistogramDilateImageFilter< TInputImage, TOutputImage, TKernel > HistogramDilateFilterType
VanHerkGilWermanDilateImageFilter< TInputImage, FlatKernelType > VanHerkGilWermanDilateFilterType
KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass
BasicDilateImageFilter< TInputImage, TInputImage, TKernel > BasicDilateFilterType
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....