itkWhiteTopHatImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkWhiteTopHatImageFilter_h
00018 #define __itkWhiteTopHatImageFilter_h
00019
00020
00021
00022
00023 #include "itkConfigure.h"
00024
00025 #ifdef ITK_USE_CONSOLIDATED_MORPHOLOGY
00026 #include "itkOptWhiteTopHatImageFilter.h"
00027 #else
00028
00029
00030 #include "itkImageToImageFilter.h"
00031
00032 namespace itk {
00033
00045 template<class TInputImage, class TOutputImage, class TKernel>
00046 class ITK_EXPORT WhiteTopHatImageFilter :
00047 public ImageToImageFilter<TInputImage, TOutputImage>
00048 {
00049 public:
00051 typedef WhiteTopHatImageFilter Self;
00052 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00053 typedef SmartPointer<Self> Pointer;
00054 typedef SmartPointer<const Self> ConstPointer;
00055
00057 typedef TInputImage InputImageType;
00058 typedef typename InputImageType::Pointer InputImagePointer;
00059 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00060 typedef typename InputImageType::RegionType InputImageRegionType;
00061 typedef typename InputImageType::PixelType InputImagePixelType;
00062
00063 typedef TOutputImage OutputImageType;
00064 typedef typename OutputImageType::Pointer OutputImagePointer;
00065 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00066 typedef typename OutputImageType::RegionType OutputImageRegionType;
00067 typedef typename OutputImageType::PixelType OutputImagePixelType;
00068
00070 typedef TKernel KernelType;
00071
00073 itkStaticConstMacro(InputImageDimension, unsigned int,
00074 TInputImage::ImageDimension);
00075 itkStaticConstMacro(OutputImageDimension, unsigned int,
00076 TOutputImage::ImageDimension);
00078
00080 itkNewMacro(Self);
00081
00083 itkTypeMacro(WhiteTopHatImageFilter,
00084 ImageToImageFilter);
00085
00087 itkSetMacro(Kernel, KernelType);
00088
00090 itkGetConstReferenceMacro(Kernel, KernelType);
00091
00094 itkSetMacro(SafeBorder, bool);
00095 itkGetConstReferenceMacro(SafeBorder, bool);
00096 itkBooleanMacro(SafeBorder);
00098
00099 #ifdef ITK_USE_CONCEPT_CHECKING
00100
00101 itkConceptMacro(InputAdditiveOperatorsCheck,
00102 (Concept::AdditiveOperators<InputImagePixelType>));
00103 itkConceptMacro(InputConvertibleToOutputCheck,
00104 (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00105 itkConceptMacro(InputGreaterThanComparableCheck,
00106 (Concept::GreaterThanComparable<InputImagePixelType>));
00107 itkConceptMacro(KernelGreaterThanIntCheck,
00108 (Concept::GreaterThanComparable<typename TKernel::PixelType, int>));
00109
00111 #endif
00112
00113 protected:
00114 WhiteTopHatImageFilter();
00115 ~WhiteTopHatImageFilter() {};
00116 void PrintSelf(std::ostream& os, Indent indent) const;
00117
00121 void GenerateInputRequestedRegion();
00122
00124 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00125
00126 void GenerateData();
00127
00128
00129 private:
00130 WhiteTopHatImageFilter(const Self&);
00131 void operator=(const Self&);
00132
00134 KernelType m_Kernel;
00135
00136 bool m_SafeBorder;
00137 };
00138
00139 }
00140
00141 #ifndef ITK_MANUAL_INSTANTIATION
00142 #include "itkWhiteTopHatImageFilter.txx"
00143 #endif
00144
00145 #endif
00146
00147 #endif
00148