ITK  5.1.0
Insight Toolkit
itkBlackTopHatImageFilter.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 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 : public KernelImageFilter<TInputImage, TOutputImage, TKernel>
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_ASSIGN(BlackTopHatImageFilter);
46 
52 
54  using InputImageType = TInputImage;
55  using OutputImageType = TOutputImage;
56  using InputImagePointer = typename InputImageType::Pointer;
57  using InputImageConstPointer = typename InputImageType::ConstPointer;
59  using InputImagePixelType = typename InputImageType::PixelType;
60  using OutputImagePointer = typename OutputImageType::Pointer;
61  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
63  using OutputImagePixelType = typename OutputImageType::PixelType;
64 
66  using KernelType = TKernel;
67 
69  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
70  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
71 
73  itkNewMacro(Self);
74 
77 
80  itkSetMacro(SafeBorder, bool);
81  itkGetConstReferenceMacro(SafeBorder, bool);
82  itkBooleanMacro(SafeBorder);
84 
87  {
88  BASIC = 0,
89  HISTO = 1,
90  ANCHOR = 2,
91  VHGW = 3
92  };
93 
95  itkSetMacro(Algorithm, int);
96  itkGetConstMacro(Algorithm, int);
98 
99  itkSetMacro(ForceAlgorithm, bool);
100  itkGetConstReferenceMacro(ForceAlgorithm, bool);
101  itkBooleanMacro(ForceAlgorithm);
102 
103 protected:
105  ~BlackTopHatImageFilter() override = default;
106  void
107  PrintSelf(std::ostream & os, Indent indent) const override;
108 
109  void
110  GenerateData() override;
111 
112 private:
114 
116 
118 }; // end of class
119 } // end namespace itk
120 
121 #ifndef ITK_MANUAL_INSTANTIATION
122 # include "itkBlackTopHatImageFilter.hxx"
123 #endif
124 
125 #endif
itk::BlackTopHatImageFilter::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkBlackTopHatImageFilter.h:61
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::BlackTopHatImageFilter
Black top hat extracts local minima that are smaller than the structuring element.
Definition: itkBlackTopHatImageFilter.h:42
itk::BlackTopHatImageFilter::m_SafeBorder
bool m_SafeBorder
Definition: itkBlackTopHatImageFilter.h:113
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::BlackTopHatImageFilter::m_Algorithm
int m_Algorithm
Definition: itkBlackTopHatImageFilter.h:115
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::BlackTopHatImageFilter::m_ForceAlgorithm
bool m_ForceAlgorithm
Definition: itkBlackTopHatImageFilter.h:117
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: itkArray.h:26
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::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::BlackTopHatImageFilter::AlgorithmType
AlgorithmType
Definition: itkBlackTopHatImageFilter.h:86
itk::ImageToImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkImageToImageFilter.h:131
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90