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 {
00036 template <class TPixel, unsigned int Dimension = 3>
00037 class ITK_EXPORT FFTWRealToComplexConjugateImageFilter :
00038     public FFTRealToComplexConjugateImageFilter<TPixel,Dimension>
00039 {
00040     //not a real working class.
00041 };
00042 
00043 template <unsigned int Dimension>
00044 class ITK_EXPORT FFTWRealToComplexConjugateImageFilter<float,Dimension> :
00045     public FFTRealToComplexConjugateImageFilter<float,Dimension>
00046 {
00047 public:
00048   typedef float TPixel;
00049   typedef FFTWRealToComplexConjugateImageFilter Self;
00050   typedef FFTRealToComplexConjugateImageFilter<TPixel,Dimension> Superclass;
00051   typedef SmartPointer<Self> Pointer;
00052   typedef SmartPointer<const Self> constPointer;
00053 
00055   typedef typename Superclass::TInputImageType TInputImageType;
00056   typedef typename Superclass::TOutputImageType TOutputImageType;
00057 
00059   itkNewMacro(Self);
00060 
00062   itkTypeMacro(FFTWRealToComplexConjugateImageFilter,
00063                FFTRealToComplexConjugateImageFilter);
00064 
00065   //
00066   // these should be defined in every FFT filter class
00067   virtual void GenerateData();  // generates output from input
00068   void PrintSelf(std::ostream& os,Indent indent);
00069 
00070 protected:
00071   FFTWRealToComplexConjugateImageFilter() {
00072     M_PlanComputed = false;
00073     M_PlanComputed = false;
00074   }
00075   ~FFTWRealToComplexConjugateImageFilter()
00076   {
00077     if(M_PlanComputed)
00078       {
00079       fftwf_destroy_plan(M_plan);
00080       }
00081   }
00082   void PrintSelf(std::ostream& os, Indent indent) const;
00083   virtual bool FullMatrix();
00084 private:
00085   FFTWRealToComplexConjugateImageFilter(const Self&); //purposely not implemented
00086   void operator=(const Self&); //purposely not implemented
00087   bool M_PlanComputed;
00088   fftwf_plan M_plan;
00089 };
00090 
00091 template <unsigned int Dimension>
00092 class ITK_EXPORT FFTWRealToComplexConjugateImageFilter<double,Dimension> :
00093     public FFTRealToComplexConjugateImageFilter<double,Dimension>
00094 {
00095 public:
00096   typedef double TPixel;
00097   typedef FFTWRealToComplexConjugateImageFilter Self;
00098   typedef FFTRealToComplexConjugateImageFilter<TPixel,Dimension> Superclass;
00099   typedef SmartPointer<Self> Pointer;
00100   typedef SmartPointer<const Self> constPointer;
00101 
00103   typedef typename Superclass::TInputImageType TInputImageType;
00104   typedef typename Superclass::TOutputImageType TOutputImageType;
00105 
00107   itkNewMacro(Self);
00108 
00110   itkTypeMacro(FFTWRealToComplexConjugateImageFilter,
00111                FFTRealToComplexConjugateImageFilter);
00112 
00113   //
00114   // these should be defined in every FFT filter class
00115   virtual void GenerateData();  // generates output from input
00116   void PrintSelf(std::ostream& os,Indent indent);
00117 
00118 
00119 protected:
00120   FFTWRealToComplexConjugateImageFilter() {
00121     M_PlanComputed = false;
00122   }
00123   ~FFTWRealToComplexConjugateImageFilter()
00124   {
00125     if(M_PlanComputed)
00126       {
00127       fftw_destroy_plan(M_plan);
00128       }
00129   }
00130   void PrintSelf(std::ostream& os, Indent indent) const;
00131   virtual bool FullMatrix();
00132 private:
00133   FFTWRealToComplexConjugateImageFilter(const Self&); //purposely not implemented
00134   void operator=(const Self&); //purposely not implemented
00135   bool M_PlanComputed;
00136   fftw_plan M_plan;
00137 };
00138 
00139 } // namespace itk
00140 
00141 #ifndef ITK_MANUAL_INSTANTIATION
00142 #include "itkFFTWRealToComplexConjugateImageFilter.txx"
00143 #endif
00144 #endif // defined(USE_FFTWF) || defined(USE_FFTWD)
00145 #endif //__itkFFTWRealToComplexConjugateImageFilter_h

Generated at Wed May 24 23:07:58 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000