ITK  4.3.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< class TInputImage, class TOutputImage, class TKernel >
42 class ITK_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 
89  enum {
90  BASIC = 0,
91  HISTO = 1,
92  ANCHOR = 2,
93  VHGW = 3
94  } AlgorithmChoice;
95 
97  itkSetMacro(Algorithm, int);
98  itkGetConstMacro(Algorithm, int);
100 
101  itkSetMacro(ForceAlgorithm, bool);
102  itkGetConstReferenceMacro(ForceAlgorithm, bool);
103  itkBooleanMacro(ForceAlgorithm);
104 
105 protected:
108  void PrintSelf(std::ostream & os, Indent indent) const;
109 
110  void GenerateData();
111 
112 private:
113  BlackTopHatImageFilter(const Self &); //purposely not implemented
114  void operator=(const Self &); //purposely not implemented
115 
117 
119 
121 }; // end of class
122 } // end namespace itk
123 
124 #ifndef ITK_MANUAL_INSTANTIATION
125 #include "itkBlackTopHatImageFilter.hxx"
126 #endif
127 
128 #endif
129