Presentation is loading. Please wait.

Presentation is loading. Please wait.

ENV 200614.1 Envisioning Information Lecture 14 – Scientific Visualization Scalar 3D Data – Volume Rendering Ken Brodlie

Similar presentations

Presentation on theme: "ENV 200614.1 Envisioning Information Lecture 14 – Scientific Visualization Scalar 3D Data – Volume Rendering Ken Brodlie"— Presentation transcript:

1 ENV Envisioning Information Lecture 14 – Scientific Visualization Scalar 3D Data – Volume Rendering Ken Brodlie

2 ENV This is a quite different mapping technique for visualization of 3D scalar data (compared with isosurfacing) Aims to relate volume to a partially opaque gel material - colour and opacity at a point depending on the scalar value By controlling the opacity, we can: –EITHER show surfaces through setting opacity to 0 or 1 –OR see both exterior and interior regions by grading the opacity from 0 to 1 [Note: opacity = 1 - transparency] Volume Rendering

3 ENV Example - Forest Fire From Numerical Model of Forest Fire, NCAR, USA

4 ENV Major application area is medical imaging Different scanning techniques include: –CT (Computed Tomography) –MRI (Magnetic Resonance Imaging) –SPECT (Single Photon Emission Computed Tomography) Three-dimensional images constructed from multiple 2D slices Scanners give average value for a region - rather than value at a point Interslice gap Slice Medical Imaging

5 ENV Examples of Brain Scans Computerized Tomography Magnetic Resonance Imaging SPECT

6 ENV Example - Medical Imaging Rendered by VolPack software CT scan data 256x256x226

7 ENV Data Classification – Assigning Opacity to CT data CT will identify fat, soft tissue and bone –Each will have known absorption levels, say f fat, f soft_tissue, f bone CT value Opacity f soft_tissue 0 1 This transfer function will highlight soft tissue

8 ENV Data Classificatiion – Assigning Opacity to CT Data To show all types of tissue, we assign opacities to each type and linearly interpolate between them CT value Opacity f soft_tissue 0 1 f fat f bone

9 ENV CT number opacity This is known as opacity transfer function In practice, the boundaries between materials are of key importance - hence a two-stage algorithm used: (i) Calculate as above (ii) Scale by gradient of function to highlight boundaries * = |grad f | grad f = [df/dx,df/dy,df/dz] (f) ? So what is opacity in homogeneous areas ? Data Classification – Constructing the Gel – CT Data

10 ENV Colour classification is done similarly white red yellow Air Fat Soft Tissue Bone CT number Known as colour transfer function Data Classification – Constructing the Gel – CT Data

11 ENV Volume rendering is also useful for other data - eg CFD temperature Opacity transfer function: possibly increase with temperature Colour transfer function: blue (0,0,1) red (1,0,0) temperature Data Classification – Constructing the Gel – Temperature Data

12 ENV Data Classification in IRIS Explorer The GenerateColormap tool in IRIS Explorer can be used to assign colour and transparency to data Make sure you know how to save colourmaps from one session to another

13 ENV Example Storm cloud data rendered by IRIS Explorer – Isosurface & volume rendering

14 ENV Rendering the Volume There are two major techniques: –Ray casting –Texture mapping

15 ENV Ray Casting to Render the Volume 1 Assign colour and opacity to data values –Classification process assigns gel colour to the original data 2 Apply light to volume –Lighting model will give the light reflected to the viewer at any point in volume - if we know the normal –Imagine an isosurface shell through each data point - surface normal is provided by gradient vector (remember from isosurfacing!) –Thus we get colour reflected at each data point

16 ENV eye point data volume image plane ray entry point exit point sample points one unit apart (colour and opacity by interpolation) 3. For each pixel in image a) cast ray from eye through pixel into volume, taking samples at regular unit intervals b) measure colour reflected at each sample in direction of ray c) composite colour from all samples along ray, taking into account the opacity of gel it passes through - en route to the eye Casting the Rays and Taking Samples

