00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkGradientMagnitudeRecursiveGaussianImageFilter_h
00018 #define __itkGradientMagnitudeRecursiveGaussianImageFilter_h
00019
00020 #include "itkRecursiveGaussianImageFilter.h"
00021 #include "itkNthElementImageAdaptor.h"
00022 #include "itkImage.h"
00023 #include "itkPixelTraits.h"
00024
00025
00026 namespace itk
00027 {
00028
00040
00041
00042
00043 template <typename TInputImage,
00044 typename TOutputImage= TInputImage >
00045 class ITK_EXPORT GradientMagnitudeRecursiveGaussianImageFilter:
00046 public ImageToImageFilter<TInputImage,TOutputImage>
00047 {
00048 public:
00050 typedef GradientMagnitudeRecursiveGaussianImageFilter Self;
00051 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00055
00057 typedef typename TInputImage::PixelType PixelType;
00058 typedef typename NumericTraits<PixelType>::RealType RealType;
00059
00061 typedef RecursiveGaussianImageFilter<
00062 TInputImage,
00063 TInputImage
00064 > GaussianFilterType;
00065
00067 typedef typename GaussianFilterType::Pointer GaussianFilterPointer;
00069 typedef typename TOutputImage::Pointer OutputImagePointer;
00071 itkStaticConstMacro(ImageDimension, unsigned int,
00072 TInputImage::ImageDimension);
00073
00075 typedef TOutputImage OutputImageType;
00076 typedef typename OutputImageType::PixelType OutputPixelType;
00077
00079 typedef Image< RealType,
00080 itkGetStaticConstMacro(ImageDimension) > CumulativeImageType;
00081
00083 itkNewMacro(Self);
00084
00086 void SetSigma( RealType sigma );
00087
00089 itkSetMacro( NormalizeAcrossScale, bool );
00090 itkGetMacro( NormalizeAcrossScale, bool );
00091
00092 protected:
00093 GradientMagnitudeRecursiveGaussianImageFilter();
00094 virtual ~GradientMagnitudeRecursiveGaussianImageFilter() {};
00095 void PrintSelf(std::ostream& os, Indent indent) const;
00096
00098 void GenerateData( void );
00099
00100 private:
00101 GradientMagnitudeRecursiveGaussianImageFilter(const Self&);
00102 void operator=(const Self&);
00103
00104 GaussianFilterPointer m_SmoothingFilters[ImageDimension-1];
00105 GaussianFilterPointer m_DerivativeFilter;
00106
00107 typename CumulativeImageType::Pointer m_CumulativeImage;
00108
00110 bool m_NormalizeAcrossScale;
00111
00112 };
00113
00114 }
00115
00116 #ifndef ITK_MANUAL_INSTANTIATION
00117 #include "itkGradientMagnitudeRecursiveGaussianImageFilter.txx"
00118 #endif
00119
00120 #endif
00121
00122
00123
00124