Next: Data Visualization
Up: Java implementation
Previous: Java implementation
It is obvious that the main structures are object-instances of
various classes. This classes have implemented some methods, where
the program functionality is stored. Here is a short overview of
our classes:
- MaskSmoothing (public) - The ''main'' class. Actually it calls the
AppFrame class and starts the application.
- AppFrame - This class is a subclass of the already implemented
java.awt.Frame class. Here the GUI is implemented, reading and
writing the data set. Therefore, all the data sets are finally
stored in this class. Also the dominant part of the data
visualization is implemented here.
- CanvasSlice, CanvasPerspective - Classes derived from the
java.awt.Canvas. These are also used for the data visualization.
CanvasSlice simply flushes the input image to the canvas.
CanvasPerspective shows a box and three rectangles that represent
the top, front and side slice position within the volume.
- AppFrame_AboutBox, AppFrame_SettingsBox, AppFrame_StatisticsBox -
Classes of the about, settings and statistics dialog.
- ComplexNumber - One of the things, that are in Java not yet implemented,
is the complex computing. Therefore we had to implement it
ourselves, to perform mathematical operations in the frequency
domain. There are not all of mathematical operations implemented
in this class, we have implemented just those methods we needed
for the calculation.
- FilterKernel - The class creates a filter according to the settings
dialog.
- FilterMaskSmoothing - This is the core of the algorithm calculation.
There are FFT, convolution, deconvolution
and gradient estimation implemented in this class. For data
representation we use one, and three dimensional arrays. For
specific operations the 1D representation is preferred, where
is equal to
. Another problem
is, that Java assumes Little-Endian byte order, but our data set
was stored in Big-Endian byte order. Unfortunately it is not
possible to specify unsigned property of the basic types.
Therefore, a short variable is read from the file as follows:
x=0x7fff&(input.readUnsignedByte()|input.readUnsignedByte()<<8);
where the input is an object of class DataInputStream, which is
used for reading. As standard input type we took Big-Endian short
(16 bit integral type). The reason is, the output of a CT contains
also short integers although only 12 bits are used.
Ivan Viola, Matej Mlejnek
2001-03-22