The program was written in ANSI C, using the freely available FFTW package [Frigo and Johnson, 1999]. FFTW is, for all intents and purposes, the fastest freely available package to calculate Discrete Fourier Transforms (DFTs). Further, it is easy to install and use, giving accurate results quickly.
Unfortunately, the exact optical transfer function for the equipment used to obtain the data files wasn't available, and so a general OTF was used. This was for the radial direction in the plane and in the direction, where is the Bessel function of the first kind of order ( a positive integer)5. There are many other theoretical OTFs that could have been used, however, they lie outside the scope of this project and the general OTF described above was deemed to be adequate.
The file format used was a type of raw file, with a 76 byte header followed by the image data. The header consisted of (amongst other things) three big-endian words describing the , and dimensions. Following the header was bytes of pixel data, one byte per pixel, giving 256 possible pixel values6. The pixels were stored in column-major order, that is, quickest traversal of , and , and were easily converted to the row-major order required by FFTW.
Some constants were required for this project, and they were selected under the advice of those in the field (see Section 5), since finding optimal values was outside the scope of this project. was chosen to be 2% of the available pixel values, which is a value of 4 (out of 256)7. was chosen to be unity, as this made several aspects of the implementation easier and should not have degraded performance (either image quality or speed) noticeably.
In addition to the main program, a utility was written to take a two dimensional slice of fixed value and output it in a format suitable for gnuplot, as shown in Figure 2, for example.