Presentation is loading. Please wait.

Presentation is loading. Please wait.

VTK: Data Shroeder et al. Chapter 5 University of Texas – Pan American CSCI 6361, Spring 2014 After Taku Komura and other lecture sets

Similar presentations


Presentation on theme: "VTK: Data Shroeder et al. Chapter 5 University of Texas – Pan American CSCI 6361, Spring 2014 After Taku Komura and other lecture sets"— Presentation transcript:

1 VTK: Data Shroeder et al. Chapter 5 University of Texas – Pan American CSCI 6361, Spring 2014 After Taku Komura and other lecture sets http://www.inf.ed.ac.uk/teaching/courses/vis/

2 Overview Provides overview or “road map” to data and structure representations in VTK –Same data and structure representation concepts common in computer graphics Do understand that examples from previous weeks are more like the “high level” at which you’ll be working for the terrain and color mapping project Discrete vs. continuous representation Topology and Geometry VTK data representations – cell types –0, 1, 2, 3, dimensions –Structured and unstructured Data attributes

3 Data Representation in Visualization Last time - system architecture for visualization –visualization pipeline –rendering techniques –Focus now on data For (computer) visualization data is –discrete (in representation) –structured / unstructured (e.g. grid / cloud) –of a specific dimension (1, 2, 3, n) Computer graphics, recall, is foundation –Here, will take foundational ideas and characterize with focus on applications in visualization Can think of organizing structure (architecture) for data: –Topology How things (data elements) fit together –Geometry Particular values that create (instantiate) a particular object Data Attributes

4 Data Representation in Visualization Last time - system architecture for visualization –visualization pipeline –rendering techniques –Focus now on data For (computer) visualization data is –discrete (in representation) –structured / unstructured (e.g. grid / cloud) –of a specific dimension (1, 2, 3, n) Computer graphics, recall, is foundation –Here, will take foundational ideas and characterize with focus on applications in visualization Can think of organizing structure (architecture) for data: –Topology How things (data elements) fit together –Geometry Particular values that create (instantiate) a particular object Data Attributes

5 Data: Discrete vs. Continuous Real World is continuous (duh) Data for visualization is discrete –Computers are good in handling discrete data –discrete representation of a real world (of abstract) concept Text example of –y = x 2, and f(x,y) = x 2 - y 2 –Obviously, continuous –To create digital / visual representation must sample points (with which you are now familiar) E.g., built in method for sampling over function However, difficult to visualize continuous shape from raw discrete sampling? –Requires topology and interpolation –… “how things fit together”

6 Topology and Geometry Topology: –Just, the way the data points are “put together” … As lines, polygons, etc. –More formally: Relationships within the data invariant under geometric transformation (e.g., orientation, translation) –i.e., the information which vertex is connected to which edge, which face is composed of which edges, etc. Did not say much about transformation earlier when looking at graphics –Idea is that classes of transformations preserve certain properties –E.g., affine transformations for computer graphics Geometry: –Just, putting particular values in for the elements of particular topology –Creating an instance of (or instantiating) a particular form Topology is invariant under geometric transformation

7 Interpolation and Topology For various reasons interpolation is important in visualization –Recall cg shading, e.g., Gouraud –Pragmatically, for storage efficiency –For representing change over known (or ascribed) values Interpolation: –Increasing resolution of a discrete representation by producing intermediate samples Use interpolation to shade whole cube: –in example: producing intermediate color pixels over cube topology from discrete vertex samples Example: –Vertices represent spatial temperature at the 8 discrete points? e.g. a color scale with blue(=cold) -> green -> red( = hot) –How to visualize temperature field over whole cube?

8 Detail: Interpolate over a Rectangle Optional – see text How till the red color dot on the right lower corner affect the color of the point near the left top? What happens if we change the representation? Discrete data samples remain the same –Topology has changed => affects interpolation => effects visualization

9 Interpolation in Digital Images Often used technique Some digital cameras use interpolation to produce a larger image than the sensor captured –Also using the topology of data –E.g. below: top, just increase size – original pixels evident, bottom, interpolate From computer graphics –Various smoothing (and antialiasing) algorithms, effectively “interpolation”, as used here

10 Topological Dimension, or, Dimensionality Data has an inherent topological dimension –I.e., minimum number of independent continuous variables needed to specify the location inside the data –Or, just, dimensionality –Points : 0D, –Lines, curves : 1D, –Surfaces : 2D, –Volumes : 3D –Time dependent volumes : 4D –and, n-dimensional …

11 VTK Data Representation VTK-ese, or terminology Data objects: structure + value –A “dataset”

12 Dataset, again Again, dataset consists of 2 main components –Structure of the data Structure gives spatial meaning to the attributes –Value Attributes associated to particular parts of the structure Example: –values = { blue, green, green, green, green, green, turquoise, red} –attributes alone are meaningless without structure

13 Structure of Data Again Structure has 2 main parts –Topology : determines interpolation required for visualization “shape” of data –Geometry instantiation of the topology specific position of points in geometric space

14 Concrete Representation of Datasets Putting things together in VTK Points specify where the data is known – specify geometry Cells allow us to interpolate between points –specify topology of points

