VOLUME RENDERING -
RAYCASTING
|
|||||||||||||||||||||
Installation:requires:
Please unzip the files in a directory of your choice. Download the data file, unpack and save it to the same directory.
|
Version 1.15 DOWNLOAD (kontaktiere die Übungsleitung) |
||||||||||||||||||||
FeaturesThe application lets you select from 4 different kinds of visualizing the data set:
The four features and their options are described in
detail below.
|
|||||||||||||||||||||
StartingJust run the file Raycasting.exe. Immediately upon startup, the data file is loaded, and the gradients are calculated. You can see the calculation of the gradients on the progress bar. At the bottom of the parameter window there is the log message box, which always informs you about what currently is being done. To get an image, select one of the four visualization methods (see below). After adjusting the desired parameters, click on the "Calculate + Draw" button. The calculation process is shown on the progress bar. (Sometimes, multiple calculation processes have to be done.) The size of the output image is automatically adapted to the current size of the output window.*) Hint: You can also start the calculation/drawing process by a right mouse click in the output window, which is especially helpful if the size of your output window is so large that it covers the parameter window. *) except with the Slice Viewer |
|||||||||||||||||||||
ParameterThe only command line parameter Raycasting.exe accepts is a data file name as first parameter. If no data file name is given, the application automatically assumes "skewed_head.dat".
|
|||||||||||||||||||||
The data setThe data set from the CT-scan represents a 3-dimensional volume space, given a value for each voxel (volume element) which represents the density value of the human body at a certain position. In the data set, which was used while developing this application (skewed_head.dat), each voxel has a 12-bit value, so the density ranges from 0 to 4095. The Slice Viewer and the X-Ray Visualization use these density values to calculate grey scale images, which enable you to distinguish between regions of different density. For Shading and Volume Rendering, gradients are calculated from the density values, which are used for calculating normals for lighting and opacity calculations.
|
|||||||||||||||||||||
RaycastingThe technique behind the visualization methods in (2), (3) and (4) is Raycasting. This method is based on voxels - not on surfaces, like other rendering methods. For each pixel on the view plane, a ray is cast through the data set along the viewing direction. First, ray intersection points with the data volume are determined to identify rays, or ray parts, which lie outside the data set. Then colors (and opacites) at evenly spaced locations along the ray are computed (optionally by trilinear interpolation). According to method (2), (3) or (4) the colors and/or opacities are either summed and averaged, or multiplied together - either through front-to-back or back-to-front compositing - yielding a 2D image representation of the 3-dimensional data.
|
|||||||||||||||||||||
(1) SlicesThe Slice Viewer allows you to view slices along one of the 3 axes as grey scale 2D images. Choose one of the 3 axes (X, Y, Z) and walk through the data along this axis with the Slider Control. The text box shows the number of the slice; the maximum is the x-, y- or z-Dimension of the data set, respectively. If you switch on the option "use colors (ranges)", the Slice Viewer shows the colors of the according ranges (Skin, Bones, Teeth - see (3)). Note: The Slice Viewer automatically redraws the output image in the Rendering window while moving the slider. |
|
||||||||||||||||||||
(2) X-RayThe X-Ray viewer computes average density values along a ray, which is cast through the data and visualizes the density values as grey scale images, similar like the Slice Viewer does. However, you can rotate the view of the data set in any of the 3 directions, like you can do with Shading and Volume Rendering. Therefore, basically also the same raycasting algorithm is used as with Volume Rendering.
|
|||||||||||||||||||||
(3) ShadingWhen this rendering option is selected, a Shading model (Phong or Gouraud shading model) is used to calculate a 3D view of the data set. Normals are calculated from the gradients and a light vector is used to gain a "realistic" view of the data set. The threshold value is used to select the density region, where the shading shall be applied. According to the values in the dataset, the threshold values range from 0 to 4095. You will get a visualization of the human's skin with values around 400, bones are shaded with values from 1700, and with a threshold of 3200, you will only see the teeth. You can use the 3 rotation options to get an image from an arbitrary viewing position. The light vector moves with the view vector. You can choose between nearest neighbor interpolation and trilinear interpolation for calculating the shading colors (for an explanation of these options see (4)). The shading model additionally uses highlights, when you switch on "Shading with Highlihts" in the Options Menu.
|
|||||||||||||||||||||
(4) Volume RenderingVolume Rendering is the core feature of this
application. The disadvantage of normal shading with a
threshold is, that you can visualize only one tissue type
of the human body at once. For each voxel, a color which is basically gained from the same shading model as in (3) is computed. 3 ranges are defined in the application, which assign different colors and opacities to the skin, bone and teeth regions. The (shaded) colors along the ray are multiplied by the voxel opacities, and composited in back-to-front order (see Raycasting). Note: The voxel opacities are directly influenced by the magnitude of the gradients of the data set. As a result, you will get an image with differently colored tissue types, each having another transparency. The advantage of this method is, that you can recognize multiple tissue types of the human body in a single image. You can set the desired viewing position with the 3 rotation options. Interpolation:
|
|||||||||||||||||||||
Behind the scenesThis application was developed using MS Visual C++.
Some parts of the program use GLUT (the OpenGL utility
toolkit).
Additionally, 3 float color values are stored for each
pixel of the output window.
|
|||||||||||||||||||||
Limitations
|
(c) 2001 by Thomas
Lidy
Vienna University of Technology