00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkGrayscaleMorphologicalClosingImageFilter_h
00018 #define __itkGrayscaleMorphologicalClosingImageFilter_h
00019
00020
00021
00022
00023 #include "itkConfigure.h"
00024
00025 #ifdef ITK_USE_CONSOLIDATED_MORPHOLOGY
00026 #include "itkOptGrayscaleMorphologicalClosingImageFilter.h"
00027 #else
00028
00029
00030 #include "itkImageToImageFilter.h"
00031
00032 namespace itk {
00033
00055 template<class TInputImage, class TOutputImage, class TKernel>
00056 class ITK_EXPORT GrayscaleMorphologicalClosingImageFilter :
00057 public ImageToImageFilter<TInputImage, TOutputImage>
00058 {
00059 public:
00061 typedef GrayscaleMorphologicalClosingImageFilter Self;
00062 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00063 typedef SmartPointer<Self> Pointer;
00064 typedef SmartPointer<const Self> ConstPointer;
00065
00067 itkNewMacro(Self);
00068
00070 itkTypeMacro(GrayscaleMorphologicalClosingImageFilter,
00071 ImageToImageFilter);
00072
00073 typedef TInputImage InputImageType;
00074 typedef TOutputImage OutputImageType;
00075 typedef typename InputImageType::Pointer InputImagePointer;
00076 typedef typename OutputImageType::RegionType OutputImageRegionType;
00077
00079 typedef typename TInputImage::PixelType PixelType;
00080
00082 typedef TKernel KernelType;
00083
00085 itkSetMacro(Kernel, KernelType);
00086
00088 itkGetConstReferenceMacro(Kernel, KernelType);
00089
00091 itkStaticConstMacro(InputImageDimension, unsigned int,
00092 TInputImage::ImageDimension);
00093 itkStaticConstMacro(OutputImageDimension, unsigned int,
00094 TOutputImage::ImageDimension);
00095 itkStaticConstMacro(KernelDimension, unsigned int,
00096 TKernel::NeighborhoodDimension);
00098
00099 #ifdef ITK_USE_CONCEPT_CHECKING
00100
00101 itkConceptMacro(SameTypeCheck,
00102 (Concept::SameType<PixelType, typename TOutputImage::PixelType>));
00103 itkConceptMacro(SameDimensionCheck1,
00104 (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00105 itkConceptMacro(SameDimensionCheck2,
00106 (Concept::SameDimension<InputImageDimension, KernelDimension>));
00107 itkConceptMacro(InputLessThanComparableCheck,
00108 (Concept::LessThanComparable<PixelType>));
00109 itkConceptMacro(InputGreaterThanComparableCheck,
00110 (Concept::GreaterThanComparable<PixelType>));
00111 itkConceptMacro(KernelGreaterThanIntCheck,
00112 (Concept::GreaterThanComparable<typename TKernel::PixelType, int>));
00113
00115 #endif
00116
00117 protected:
00118 GrayscaleMorphologicalClosingImageFilter();
00119 ~GrayscaleMorphologicalClosingImageFilter() {};
00120 void PrintSelf(std::ostream& os, Indent indent) const;
00121
00125 void GenerateInputRequestedRegion();
00126
00128 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00129
00132 void GenerateData ();
00133
00134 private:
00135 GrayscaleMorphologicalClosingImageFilter(const Self&);
00136 void operator=(const Self&);
00137
00139 KernelType m_Kernel;
00140 };
00141
00142 }
00143
00144 #ifndef ITK_MANUAL_INSTANTIATION
00145 #include "itkGrayscaleMorphologicalClosingImageFilter.txx"
00146 #endif
00147
00148 #endif
00149
00150 #endif
00151