Ray Caster

Written by Armin Kanitsar

Developed for the course Visualization at the Institute of Computer Graphics in the winter term 2000. This Course was held by Helwig Hauser and Thomas Theußl.

Program Description

The program takes a .dat file as an input. The settings for the transfer function including coloring and opacity can be stored and reload by a proprietary .trf file. The recalculated 3D image can be viewed interactively at low resolution in a separate window. After interactivity phase the image is rendered at high resolution. An orientation window is also available providing an overview of the scene and control of the incidence of light. The rendered image can be stored as a .bmp file. It is also possible to render a sequence of images witch are stored as a sequence of .bmp files. These files can be post processed in order to generate an animation.

Used Techniques

The ray caster is implemented according to the paper of Marc Levoy, Display of Surfaces from Volume Data. The basic principle of this direct volume rendering technique is that a ray is cast through the dataset. Along this ray every color and opacity information is calculated and the result is drawn to the corresponding point on the projection plane.

OpenGL is used for displaying purpose as well as to speedup the performance of the algorithm. The displaying is done using glDrawPixels() to draw the projection plane. In order to provide a fast preview the 2D texture capabilities of OpenGL are used to enlarge small sample pictures. In order to reduce unnecessary steps it is crucial to find the bounding box of the scene fast. For this purpose the bounding box is rendered to an OpenGL context. The depth buffer then contains the distance information of the nearest point. Afterwards the depth buffer is initialized to 0.0 and the depth function is set to GL_GREATER. A second render step provides the information of the points farthest away. With this technique the hardware accelerated power of the graphic device can be used.

The program provides multi processor support. This is made possible using the MFC Class CThread. The current version of the program supports 2 render threads. It has to be tested whether a finer granularity provides more acceleration. However the speedup is remarkable on a dual processor machine.

System Requirements

Processor Pentium II 350  (dual processor recommended)
Memory 256 MB more recommended
Operating System NT 4.0 SR 3, W2000, W98, WinME
Graphics adapter OpenGL capabilities required.
Additional Software GLUT Libraries

Results

A sample CT dataset containing the head of a human being.

The dataset with the same transfer function from a different viewpoint.

The dataset rendered using three different surface classifications.

The dataset rendered using only one classification and white color.

               

 

              

This are four available avi files. 

If you click on the pictures you will be directed to the download area.

They are really worth a look!

Download

The executable

The documentation

VolToDat - A Conversion-tool from .vol format to .dat format

Usage: VolToDat input.vol output.dat

Downsampler - A tool to down sample .dat files by a factor of 8

Usage: Downsampler hig_res.dat low_res.dat