ITK  6.0.0
Insight Toolkit
itkWhiteTopHatImageFilter.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 itkWhiteTopHatImageFilter_h
19#define itkWhiteTopHatImageFilter_h
20
23
24
25namespace itk
26{
27
40template <typename TInputImage, typename TOutputImage, typename TKernel>
41class ITK_TEMPLATE_EXPORT WhiteTopHatImageFilter : public KernelImageFilter<TInputImage, TOutputImage, TKernel>
42{
43public:
44 ITK_DISALLOW_COPY_AND_MOVE(WhiteTopHatImageFilter);
45
51
53 using InputImageType = TInputImage;
54 using OutputImageType = TOutputImage;
58 using InputImagePixelType = typename InputImageType::PixelType;
62 using OutputImagePixelType = typename OutputImageType::PixelType;
63
65 using KernelType = TKernel;
66
68 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
69 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
70
72
73#if !defined(ITK_LEGACY_REMOVE)
75 using AlgorithmType = AlgorithmEnum;
76 // We need to expose the enum values at the class level
77 // for backwards compatibility
78 static constexpr AlgorithmType BASIC = AlgorithmEnum::BASIC;
79 static constexpr AlgorithmType HISTO = AlgorithmEnum::HISTO;
80 static constexpr AlgorithmType ANCHOR = AlgorithmEnum::ANCHOR;
81 static constexpr AlgorithmType VHGW = AlgorithmEnum::VHGW;
82#endif
83
85 itkNewMacro(Self);
86
88 itkOverrideGetNameOfClassMacro(WhiteTopHatImageFilter);
89
92 itkSetMacro(SafeBorder, bool);
93 itkGetConstReferenceMacro(SafeBorder, bool);
94 itkBooleanMacro(SafeBorder);
98 itkSetMacro(Algorithm, AlgorithmEnum);
99 itkGetConstMacro(Algorithm, AlgorithmEnum);
102 itkSetMacro(ForceAlgorithm, bool);
103 itkGetConstReferenceMacro(ForceAlgorithm, bool);
104 itkBooleanMacro(ForceAlgorithm);
105
106protected:
108 ~WhiteTopHatImageFilter() override = default;
109 void
110 PrintSelf(std::ostream & os, Indent indent) const override;
111
112 void
113 GenerateData() override;
114
115private:
116 bool m_SafeBorder{};
117
118 AlgorithmEnum m_Algorithm{};
119
120 bool m_ForceAlgorithm{};
121}; // end of class
122} // end namespace itk
123
124#ifndef ITK_MANUAL_INSTANTIATION
125# include "itkWhiteTopHatImageFilter.hxx"
126#endif
127
128#endif
Algorithm or implementation used in the dilation/erosion operations.
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
typename InputImageType::ConstPointer InputImageConstPointer
typename InputImageType::Pointer InputImagePointer
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
A base class for all the filters working on an arbitrary shaped neighborhood.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
White top hat extracts local maxima that are larger than the structuring element.
void GenerateData() override
~WhiteTopHatImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputImageType::ConstPointer OutputImageConstPointer
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....