Presentation is loading. Please wait.

Presentation is loading. Please wait.

Scientific Visualization with ParaView Ray Gasser IS&T Scientific Visualization Tutorial – Spring 2010.

Similar presentations


Presentation on theme: "Scientific Visualization with ParaView Ray Gasser IS&T Scientific Visualization Tutorial – Spring 2010."— Presentation transcript:

1 Scientific Visualization with ParaView Ray Gasser rayg@bu.edu IS&T Scientific Visualization Tutorial – Spring 2010

2 ParaView Parallel Visualization Application –Multi-platform visualization application built on top of VTK extensible architecture via plugins rich scripting support through Python binaries available for Window, OSX, and Linux –Supports distributed computation of large datasets runs on distributed and shared memory parallel systems also runs on single processor system Client/Server model –Open source –Standards based –Active developer community –Professional support services available from Kitware IS&T Scientific Visualization Tutorial – Spring 2010

3 ParaView - User Interface IS&T Scientific Visualization Tutorial – Spring 2010

4

5 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. IS&T Scientific Visualization Tutorial – Spring 2010

6 ParaView - Menus –Edit menu provides control settings for ParaView, undo and redo functions, allows you to change pipeline topology, and allows you to configure how the mouse interacts with the 3D view. IS&T Scientific Visualization Tutorial – Spring 2010

7 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. IS&T Scientific Visualization Tutorial – Spring 2010

8 ParaView - Menus –Sources menu shows the various sources you can use to create a data set from within ParaView itself. A source is an object that creates data without using another data set or a data file as input. IS&T Scientific Visualization Tutorial – Spring 2010

9 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. IS&T Scientific Visualization Tutorial – Spring 2010

10 ParaView - Menus –Animation menu provides controls for moving between frames in an animation that has been previously created. IS&T Scientific Visualization Tutorial – Spring 2010

11 ParaView - Menus –Tools menu provides access to various tasks creating and managing custom filters creating a lookmark (a particular camera view) linking properties of one object to another object linking the camera in one view window to a camera in another view window managing plugins, testing, and debugging. IS&T Scientific Visualization Tutorial – Spring 2010

12 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/ IS&T Scientific Visualization Tutorial – Spring 2010

13 ParaView - Help IS&T Scientific Visualization Tutorial – Spring 2010

14 ParaView – Loading a state file IS&T Scientific Visualization Tutorial – Spring 2010 Unix Shell: katana:% cd materials/Demos/Contours katana:% paraview ParaView: File -> Load State (isosurface.pvsm)

15 ParaView – Interface –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. IS&T Scientific Visualization Tutorial – Spring 2010

16 ParaView – Interface –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 IS&T Scientific Visualization Tutorial – Spring 2010

17 ParaView – Interface –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 Contour filter. IS&T Scientific Visualization Tutorial – Spring 2010

18 ParaView – Interface –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 Contour filter. IS&T Scientific Visualization Tutorial – Spring 2010

19 ParaView – Interface –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 Contour filter. IS&T Scientific Visualization Tutorial – Spring 2010

20 ParaView - Models Visualization Model –Same as VTK Uses a data flow approach Data Objects and Process Objects (filters) connected to form a visualization pipeline –Pipeline Visible in the Pipeline Browser Built by loading data and attaching filters from menu Graphics Model –Same as VTK Transforms graphical data into pictures core objects: Actors, Lights, Camera, Transforms, Lookup tables, Renderer –Controlled via object inspector and GUI IS&T Scientific Visualization Tutorial – Spring 2010

21 Characteristics of Data Data is discrete –Interpolation functions generate data values in between known points 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 IS&T Scientific Visualization Tutorial – Spring 2010

22 Characteristics of Data Data has a topological dimension –determines methods for visualization –determines data representation –examples: 0D - points 1D - lines/Curves 2D - surfaces 3D - volumes Data is organized into datasets for visualization –Datasets consist of two pieces organizing structure –cells (topology) –points (geometry) data attributes associated with the structure –File format derived from organizing structure IS&T Scientific Visualization Tutorial – Spring 2010

