10
1 Visualization, 2009-03-25 Fundamental visualization techniques Lars Kjelldahl Administrative issues, check-up http://www.csc.kth.se/utbildning/kth/kurser/DD2257/visual09/ There will be changes Please do faun> res checkin visual09 Register for the course; utbildningsavdelningen, blankett för fristående enstaka kurs Literature: The main text book is expected to be The Visualization Toolkit An Object Oriented Approach to 3D Graphics, Will Schoeder, Ken Martin and Bill Lorensen, 4th Edition. You can buy the book from the CSC studentexpedition ( afew copies left). It is also available from Kitware (kitware.com). A set of papers (see website) Lab assignments: Two or three of VTK (Sun,Karmosin), OpenDX (PC, Magenta, Vit), QlikView (PC, probably Magenta) Exam: • home exam to be sent to lassekj ’at’ csc.kth.se (deadline 27 May) • oral exam to follow up the home exam • F1 we 18.3, 15-17, 1537, Intro, Lars Kjelldahl, Gustav Taxén Fextra, fr 20.3, 13-15, 1537, Overview of C++, Gustav Taxén F2 we 25.3, 13-15, 1537, Fundamental visualizaion techniques, Kjelldahl F3 we 25.3, 15-17 1537, Fundamental visualizaion techniques using VTK, Gustav Taxén lab session, mo 30.3, 10-12, Magenta, VTK-labb, OpenDX, Gustav Taxén/Jonas Forsslund lab session th 2.4 13-15 Violett OpenDX, Gustav Taxén F4 we 15.4, 15-17, 1537, Interaction in visualization, Yngve Sundblad lab session xxx 2h, xx, lack of access to computer rooms VTK/OpenDX, (Gustav Taxén/Jonas Forsslund) F5-F6 we 22.4, 13-17, 4523, Information visualization, Gustav Taxén, OlikView lecture lab session mo 27.4, 13-15 Magenta, VTK, (Gapminder - preliminary) F7 tue 28.4 13-16 1537 Application lectures F8 tue 28.4, 16-18, 4523, Visualization of uncertainty, Kai-Mikael Jää-Aro F9 tue 5.5, 13-15, 1537, Conclusions, exam, Lars Kjelldahl lab session xxx, 2h, xx, final session for lab assignments Schedule, there will be changes so look on the web page during the next few days!!

Schedule, there will be changes so look on the web page

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Schedule, there will be changes so look on the web page

1

Visualization, 2009-03-25

Fundamental visualization techniquesLars Kjelldahl

Administrative issues, check-uphttp://www.csc.kth.se/utbildning/kth/kurser/DD2257/visual09/There will be changes

Please do faun> res checkin visual09Register for the course; utbildningsavdelningen, blankett för fristående enstaka kurs

Literature: The main text book is expected to be The Visualization Toolkit An ObjectOriented Approach to 3D Graphics, Will Schoeder, Ken Martin and Bill Lorensen, 4thEdition. You can buy the book from the CSC studentexpedition ( afew copies left). It isalso available from Kitware (kitware.com).

A set of papers (see website)

Lab assignments:Two or three of VTK (Sun,Karmosin), OpenDX (PC, Magenta, Vit), QlikView (PC,probably Magenta)

Exam:• home exam to be sent to lassekj ’at’ csc.kth.se (deadline 27 May)• oral exam to follow up the home exam

• F1 we 18.3, 15-17, 1537, Intro, Lars Kjelldahl, Gustav Taxén• Fextra, fr 20.3, 13-15, 1537, Overview of C++, Gustav Taxén• F2 we 25.3, 13-15, 1537, Fundamental visualizaion techniques, Kjelldahl• F3 we 25.3, 15-17 1537, Fundamental visualizaion techniques using VTK, Gustav Taxén• lab session, mo 30.3, 10-12, Magenta, VTK-labb, OpenDX, Gustav Taxén/Jonas Forsslund• lab session th 2.4 13-15 Violett OpenDX, Gustav Taxén• F4 we 15.4, 15-17, 1537, Interaction in visualization, Yngve Sundblad• lab session xxx 2h, xx, lack of access to computer rooms VTK/OpenDX, (Gustav Taxén/Jonas

Forsslund)• F5-F6 we 22.4, 13-17, 4523, Information visualization, Gustav Taxén, OlikView lecture• lab session mo 27.4, 13-15 Magenta, VTK, (Gapminder - preliminary)• F7 tue 28.4 13-16 1537 Application lectures• F8 tue 28.4, 16-18, 4523, Visualization of uncertainty, Kai-Mikael Jää-Aro• F9 tue 5.5, 13-15, 1537, Conclusions, exam, Lars Kjelldahl• lab session xxx, 2h, xx, final session for lab assignments

Schedule, there will bechanges so look on the

web page during the nextfew days!!

Page 2: Schedule, there will be changes so look on the web page

2

Differences in intensity are important

I expect that we will come back to the human visual system

seen as

• Proximity

• Similarity

• Direction

Gestalt principles Closure

Visualization techniques,methods, concepts, algorithms

• Scalar visualization, Streamlines, streaklines,particle traces, Stream ribbons, LIC

• Surface rendering, glyphs, contouring• Volume rendering: Ray casting, slicing, animation• Colour mapping, transfer function• Marching cubes, Dividing cubes• Contour Stitching• Multi resolution techniques• OpenDX

CHARACTERIZING DATA• Multidimensional

– 0D (points)– 1D (lines)– 2D (surfaces)– 3D (volmes)– XD (…)

•Multivariate–0V (structure)–1V (scalar)–2V (e.g. two scalars)–3V (e.g. vectors)–4V

Multidimensional refers to the independent variablesMultivariate refers to the dependent variables, i.e. variables that are functions of independent variables

Page 3: Schedule, there will be changes so look on the web page

3

Vertex

Cell types

Polyvertex

Line

Polyline

Triangle

Triangle strip

Quadrilateral

Polygon

Advection - flow

Particle traces: trajectories traces by fluid particles over timeStreamlines: show the flow in a static vector field—they usethe vector values for a single timestep, along a curveStreaklines: particle traces at time t(i) that have previouslypassed through a point x(i), show the flow over time in adynamic vector field—they update the vector values for eachtimestep

Streamlines areoften colour-coded toindicate thevelocity ateach point alongthe line.

Streamlines

Alternatively thethickness of theline (turned intoa tube) canindicatevelocity.

Streamlines

Likewise, streamribbons show thevorticity (whirling) of the field

Streamribbons Gas flow

Page 4: Schedule, there will be changes so look on the web page

4

Line integral convolution

We map a white-noisetexture on the vectorfield and then integrateforwards andbackwards andaverage thecontribution from thetexels on that path. http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node318.html

Volume rendering

Sources of volume visualization

Medical data of the interior of the human bodyobtained by computed tomography

(CT) or magnetic resonance imaging (MRI).Other examples are computational fluiddynamics (CFD), geological and seismicdata, as well as abstract mathematical datasuch as 3D probability distributions ofpseudo random numbers.

Ray casting

The four basic steps of volume ray casting:(1) Ray Casting (2) Sampling (3) Shading (4) Compositing.

Slicing, animation

Page 5: Schedule, there will be changes so look on the web page

5

Contouring Isosurface in 3D

http://en.wikipedia.org/wiki/Isosurface

Marching cubes, algorithm for drawingcontour surfaces, starting with boxes withvalues at the 8 verticesOriginally there are 256 cases, but due tosymmetries they can be reduced to 16cases

MARCHING CUBES• Consider a cube (voxel) in the

dataset• We have three cases:

– All vertices above the iso-value– All vertices below the iso-value– Mixed above and below

• Binary label each node(above/below)

• Examine all possible cases ofabove or below for eachvertex

• 8 vertices implies 256 possiblecases +

+

+

+

+ +

+-

• For each edge find the vertex location along the edge using linearinterpolation

Interpolate to get Triangle Vertices

T=5 T=8

i i+1xi x i+1

Marching cubes, algorithm fordrawing contour surfaces

Page 6: Schedule, there will be changes so look on the web page

6

AMBIGUITIES IN 2D

Break! or Join!

In 2D this is not a problem since choice for a case is independent of other choices!

AMBIGUITIES IN 3D• Cases 3,6,7,10,12 and 13 are ambigous• Turns out that positive and negative are not symmetric• Holes can be created in the surface!

DIVIDING CUBES

From Ynnerman

DIVIDING CUBES iterations

CONTOUR STITCHING• Given: 2 two-dimensional

closed curves– Curve #1 has m points– Curve #2 has n points

• Which point(s) does vertexj on curve one correspondto on curve two

j

??

GlyphsWe can map scalar variables onto the properties ofgeometrical objects: glyphs.Note the normalisation issues involved.

Page 7: Schedule, there will be changes so look on the web page

7

Bar charts as glyphs Shape of glyphs

The simplest glyphs map size with a data value

GLYPHS• Use 3D objects with

inherent direction torepresent vector

• Can use color and size torepresent additionalproperties

• Dimensionality of glyph cancause problems

• Scaling of glyphs often notsame as the property theyrepresent

Saturation

Spectral

Intensity

Spectral and double-endedcolour scales

Page 8: Schedule, there will be changes so look on the web page

8

COLOR MAPPPING

• Maps the scalar to acolor (1D technique)

• Implemented usinglookup tables indexedwith the scalar value

• Lookup table specifiesRGB or HSVAcomponents

TRANSFER FUNCTIONS• Instead of using a lookup table we could specify a

“transfer function” mapping scalar data values tocolour, RGB components or opacity

Red

value

I

Green

value

I

Blue

value

I

Opacity

HU

-1000 00 1000

AP

TRANSFER FUNCTIONS

Fat H2O Vessels BoneAir

TRANSFER FUNCTIONS BLOCKING SCHEMES

Level 0

Level 1

Level 2

Level 3

Hierarchical blocking Flat blocking

Final composition Final composition

Level 0 Level 1 Level 2 Level 3

Data reduction 2.2:1 Data reduction 3.8:1

Page 9: Schedule, there will be changes so look on the web page

9

Literature and informationsources on visualization

OpenDX—Paths to VisualizationSchroeder, Martin, Lorensen, Visualization

Toolkit, 4rd editionhttp://portal.acm.org/dl.cfmhttp://ieeexplore.ieee.org/Xplore/dynhome.jsp

Software

• MVE (Modular Visualization Environment),such as OpenDX/DataExplorer, AVS

• Software toolkits, such as VTK, libraries ofwith functions usually available from aprogramming language, more flexibility, butmore learning needed

• Specialized visualization applications, suchas Vis5D

OpenDX features

• Graphical programming environment• Data-flow programming model• Easy import of foreign data• Platform-independent• Open source code• Extensible• Free

• Now we will run it on PC computers; lab instructions is based on use ofMac computers; we are looking for one person to assist as lab personin addition to Gustav and Lars

OpenDX

Graphical data-flow language

• Computation is represented byboxes—modules.

• Different modules operate on differentaspects of data.

• Data moves through connections fromsources through filters to sinks.

Page 10: Schedule, there will be changes so look on the web page

10

Common modules• Import—read data• Select—picks a member from a group• IsoSurface—create isosurfaces• Streamline—create streamlines• AutoGlyph—create objects shaped and sized

according to data values• AutoColor—colour objects according to data• Compute—make computations on data• Image—show visualisation

OpenDX data model

A field represents some set ofdata. It is composed ofcomponents. Each componentis an array of data—scalars orndimensional vectors.Every point in space may havemultiple data values.

OpenDX - Originally from IBM, information can befound on different web pages, such ashttp://www.research.ibm.com/dx/