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 #include "itkMovingHistogramMorphologicalGradientImageFilter.h"
00022 #include "itkBasicMorphologicalGradientImageFilter.h"
00023 #include "itkConstantBoundaryCondition.h"
00024
00025 namespace itk {
00026
00040 template<class TInputImage, class TOutputImage, class TKernel>
00041 class ITK_EXPORT MorphologicalGradientImageFilter :
00042 public ImageToImageFilter<TInputImage, TOutputImage>
00043 {
00044 public:
00046 typedef MorphologicalGradientImageFilter Self;
00047 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00048 typedef SmartPointer<Self> Pointer;
00049 typedef SmartPointer<const Self> ConstPointer;
00050
00052 itkNewMacro(Self);
00053
00055 itkTypeMacro(MorphologicalGradientImageFilter,
00056 ImageToImageFilter);
00057
00059 typedef TInputImage InputImageType;
00060 typedef TOutputImage OutputImageType;
00061 typedef typename TInputImage::RegionType RegionType ;
00062 typedef typename TInputImage::SizeType SizeType ;
00063 typedef typename TInputImage::IndexType IndexType ;
00064 typedef typename TInputImage::PixelType PixelType ;
00065 typedef typename TInputImage::OffsetType OffsetType ;
00066 typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00067
00068 typedef MovingHistogramMorphologicalGradientImageFilter< TInputImage, TOutputImage, TKernel > HistogramFilterType;
00069 typedef BasicMorphologicalGradientImageFilter< TInputImage, TOutputImage, TKernel > BasicFilterType;
00070
00072 itkStaticConstMacro(ImageDimension, unsigned int,
00073 TInputImage::ImageDimension);
00074
00076 typedef TKernel KernelType;
00077
00079 void SetKernel( const KernelType& kernel );
00080
00082 itkGetConstReferenceMacro(Kernel, KernelType);
00083
00085 void SetNameOfBackendFilterClass( const char * name );
00086 itkGetMacro(NameOfBackendFilterClass, const char*);
00088
00094 void GenerateInputRequestedRegion() ;
00095
00097 virtual void Modified() const;
00098
00099 protected:
00100 MorphologicalGradientImageFilter();
00101 ~MorphologicalGradientImageFilter() {};
00102 void PrintSelf(std::ostream& os, Indent indent) const;
00103
00104 void GenerateData();
00105
00106 private:
00107 MorphologicalGradientImageFilter(const Self&);
00108 void operator=(const Self&);
00109
00111 KernelType m_Kernel ;
00112
00113
00114 typename HistogramFilterType::Pointer m_HistogramFilter;
00115 typename BasicFilterType::Pointer m_BasicFilter;
00116
00117
00118 const char* m_NameOfBackendFilterClass;
00119
00120 } ;
00121
00122 }
00123
00124 #ifndef ITK_MANUAL_INSTANTIATION
00125 #include "itkMorphologicalGradientImageFilter.txx"
00126 #endif
00127
00128 #endif
00129
00130
00131