00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkOptBlackTopHatImageFilter_h
00018 #define __itkOptBlackTopHatImageFilter_h
00019
00020 #include "itkKernelImageFilter.h"
00021
00022 namespace itk {
00023
00039 template<class TInputImage, class TOutputImage, class TKernel>
00040 class ITK_EXPORT BlackTopHatImageFilter :
00041 public KernelImageFilter<TInputImage, TOutputImage, TKernel>
00042 {
00043 public:
00045 typedef BlackTopHatImageFilter Self;
00046 typedef KernelImageFilter<TInputImage, TOutputImage, TKernel> Superclass;
00047 typedef SmartPointer<Self> Pointer;
00048 typedef SmartPointer<const Self> ConstPointer;
00049
00051 typedef TInputImage InputImageType;
00052 typedef TOutputImage OutputImageType;
00053 typedef typename InputImageType::Pointer InputImagePointer;
00054 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00055 typedef typename InputImageType::RegionType InputImageRegionType;
00056 typedef typename InputImageType::PixelType InputImagePixelType;
00057 typedef typename OutputImageType::Pointer OutputImagePointer;
00058 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00059 typedef typename OutputImageType::RegionType OutputImageRegionType;
00060 typedef typename OutputImageType::PixelType OutputImagePixelType;
00061
00063 typedef TKernel KernelType;
00064
00066 itkStaticConstMacro(InputImageDimension, unsigned int,
00067 TInputImage::ImageDimension);
00068 itkStaticConstMacro(OutputImageDimension, unsigned int,
00069 TOutputImage::ImageDimension);
00071
00073 itkNewMacro(Self);
00074
00076 itkTypeMacro(BlackTopHatImageFilter,
00077 KernelImageFilter);
00078
00081 itkSetMacro(SafeBorder, bool);
00082 itkGetConstReferenceMacro(SafeBorder, bool);
00083 itkBooleanMacro(SafeBorder);
00085
00087 enum {
00088 BASIC = 0,
00089 HISTO = 1,
00090 ANCHOR = 2,
00091 VHGW = 3
00092 } AlgorithmChoice;
00093
00095 itkSetMacro(Algorithm, int);
00096 itkGetConstMacro(Algorithm, int);
00098
00099 itkSetMacro(ForceAlgorithm, bool);
00100 itkGetConstReferenceMacro(ForceAlgorithm, bool);
00101 itkBooleanMacro(ForceAlgorithm);
00102
00103 protected:
00104 BlackTopHatImageFilter();
00105 ~BlackTopHatImageFilter() {};
00106 void PrintSelf(std::ostream& os, Indent indent) const;
00107
00108 void GenerateData();
00109
00110
00111 private:
00112 BlackTopHatImageFilter(const Self&);
00113 void operator=(const Self&);
00114
00115 bool m_SafeBorder;
00116
00117 int m_Algorithm;
00118
00119 bool m_ForceAlgorithm;
00120
00121 };
00122
00123 }
00124
00125 #ifndef ITK_MANUAL_INSTANTIATION
00126 #include "itkOptBlackTopHatImageFilter.txx"
00127 #endif
00128
00129 #endif
00130