00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkFFTWComplexToComplexImageFilter_h
00019 #define __itkFFTWComplexToComplexImageFilter_h
00020
00021 #if defined(USE_FFTWF) || defined(USE_FFTWD)
00022
00023 #include "itkFFTComplexToComplexImageFilter.h"
00024 #include "fftw3.h"
00025
00026 namespace itk
00027 {
00046 template <typename TPixel,unsigned int NDimension = 3 >
00047 class FFTWComplexToComplexImageFilter:
00048 public FFTComplexToComplexImageFilter< TPixel, NDimension >
00049 {
00050
00051 };
00052
00053 template <unsigned int NDimension>
00054 class FFTWComplexToComplexImageFilter<float,NDimension>:
00055 public FFTComplexToComplexImageFilter<float,NDimension>
00056 {
00057
00058
00059
00060 public:
00061 typedef float TPixel;
00062 typedef FFTWComplexToComplexImageFilter Self;
00063 typedef FFTComplexToComplexImageFilter<
00064 TPixel,NDimension> Superclass;
00065 typedef SmartPointer<Self> Pointer;
00066 typedef SmartPointer<const Self> ConstPointer;
00067
00069 typedef typename Superclass::InputImageType InputImageType;
00070 typedef typename Superclass::OutputImageType OutputImageType;
00071
00073 itkNewMacro(Self);
00074
00076 itkTypeMacro(FFTWComplexToComplexImageFilter,
00077 FFTComplexToComplexImageFilter);
00078
00080 typedef InputImageType ImageType;
00081 typedef typename ImageType::SizeType ImageSizeType;
00082
00083
00084 protected:
00085
00086 FFTWComplexToComplexImageFilter()
00087 {
00088 this->m_PlanComputed= false;
00089 }
00090
00091 virtual ~FFTWComplexToComplexImageFilter()
00092 {
00093 if(m_PlanComputed)
00094 {
00095 fftwf_destroy_plan(m_Plan);
00096 }
00097 }
00098
00102 virtual void GenerateData();
00103 virtual bool FullMatrix();
00105
00106
00107 void PrintSelf(std::ostream& os, Indent indent) const;
00108
00109 private:
00110 FFTWComplexToComplexImageFilter(const Self&);
00111 void operator=(const Self&);
00112
00113 bool m_PlanComputed;
00114 fftwf_plan m_Plan;
00115 };
00116
00117
00118 template <unsigned int NDimension>
00119 class FFTWComplexToComplexImageFilter<double,NDimension>:
00120 public FFTComplexToComplexImageFilter<double,NDimension>
00121 {
00122
00123
00124
00125 public:
00126 typedef double TPixel;
00127 typedef FFTWComplexToComplexImageFilter Self;
00128 typedef FFTComplexToComplexImageFilter<
00129 TPixel,NDimension> Superclass;
00130 typedef SmartPointer<Self> Pointer;
00131 typedef SmartPointer<const Self> ConstPointer;
00132
00134 typedef typename Superclass::InputImageType InputImageType;
00135 typedef typename Superclass::OutputImageType OutputImageType;
00136
00138 itkNewMacro(Self);
00139
00141 itkTypeMacro(FFTWComplexToComplexImageFilter,
00142 FFTComplexToComplexImageFilter);
00143
00145 typedef InputImageType ImageType;
00146 typedef typename ImageType::SizeType ImageSizeType;
00147
00148 protected:
00149
00150 FFTWComplexToComplexImageFilter()
00151 {
00152 m_PlanComputed= false;
00153 }
00154
00155 virtual ~FFTWComplexToComplexImageFilter()
00156 {
00157 if( this->m_PlanComputed )
00158 {
00159 fftw_destroy_plan( this->m_Plan );
00160 }
00161 }
00162
00163 void PrintSelf(std::ostream& os, Indent indent) const;
00164
00165
00166
00167 virtual void GenerateData();
00168 virtual bool FullMatrix();
00169
00170 private:
00171 FFTWComplexToComplexImageFilter(const Self&);
00172 void operator=(const Self&);
00173
00174 bool m_PlanComputed;
00175 fftw_plan m_Plan;
00176 };
00177
00178 }
00179
00180 #ifndef ITK_MANUAL_INSTANTIATION
00181 #include "itkFFTWComplexToComplexImageFilter.txx"
00182 #endif
00183
00184 #endif // defined(USE_FFTWF) || defined(USE_FFTWD)
00185
00186 #endif //__itkFFTWComplexToComplexImageFilter_h
00187