Next: Summary Up: paper Previous: Matlab implementation

C implementation

The Java version was designed for analysis of the smoothing technique. The Matlab version was implemented to check the accuracy of our results. We also made a fast and optimized C version to achieve the best computational time (the concept we took over from the Java Mask Smoothing tool). The C version is a simple non-interactive console application, so it is designed for batch mode processing, for creating pictures for animations, with varying parameters. For the sake of efficiency, it is a pure C language implementation. The data structures used in this version are rather basic types as float and short arrays. The volume data as well as the filter data are stored in 3D short arrays and processed in 3D arrays of complex numbers. A ComplexNr is a structure with additional functions such as divideComlexNr and multiplyComplexNr, needed to perform FFT fast and clearly. It consists of two floats: the real and imaginary parts of the complex number. This application can be executed from a window command shell as follows:
msc.exe filename s g gradient_type threshold
where the parameters are: Comparing to the Java version the C version is approximately 4-6 times faster. The entire filtering process took 8 minutes for a 202x152x255 resolution volume (see Figure 1) on an 800Mhz Pentium III PC with 512 MB RAM.
Ivan Viola, Matej Mlejnek
2001-03-22