Volume visualization Volume visualization Volumes are special cases of scalar data: regular 3D grids of scalars, typically interpreted as density values. Each data value is assumed to describe a cubic cell a voxel. SIGGRAPH2004 course on volume visualization Sources of volume visualization Medical data of the interior of the human body obtained by computed tomography (CT) or magnetic resonance imaging (MRI). Other examples are computational fluid dynamics (CFD), geological and seismic data, as well as abstract mathematical data such as 3D probability distributions of pseudo random numbers. Sources of volume visualization Sometimes the actual data are in fact not on a regular grid, but are resampled (interpolated). Many computations are done on a regular grid for simplicity. If one wants to use volume visualization methods for irregular data topologies, they can be resampled, as mentioned above. Volume visualization Efficient volume rendering techniques and hardware, volumetric data is becoming more and more important also for visual arts and computer games. Volume data is ideal to describe fuzzy objects, such as fluids, gases and natural phenomena like clouds, fog, and fire. Many artists and researchers have generated volume data synthetically to supplement surface models Volume visualization methods Cutting surfaces Isosurfaces Volume rendering Image-order Object-order 1
Data slices Front A special case of cutting surfaces, we can take slices of the data and use it as classical radiology images where each slice of the data is laid out next to the others. Digital data allow us to make the slices along any plane top, side, front. Side Top Cutting surfaces A cutting surface (not necessarily a plane) can be used in several ways to visualize volume data: Consider the data as a solid block, colour mapping the outer surfaces. Cutting into this block (interpolating data values) creates a new surface, not necessarily orthogonal to the data boundaries, which also is coloured. The movement of a cutting plane through data can be animated or steered interactively to allow the study of specific features. Cutting surfaces - textures We can stack coloured slices on top of each other; if the colour map used has a transparency/opacity (alpha) channel, a suitable mapping will create an outline of shapes in the data. More efficiently we can use our graphics hardware and create our slices as textures. 2D- and 3D- textures If we rotate our data object, slices that are close to parallel with the view direction will not be visible. Therefore we have to create new textures along the slices in the direction that is closest to perpendicular to the view direction. From SIGGRAPH2004, course 28 2
3D- textures Some graphics hardware actually supports 3D textures. In these cases we can let the hardware take care of sampling and rendering even when rotating the image. Isosurfaces The most common method of creating an isosurface from volume data is called marching cubes. Marching cubes categorises each voxel into one of 15 cases, which then determines the surfaces passing through this voxel. However, some of these cases are ambiguous the surfaces can be chosen in two different ways. This can create holes in the surface if an adjacent cell does not continue the selected surface in the same way. Marching tetrahedra One way of avoiding the ambiguous cases for cubes is to split the cubes into tetrahedra and then apply the corresponding marching tetrahedra algorithm. The drawback is that this creates a more complex, and possibly bumpier, surface. Instead we can choose algorithms which adjust the choice of cases so that they will match up over the entire surface, e g the asymptotic decider. Threshold values In many cases, such as e g atmospheric density, electric potential, etc, there is no a priori preferred threshold value, so we can choose one which suits our purposes at the time. For medical data, on the other hand, the data values typically represent specific tissues. We should therefore choose thresholds which will segment our data into muscle, bone, fat, etc. These values can be calibrated and then automatically applied to future data. 3
Multiple isosurfaces Multiple semi-transparent isosurfaces can be used to perceive the gradient. However, transparent surfaces are difficult to perceive the exact shape of. One may instead use textures with fully opaque and fully transparent sections. Volume rendering To get an impression of the whole volume, we use volume rendering. A volume rendering does not create a manipulaple geometrical object like an isosurface, but an image on the screen instead. The two alternative principles are imageorder rendering and object-order rendering. Image-order & object-order Image-order means that we start from the available pixels on the screen and compute the contribution of the appropriate voxels to that pixel. Object-order means that we start from the voxels and compute where their contribution ends up on the screen. Image-order rendering Ray functions Ray casting/ray tracing means starting at each pixel on the screen and extending a line through the volume. This line will pass through a number of voxels. The pixel value will then be some function f of these voxels v i. A classical X-ray image would be f = Σ(v i ). Another common function is the Maximum Intensity Projection, f = max(v i ). Both these would usually further map f to a grey level, but more complex functions where each voxel contributes an RGB(A) value can be defined, e g to create segmented images as mentioned before. 4
Doing the cast Unless the image plane is parallel to one of the data axes we need to define how to perform the sampling of the voxels. There is a tradeoff between smoothness/accuracy and speed. Our ray can either be sampled at regular intervals through the volume ( DDA), or we may step through each voxel on the way ( Bresenham). From SIGGRAPH2004, course 28 Sampling voxels Regular sampling requires us to adjust the step so that we neither spend too much time, nor miss small features in the data. Voxel-by-voxel can use different connectivity along faces (slowest), edges or vertices (fastest). If we pass through the volume voxel by voxel we can use nearest-neighbour values for the samples. Regular sampling can also use nearest-neighbour or use more complex interpolation (typically trilinear). Object-order methods We can instead choose to render based on the voxels themselves. Splatting is a method where each voxel is represented by a larger Gaussian kernel spherical form with decreasing density, so that no voids are left in the resulting pixels. Light and shade Cutting up things The non-geometry based methods we have described do not add shading information to our images. This is good, as information is not distorted, but is bad, as perception of shape is more difficult. We can compute gradients in our images and use those to generate shading information. It is difficult to see through objects, even using transparency. Therefore it is often a good idea to instead cut through objects, both isosurfaces and volume renderings, so as to show internal detail better. 5