• 沒有找到結果。

Scalar Visualization

N/A
N/A
Protected

Academic year: 2022

Share "Scalar Visualization"

Copied!
57
0
0

加載中.... (立即查看全文)

全文

(1)

Scalar Visualization

(2)

Visualizing scalar data

Popular scalar visualization techniques

• Color mapping

• Contouring

• Height plots

outli ne

(3)

1. Data Importing 2. Data Filtering 3. Data Mapping 4. Date Rendering

Recap of Chap 4:

Visualization Pipeline

(4)

Scalar Function

f: R → R

1-D, histogram

f : R

2

→ R

2-D, color mapping, contouring, height plot f : R

3

→ R

3-D, isosurface, slicing, volume visualization

(5)

Visualizing scalar data

Popular scalar visualization techniques

• Color mapping

• Contouring

• Height plots

outli ne

(6)

Color Mapping

• Color mapping maps scalar data to colors. The scalar mapping is implemented by indexing into a color lookup table. Scalar

values then serve as indices into this lookup table

•Color look-up table

Associate a specific color with every scalar value The geometry of Dv is the same as D

N )

if (N-i)f

c(

c

} {c C

i

,...N ,

i i

max min

2 1

where

 

(7)

Luminance Colormap

•Use grayscale to represent scalar value

Luminance Colormap )

y -10(x4 4

e

f 

•Most scientific data (through measurement, observation, or simulation) are intrinsically

grayscale, not color

Legend

(8)

(a) a luminance colormap and (b) a zebra colormap

(b) The luminance colormap shows absolute values, whereas the zebra colormap emphasizes rapid value variations.

Luminance Colormap

(9)

Rainbow Colormap

•Red: high value; Blue: low value

•Medical visualization with luminance and rainbow colormaps

Luminance Map Rainbow Colormap

(10)

Rainbow Colormap

•Construction

• f < dx: R=0, G=0, B=1

• f = 2: R=0, G=1, B=1

• f = 3: R=0, G=1, B=0

• f = 4: R=1, G=1, B=0

• f > 6 - dx: R=1, G=0, B=0

(11)

Colormap: Designing Issues

•Choose right color map for correct perception

•Grayscale: good in most cases

•Rainbow: e.g., temperature map

•Rainbow + white: e.g., landscape

•Blue: sea, lowest

•Green: fields

•Brown: mountains

•White: mountain peaks, highest

(12)

Designing effective colormaps

• Attract user to certain value ranges or individual values

– Colormap uses particularly salient colors – Colormap can be influenced by:

• Application

• Domain-specific convention &Traditions

(13)

• Some application, emphasize the variation of the data

– Colormap containing two or more alternating colors

• Many other colormap designs

– Geographical application – Classical medical imaging

Designing effective colormaps

(14)

• The choice of the number of Color N

– A small N: color banding effect, artifact

– Typical scalar visualization applications use 64 to 256 different colors

• Other factors for Colormap

– Geometric factors – User group

– The medium used to present the visualization

Designing effective colormaps

(15)

Color banding caused by a small number of colors in a look-up table.

Designing effective colormaps

(16)

Exp: Rainbow Colormap

Global air temperature by month

(17)

Exp: Earth map

(18)

Exp: Sun in green-white colormap

(19)

Exp: Coronal loop

(20)

• Color mapping : generate color values from scalar values by

• Colormap

• Color transfer function

• Design issues for effective colormaps:

– Knowledge of the application domain conventions – Typical data distribution

– Visualization goals

– General perception theory – Intended output devices – User preference

Summary

(21)

Visualizing scalar data

Popular scalar visualization techniques

• Color mapping

• Contouring

• Height plots

outli ne

(22)

Contouring

Cartograph

(23)

Contouring

•A contour line C is defined as all points p in a dataset D that have the same scalar value, or isovalue s(p)=x

} )

