ITK  4.4.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< class TInputImage, class TOutputImage, class TKernel >
38 class ITK_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 
85  enum {
86  BASIC = 0,
87  HISTO = 1,
88  ANCHOR = 2,
89  VHGW = 3
90  } AlgorithmChoice;
91 
93  itkSetMacro(Algorithm, int);
94  itkGetConstMacro(Algorithm, int);
96 
97  itkSetMacro(ForceAlgorithm, bool);
98  itkGetConstReferenceMacro(ForceAlgorithm, bool);
99  itkBooleanMacro(ForceAlgorithm);
100 
101 protected:
104  void PrintSelf(std::ostream & os, Indent indent) const;
105 
106  void GenerateData();
107 
108 private:
109  WhiteTopHatImageFilter(const Self &); //purposely not implemented
110  void operator=(const Self &); //purposely not implemented
111 
113 
115 
117 }; // end of class
118 } // end namespace itk
119 
120 #ifndef ITK_MANUAL_INSTANTIATION
121 #include "itkWhiteTopHatImageFilter.hxx"
122 #endif
123 
124 #endif
125