Class Dft1dFast

java.lang.Object
imagingbook.spectral.dft.Dft1dFast
All Implemented Interfaces:
Dft1d
Direct Known Subclasses:
Dft1dFast.Double, Dft1dFast.Float

public abstract class Dft1dFast extends Object

FFT (fast) implementation of the DFT, based on the JTransforms package by Piotr Wendykier (see https://github.com/wendykierp/JTransforms). Note that this class has no public constructor - instantiate sub-class Dft1dFast.Float or Dft1dFast.Double instead, as shown below. See Sec. 18.4.2 of [1] for additional details.

Usage example (for float data):

 float[] re = {1, 2, 3, 4, 5, 3, 0};
 float[] im = {0, 0, 0, 0, 0, 0, 0};
 Dft1d.Float dft = new Dft1dFast.Float(re.length);
 dct.forward(re, im);  // re/im now is the DFT spectrum
 dct.inverse(re, im);  // re/im now is the original signal 
 ...
 

[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

  • Method Details

    • getSize

      public int getSize()
      Description copied from interface: Dft1d
      Returns the size of this DFT (length of data vectors).
      Specified by:
      getSize in interface Dft1d
      Returns:
      the size of this DFT
    • getScalingMode

      public ScalingMode getScalingMode()
      Description copied from interface: Dft1d
      Returns the scaling mode of this DFT (see ScalingMode).
      Specified by:
      getScalingMode in interface Dft1d
      Returns:
      the scaling mode of this DFT.