(

| {

)

( x p D s p x

C   

•For 2D dataset, a contour line is called an isoline

•For 3-D dataset, a contour is a 2-D surface, called isosurface

(24)

Contouring

One contour at s=0.11

S > 0.11 S < 0.11

Contouring and Color

Banding

(25)

Contouring

7 contour lines

Contouring and Colormapping:

Show (1) the smooth variation

and (2) the specific values

(26)

Properties of Contours

•Indicating specific values of interest

•In the height-plot, a contour line corresponds with the interaction of the graph with a horizontal plane of s value

(27)

Properties of Contours

•The tangent to a contour line is the direction of the function’s minimal (zero) variation

•The perpendicular to a contour line is the direction of the function’s maximum variation: the gradient

Contour lines and Gradient vector

(28)

Constructing Contours

V=0.48

Finding line segments within cells

(29)

Constructing Contours

•For each cell, and then for each edge, test whether the isoline value v is between the attribute values of the two edge end

points (vi, vj)

•If yes, the isoline intersects the edge at a point q, which uses linear interpolation

i j

i j

j i

v v

v v

p v

v q p

 (  ) ( )

•For each cell, at least two points, and at most as many points as cell edges

•Use line segments to connect these edge-intersection points within a cell

•A contour line is a polyline.

(30)

Constructing Contours

V=0.37: 4 intersection points in a cell -> Contour ambiguity

(31)

Contouring

• Contouring need

– At least piecewise linear, C

1

dataset – The complexity of computing contours

• The most popular method

– 2D: Marching Squares

– 3D: Marching Cubes

(32)

Implementation:

Marching Squares

•Determining the topological state of the current cell with respect to the isovalue v

•Inside state (1): vertex attribute value is less than isovalue

•Outside state (0): vertex attribute value is larger than isovalue

•A quad cell: (S3S2S1S0), 24=16 possible states

•(0001): first vertex inside, other vertices outside

•Use optimized code for the topological state to construct independent line segments for each cell

•Merge the coincident end points of line segments originating from neighboring grid cells that share an edge

(33)

Topological State of a Quad Cell

Implementation:

Marching Squares

(34)

Marching Cubes

• Similar to Marching Squares but 3D versus 2D

• 2

8

= 256 different topological cases; reduced to only 15 by symmetry considerations

– 16 topological states

• Marching Cubes: A High Resolution 3D Surface Construction Algorithm

– William E. Lorensen & Harvey E. Cline

– ACM SIGGRAPH 1987

(35)

What are Marching Cubes?

Marching Cubes is an algorithm which “creates triangle

models of constant density surfaces from 3D scalar

data.”

(36)

Marching Cubes Explained

• High resolution surface construction algorithm.

• Extracts surfaces from adjacent pairs of data slices using cubes.

• Cubes “march” through the pair of slices until the entire surface of both slices has been

examined.

(37)

Marching Cubes Overview

• Load slices.

• Create a cube from pixels on adjacent slices.

• Find vertices on the surfaces.

• Determine the intersection edges.

• Interpolate the edge intersections.

• Calculate vertex normals.

• Output triangles and normals.

(38)

How Are Cubes Constructed

• Uses identical squares of four pixels connected between adjacent slices.

• Each cube vertex is examined to see if it lies on or off

of the surface.

(39)

Topological State of a hex Cell

Implementation: Marching Cube

Marching cube generates a set of polygons for each contoured cell: triangle, quad, pentagon, and hexagon

(40)

Marching Cubes -- Ambiguity

Ambiguous cases for marching cubes. Each case has two contouring variants.

(41)

How Are The Cubes Used

• Pixels on the slice

surfaces determine 3D surfaces.

• 256 surface

permutations, but only 14 unique patterns.

• A normal is calculated

for each triangle vertex

for rendering.

(42)

Triangle Creation

• Determine triangles contained by a cube.

• Determine which cube edges are intersected.

• Interpolate intersection point using pixel density.

• Calculate unit normals for each triangle vertex

using the gradient vector.

(43)

Grid Resolution

• Variations can increase/decrease surface density.

(44)

Improvements over Other Methods

• Utilizes pixel, line and slice coherency to minimize the number of calculations.

• Can provide solid modeling.

• Can use conventional rendering techniques and hardware.

• No user interaction is necessary.

• Enables selective displays.

• Can be used with other density values.

(45)

Examples

(46)

Marching Cubes

• General rule: most isosurface details that are under or around the size of the resolution of the iso-surfaced dataset can be

– either actual data or artifact

– should be interpreted with great care

• Can draw more than a single iso-surface of the

same dataset in one visualization

(47)

Marching Cubes

Nested isosurfaces of a tooth scan dataset

(48)

Marching Cubes

Isosurfaces, isolines, and slicing

Isosurfaces and isolines are strongly related

(49)

Summary

• Marching Cubes provides a simple algorithm to translate a series of 2D scans into 3D objects

• Marching Squares and Marching Cubes have many variations to address:

– Generalcity in terms of input dataset type – Speed of execution

– Quality of obtained contours

• Isosurface can also be generated and rendered using point- based techniques

– 3D surface can be rendered using large numbers of (shaded) point primitives

– Point primitive can be considerably faster and demand less memory than polygonal ones on some graphics hardware – Point cloud

(50)

Visualizing scalar data

Popular scalar visualization techniques

• Color mapping

• Contouring

• Height plots

outli ne

(51)

Height Plots

The height plot operation is to “warp” the data domain surface along the surface normal, with a factor proportional to the scalar value

s

h s

D x

x n x s x

x m

D D

m

), (

) ( )

(

,

: 

(52)

Height plots

• Height plots (elevation or carpet plots)

– S(x) is the scalar value of D at the point x – n(x) is the normal to the surface Ds at x

• The height plot mapping operation “warp” a given surface Ds included in the dataset along the surface normal, with a factor proportional to the scalar values.

• Height plots are a particular case of displacement, or warped plots

s

s

D m x x s x n x x D

D

m :  , ( )   ( ) ( ),  

(53)

Height Plots

Height plot over a planar 2-D surface

(54)

Height Plots

Population density of America

(55)

Height Plots

Height plot over a nonplanar 2-D surface

(56)

Height Plots

“Potato Earth” shows variations in planet's gravity

(57)

Summary

• Visualizing scalar data

– Color mapping

Assign a color as a function of the scalar value at each point of a given domain

– Contouring

Displaying all points with a given 2D or 3D domain that have a given scalar value

– Height plots

Deform the scalar dataset domain in a given direction as a function of the scalar data

• Advantage

– Produce intuitive results

– Easily understood by the vast majority of users – Simple to implement

• Disadvantage

– A number of restrictions

– One or two dimensional scalar dataset

– We want to visualize the scalar values of ALL, not just a few of the data points of a 3D dataset

參考文獻

相關文件

at each point of estimation, form a linear combination of a preliminary esti- mator evaluated at nearby points with the coefficients specified so that the asymptotic bias

Example 11.5 Using the Two-Point Form of the Clausius–Clapeyron Equation to Predict the Vapor Pressure at a Given

A function f is said to be continuous on an interval if it is continuous at each interior point of the interval and one-sidedly continuous at whatever endpoints the interval

Goal: predict surrounding words within a window of each word Objective function: maximize the log probability of any context word given the current center

For 5 to be the precise limit of f(x) as x approaches 3, we must not only be able to bring the difference between f(x) and 5 below each of these three numbers; we must be able

[This function is named after the electrical engineer Oliver Heaviside (1850–1925) and can be used to describe an electric current that is switched on at time t = 0.] Its graph

In weather maps of atmospheric pressure at a given time as a function of longitude and latitude, the level curves are called isobars and join locations with the same pressure.

• Density is varying in the medium and the volume scattering properties at a point is the product of scattering properties at a point is the product of the density at that point