+ All Categories
Home > Documents > Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted,...

Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted,...

Date post: 20-Jan-2016
Category:
Upload: brooke-walker
View: 214 times
Download: 0 times
Share this document with a friend
32
Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea www.cs.rug.nl/svcg Department of Mathematics and Computer Science University of Groningen, the Netherlands
Transcript
Page 1: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Scientific Visualization Module 6Volumetric Algorithms

(adapted by S.V. Moore – slides deleted, modified, and added)

prof. dr. Alexandru (Alex) Telea

www.cs.rug.nl/svcg

Department of Mathematics and Computer ScienceUniversity of Groningen, the Netherlands

Page 2: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

www.cs.rug.nl/svcg

Volume visualization (Chapter 10)

1. Motivation

• how to see through 3D scalar volumes?

2. Methods and techniques

• ray function (MIP, average intensity, distance to value, isosurface)

• classification

• compositing

• volumetric shading

3. Advanced points

• sampling and interpolation

• classification and interpolation order

• performance issues

Page 3: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Motivation

www.cs.rug.nl/svcg

Scalar volume s : R3 R

How to visualize this?

direct color mapping

•see only outer surface

slicing

•all details on slice•no info outside slice

contouring

•all details on contour•no info outside contour

How to visualize this so we see through the volume

Page 4: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Display of Internal Structures

Image courtesy of Balázs Csébfalvi

Page 5: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

www.cs.rug.nl/svcg

Seeing through a volume

Idea

•use known techniques (slices and contours)

•use transparency

First try

•draw several contours Ci for several values si

•opacity i proportional to scalar value s

We start seeing a little bitthrough the volume…

…But this won’t work fortoo many contours (why?)

Page 6: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

www.cs.rug.nl/svcg

Volume rendering basicsMain idea•consider a scalar signal s : D R to be drawn on the screen image I

•for each pixel p I

• construct a ray r orthogonal to I passing through p

• compute intersection points q0 and q1of r with D

• express I(p) as function of s along r between q0 and q1

1. Parameterize ray

1. Compute pixel color

ray function

Page 7: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

www.cs.rug.nl/svcg

Volume renderingTo make this work, we need to map scalars (along ray) to colors + transparency

This is done by a so-called transfer function

•same concept as color mapping

Idea•transfer function: says how to map a scalar value to a color (classification)•ray function: says how to combine the results into a final screen pixel color•The process of computing all rays for an image I is called ray casting

a scalar value an RGBA color

Page 8: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

www.cs.rug.nl/svcg

Maximum intensity projection (MIP)

First example of ray function

•find maximum scalar along ray, then apply transfer function to its value

•useful to emphasize high-value points in the volume

ExampleMIP of human head CT

•white = low density (air)•black = high density (bone)

OK, but gives no depth cues

Page 9: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Average intensity projection

Second example of ray function•compute average scalar along ray, then map it to color

•useful to emphasize average tissue type (e.g. density in a CT scan)

maximum intensity projection average intensity projection

ExampleHuman torso CT

•black = low density (air)•white = high density (bone)

Average intensity projectionis equivalent to an X-ray

Page 10: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

www.cs.rug.nl/svcg

Distance to value function

Third example of ray function•compute distance along ray until a specific scalar value

•useful to emphasize depth where some specific tissue is located

ExampleHuman head CT

•black = low distance•white = high distance

distance to value 20 distance to value 50

Page 11: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Isosurface function

Fourth example of ray function•compute whether a given isovalue exists along ray

•produces same result as marching cubes, but with a higher accuracy

isosurface(marching cubes)

isosurface(software ray casting)

isosurface(hardware ray casting)

Page 12: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Summary of Ray Functions

Slide courtesy of

Page 13: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

First-hit Raycasting -- Isosurface

Page 14: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Average Raycasting – Xray Rendering

Page 15: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

MPI – Maximum Intensity Projection

Page 16: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Accumulation – Alpha-blending

Page 17: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Multi-level Volume Rendering

Page 18: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Multiple Transfer Functions

Page 19: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Classical Volume-rendering Integral

Page 20: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Recursive Evaluation

Page 21: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Interpolation – i.e., resampling

Page 22: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Pre-classification vs. Post-classification

Page 23: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.
Page 24: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.
Page 25: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Volumetric shading

Shading •is required if we compute e.g. isosurfaces•but can also be useful for other ray functionsMethod•instead of simply using the colors I(t) = f(s(t))•composite the shaded colors (see Chapter 2, Phong lighting)

How to implement•lighting coefficients c and light vector L: user sets them as desired•surface normal n: compute from gradient of scalar value

(we did the same for isosurfaces, see Module 3)

www.cs.rug.nl/svcgFor full details, see Sec. 7.1

Page 26: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Volumetric shadingResults

www.cs.rug.nl/svcg

no shading diffuse lighting diffuse and specularlighting

Shading•gives very good cues of depth and shape structure•is quite cheap and simple to compute

Page 27: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Multiple transfer functions

Extremely powerful modeling tool

•design four functions fR, fG, fB, fA

•use color and transparency to emphasize desired material properties (e.g. tissue type)•use any ray function described so far

ExampleHuman head CT

•emphasize bone•show also muscles

Page 28: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Volume Rendering of Vectors

Volume rendering can also be used to visualize vector datasets

Volume rendering of fluid flow vector field magnitude

•red = slow flow•green = more rapid flow•blue = fastest flow

Question: why is the blue hard to see?

Page 29: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Transfer functions

www.cs.rug.nl/svcg

Further examples of (artistic) volume rendering

a) electron densityb) car engine partc) bonsai tree (scanned)d) fish

Page 30: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Transfer functions

…and some extreme examples of volume rendering

Volume rendering of human MRI dataset

•shading: mimics natural lighting•backdrop added for extra effect

Beautiful result…

…but not directly usable by e.g. clinicians

www.cs.rug.nl/svcg

Page 31: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

Implementation issues

Sampling density•recall the ray parameterization•we need to sample along the ray (e.g. integrate, compute min/max, etc)•how small should we take the sampling step =dt?

Human head CT, four different values

•smaller : more accuracy•too small : slow rendering

Practical guideline

• should never exceed a voxel size(otherwise we skip voxels while traversing the ray…)

Page 32: Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.

SummaryVolume visualization (book Chapter 10)

•Extends classical scalar visualization to ‘see through’ 3D volumes• ray functions and transfer functions

•Evaluation• produces highly realistic, easy to interpret images• requires quite some computational power• can be easily accelerated using GPUs (e.g. pixel shaders, CUDA)• good transfer function design: critical, application-dependent, hard

www.cs.rug.nl/svcg


Recommended