ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume...

43
Kitware, SAS. Developer Training ParaView: Users 1 For private use only – Sharing not permitted Copyright © Kitware – www.kitware.com ParaView An application for display and analysis of massive scientific datasets. Using ParaView About VTK Learning the Interface Importing Data Displaying Data Manipulating Data Animation and Time Varying Data Analyzing Data Customization Agenda ParaView* is based on VTK Not necessary to understand VTK to use ParaView But it helps *as is Visit, and many other Applications VTK Overview

Transcript of ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume...

Page 1: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 1

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

ParaViewAn application for display and analysis of massive scientific datasets.

Using ParaView

• About VTK• Learning the Interface• Importing Data

• Displaying Data• Manipulating Data

• Animation and Time Varying Data• Analyzing Data• Customization

Agenda

• ParaView* is based on VTK• Not necessary to understand VTK to use ParaView• But it helps

*as is Visit, and many other Applications

VTK Overview

Page 2: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 2

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• ParaView is based on VTK• VTK - the visualization toolkit

– Designed and implemented using object-oriented principles– C++ class library (Over 1,000,000 LOC)

• Allows one to create many visualization applications– Automated Java, TCL, Python language bindings– Portable across Unix, Linux, Windows, MacOSX– Supports 3D/2D graphics, visualization, image processing, volume

rendering, statistical analysis

What Is VTK?

• DataObjects – data structures that hold scientific data• Algorithms – manipulate DataObjects

– “Sources”• “Sources” produce data computationally

• “Readers” produce data by reading a file

– “Filters” process input data to produce output data– “Sinks”

• “Writers” write data to files

• “Mappers” map data to graphics primitives for display

• Rendering Pipeline – draw Mappers' outputs on screen– Actors, Cameras, Lights, Renderers, RenderWindows

VTK Building Blocks

Page 3: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 3

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• vtkDataObject represents a “blob” of data– Contain instance of vtkFieldData– An array of arrays– No geometric/topological structure– Superclass of all VTK data objects

• Primary building block is vtkDataArray– Array based access to contiguous chunk of memory– 2D arrays, TxC

• Component units wide (fastest varying)

• Tuple units long (slowest varying)

– Machine type native subclasses vtkFloatArray, vtkIntArray etc– Non numeric and variant subclasses as well

vtkDataObject

• Most important subclass of vtkDataObject• A data object with intrinsic shape

• Dataset structure consists of– Geometry – aka points (x-y-z coordinates)– Topology – aka cells (e.g., polygons, lines, voxels)

• defined by connectivity list that refers to points ids

– Attributes – point and cell associated data values

vtkDataSet

Cell

Points

vtkDataSet Subclasses

vtkImageDatavtkPolyData

vtkStructuredGridvtkUnstructuredGrid

vtkRectilinearGrid

Page 4: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 4

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Second most important subclass of vtkDataObject• Defines data objects that contain other data objects• Various uses (and subclasses):

– Represent collection of pieces of same data• E.g., in parallel simulation output of processorN

– Represent collection of related pieces of data• E.g., assemblies: Car->Engine->Cylinder->Bolt

– Represent different refinement levels• E.g., coarse->medium->fine

– Represent same data at different times• E.g., t=0, t=1, t=1.5, t=1.51, t=2.0, t=2.1

• Silo, Ensight, Exodus, XDMF Readers produce multi-block

• Statistics produce multi-blocks (assessed data; models; tests)

Multi-Block (aka CompositeDataSet)

• Recent subclass of vtkDataObject• For data that is intrinsically represented with a 2D array• Conceptually mimics SQL tables (e.g., varying column types)

• AddColumn(vtkAbstractArray *)

• vtkVariantArray *GetRow()

vtkTable

• Recent subclass of vtkDataObject• Has vertices and edges connecting pairs of vertices• Vertices and edges have associated attributes

• vtkGraph subclasses constrain the topology of the graph (directed, undirected, acyclic, tree)

vtkGraph

