Index: /trunk/archive/pslib/include/psFFT.h
===================================================================
--- /trunk/archive/pslib/include/psFFT.h	(revision 824)
+++ /trunk/archive/pslib/include/psFFT.h	(revision 825)
@@ -14,15 +14,28 @@
  */
 
+
+/** Specify direction of FFT, and if the result is real or not */
+typedef enum {
+    PS_FFT_FORWARD = 0,                 ///< psImageFFT/psVectorFFT should perform a forward FFT.
+    PS_FFT_REVERSE = 1,                 ///< psImageFFT/psVectorFFT should perform a reverse FFT.
+    PS_FFT_REAL_RESULT = 2		///< psImageFFT/psVectorFFT should return a real image. This is valid
+					///< for only reverse FFT, i.e., the psImageFFT/psVectorFFT flag
+					///< parameter should appear as PS_FFT_REVERSE+PS_FFT_REAL_RESULT.
+} psFFTFlags;
+
+
 /**** Vector FFT & Complex functions ****/
 
 /** FFT a vector. in: psF32 or psC32, out: psC32 */
 psVector *
-psVectorFFT(const psVector *vector,	///< Vector to transform
-	   int dir) 			///< FFT direction (1: forward, -1: reverse)
+psVectorFFT(psVector *out,		///< Vector for output (or NULL)
+	    const psVector *vector,	///< Vector to transform
+	    psFFTFlags dir)		///< FFT direction
 ;
 
 /** Calculate power spectrum of a vector of floating-point numbers */
 psVector *
-psVectorPowerSpectrum(const psVector *vector) ///< Vector to obtain power spectrum of
+psVectorPowerSpectrum(psVector *out,	///< Vector for output (or NULL)
+		      const psVector *vector) ///< Vector to obtain power spectrum of
 ;
 
@@ -36,5 +49,5 @@
 psVector *
 psVectorImaginary(psVector *out,	///< Vector for output (or NULL)
-	     const psVector *in)	///< Vector to get the imaginary part of
+		  const psVector *in)	///< Vector to get the imaginary part of
 ;
 
@@ -42,6 +55,6 @@
 psVector *
 psVectorComplex(psVector *out,		///< Vector for output (or NULL)
-	       const psVector *real,	///< real part of vector
-	       const psVector *imag)	///< imaginary part of vector
+		const psVector *real,	///< real part of vector
+		const psVector *imag)	///< imaginary part of vector
 ;
 
@@ -56,11 +69,13 @@
 /** FFT an image.  in: psF32 or psC32, out: psC32 */
 psImage *
-psImageFFT(const psImage *image,	///< image to transform (if forward, may be real)
-	   int dir) 			///< FFT direction (1: forward, -1: reverse)
+psImageFFT(psImage *out,		///< Image for output (or NULL)
+	   const psImage *image,	///< image to transform (if forward, may be real)
+	   psFFTFlags dir)		///< FFT direction
 ;
 
 /** Calculate power spectrum of an image */
 psImage *
-psImagePowerSpectrum(const psImage *image) ///< Image to obtain power spectrum of
+psImagePowerSpectrum(psImage *out,	///< Image for output (or NULL)
+		     const psImage *image) ///< Image to obtain power spectrum of
 ;
 
