FFT¶
- MLModule¶
genre
authors
package
dll
definition
keywords
Purpose¶
The FFT module calculates a discrete n-D fourier transform of the given image.
Usage¶
The scalar volume to be processed is attached to input0.
Details¶
A separable fast Fourier transform is applied along the image dimensions indicated by the user. The discrete nD FFT is computed using the kissFFT library, version 1.2.8. by Mark Borgerding. The fourier transform is computed for a sequence of N real or complex numbers x<sub>0</sub>,…,x<sub>N-1</sub>. The sequence is transformed into X<sub>0</sub>,…,X<sub>N-1</sub> according to the formula:
where i is the imaginary unit.
The inverse DFT is given by the formula:
According to the user indicated output type either the complex result, it’s real or imaginary component, the magnitude,
or the phase,
will be computed.
In order to perform a windowed FFT the following windows have been provided and can be selected in the Filter field. The windowing is applied before the transformation, and should only be used when calculating the (forward) FFT.
Cosine window:
von Hann window:
Hamming window:
Exponential window:
Kaiser window:
Sine Bell window:
Sine Bell
Lanczos window:
Blackman window:
The default parameters have been selected from Matlab.
If Shift frequency center is selected the low frequencies can be reordered to the center of the spectrum. By selecting is the same as the fftshift in Matlab. Therefore the image is swapped iteratively along each dimension. In 2D this leads to a swapping of the first quadrant with the third and the second quadrant with the fourth.
Windows¶
Default Panel¶
Input Fields¶
input0¶
- name: input0, type: Image¶
input0 must be a scalar volume or complex volume, as it will be implicitly cast to a complex data type. The dimensions of input0 can be chosen arbitrarily.
Output Fields¶
output0¶
- name: output0, type: Image¶
The output is the result of the FFT as described above. Depending of the Output Type (see below) the datatype of the output image is either std::complex<MLdouble> or MLdouble.
Parameter Fields¶
Field Index¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Visible Fields¶
x¶
- name: xDim, type: Bool, default: TRUE¶
Select the dimensions to process for the FFT. The page size in this dimension will be set to the image extent.
Size x¶
- name: xDimSize, type: Integer, default: 0¶
Size y¶
- name: yDimSize, type: Integer, default: 0¶
Size z¶
- name: zDimSize, type: Integer, default: 0¶
Size c¶
- name: cDimSize, type: Integer, default: 0¶
Size t¶
- name: tDimSize, type: Integer, default: 0¶
Size u¶
- name: uDimSize, type: Integer, default: 0¶
Calculate inverse FFT¶
- name: calculateInverse, type: Bool, default: FALSE¶
Output¶
- name: outputType, type: Enum, default: Complex¶
Values:
Title |
Name |
|---|---|
Complex |
Complex |
Magnitude |
Magnitude |
Phase |
Phase |
Real |
Real |
Imaginary |
Imaginary |
Shift Frequency Center¶
- name: shiftFrequencyCenter, type: Bool, default: TRUE¶
Reorders frequencies to have low frequencies in center
Window¶
- name: windowFunction, type: Enum, default: None¶
Values:
Title |
Name |
|---|---|
None |
None |
Cosine |
Cosine |
von Hann |
vonHann |
Hamming |
Hamming |
Exponential |
Exponential |
Gaussian |
Gaussian |
Sine Bell |
SineBell |
Sine Bell Square |
SineBellSquare |
Tukey |
Tukey |
Lanczos |
Lanczos |
Blackman |
Blackman |
Frequency unit¶
- name: frequencyUnit, type: Enum, default: Keep original¶
Values:
Title |
Name |
|---|---|
Keep original |
Keep original |
Radians/Voxel |
Radians/Voxel |
Periods/Millimeter |
Periods/Millimeter |
Keep sizes¶
- name: keepFFTSize, type: Bool, default: FALSE¶