net.sarcommand.fft
Class FFT2

java.lang.Object
  extended by net.sarcommand.fft.FourierTransform
      extended by net.sarcommand.fft.FourierTransform2D
          extended by net.sarcommand.fft.FFT2

public class FFT2
extends FourierTransform2D

Author:
A. O. Ergueven, Torsten Heup
This class implements a 2-dimensional fast fourier transform using the Cooley-Tukey radix2 algorithm. This algorithm is on average the fastest of the fourier transforms in this package, however, it only computes for vectors with a power of 2 width. Therefore, the data to be transformed will be zero padded. This implementation determines the 2-dimensional FFT by computing a 1-dimensional FFT for each row and then again for each column.

Field Summary
 
Fields inherited from class net.sarcommand.fft.FourierTransform2D
image
 
Constructor Summary
FFT2()
          Creates a new FFT2 instance.
 
Method Summary
 ComplexSignal createPowerOf2Image(ComplexSignal intputData)
          Transforms the given image to a power of two image by padding it with zeros accordingly.
 void inverseTransform(ComplexSignal inputData, net.sarcommand.util.ProgressNotifier notifier)
          Apply the inverse fourier transform to the given input data.
 void transform(ComplexSignal inputData, net.sarcommand.util.ProgressNotifier notifier)
          Apply the fourier transform to the given input data.
 
Methods inherited from class net.sarcommand.fft.FourierTransform2D
fourierSignalToGrayscale, getCol, getRow, imageToSignal, inverseTransform, isPowerOf2, isPowerOf2, putCol, putRow, realToGrayscale, shiftQuadrants, transform
 
Methods inherited from class net.sarcommand.fft.FourierTransform
computeUnityRoot, convertToBytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FFT2

public FFT2()
Creates a new FFT2 instance.

Method Detail

transform

public void transform(ComplexSignal inputData,
                      net.sarcommand.util.ProgressNotifier notifier)
Apply the fourier transform to the given input data.

Specified by:
transform in class FourierTransform
Parameters:
inputData - float[] containing the input pixels.

inverseTransform

public void inverseTransform(ComplexSignal inputData,
                             net.sarcommand.util.ProgressNotifier notifier)
Apply the inverse fourier transform to the given input data.

Specified by:
inverseTransform in class FourierTransform
Parameters:
inputData - float[] containing the input pixels.

createPowerOf2Image

public ComplexSignal createPowerOf2Image(ComplexSignal intputData)
Transforms the given image to a power of two image by padding it with zeros accordingly. The result will be stored in the

Parameters:
intputData - input data