next up previous
Next: 3 Results Up: 2 Method Previous: 2.1.4 Algorithm summary


2.2 Implementation

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 \( \frac{\sin r}{r} \)for the radial direction \( r \) in the \( xy \) plane and \( J_{0}(z) \) in the \( z \) direction, where \( J_{n} \) is the Bessel function of the first kind of order \( n \) (\( n \) 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 \( x \), \( y \) and \( z \) dimensions. Following the header was \( xyz \) 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 \( x \), \( y \) and \( z \), 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. \( \epsilon \) was chosen to be 2% of the available pixel values, which is a value of 4 (out of 256)7. \( w_{0} \) 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 \( z \) value and output it in a format suitable for gnuplot, as shown in Figure 2, for example.


next up previous
Next: 3 Results Up: 2 Method Previous: 2.1.4 Algorithm summary
Kevin Pulo
2000-08-22