ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBlackTopHatImageFilter.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 itkBlackTopHatImageFilter_h
19 #define itkBlackTopHatImageFilter_h
20 
21 #include "itkKernelImageFilter.h"
22 
23 namespace itk
24 {
41 template< typename TInputImage, typename TOutputImage, typename TKernel >
42 class ITK_TEMPLATE_EXPORT BlackTopHatImageFilter:
43  public KernelImageFilter< TInputImage, TOutputImage, TKernel >
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_ASSIGN(BlackTopHatImageFilter);
47 
53 
55  using InputImageType = TInputImage;
56  using OutputImageType = TOutputImage;
57  using InputImagePointer = typename InputImageType::Pointer;
58  using InputImageConstPointer = typename InputImageType::ConstPointer;
60  using InputImagePixelType = typename InputImageType::PixelType;
61  using OutputImagePointer = typename OutputImageType::Pointer;
62  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
64  using OutputImagePixelType = typename OutputImageType::PixelType;
65 
67  using KernelType = TKernel;
68 
70  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
71  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
72 
74  itkNewMacro(Self);
75 
77  itkTypeMacro(BlackTopHatImageFilter,
79 
82  itkSetMacro(SafeBorder, bool);
83  itkGetConstReferenceMacro(SafeBorder, bool);
84  itkBooleanMacro(SafeBorder);
86 
89  BASIC = 0,
90  HISTO = 1,
91  ANCHOR = 2,
92  VHGW = 3
93  };
94 
96  itkSetMacro(Algorithm, int);
97  itkGetConstMacro(Algorithm, int);
99 
100  itkSetMacro(ForceAlgorithm, bool);
101  itkGetConstReferenceMacro(ForceAlgorithm, bool);
102  itkBooleanMacro(ForceAlgorithm);
103 
104 protected:
106  ~BlackTopHatImageFilter() override = default;
107  void PrintSelf(std::ostream & os, Indent indent) const override;
108 
109  void GenerateData() override;
110 
111 private:
113 
115 
117 }; // end of class
118 } // end namespace itk
119 
120 #ifndef ITK_MANUAL_INSTANTIATION
121 #include "itkBlackTopHatImageFilter.hxx"
122 #endif
123 
124 #endif
typename OutputImageType::Pointer OutputImagePointer
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.
Black top hat extracts local minima that are smaller than the structuring element.
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.
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename InputImageType::ConstPointer InputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer