Download presentation
Presentation is loading. Please wait.
Published byAndrew Parrish Modified over 9 years ago
1
Sheng Bin Data Representation Chapter 3
2
Continuous Data Sampled Data Discrete Datasets Cell Types vertex, line, triangle, quad, tetrahedron, hexahedron Grid Types Uniform, rectlinear, structured, Unstructured Attributes Scalar, Vector, Color, Tensor, Non-numerical Computing Derivatives of Sampled Data outline Implementation Advanced Data Representation
3
Continuous Data versus Discrete Data Continuous Data Most scientific quantities are continuous in nature Scientific Visualization, or scivis Discrete Data E.g., text, images and others that can not be interpolated or scaled Information Visualization, or infovis Continuous data, when represented by computers, are always in discrete form These are called “sampled data” Originated from continuous data Intended to approximate the continuous quantity through visualization
4
Continuous Data a: discontinuous function b: first-order continuous function: first- order derivative is not continuous c: high-order continuous function
5
Continuous Data f is a d-dimension, c-valued function D: function domain C: function co-domain Continuous data can be modeled as:
6
Continuous Data Cauchy criterion of continuity Graphically, a function is continuous if the graph of the function is a connected surface without “holes” or “jumps” A function is continuous of order k if the function itself and all its derivative up to order k are also continuous In words, small changes in the input result in small changes in the output
7
Geometric dimension: d the space into which the function domain D is embedded It is always 3 in the usual Euclidean space: d=3 Topological dimension: s The function domain D itself A line or curve: s=1, d=3 A plane or curved surface: s=2, d=3 Dataset dimension refers to the topological dimension Function values in the co-domain are called dataset attributes Attribute dimension: dimension of the function co-domain 1. D: Function domain 2. C: Function co-domain 3. f: Function itself
8
Sampling and Reconstruction
9
3.2 Sampled data Sampling: from continuous dataset to Sampled data Reconstruction: from Sampled data to recover/approximate continuous dataset
10
Sampled Dataset Sampled dataset Continuous dataset 1.p: sampling points 2.c: cells 3.f: sampled values 4.Φ: basis function or interpolation function
11
A signal domain is sampled in a grid that contains a set of cells defined by the sample points Point, Cell, Grid Sampling
12
Point Cell Grid
13
Reconstruction or interpolation function Piecewise fitting: one cell one time
14
Reconstruction Linear basis function For 1-D line P1 P2 0 r 1 reference cell
15
Basis Function Basis function shall be orthonormal 1.Orthogonal: only vertex points within the same cell have contribution to the interpolated value 2.Normal: the sum of the basic functions of the vertices shall be unity.
16
Basis Function Linear basis function For 2-D quad
17
Sampled Dataset Sampled dataset Continuous dataset 1.p: sampling points 2.c: cells 3.f: sampled values 4.Φ: basis function or interpolation function
18
cell=(p1,p2,p3,p4) D: (x,y,z) cell=(v1,v2,v3,v4) D: (r,s,t) and t=0 Basis Function
19
Coordinate Transformation Basis function is defined in reference cell Reference cell: axis-aligned unit cell, e.g., unit square in 2-D, unit line in 1-D Data are sampled at actual (world) cells Mapping between actual cell and reference cell
20
Discrete Datasets A Grid = cells + sample points Sample Values at cell centers/vertices Basis functions
21
Cell types Vertex Line Triangle Quad Rectangle Tetrahedron Hexahedron Parallelipiped Pyramid prism
23
Vertex d=0 Vertex Line Triangle Quad Rectangle Tetrahedron Hexahedron Parallelipiped Pyramid prism
24
Vertex Line Triangle Quad Rectangle Tetrahedron Hexahedron Parallelipiped Pyramid prism Line d=1
25
Line (cont.) Actual line d=1 Actual line d=2 Vertex Line Triangle Quad Rectangle Tetrahedron Hexahedron Parallelipiped Pyramid prism
26
Triangle d=2 Vertex Line Triangle Quad Rectangle Tetrahedron Hexahedron Parallelipiped Pyramid prism
27
Quad d=2 Vertex Line Triangle Quad Rectangle Tetrahedron Hexahedron Parallelipiped Pyramid prism
28
Vertex Line Triangle Quad Rectangle Tetrahedron Hexahedron Parallelipiped Pyramid prism Tetrahedron d=3
29
Vertex Line Triangle Quad Rectangle Tetrahedron Hexahedron Parallelipiped Pyramid prism Hexahedron d=3
30
Vertex Line Triangle Quad Rectangle Tetrahedron Hexahedron Parallelipiped Pyramid prism Hexahedron (cont.) d=3
31
Effect of Reconstruction Geometry: Constant Geometry: Linear Lighting: Constant Staircase shading Flat Shading Lighting: Linear ---------Smooth (Gauraud) shading
32
Effect of Reconstruction (cont.) Staircase Shading Flat Shading Smooth Shading
33
Grid types Grid is the pattern of cells in the data domain Grid is also called mesh Uniform grid Rectilinear grid Structured grid Unstructured grid
34
Uniform Grid 2-D3-D
35
Uniform Grid The simplest grid type Domain D is usually an axis-aligned box Line segment for d=1 Rectangle for d=2 parallelepiped for d=3 Sample points are equally distributed on every axis Structured coordinates: the position of the sample points in the data domain are simply indicated by d integer coordinates (n 1,..n d ) Simple to implement Efficient to run (storage, memory and CPU)
36
Uniform Grid Data points are simply stored in the increasing order of the indices, e.g, an 1-D array Lexicographic order
37
Rectilinear Grid 2-D3-D
38
Rectilinear Grid Domain D is also an axis-aligned box However, the sampling step is not equal It is not as simple or as efficient as the uniform grid However, improving modeling power
39
Structured Grid Further relaxing the constraint, a structured grid can be seen as the free deformation of a uniform or rectilinear grid The data domain can be non-rectangular It allows explicit placement of every sample points The matrix-like ordering of the sampling points are preserved Topology is preserved But, the geometry has changed
40
Structured Grid Circular domain Curved Surface 3D volume
41
Unstructured Grid It is allowed to define both sample points and cells explicitly The most general and flexible grid type However, it needs to store The coordinates of all sample points p i For each cell, the set of vertex indices ci={v i1,…v iCi ), and for all cells {c1,c2…}
42
Unstructured Grid
43
Attributes Scalar, Vector, Color, Tensor, Non-numerical
44
Attribute data is the set of sample values of a sampled dataset Attribute = {f i } Sampled dataset Attributes
45
Attribute Types Scalar Attribute Vector Attribute Color Attribute: c=3 Tensor Attributes Non-Numerical Attributes
46
Scalar, Vector, Color, Tensor, Non-numerical Scalar Attributes E.g., temperature, density,
47
Scalar, Vector, Color, Tensor, Non-numerical Vector Attributes E.g., Normal Force velocity A vector has a magnitude and orientation
48
Scalar, Vector, Color, Tensor, Non-numerical Tensor Attributes A high-dimensional generalization of vectors Tensor Vector Scalar A tensor describes physical quantities that depend on direction Vector and scalar describes physical quantities that depend on position only
49
Scalar, Vector, Color, Tensor, Non-numerical Tensor Attributes E.g. curvature of a 2-D surface E.g., diffusivity, conductivity, stress Tensor
50
Scalar, Vector, Color, Tensor, Non-numerical Non-numerical Attributes E.g. text, image, voice, and video Data can not be interpolated Therefore, the dataset has no basis function Domain of information of visualization (infovis)
51
Scalar, Vector, Color, Tensor, Non-numerical Color Attributes A special type of vector attributes with dimension c=3 RGB system: convenient for hardware and implementation R: red G: green B: blue HSV system: intuitive for human user H: Hue S: Saturation V: Value
52
RGB System Every color is represented as a mix of “pure” red, green and blue colors in different amount Equal amounts of the three colors determines gray shades RGB cube’s main diagonal line connecting the points (0,0,0) and (1,1,1) is the locus of all the grayscale value (0,0,0) (1,1,1) (0.5,0.5,0.5) (1,0,0) (0,1,0) (1,1,0) (1,0,1) (0,1,1)
53
RGB Cube R G B yellow magenta Cyan
54
HSV System Hue: distinguish between different colors of different wavelengths, from red to blue Saturation: represent the color of “purity”, or how much hue is diluted with white S=1, pure, undiluted color S=0, white Value: represent the brightness, or luminance V=0, always dark V=1, brightest color for a given H and S
55
HSV System HSV Color Wheel http://www.codeproject.com/KB/miscctrl/CPicker/ColorWheel.jpg S=0 S=1
56
Color, Light, Electromagnetic Radiation http://www.dnr.sc.gov/ael/personals/pjpb/lecture/spectrum.gif
57
RGB to HSV All values are in [0,1] max=max(R,G,B) min=min(R,G,B) diff=max-min V = max largest RGB component S = diff/max For hue H, different cases H = (G-B)/diff if R=max H =2+(B-R)/diff if G=max H =4+(R-G)/diff if B=max then H=H/6 H=H+1 if H < 0 Exp: Full Green Color (R,G,B)=(0,1,0) (H,S,V)=(1/3, 1,1) Exp: Yellow Color (R,G,B)=(1,1,0) (H,S,V)=(1/6, 1, 1)
58
HSV to RGB huecase = {int} (h*6) frac = 6*h – huecase lx= v*(1-s) ly= v*(1-s*frac) lz= v*(1-s(1-frac)) huecase =6 (0<h<1/6): r=v, g=lz, b=lx huecase =1 (1/6<h<2/6): r=ly, g=v, b=lx huecase =2 (2/6<h<3/6): r=lx, g=v, b=lz huecase =3 (3/6<h<4/6): r=lx, g=ly, b=v huecase =4 (4/6<h<5/6): r=lz, g=lx, b=v huecase =5 (5/6<h<1): r=v, g=lx, b=ly Exp: Full Green Color (H,S,V)=(1/3,1,1) (R,G,B)=(0,1,0) Exp: Yellow Color (H,S,V)=(1/6,1,1) (R,G,B)=(1,1,0)
59
Conclusion Fundamental issues involved in representing data for visualization applications A set of data cells Data attributes, several types: scalar vector color and tensor Basis function: constant and linear – Simplicity of implementation and direct support in the graphics hardware Grid Types: uniform, rectilinear, structured and unstructured grids
60
Sheng Bin The Visualization Pipeline Chapter 4
61
4.1 Conceptual perspective 4.2 Implementation considerations 4.3 Algorithms used in the visualization 4.4 Structure of the visualization applications Contents The focus is on presenting the structure of a complete visualization application, both from a conceptual and a practical perspective.
62
Conceptual perspective Scalar, Vector, Color, Tensor, Non-numerical
63
4.1 Conceptual Perspective Fig 4.1 The visualization pipeline (Computational Steering: the cycle above in real time)
64
4.1 Conceptual Perspective Four Visualization Stages: data importing; data filtering and enrichment; data mapping; data rendering Function mapping: Vis: Di --> Л Vis: function mapping Di : the set of all possible types of raw input data Л : the set of produced images Reverse function mapping : Insight: Л --> Di
65
4.1 Conceptual Perspective Fig 4.2 The visualization process seen as a composition of functions
66
4.1.1 Importing data Finding a representation of the original information D I : the raw information D : the set of all supported datasets of a given visualization process In practice, data importing can imply translating between different data storage formats Or resampling the data from the continuous to the discrete domain The data importing step should try to preserve as much of the available input information as possible Make as few assumption as possible about what is important and what is not
67
4.1.1 Importing data Finding a representation of the original information -- resampling the data from the continuous to the discrete domain E.G. Petroleum seismic data -- seismic reflection wave => digital sampling data
68
4.1.2 Data Filtering and Enrichment Decide important aspects or features. We must somehow turn our raw dataset into more appropriate representations---enriched datasets Data filtering or data enriching, two tasks – Extract relevant information – Enriched with high-level information that supports a given task The input and output are datasets
69
4.1.2 Data Filtering and Enrichment Petroleum seismic data -- wave correction; denoising Medical data -- noise data removal; enhancement of certain material data, etc.
70
4.1.3 Mapping Data Once we have the needed data, we must map it to the visual domain. Mapping function D: dataset Dv: dataset of visual features Comparison about mapping and rendering – Mapping: convert “invisible” to “visible” representations; – Rendering: simulates the physical process of lighting a “visible” 3D scene.
71
4.1.3 Mapping Data Fig 4.3 Direct and inverse mapping in the visualization process
72
4.1.4 Rendering Data Final step of the visualization process. Tuning viewing parameters
73
Implementation Perspective Scalar, Vector, Color, Tensor, Non-numerical
74
4.2 Implementation Perspective The Visualization pipeline F i perform the data importing, filtering, mapping, and rendering operations, in order. Input: raw data, output: the final image
75
4.2 Implementation Perspective Fig 4.4 A visualization application as a network of objects
76
4.2 Implementation Perspective Several professional visualization framework – VTK (Visualization Toolkit, Schroeder et al. 04) – C++ – Open-source product
77
4.2 Implementation Perspective (AVS) Fig 4.5 The height-plot application in the VISSION application builder [Telea and van Wijk 99]
78
4.2 Implementation Perspective Fig 4.6 The height-plot application in the ParaView application builder [Henderson 04]
79
4.2 Implementation Perspective Fig 4.7 A visualization application in the AVS app. builder [AVS, Inc. 06]
80
Algorithm Classification Scalar, Vector, Color, Tensor, Non-numerical
81
4.3 Algorithm Classification Large number of algorithms proposed One way of algorithm classification: based on the type of attributes these techniques work with – Scientific Visualization (Scientific parameters) --- Scalar, vector, tensor – Information Visualization --- Non-numeric attributes: text, graph, or general data table (abstract) – Color (special attribute:)
82
4.4 Conclusion The structure of the visualization process, or visualization pipeline. There is no clear-cut separation of the visualization stages – The main separation point: the abstract data become “visible” Seleciton of mapping function is crucial – Combination of science & art
83
Sheng Bin Scalar Visualization Chapter 5
84
Visualizing scalar data A number of the most popular scalar visualization techniques Color mapping Contouring Height plots outline Color mapping Design of effective colormaps Contouring in 2D and 3D Height plots
85
1. Data Importing 2. Data Filtering 3. Data Mapping 4. Date Rendering Recap of Chap 4: Visualization Pipeline
86
Scalar Function
87
Color Mapping color look-up table Associate a specific color with every scalar value The geometry of Dv is the same as D
88
Luminance Colormap Use grayscale to represent scalar value Luminance Colormap Most scientific data (through measurement, observation, or simulation) are intrinsically grayscale, not color Legend
89
Rainbow Colormap Red: high value; Blue: low value A commonly used colormap Luminance MapRainbow Colormap
90
Color mapping Scalar, Vector, Color, Tensor, Non-numerical
91
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
92
Rainbow Colormap Implementation void c(float f, float & R, float & G, float &B) { const float dx=0.8 f=(f 1)? 1 : f //clamp f in [0,1] g=(6-2*dx)*f+dx //scale f to [dx, 6-dx] R=max(0, (3-fabs(g-4)-fabs(g-5))/2); G=max(0,(4-fabs(g-2)-fabs(g-4))/2); B=max(0,(3-fabs(g-1)-fabs(g-2))/2); }
93
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
94
Rainbow Colormap http://atmoz.org/img/weatherchannel_national_temps.png
95
Exp: Earth map http://www.oera.net/How2/PlanetTexs/EarthMap_2500x1250.jpg
96
Exp: Sun in green-white colormap
97
Exp: Coronal loop http://media.skyandtelescope.com/images/SPD+on+CME+image+5+--+TRACE.gif
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.