GClasses
GClasses::GFourier Class Reference

Detailed Description

Fourier transform.

#include <GFourier.h>

Static Public Member Functions

static void fft (size_t arraySize, struct ComplexNumber *pComplexNumberArray, bool bForward)
 This will do a Fast Forier Transform. arraySize must be a power of 2. If bForward is false, it will perform the reverse transform. More...
 
static void fft2d (size_t arrayWidth, size_t arrayHeight, struct ComplexNumber *p2DComplexNumberArray, bool bForward)
 2D Fast Forier Transform. nArrayWidth must be a power of 2. nArrayHeight must be a power of 2. If bForward is false, it will perform the reverse transform. More...
 
static void fftArrayToImage (struct ComplexNumber *pArray, int nArrayWidth, int nOneThirdHeight, GImage *pImage, bool normalize)
 nArrayWidth is the width of the array. nOneThirdHeight is one third the height of the array. pImage is assumed to already be allocated and set to the size of the image embedded in the array. normalize specifies whether or not to ajust the pixel values to use their full range. More...
 
static struct ComplexNumberimageToFftArray (GImage *pImage, int *pArrayWidth, int *pOneThirdHeight)
 pArrayWidth returns the width of the array and pOneThirdHeight returns one third the height of the array (in other words, the height used by each of the three RGB channels) More...
 
static void test ()
 Performs unit tests for this class. Throws an exception if there is a failure. More...
 

Member Function Documentation

static void GClasses::GFourier::fft ( size_t  arraySize,
struct ComplexNumber pComplexNumberArray,
bool  bForward 
)
static

This will do a Fast Forier Transform. arraySize must be a power of 2. If bForward is false, it will perform the reverse transform.

static void GClasses::GFourier::fft2d ( size_t  arrayWidth,
size_t  arrayHeight,
struct ComplexNumber p2DComplexNumberArray,
bool  bForward 
)
static

2D Fast Forier Transform. nArrayWidth must be a power of 2. nArrayHeight must be a power of 2. If bForward is false, it will perform the reverse transform.

static void GClasses::GFourier::fftArrayToImage ( struct ComplexNumber pArray,
int  nArrayWidth,
int  nOneThirdHeight,
GImage pImage,
bool  normalize 
)
static

nArrayWidth is the width of the array. nOneThirdHeight is one third the height of the array. pImage is assumed to already be allocated and set to the size of the image embedded in the array. normalize specifies whether or not to ajust the pixel values to use their full range.

static struct ComplexNumber* GClasses::GFourier::imageToFftArray ( GImage pImage,
int *  pArrayWidth,
int *  pOneThirdHeight 
)
static

pArrayWidth returns the width of the array and pOneThirdHeight returns one third the height of the array (in other words, the height used by each of the three RGB channels)

static void GClasses::GFourier::test ( )
static

Performs unit tests for this class. Throws an exception if there is a failure.