Computer graphics is often used to visualize data. Visualization is traditionally classified into two different sub-fields: Scientific visualization and Information visualization. In scientific visualization, data have intrinsic spatial meaning; whereas, data don’t have intrinsic spatial meaning in information visualization.
In scientific visualization, one important application is volume visualization which is used to analyze spatial meanings of datasets. Example of datasets can be a heat simulation in a room, so that a volume visualization can be divided into “voxels”, and each voxel has an associated temperature value. Another example of datasets can be a 3D scan of a body part, so that each voxel in 3D space has an associated density value. There are 4 common methods for visualizing a volume dataset: point cloud, slicing plane, isosurface, and volume render.
This application implements the method of slicing plane to visualize a given dataset. For simplicity, assume that the dataset is a regular 3D grid, and each grid point has a data value. The dataset contains 256 x 256 x 256 bytes of data which represents a density at a grid point of a foot. Each density value is mapped to different colors. Users should be able to move slicing planes up and down continuously, and also choose between the three different axis directions, and any arbitrary axis.
How do I get set up?
- This program is written in C++ and OpenGL. Make sure you have OpenGL library installed.
- Compilation process
- Windows: compile and run in IDE
g++ -Wall -o yourfile yourfile.cpp -framework OpenGL - framework GLUT
g++ -g -o yourfile -I/usr/include/GL yourfile.cpp -lGL -lglut -lm -lGLU
Viet Trinh © 2013