26 #ifndef GRT_FAST_FOURIER_TRANSFORM_HEADER
27 #define GRT_FAST_FOURIER_TRANSFORM_HEADER
29 #include "../../Util/GRTCommon.h"
30 #include "../../CoreModules/GRTBase.h"
46 bool init(
const unsigned int windowSize,
const unsigned int windowFunction = RECTANGULAR_WINDOW,
const bool computeMagnitude =
true,
const bool computePhase =
true,
bool enableZeroPadding =
true);
53 Float getAveragePower();
54 Float *getMagnitudeDataPtr();
55 Float *getPhaseDataPtr();
56 Float *getPowerDataPtr();
58 UINT getFFTSize(){
return windowSize; }
62 bool realFFT(
const VectorFloat &realIn, Float *realOut, Float *imagOut );
63 bool FFT(
int NumSamples,
bool InverseTransform,Float *realIn, Float *imagIn, Float *realOut, Float *imagOut);
64 int numberOfBitsNeeded(
int PowerOfTwo);
65 int reverseBits(
int index,
int NumBits);
67 inline int fastReverseBits(
const int i,
const int NumBits);
68 inline bool isPowerOfTwo(
const unsigned int x);
70 unsigned int windowSize;
71 unsigned int windowFunction;
73 bool computeMagnitude;
75 bool enableZeroPadding;
84 const static int MAX_FAST_BITS = 16;
88 enum WindowFunctionOptions{RECTANGULAR_WINDOW=0,BARTLETT_WINDOW,HAMMING_WINDOW,HANNING_WINDOW};
94 #endif //GRT_FAST_FOURIER_TRANSFORM_HEADER