itkFFTWComplexToComplexImageFilter.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
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 private:
00108 FFTWComplexToComplexImageFilter(const Self&);
00109 void operator=(const Self&);
00110
00111 bool m_PlanComputed;
00112 fftwf_plan m_Plan;
00113 };
00114
00115
00116 template <unsigned int NDimension>
00117 class FFTWComplexToComplexImageFilter<double,NDimension>:
00118 public FFTComplexToComplexImageFilter<double,NDimension>
00119 {
00120
00121
00122
00123 public:
00124 typedef double TPixel;
00125 typedef FFTWComplexToComplexImageFilter Self;
00126 typedef FFTComplexToComplexImageFilter<
00127 TPixel,NDimension> Superclass;
00128 typedef SmartPointer<Self> Pointer;
00129 typedef SmartPointer<const Self> ConstPointer;
00130
00132 typedef typename Superclass::InputImageType InputImageType;
00133 typedef typename Superclass::OutputImageType OutputImageType;
00134
00136 itkNewMacro(Self);
00137
00139 itkTypeMacro(FFTWComplexToComplexImageFilter,
00140 FFTComplexToComplexImageFilter);
00141
00143 typedef InputImageType ImageType;
00144 typedef typename ImageType::SizeType ImageSizeType;
00145
00146 protected:
00147
00148 FFTWComplexToComplexImageFilter()
00149 {
00150 m_PlanComputed= false;
00151 }
00152
00153 virtual ~FFTWComplexToComplexImageFilter()
00154 {
00155 if( this->m_PlanComputed )
00156 {
00157 fftw_destroy_plan( this->m_Plan );
00158 }
00159 }
00160
00161
00162
00163 virtual void GenerateData();
00164 virtual bool FullMatrix();
00165
00166 private:
00167 FFTWComplexToComplexImageFilter(const Self&);
00168 void operator=(const Self&);
00169
00170 bool m_PlanComputed;
00171 fftw_plan m_Plan;
00172 };
00173
00174 }
00175
00176 #ifndef ITK_MANUAL_INSTANTIATION
00177 #include "itkFFTWComplexToComplexImageFilter.txx"
00178 #endif
00179
00180 #endif // defined(USE_FFTWF) || defined(USE_FFTWD)
00181
00182 #endif //__itkFFTWComplexToComplexImageFilter_h
00183