Final Project: Volume Rendering
Jake Muir
CSC 570 - Current Topics in Computer Science (Rendering)
Dr. Zoe Wood
Overview
For my final project in CSC 570 I implemented a technique known as volumetric rendering. The problem that I will be solving with my project is finding a way to render a scene such that details inside and/or behind an object can be seen. More specifically, my project deals with the problem of scientific visualization: how to efficiently and accurately represent sets of scientific data. As an example, doctors from the medical field may be interested in displaying a 2D projection of a 3D medical data set. The 3D medical data set could contain a sequence of CT scans that show the insides of a person’s head. In order to solve this problem we use Volumetric Rendering, which involves the set of techniques that can be used to render the volume of the sequence of CT scans and project the resulting scene onto a 2D image.
Background
Volumetric rendering is typically used within the field of scientific visualization in order to display 3D structures from water, landscapes, organisms, etc. These techniques can be used to help engineers study fluid flow, students investigate underwater caves in Malta, or doctors decipher meaning from medical data in CT scans or MRIs. Volumetric Rendering can be done in two ways: slice-based rendering or volume ray casting. For my project, I implemented volumetric rendering through volume ray casting. The general algorithm for displaying a volume starts with voxels, which are single volume elements that will make up the object being rendered. Volume ray casting is very similar to regular ray casting which is used to display only the surfaces of 3D objects. All the steps are the same as in regular ray casting except that instead of discontinuing rays once they intersect with an object, rays are marched through the whole scene accumulating intersections with objects and the things inside or behind objects.
My Approach
My implementation of volumetric rendering involved the following steps:
- Read in the Medical Data for CT Scans or MRIs of a Brain - successive 2D images/slices that represent 3D data (dataset contained 99 slices of 256 x 256 pixels and images contained 8-bit opacity values)
- Initialize a bounding volume with voxels where each voxel represents a pixel in a specific slice (Voxels are assigned opacity values based on color value of corresponding pixel in that slice)
- Primary Viewing Rays are generated (one for each pixel in output image)
- Each ray is marched along the bounding volume accumulating intersections with voxels at a certain sampling rate
- After all samples are taken, the pixel color for that ray can be determined based on accumulated voxel intersections of the ray
- Opacity values at each intersection point are calculated by interpolating the values of the surrounding voxels
- Pixel Colors are determined for every ray and the output image is given
CT Scan Ray Tracing Single Slices
Below are the original slices from the medical data:
Below are my ray traced versions of original slices above:
CT Scan Volume Rendering
Front Face of Cube
Back Face of Cube
MRI Brain Ray Tracing Single Slices
Below are the original slices from the medical data:
Below are my ray traced versions of original slices above:
MRI Brain Volume Rendering
Front Face of Cube
Back Face of Cube
References
- Volume Rendering - Display of Surfaces from Volume Data, Marc Levoy
- Stanford Volume Data Archive
- Dr. Zoe Wood
- Chris Gibson (Previous student in Graphics course)