psVectorFFT.h

Go to the documentation of this file.
00001 /* @file  psVectorFFT.h
00002  * @brief Contains FFT transform related functions for psVector
00003  *
00004  * @author Robert DeSonia, MHPCC
00005  *
00006  * @version $Revision: 1.19 $ $Name:  $
00007  * @date $Date: 2007/01/23 22:47:22 $
00008  * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
00009  */
00010 
00011 #ifndef PS_VECTOR_FFT_H
00012 #define PS_VECTOR_FFT_H
00013 
00014 #include "psVector.h"
00015 
00016 /// @addtogroup MathOps Mathematical Operations
00017 /// @{
00018 
00019 /** Specify direction of FFT */
00020 typedef enum {
00021     /// psImageFFT/psVectorFFT should perform a forward FFT.
00022     PS_FFT_FORWARD = 1,
00023 
00024     /// psImageFFT/psVectorFFT should perform a reverse FFT.
00025     PS_FFT_REVERSE = 2,
00026 
00027     /// psImageFFT/psVectorFFT should perform a reverse FFT with a real result.
00028     PS_FFT_REAL_RESULT = 4
00029 } psFFTFlags;
00030 
00031 
00032 /** Forward and reverse FFT calculations.
00033  *
00034  *  This takes as input the vector of interest (in) and the direction
00035  *  (direction), which is specified by an enumerated type psFftDirection.
00036  *  The input vector may be of type psF32 or psC32, the result is always
00037  *  psC32. If the input vector is psF32, the direction must be forward.
00038  *
00039  *  @return psVector* the FFT transformation result
00040  */
00041 psVector* psVectorFFT(
00042     psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
00043     const psVector* in,                ///< the vector to apply transform to
00044     psFFTFlags direction               ///< the direction of the transform
00045 );
00046 
00047 /** extract the real portion of a complex vector
00048  *
00049  *  @return psVector*   real portion of the input vector.
00050  */
00051 psVector* psVectorReal(
00052     psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
00053     const psVector* in                ///< the psVector to extract real portion from
00054 );
00055 
00056 /** extract the imaginary portion of a complex vector
00057  *
00058  *  @return psVector*   imaginary portion of the input vector.
00059  */
00060 psVector* psVectorImaginary(
00061     psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
00062     const psVector* in                 ///< the psVector to extract imaginary portion from
00063 );
00064 
00065 /** creates a complex vector from separate real and imaginary vectors
00066  *
00067  *  @return psVector*   resulting complex vector
00068  */
00069 psVector* psVectorComplex(
00070     psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
00071     const psVector* real,              ///< the real vector
00072     const psVector* imag               ///< the imaginary vector
00073 );
00074 
00075 /** computes the complex conjugate of a vector
00076  *
00077  *  @return psVector*   the complex conjugate of the 'in' vector
00078  */
00079 psVector* psVectorConjugate(
00080     psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
00081     const psVector* in                 ///< the psVector to compute conjugate of
00082 );
00083 
00084 /** computes the power spectrum of a vector
00085  *
00086  *  @return psVector*   the power spectrum of the 'in' vector
00087  */
00088 psVector* psVectorPowerSpectrum(
00089     psVector* out,                     ///< a psVector to recycle.  If NULL, a new psVector is made.
00090     const psVector* in                 ///< the psVector to power spectrum of
00091 );
00092 
00093 /// @}
00094 #endif // #ifndef PS_VECTOR_FFT_H

Generated on Fri Feb 2 22:24:35 2007 for pslib by  doxygen 1.5.1