ITK  4.13.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:
51 
53  typedef TInputImage InputImageType;
54  typedef TOutputImage OutputImageType;
55  typedef typename InputImageType::Pointer InputImagePointer;
56  typedef typename InputImageType::ConstPointer InputImageConstPointer;
57  typedef typename InputImageType::RegionType InputImageRegionType;
58  typedef typename InputImageType::PixelType InputImagePixelType;
59  typedef typename OutputImageType::Pointer OutputImagePointer;
60  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
61  typedef typename OutputImageType::RegionType OutputImageRegionType;
62  typedef typename OutputImageType::PixelType OutputImagePixelType;
63 
65  typedef TKernel KernelType;
66 
68  itkStaticConstMacro(InputImageDimension, unsigned int,
69  TInputImage::ImageDimension);
70  itkStaticConstMacro(OutputImageDimension, unsigned int,
71  TOutputImage::ImageDimension);
73 
75  itkNewMacro(Self);
76 
78  itkTypeMacro(BlackTopHatImageFilter,
80 
83  itkSetMacro(SafeBorder, bool);
84  itkGetConstReferenceMacro(SafeBorder, bool);
85  itkBooleanMacro(SafeBorder);
87 
90  BASIC = 0,
91  HISTO = 1,
92  ANCHOR = 2,
93  VHGW = 3
94  };
95 
97  itkSetMacro(Algorithm, int);
98  itkGetConstMacro(Algorithm, int);
100 
101  itkSetMacro(ForceAlgorithm, bool);
102  itkGetConstReferenceMacro(ForceAlgorithm, bool);
103  itkBooleanMacro(ForceAlgorithm);
104 
105 protected:
107  ~BlackTopHatImageFilter() ITK_OVERRIDE {}
108  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
109 
110  void GenerateData() ITK_OVERRIDE;
111 
112 private:
113  ITK_DISALLOW_COPY_AND_ASSIGN(BlackTopHatImageFilter);
114 
115  bool m_SafeBorder;
116 
117  int m_Algorithm;
118 
119  bool m_ForceAlgorithm;
120 }; // end of class
121 } // end namespace itk
122 
123 #ifndef ITK_MANUAL_INSTANTIATION
124 #include "itkBlackTopHatImageFilter.hxx"
125 #endif
126 
127 #endif
OutputImageType::RegionType OutputImageRegionType
OutputImageType::PixelType OutputImagePixelType
InputImageType::RegionType InputImageRegionType
OutputImageType::Pointer OutputImagePointer
SmartPointer< const Self > ConstPointer
Base class for all process objects that output image data.
KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass
Black top hat extracts local minima that are smaller than the structuring element.
OutputImageType::ConstPointer OutputImageConstPointer
InputImageType::ConstPointer InputImageConstPointer
A base class for all the filters working on an arbitrary shaped neighborhood.
InputImageType::PixelType InputImagePixelType
InputImageType::Pointer InputImagePointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49