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

itkFFTWComplexConjugateToRealImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkFFTWComplexConjugateToRealImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/09/08 17:12:20 $
00007   Version:   $Revision: 1.5 $
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 __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 //#error Invalid Type Listed for TPixel
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   // these should be defined in every FFT filter class
00064   virtual void GenerateData();  // generates output from input
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&); //purposely not implemented
00081   void operator=(const Self&); //purposely not implemented
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   // these should be defined in every FFT filter class
00118   virtual void GenerateData();  // generates output from input
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&); //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 "itkFFTWComplexConjugateToRealImageFilter.txx"
00144 #endif
00145 #endif // defined(USE_FFTWF) || defined(USE_FFTWD)
00146 #endif //__itkFFTWComplexConjugateToRealImageFilter_h

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