Results

The application has been implemented in C++ using Xcode developing tool under Mac OSX on an Intel Core 2 Duo 2.33 Ghz with 2 GB of RAM. Up to this point, three of the four goals are functioning properly, while the Ray Casting portion of the code has been implemented but is not working as expected. The time consuming part of the volume rendering is the preprocessing time needed to calculate the min and max threshold values and generate the volume within a threshold value. Table 1 shows various preprocessing times for 4 datasets, 2 8-bit and 2 16-bit datasets of various resolution sizes. As shown in table 1, the 8 bit datasets typically take 40 seconds to do the preprocessing step, while the 16-bit dataset of resolution 512x512x512 takes 9 minutes and 30 seconds.

Table 1. Preprocessing times for 4 datasets, 16-bit and 8-bit of different resolution sizes.

Before 16-bit datasets could be rendered, several modifications had to be made in order to render the volume. Initially, a Voxel16bit class was implemented and contained several member types, which included 8 float vertices, a Vector3D gradient, a float gradient magnitude, a Vector3D normal plus all set and get methods as well as the constructors and destructor. Having such class and saving voxels of this type in a vector container generated a memory allocation error. This made me think of ways to reduce the memory overhead. Therefore, instead of creating a Voxel16bit class, a Voxel16 structure with the minimum number of members was implemented in order to decrease the amount of memory needed to store all the voxels required to render a 16-bit dataset of resolution 512x512x512 for a given threshold value.

Given the goals explained in the Introduction section, the following was accomplished:

      1. Understand the scientific datasets and extract the data
            8-bit and 16-bit datasets can be read and the data is extracted successfully. The pvm Reader tool is used for certain
            datasets in .pvm format in order to convert to .raw format. Figures 1 and 2 show two datasets, one 8-bit dataset with
            resolution 256x256x98 and the other a 16-bit dataset with resolution 512x512x512. The Render Voxels option renders
            the voxels created from the data extracted for a given threshold value.

Figure 1. 8-bit dataset of a baby head.
Figure 2. 16-bit dataset of the vertebra.

      2. Render the dataset using the "Bubble Model" technique
            8-bit and 16-bit datasets are rendered using the Bubble Model as described in the Algorithms section. The opacity of the
            voxels can be increased or decreased. As shown in figures 3 and 4, an understandable representation of the volume is
            rendered and it is interactive.

Figure 3. 8-bit dataset of a baby head using Bubble Model.
Figure 4. 16-bit dataset of the vertebra using Bubble Model.

      3. Render the dataset using Ray Casting for surface shading
            8-bit and 16-bit datasets are rendered using the Ray Casting method to provide surface shading. The algorithm has been
            implemented, but it is not work as expected. Only one slice for the baby head dataset was rendered showing the shading and
            the Bucky Ball dataset was rendered showing the shaded corners and edges.

Figure 5. Slice (256x256) of the shaded baby head using Ray Casting.
Figure 6. 8-bit dataset of a shaded Bucky Ball using Ray Casting.

      4. Create a Graphical User Interface (GUI) to make it interactive
            A GUI interface using the GLUI library was implemented to allow for user interaction: Zoom in/out, opacity increase/decrease,
           Color/Greyscale color, Animation (Rotation), threshold level change, rendering modes, and axis display were added to the
           application. In addition, rendering of Bitmap characters were added to display information of the dataset loaded.

Figure 7. GUI Interface panel.
Figure 8. Bitmap characters displaying dataset information.

In conclusion, the "Bubble Model" produces interactive renderings with fairly enough detail to distinguish between different surfaces in a volumetric dataset. Due to the gradient being calculated by central differences, staircase artifacts are seen during the rendering. More sophisticated gradient methods exist but increases the preprocessing time [3]. Since this was the first time implementing a scientific visualization technique, it was exciting and fun to learn about the different algorithms and techniques that exist and that provide extremely good amount of detail. The "Bubble model" provides a good visualization of a volume but to get a lot of detailed information, another rendering technique should be used. To understand the scientific datasets and to make sure I was reading the data correctly, I render the voxels of those data elements that meet a certain threshold level. Then I render the scientific volume using the "Bubble model" algorithm. Interaction is possible and allows the user to change various parameters at run time. The next step was to render a shaded surface using the Ray Casting technique. The technique was implemented but it does not work as expected. Only a slice of a large dataset was rendered to see the shaded surface. For a small dataset, the external surface is shaded but the entire volume is rendered. I believe the error is during the trilinear interpolation section and volume sampling of the algorithm. The design and implemententation of these algorithms to do volume rendering was fun and exciting. A lot of terminology and concepts were read and learned. The next step is to fix the Ray Casting section of this project and then go on to implement other algorithms and techniques to gain a deeper knowledge and understanding of these algorithms and the math behind them.

Copyright © Winter 2011