Page 5: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 5

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Recent subclass of vtkDataObject• Generic way to represent a subset of something else• Has no meaning alone

• Can define:– Locations– Regions– Particular items (cells, points, dataset)– Values– Ranges of values

vtkSelection

• Take in N* data objects• Do something (or nothing)• Produce other data objects

• Types of inputs and output• Examples: Gradient, Threshold, Contour, Refinement, Subset, Clip,

Descriptive Statistics• Reference counting used heavily to preserve memory

• Not every filter can be applied to every DataObject• Hundreds of filters in VTK

*Actually N sets of M objects

Filters

• Connecting filters together into a pipeline• Each filter does own part• Together they manipulate input data to find/show meaning

– Strip away useless portions– Emphasize important features– Find significant portions– Present it in meaningful format

Filters

Page 6: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 6

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

The Visualization Pipeline

A sequence of algorithms that operate on data objects to generate geometry that can be rendered by the graphics engine or written to a file

Mapper

Mapper

Data

Filter

Data to graphicssystem

Data

Data Filter Actor

ActorSource

• About VTK• Learning the Interface• Importing Data

• Displaying Data• Manipulating Data

• Animation and Time Varying Data• Analyzing Data• Customization

Agenda

• ParaView is a front end for VTK• You use it to create and configure VTK pipelines

– Goal is to find and display the salient information

Learning The Interface of ParaView

Page 7: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 7

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Pipeline Browser– Shows the pipeline

The Interface

Page 8: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 8

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Pipeline Browser

RTAnalyticSource1

Contour1

ShrinkFilter1 Cut1

Contour2

• Attention: Important Concept

• GUI can control only one thing at a time• Click on pipeline browser to choose what

The Active “Source”

Mapper

Mapper

Data

Filter

Data to graphicssystem

Data

Data Filter Actor

ActorSource

• Pipeline Browser– Shows the pipeline

• View Area– Displays the resulting visualization(s)

The Interface

Page 9: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 9

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Pipeline Browser– Shows the pipeline

• View Area– Displays the resulting visualization(s)

• Object Inspector – work with “active” filter– Properties Tab – control filter parameters– Display Tab – control display parameters– Information Tab – displays meta information

The Interface

Page 10: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 10

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Properties Tabparameters of Active Filter

Display TabRendering parameters

of ActiveFilter's Output

Information TabCharacteristics of Active

Filter's Output

The Interface

• Pipeline Browser– Shows the pipeline

• View Area– Displays the resulting visualization(s)

• Object Inspector – work with “active” filter– Properties Tab – control filter parameters– Display Tab – control display parameters– Information Tab – displays meta information

• Sources menu, File->Open– Inject data into pipeline

Page 11: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 11

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Pipeline Browser– Shows the pipeline

• View Area– Displays the resulting visualization(s)

• Object Inspector – work with “active” filter– Properties Tab – control filter parameters– Display Tab – control display parameters– Information Tab – displays meta information

• Sources menu, File->Open– Inject data into pipeline

• Filters menu– Subset of VTK algorithms that are applicable

The Interface

Online Help

• F1 for searchable help system• Authored pages• Generated pages

– for every accessible methodof every reader, source, filter and writer

• Duplicated online

• Active Filter, Active View– Specify exactly what your GUI actions modify– Specify what the next filter is applied to

• Actions are committed– Focus is large data, minor parameter changes ignored– Nothing happens until Apply button hit

• Every part of pipeline can be displayed– You have complete control over pipeline not just “final” result

• Only applicable filters are allowed– “Applicable” depends on data type, data arrays, etc

Important!

Page 12: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 12

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• About VTK• Learning the Interface• Importing Data• Displaying Data• Manipulating Data

• Animation and Time Varying Data• Analyzing Data• Customization

Agenda

Create a Source

• Procedurally generated data• Object Inspector starts with default values• Hit the Apply button to accept the parameters

• Won’t see it until Apply

Create a Source

Page 13: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 13

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Create a Sphere source– Change its radius– Improve its tessellation in Theta– Create a hemi-sphere in Phi– Delete it

