Woolz Image Processing  Version 1.7.5
AlgFourier.c File Reference

Fast Fourier and Hartley transform functions. More...

Typedefs

typedef enum _AlgFourDir AlgFourDir
 
typedef enum _AlgFourAxis AlgFourAxis
 

Enumerations

enum  _AlgFourDir {
  ALG_FOUR_DIR_FWD = 0,
  ALG_FOUR_DIR_INV = 1
}
 Transform direction: Forward or inverse Fourier transform. More...
 
enum  _AlgFourAxis {
  ALG_FOUR_AXIS_X = 0,
  ALG_FOUR_AXIS_Y = 1,
  ALG_FOUR_AXIS_Z = 2
}
 Axis for partial transform evaluation. More...
 

Functions

void AlgFourHart1D (double *data, int num, int step)
 Computes the Hartley transform of the given one dimensional data, and does it in place. More...
 
AlgError AlgFourHart2D (double **data, int useBuf, int numX, int numY)
 Computes the Hartley transform of the given two dimensional data, and does it in place. More...
 
void AlgFour1D (double *real, double *imag, int num, int step)
 Computes the Fourier transform of the given one dimensional complex data, and does it in place. The transformed values data are scaled by a factor of \(\sqrt{n}\). More...
 
void AlgFourInv1D (double *real, double *imag, int num, int step)
 Computes the inverse Fourier transform of the given complex one dimensional data, and does it in place. The transformed values data are scaled by a factor of \(\sqrt{n}\). More...
 
void AlgFourReal1D (double *real, int num, int step)
 Computes the Fourier transform of the given one dimensional real data, and does it in place. Data are returned in the array of size \(N\) as: The data are returned in the array of size N with the layout as shown in the table (with 2M = N, r = real, i = imaginary): |-------—| | r0 \( | | r1\) | | .. | | r(M-1) | | rM | | i1 | | i2 | | ... | | i(M - 1) | where the real and imaginary components are indexed as in the arrays computed with AlgFour1D(). The transformed values data are scaled by a factor of \(\sqrt{n}\). More...
 
void AlgFourRealInv1D (double *real, int num, int step)
 Computes the inverse Fourier transform of the given one one dimensional real data, and does it in place. The data should layed out in the array as returned by AlgFourReal1D(). The transformed values data are scaled by a factor of \(\sqrt{n}\). More...
 
AlgError AlgFour2D (double **real, double **imag, int useBuf, int numX, int numY)
 Computes the Fourier transform of the given two dimensional complex data, and does it in place. The transformed values data are scaled by a factor of \(\sqrt{n_x} \sqrt{n_y}\). More...
 
AlgError AlgFourInv2D (double **real, double **imag, int useBuf, int numX, int numY)
 Computes the inverse Fourier transform of the given two dimensional complex data, and does it in place. The transformed values data are scaled by a factor of \(\sqrt{n_x} \sqrt{n_y}\). More...
 
AlgError AlgFourReal2D (double **real, int useBuf, int numX, int numY)
 Computes the Fourier transform of the given two dimensional real data, and does it in place. More...
 
AlgError AlgFourRealInv2D (double **real, int useBuf, int numX, int numY)
 Computes the Fourier transform of the given two dimensional data which resulted from a transform using AlgFourReal2D(), and does it in place. The transformed values data are scaled by a factor of \(\sqrt{n_x} \sqrt{n_y}\). More...
 
AlgError AlgFour3D (double ***real, double ***imag, int useBuf, int numX, int numY, int numZ)
 Computes the Fourier transform of the given three dimensional complex data, and does it in place. The transformed values data are scaled by a factor of \(\sqrt{n_x} \sqrt{n_y} \sqrt{n_z}\). More...
 
AlgError AlgFourInv3D (double ***real, double ***imag, int useBuf, int numX, int numY, int numZ)
 Computes the inverse Fourier transform of the given three dimensional complex data, and does it in place. The transformed values data are scaled by a factor of \(\sqrt{n_x} \sqrt{n_y} \sqrt{n_z}\). More...
 
AlgError AlgFourReal3D (double ***real, int useBuf, int numX, int numY, int numZ)
 Computes the Fourier transform of the given three dimensional real data, and does it in place. The transformed values data are scaled by a factor of \(\sqrt{n_x} \sqrt{n_y} \sqrt{n_z}\). More...
 
AlgError AlgFourRealInv3D (double ***real, int useBuf, int numX, int numY, int numZ)
 Computes the Fourier transform of the given three dimensional data which resulted from a transform using AlgFourReal3D(), and does it in place. The transformed values data are scaled by a factor of \(\sqrt{n_x} \sqrt{n_y} \sqrt{n_z}\). More...
 

Detailed Description

Fast Fourier and Hartley transform functions.

Author
Bill Hill
Date
March 1999
Version
Id
602953ce43c392688cd7016ed896830a1ff19344
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

The history of this software is (as stated by Mayer with my later addition):
Euler Probable inventor of the fourier transform.
Gauss Probable inventor of the FFT.
Hartley Probable inventor of the hartley transform.
Bracewell & Buneman Patent holders for FHT!
Ron Mayer Produced FFT code using the FHT.
Bill Hill Hacked Ron Mayer's code to simplify multi dimensional FFT's and for compatability with our existing FFT routines here at MRC HGU. Multithreaded and integrated into libAlg for Woolz.
The multi-dimensional transform routines may be supplied with a use buffers flag, which if set will allocate buffers sufficient to hold copies of the data to ensure the transforms are only computed for contiguous data. Using buffers can result in an order of magnitude lower run times depending on whether the array fit into the fastest caches of the CPUs.
Todo:
Bug:
None known.

Typedef Documentation

typedef enum _AlgFourDir AlgFourDir
typedef enum _AlgFourAxis AlgFourAxis

Enumeration Type Documentation

Transform direction: Forward or inverse Fourier transform.

Enumerator
ALG_FOUR_DIR_FWD 
ALG_FOUR_DIR_INV 

Axis for partial transform evaluation.

Enumerator
ALG_FOUR_AXIS_X 
ALG_FOUR_AXIS_Y 
ALG_FOUR_AXIS_Z