15 VTK Cells Similar to OpenGL – no surprise Quite similar in all graphics applications Fundamental building blocks of shapes Defined by topological dimension –1,2,3d Specified as an ordered point list Primary or composite cells –composite : consists of one or more primary cells

16 0 and 1 Dimensional Cell Types (straightforward) Zero-dimensional –Vertex Primary zero-dimensional cell Definition: single point –Polyvertex Composite zero-dimensional cell –composite : comprises of several vertex cells Definition: arbitrarily ordered set of points One-dimensional –Line Primary one-dimensional cell type Definition: 2 points, direction is from first to second point. –Polyline Composite one-dimensional cell type Definition: an ordered set of n+1 points, where n is the number of lines in the polyline

17 Two-Dimensional Cell Types Many to enhance polygon representation flexibility Triangle –Primary 2D cell type –Definition: counter-clockwise ordering of 3 points order of the points specifies the direction of the surface normal Triangle strip –Composite 2D cell consisting of a strip of triangles –Definition: ordered list of n+2 points n is the number of triangles Quadrilateral –Primary 2D cell type –Definition: ordered list of four points lying in a plane constraints: convex + edges must not intersect Pixel –Primary 2D cell, consisting of 4 points topologically equivalent to a quadrilateral constraints: perpendicular edges; axis aligned –numbering is in increasing axis coordinates Polygon –Primary 2D cell type –Definition: ordered list of 3 or more points constraint: may not self-intersect

18 Three-Dimensional Cell Types Tetrahedron –Definition: list of 4 non-planar points Six edges, four faces Hexahedron –Definition: ordered list of 8 points six quadrilateral faces, 12 edges, 8 vertices constraint: edges and faces must not intersect Voxel –“Volume pixel” –Topologically equivalent to Hexahedron –constraint: each face is perpendicular to a coordinate axis –“3D pixels” –Don’t deal with, but foundation of much

19 Example: Hexahedron Cell In fact each cell type represented by set/list of points –From computer graphics, “vertex list”, etc. –Definition: ordered list of 8 points six quadrilateral faces, 12 edges, 8 vertices constraint: edges and faces must not intersect

20 Example Applications & Cell Types Lines –Segmentation of tissues from images Pixels –images, regular height map data Quadrilaterals –Finite element analysis Voxels : “3D pixels” –volume data : medical scanners

21 Attribute Data Details and examples Information associated with data topology –usually associated to points or cells Examples : –temperature, wind speed, humidity, rain fall (meteorology) –heat flux, stress, vibration (engineering) –surface normal, color (computer graphics) Usually categorized into specific types: –scalar (1D) –vector (commonly 2D or 3D; ND in RN) –tensor (N dimensional array)

22 Attribute Data : Scalar Single valued data at each location –simplest and most common form of visualisation data

23 Attribute Data: Vector Data Magnitude and direction at each location –3D triplet of values (i, j, k) –Also Normals – vectors of unit length (magnitude = 1)

24 Dataset Types Overview + detail Defined by structure type: regular or irregular If there is a mathematical relationship between the point and cell positions it is regular –if the points are regular, the geometry is regular –if the cells are regular, the topology is regular Regular data can be implicitly represented –saves storage and computation (e.g. grid based representation) Datasets with implicit topology –Structured points (regular grid) –Rectilinear grid –Structured grid Datasets without implicit topology –Unstructured grid (has topology) –Polygonal data (might have topology) –Unstructured points (does not have topology)

25 Regular: Structured Points & Rectilinear Grid Structured points –Points & cells arranged in a regular grid axis aligned grid for line elements (1D), pixels (2D) or voxels (3D) e.g. images (2D), medical scanners (3D) regular topology and geometry –uniform, equally spaced, axis aligned cells Rectilinear Grid –Points and cells arranged in a regular grid topology is regular geometry is partially regular points are arranged along the axes but the spacing may vary e.g. log-scale

26 Example: Global Climate Model How well does rectilinear grid using regular latitude-longitude grid represent earth?

27 Example: But, Earth is a Sphere Problem: as approach pole, cell size gets smaller!

28 Semi-Regular : Structured Grid Regular topology Irregular geometry (completely) Surface triangulations are structured grids –common topology = triangles Not all polygon surfaces have regular topology

29 Irregular: Unstructured Points and Grids Unstructured Points –Points irregularly located in space –No topology –No structured geometry e.g. sparse measurements of temperature etc. –Difficult to visualize e.g., unstructured point clouds Can be from 3D scanners –Need surface reconstruction from unstructured points clouds topology recovery Unstructured Grid –Both topology and geometry unstructured can range from 0D to 3D topologies general, flexible, inefficient to store e.g. finite element analysis –Using higher resolution grids near where precise simulation is needed,rough grids for regions less important –Same verticies might be both a structured (implicit topology) and unstructured grid

30 Polygonal Data - Rendering Essential representation for visualization (and computer graphics) Consists of points, lines, polygons – graphics primitives –irregular geometry –irregular topology –Usually irregular (modelled by humans, or sticking regular data together) –used for rendering

31 End.


Download ppt "VTK: Data Shroeder et al. Chapter 5 University of Texas – Pan American CSCI 6361, Spring 2014 After Taku Komura and other lecture sets"

Similar presentations


Ads by Google