• Create a Super-Quadric– Change its parameters

Exercise : Procedural Data

• ParaView keeps track of your changes– Filter creation, deletion– Parameter changes– View Splits– Camera Motion

• Undo/Redo lets you backtrack

• If you make a mistake:– before you Apply → hit Reset– after you apply → hit Undo

Undo/Redo

• Getting data into ParaView

ParaView Readers

Page 14: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 14

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Load data : file formats

• Kitware formats: (.vtk, .pvd, .vt?, pvt*)

• Exodus

• Xdmf annotated hdf5 (.xmf, .xdmf)

• SpyPlot CTH• EnSight (.case, .sos)

• netCDF CF (.ncdf, .nc)• Protein Data Bank (.pdb)• XMol Molecule

• PLOT3D• LS-DYNA

• SESAME Tables• POP Ocean Files• AVS UCD (.inp)

• Digital Elevation Map (.dem)• VRML (.wrl)

• Phasta Files (.pht)• MFIX (.RES)• Tecplot ASCII (.tec, .tp)

• Fluent Case Files (.cas)• OpenFOAM Files (.foam)

• Flash multiblock files

More file formats

• Enzo boundary and hierarchy• Gaussian Cube File (.cube)• Facet Polygonal Data

• LANL cosmology data (.cosmo)

• LANL windbade (.wind)• LANL VPIC (.vpc)

• SLAC netCDF mesh, mode and particle data

• Stereo Lithography (.stl)• Meta Image (.mhd, .mha)

• BYU (.g)• Stanford Polygonal (.ply)• Wavefront Polygonal Data

(.obj)• PNG Image Files

• TIFF Image Files• Raw Image Files

• NRRD image files (.nrrd)• Comma Separated Values

(.csv)• Python scripted readers

More file formats

Via Plugins• NIH Analyze/Nifti• H5part HDF5 Particle files• .tlp tulip graphs• .xml tree structures• netdmf• sql table interface• prism sesame files• TIN Files• Poly Files• 2dm/3dm Files• ADH Simulation Files• MAP Files• KML Files

Since 3.10• visit formats: enzo, fluent,

miranda, pixie, netcdf, pdb, samrai, silo*, tertrad, +visit extensions

• NCAR vapor data format

CMB Plugin

Page 15: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 15

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Load a Dataset

Information Tab

• Information about the Active Filter’s output

