Visualization of scientific data under Linux - Techniques and data wrangling Mike Walterman,
Download ReportTranscript Visualization of scientific data under Linux - Techniques and data wrangling Mike Walterman,
Visualization of scientific data under Linux - Techniques and data wrangling Mike Walterman, Manager of Graphics Programming, Scientific Computing and Visualization Group, Boston University Slide 1 Introduction • Present techniques for importing and visualizing data • Will use VTK and IDL running under LINUX as examples • Main Topics: - Planning and Implementing a visualization application - What are data wrangling, filtering, and mapping - Models and Mechanisms in VTK - Models and Mechanisms in IDL - Conclusions Slide 2 Planning and Implementing a Visualization • Main Objective: Creating pictures from source data • Step 1: Plan your visualization • Step 2: Implement the visualization Slide 3 Planning a Visualization • Decide on the scene and contents - 3D dynamic - 3D static - 2D images - Plots • Determine how source data will effect elements that create, or are in the scene - Material Properties (color, shading) - Geometric Properties (shape, position) - Rendering Properties (cameras, lights) • Systems performance issues - Data set reduction - Scene overload management (culling and clipping) Slide 4 Implementing a Visualization • Construction - From scratch (OpenGL, VTK) - Data flow model (AVS, OpenDX) - Functional model (MatLab, IDL) - Scene graph (OpenInventor, Performer) • Data Import - Creating custom I/O for you data set - Create custom reader - Write data to file format of an existing reader Slide 5 What are data wrangling, filtering and mapping • Data Wrangling: Getting your data known to the sytem. • Filtering: The process of mapping between data sets. • Mapping: The process of mapping data to scene attributes. • Types of sources: - Static data ( fields, cells, scalars, vectors, tensors ) - Procedural Data (functional specification) - Mixed ( functions with constraining static data ) • Types of scene attributes - Material Properties (color, shading) - Geometric Properties (shape, position) - Rendering Properties (cameras, lights) Slide 6 Filters • Source data to internal SciVis tool representation (Readers) - JPEG readers - Inventor readers - Volume readers • Conversion between internal representations (Filters) - Convolution operators (Frequency filtering) - Geometric transformations - Field transformations (e.g. color mapping) • Conversion from data set to graphics data/attributes (Mappers) - Determines attributes of visible objects - Determines attributes of cameras and lights Slide 7 Data Set Formats • Structured Points - 1D, 2D, or 3D - Define dimensions - Define spacing - Define origin • Structured Grid - Define dimensions - Define number of points - Define list of points – coordinates Slide 8 Data Set Formats (continued) • Rectilinear Grid - Define dimensions - Define X coordinate list - Define Y coordinate list - Define Z coordinate list • Polygonal Date - Arbitrary combinations of: * Surface graphics primitives * Lines * Polygons * Triangle Strips Slide 9 Data Set Formats (continued) • Unstructured Grid - Define list of points - coordinates - Define list of cells (groups of points) - Define list of cell types Slide 10 What is VTK? • Set of C++ classes • Interfaces to tcl, Java, and Python • Extensible through Object oriented means • Data flow model • Programmer's Environment • Kitware website – www.kitware.com Slide 11 Models and Mechanisms in VTK • Graphics Pipeline - Transforms graphical data into pictures • Visualization Pipeline - Transforms information into graphical data Slide 12 VTK Visualization Pipeline Elements • Reader - Reads in data from a source file • Source - Initializes the Visualization Pipeline by invoking a reader • Data Objects - Internal data representations that VTK understands • Filters – Processes the convert between Data Objects • Mappers - transforms Data Objects into Graphical Data Slide 13 The Mapping Chain • Convert sources into internal data objects - Write data to a VTK understood data format - Create a VTK reader that understands source format and creates a VTK Data Object • Map Data Objects to Data Objects using Filters • Map Data Objects to Graphical Data using Mappers Slide 14 VTK example # Image pipeline vtkImageBlockReader reader reader SetFilePattern "tmp/blocks_%d_%d_%d.vtk" reader SetDivisions 4 4 4 reader SetOverlap 3 reader SetWholeExtent 0 255 0 255 1 33 reader SetNumberOfScalarComponents 1 reader SetScalarType $VTK_UNSIGNED_SHORT vtkImageViewer viewer viewer SetInput [reader GetOutput] viewer SetZSlice 14 viewer SetColorWindow 2000 viewer SetColorLevel 1000 viewer SetPosition 50 50 viewer Render Slide 15 IDL • • • • • • • • • Mature Robust System Handles large data sets gracefully Interpretative, allows interactive use Command-line driven, language with Fortran-like feel Can be driven via scripts and in batch mode Extensible via user defined functions Many built-in numeric and statistical functions Many built-in image-processing functions Devoted user communitites in remote sensing, atmospheric sciences, Astronomy • Scientists Tool • Research Systems/Kodak - www.rsinc.com Slide 16 IDL Example • Creates a 3D Plot of a surface stored in a data file ; File: xsurface.pro ; Author: Erik Brisson c = fltarr(60,60) openr, 3, 'dat/ex_surf_60x60.dat' readf, 3, c xsurface, c end Slide 17 Conclusions • Import your data - Create a custom reader - Convert data to file format that the tool can read • Filter your data (convert between internal formats) • Map your data (map internal format to graphical data) Slide 18