ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkWhiteTopHatImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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"
22 
23 namespace itk
24 {
37 template< typename TInputImage, typename TOutputImage, typename TKernel >
38 class ITK_TEMPLATE_EXPORT WhiteTopHatImageFilter:
39  public KernelImageFilter< TInputImage, TOutputImage, TKernel >
40 {
41 public:
42  ITK_DISALLOW_COPY_AND_ASSIGN(WhiteTopHatImageFilter);
43 
49 
51  using InputImageType = TInputImage;
52  using OutputImageType = TOutputImage;
53  using InputImagePointer = typename InputImageType::Pointer;
54  using InputImageConstPointer = typename InputImageType::ConstPointer;
56  using InputImagePixelType = typename InputImageType::PixelType;
57  using OutputImagePointer = typename OutputImageType::Pointer;
58  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
60  using OutputImagePixelType = typename OutputImageType::PixelType;
61 
63  using KernelType = TKernel;
64 
66  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
67  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
68 
70  itkNewMacro(Self);
71 
73  itkTypeMacro(WhiteTopHatImageFilter,
75 
78  itkSetMacro(SafeBorder, bool);
79  itkGetConstReferenceMacro(SafeBorder, bool);
80  itkBooleanMacro(SafeBorder);
82 
85  BASIC = 0,
86  HISTO = 1,
87  ANCHOR = 2,
88  VHGW = 3
89  };
90 
92  itkSetMacro(Algorithm, int);
93  itkGetConstMacro(Algorithm, int);
95 
96  itkSetMacro(ForceAlgorithm, bool);
97  itkGetConstReferenceMacro(ForceAlgorithm, bool);
98  itkBooleanMacro(ForceAlgorithm);
99 
100 protected:
102  ~WhiteTopHatImageFilter() override = default;
103  void PrintSelf(std::ostream & os, Indent indent) const override;
104 
105  void GenerateData() override;
106 
107 private:
109 
111 
113 }; // end of class
114 } // end namespace itk
115 
116 #ifndef ITK_MANUAL_INSTANTIATION
117 #include "itkWhiteTopHatImageFilter.hxx"
118 #endif
119 
120 #endif
typename OutputImageType::Pointer OutputImagePointer
typename OutputImageType::ConstPointer OutputImageConstPointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::Pointer InputImagePointer
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
A base class for all the filters working on an arbitrary shaped neighborhood.
White top hat extracts local maxima that are larger than the structuring element. ...
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename InputImageType::ConstPointer InputImageConstPointer