00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkRecursiveGaussianImageFilter_h
00018 #define __itkRecursiveGaussianImageFilter_h
00019
00020 #include "itkRecursiveSeparableImageFilter.h"
00021
00022 namespace itk
00023 {
00024
00055 template <typename TInputImage, typename TOutputImage=TInputImage>
00056 class ITK_EXPORT RecursiveGaussianImageFilter :
00057 public RecursiveSeparableImageFilter<TInputImage,TOutputImage>
00058 {
00059 public:
00061 typedef RecursiveGaussianImageFilter Self;
00062 typedef RecursiveSeparableImageFilter<TInputImage,TOutputImage> Superclass;
00063 typedef SmartPointer<Self> Pointer;
00064 typedef SmartPointer<const Self> ConstPointer;
00065
00066 typedef typename Superclass::RealType RealType;
00067 typedef typename Superclass::ScalarRealType ScalarRealType;
00068
00070 itkNewMacro(Self);
00071
00073 itkTypeMacro( RecursiveGaussianImageFilter, RecursiveSeparableImageFilter );
00074
00077 itkGetMacro( Sigma, ScalarRealType );
00078 itkSetMacro( Sigma, ScalarRealType );
00079
00083 typedef enum { ZeroOrder, FirstOrder, SecondOrder } OrderEnumType;
00084
00086 typedef TOutputImage OutputImageType;
00087
00088
00104 itkSetMacro( NormalizeAcrossScale, bool );
00105 itkGetMacro( NormalizeAcrossScale, bool );
00106
00113 itkSetMacro( Order, OrderEnumType );
00114 itkGetMacro( Order, OrderEnumType );
00115
00117 void SetZeroOrder();
00118
00120 void SetFirstOrder();
00121
00123 void SetSecondOrder();
00124
00125
00126 protected:
00127 RecursiveGaussianImageFilter();
00128 virtual ~RecursiveGaussianImageFilter() {};
00129 void PrintSelf(std::ostream& os, Indent indent) const;
00130
00135 virtual void SetUp(ScalarRealType spacing);
00136
00137 private:
00138 RecursiveGaussianImageFilter(const Self&);
00139 void operator=(const Self&);
00140
00142 void ComputeNCoefficients(ScalarRealType sigmad,
00143 ScalarRealType A1, ScalarRealType B1, ScalarRealType W1, ScalarRealType L1,
00144 ScalarRealType A2, ScalarRealType B2, ScalarRealType W2, ScalarRealType L2,
00145 ScalarRealType& N0, ScalarRealType& N1,
00146 ScalarRealType& N2, ScalarRealType& N3,
00147 ScalarRealType& SN, ScalarRealType& DN, ScalarRealType& EN);
00149 void ComputeDCoefficients(ScalarRealType sigmad,
00150 ScalarRealType W1, ScalarRealType L1, ScalarRealType W2, ScalarRealType L2,
00151 ScalarRealType& SD, ScalarRealType& DD, ScalarRealType& ED);
00154 void ComputeRemainingCoefficients(bool symmetric);
00155
00157 ScalarRealType m_Sigma;
00158
00160 bool m_NormalizeAcrossScale;
00161
00162 OrderEnumType m_Order;
00163 };
00164
00165 }
00166
00167 #ifndef ITK_MANUAL_INSTANTIATION
00168 #include "itkRecursiveGaussianImageFilter.txx"
00169 #endif
00170
00171 #endif
00172