00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkRecursiveSeparableImageFilter_h
00018 #define __itkRecursiveSeparableImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkNumericTraits.h"
00022
00023 namespace itk
00024 {
00025
00048 template <typename TInputImage, typename TOutputImage=TInputImage>
00049 class ITK_EXPORT RecursiveSeparableImageFilter :
00050 public ImageToImageFilter<TInputImage,TOutputImage>
00051 {
00052 public:
00054 typedef RecursiveSeparableImageFilter Self;
00055 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00056 typedef SmartPointer<Self> Pointer;
00057 typedef SmartPointer<const Self> ConstPointer;
00058
00060 itkTypeMacro( RecursiveSeparableImageFilter, ImageToImageFilter );
00061
00063 typedef typename TInputImage::Pointer InputImagePointer;
00064 typedef typename TInputImage::ConstPointer InputImageConstPointer;
00065
00070 typedef typename TInputImage::PixelType InputPixelType;
00071 typedef typename NumericTraits<InputPixelType>::RealType RealType;
00072 typedef typename NumericTraits<InputPixelType>::ScalarRealType ScalarRealType;
00073
00075 typedef TInputImage InputImageType;
00076
00078 typedef TOutputImage OutputImageType;
00079
00081 itkGetMacro(Direction, unsigned int);
00082
00084 itkSetMacro(Direction, unsigned int);
00085
00087 void SetInputImage( const TInputImage * );
00088
00090 const TInputImage * GetInputImage( void );
00091
00092 protected:
00093 RecursiveSeparableImageFilter();
00094 virtual ~RecursiveSeparableImageFilter() {};
00095 void PrintSelf(std::ostream& os, Indent indent) const;
00096
00098 void GenerateData(void);
00099
00105 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00106
00107
00108 void EnlargeOutputRequestedRegion(DataObject *output);
00109
00114 virtual void SetUp(ScalarRealType spacing) = 0;
00115
00122 void FilterDataArray(RealType *outs, const RealType *data, RealType *scratch,
00123 unsigned int ln);
00124
00125 private:
00126 RecursiveSeparableImageFilter(const Self&);
00127 void operator=(const Self&);
00128
00131 unsigned int m_Direction;
00132
00133 protected:
00135 ScalarRealType m_N0;
00136 ScalarRealType m_N1;
00137 ScalarRealType m_N2;
00138 ScalarRealType m_N3;
00139
00143 ScalarRealType m_D1;
00144 ScalarRealType m_D2;
00145 ScalarRealType m_D3;
00146 ScalarRealType m_D4;
00147
00149 ScalarRealType m_M1;
00150 ScalarRealType m_M2;
00151 ScalarRealType m_M3;
00152 ScalarRealType m_M4;
00153
00156 ScalarRealType m_BN1;
00157 ScalarRealType m_BN2;
00158 ScalarRealType m_BN3;
00159 ScalarRealType m_BN4;
00160
00161 ScalarRealType m_BM1;
00162 ScalarRealType m_BM2;
00163 ScalarRealType m_BM3;
00164 ScalarRealType m_BM4;
00165
00166 };
00167
00168
00169 }
00170
00171 #ifndef ITK_MANUAL_INSTANTIATION
00172 #include "itkRecursiveSeparableImageFilter.txx"
00173 #endif
00174
00175
00176 #endif