Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkFFTWRealToComplexConjugateImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkFFTWRealToComplexConjugateImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/09/08 17:12:21 $
00007   Version:   $Revision: 1.6 $
00008 
00009   Copyright (c) 2002 Insight Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkFFTWRealToComplexConjugateImageFilter_h
00018 #define __itkFFTWRealToComplexConjugateImageFilter_h
00019 #if defined(USE_FFTWF) || defined(USE_FFTWD)
00020 #include "itkFFTRealToComplexConjugateImageFilter.h"
00021 #include "fftw3.h"
00022 
00023 
00024 
00025 namespace itk
00026 {
00037 template <class TPixel, unsigned int Dimension = 3>
00038 class ITK_EXPORT FFTWRealToComplexConjugateImageFilter :
00039     public FFTRealToComplexConjugateImageFilter<TPixel,Dimension>
00040 {
00041     //not a real working class.
00042 };
00043 
00044 template <unsigned int Dimension>
00045 class ITK_EXPORT FFTWRealToComplexConjugateImageFilter<float,Dimension> :
00046     public FFTRealToComplexConjugateImageFilter<float,Dimension>
00047 {
00048 public:
00049   typedef float TPixel;
00050   typedef FFTWRealToComplexConjugateImageFilter Self;
00051   typedef FFTRealToComplexConjugateImageFilter<TPixel,Dimension> Superclass;
00052   typedef SmartPointer<Self> Pointer;
00053   typedef SmartPointer<const Self> constPointer;
00054 
00056   typedef typename Superclass::TInputImageType TInputImageType;
00057   typedef typename Superclass::TOutputImageType TOutputImageType;
00058 
00060   itkNewMacro(Self);
00061 
00063   itkTypeMacro(FFTWRealToComplexConjugateImageFilter,
00064                FFTRealToComplexConjugateImageFilter);
00065 
00066   //
00067   // these should be defined in every FFT filter class
00068   virtual void GenerateData();  // generates output from input
00069   void PrintSelf(std::ostream& os,Indent indent);
00070 
00071 protected:
00072   FFTWRealToComplexConjugateImageFilter() {
00073     M_PlanComputed = false;
00074     M_PlanComputed = false;
00075   }
00076   ~FFTWRealToComplexConjugateImageFilter()
00077   {
00078     if(M_PlanComputed)
00079       {
00080       fftwf_destroy_plan(M_plan);
00081       }
00082   }
00083   void PrintSelf(std::ostream& os, Indent indent) const;
00084   virtual bool FullMatrix();
00085 private:
00086   FFTWRealToComplexConjugateImageFilter(const Self&); //purposely not implemented
00087   void operator=(const Self&); //purposely not implemented
00088   bool M_PlanComputed;
00089   fftwf_plan M_plan;
00090 };
00091 
00092 template <unsigned int Dimension>
00093 class ITK_EXPORT FFTWRealToComplexConjugateImageFilter<double,Dimension> :
00094     public FFTRealToComplexConjugateImageFilter<double,Dimension>
00095 {
00096 public:
00097   typedef double TPixel;
00098   typedef FFTWRealToComplexConjugateImageFilter Self;
00099   typedef FFTRealToComplexConjugateImageFilter<TPixel,Dimension> Superclass;
00100   typedef SmartPointer<Self> Pointer;
00101   typedef SmartPointer<const Self> constPointer;
00102 
00104   typedef typename Superclass::TInputImageType TInputImageType;
00105   typedef typename Superclass::TOutputImageType TOutputImageType;
00106 
00108   itkNewMacro(Self);
00109 
00111   itkTypeMacro(FFTWRealToComplexConjugateImageFilter,
00112                FFTRealToComplexConjugateImageFilter);
00113 
00114   //
00115   // these should be defined in every FFT filter class
00116   virtual void GenerateData();  // generates output from input
00117   void PrintSelf(std::ostream& os,Indent indent);
00118 
00119 
00120 protected:
00121   FFTWRealToComplexConjugateImageFilter() {
00122     M_PlanComputed = false;
00123   }
00124   ~FFTWRealToComplexConjugateImageFilter()
00125   {
00126     if(M_PlanComputed)
00127       {
00128       fftw_destroy_plan(M_plan);
00129       }
00130   }
00131   void PrintSelf(std::ostream& os, Indent indent) const;
00132   virtual bool FullMatrix();
00133 private:
00134   FFTWRealToComplexConjugateImageFilter(const Self&); //purposely not implemented
00135   void operator=(const Self&); //purposely not implemented
00136   bool M_PlanComputed;
00137   fftw_plan M_plan;
00138 };
00139 
00140 } // namespace itk
00141 
00142 #ifndef ITK_MANUAL_INSTANTIATION
00143 #include "itkFFTWRealToComplexConjugateImageFilter.txx"
00144 #endif
00145 #endif // defined(USE_FFTWF) || defined(USE_FFTWD)
00146 #endif //__itkFFTWRealToComplexConjugateImageFilter_h
00147 

Generated at Fri Sep 8 03:04:10 2006 for ITK by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2000