0% found this document useful (0 votes)
182 views52 pages

Scalar Visualization Techniques

Uploaded by

Paul Ben
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
182 views52 pages

Scalar Visualization Techniques

Uploaded by

Paul Ben
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 52
Scalar Visualization Techniques Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization Data visualization pipeline recent “tava “Getnet cae image eR) irpon EY ter »®: =: ‘Go 3 ener 1G T data acquisition data enriching, map abstract. transformation, data to visual Roresceions insight into the original phenomenon 1. Data Acquisition - data are prepared for visualization (e.g.. by applying a smoothing filter, interpolating missing values, or correcting erroneous measurements) -- usually computer-centered, little or no user interaction. Data Filtering - selection of data portions to be visualized -- user-centered. 3. Data Mapping focus data are mapped to geometric primitives (¢.g., points, lines) and their attributes (e.g. color, position, size); most critical step for achieving Expressiveness and Effectiveness. 4. Data Rendering: geometric data are transformed to image data. Scalar ¢ scalar data structure is the basic data type that holds only a single atomic value + Numeric, Character, Integer, Boolean and Complex + No direction Scalar Fields Vector Fields * Scalar field or scalar-valued function associates a scalar value to every point in a space — possibly physical space. ... Examples * Temperature distribution throughout space, ¢ Air pressure distribution in an aeroplane wing Dr. SVengadeswaran, VIF Vellore St $020 Data Visualization 8 Introduction * Visualizing scalar data is frequently encountered in science, engineering, and medicine. Scalar Function * fROR 1D, histogram ° f:R24R 2D, color mapping, contouring, height plot ° f:R35R 3 D, isosurface, slicing, volume visualization Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization Popular scalar visualization techniques 1. Color mapping 2. Contouring 3. Height plots Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 5 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 Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization Color look-up table ¢ Associate a specific color with every scalarvalue * The lookup tableholds an array of colors. Associated with the table is a minimum and maximum scalar range into which the scalars are mapped. * Scalar values greater than the maximum are clamped to the maximum color, scalar values less than the minimum are clamped to the minimum value. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 7 Scalar Visualization Then, for each scalar value s; the index /into the color able with entries is given as: s;max ii=n-l otherwise: i=n { Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 8 Transfer Functions Transfer Functions A more general form of the lookup table is called transfer function. A transfer function is any expression that maps scalar values into a color specification. For example, a function can be used to map scalar values into separate intensity values for the red, green, and blue components. A lookup table is a discrete sampling of a transfer function. We can create a lookup table from any transfer function by sampling the transfer function at a set of discrete points. intensity red green blue Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization Color Mapping + In some applications, we want to emphasize the variations of the data rather than absolute data values. « This is useful when we are interested in detecting the dataset regions where data changes most quickly or stays constant. For this goal, we can use a color map containing two or more alternating colors that are perceptually very different. * When the data values change, the colors change abruptly, yielding the easily detectable band-like patterns in the visualization. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 10 Color Map + Forexample, geographical applications often encode landscape height using a particular color map that contains colors, which suggest typical relief forms at different heights, including blue (sea level), green (fields), beige (hills), brown (mountains), and white (mountain peaks). + Inother applications, such as medical imaging, the simple luminance color map works best. + Rainbow coloring would result in loss of linearity due to color values being mapped to hue so that some users perceive the colors to change “faster” per spatial unit in the higher yellow-to-red range than in the lower blue-to- cyan range.. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization uw Luminance color Map + Use grayscale to represent scalar value +Most scientific data (through measurement, observation, or simulation) are intrinsically grayscale, not color Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 2 Luminance Colormap 10 0.0 [=] 0.0 (b) (a) a luminance colormap and (b) a zebra colormap fa) (b) The luminance colormap shows absolute values, whereas the zebra colormap emphasizes rapid value variations. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 13, Rainbow Colormap + Red: high value; Blue: low value + Medical visualization with luminance and rainbow colormaps a oo ad | Bees Colormap Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization u“ Rainbow Colormap transfer functions scalar value g f > 6 - dx: R=1, G=0, B=0 Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 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 Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 16 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 Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization wv Designing effective colormaps * Some application, emphasize the variation of the data — Colormap containing two or more alternating colors ¢ Many other colormap designs — Geographical application — Classical medical imaging Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 18 Designing effective colormaps The choice of the number of Color N —Asmall 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 Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization Designing effective colormaps (a) 256 colors (©) 32 colors (©) 16 colors (@) 8 colors: Color banding caused by a small number of colors in a Look -up table. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 20 Exp: Rainbow Colormap Air Temperature Dec Global air temperature by month Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 21 Exp: Sun in green-white colormap Le Ee. ola) STU MELE) Summary ¢ 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 Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 23 Contouring eA natural extension to color mapping is contouring. When we see a surface colored with data values, the eye often separates similarly colored areas into distinct regions. *When we contour data, we are effectively constructing the boundary between these regions. These boundaries correspond to contour lines (2-D) or surfaces (3-D) of constant scalar value. *Examples of 2-D contour displays include weather maps annotated with lines of constant temperature (isotherms), or topological maps drawn with lines of constant elevation. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 24 Contouring Cartograph 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 + For 2D dataset, a contour line is called anisoline + For 3-D dataset, a contour is a 2-D surface,called isosurface Contouring One contour cla O eee Contouring and Color Banding Contouring Value 10.22 E.... 0.11 0.085 0.00 =-0.055 —0.11 i: 0.22 7 contourlines Dr. SVengadeswaran, VIt VES S302 Data Visualization Contouring and Colormapping: Show (1) the unrelonan lalla) Ean 74 tT specific values 28 Properties of Contours Indicating specific values of interest eln the height-plot, a contour line correspondswith the interaction of the graph with a horizontal plane of s value Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 29 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 ofthe function’s maximum variation: the gradient Contour lines and Gradient Dr. SVengadeswaran, VIT Vellore 30 Constructing Contours Finding line faa PARI Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization Contour line in weather forecast Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 1010 hPa s0aphee 1026002 1028 hPa yn 1026 KPa tovenre ioignre 1028 hPa ns 006 NP 1026 hPa 1010 Pa y 1010 Pe alee roid ¥ 0r6hre hore 1026hP» . rood hee + Iso lines at + Air pressure threshold 1013 1 + <1013 —Low pressure (rain) sooo, 000 + >1013—High pressure (sunny) CSE 3020 Data Visualization ee) = ‘Dr. SVengadeswaran, VIT Vellore 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 use linear interpolation + For each cell, at least two points and at most many points as cell edges + Use line segments to connect these edge-intersection points within cell - A contour line is a polyline. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 34 Contouring Contd... + Once the points on all edges are generated, wecan connect these points into contours using a few different approaches. * One approach detects an edge intersection, ie. the contour passes through an edge, and then _ tracks this contour as it moves across cell boundaries. + We know that if a contour edge enters a cell, it must exit a cell as well. * The contour is tracked until it closes back on itself, or exits a data set boundary. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 35 Constructing Contours * Contouring need — Atleast piecewise linear, C!dataset — The complexity of computing contours * The most popularmethod — 2D: Marching Squares — 3D: Marching Cubes 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 thanisovalue *Outside state (0): vertex attribute value is largerthan isovalue *A quad cell: (S3S2S:So), 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 segmentsoriginating from neighboring grid cells that share an edge Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 38 Implementation: Marching Squares Vs Yat J¥3 Vat [V3 Yap Va Vo Vs [vat {¥7 Vo Yo Val Yo Val Lvo Yah Ly vy vol Villy 0000 0001 0010 0011 0110 0111 Vv, Vo} f¥s | Ya] 1% V5 Vs Vol {V3 Vo vo Val Lvof val [vos y YX il [voy 1000 1001 1010 1011 1100 1101 1110 1111 4-bit code construction |V3]V2|V4|Vo| Topological State of a Quad Cell Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 39 Marching Cubes * Similar to Marching Squares but 3D versus 2D * 28= 256 different topological cases; reduced to only 15 by symmetry considerations — 16 topological states * Marching Cubes: A High Resolution 3D Surface Construction Algorithm Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 40 What are Marching Cubes? Ye Marching Cubes is an algorithm which “creates triangle models of constant density surfaces from 3D scalar data.” Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 41 Marching Cubes Explained * High resolution surface construction algorithm. * Extracts surfaces from adjacent pairs ofdata slices using cubes. * Cubes “march” through the pair of slicesuntil the entire surface of both slices has been examined. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization Marching Cubes Overview Load slices. Create a cube from pixels on adjacentslices. Find vertices on the surfaces. Determine the intersection edges. Interpolate the edgeintersections. Calculate vertex normals. Output triangles and normals. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 43 How Are Cubes Constructed 2 ¢ 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. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 44 Implementation: Marching Cube ‘00000008 “ooos000? © “ooooo0T! i ‘01000001 00001110 © “01000011 “0101001 seilee 10001107 “04010101 “01001701 “00011110 “10100101 “70001110 Bows Yr Me y, 8-bit code construction 4 eee Rem Mi ce-l| Marching cube generates a set of polygons for each contoured cell: triangle, quad, pentagon, and hexagon Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 45 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 usingpoint- 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 Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 46 Height Plots *Height plots, also called elevation or carpet plots, were introduced by our first example during the introduction. Given a two-dimensional surface D; € D, part of a scalar dataset D, height plots can be described by the mapping operation m: Ds->D, m(x)=x+s(x)n(x), ” x © Ds “Where s(x) is the scalar value of D at the point x and n(x) is the normal to the surface D, at x. In other words, the height plot mapping operation “warps” a given surface D, included in the data set along the surface normal with a factor proportional to the scalar values. Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization a7 Height Plots Height plot over a planar 2-D surface Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization Height Plots Population density of America ‘Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization Height Plots Height plot over a nonplanar 2-D surface Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 50 Height Plots Potato Earth” shows variations in planet's gravity Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization BL 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 ofthe scalar data * Advantage — Produce intuitive results — Easily understood by the vast majority of users — Simple to implement * Disadvantage — Anumber of restrictions — One or two dimensional scalardataset — We want to visualize the scalar values of ALL, not just a few of thedata points of a 3D dataset Dr. SVengadeswaran, VIT Vellore CSE 3020 Data Visualization 52

You might also like