00001
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
00009
00010
00011
00012 #include <vnl/vnl_matrix.h>
00013 #include <vnl/algo/vnl_fft_base.h>
00014
00015
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
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
00030 void transform(vnl_matrix<vcl_complex<T> > &signal, int dir)
00031 { base::transform(signal.data_block(), dir); }
00032
00033
00034 void fwd_transform(vnl_matrix<vcl_complex<T> > &signal)
00035 { transform(signal, +1); }
00036
00037
00038 void bwd_transform(vnl_matrix<vcl_complex<T> > &signal)
00039 { transform(signal, -1); }
00040
00041
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_