Into

Modules

Documentation

classPiiFourierTransform

#include <PiiFourierTransform.h>

An operation that calculates the fast fourier transform for any matrix.

Inherits PiiDefaultOperation

Description

Inputs

inputthe input matrix. If direction == Inverse, the type of the input matrix must be a PiiMatrix<complex<float> > or a PiiMatrix<complex<double> >. Otherwise, any numeric or complex matrix will do.

Outputs

outputthe (forward or inverse) Fourier transform of the input matrix (PiiMatrix<complex<float> > or PiiMatrix<complex<double> >).
power spectrumreal-valued power spectrum of the transformed matrix. Used only in Forward transformation.

Properties

The direction of the transform.

bool

If this flag is set to true, the operation shifts the zero-frequency component to the center of the spectrum.

bool

If this flag is true, the mean value of the input is subtracted before applying the FFT.

Public types

enum
{ Forward, Inverse }

FFT direction.

Constructors and destructor

(
  • Data * data
)

Public member functions

void
void
(
  • bool shift
)
void
(
  • bool subtractMean
)
bool
( )
bool

Protected member functions

(
  • Data * data
)

Property details

  • FftDirection direction

    [read, write]

    The direction of the transform.

    The default is Forward.

  • bool shift

    [read, write]

    If this flag is set to true, the operation shifts the zero-frequency component to the center of the spectrum.

    For vectors, FftShift swaps the left and right halves. For matrices, it swaps the first and fourth quadrants and the second and third quadrants. FftShift is useful for visualizing the Fourier transform with the zero- frequency component in the middle of the spectrum. The default value is false.

  • bool subtractMean

    [read, write]

    If this flag is true, the mean value of the input is subtracted before applying the FFT.

    This makes the zero-frequency component zero and helps in visualizing the result. The default is false. This flag has no effect in inverse transform.

Enumeration details

  • enum FftDirection

    FFT direction.

    • Forward - calculates FFT.

    • Inverse - calculates inverse FFT.

Function details

  • PiiFourierTransform

    (
    • Data * data
    )
    [protected]
  • PiiFourierTransform

    ()
  • FftDirection direction

    ()
  • void setDirection

    ( )
  • void setShift

    (
    • bool shift
    )
  • void setSubtractMean

    (
    • bool subtractMean
    )
  • bool shift

    ()
  • bool subtractMean

    ()
Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.