FFT2D

MLModule
genre Fourier
status stable
author Tobias Böhler
package MeVisLab/Standard
dll MLFourier
definition MLFourier.def
keywords FFT, DFT, fast, fourier, transformation, inverse, 2d, sande, tukey, cooke

Purpose

The module FFT2D computes a two-dimensional (2-D) Fast Fourier Transformation of the given input image, or the inverse FFT.

The FFT will only be computed from images that have dimensions of powers of two (e.g. 512, 256, 16). Width and height need not to be identical.

Details

The FFT will be computed using the Sande-Tukey algorithm, providing a stable and considerably fast method of computing the discrete Fourier Transform.

However, this requires the images to have dimensions of 2n.

Windows

Default Panel

../../../Modules/ML/MLFourier/mhelp/Images/Screenshots/FFT2D._default.png

Input Fields

input0

name: input0, type: Image

The input image.

In case of a FFT, the input image needs to be scalar and in case of an inverse FFT, the input image needs to be of complex type.

Output Fields

output0

name: output0, type: Image

Output image showing either the FFT (complex, phase, or spectrum) or the inverse FFT, depending on the Direction.

Parameter Fields

Field Index

2D computation: Bool
Center the FFT: Bool
Direction: Enum
Output Type: Enum
Scale Factor: Double
Use logarithmic scale: Bool

Visible Fields

Direction

name: direction, type: Enum, default: Forward

Defines the operation on the input image.

Values:

Title Name Description
Forward Forward Computes a FFT.
Inverse Inverse

Computes the inverse FFT.

Note that in this mode, the input image needs to be of type complex.

Use logarithmic scale

name: logarithmicValues, type: Bool, default: TRUE

If checked, the output values are being logarithmically scales for a better visualization (see Gonzales, Woods).

Scale Factor

name: logarithmicScaleFactor, type: Double, default: 0.5

Sets the logarithmic scale factor that is used if Use logarithmic scale is checked.

Center the FFT

name: centeredValues, type: Bool, default: TRUE

If checked, the FFT will be centered so that the origin will be set to (imageWidth/2), (imageHeight/2).

Since higher frequencies can be found around the origin, this allows an intuitive visualization, especially when the spectrum is displayed. This view is often used in image processing textbooks.

2D computation

name: yComputationOn, type: Bool, default: TRUE

If checked, a 2D FFT is performed.

Otherwise, a 1D FFT is performed for all voxel columns.

Output Type

name: outputType, type: Enum, default: Complex

Defines the output type.

Values:

Title Name Description
Complex Complex Complex data type.
Spectrum Spectrum Scalar data type.
Phase Phase Scalar data type.