17 ENV opaque background, emitting I 0 eye point I0I0 I* Intensity - I 1 Opacity - I* = I 0 (1 - ) + I 1 Imagine block of gel, one unit wide around sample point Compositing the Samples Along the Ray – First Sample

18 ENV opaque background eye point I0I0 I* Intensity - I 1 Opacity - I* = I 0 (1 - ) + I 1... from previous slide Intensity - I 2 Opacity - 2 I** I** = I* (1 - ) + I 2 = I 0 (1 - )(1 - ) + I 1 - ) + I 2 Compositing the Samples along the Ray – Two Samples

19 ENV The process continues for all samples, yielding a final intensity, or colour, for the ray - and this is assigned to the pixel –try it for a third sample, then you should be able to deduce a general formula I = n i=0 I i i n j=i+1 (1 - j ) n Note that if one compositing step is done for each ray in turn, then the next step, and so on, the image will be created in a sweep from back to front, showing all the data (even behind opaque parts) Compositing the Samples along a Ray

20 ENV Compositing can also work front-to-back: Intensity I n Opacity n eye point I* I* = n I n Intensity I n Opacity n eye point I** I** = I* + (1 - *) n-1 I n-1 Intensity I n-1 Opacity n-1 * = n - cumulative opacity ** = * + (1- *) n-1 Front to Back Compositing

21 ENV The advantage of front-to-back compositing is that we can stop the process if the accumulated opacity reaches no point in going further Again, you should be able to deduce the general formula if you look at three samples –can you show that front-to-back and back-to-front compositing give the same answer? Front-to-Back Compositing – Early Termination

22 ENV Maximum Intensity Projection When performance rather than accuracy is the goal, we can avoid compositing altogether and approximate I by maximum intensity along ray MIP : Maximum Intensity Projection Often used in angiography...

23 ENV Texture-based Volume Rendering Volume rendering by ray casting is time-consuming –one ray per pixel –each ray involves tracking through volume calculating samples, and then compositing –different for each viewpoint Alternative approach - using texture maps - can exploit graphics hardware

24 ENV Texture Mapping Modern graphics hardware includes facility to draw a textured polygon The texture is an image with red, green, blue and alpha components… … this is used in computer graphics to avoid constructing complex geometric models … and we can exploit this in volume rendering

25 ENV Texture-based Volume Rendering Draw from back-to-front a set of rectangles –first rectangle drawn as an area of coloured pixels, with associated opacity, as determined by transfer function and interpolation - and merged with background in a compositing operation (supported by hardware) –successive rectangles drawn on top

26 ENV D Texture-based Volume Rendering For a given viewing direction, we would need to select slices perpendicular to this direction This requires interpolation to get the values on the slices Until recently this has only been possible with expensive graphics boards image plane volume 3D texture mapping

27 ENV Comparison of Ray Casting and Texture Approaches Ray casting Texture-based

28 ENV Close Up Ogle: texture-based Vlib: ray casting

29 ENV Splatting Another commonly used method is splatting Fuzzy balls around each voxel projected on to image plane Composited in the image plane VolumeToGeom in IRIS Explorer

30 ENV References Classic paper: M. Levoy. Efficient ray tracing of volume data. ACM Trans Graphics, Vol 9, 3, pp , 1990 Recent work: Ray casting: –S. Grimm, S. Bruckner, A. Kanitsar, E. Groller.Memory efficient acceleration structures and techniques for CPU-based volume raycasting of large data. In Proceedings of the IEEE Symposium on Volume Visualization and Graphics 2004 (Oct. 2004), pp Texture-based: –K. Engel et al, Real-time volume graphics. Tutorial 28 in SIGGRAPH2004, See

Download ppt "ENV 200614.1 Envisioning Information Lecture 14 – Scientific Visualization Scalar 3D Data – Volume Rendering Ken Brodlie"

Similar presentations

Ads by Google