23 Organizing Structure (Topology) Topology –the way in which constituent parts are interrelated or arranged –specified by one or more cells (types vary with visualization packages) vertex - (0D) point polyvertex - (0D) arbitrarily ordered list of points line - (1D) defined by two points polyline - (1D) ordered list of one or more connected lines triangle - (2D) ordered list of three points triangle strip - (2D) ordered list of n + 2 points (n is the number of triangles) polygon - (2D) ordered list of three or more points lying in a plane pixel - (2D) ordered list of four points with geometric constraints quadrilateral - (2D) - ordered list of four points lying in a plane tetrahedron - (3D) ordered list of four nonplanar points voxel - (3D) ordered list of eight nonplanar points with geometric constraints hexahedron - (3D) ordered list of eight nonplanar points IS&T Scientific Visualization Tutorial – Spring 2010

24 Examples of Cell Types IS&T Scientific Visualization Tutorial – Spring 2010

25 Organizing Structure (Geometry) Geometry –point coordinates assigned to a topology in 3D space –represented by points –example: (0 0 0), (0 1 0), (1 0 0) would be the geometry for a triangle IS&T Scientific Visualization Tutorial – Spring 2010

26 Examples of Dataset Types Image Data (Structured Points) –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 –regular topology and irregular geometry –examples: quadrilaterals, hexahedron –applications: fluid flow, heat transfer IS&T Scientific Visualization Tutorial – Spring 2010

27 Examples of Dataset Types (cont) Unstructured Points –no topology and irregular geometry –examples: vertex, polyvertex –applications: data with no inherent structure 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 IS&T Scientific Visualization Tutorial – Spring 2010

28 Examples of Dataset Types (cont) XML –much more complicated than the dataset types described above, but supports many more features –provides the user with the ability to extend a file format with application specific tags –the XML dataset has support for compression, portable binary encoding, random access, byte ordering, and multiple file representation of piece data IS&T Scientific Visualization Tutorial – Spring 2010

29 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 (generalizations of scalars, vectors and matrices) rank 0 ( scalar), rank 1 (vector), rank 2 (matrix), rank3 (3D rectangular array) examples: stress, strain IS&T Scientific Visualization Tutorial – Spring 2010

30 File Format – Structured Grid IS&T Scientific Visualization Tutorial – Spring 2010 Editor density.vtk: # vtk DataFile Version 3.0 vtk output ASCII DATASET STRUCTURED_GRID DIMENSIONS 57 33 25 POINTS 47025 float 2.667 -3.77476 23.8329 2.94346 -3.74825 23.6656 3.21986 -3.72175 23.4982 3.50007 -3.70204 23.3738 3.9116 -3.72708 23.5319 4.1656 -3.69529 23.3312... POINT_DATA 47025 SCALARS Density float LOOKUP_TABLE default 0.498983 0.376668 0.333115 0.311612 0.267114 0.639897 0.479756 0.477011 0.461867 0.428373 0.639897 0.608989 0.570884 0.510595 0.443823 0.407467 0.376066 0.34614... VECTORS Momentum float 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 64.5673 0 0 0 0 0 0 0 0 0 0 0...

31 Example – Loading data IS&T Scientific Visualization Tutorial – Spring 2010 ParaView: 1. disconnect from Server File -> Disconnect this clears the pipeline 2. open data file File -> Open (density.vtk) 3. click Apply in Object Inspector

32 Clipping, Cutting, Subsampling Modeling 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 IS&T Scientific Visualization Tutorial – Spring 2010

33 Example – Clipping IS&T Scientific Visualization Tutorial – Spring 2010 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

34 Example – Cutting/Slicing IS&T Scientific Visualization Tutorial – Spring 2010 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

35 Example – Subsampling IS&T Scientific Visualization Tutorial – Spring 2010 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

