Previous Next Up Title Contents Index Functions Index Top Library

6
Voxel Visualization


This chapter includes a list of functions which allow the visualization of a large data set. Datas are distributed inside a parallelepiped made of num_x * num_y * num_z basic cells. The 8 faces of the parallelepiped are considered orthogonal to X, Y and Z axes. These basic cells, called voxel, can be compared with pixels of a 2D picture. A voxel does not have any real dimension but is defined by an 8 bits value. The set of values of the entire voxel volume is stored in a three dimension matrix of size num_x * num_y * num_z.

Data structure

A volume with num_x * num_y * num_z voxels is described by the following data structure:

typedef struct {
	Pint num_x;
	Pint num_y;
	Pint num_z;
	unsigned char *data;
} Tvoxel_data; 

where data is a num_x * num_y * num_z bytes array;

The value of voxel (i,j,k) is data[k + j*num_x + i*num_x*num_y].

Rendering

Each voxel is associated to a color in relation to the voxel's value V. This association (between a color and a voxel value) is defined by the current isovalues list and by the voxel volume color table.

If Vi < V <= Vi+1 where Vi and Vi+1 are the closest isovalues lower and greater than V, the voxel is associated to the i-th color of the voxel volume color table.

The current isovalue list is defined by the last call to tset_isoval_list, tset_homog_isoval_list or tset_regul_isoval_list functions. Each isovalue must be between 0 and 255. Remark : the 2 last parameters of these functions are irrelevant for voxel volume visualization.

The current color table of voxel volume is defined by the last call to tset_voxel_colr_tab, tset_voxel_greyscale_tab or tset_voxel_colr_rep functions. The color table must have one more color than the current number of isovalues.

The voxel volume is visualized by transparency according to a given viewing point. A transparency coefficient is associated to any interval between 2 consecutive isovalues. They are between 0 and 1: 1 corresponds to opaque, 0 corresponds to fully transparent. These coefficients are defined by the last call to tset_transparency_tab or tset_transparency_rep functions. This transparency table must have one more coefficient than the current number of isovalues.

The voxel which value is V (with Vi < V <= Vi+1 ) is associated to the i-th color of the color table and with the i-th transparency coefficient.

The projection of voxel volume is mapped on a 2D plane. The resulting image is made of pixels which are the combination of color and transparency coefficient of voxels along the view plane normal.

Thus, voxel volume representation depends on the current definition of a workstation view. This view must be defined by tview3_paral_y_vert function or by any equivalent PHIGS view (parallel view with Y axis vertical).


Previous Next Up Title Contents Index Functions Index Top Library