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