1 / 65

Scientific Visualization with ParaView

Scientific Visualization with ParaView. Robert Putnam putnam@bu.edu. IS&T Scientific Visualization Tutorial – Fall 2010. Outline. Introduction ParaView overview ParaView/VTK data geometry/topology Case study Interactive session. Scientific Visualization with ParaView – Fall 2010.

swinton
Download Presentation

Scientific Visualization with ParaView

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Scientific Visualization with ParaView Robert Putnam putnam@bu.edu IS&T Scientific Visualization Tutorial – Fall 2010

  2. Outline • Introduction • ParaView overview • ParaView/VTK data geometry/topology • Case study • Interactive session Scientific Visualization with ParaView – Fall 2010

  3. Introduction • Visualization: converting raw data to a form that is viewable and understandable to humans. • Scientific visualization: specifically concerned with data that has a well-defined representation in 2D or 3D space (e.g., from simulation mesh or scanner). *Adaptedfrom The ParaView Tutorial, Moreland Scientific Visualization with ParaView – Fall 2010

  4. Introduction • Paraview – open-source application designed for visualizing two- and three-dimensional data sets. • Built on VTK (“Visualization Tool Kit”) • Graphics user interface • Python scripting • Architecture extensible by plugins • Available for MS Windows, Linux, OSX • Support for large dataset / distributed architecture (client/server model) • Online and printed documentation from Kitware Scientific Visualization with ParaView – Fall 2010

  5. Generic visualization pipeline Source(s) Filters(s) Output (Rendering) - - - - - - - - - - - - - - - - - - - - - data/geometry/topology graphics Scientific Visualization with ParaView – Fall 2010

  6. Slice display heat.vtk (3D dataset) Slice (2D) Display Scientific Visualization with ParaView – Fall 2010

  7. Paraview user interface Menu bar Toolbars Pipeline Browser Object Inspector 3D View Scientific Visualization with ParaView – Fall 2010

  8. Combined filters to file Slice Filter scalar data heat2.jpg heat.vtk (3D dataset) Vectordata Stream Tracer Tube Filter Glyph Filter Scientific Visualization with ParaView – Fall 2010

  9. Combined filters to file Slice heat.vtk Stream Tube Glyph Scientific Visualization with ParaView – Fall 2010

  10. ParaView – Pipeline Browser • Pipeline Browser • located in the upper left corner of the user interface • allows you to build a visualization pipeline • allows you to interact with the current visualization pipeline • top of the pipeline browser is the name of the server to which ParaView is connected • below the server name is a tree structure representing each of the reader, source, and filter objects that are in the visualization pipeline. Scientific Visualization with ParaView – Fall 2010

  11. ParaView - Object Inspector • Object Inspector • located beneath the Pipeline Browser in the user interface • contains controls and information for the reader, source, or filter object selected in the Pipeline Browser • allows you to interact with the current visualization pipeline • content changes based upon the specific object selected Scientific Visualization with ParaView – Fall 2010

  12. Object Inspector - Properties • Object Inspector Tabs • There are three tabs in the Object Inspector: • Properties • Display • Information • The Properties Tab contains controls for specifying various parameters of the object selected in the Pipeline Browser. • Here is an example of what is shown in the Properties Tab for a Slice filter. Scientific Visualization with ParaView – Fall 2010

  13. Object Inspector - Display • Object Inspector Tabs • The Display Tab contains controls for setting the appearance of the object selected in the Pipeline Browser. • grouped into several sections: View, Color, Slice, Style, Edge Style, Annotation, Lighting, and Transformation. • Here is an example of what is shown in the Display Tab for a Slice filter. Scientific Visualization with ParaView – Fall 2010

  14. Object Inspector - Information • Object Inspector Tabs • The Information Tab contains statistical information about the output of the object selected in the Pipeline Browser. • Here is an example of what is shown in the Information Tab for a Slice filter. Scientific Visualization with ParaView – Fall 2010

  15. ParaView - Menus • File menu • handles various tasks such as opening data files, saving data files, loading state files, saving state files, saving screenshots, saving animations, and fileserver connections. Scientific Visualization with ParaView – Fall 2010

  16. ParaView - Menus • View menu • allows you to modify the camera and center of rotation for the 3D view. The view menu also allows you to toggle the visibility of the toolbars, inspectors, and views. Scientific Visualization with ParaView – Fall 2010

  17. ParaView - Menus • Filters menu • provides a list of available filters you can use to process data sets. • organized by recent, common, data analysis, temporal, and alphabetical. • The most commonly used filters, located under the Common subdirectory, are also located on the Common Filters Toolbar. • The filters are context sensitive and will only be available for selection if an appropriate data set has been loaded first and selected in the Pipeline Browser. Scientific Visualization with ParaView – Fall 2010

  18. ParaView - Menus • Help menu • provides information on the ParaView version, information on client server connections, and provides access to the online manual. • You can also visit the online version of the ParaView documentation: http://paraview.org/OnlineHelpCurrent/ Scientific Visualization with ParaView – Fall 2010

  19. ParaView - Help Scientific Visualization with ParaView – Fall 2010

  20. ParaView – Geometry v. Topology • Geometry of a dataset ~= points 0,1 1,1 2,1 3,1 0,0 1,0 2,0 3,0 • Topology ~= connections among points, which define cells • So, what’s the topology here? Scientific Visualization with ParaView – Fall 2010

  21. ParaView – Geometry v. Topology 0,1 1,1 2,1 3,1 0,0 1,0 2,0 3,0 Scientific Visualization with ParaView – Fall 2010

  22. ParaView – Geometry v. Topology 0,1 1,1 2,1 3,1 0,0 1,0 2,0 3,0 or 0,1 1,1 2,1 3,1 0,0 1,0 2,0 3,0 Scientific Visualization with ParaView – Fall 2010

  23. ParaView – Geometry v. Topology or 0,1 1,1 2,1 3,1 0,1 1,1 2,1 3,1 0,0 1,0 2,0 3,0 0,0 1,0 2,0 3,0 or 0,1 1,1 2,1 3,1 0,0 1,0 2,0 3,0 Scientific Visualization with ParaView – Fall 2010

  24. ParaView – Geometry v. Topology or 0,1 1,1 2,1 3,1 0,1 1,1 2,1 3,1 0,0 1,0 2,0 3,0 0,0 1,0 2,0 3,0 or or 0,1 1,1 2,1 3,1 0,1 1,1 2,1 3,1 0,0 1,0 2,0 3,0 0,0 1,0 2,0 3,0 Scientific Visualization with ParaView – Fall 2010

  25. Geometry/Topology Structure • Structure may be regular or irregular • Regular (structured) • need to store only beginning position, spacing, number of points • smaller memory footprint per cell (topology can be generated on the fly) • examples: image data, rectilinear grid, structured grid • Irregular (unstructured) • information can be represented more densely where it changes quickly • higher memory footprint (topology must be explicitly written) but more freedom • examples: polygonal data, unstructured grid Scientific Visualization with ParaView – Fall 2010

  26. Characteristics of Data • Data is organized into datasets for visualization • Datasets consist of two pieces • organizing structure • points (geometry) • cells (topology) • data attributes associated with the structure • File format derived from organizing structure • Data is discrete • Interpolation functions generate data values in between known points Scientific Visualization with ParaView – Fall 2010

  27. Structured Points (Image Data) • regular in both topology and geometry • examples: lines, pixels, voxels • applications: imaging CT, MRI • Rectilinear Grid • regular topology but geometry only partially regular • examples: pixels, voxels • Structured Grid (Curvilinear) • regular topology and irregular geometry • examples: quadrilaterals, hexahedron • applications: fluid flow, heat transfer Examples of Dataset Types Scientific Visualization with ParaView – Fall 2010

  28. Examples of Dataset Types (cont) • Polygonal Data • irregular in both topology and geometry • examples: vertices, polyvertices, lines, polylines, polygons, triangle strips • Unstructured Grid • irregular in both topology and geometry • examples: any combination of cells • applications: finite element analysis, structural design, vibration Scientific Visualization with ParaView – Fall 2010

  29. Examples of Cell Types Scientific Visualization with ParaView – Fall 2010

  30. Data Attributes • Data attributes associated with the organizing structure • Scalars • single valued • examples: temperature, pressure, density, elevation • Vectors • magnitude and direction • examples: velocity, momentum • Normals • direction vectors (magnitude of 1) used for shading • Texture Coordinates • used to map a point in Cartesian space into 1, 2, or 3D texture space • used for texture mapping • Tensors • 3x3 only • examples: stress, strain Scientific Visualization with ParaView – Fall 2010

  31. File Format – Structured Points Editor structured-points.vtk: # vtk DataFile Version 2.0 first dataset ASCII DATASET STRUCTURED_POINTS DIMENSIONS 3 4 5 ORIGIN 0 0 0 SPACING 1 1 2 POINT_DATA 60 SCALARS temp-point float LOOKUP_TABLE default 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 Scientific Visualization with ParaView – Fall 2010

  32. File Format – Structured Points Editor structured-points.vtk: # vtk DataFile Version 2.0 first dataset ASCII DATASET STRUCTURED_POINTS DIMENSIONS 3 4 5 ORIGIN 0 0 0 SPACING 1 1 2 POINT_DATA 60 SCALARS temp-point float LOOKUP_TABLE default 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 Scientific Visualization with ParaView – Fall 2010

  33. File Format – Structured Points Editor structured-points.vtk: # vtk DataFile Version 2.0 first dataset ASCII DATASET STRUCTURED_POINTS DIMENSIONS 3 4 5 ORIGIN 0 0 0 SPACING 1 1 2 CELL_DATA 24 SCALARS temp-cell float LOOKUP_TABLE default 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 Scientific Visualization with ParaView – Fall 2010

  34. File Format – Structured Points Editor structured-points.vtk: # vtk DataFile Version 2.0 first dataset ASCII DATASET STRUCTURED_POINTS DIMENSIONS 3 4 5 ORIGIN 0 0 0 SPACING 1 1 2 CELL_DATA 24 SCALARS temp-cell float LOOKUP_TABLE default 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 Scientific Visualization with ParaView – Fall 2010

  35. Work flow – Case Study • Student summer project: visualize MRI lung imagery • 10 slices of 256x256 • MATLAB • Read in data • Noise removal, isolation of lung • Some visualization Scientific Visualization with ParaView – Fall 2010

  36. Work flow – Case Study • MATLAB -> VTK file • Write 256x256x10 float array to ASCII • file: • Add header , save with ‘.vtk’ extension: Scientific Visualization with ParaView – Fall 2010

  37. Work flow – Case Study • Read VTK file into Paraview, choose “Volume Visualization” display option, add Cut Filter: Scientific Visualization with ParaView – Fall 2010

  38. Work flow – Case Study • Change color map, use Paraview animation feature to move cut plane through volume: Scientific Visualization with ParaView – Fall 2010

  39. Work flow – Case Study • Produce movie • Save animation from Paraview, which produces image files (jpegs). • Read image files into Adobe Premiere Pro • Save as movie (.mov, .wmv, .avi. , etc.) Scientific Visualization with ParaView – Fall 2010

  40. Starting out - create sphere ParaView: 1. Choose Sources -> Sphere 2. Click Apply in Object Inspector 3. User Interface: - Undo - Color - Lighting - Camera Movement Scientific Visualization with ParaView – Fall 2010

  41. Example – Loading data ParaView: 1. Disconnect from Server File -> Disconnect which clears the pipeline 2. Open data file File -> Open (cylinder.vtk) 3. Click Apply in Object Inspector 4. In Toolbar area (or Object Inspector / Display), color by Pres. Show Legend. 5. Try Multi-view option (above upper right-hand corner of 3D window). Scientific Visualization with ParaView – Fall 2010

  42. Clipping, Cutting, Subsampling Selection Algorithms - Clipping • can reveal internal details of surface • ParaView - Clip Filter - Cutting/Slicing • cutting through a dataset with a surface • ParaView - Slice Filter - Subsampling • reduces data size by selecting a subset of the original data • ParaView - ExtractSubset Filter Scientific Visualization with ParaView – Fall 2010

  43. Example – Clipping ParaView: 1. disconnect from Server File -> Disconnect 2. open data file File -> Open (density.vtk) 3. apply Clip filter to density.vtk click on density.vtk in pipeline Filter -> Clip Scientific Visualization with ParaView – Fall 2010

  44. Example – Cutting/Slicing ParaView: 1. disconnect from Server File -> Disconnect 2. open data file File -> Open (density.vtk) 3. apply Slice filter to density.vtk click on density.vtk in pipeline Filter -> Slice Scientific Visualization with ParaView – Fall 2010

  45. Example – Subsampling ParaView: 1. disconnect from Server File -> Disconnect 2. open data file File -> Open (density.vtk) 3. Apply Extract Subset filter to density.vtk click on density.vtk in pipeline Filter -> Extract Subset 4. Apply Threshold filter to ExtractSubset click on ExtractSubset filter Filter -> Threshold Scientific Visualization with ParaView – Fall 2010

  46. Color Mapping • Scalar Algorithms • Color Mapping • maps scalar data to colors • implemented by using scalar values as an index into a color lookup table • ParaView • Color panel in Display tab of object inspector of data • Color by • Edit Color Map Scientific Visualization with ParaView – Fall 2010

  47. Example – Color Mapping 1. Disconnect from Server File -> Disconnect 2. Open data file File -> Open (subset.vtk) 3. go to the the color section in the Display Tab in the Object Inspector The "Color by" menu lists the names of the attribute arrays. Selecting an array name causes the dataset’s coloring to be based on the underlying scalar values in that array. Scientific Visualization with ParaView – Fall 2010

  48. Example – Color Mapping (cont) ParaView: 1. The color map may be edited in the Color Scale Editor window which appears when you click the Edit Color Map button in the Color section of the Display Tab. 2. Another way to change the mapping of data values to colors is by setting the Data Range. -- The default Data Range is set from the minimum data value in the data set to the maximum data value. -- click on the Rescale Range button to explicitly set these values. The values between the minimum and maximum are then linearly interpolated into the color table. Scientific Visualization with ParaView – Fall 2010

  49. Contouring • Scalar Algorithms (cont) • Contouring • construct a boundary between distinct regions, two steps: • explore space to find points near contour • connect points into contour (2D) or surface (3D) • 2D contour map (isoline): • applications: elevation contours from topography, pressure contours (weather maps) from meteorology3D isosurface: • 3D isosurface: • applications: tissue surfaces from tomography, constant pressure or temperature in fluid flow, implicit surfaces from math and CAD • ParaView • Contour Filter Scientific Visualization with ParaView – Fall 2010

  50. Example – Isoline / 2D Contours ParaView: 1. Disconnect from Server File -> Disconnect 2. Open data file File -> Open (subset.vtk) 3. Apply Contour filter to subset.vtk click on subset.vtk in pipeline Filter -> Contour 4. to color the contour line based upon its scalar value and the current color map, make sure the Compute Scalars checkbox in the Contour section of the Properties tab is selected Scientific Visualization with ParaView – Fall 2010

More Related