itkRecursiveSeparableImageFilter.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 __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
00071 typedef typename TInputImage::PixelType InputPixelType;
00072 typedef typename NumericTraits<InputPixelType>::RealType RealType;
00073 typedef typename NumericTraits<InputPixelType>::ScalarRealType ScalarRealType;
00074
00075 typedef typename TOutputImage::RegionType OutputImageRegionType;
00076
00078 typedef TInputImage InputImageType;
00079
00081 typedef TOutputImage OutputImageType;
00082
00084 itkGetConstMacro(Direction, unsigned int);
00085
00087 itkSetMacro(Direction, unsigned int);
00088
00090 void SetInputImage( const TInputImage * );
00091
00093 const TInputImage * GetInputImage( void );
00094
00095 protected:
00096 RecursiveSeparableImageFilter();
00097 virtual ~RecursiveSeparableImageFilter() {};
00098 void PrintSelf(std::ostream& os, Indent indent) const;
00099
00101 void BeforeThreadedGenerateData();
00102 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId );
00104
00105 int SplitRequestedRegion(int i, int num, OutputImageRegionType& splitRegion);
00106
00115 void EnlargeOutputRequestedRegion(DataObject *output);
00116
00121 virtual void SetUp(ScalarRealType spacing) = 0;
00122
00129 void FilterDataArray(RealType *outs, const RealType *data, RealType *scratch,
00130 unsigned int ln);
00131
00132 protected:
00134 ScalarRealType m_N0;
00135 ScalarRealType m_N1;
00136 ScalarRealType m_N2;
00137 ScalarRealType m_N3;
00138
00142 ScalarRealType m_D1;
00143 ScalarRealType m_D2;
00144 ScalarRealType m_D3;
00145 ScalarRealType m_D4;
00146
00148 ScalarRealType m_M1;
00149 ScalarRealType m_M2;
00150 ScalarRealType m_M3;
00151 ScalarRealType m_M4;
00152
00155 ScalarRealType m_BN1;
00156 ScalarRealType m_BN2;
00157 ScalarRealType m_BN3;
00158 ScalarRealType m_BN4;
00159
00160 ScalarRealType m_BM1;
00161 ScalarRealType m_BM2;
00162 ScalarRealType m_BM3;
00163 ScalarRealType m_BM4;
00164
00165 private:
00166 RecursiveSeparableImageFilter(const Self&);
00167 void operator=(const Self&);
00168
00171 unsigned int m_Direction;
00172
00173 };
00174
00175
00176 }
00177
00178 #ifndef ITK_MANUAL_INSTANTIATION
00179 #include "itkRecursiveSeparableImageFilter.txx"
00180 #endif
00181
00182
00183 #endif
00184