Post on 28-Mar-2015
transcript
7.1Vis_04
Data VisualizationData Visualization
Lecture 73D Scalar Visualization
Part 2 : Volume Rendering-Introduction
7.2Vis_04
Volume RenderingVolume Rendering
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]
7.3Vis_04
Example - Forest FireExample - Forest Fire
From Numerical Model of Forest Fire, NCAR, USA
7.4Vis_04
Medical ImagingMedical Imaging
Major application area is medical imaging
Different scanning techniques include:– CT (Computed Tomography)– MRI (Magnetic Resonance Imaging)
Three-dimensional images constructed from multiple 2D slices Scanners give average
value for a region - ratherthan value at a point
Interslice gap
Slice
Slice
7.5Vis_04
Examples of Brain ScansExamples of Brain Scans
ComputerizedTomography
MagneticResonanceImaging
SPECT
7.6Vis_04
Example - Medical ImagingExample - Medical Imaging
Renderedby VolPacksoftware
CT scan data256x256x226
7.7Vis_04
Data Classification –Assigning Opacity to CT
data
Data Classification –Assigning Opacity to CT
data
CT will identify fat, soft tissue and bone– Each will have known absorption
levels, say ffat, fsoft_tissue, fbone
CT value
Opacity
fsoft_tissue
0
1This transfer function will highlight soft tissue
7.8Vis_04
Data Classificatiion –Assigning Opacity to CT
Data
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
fsoft_tissue
0
1
ffat fbone
7.9Vis_04
Data Classification - Constructing the Gel - CT
Data
Data Classification - Constructing the Gel - CT
Data
CT number
opacity
0.0
1.0This is knownas opacitytransfer function
In practice, the boundaries between materialsare of key importance - hence a two-stage algorithmused:(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 ?
7.10Vis_04
Data Classification - Constructing the Gel - CT
Data
Data Classification - Constructing the Gel - CT
Data
Colour classification is done similarly
white
red
yellow
Air Fat SoftTissue
Bone
CT number
Known as colour transfer function
7.11Vis_04
Data Classification - Constructing the Gel -
Temperature Data
Data Classification - Constructing the Gel -
Temperature Data
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
7.12Vis_04
Data Classification in IRIS Explorer
Data Classification in IRIS Explorer
The ColourMap tool in IRIS Explorer can be used to assign colour and transparency to data
7.13Vis_04
ExampleExample
Storm clouddata renderedby IRIS Explorer –Isosurface & volumerendering
7.14Vis_04
Ray Casting to Render the Volume
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 (see lecture 6)
– Thus we get colour reflected at each data point
7.15Vis_04
Casting the Rays and Taking Samples
Casting the Rays and Taking Samples
eyepoint
data volume
imageplane
ray
entrypoint
exit point
sample pointsone unit apart(colour andopacity byinterpolation)
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
7.16Vis_04
Compositing the Samples along a Ray - One SampleCompositing the Samples along a Ray - One Sample
opaque background,emitting I0
eyepoint
I0I*
Intensity - I1
Opacity -
I* = I0 (1 - ) + I1
Imagine block of gel, one unit wide around sample point
7.17Vis_04
Compositing the Samples along a Ray - Two SamplesCompositing the Samples
along a Ray - Two Samples
opaque backgroundeye
point
I0I*
Intensity - I1
Opacity -
I* = I0 (1 - ) + I1
Intensity - I2
Opacity - 2
I**
I** = I* (1 - 2) + I2 2
= I0 (1 - 1)(1 - 2) + I11(1 - 2) + I22
7.18Vis_04
Compositing the Samples along a Ray
Compositing the Samples along a Ray
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 formulaI = n
i=0 Iii nj=i+1(1 - j)
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)
7.19Vis_04
Front to Back CompositingFront to Back Compositing
Compositing can also work front-to-back:
Intensity In
Opacity n
eyepoint
I*I* = n In
Intensity In
Opacity n
eyepoint
I**I** = I* + (1 - *)n-1In-1
Intensity In-1
Opacity n-1
* = n - cumulative opacity
** = * + (1-*)n-1
7.20Vis_04
Front-to-Back Compositing - Early Termination
Front-to-Back Compositing - Early Termination
The advantage of front-to-back compositing is that we can stop the process if the accumulated opacity reaches 1.0 - 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?
7.21Vis_04
Maximum Intensity Projection
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...
7.22Vis_04
Maximum Intensity Projection
Maximum Intensity Projection
Performance is major issue
– lack of shading in image drives need for real-time rotation
– fast identification of maximum becomes important
imageplane
volume
- analytical maximumin each cell along ray- maximum of samplesalong ray- skip cells below maximum
7.23Vis_04
Next LectureNext Lecture
Parkinson Room 108 Monday 10-11
Hope to have a second lecture on Monday 11.00 – 12.00 … room to be announced!