Index: trunk/SophyaLib/NTools/fftservintf.h
===================================================================
--- trunk/SophyaLib/NTools/fftservintf.h	(revision 1630)
+++ trunk/SophyaLib/NTools/fftservintf.h	(revision 2526)
@@ -27,47 +27,43 @@
   virtual FFTServerInterface * Clone() = 0;
 
-//! Set/clear the flag for normalizing Fourier transforms.
+  //! Set/clear the flag for normalizing Fourier transforms.
   inline void setNormalize(bool fg=false) { _fgnorm = fg; }
-//! Returns the status of normalization flag for the server
+  //! Returns the status of normalization flag for the server
   inline bool getNormalize() const { return(_fgnorm); } 
-//! Returns the information string associated with the server
+  //! Returns the information string associated with the server
   inline string getInfo() const { return _info; }
 
   //---------------------------------------------------
   // Transforme N-dim sur des doubles
+  virtual void FFTForward(TArray<r_4> const & in, TArray< complex<r_4> > & out);
+  virtual void FFTForward(TArray<r_8> const & in, TArray< complex<r_8> > & out); 
+  virtual void FFTForward(TArray< complex<r_4> > const & in, TArray< complex<r_4> > & out);
   virtual void FFTForward(TArray< complex<r_8> > const & in, TArray< complex<r_8> > & out);
+
+  virtual void FFTBackward(TArray< complex<r_4> > const & in, TArray<r_4> & out,bool usoutsz=false);
+  virtual void FFTBackward(TArray< complex<r_8> > const & in, TArray<r_8> & out,bool usoutsz=false);
+  virtual void FFTBackward(TArray< complex<r_4> > const & in, TArray< complex<r_4> > & out);
   virtual void FFTBackward(TArray< complex<r_8> > const & in, TArray< complex<r_8> > & out);
-  virtual r_8  TransfEnergyFFT(TVector< complex<r_8> > const & x, TVector< complex<r_8> > const& fftx
-                              , r_8& A, r_8& B);
+
    //! Compute the factor to be applied to "fftx=FFT(x)" so that "x" and "FFT(x)" have the same energy
-  virtual inline r_8  TransfEnergyFFT(TVector< complex<r_8> > const & x, TVector< complex<r_8> > const& fftx)
-                      {r_8 A,B; return TransfEnergyFFT(x,fftx,A,B);}
+  virtual r_8 TransfEnergyFFT(TVector<r_4> const & x, TVector< complex<r_4> > const& fftx,r_8& A,r_8& B);
+  virtual r_8 TransfEnergyFFT(TVector<r_8> const & x, TVector< complex<r_8> > const& fftx,r_8& A,r_8& B);
+  virtual r_8 TransfEnergyFFT(TVector< complex<r_4> > const & x, TVector< complex<r_4> > const& fftx,r_8& A,r_8& B);
+  virtual r_8 TransfEnergyFFT(TVector< complex<r_8> > const & x, TVector< complex<r_8> > const& fftx,r_8& A,r_8& B);
 
-  virtual void FFTForward(TArray< r_8 > const & in, TArray< complex<r_8> > & out); 
-  virtual void FFTBackward(TArray< complex<r_8> > const & in, TArray< r_8 > & out, 
-			   bool usoutsz=false);
-  virtual r_8  TransfEnergyFFT(TVector< r_8 > const & x, TVector< complex<r_8> > const& fftx
-                              , r_8& A, r_8& B);
-   //! Compute the factor to be applied to "fftx=FFT(x)" so that "x" and "FFT(x)" have the same energy
-  virtual inline r_8  TransfEnergyFFT(TVector< r_8 > const & x, TVector< complex<r_8> > const& fftx)
-                      {r_8 A,B; return TransfEnergyFFT(x,fftx,A,B);}
+  virtual inline r_8 TransfEnergyFFT(TVector<r_4> const & x, TVector< complex<r_4> > const& fftx)
+                       {r_8 A,B; return TransfEnergyFFT(x,fftx,A,B);}
+  virtual inline r_8 TransfEnergyFFT(TVector<r_8> const & x, TVector< complex<r_8> > const& fftx)
+                       {r_8 A,B; return TransfEnergyFFT(x,fftx,A,B);}
+  virtual inline r_8 TransfEnergyFFT(TVector< complex<r_4> > const & x, TVector< complex<r_4> > const& fftx)
+                       {r_8 A,B; return TransfEnergyFFT(x,fftx,A,B);}
+  virtual inline r_8 TransfEnergyFFT(TVector< complex<r_8> > const & x, TVector< complex<r_8> > const& fftx)
+                       {r_8 A,B; return TransfEnergyFFT(x,fftx,A,B);}
 
-  // Transforme N-dim sur des float
-  virtual void FFTForward(TArray< complex<r_4> > const & in, TArray< complex<r_4> > & out);
-  virtual void FFTBackward(TArray< complex<r_4> > const & in, TArray< complex<r_4> > & out);
-  virtual r_8  TransfEnergyFFT(TVector< complex<r_4> > const & x, TVector< complex<r_4> > const& fftx
-                              , r_8& A, r_8& B);
-   //! Compute the factor to be applied to "fftx=FFT(x)" so that "x" and "FFT(x)" have the same energy
-  virtual inline r_8  TransfEnergyFFT(TVector< complex<r_4> > const & x, TVector< complex<r_4> > const& fftx)
-                      {r_8 A,B; return TransfEnergyFFT(x,fftx,A,B);}
-
-  virtual void FFTForward(TArray< r_4 > const & in, TArray< complex<r_4> > & out);
-  virtual void FFTBackward(TArray< complex<r_4> > const & in, TArray< r_4 > & out,
-			   bool usoutsz=false);
-  virtual r_8  TransfEnergyFFT(TVector< r_4 > const & x, TVector< complex<r_4> > const& fftx
-                              , r_8& A, r_8& B);
-   //! Compute the factor to be applied to "fftx=FFT(x)" so that "x" and "FFT(x)" have the same energy
-  virtual inline r_8  TransfEnergyFFT(TVector< r_4 > const & x, TVector< complex<r_4> > const& fftx)
-                      {r_8 A,B; return TransfEnergyFFT(x,fftx,A,B);}
+   //! Compute the size of the FFT vector given the input vector
+  virtual uint_4 SizeFFT(TVector<r_4> const & x) {return (uint_4) (x.Size()/2 + 1);}
+  virtual uint_4 SizeFFT(TVector<r_8> const & x) {return (uint_4) (x.Size()/2 + 1);}
+  virtual uint_4 SizeFFT(TVector< complex<r_4> > const & x) {return (uint_4) x.Size();}
+  virtual uint_4 SizeFFT(TVector< complex<r_8> > const & x) {return (uint_4) x.Size();}
 
  protected:
