itkMorphologicalGradientImageFilter.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 __itkMorphologicalGradientImageFilter_h
00018 #define __itkMorphologicalGradientImageFilter_h
00019
00020
00021
00022
00023 #include "itkConfigure.h"
00024
00025 #ifdef ITK_USE_CONSOLIDATED_MORPHOLOGY
00026 #include "itkOptMorphologicalGradientImageFilter.h"
00027 #else
00028
00029
00030 #include "itkImageToImageFilter.h"
00031
00032 namespace itk {
00033
00057 template<class TInputImage, class TOutputImage, class TKernel>
00058 class ITK_EXPORT MorphologicalGradientImageFilter :
00059 public ImageToImageFilter<TInputImage, TOutputImage>
00060 {
00061 public:
00063 typedef MorphologicalGradientImageFilter Self;
00064 typedef ImageToImageFilter<TInputImage, TOutputImage>
00065 Superclass;
00066 typedef SmartPointer<Self> Pointer;
00067 typedef SmartPointer<const Self> ConstPointer;
00068
00070 typedef TInputImage InputImageType;
00071 typedef typename InputImageType::Pointer InputImagePointer;
00072 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00073 typedef typename InputImageType::RegionType InputImageRegionType;
00074 typedef typename InputImageType::PixelType InputImagePixelType;
00075 typedef TOutputImage OutputImageType;
00076 typedef typename OutputImageType::Pointer OutputImagePointer;
00077 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00078 typedef typename OutputImageType::RegionType OutputImageRegionType;
00079 typedef typename OutputImageType::PixelType OutputImagePixelType;
00080
00082 typedef TKernel KernelType;
00083
00085 itkStaticConstMacro(InputImageDimension, unsigned int,
00086 TInputImage::ImageDimension);
00087 itkStaticConstMacro(OutputImageDimension, unsigned int,
00088 TOutputImage::ImageDimension);
00089 itkStaticConstMacro(KernelDimension, unsigned int,
00090 TKernel::NeighborhoodDimension);
00092
00094 itkNewMacro(Self);
00095
00097 itkTypeMacro(MorphologicalGradientImageFilter,
00098 ImageToImageFilter);
00099
00101 itkSetMacro(Kernel, KernelType);
00102
00104 itkGetConstReferenceMacro(Kernel, KernelType);
00105
00107 typedef typename TKernel::PixelType KernelPixelType;
00108
00109 #ifdef ITK_USE_CONCEPT_CHECKING
00110
00111 itkConceptMacro(SameDimensionCheck1,
00112 (Concept::SameDimension<InputImageDimension, KernelDimension>));
00113 itkConceptMacro(SameDimensionCheck2,
00114 (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00115 itkConceptMacro(InputLessThanComparableCheck,
00116 (Concept::LessThanComparable<InputImagePixelType>));
00117 itkConceptMacro(InputGreaterThanComparableCheck,
00118 (Concept::GreaterThanComparable<InputImagePixelType>));
00119 itkConceptMacro(InputAdditiveOperatorsCheck,
00120 (Concept::AdditiveOperators<InputImagePixelType>));
00121 itkConceptMacro(InputConvertibleToOutputCheck,
00122 (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00123 itkConceptMacro(KernelGreaterThanComparableCheck,
00124 (Concept::GreaterThanComparable<KernelPixelType>));
00125
00127 #endif
00128
00129 protected:
00130 MorphologicalGradientImageFilter();
00131 ~MorphologicalGradientImageFilter() {};
00132 void PrintSelf(std::ostream& os, Indent indent) const;
00133
00141 void GenerateInputRequestedRegion();
00142
00143 void GenerateData();
00144
00145
00146 private:
00147 MorphologicalGradientImageFilter(const Self&);
00148 void operator=(const Self&);
00149
00151 KernelType m_Kernel;
00152 };
00153
00154 }
00155
00156 #ifndef ITK_MANUAL_INSTANTIATION
00157 #include "itkMorphologicalGradientImageFilter.txx"
00158 #endif
00159
00160 #endif
00161
00162 #endif
00163