For more information on the FFTW library, see http://theory.lcs.mit.edu/~fftw/.

Since DEC machines do not have a nano-second clock, computing the best way to perform a FFT takes an awful lot of time on DEC machines. Consequently, a kludge was made -- that computation is done only for the first fftsize passed in and the same plan is used for all subsequent calls. Therefore, the FFTObjs in an application all have to use the same fftsize. This is no problem for most image-processing applications.

If there is a need for applications on Sun to use FFTs of different sizes, the kludge can be removed. A possible change, for DEC users who find that they need FFTs of different sizes, is use FFTW_ESTIMATE instead of FFTW_MEASURE. See the documentation of the FFTW library for details.

**Author:**- Lakshman

**See also:**- http://theory.lcs.mit.edu/~fftw/

## Public Member Functions | |

FFTObj (Data2D< int >, int req_fftsize) | |

Constructs the FFT for the passed in data. | |

FFTObj (Data2D< double >, int req_fftsize) | |

Constructs the FFT for the passed in data. | |

FFTObj (const FFTObj &orig) | |

This is a deep-copy constructor. | |

~FFTObj () | |

Frees resources allocated to FFTObj. | |

Data2D< double > | getRealPart () const |

To get the real part of the FFT. | |

Data2D< double > | mapRealPart () const |

The real part of the image is in "transform" space. | |

Data2D< double > | getImagPart () const |

To get the imaginary part of the FFT. | |

void | convolve (const FFTObj *filterFFTObj) |

Filtering, or convolution, of two FFTObj's may be performed using the convolve member function. | |

void | ifft () |

Performs an Inverse FFT on an FFTObj. | |

void | unscale (int additionalFactor=1) |

Unscales FFT. | |

int | getSize () const |

Returns current fftsize. | |

## Static Public Member Functions | |

static int | calcOptimumSize (int lowestSize) |

returns a number greater than lowest size that will give you speedy FFTs. |

FFTObj::FFTObj | ( | Data2D< int > | , | |

int | req_fftsize | |||

) |

Constructs the FFT for the passed in data.

The constructor requires a 2D data object and the fftsize to be specified. The FFT is faster for certain values of fft_size; use the function calcOptimumSize() to choose a fft size given your image's dimensions.

FFTObj::FFTObj | ( | Data2D< double > | , | |

int | req_fftsize | |||

) |

Constructs the FFT for the passed in data.

The constructor requires a 2D data object and the fftsize to be specified. The FFT is faster for certain values of fft_size; use the function calcOptimumSize() to choose a fft size given your image's dimensions.

FFTObj::FFTObj | ( | const FFTObj & | orig |
) |

This is a deep-copy constructor.

Pass FFTObj around either by pointer or by reference.

FFTObj::~FFTObj | ( | ) |

Frees resources allocated to FFTObj.

static int FFTObj::calcOptimumSize | ( | int | lowestSize |
) | ` [static]` |

returns a number greater than lowest size that will give you speedy FFTs.

The FFT is most efficient for a fftsize that is a multiple of small prime numbers. The static function provides the best size for a given image:

void FFTObj::convolve | ( | const FFTObj * | filterFFTObj |
) |

Filtering, or convolution, of two FFTObj's may be performed using the convolve member function.

The "this" object is changed.

** ** This will convolve the fft_image using the fft_kernel and store the result in fft_image. The fft_kernel itself is not changed. The two FFTObj's should, of course, have the same size.

Data2D<double> FFTObj::getImagPart | ( | ) | const |

To get the imaginary part of the FFT.

Data2D<double> FFTObj::getRealPart | ( | ) | const |

To get the real part of the FFT.

int FFTObj::getSize | ( | ) | const` [inline]` |

Returns current fftsize.

void FFTObj::ifft | ( | ) |

Performs an Inverse FFT on an FFTObj.

Example:

Data2D<double> FFTObj::mapRealPart | ( | ) | const |

The real part of the image is in "transform" space.

To have the pixels where you expect to see them, use:

void FFTObj::unscale | ( | int | additionalFactor = `1` |
) |

Unscales FFT.

See ifft.

Generated on Fri May 4 13:40:21 2012 for WDSS-IIw2algs by 1.4.7