00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkGradientRecursiveGaussianImageFilter_h
00018 #define __itkGradientRecursiveGaussianImageFilter_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= Image< CovariantVector<
00045 ITK_TYPENAME NumericTraits< ITK_TYPENAME TInputImage::PixelType>::RealType,
00046 ::itk::GetImageDimension<TInputImage>::ImageDimension >,
00047 ::itk::GetImageDimension<TInputImage>::ImageDimension > >
00048 class ITK_EXPORT GradientRecursiveGaussianImageFilter:
00049 public ImageToImageFilter<TInputImage,TOutputImage>
00050 {
00051 public:
00053 typedef GradientRecursiveGaussianImageFilter Self;
00054 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00055 typedef SmartPointer<Self> Pointer;
00056 typedef SmartPointer<const Self> ConstPointer;
00057
00058
00060 typedef typename TInputImage::PixelType PixelType;
00061 typedef typename NumericTraits<PixelType>::RealType RealType;
00062
00067 typedef NthElementImageAdaptor< TOutputImage,
00068 RealType > OutputImageAdaptorType;
00069 typedef typename OutputImageAdaptorType::Pointer OutputImageAdaptorPointer;
00070
00072 typedef RecursiveGaussianImageFilter<
00073 TInputImage,
00074 TInputImage
00075 > GaussianFilterType;
00076
00078 typedef typename GaussianFilterType::Pointer GaussianFilterPointer;
00080 typedef typename TOutputImage::Pointer OutputImagePointer;
00082 itkStaticConstMacro(ImageDimension, unsigned int,
00083 TInputImage::ImageDimension);
00084
00086 typedef TOutputImage OutputImageType;
00087 typedef typename OutputImageType::PixelType OutputPixelType;
00088 typedef typename PixelTraits<OutputPixelType>::ValueType OutputComponentType;
00089
00091 itkNewMacro(Self);
00092
00094 void SetSigma( RealType sigma );
00095
00097 itkSetMacro( NormalizeAcrossScale, bool );
00098 itkGetMacro( NormalizeAcrossScale, bool );
00099
00100 protected:
00101 GradientRecursiveGaussianImageFilter();
00102 virtual ~GradientRecursiveGaussianImageFilter() {};
00103 void PrintSelf(std::ostream& os, Indent indent) const;
00104
00106 void GenerateData( void );
00107
00108 private:
00109 GradientRecursiveGaussianImageFilter(const Self&);
00110 void operator=(const Self&);
00111
00112 GaussianFilterPointer m_SmoothingFilters[ImageDimension-1];
00113 GaussianFilterPointer m_DerivativeFilter;
00114 OutputImageAdaptorPointer m_ImageAdaptor;
00115
00117 bool m_NormalizeAcrossScale;
00118
00119 };
00120
00121 }
00122
00123 #ifndef ITK_MANUAL_INSTANTIATION
00124 #include "itkGradientRecursiveGaussianImageFilter.txx"
00125 #endif
00126
00127 #endif
00128
00129
00130
00131