36 Color Mapping Scalar Algorithms –Color Mapping maps scalar data to colors implemented by using scalar values as an index into a color lookup table specify a HSVA (Hue-Saturation-Value-Alpha) ramp and then generate the colors in the table by using linear interpolation into the HSVA space –ParaView Color panel in Display tab of object inspector of data –Color by –Edit Color Map IS&T Scientific Visualization Tutorial – Spring 2010

37 Example – Color Mapping IS&T Scientific Visualization Tutorial – Spring 2010 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 to be colored based on the underlying scalar values in that array. *** make sure the Compute Scalars checkbox in the Contour section of Property Tab is selected

38 Example – Color Mapping (cont) IS&T Scientific Visualization Tutorial – Spring 2010 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.

39 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 meteorology 3D isosurface: 3D isosurface: –applications: tissue surfaces from tomography, constant pressure or temperature in fluid flow, implicit surfaces from math and CAD –ParaView Contour Filter IS&T Scientific Visualization Tutorial – Spring 2010

40 Example – Isoline / 2D Contours IS&T Scientific Visualization Tutorial – Spring 2010 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

41 Example – Isosurface / 3D Contours IS&T Scientific Visualization Tutorial – Spring 2010 ParaView: 1. disconnect from Server File -> Disconnect 2. open data file File -> Open (density.vtk) 3. apply Contour filter to density.vtk click on density.vtk in pipeline Filter -> Contour

42 Scalar Generation Scalar Algorithms (cont) –Scalar Generation extract scalars from part of data example: extracting z coordinate (elevation) from terrain data to create scalar values –ParaView Elevation Filter IS&T Scientific Visualization Tutorial – Spring 2010

43 Example – Scalar Generation IS&T Scientific Visualization Tutorial – Spring 2010 ParaView: 1. disconnect from Server File -> Disconnect 2. open data file File -> Open (honolulu.vtk) 3. apply Elevation filter to density.vtk click on honolulu.vtk in pipeline Filter -> Elevation

44 Hedgehogs Vector Algorithms –Hedgehogs oriented scaled line for each vector scale indicates magnitude color indicates magnitude, pressure, temperature, or any variable –ParaView Glyph Filter –Set type to line IS&T Scientific Visualization Tutorial – Spring 2010

45 Example – HedgeHogs IS&T Scientific Visualization Tutorial – Spring 2010 ParaView: 1. disconnect from Server File -> Disconnect 2. open data file File -> Open (density.vtk) 3. apply Glyph filter to density.vtk click on density.vtk in pipeline Filter -> Glyph 4. in the Object Inspector (Properties Tab) set the “Scalars” menu to Density set the “Vectors” menu to Momentum set the “Glyph Type” to Line

46 Oriented Glyphs Vector Algorithms (cont) –Oriented Glyphs orientation indicates direction scale indicates magnitude color indicates magnitude, pressure, temperature, or any variable –ParaView Glyph Filter –Set type to arrow IS&T Scientific Visualization Tutorial – Spring 2010

47 Example – Oriented Glyphs IS&T Scientific Visualization Tutorial – Spring 2010 ParaView: 1. disconnect from Server File -> Disconnect 2. open data file File -> Open (density.vtk) 3. apply Glyph filter to density.vtk click on density.vtk in pipeline Filter -> Glyph 4. in the Object Inspector (Properties Tab) set the “Scalars” menu to Density set the “Vectors” menu to Momentum set the “Glyph Type” to Arrow

48 Field Lines Vector Algorithms (cont) –Field Lines Fluid flow is described by a vector field in three dimensions for steady (fixed time) flows or four dimensions for unsteady (time varying) flows Three techniques for determining flow –Pathline (Trace) tracks particle through unsteady (time-varying) flow shows particle trajectories over time rake releases particles from multiple positions at the same time instant reveals compression, vorticity –Streamline tracks particle through steady (fixed-time) flow holds flow steady at a fixed time snapshot of flow at a given time instant –Streakline particles released from the same position over a time interval (time-varying) snapshot of the variation of flow over time example: dye steadily injected into fluid at a fixed point IS&T Scientific Visualization Tutorial – Spring 2010

