ITK  5.2.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  * http://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 
21 #include "itkKernelImageFilter.h"
23 
24 
25 namespace itk
26 {
27 
40 template <typename TInputImage, typename TOutputImage, typename TKernel>
41 class ITK_TEMPLATE_EXPORT WhiteTopHatImageFilter : public KernelImageFilter<TInputImage, TOutputImage, TKernel>
42 {
43 public:
44  ITK_DISALLOW_COPY_AND_MOVE(WhiteTopHatImageFilter);
45 
51 
53  using InputImageType = TInputImage;
54  using OutputImageType = TOutputImage;
55  using InputImagePointer = typename InputImageType::Pointer;
56  using InputImageConstPointer = typename InputImageType::ConstPointer;
58  using InputImagePixelType = typename InputImageType::PixelType;
59  using OutputImagePointer = typename OutputImageType::Pointer;
60  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
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)
74 
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 
89 
92  itkSetMacro(SafeBorder, bool);
93  itkGetConstReferenceMacro(SafeBorder, bool);
94  itkBooleanMacro(SafeBorder);
96 
98  itkSetMacro(Algorithm, AlgorithmEnum);
99  itkGetConstMacro(Algorithm, AlgorithmEnum);
101 
102  itkSetMacro(ForceAlgorithm, bool);
103  itkGetConstReferenceMacro(ForceAlgorithm, bool);
104  itkBooleanMacro(ForceAlgorithm);
105 
106 protected:
108  ~WhiteTopHatImageFilter() override = default;
109  void
110  PrintSelf(std::ostream & os, Indent indent) const override;
111 
112  void
113  GenerateData() override;
114 
115 private:
117 
119 
121 }; // end of class
122 } // end namespace itk
123 
124 #ifndef ITK_MANUAL_INSTANTIATION
125 # include "itkWhiteTopHatImageFilter.hxx"
126 #endif
127 
128 #endif
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
AlgorithmType
Algorithm or implementation used in the dilation/erosion operations.
itk::WhiteTopHatImageFilter::m_ForceAlgorithm
bool m_ForceAlgorithm
Definition: itkWhiteTopHatImageFilter.h:120
itk::WhiteTopHatImageFilter
White top hat extracts local maxima that are larger than the structuring element.
Definition: itkWhiteTopHatImageFilter.h:41
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ImageToImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkImageToImageFilter.h:133
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itkKernelImageFilter.h
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itkMathematicalMorphologyEnums.h
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::MathematicalMorphologyEnums::Algorithm
Algorithm
Definition: itkMathematicalMorphologyEnums.h:41
itk::WhiteTopHatImageFilter::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkWhiteTopHatImageFilter.h:60
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::WhiteTopHatImageFilter::m_SafeBorder
bool m_SafeBorder
Definition: itkWhiteTopHatImageFilter.h:116
itk::KernelImageFilter::KernelType
TKernel KernelType
Definition: itkKernelImageFilter.h:71
itk::KernelImageFilter
A base class for all the filters working on an arbitrary shaped neighborhood.
Definition: itkKernelImageFilter.h:41
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::WhiteTopHatImageFilter::m_Algorithm
AlgorithmEnum m_Algorithm
Definition: itkWhiteTopHatImageFilter.h:118
itk::ImageToImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkImageToImageFilter.h:131
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90