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