Isis 3 Developer Reference
|
Fourier Transform class. More...
#include <FourierTransform.h>
Public Member Functions | |
FourierTransform () | |
Constructs the FourierTransform object. More... | |
~FourierTransform () | |
Destroys the FourierTransform object. More... | |
std::vector< std::complex< double > > | Transform (std::vector< std::complex< double > > input) |
Applies the Fourier transform on the input data and returns the result. More... | |
std::vector< std::complex< double > > | Inverse (std::vector< std::complex< double > > input) |
Applies the inverse Fourier transform on the input data and returns the result. More... | |
bool | IsPowerOfTwo (int n) |
Checks to see if the input integer is a power of two. More... | |
int | lg (int n) |
This function returns the floor of log2(n) More... | |
int | BitReverse (int n, int x) |
Reverses the binary representation of the input integer in the number of bits specified. More... | |
int | NextPowerOfTwo (int n) |
This function returns the next power of two greater than or equal to n. More... | |
Fourier Transform class.
This class is used to apply a Fourier transform to a vector of complex data as well as the inverse Fourier transform. Applying the Fourier transform on data in the spatial domain will convert it to data in the Fourier (or frequency) domain. The inverse transform takes data from the frequency domain to the spatial.
If you would like to see FourierTransform being used in implementation, see fft.cpp or ifft.cpp.
Isis::FourierTransform::FourierTransform | ( | ) |
Constructs the FourierTransform object.
Isis::FourierTransform::~FourierTransform | ( | ) |
Destroys the FourierTransform object.
int Isis::FourierTransform::BitReverse | ( | int | n, |
int | x | ||
) |
Reverses the binary representation of the input integer in the number of bits specified.
bitReverse(n,x) = n/2*(2^-a1 + 2^-a2 + ... + 2^-ak) where x = 2^a1 + 2^a2 + ... + 2^ak
n | The number of bits |
x | The input integer |
std::vector< std::complex< double > > Isis::FourierTransform::Inverse | ( | std::vector< std::complex< double > > | input | ) |
Applies the inverse Fourier transform on the input data and returns the result.
input | The data to be transformed. |
bool Isis::FourierTransform::IsPowerOfTwo | ( | int | n | ) |
Checks to see if the input integer is a power of two.
n | The input integer |
int Isis::FourierTransform::lg | ( | int | n | ) |
This function returns the floor of log2(n)
n | The input integer |
int Isis::FourierTransform::NextPowerOfTwo | ( | int | n | ) |
This function returns the next power of two greater than or equal to n.
If n is a power of two, it returns n.
n | The number of bits |
Referenced by Isis::ForstnerOperator::Interest().
std::vector< std::complex< double > > Isis::FourierTransform::Transform | ( | std::vector< std::complex< double > > | input | ) |
Applies the Fourier transform on the input data and returns the result.
input | The data to be transformed. |
References Isis::PI.
Referenced by Isis::ForstnerOperator::Interest().