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
00046 template <typename TInputImage, typename TOutputImage=TInputImage>
00047 class ITK_EXPORT RecursiveSeparableImageFilter :
00048 public ImageToImageFilter<TInputImage,TOutputImage>
00049 {
00050 public:
00052 typedef RecursiveSeparableImageFilter Self;
00053 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00054 typedef SmartPointer<Self> Pointer;
00055 typedef SmartPointer<const Self> ConstPointer;
00056
00058 itkTypeMacro( RecursiveSeparableImageFilter, ImageToImageFilter );
00059
00061 typedef typename TInputImage::Pointer InputImagePointer;
00062 typedef typename TInputImage::ConstPointer InputImageConstPointer;
00063
00065 typedef typename TInputImage::PixelType InputPixelType;
00066 typedef typename NumericTraits<InputPixelType>::RealType RealType;
00067
00069 typedef TInputImage InputImageType;
00070
00072 typedef TOutputImage OutputImageType;
00073
00075 itkGetMacro(Direction, unsigned int);
00076
00078 itkSetMacro(Direction, unsigned int);
00079
00081 void SetInputImage( const TInputImage * );
00082
00084 const TInputImage * GetInputImage( void );
00085
00086 protected:
00087 RecursiveSeparableImageFilter();
00088 virtual ~RecursiveSeparableImageFilter() {};
00089 void PrintSelf(std::ostream& os, Indent indent) const;
00090
00092 void GenerateData(void);
00093
00099 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00100
00101
00102 void EnlargeOutputRequestedRegion(DataObject *output);
00103
00108 virtual void SetUp(RealType spacing) = 0;
00109
00116 void FilterDataArray(RealType *outs, const RealType *data, RealType *scratch,
00117 unsigned int ln);
00118
00119 private:
00120 RecursiveSeparableImageFilter(const Self&);
00121 void operator=(const Self&);
00122
00125 unsigned int m_Direction;
00126
00127 protected:
00129 RealType m_N0;
00130 RealType m_N1;
00131 RealType m_N2;
00132 RealType m_N3;
00133
00137 RealType m_D1;
00138 RealType m_D2;
00139 RealType m_D3;
00140 RealType m_D4;
00141
00143 RealType m_M1;
00144 RealType m_M2;
00145 RealType m_M3;
00146 RealType m_M4;
00147
00150 RealType m_BN1;
00151 RealType m_BN2;
00152 RealType m_BN3;
00153 RealType m_BN4;
00154
00155 RealType m_BM1;
00156 RealType m_BM2;
00157 RealType m_BM3;
00158 RealType m_BM4;
00159
00160 };
00161
00162
00163 }
00164
00165 #ifndef ITK_MANUAL_INSTANTIATION
00166 #include "itkRecursiveSeparableImageFilter.txx"
00167 #endif
00168
00169
00170 #endif