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 #include "itkFFTComplexConjugateToRealImageFilter.h"
00020 #ifdef USE_FFTW
00021 #include "fftw3.h"
00022
00023 namespace itk
00024 {
00025
00026 template <typename TPixel, unsigned int Dimension = 3>
00027 class FFTWComplexConjugateToRealImageFilter :
00028 public FFTComplexConjugateToRealImageFilter<TPixel,Dimension>
00029 {
00030 public:
00032 typedef Image< std::complex<TPixel>,Dimension> TInputImageType;
00033 typedef Image<TPixel,Dimension> TOutputImageType;
00034
00035 typedef FFTWComplexConjugateToRealImageFilter Self;
00036 typedef FFTComplexConjugateToRealImageFilter<TPixel,Dimension> Superclass;
00037 typedef SmartPointer<Self> Pointer;
00038 typedef SmartPointer<const Self> constPointer;
00039
00041 itkNewMacro(Self);
00042
00044 itkTypeMacro(FFTWComplexConjugateToRealImageFilter,
00045 FFTComplexConjugateToRealImageFilter);
00046
00048 typedef TInputImageType ImageType;
00049 typedef typename ImageType::SizeType ImageSizeType;
00050
00051
00052
00053 virtual void GenerateData();
00054 virtual bool FullMatrix();
00055 protected:
00056 FFTWComplexConjugateToRealImageFilter()
00057 {
00058 M_PlanComputed = false;
00059 M_PlanComputedf= false;
00060
00061 }
00062 virtual ~FFTWComplexConjugateToRealImageFilter(){
00063 if(M_PlanComputed)
00064 {
00065 fftw_destroy_plan(M_plan);
00066 }
00067 if(M_PlanComputedf)
00068 {
00069 fftwf_destroy_plan(M_planf);
00070 }
00071 }
00072 void PrintSelf(std::ostream& os, Indent indent) const;
00073
00074 private:
00075 FFTWComplexConjugateToRealImageFilter(const Self&);
00076 void operator=(const Self&);
00077 bool M_PlanComputed;
00078 bool M_PlanComputedf;
00079 fftw_plan M_plan;
00080 fftwf_plan M_planf;
00081 };
00082
00083 }
00084
00085 #ifndef ITK_MANUAL_INSTANTIATION
00086 #include "itkFFTWComplexConjugateToRealImageFilter.txx"
00087 #endif
00088 #endif // USE_FFTW
00089 #endif