Definitions
Visualization: The field of computer science that combines data rep- resentation, processing, visual presentation and user interfaces SciVis vs. Computer Graphics Scientific Visualization: Visualization of primarily data arising from scientific or engineering applications. Dimensionality of data typically higher than 3. Data Visualization: A more general definition that implies extension beyond the scientific and engineering domains, such as financial, Predominantly involves discrete data (from simulations or measure- or marketing data. Also includes statistical and other data analysis ments). techniques. Information Visualization: Visualization of abstract data such as hypertext documents, web documents, software systems or databases, and other data sources that have no natural visual form.
ITCS 6010: Scientific Visualization 1 Scientific Visualization ITCS 6010: Scientific Visualization 2 Scientific Visualization
Visualization Applications Visible Human Project
Medical Imaging Sponsored by the National Library of Medicine, NIH. Anatomical reconstructions from 3D volumes of CT, MRI, Ultra- Goal: Capture CT, MRI and anatomic images of a male and female sound, PET, etc. (Plates 53, 54, 56) cadaver at 1 mm intervals. Visible Male Data: MRI Scans (256 × 256 × 1871), CT Scans (512 × 512×1871), both at 12 bits per pixel, and anatomical images (2048× 1216 × 1871) at 24 bits per pixel. All slices are 1mm apart. Visible Female Data: Same characteristics as Visible Male, except for the anatomical slices were 0.33mm apart. Visible Male Dataset size: 15 Gbytes; Visible Female: 40 Gbytes.
ITCS 6010: Scientific Visualization 3 Scientific Visualization ITCS 6010: Scientific Visualization 4 Scientific Visualization VHP Reconstructions (Courtesy, Bill Lorensen) From CT
Volume Visualization Techniques
Surface Based Direct Volume Rendering Object Order Image Order Contour Connecting V-Buffer Ray Casting Opaque Cubes Splatting Cell Integration From the Physical Data Marching Tetrahedra Pixar Method Frequency Domain Methods Marching Cubes Dividing Cubes
ITCS 6010: Scientific Visualization 5 Scientific Visualization ITCS 6010: Scientific Visualization 6 Scientific Visualization
Marching Cubes Algorithm Contouring Algorithms
What are they? Extension of Marching Squares algorithm to 3D Techniques that can generate lines or surfaces of constant value. Features Generally depict the boundary between two homogeneous regions. Treat the 3D volume as a set of hexahedral cells to be individually contoured. Applications: Isotherms in maps - lines of constant temperature, lines of constant elevation, anatomical reconstructions. Algorithm marches from 1 cube to the next, in scanline order. Iso-surfaces, in 3D. Cube formed from 4 neighbors from slice k and 4 more from slice k + 1. Requirements Density values are known exactly at 8 corner points; linear interpo- Must be able to compute densities at arbitrary locations. lation used to evaluate density or gradient at interior points. In 3D, need to compute surface normal for shading. Wide application to biomedical imaging applications; many other do- Algorithms: Marching Squares(2D), Marching Cubes(3D). mains use same idea to contour surface generation, including time varying data
ITCS 6010: Scientific Visualization 7 Scientific Visualization ITCS 6010: Scientific Visualization 8 Scientific Visualization Marching Cubes Algorithm Voxel Configurations
( i+1 , j+1 , k+1)
Slice (k + 1) Total of 256 cases, reduced to 15 using rotation and symmetry.
k ( i, j, k ) j Slice k
i
Read 4 slices into memory Calculate cube configuration Retrieve list of intersection edges for this configuration Determine intersections by linear interpolation of corner vertices Contour surface within cell is approximated by polygons and trian- gulated. Output triangle vertices, normals to rendering engine ITCS 6010: Scientific Visualization 9 Scientific Visualization ITCS 6010: Scientific Visualization 10 Scientific Visualization
Example Ambiguity Resolution Unlike 2D, arbitrary choice of MC cases can lead to holes in the surface. Can use Marching tetrahedra - increases number of triangles and cause artificial bumps in the surface. Use an additional 6 complementary cases (Fig. 6-10, text)
ITCS 6010: Scientific Visualization 11 Scientific Visualization ITCS 6010: Scientific Visualization 12 Scientific Visualization Direct Volume Rendering(DVR) Direct Volume Rendering(DVR) Strengths Motivation Algorithms involve no binary classification decisions, resulting in Some surface based algorithms (Marching Cubes, for instance) can fewer artifacts. generate huge numbers of graphics primitives, at expense of mem- Small (wisp-like) features can be handled correctly (partial voluming ory and rendering performance. effects) Algorithms involve making binary decisions on the presence or ab- Recent techniques exploit hardware texture mapping (2D and 3D) in sence of a surface - resulting in (surface) misclassification. rendering the volume. Changing surface properties requires recomputing the entire sur- Weaknesses face. Discrete sampling of the volume - aliasing artifacts. Direct Volume Rendering techniques do not generate surface primitives; instead they directly sample and integrate the volume, but are generally view dependent Standard polygon rendering hardware cannot be exploited; texture mapped volume rendering have limitations
ITCS 6010: Scientific Visualization 13 Scientific Visualization ITCS 6010: Scientific Visualization 14 Scientific Visualization
Red Green Blue Transparency and Alpha Values
Ability to render transparent objects allows interior features of a data Alpha Composited Pixel Value set to be revealed. Multiple overlapping layers of data can be rendered by keeping the outer layers highly tranparent.
Problem: Polygon rendering algorithms using the Z buffer are not R = αsRs + (1 − αs)Rb easily adaptable to handling transparent objects, as objects need to G = αsGs + (1 − αs)Gb be ordered by depth. B = αsBs + (1 − αs)Bb
T = 1 − α As the pixel color is different if the objects are switched, it is important where α is the opacity and T , the transparency. that objects be ordered when both opaque and transparent objects are to be correctly rendered.
ITCS 6010: Scientific Visualization 15 Scientific Visualization ITCS 6010: Scientific Visualization 16 Scientific Visualization Texture Mapping
Texture Mapping
Technique that adds detail to an image without increasing model
complexity (detail). Texture Map Surface of object Pixel Requires specification of texture coordinates and a texture map (RGBA) Pixel square is mapped from screen space to object space. Textures are either images (static) or procedurally generated. Corners of the object are then mapped into texture space, generat- Application: painting or pictures in a room, wood texture on table ing a quadrilateral in the input texture map. top. All values within the region corresponding to the pixel in texture space is integrated (usually filtered to avoid aliasing). The texture component modulates the lighting model applied at the pixel (typically the diffuse component), including the alpha compo- nent. ITCS 6010: Scientific Visualization 17 Scientific Visualization ITCS 6010: Scientific Visualization 18 Scientific Visualization
DVR Using Ray Casting Ray Casting Step Point Samples
Point Samples Volume Grid
Volume Grid
Rays Rays
Eye Eye
Image Plane Image Plane
Rays are cast through the center of each pixel on the image plane. Can visualize both iso-value contour surfaces or the entire volume in accordance with a transfer function. Ray sampled at k evenly spaced points. Volume is probed at discrete points within the volume along paths Tri-linear interpolation is used to determine colors and opacities at emanating from each pixel in the image plane. sample points. A ray function is applied to determine the values encountered along Colors are composited (front to back or back to front). the ray. ITCS 6010: Scientific Visualization 19 Scientific Visualization ITCS 6010: Scientific Visualization 20 Scientific Visualization DVR Using 2D Texture Mapping
Direct Volume Rendering (DVR) via Texture The volume dataset is decomposed into a set 2D orthogonal slices, Mapping that is most parallel to the viewing direction. For each orthogonal slice, Motivation ⇒ a 2D texture (volume data of that slice) is downloaded into tex- ture memory. Texture mapping hardware (2D or 3D) can be effectively used for ren- ⇒ a rectangular polygon with the appropriate texture coordinates dering volumes, in a manner similar to the use of scan-conversion is rendered. hardware for rendering polygonal geometry, making real-time, or near-realtime rendering possible. ⇒ Rendering is performed back to front, with blending performed in hardware. ⇒ A preprocessing step determines the opacity of each voxel, us- ing a transfer function, for instance.
ITCS 6010: Scientific Visualization 21 Scientific Visualization ITCS 6010: Scientific Visualization 22 Scientific Visualization
DVR Using 3D Texture Mapping Drawbacks Certain graphics architectures, such as the SGI Reality Engine, sup- May need to generate additional slices if neighboring slices are far port 3D texture mapping in hardware, permitting volumetric textures apart, (depending on the function used, this resampling can be ex- to be loaded into texture memory. pensive). Polygons can now be associated with texture coordinates at their Volume rendered images correspond to one of the 3 principal view- vertices. ing directions. For generating renderings at other angles, the texture maps need to be generated in software by resampling the volume. During rendering, the texture corresponding to the polygonal region specified by the texture coordinates is mapped onto the polygon. Textures must be downloaded 1 at a time into texture memory By rendering a sequence of parallel slices orthogonal to the viewing direction back to front, a volume data set can be rendered.
ITCS 6010: Scientific Visualization 23 Scientific Visualization ITCS 6010: Scientific Visualization 24 Scientific Visualization