The multi-dimensional FFT is implemented using one-dimensional FFTPACK routines. First each row (i.e. a line of pixels parallel to the first axis) in the supplied array is transformed, the Fourier coefficients replacing the supplied data. Then each column (i.e. a line of pixels parallel to the second axis) is transformed. Then each line of pixels parallel to the third axis is transformed, etc. Each dimension is transformed in this way. Most of the complications in the code come from needing to work in an unknown number of dimensions. Two addressing systems are used for each pixel; 1) the vector (i.e. one-dimensional) index into the supplied arrays, and 2) the corresponding Cartesian pixel indices.
PDA [1ex