00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMorphologicalGradientImageFilter_h
00018 #define __itkMorphologicalGradientImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021
00022 namespace itk {
00023
00047 template<class TInputImage, class TOutputImage, class TKernel>
00048 class ITK_EXPORT MorphologicalGradientImageFilter :
00049 public ImageToImageFilter<TInputImage, TOutputImage>
00050 {
00051 public:
00053 typedef MorphologicalGradientImageFilter Self;
00054 typedef ImageToImageFilter<TInputImage, TOutputImage>
00055 Superclass;
00056 typedef SmartPointer<Self> Pointer;
00057 typedef SmartPointer<const Self> ConstPointer;
00058
00060 typedef TInputImage InputImageType;
00061 typedef TOutputImage OutputImageType;
00062 typedef typename InputImageType::Pointer InputImagePointer;
00063 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00064 typedef typename InputImageType::RegionType InputImageRegionType;
00065 typedef typename InputImageType::PixelType InputImagePixelType;
00066 typedef typename OutputImageType::Pointer OutputImagePointer;
00067 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00068 typedef typename OutputImageType::RegionType OutputImageRegionType;
00069 typedef typename OutputImageType::PixelType OutputImagePixelType;
00070
00072 typedef TKernel KernelType;
00073
00075 itkStaticConstMacro(InputImageDimension, unsigned int,
00076 TInputImage::ImageDimension);
00077 itkStaticConstMacro(OutputImageDimension, unsigned int,
00078 TOutputImage::ImageDimension);
00079 itkStaticConstMacro(KernelDimension, unsigned int,
00080 TKernel::NeighborhoodDimension);
00082
00084 itkNewMacro(Self);
00085
00087 itkTypeMacro(MorphologicalGradientImageFilter,
00088 ImageToImageFilter);
00089
00091 itkSetMacro(Kernel, KernelType);
00092
00094 itkGetConstReferenceMacro(Kernel, KernelType);
00095
00096 #ifdef ITK_USE_CONCEPT_CHECKING
00097
00098 itkConceptMacro(SameDimensionCheck1,
00099 (Concept::SameDimension<InputImageDimension, KernelDimension>));
00100 itkConceptMacro(SameDimensionCheck2,
00101 (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00102 itkConceptMacro(InputLessThanComparableCheck,
00103 (Concept::LessThanComparable<InputImagePixelType>));
00104 itkConceptMacro(InputGreaterThanComparableCheck,
00105 (Concept::GreaterThanComparable<InputImagePixelType>));
00106 itkConceptMacro(InputAdditiveOperatorsCheck,
00107 (Concept::AdditiveOperators<InputImagePixelType>));
00108 itkConceptMacro(InputConvertibleToOutputCheck,
00109 (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00110 itkConceptMacro(KernelGreaterThanIntCheck,
00111 (Concept::GreaterThanComparable<typename TKernel::PixelType, int>));
00112
00114 #endif
00115
00116 protected:
00117 MorphologicalGradientImageFilter();
00118 ~MorphologicalGradientImageFilter() {};
00119 void PrintSelf(std::ostream& os, Indent indent) const;
00120
00128 void GenerateInputRequestedRegion() ;
00129
00130 void GenerateData();
00131
00132
00133 private:
00134 MorphologicalGradientImageFilter(const Self&);
00135 void operator=(const Self&);
00136
00138 KernelType m_Kernel ;
00139 } ;
00140
00141 }
00142
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkMorphologicalGradientImageFilter.txx"
00145 #endif
00146
00147 #endif
00148
00149
00150