** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: filter.h,v 1.10 2000/07/06 08:30:30 kevin Exp $
+** $Id: filter.h,v 1.11 2000/07/06 18:37:24 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
#ifndef FILTER_H
#define FILTER_H
+
class SignalFilter {
public:
FILTER_METHOD_INVALID,
FILTER_METHOD_CONVOLUTION,
FILTER_METHOD_FOURIER,
+ FILTER_METHOD_FOURIER_TABLE,
FILTER_METHOD_FFT,
FILTER_METHOD_FFTW,
+ FILTER_METHOD_RFFTW
} FilterMethodID;
typedef enum {
static const char FILTER_METHOD_CONVOLUTION_STR[]= "convolution";
static const char FILTER_METHOD_FOURIER_STR[]= "fourier";
+ static const char FILTER_METHOD_FOURIER_TABLE_STR[]="fourier_table";
static const char FILTER_METHOD_FFT_STR[]= "fft";
static const char FILTER_METHOD_FFTW_STR[]= "fftw";
+ static const char FILTER_METHOD_RFFTW_STR[]= "rfftw";
static const char DOMAIN_FREQUENCY_STR[]="frequency";
static const char DOMAIN_SPATIAL_STR[]="spatial";
void filterSignal (const float input[], double output[]) const;
static void finiteFourierTransform (const double input[], complex<double> output[], const int n, const int direction);
-
static void finiteFourierTransform (const complex<double> input[], complex<double> output[], const int n, const int direction);
+ static void finiteFourierTransform (const complex<double> input[], double output[], const int n, const int direction);
void finiteFourierTransform (const double input[], complex<double> output[], const int direction) const;
-
void finiteFourierTransform (const complex<double> input[], complex<double> output[], const int direction) const;
+ void finiteFourierTransform (const complex<double> input[], double output[], const int direction) const;
void setTraceLevel (int traceLevel) {m_traceLevel = traceLevel; }
double* m_vecFourierSinTable;
complex<double>* m_complexVecFilter;
#ifdef HAVE_FFTW
- fftw_plan m_planForward, m_planBackward;
- fftw_complex* m_vecFftInput;
+ fftw_real* m_vecRealFftInput;
+ rfftw_plan m_realPlanForward, m_realPlanBackward;
+ fftw_complex* m_vecComplexFftInput;
+ fftw_plan m_complexPlanForward, m_complexPlanBackward;
#else
complex<double>* m_vecFftInput;
#endif