• DataObject structure• Size (Bytes, #points, #cells)• Geometric bounds

• Structured bounds• Arrays:

– Name– Association (point, cell)– Data Type– Value Ranges

• Temporal Domain

• Load in the following dataset– Cow– Head– Can

• How many cells are in each?

• How many points are in each?• Is there data associated with the geometry

Exercise : Importing Data

Page 16: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 16

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• About VTK• Learning the Interface• Importing Data

• Displaying Data• Manipulating Data

• Animation and Time Varying Data• Analyzing Data• Customization

Agenda

• On pipeline browser• Shows and Controls what is visible in Active View• If eye is missing, it is not displayable in that type of View

The Eye

• Reset Camera• Orthogonal Views• Center of Rotation

• Camera Undo/Redo

Camera Manipulation

Page 17: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 17

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Display Tab

• Full Control of the Appearance– of Active Filter as shown in– Active View – Representation

• Bounding box• Wireframe• Surface• VolumeRender

– Color• Transfer function• Solid, or Palette

– Texture– Transformation

• Shortcuts to most important• Controls are on toolbar

• Outline• Points• Wireframe

• Surface• Surface with Edges

• Volume• Slice

Visual Representations

• Load in the Cow Data• Change the representation to Points and reduce the point size• Change the representation to Wireframe

• Change the representation to Surface with Edges• Change the surface color

• Change the edge color• Scale the cow in Z by 2

Exercise : Appearance Part I

Page 18: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 18

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• If attribute data is present, it can be used to color with• Transfer function (lookup table) maps values to colors• Scalar Range of the lookup table determines how the scalars are

mapped

Mapping Scalars to Colors

• A lookup table is created when user selects an array to color by• A lookup table is allocated per array name• Scalar range is adjusted every time the user selects an array to

color with (unless Automatically Rescale to Fit Data Range is unchecked)

• With volume rendering, transfer function also controls opacity

Mapping Scalars to Colors

Volume Rendering

Page 19: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 19

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Annotations: Color Legend

• From menu, next to array to color by choice

• Or display tab, edit color map dialog, color legend tab

Annotations: Cube Axes

• On display tab• Cube axes properties can

also be edited

Annotations: Text

• Sources->Text– 2d text on top of scene

• Sources->3D Text – 3D text, inside scene

• Place 3D text via– Display Tab Transformation

Page 20: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 20

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Load in the Head Data• What is the current representation?• Change it to slice and change the slice planes

• Change it to Volume• Show Color Legend

• Show Cube Axis• Edit the Color Map

Exercise : Appearance Part II

• View – “A window that shows data”• Different view types show same data in different ways• Some data types cannot be shown in all view types

– 3D View – Traditional 3D Visualization– 2D View – slice of 3D structured data on a Plane– Bar Chart – A chart view– Line Chart, Scatter Plot – plot views– Spreadsheet – Show data values as Text– Comparative View – Grouped views to show variation– Parallel Coordinates View – explore multi-dimensional relationships

• Some filters have a View preference: Histogram->Chart View

Views

• Control visual properties of the Active View

View Settings

Page 21: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 21

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Create new views by splitting existing ones• Views can be moved around by dragging the title bar• Views can be converted to a different type

• Attention!– Display tab shows the

properties of active source within active view

MultiView

MultiView Visualization Pipeline

Filter

Source

Filter

MultiView Visualization Pipeline

Filter

Source

Filter

Data

Data

Data

Page 22: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 22

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

MultiView Visualization Pipeline

Filter

Source

Filter

Data

Data

Data

Actor

Actor

Actor

Mapper

Mapper

Mapper

RenderWindow

MultiView Visualization Pipeline

Data

Filter

ActorSource

Filter

Data

Actor

Actor

RenderWindow

Mapper Actor

Mapper Actor

Mapper Actor

RenderWindow

Mapper

Mapper

Mapper

Data

MultiView

Active View

Page 23: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 23

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

MultiView

Active View

MultiView

• Right click in view to link Camera interaction among 3D views

MultiView

Page 24: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 24

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Create 3 views• Display a sphere in one• Display a cone in another

• Display both in the third• Link all of the cameras

Exercise : MultiView

• About VTK• Learning the Interface• Importing Data

• Displaying Data• Manipulating Data• Animation and Time Varying Data• Analyzing Data• Customization

Agenda

• Filters menu lists available filters– Ctrl-space (Windows) Alt-space brings up search dialog

• Filter is connected to the output generated by the active sources selected in the Pipeline Browser

• Enable state in the menu depends on the data produced by the selected sources(s)

Creating Filters

Page 25: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 25

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Normals

• Creates point normals for shading

• Result is a new point valued array

• Exercise:– Apply “Generate Surface

Normals” filter to cow– Examine information tab’s

Data Arrays entry– Turn “Compute Cell

Normals” On– Reexamine information

tab’s Data Arrays entry

Slice

• Produces a slice of a dataset• Result is a set of polylines• Provides a widget to aid in

setting up the slice plane• Exercise:

– Slice the cow on the Z=0 plane

– Move plane and reapply

Clipping

• Like slicing, but results in sub-volume

• Result is an unstructured grid• Exercise

– Clip the cow on X=0 plane– Change the plane

Page 26: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 26

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Transform

• Transforms the dataset• Applies scale, translation,

rotation to the input dataset• Produces a new dataset with

the transformed points• Exercise:

– Apply transform to the cow

Append

• Appends datasets together to produce a single dataset

• Exercise:– Select sources to combine

and then apply the “Append Datasets” filter.

Elevation

• Generates scalars along a specified direction

• Provides widget to aid in specifying the direction

• Exercise:– Apply elevation filter to cow

Page 27: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 27

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Thresholding

• Subsetting by data value• Result is unstructured grid• Exercise:

– Load in the head data– Threshold head from 6 to 8– (turn “All Scalars” off)

Contouring

• Connects points with same value in 2D or 3D

• Result a poly-line or a polygonal surface

• Exercise– Contour Head at

MetaImage=75– Contour Head at

MetaImage=7

Deforming Geometry

• The Warp (vector) Filter deforms the geometry based on a specified point vector field

• Exercise:– Load in the Blow dataset– Add a Warp(vector) filter– Select one of the

displacement fields– Color result based on

thickness

Page 28: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 28

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Glyph Filter

• Copy some geometry to every point of the model

• Scale by scalar• Orient by vector• Filter to reduce clutter

Glyph Sources

• Arrow• Cone• Box

• Cylinder• Line

• Sphere• Glyph 2D: Vertex, Dash,

Cross, Thick Cross, Triangle, Square, Circle, Diamond, Arrow, Thick Arrow

• Integrate along the vector field

• Seed streamlines with point cloud or line

Streamlines

Page 29: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 29

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Load in the comb data – there are 3 pieces!• Append all 3 parts into a single dataset• Add Streamlines

• Change the Integration Type to Runge-Kutta 4-5• Change the source from point to line

• Increase the number of samples

Exercise : Flow visualization

• Load in the disk_out_ref.ex2• This airflow simulation involves a spinning disk – in what direction is

it spinning?– Sounds like a job for the Glyph Filter– Hint: Use Wireframe – Problem: The mesh is solid and there are too many glyphs– Use an Extract Surface Filter which will convert the volume mesh into a

surface mesh of the boundary

• Is the disk heated?

• Is there recirculation of the air?– Add Streamlines– Start near the intake and move towards the disk

Exercise : Putting it All Together

• To get rid of filters, Delete on Properties tab (or Edit->Delete)– Note: Can not be internal (no filter takes in its output)

• Edit->Delete All will delete entire pipeline• ParaView provides the ability to rearrange the pipeline

– Right click on filter in pipeline browser to change inputs

• Exercise:– Load in the cow data– Clip the data– Apply an elevation filter– Create a Superquadric– Scale it by a factor of 10 in each direction– Switch the input of the clip filter to use the Superquadric

Editing the Pipeline

Page 30: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 30

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Screenshot– Save single view or all views*

• State– Saves session in an XML file– Minor modifications easy to make– Can be played back on different computers– Can be played back in batch mode

• Data– The output of the active filter

• Animation (Images or Geometry)

Saving Results

• About VTK• Learning the Interface• Importing Data

• Displaying Data• Manipulating Data

• Animation and Time Varying Data• Analyzing Data• Customization

Agenda

• Animation “View” Shows tracks interface. Time goes left to right– Each track/row controls a different parameter

• Ex IsoValue, Clipping plane, Camera Path, Data time, …

– Place key frames to specify parameter values at places in time Optionally specify interpolation function between keyframes

– UI for each Parameter type varies (ex camera’ path splines)

• VCR toolbar can be used to play through the keyframes

Animation Control

Page 31: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 31

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Load in one piece of the comb data• Add a slice plane• Animate the plane

Keyframe Animation Exercise

• ParaView creates a track for data time– Each timestep in data becomes a keyframe– Default is to play forward through time– Data time itself can be animated

• Information tab lists the available timesteps and time values associated with each timestep

• Time-Varying Geometry Exercise (can.ex2)

• Time-Varying Point Data Exercise (FileSeries – Blow)– Use the Warp (vector) Filter

Animating Temporal Datasets

• Example:– DataSet with following timesteps is loaded:– (see Information Tab)

• By default Paraview sets up animation to match:– Animation Start Time: 0– Animation End Time: 1.0

Animation Play Modes

Timestep Time

0 0

1 0.13

2 0.5

3 0.7

4 1.0

Page 32: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 32

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Sequence– Animation played as a sequence of frames– User specifies the number of frames– Example:

• Number of Frames = 10

• Animation Time: 0, 0.1, 0.2 …. 1.0

• Realtime– Animation played using the CPU clock– User specifies the duration in seconds– Example:

• Duration = 10 s

• If each frame takes roughly .2 sec to render then– Animation Time: 0, 0.021, 0.039 … 0.981, 1.0

Animation Play Modes

• Snap to TimeSteps– Available only when a dataset with timesteps is loaded– Number of frames = number of timesteps in the dataset– Each frame is a different timestep from the dataset irrespective of the

time associated with each timestep– Example:

• Animation Time: 0, 0.13, 0.5, 0.7, 1.0

Animation Play Modes

• Source for annotating time requested by application

• Filter for annotating time provided by dataset

Annotating Time

Page 33: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 33

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• About VTK• Learning the Interface• Importing Data

• Displaying Data• Manipulating Data

• Animation and Time Varying Data• Analyzing Data• Customization

Agenda

Plotting

• Bar Chart and XY Plot views

• For displaying 1D results– vtkTable– 1D Rectilinear Grid– vtkPolyLine cell

• Processing is done on server

• Client only draws the final graph

• Histogram filter– Bins attribute values to show distribution– Default view is a histogram view

• Plot Data• Plot over line, Plot over intersection curve,

– Probes attribute values at points along curves in space

• Plot Selection Over Time– Probe values of a particular:

• cell

• point

• location

– Over time

• View and Filter display properties control what quantities are plotted

Bar Chart and Line Plot Views

Page 34: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 34

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Bar Chart and Line Plot Views

Spreadsheet View

• Shows data in text format• Shows Point Coordinates• Shows Attribute Values

– Point– Cell– Field Data

• Streams small blocks of raw data at a time so does not overwhelm client

Selection

• A mechanism to identify subset of some dataset

• Why?– Detailed inspection of the

subset– Plot subset over time– Extracting the subset

• Edit->Find Data– Enter characteristics you are

searching for– It selects points/cells that

match

Page 35: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 35

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• What are we selecting?– Data produced by a source

• Active Selection– One application wide Active selection– Creating a new selection results in removing the old one– Transient: cannot be saved in state files, does not respect undo/redo

• All views show the same active selection (if possible)• Most views make it easy to create the Active selection

Selection

• Surface cells/points• Cells/Points within a frustum• Blocks in a composite dataset

Selecting using 3D View

Select Cells on surface

• Used to select any set of visible cells on the surface of a dataset

• Representation should be points / wireframe / surface / surface with edges

• With 3D view active, use the ‘Select Cells On’ tool button (shortcut ‘S’) to enter selection mode

• Click and drag to select cells

Page 36: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 36

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Select Points on surface

• Same as selecting cells on surface except use ‘Select Points On’ tool button.

Selection Linking

• Active selection is shown in all views…

• Whenever possible (ex not in plot view)

Select Through

• Select everything inside a frustum

• Select Cells Through

• Select Points Through

• Selection Inspector has a check button to show the selection frustum

Page 37: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 37

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Spreadsheet View

• Usefull to view the raw cell/point data in selection

• To create: split an existing view and select “Spreadsheet view”

• Make sure the active filter is visible in the new view

• Check “show only selected elements”

Selecting using Spreadsheet View

• Can create Point/Cell index based selections (depending on what attribute is being shown)

• Click to select rows as one would in any spreadsheet application

• Can use modifiers such as Ctrl, Shift while selecting

• Selection is shown in all views

Active Selection Inspector

• Accessible through View->Selection Inspector

• Used to create/modify active selection

• Shows the properties of the active selection

• Control how the active selection is shown

• Label values on Screen

Page 38: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 38

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Create new selection

Active selectionproperties

Selected cell ids

Selection type

Selection displayProperties/Labeling

Selecting using Selection Inspector

• Create new selections• Convert selections

– id based to global id based– frustum to id based

• Modify existing selection

Location based selection

• Select cell enclosing the location or select point closet to the location within a threshold

• Created using the Selection Inspector and changing the selection type to Locations

• Provides widgets to specify locations

Page 39: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 39

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Threshold based selection

• Select cells or points that have attribute values within the specified range(s)

• Create using Selection Inspector

Labeling Selected Items

• Display Style section at bottom of Selection Inspector

• Selection Tab – change selection highlight color, line width etc

• Cell/Point Label tabs turn on text labels on top of 3D view– Choose array/id to show– Choose font/color/size

Extract Selection

• A filter the gives active selection permanence

• Extracts subset and makes it a new dataset

• How to use:– Make a selection– Filters->‘Extract Selection’ – ‘Copy Active Selection’– Hit ‘Apply’– Optionally make new selection

and Copy to change it

Page 40: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 40

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

Extract Selection

• Once a selection is extracted it is treated as a first class data source.

• One can apply filters to it as usual.

• Extracted selection gets saved in state files.

Plot Selection over Time

• Plot data variable changes over time for a set of cells or points

• Use ‘Plot Selection Over Time’ filter

• Make selection and ‘Copy Active Selection’

• Output can be shown on a XY plot

Plot Selection over Time

• Changes for each cell/point selected can be plotted, one at a time

• Choose which on Display Tab

Page 41: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 41

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• About VTK• Learning the Interface• Importing Data

• Displaying Data• Manipulating Data

• Animation and Time Varying Data• Analyzing Data• Customization

Agenda

Array Calculator

• Write expression to derive new data from input

• Expression takes in: – point centered scalars/vectors– point coordinates

OR– cell centered scalars/vectors

• Runs over each point or cell and evaluates expression

• Expression produces either:– A new point centered array– A new cell centered array– New point coordinates

• Given three point centered scalar arrays– VEL_X, VEL_Y and VEL_Z

• Create a point centered vector array for VELOCITY• Hint:

– Use iHat, jHat, kHat unit vectors to build up output vector

Calculator – Array Manipulation Example

Page 42: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 42

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Attribute Mode = Point Data• Coordinate Results = OFF• Result Array Name = “VELOCITY”

• Expression =– VEL_X*iHat + VEL_Y*jHat + VEL_Z*kHat

Calculator – Example

Exercise: Manipulate Geometry

• Select “Coordinate Results” – produce point coordinates

instead of point centered array

• coordsX, coordsY, and coordsZ “arrays” have input coordinates

• Use iHat, jHat, kHat to build up output X, Y and Z point coordinates

• Try it with the cow data…

coordsX*sin(Elevation)*iHat +

coordsY*jHat +

coordsZ*sin(Elevation)*kHat

coordsX*sin(Elevation)*iHat +

coordsY*jHat +

coordsZ*sin(Elevation)*kHat

• Helps automate repetitive tasks

• Encapsulate sub-pipelines into a single filter

• Expose just the important parameters from the internal filters

Custom Filters

Reader 1

Filter A*Setting A1Setting A2

Filter BSetting B1*Setting B2

Reader 2

My FilterSetting A1Setting B2

Reader 3

My FilterSetting A1Setting B2

Page 43: ParaView - Cineca · – Supports 3D/2D graphics, visualization, image processing, volume rendering, statistical analysis What Is VTK? • DataObjects – data structures that hold

Kitware, SAS. Developer Training

ParaView: Users 43

For private use only – Sharing not permitted

Copyright © Kitware – www.kitware.com

• Select sources to include from Pipeline Browser

• Tools->Create Custom Filter…» Name filter

» Select settings to expose» Save

Custom Filters

• Saved in state files like any other filter• Saved across sessions automatically

– Next time you start up paraview your custom filters are ready

• Can be exported to xml files and loaded by someone else– Lets you reuse and share Calculator expressions *

* And python programmable filter scripts

Custom Filters Persist

• About VTK• Learning the Interface• Importing Data

• Displaying Data• Manipulating Data

• Animation and Time Varying Data• Analyzing Data• Customization

Agenda