00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkFFTWComplexConjugateToRealImageFilter_h
00018 #define __itkFFTWComplexConjugateToRealImageFilter_h
00019 #if defined(USE_FFTWF) || defined(USE_FFTWD)
00020 #include "itkFFTComplexConjugateToRealImageFilter.h"
00021 #include "fftw3.h"
00022
00023 namespace itk
00024 {
00025 template <typename TPixel,unsigned int Dimension = 3>
00026 class FFTWComplexConjugateToRealImageFilter:
00027 public FFTComplexConjugateToRealImageFilter<TPixel,Dimension>
00028 {
00029
00030 };
00031
00032 template <unsigned int Dimension>
00033 class FFTWComplexConjugateToRealImageFilter<float,Dimension>:
00034 public FFTComplexConjugateToRealImageFilter<float,Dimension>
00035 {
00040 public:
00041 typedef float TPixel;
00042 typedef FFTWComplexConjugateToRealImageFilter Self;
00043 typedef FFTComplexConjugateToRealImageFilter<TPixel,Dimension> Superclass;
00044 typedef SmartPointer<Self> Pointer;
00045 typedef SmartPointer<const Self> constPointer;
00046
00048 typedef typename Superclass::TInputImageType TInputImageType;
00049 typedef typename Superclass::TOutputImageType TOutputImageType;
00050
00052 itkNewMacro(Self);
00053
00055 itkTypeMacro(FFTWComplexConjugateToRealImageFilter,
00056 FFTComplexConjugateToRealImageFilter);
00057
00059 typedef TInputImageType ImageType;
00060 typedef typename ImageType::SizeType ImageSizeType;
00061
00062
00063
00064 virtual void GenerateData();
00065 virtual bool FullMatrix();
00066 protected:
00067 FFTWComplexConjugateToRealImageFilter()
00068 {
00069 M_PlanComputed= false;
00070 }
00071 virtual ~FFTWComplexConjugateToRealImageFilter(){
00072 if(M_PlanComputed)
00073 {
00074 fftwf_destroy_plan(M_plan);
00075 }
00076 }
00077 void PrintSelf(std::ostream& os, Indent indent) const;
00078
00079 private:
00080 FFTWComplexConjugateToRealImageFilter(const Self&);
00081 void operator=(const Self&);
00082 bool M_PlanComputed;
00083 fftwf_plan M_plan;
00084 };
00085
00086 template <unsigned int Dimension>
00087 class FFTWComplexConjugateToRealImageFilter<double,Dimension>:
00088 public FFTComplexConjugateToRealImageFilter<double,Dimension>
00089 {
00094 public:
00095 typedef double TPixel;
00096 typedef FFTWComplexConjugateToRealImageFilter Self;
00097 typedef FFTComplexConjugateToRealImageFilter<TPixel,Dimension> Superclass;
00098 typedef SmartPointer<Self> Pointer;
00099 typedef SmartPointer<const Self> constPointer;
00100
00102 typedef typename Superclass::TInputImageType TInputImageType;
00103 typedef typename Superclass::TOutputImageType TOutputImageType;
00104
00106 itkNewMacro(Self);
00107
00109 itkTypeMacro(FFTWComplexConjugateToRealImageFilter,
00110 FFTComplexConjugateToRealImageFilter);
00111
00113 typedef TInputImageType ImageType;
00114 typedef typename ImageType::SizeType ImageSizeType;
00115
00116
00117
00118 virtual void GenerateData();
00119 virtual bool FullMatrix();
00120 protected:
00121 FFTWComplexConjugateToRealImageFilter()
00122 {
00123 M_PlanComputed= false;
00124 }
00125 virtual ~FFTWComplexConjugateToRealImageFilter(){
00126 if(M_PlanComputed)
00127 {
00128 fftw_destroy_plan(M_plan);
00129 }
00130 }
00131 void PrintSelf(std::ostream& os, Indent indent) const;
00132
00133 private:
00134 FFTWComplexConjugateToRealImageFilter(const Self&);
00135 void operator=(const Self&);
00136 bool M_PlanComputed;
00137 fftw_plan M_plan;
00138 };
00139
00140 }
00141
00142 #ifndef ITK_MANUAL_INSTANTIATION
00143 #include "itkFFTWComplexConjugateToRealImageFilter.txx"
00144 #endif
00145 #endif // defined(USE_FFTWF) || defined(USE_FFTWD)
00146 #endif //__itkFFTWComplexConjugateToRealImageFilter_h