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: 2003/11/10 18:51:52 $
00007   Version:   $Revision: 1.2 $
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 #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   // these should be defined in every FFT filter class
00053   virtual void GenerateData();  // generates output from input
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&); //purposely not implemented
00076   void operator=(const Self&); //purposely not implemented
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

Generated at Tue Mar 29 23:51:13 2005 for ITK by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2000