itkRecursiveGaussianImageFilter.h
Go to the documentation of this file.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 );
00080
00084 typedef enum { ZeroOrder, FirstOrder, SecondOrder } OrderEnumType;
00085
00087 typedef TOutputImage OutputImageType;
00088
00089
00105 itkSetMacro( NormalizeAcrossScale, bool );
00106 itkGetMacro( NormalizeAcrossScale, bool );
00107
00114 itkSetMacro( Order, OrderEnumType );
00115 itkGetMacro( Order, OrderEnumType );
00117
00119 void SetZeroOrder();
00120
00122 void SetFirstOrder();
00123
00125 void SetSecondOrder();
00126
00127
00128 protected:
00129 RecursiveGaussianImageFilter();
00130 virtual ~RecursiveGaussianImageFilter() {};
00131 void PrintSelf(std::ostream& os, Indent indent) const;
00132
00137 virtual void SetUp(ScalarRealType spacing);
00138
00139 private:
00140 RecursiveGaussianImageFilter(const Self&);
00141 void operator=(const Self&);
00142
00144 void ComputeNCoefficients(ScalarRealType sigmad,
00145 ScalarRealType A1, ScalarRealType B1, ScalarRealType W1, ScalarRealType L1,
00146 ScalarRealType A2, ScalarRealType B2, ScalarRealType W2, ScalarRealType L2,
00147 ScalarRealType& N0, ScalarRealType& N1,
00148 ScalarRealType& N2, ScalarRealType& N3,
00149 ScalarRealType& SN, ScalarRealType& DN, ScalarRealType& EN);
00150
00152 void ComputeDCoefficients(ScalarRealType sigmad,
00153 ScalarRealType W1, ScalarRealType L1, ScalarRealType W2, ScalarRealType L2,
00154 ScalarRealType& SD, ScalarRealType& DD, ScalarRealType& ED);
00155
00158 void ComputeRemainingCoefficients(bool symmetric);
00159
00161 ScalarRealType m_Sigma;
00162
00164 bool m_NormalizeAcrossScale;
00165
00166 OrderEnumType m_Order;
00167 };
00168
00169 }
00170
00171 #ifndef ITK_MANUAL_INSTANTIATION
00172 #include "itkRecursiveGaussianImageFilter.txx"
00173 #endif
00174
00175 #endif
00176