Index: trunk/psLib/src/fft/psImageFFT.h
===================================================================
--- trunk/psLib/src/fft/psImageFFT.h	(revision 11248)
+++ trunk/psLib/src/fft/psImageFFT.h	(revision 11703)
@@ -1,11 +1,12 @@
-/* @file  psImageFFT.h
- * @brief Contains FFT transform related functions for psImage
- *
- * @author Robert DeSonia, MHPCC
- *
- * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-01-23 22:47:22 $
- * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- */
+/// @file  psImageFFT.h
+/// @brief Contains FFT transform related functions for psImage
+///
+/// @author Paul Price, IfA
+/// @author Robert DeSonia, MHPCC
+///
+/// @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+/// @date $Date: 2007-02-08 04:17:58 $
+/// Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
+///
 
 #ifndef PS_IMAGE_FFT_H
@@ -13,69 +14,50 @@
 
 #include "psImage.h"
-#include "psVectorFFT.h"               // for psFFTFlags
 
 /// @addtogroup MathOps Mathematical Operations
 /// @{
 
-/** Forward and reverse FFT calculations.
- *
- *  This takes as input the image of interest (in) and the direction
- *  (direction), which is specified by an enumerated type psFftDirection.
- *  The input image may be of type psF32 or psC32, the result is always
- *  psC32. If the input vector is psF32, the direction must be forward.
- *
- *  @return psImage* the FFT transformation result
- */
-psImage* psImageFFT(
-    psImage* out,                      ///< a psImage to recycle.  If NULL, a new psImage is made.
-    const psImage* image,              ///< the psImage to apply transform to
-    psFFTFlags direction               ///< the direction of the transform
-);
+/// Forward FFT of an image
+///
+/// Applies a forward FFT (exponent -1), with the result returned in both real and imaginary parts.  The FFT
+/// is not normalised (a forward followed by a reverse is the original scaled by the total number of pixels).
+/// The FFT takes advantage of the fact that the input is purely real; hence the output number of columns is
+/// numCols/2 + 1 (with division rounding down).  Only implemented for F32 input.
+bool psImageForwardFFT(psImage **real,  ///< Real part of FFT
+                       psImage **imag,  ///< Imaginary part of FFT
+                       const psImage *in///< Input image (F32)
+    );
 
-/** extract the real portion of a complex image
- *
- *  @return psImage*   real portion of the input image.
- */
-psImage* psImageReal(
-    psImage* out,                      ///< a psImage to recycle.  If NULL, a new psImage is made.
-    const psImage* in                  ///< the psImage to extract real portion from
-);
+/// Backward FFT of an image
+///
+/// Applies a backward FFT (exponent +1) from the real and imaginary parts with the (purely) real result
+/// returned.  The FFT is not normalised (a forward followed by a reverse is the original scaled by the total
+/// number of pixels).  The FFT takes advantage of the fact that the output will be purely real; hence the
+/// input number of columns is numCols/2 + 1 (with division rounding down); to manage the redundancy (is the
+/// original number of columns even or odd?), we need the original number of columns (the number of columns of
+/// the image that was input to psImageForwardFFT) to be provided.  Only implemented for F32 input.
+bool psImageBackwardFFT(psImage **out,///< Output image
+                        const psImage *real, ///< Real input (F32)
+                        const psImage *imag, ///< Imaginary input (F32)
+                        int origCols    ///< Original number of columns
+    );
 
-/** extract the imaginary portion of a complex image
- *
- *  @return psImage*   imaginary portion of the input image.
- */
-psImage* psImageImaginary(
-    psImage* out,                      ///< a psImage to recycle.  If NULL, a new psImage is made.
-    const psImage* in                  ///< the psImage to extract imaginary portion from
-);
 
-/** creates a complex image from separate real and imaginary plane images
- *
- *  @return psImage*   resulting complex image
- */
-psImage* psImageComplex(
-    psImage* out,                      ///< a psImage to recycle.  If NULL, a new psImage is made.
-    const psImage* real,               ///< the real plane image
-    const psImage* imag                ///< the imaginary plane image
-);
+/// Power spectrum of an image
+///
+/// Generates the power spectrum of an image.  Only implemented for F32 input.
+psImage* psImagePowerSpectrum(psImage *out, const psImage *in);
 
-/** computes the complex conjugate of an image
- *
- *  @return psImage*   the complex conjugate of the 'in' image
- */
-psImage* psImageConjugate(
-    psImage* out,                      ///< a psImage to recycle.  If NULL, a new psImage is made.
-    const psImage* in                  ///< the psImage to compute conjugate of
-);
-
-/** computes the power spectrum of an image
- *
- *  @return psImage*   the power spectrum of the 'in' image
- */
-psImage* psImagePowerSpectrum(
-    psImage* out,                      ///< a psImage to recycle.  If NULL, a new psImage is made.
-    const psImage* in                  ///< the psImage to power spectrum of
-);
+/// Multiply complex images
+///
+/// The input images are the real and imaginary parts of each of two images.  The real and imaginary parts
+/// of the output image are returned.  Only implemented for F32 input.
+bool psImageComplexMultiply(psImage **outReal, ///< Real part of output
+                            psimage **outImag, ///< Imaginary part of output
+                            const psImage *in1Real, ///< Real part of input 1
+                            const psImage *in1Imag, ///< Imaginary part of input 1
+                            const psImage *in2Real, ///< Real part of input 2
+                            const psImage *in2Imag ///< Imaginary part of input 2
+    );
 
 /// @}
