The Volume Viewer makes it easy to see and manipulate volumetric data in Java.
I wrote this because I thought it would be a fun project and to demonstrate the use of some of the more advanced OpenGL features.
How it works:
The Volume Viewer gets its data by reading in a stack of images. It then generates a stack of slices that face half way between the viewer and the light source (this is to allow both the viewer and the light to have a good view of them). Next, it renders each slice one at a time from the one closest to the light to the one furthest from it. Each time, it keeps track of the shadow cast by the previous layer so that it can be used when drawing the next layer. When all planes are drawn, a realistic shadowed image remains.
The user can influence the rendering by changing the color or position of the light, and also by painting on a 'transfer function' that gives color to different densities in the model.
This project is based on the algorithm described in GPU Gems, Chapter 39.
The datasets used in the demo program are taken from the Stanford volume data archive.
|Copyright © 2010, Mark McKay http://www.kitfox.com|