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
00069 itkNewMacro(Self);
00070
00072 itkTypeMacro( RecursiveGaussianImageFilter, RecursiveSeparableImageFilter );
00073
00076 itkGetMacro( Sigma, RealType );
00077 itkSetMacro( Sigma, RealType );
00078
00082 typedef enum { ZeroOrder, FirstOrder, SecondOrder } OrderEnumType;
00083
00085 typedef TOutputImage OutputImageType;
00086
00087
00103 itkSetMacro( NormalizeAcrossScale, bool );
00104 itkGetMacro( NormalizeAcrossScale, bool );
00105
00112 itkSetMacro( Order, OrderEnumType );
00113 itkGetMacro( Order, OrderEnumType );
00114
00116 void SetZeroOrder();
00117
00119 void SetFirstOrder();
00120
00122 void SetSecondOrder();
00123
00124
00125 protected:
00126 RecursiveGaussianImageFilter();
00127 virtual ~RecursiveGaussianImageFilter() {};
00128 void PrintSelf(std::ostream& os, Indent indent) const;
00129
00134 virtual void SetUp(RealType spacing);
00135
00136 private:
00137 RecursiveGaussianImageFilter(const Self&);
00138 void operator=(const Self&);
00139
00141 void ComputeNCoefficients(RealType sigmad,
00142 RealType A1, RealType B1, RealType W1, RealType L1,
00143 RealType A2, RealType B2, RealType W2, RealType L2,
00144 RealType& N0, RealType& N1,
00145 RealType& N2, RealType& N3,
00146 RealType& SN, RealType& DN, RealType& EN);
00148 void ComputeDCoefficients(RealType sigmad,
00149 RealType W1, RealType L1, RealType W2, RealType L2,
00150 RealType& SD, RealType& DD, RealType& ED);
00153 void ComputeRemainingCoefficients(bool symmetric);
00154
00156 RealType m_Sigma;
00157
00159 bool m_NormalizeAcrossScale;
00160
00161 OrderEnumType m_Order;
00162 };
00163
00164 }
00165
00166 #ifndef ITK_MANUAL_INSTANTIATION
00167 #include "itkRecursiveGaussianImageFilter.txx"
00168 #endif
00169
00170 #endif
00171