![]() |
ImFusion SDK 4.3
|
Fast Fourier Transform on the CPU. More...
Fast Fourier Transform on the CPU.
For version 1.6, a complete redesign of this functionality occurred:
Functions | |
| template<typename T> | |
| bool | toFrequencyDomain (const std::vector< T > &in, std::vector< std::complex< T > > &out, std::vector< double > *frequencies=nullptr, T *suppressZero=nullptr) |
| Forward transformation of a real-valued 1D signal. | |
| template<typename T> | |
| bool | toFrequencyDomain (const TypedImage< T > &in, TypedImage< T > *&outReal, TypedImage< T > *&outImag, std::vector< double > *frequenciesX=nullptr, std::vector< double > *frequenciesY=nullptr) |
| template<typename T> | |
| bool | toTimeDomain (const std::vector< std::complex< T > > &in, std::vector< T > &out) |
| Backwards transformation to a real-valued 1D signal. | |
| template<typename T> | |
| bool | toFrequencyDomain (const std::vector< std::complex< T > > &in, std::vector< std::complex< T > > &out, std::vector< double > *frequencies=nullptr) |
| Forward transformation of a 1D signal. | |
| template<typename T> | |
| bool | toTimeDomain (const std::vector< std::complex< T > > &in, std::vector< std::complex< T > > &out) |
| Backwards transformation of a 1D signal. | |
| template<typename T> | |
| bool | toTimeDomain (const TypedImage< T > &inReal, const TypedImage< T > &inImag, TypedImage< T > *&outReal, TypedImage< T > *&outImag) |
| template<typename T> | |
| bool | toTimeDomain (const TypedImage< T > &inReal, const TypedImage< T > &inImag, TypedImage< T > *&outAmp) |
| template<typename T> | |
| bool | inplaceTransform1D (std::vector< std::complex< T > > &workbuffer, bool forward) |
| Transforms a suitably padded buffer in either direction, without normalization or any other convinience. | |
| void | constructFrequencyAxis (std::vector< double > &freqs, int signalDuration, int transformDuration) |
| Computes the frequency values of the bins for a forward transformation, in units of signal length base frequency. | |
| bool | sizeIsFine (int size) |
| Checks if a buffer size is compatible, i.e. of length 2^n. | |
| int | nextValidSize (int size) |
| Returns the smallest padded buffer size for any given input size, or -1 if the input size cannot not yield any useful FFT result. | |
| bool toFrequencyDomain | ( | const std::vector< T > & | in, |
| std::vector< std::complex< T > > & | out, | ||
| std::vector< double > * | frequencies = nullptr, | ||
| T * | suppressZero = nullptr ) |
Forward transformation of a real-valued 1D signal.
Can optionally compute the frequencies for the resulting bins in units of the input duration base frequency, i.e. the frequency of a single full oscillation with the length of the input array is 1. Can also subtract (and return) the average signal intensity before executing the transformation. Supported data types are float and double.
| bool toTimeDomain | ( | const std::vector< std::complex< T > > & | in, |
| std::vector< T > & | out ) |
Backwards transformation to a real-valued 1D signal.
Note that this method performs no checks on whether the result is truly real-valued, the imaginary parts are simply dumped. Supported data types are float and double.
| bool toFrequencyDomain | ( | const std::vector< std::complex< T > > & | in, |
| std::vector< std::complex< T > > & | out, | ||
| std::vector< double > * | frequencies = nullptr ) |
Forward transformation of a 1D signal.
Can optionally compute the frequencies for the resulting bins in units of the input duration base frequency, i.e. the frequency of a single full oscillation with the length of the input array is 1. Supported data types are float and double.
| bool toTimeDomain | ( | const std::vector< std::complex< T > > & | in, |
| std::vector< std::complex< T > > & | out ) |
Backwards transformation of a 1D signal.
Supported data types are float and double.
| bool inplaceTransform1D | ( | std::vector< std::complex< T > > & | workbuffer, |
| bool | forward ) |
Transforms a suitably padded buffer in either direction, without normalization or any other convinience.
Intended for advanced users and internal usage by the other methods of this class. Supported data types are float and double.