00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkBlackTopHatImageFilter_h
00018 #define __itkBlackTopHatImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021
00022 namespace itk {
00023
00035 template<class TInputImage, class TOutputImage, class TKernel>
00036 class ITK_EXPORT BlackTopHatImageFilter :
00037 public ImageToImageFilter<TInputImage, TOutputImage>
00038 {
00039 public:
00041 typedef BlackTopHatImageFilter Self;
00042 typedef ImageToImageFilter<TInputImage, TOutputImage>
00043 Superclass;
00044 typedef SmartPointer<Self> Pointer;
00045 typedef SmartPointer<const Self> ConstPointer;
00046
00048 typedef TInputImage InputImageType;
00049 typedef TOutputImage OutputImageType;
00050 typedef typename InputImageType::Pointer InputImagePointer;
00051 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00052 typedef typename InputImageType::RegionType InputImageRegionType;
00053 typedef typename InputImageType::PixelType InputImagePixelType;
00054 typedef typename OutputImageType::Pointer OutputImagePointer;
00055 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00056 typedef typename OutputImageType::RegionType OutputImageRegionType;
00057 typedef typename OutputImageType::PixelType OutputImagePixelType;
00058
00060 typedef TKernel KernelType;
00061
00063 itkStaticConstMacro(InputImageDimension, unsigned int,
00064 TInputImage::ImageDimension);
00065 itkStaticConstMacro(OutputImageDimension, unsigned int,
00066 TOutputImage::ImageDimension);
00068
00070 itkNewMacro(Self);
00071
00073 itkTypeMacro(BlackTopHatImageFilter,
00074 ImageToImageFilter);
00075
00077 itkSetMacro(Kernel, KernelType);
00078
00080 itkGetConstReferenceMacro(Kernel, KernelType);
00081
00082 protected:
00083 BlackTopHatImageFilter();
00084 ~BlackTopHatImageFilter() {};
00085 void PrintSelf(std::ostream& os, Indent indent) const;
00086
00090 void GenerateInputRequestedRegion() ;
00091
00093 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00094
00095 void GenerateData();
00096
00097
00098 private:
00099 BlackTopHatImageFilter(const Self&);
00100 void operator=(const Self&);
00101
00103 KernelType m_Kernel ;
00104 } ;
00105
00106 }
00107
00108 #ifndef ITK_MANUAL_INSTANTIATION
00109 #include "itkBlackTopHatImageFilter.txx"
00110 #endif
00111
00112 #endif
00113
00114
00115