00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __itkGrayscaleMorphologicalClosingImageFilter_h
00016 #define __itkGrayscaleMorphologicalClosingImageFilter_h
00017
00018 #include "itkImageToImageFilter.h"
00019
00020 namespace itk {
00021
00043 template<class TInputImage, class TOutputImage, class TKernel>
00044 class ITK_EXPORT GrayscaleMorphologicalClosingImageFilter :
00045 public ImageToImageFilter<TInputImage, TOutputImage>
00046 {
00047 public:
00049 typedef GrayscaleMorphologicalClosingImageFilter Self;
00050 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00051 typedef SmartPointer<Self> Pointer;
00052 typedef SmartPointer<const Self> ConstPointer;
00053
00055 itkNewMacro(Self);
00056
00058 itkTypeMacro(GrayscaleMorphologicalClosingImageFilter,
00059 ImageToImageFilter);
00060
00061 typedef TInputImage InputImageType;
00062 typedef TOutputImage OutputImageType;
00063 typedef typename InputImageType::Pointer InputImagePointer;
00064 typedef typename OutputImageType::RegionType OutputImageRegionType;
00065
00067 typedef typename TInputImage::PixelType PixelType ;
00068
00070 typedef TKernel KernelType;
00071
00073 itkSetMacro(Kernel, KernelType);
00074
00076 itkGetConstReferenceMacro(Kernel, KernelType);
00077
00079 itkStaticConstMacro(InputImageDimension, unsigned int,
00080 TInputImage::ImageDimension);
00081 itkStaticConstMacro(OutputImageDimension, unsigned int,
00082 TOutputImage::ImageDimension);
00083 itkStaticConstMacro(KernelDimension, unsigned int,
00084 TKernel::NeighborhoodDimension);
00086
00087 #ifdef ITK_USE_CONCEPT_CHECKING
00088
00089 itkConceptMacro(SameTypeCheck,
00090 (Concept::SameType<PixelType, typename TOutputImage::PixelType>));
00091 itkConceptMacro(SameDimensionCheck1,
00092 (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00093 itkConceptMacro(SameDimensionCheck2,
00094 (Concept::SameDimension<InputImageDimension, KernelDimension>));
00095 itkConceptMacro(InputLessThanComparableCheck,
00096 (Concept::LessThanComparable<PixelType>));
00097 itkConceptMacro(InputGreaterThanComparableCheck,
00098 (Concept::GreaterThanComparable<PixelType>));
00099 itkConceptMacro(KernelGreaterThanIntCheck,
00100 (Concept::GreaterThanComparable<typename TKernel::PixelType, int>));
00101
00103 #endif
00104
00105 protected:
00106 GrayscaleMorphologicalClosingImageFilter();
00107 ~GrayscaleMorphologicalClosingImageFilter() {};
00108 void PrintSelf(std::ostream& os, Indent indent) const;
00109
00113 void GenerateInputRequestedRegion() ;
00114
00116 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00117
00120 void GenerateData ();
00121
00122 private:
00123 GrayscaleMorphologicalClosingImageFilter(const Self&);
00124 void operator=(const Self&);
00125
00127 KernelType m_Kernel ;
00128 } ;
00129
00130 }
00131
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkGrayscaleMorphologicalClosingImageFilter.txx"
00134 #endif
00135
00136 #endif
00137
00138
00139