Introduction to Scientific Visualization
Total Page:16
File Type:pdf, Size:1020Kb
CS 53000 Introduction to Scientific Visualization Introduction to VTK August 25, 2011 The Visualization Toolkit • Open source software for • Imaging • Computer Graphics • Visualization • Written in C++ • Supports scripting languages (wrappers) • Tcl/Tk • Python • Java CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Outline • Object-oriented design • Visualization pipeline • Data structure • Rendering • Examples CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Outline • Object-oriented design • Visualization pipeline • Data structure • Rendering • Examples CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Object-Oriented Design Cell abstract dimension # faces # edges # vertices Cell2D abstract Cell3D abstract dimension=2 dimension=3 # faces # faces # edges # edges # vertices # vertices Triangle Quad Polygon Tet Hexa Prism dimension=2 dimension=2 dimension=2 dimension=3 dimension=3 dimension=3 # faces=1 # faces=1 # faces # faces=4 # faces=6 # faces=5 # edges=3 # edges=4 # edges # edges=6 # edges=12 # edges=9 # vertices=3 # vertices=4 # vertices # vertices=4 # vertices=8 # vertices=6 CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Outline • Object-oriented design • Visualization pipeline • Data structure • Rendering • Examples CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Visualization Pipeline • Process objects Source(s) Filter(s) Mapper CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Visualization Pipeline • Process objects Source(s) Filter(s) Mapper Actor • Source: input data • Read data from file (reader) • Generate data from parameters (procedural) • Set up data structure CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Visualization Pipeline • Process objects Source(s) Filter(s) Mapper Actor • Filter: visualization processing • Compute data • Transform data • Create representation CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Visualization Pipeline • Process objects Source(s) Filter(s) Mapper Actor • Mapper: output data • Generate graphical primitives • Write data to file • Interface with another software or device CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Visualization Pipeline • Connections (type checking) Source(s) Filter(s) Mapper Actor Source Filter Source CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Visualization Pipeline • Connections (type checking) Source(s) Filter(s) Mapper Actor Filter Filter Filter CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Visualization Pipeline • Connections (type checking) Source(s) Filter(s) Mapper Actor Filter Filter Filter CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Visualization Pipeline • Connections (type checking) Source(s) Filter(s) Mapper Actor Filter Filter Filter CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Visualization Pipeline • Connections (type checking) Source(s) Filter(s) Mapper Actor Filter Filter Feedback CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Visualization Pipeline • Implicit control of execution (lazy evaluation) C G A B D modified D E F Section re-executes CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Outline • Object-oriented design • Visualization pipeline • Data structure • Rendering • Examples CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Cell Types vertex Polyvertex Line Polyline Triangle Triangle strip Quadrilateral Pixel Tetrahedron Hexahedron Voxel Wedge Pyramid CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Cell Types 0D vertex Polyvertex Line Polyline Triangle Triangle strip Quadrilateral Pixel Tetrahedron Hexahedron Voxel Wedge Pyramid CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Cell Types 1D vertex Polyvertex Line Polyline Triangle Triangle strip Quadrilateral Pixel Tetrahedron Hexahedron Voxel Wedge Pyramid CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Cell Types vertex Polyvertex Line Polyline 2D Triangle Triangle strip Quadrilateral Pixel Tetrahedron Hexahedron Voxel Wedge Pyramid CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Cell Types vertex Polyvertex Line Polyline Triangle Triangle strip Quadrilateral Pixel 3D Tetrahedron Hexahedron Voxel Wedge Pyramid CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Data Attributes Cell-wise / point-wise (vtkDataSetAttribute) Scalar 3D vector (u,v,w) normal (u,v,w) ||n||=1 a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 Texture coordinate (u,v) or (u,v,w) 2nd order tensor (3x3 matrix) CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Dataset Types Image Rectilinear grid Structured (curvilinear) grid Unstructured grid CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Dataset Types vtkObject vtkDataSet vtkRectilinearGrid vtkImageData vtkPointSet vtkStructuredData vtkStructuredGrid vtkUnstructuredGrid vtkPolyData 0-1-2-3D geometry 0-1-2D geometry CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Outline • Object-oriented design • Visualization pipeline • Data structure • Rendering • Examples CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Rendering in VTK RenderWindowInteractor RenderWindow Renderer Camera Lights Actor Property Mapper CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Outline • Object-oriented design • Visualization pipeline • Data structure • Rendering • Examples CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Demos CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011 Additional References • VTK User’s Guide • VTK tutorial http://www.cs.uic.edu/~jbell/CS526/Tutorial/Tutorial.html • The Visualization Toolkit An object-oriented Approach to 3D Graphics, 3rd edition, W. Schroeder, K. Martin, B. Lorensen, Kitware CS530CS - 53000Introduction - Introduction to Scientific to Scientific Visualization Visualization - 08/25/2011.