49 Field Lines Streamlines Lines show particle flow ParaView - StreamTracer Filter Streamlets half way between streamlines and glyphs ParaView - StreamTracer and Glyph Filters Streamribbon rake of two particles to create a ribbon ParaView - StreamTracer and Ribbon Filters Streamtube circular rake of particles to create a tube ParaView - StreamTracer and Tube Filters IS&T Scientific Visualization Tutorial – Spring 2010

50 Stream Tracer Filter generates streamlines in vector field from collection of seed points first need to set up the integrator to do the numerical integration next need to specify the seeds points IS&T Scientific Visualization Tutorial – Spring 2010

51 Example – Streamlines IS&T Scientific Visualization Tutorial – Spring 2010 ParaView: 1. open data file File -> Open (density.vtk) 2. apply StreamTracer filter to density.vtk click on density.vtk in pipeline Filter -> Stream Tracer 3. in the Object Inspector (Properties Tab) set “Vectors” menu to Momentum set “Max Propagation” to Time 100 set “Initial Step Length” to Cell Length 0.1 set “Integration Direction” to Both set “Max Steps” to 1000 set “Integrator Type” to Runge-Kutta 4 set “Seed Type” to Point Source, Center on Bounds set “Number of Points” to 100

52 Annotation Annotation –used for annotating visualizations –ParaView Text Source Source -> Text Color Legend “Edit Color Map” button in Display tab “Show Color Legend” box in color legend tab of the Color Scale Editor Axes Edit -> View Settings IS&T Scientific Visualization Tutorial – Spring 2010

53 Example – Annotation Example – Annotation IS&T Scientific Visualization Tutorial – Spring 2010 ParaView: 1. open data file File -> Open (density.vtk) 2. apply Clip filter to density.vtk click on density.vtk in pipeline Filter -> Clip 3. Create a Text source Sources -> Text 4. Turn on Color Legend Edit Color Map for Clip in Display Tab Color Legend tab in Color Scale Editor select “Show Color Legend” check box 5. Turn on orientation axis Edit -> View Settings select “Orientation Axes” check box

54 Saving Images IS&T Scientific Visualization Tutorial – Spring 2010 Saving Images –common formats: jpg (lossy) png (lossless) pdf tiff (lossless) –ParaView File -> Save Screenshot

55 Example – Saving Images IS&T Scientific Visualization Tutorial – Spring 2010 ParaView: 1. open data file File -> Open (density.vtk) 2. apply Clip filter to density.vtk click on density.vtk in pipeline Filter -> Clip 3. save Screenshot File -> Save Screenshot 4. set Resolution 5. set File Type to JPG

56 ParaView - Resources IS&T Scientific Visualization Tutorial – Spring 2010 IS&T Tutorials –Using ParaView to Visualize Scientific Data http://scv.bu.edu/documentation/tutorials/ParaView/ –ParaView Examples http://scv.bu.edu/documentation/software- help/scivis/paraview_examples/index.html Text –The ParaView Guide, v3 Edition, Kitware, Inc, 2006. Websites –www.paraview.orgwww.paraview.org –http://paraview.org/OnlineHelpCurrent/ –www.kitware.com Wiki –www.paraview.org/Wiki/ParaView Mailing Lists –www.paraview.org/praview/help/mailing.html

57 Sources The Visualization Toolkit, 3rd Edition, Will Schroeder, Pearson Education, Inc, 2002. The ParaView Guide, v3 Edition, Kitware, 2006. Kitware: www.paraview.orgwww.paraview.org IS&T Scientific Visualization Tutorial – Spring 2010


Download ppt "Scientific Visualization with ParaView Ray Gasser IS&T Scientific Visualization Tutorial – Spring 2010."

Similar presentations


Ads by Google