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

vnl_fft_3d.h

Go to the documentation of this file.
00001 // This is vxl/vnl/algo/vnl_fft_3d.h
00002 #ifndef vnl_fft_3d_h_
00003 #define vnl_fft_3d_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief In-place 3D fast fourier transform
00010 // \author fsm
00011 
00012 #include <vnl/vnl_matrix.h>
00013 #include <vnl/algo/vnl_fft_base.h>
00014 
00015 //: In-place 3D fast fourier transform
00016 
00017 template <class T>
00018 struct vnl_fft_3d : public vnl_fft_base<3, T>
00019 {
00020   typedef vnl_fft_base<3, T> base;
00021 
00022   //: constructor takes size of signal.
00023   vnl_fft_3d(int M, int N,int Q) {
00024     base::factors_[0].resize(M);
00025     base::factors_[1].resize(N);
00026     base::factors_[2].resize(Q);
00027   }
00028 
00029   //: dir = +1/-1 according to direction of transform.
00030   void transform(vnl_matrix<vcl_complex<T> > &signal, int dir)
00031   { base::transform(signal.data_block(), dir); }
00032 
00033   //: forward FFT
00034   void fwd_transform(vnl_matrix<vcl_complex<T> > &signal)
00035   { transform(signal, +1); }
00036 
00037   //: backward (inverse) FFT
00038   void bwd_transform(vnl_matrix<vcl_complex<T> > &signal)
00039   { transform(signal, -1); }
00040 
00041   //: return size of signal.
00042   unsigned rows() const { return base::factors_[0].number(); }
00043   unsigned cols() const { return base::factors_[1].number(); }
00044 };
00045 
00046 #endif // vnl_fft_3d_h_

Generated at Thu May 25 00:19:22 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000