volume rendering volume rendering in scientific visualization and computer graphics, volume rendering is a set of techniques used to display a 2d projection of a 3d discretely sampled data set, typically a 3d scalar field. three-dimensional (3d)computer graphics fundamentals modeling scanning rendering printing primary uses 3d models computer-aided design graphic design video games visual effects visualization virtual engineering virtual reality virtual cinematography related topics computer-generated imagery (cgi) animation computer skeletal 3d display wire-frame model texture mapping motion capture crowd simulation global illumination volume rendering multiple x-ray tomographs (with quantitative mineral density calibration) stacked to form a 3d model. volume rendered ct scan of a forearm with different color schemes for muscle, fat, bone, and blood a typical 3d data set is a group of 2d slice images acquired by a ct, mri, or microct scanner. usually these are acquired in a regular pattern (e.g., one slice for each millimeter of depth) and usually have a regular number of image pixels in a regular pattern. this is an example of a regular volumetric grid, with each volume element, or voxel represented by a single value that is obtained by sampling the immediate area surrounding the voxel. to render a 2d projection of the 3d data set, one first needs to define a camera in space relative to the volume. also, one needs to define the opacity and color of every voxel. this is usually defined using an rgba (for red, green, blue, alpha) transfer function that defines the rgba value for every possible voxel value. for example, a volume may be viewed by extracting isosurfaces (surfaces of equal values) from the volume and rendering them as polygonal meshes or by rendering the volume directly as a block of data. the marching cubes algorithm is a common technique for extracting an isosurface from volume data. direct volume rendering is a computationally intensive task that may be performed in several ways. another method of volume rendering is ray marching. scope types of presentations of ct scans, with two examples of volume rendering. volume rendering is distinguished from thin slice tomography presentations, and is also generally distinguished from projections of 3d models, including maximum intensity projection. still, technically, all volume renderings become projections when viewed on a 2-dimensional display, making the distinction between projections and volume renderings a bit vague. nevertheless, the epitomes of volume rendering models feature a mix of for example coloring and shading in order to create realistic and/or observable representations. direct volume rendering a direct volume renderer requires every sample value to be mapped to opacity and a color. this is done with a "transfer function" which can be a simple ramp, a piecewise linear function or an arbitrary table. once converted to an rgba color model (for red, green, blue, alpha) value, the composed rgba result is projected on the corresponding pixel of the frame buffer. the way this is done depends on the rendering technique. a combination of these techniques is possible. for instance, a shear warp implementation could use texturing hardware to draw the aligned slices in the off-screen buffer. volume ray casting volume ray casting. crocodile mummy provided by the phoebe a. hearst museum of anthropology, uc berkeley. ct data was acquired by dr. rebecca fahrig, department of radiology, stanford university, using a siemens somatom definition, siemens healthcare. the image was rendered by fovia's high definition volume rendering® engine the technique of volume ray casting can be derived directly from the rendering equation. it provides results of very high quality, usually considered to provide the best image quality. volume ray casting is classified as image based volume rendering technique, as the computation emanates from the output image, not the input volume data as is the case with object based techniques. in this technique, a ray is generated for each desired image pixel. using a simple camera model, the ray starts at the center of projection of the camera (usually the eye point) and passes through the image pixel on the imaginary image plane floating in between the camera and the volume to be rendered. the ray is clipped by the boundaries of the volume in order to save time. then the ray is sampled at regular or adaptive intervals throughout the volume. the data is interpolated at each sample point, the transfer function applied to form an rgba sample, the sample is composited onto the accumulated rgba of the ray, and the process repeated until the ray exits the volume. the rgba color is converted to an rgb color and deposited in the corresponding image pixel. the process is repeated for every pixel on the screen to form the completed image. splatting this is a technique which trades quality for speed. here, every volume element is splatted, as lee westover said, like a snow ball, on to the viewing surface in back to front order. these splats are rendered as disks whose properties (color and transparency) vary diametrically in normal (gaussian) manner. flat disks and those with other kinds of property distribution are also used depending on the application. shear warp example of a mouse skull (ct) rendering using the shear warp algorithm the shear warp approach to volume rendering was developed by cameron and undrill, popularized by philippe lacroute and marc levoy. in this technique, the viewing transformation is transformed such that the nearest face of the volume becomes axis aligned with an off-screen image data buffer with a fixed scale of voxels to pixels. the volume is then rendered into this buffer using the far more favorable memory alignment and fixed scaling and blending factors. once all slices of the volume have been rendered, the buffer is then warped into the desired orientation and scaled in the displayed image. this technique is relatively fast in software at the cost of less accurate sampling and potentially worse image quality compared to ray casting. there is memory overhead for storing multiple copies of the volume, for the ability to have near axis aligned volumes. this overhead can be mitigated using run length encoding. texture-based volume rendering a volume rendered cadaver head using view-aligned texture mapping and diffuse reflection many 3d graphics systems use texture mapping to apply images, or textures, to geometric objects. commodity pc graphics cards are fast at texturing and can efficiently render slices of a 3d volume, with real time interaction capabilities. workstation gpus are even faster, and are the basis for much of the production volume visualization used in medical imaging, oil and gas, and other markets (2007). in earlier years, dedicated 3d texture mapping systems were used on graphics systems such as silicon graphics infinitereality, hp visualize fx graphics accelerator, and others. this technique was first described by bill hibbard and dave santek. these slices can either be aligned with the volume and rendered at an angle to the viewer, or aligned with the viewing plane and sampled from unaligned slices through the volume. graphics hardware support for 3d textures is needed for the second technique. volume aligned texturing produces images of reasonable quality, though there is often a noticeable transition when the volume is rotated. hardware-accelerated volume rendering due to the extremely parallel nature of direct volume rendering, special purpose volume rendering hardware was a rich research topic before gpu volume rendering became fast enough. the most widely cited technology was the volumepro real-time ray-casting system, developed by hanspeter pfister and scientists at mitsubishi electric research laboratories, which used high memory bandwidth and brute force to render using the ray casting algorithm. the technology was transferred to terarecon, inc. and two generations of asics were produced and sold. the vp1000 was released in 2002 and the vp2000 in 2007. a recently exploited technique to accelerate traditional volume rendering algorithms such as ray-casting is the use of modern graphics cards. starting with the programmable pixel shaders, people recognized the power of parallel operations on multiple pixels and began to perform general-purpose computing on (the) graphics processing units (gpgpu). the pixel shaders are able to read and write randomly from video memory and perform some basic mathematical and logical calculations. these simd processors were used to perform general calculations such as rendering polygons and signal processing. in recent gpu generations, the pixel shaders now are able to function as mimd processors (now able to independently branch) utilizing up to 1 gb of texture memory with floating point formats. with such power, virtually any algorithm with steps that can be performed in parallel, such as volume ray casting or tomographic reconstruction, can be performed with tremendous acceleration. the programmable pixel shaders can be used to simulate variations in the characteristics of lighting, shadow, reflection, emissive color and so forth. such simulations can be written using high level shading languages. optimization techniques the primary goal of optimization is to skip as much of the volume as possible. a typical medical data set can be 1 gb in size. to render that at 30 frame/s requires an extremely fast memory bus. skipping voxels means that less information needs to be processed. empty space skipping often, a volume rendering system will have a system for identifying regions of the volume containing no visible material. this information can be used to avoid rendering these transparent regions. early ray termination this is a technique used when the volume is rendered in front to back order. for a ray through a pixel, once sufficient dense material has been encountered, further samples will make no significant contribution to the pixel and so may be neglected. octree and bsp space subdivision the use of hierarchical structures such as octree and bsp-tree could be very helpful for both compression of volume data and speed optimization of volumetric ray casting process. volume segmentation volume segmentation include automatic bone removal, such as used in the right image in this ct angiography. volume segmentation of a 3d-rendered ct scan of the thorax: the anterior thoracic wall, the airways and the pulmonary vessels anterior to the root of the lung have been digitally removed in order to visualize thoracic contents: - blue: pulmonary arteries - red: pulmonary veins (and also the abdominal wall)- yellow: the mediastinum - violet: the diaphragm image segmentation is a manual or automatic procedure that can be used to section out large portions of the volume that one considers uninteresting before rendering, the amount of calculations that have to be made by ray casting or texture blending can be significantly reduced. this reduction can be as much as from o(n) to o(log n) for n sequentially indexed voxels. volume segmentation also has significant performance benefits for other ray tracing algorithms. volume segmentation can subsequently be used to highlight structures of interest. multiple and adaptive resolution representation by representing less interesting regions of the volume in a coarser resolution, the data input overhead can be reduced. on closer observation, the data in these regions can be populated either by reading from memory or disk, or by interpolation. the coarser resolution volume is resampled to a smaller size in the same way as a 2d mipmap image is created from the original. these smaller volume are also used by themselves while rotating the volume to a new orientation. pre-integrated volume rendering pre-integrated volume rendering is a method that can reduce sampling artifacts by pre-computing much of the required data. it is especially useful in hardware-accelerated applications because it improves quality without a large performance impact. unlike most other optimizations, this does not skip voxels. rather it reduces the number of samples needed to accurately display a region of voxels. the idea is to render the intervals between the samples instead of the samples themselves. this technique captures rapidly changing material, for example the transition from muscle to bone with much less computation. image-based meshing image-based meshing is the automated process of creating computer models from 3d image data (such as mri, ct, industrial ct or microtomography) for computational analysis and design, e.g. cad, cfd, and fea. temporal reuse of voxels for a complete display view, only one voxel per pixel (the front one) is required to be shown (although more can be used for smoothing the image), if animation is needed, the front voxels to be shown can be cached and their location relative to the camera can be recalculated as it