Professional Documents
Culture Documents
Contents
Overview ........................................................................................................................243
Submitting Dashboard Results.......................................................................................245
GLOSSARY......................................................................................................................249
INDEX...............................................................................................................................255
Part I: User’s Guide
Chapter 1
Overview
ParaView is built on top of the Visualization Toolkit (VTK), which it uses for much of its
visualization algorithms and rendering. VTK is written in C++ and uses OpenGL to do its
rendering. ParaView’s user interface is written in Tcl. Some parts of the ParaView application
are wrapped in Tcl, so they can be accessed through a script or from a command prompt.
ParaView borrows the concept of a visualization pipeline from VTK. Loading data and
applying filters to it add stages to this pipeline. Because of its use of VTK, ParaView has
access to many visualization algorithms, and providing access to new ones in ParaView is
fairly straightforward through the construction of a configuration file.
This book is divided into two main sections, a user’s guide and a developer’s guide. In the
user’s guide, we will begin with a high-level look at ParaView’s user interface. From there we
will discuss increasingly more complex capabilities of the application. We will conclude this
section with a set of tutorials to introduce you to several of the important concepts and
operations in ParaView. This would be a good starting location if you prefer a hands-on
approach to learning about ParaView rather than reading about all the details of the
application first. Following that are four appendices covering the sources and filters available
in ParaView, the command-line options the application accepts, and the PVD file format.
In the developer’s guide, we will take a closer look at the underlying structure of the
ParaView application. We will discuss ways of extending ParaView to better tailor it to your
1.2 Funding and Support 5
own visualization needs. We will also explain the quality-control mechanisms used to make
ParaView stable and robust.
The ParaView web site (http://www.paraview.org) has current information about the
ParaView project. We also maintain two e-mail lists, one for ParaView users and another for
developers. Go to http://public.kitware.com/mailman/listinfo/paraview to join the ParaView
user’s mailing list; the URL for joining the ParaView developer’s list is
http://public.kitware.com/mailman/listinfo/paraview-developers. From the web sites for these
two lists, you can specify the e-mail address to subscribe to the list as well as several options
about your subscription (e.g., whether to receive each post to the list as a separate e-mail or
bundled together in a digest format).
Some aspects of the ParaView project have also been supported by an SBIR (Small Business
Innovation Research) contract with the Army Research Laboratory (ARL). Most significant
has been the separation of the ParaView client (GUI) from the
data-processing server. This involved the creation of the server
manager and the VTK client-server language as well as
separating the GUI controls from the values they manipulate.
This contract also supported adding progress notification into the
ParaView application and creating the Xdmf reader.
with MPI support for running on multiple processors), you will need to compile ParaView
from the source code. Instructions for doing this can be found in chapter 15
On Unix
On unix, download the precompiled binaries for the appropriate platform. Uncompress and
untar the file you downloaded. The ParaView executable will be in the bin directory created
when you extracted the files from the tarball. To run ParaView from the command line,
navigate to the directory containing the ParaView executable, and type paraview followed
by any command-line options you wish to use.
On Windows
On Windows, first download the Windows installer from the ParaView Download web site.
Run the executable that you downloaded (paraview-1.4.2-win32.exe, for example) by
navigating to the directory where you saved it and double-clicking on it in the Windows file
browser. Follow the prompts to install ParaView on your computer. Once ParaView has been
installed, a ParaView submenu was added to the Programs submenu of the Windows Start
menu. From the ParaView menu, click on paraview.exe to start ParaView.
Alternatively, you can run ParaView from the Windows Command Prompt by navigating to
the directory where the executable is located and typing paraview.exe followed by any
command-line options you wish to apply, just as you would on a unix system.
On Macintosh
To run ParaView on a Macintosh, you must first download the ParaView source tree and
compile the application as described in section 15.3. Once ParaView has been built, it can be
run from the command line just as it would be on a unix system.
Chapter 2
User Interface
In this chapter, we will discuss the parts of the ParaView user interface. Shown below is the
ParaView GUI as it appears at start-up on Windows after an initial data set is loaded.
Display
Area
Property
Sheet
Status Bar
The parts of the main window of the ParaView user interface labeled in the above image will
be described in detail in this chapter. ParaView does not have a mechanism for opening
multiple main windows at the same time. (To do that, you would need to start the ParaView
application once per window.) Following the sections about the labeled parts of the interface,
we will discuss the Selection / Navigation Window for moving between data sets in
ParaView. Then we will describe some application settings available for ParaView. We will
end the chapter by discussing ParaView' s rendering parameters.
Because ParaView is built on top of VTK, it inherits its pipeline architecture. ParaView’s user
interface is designed to make connecting the pieces of the pipeline more intuitive. Changing
the connections in the pipeline is as simple as selecting a different data set from the Input
menu on a data property sheet for a particular data set. A diagram of the current visualization
pipeline is visible in the Navigation Window.
2.1 Menus
There are eight menus in the menu bar at the top of the main ParaView window. The
functionality in each of these menus is described below. The Select and Filter menus are
initially grayed out because no data has been loaded. Data must be loaded for there to be any
data sets to select. Also filters can only be applied to data that has been loaded into the
application.
File Menu
The File menu handles various tasks involving loading data, saving data, and printing. Each
entry in the File menu is described below.
Open Data: This allows you to load data files. The data file formats ParaView supports are
described in section 3.2, Supported Data File Formats.
Save Data: This menu option allows you to save the data you are currently visualizing to a
data file. ParaView allows you to save your data in a variety of data file formats. See section
3.2.
Load Session, Save Session State, and Save Session Trace: These entries handle saving
and loading ParaView session files. These files capture the current state of the ParaView
application and the current visualization. Session files are covered in chapter 9.4.
Save Batch Script: This entry saves a batch script to store the current visualization. When
ParaView is run in batch mode with this script, it will produce the same visualization results
without creating the ParaView user interface. Depending on the parameters provided when
saving the script, the visualization results can be saved as an image and / or as a geometry file,
and the rendering can be done offscreen. See chapter 10, Batch Processing, for more
information on this topic.
Import Package: Using this entry, you can load an XML file to extend ParaView’s available
readers, writers, sources, or filters. Descriptions of ParaView’s XML and creating a new
module are in chapter 16. This is an advanced feature, mainly used by ParaView developers
and people using ParaView as a method of testing new algorithms.
Open Recent File: If you have previously loaded data into ParaView, a list of the most
recently opened files (up to ten) will be available from the Open Recent File submenu.
Selecting a file from this submenu will load it into ParaView.
Save View Image: This allows you to save the current Display Area to an image file.
ParaView supports saving images in several standard image formats: Windows Bitmap,
JPEG, PNG, PPM, and TIFF. Make sure that nothing is hiding the display area when you save
the view image to a file; if another window is in front, the part of it covering the display area
will be included in the resulting image.
Page Setup: This submenu allows you to specify the resolution (in DPI, dots per inch) at
which to print an image of the display area. The higher the resolution, the better the quality of
the final image, but the longer it will take to print.
Print: If you wish to print the image in the display area, select the Print entry. On unix,
selecting Print actually saves the image to a postscript file which you can then send to the
printer.
10 User Interface
Exit: This last item on the File menu, closes the ParaView application. Clicking the X in the
upper right corner of the application window has the same effect.
Edit Menu
Delete All Modules: This option removes any readers, sources, or filters you have created.
This is the equivalent of going to the Parameters page for each data set and pressing the
Delete button.
Copy View Image: On Windows, this second option is available in the Edit menu. This entry
copies the contents of the Display Area to the Windows clipboard so it can be pasted into
other applications.
View Menu
ParaView’s View menu controls which property sheet is displayed in the left panel of the user
interface. (See the next section for a description of property sheets.)
Application Settings: This property sheet allows you to specify settings for the ParaView
user interface. These settings are discussed in more detail later in this chapter.
Source: Choosing this option causes the property sheet for the current data set to be shown in
the left panel. This option is disabled if there is no current data set (i.e., no data is loaded in
ParaView).
Animation: Selecting this entry displays the interface for creating animations of your
ParaView visualizations. Chapter 8 is devoted to this topic.
2.1 Menus 11
3D View Properties: When ParaView is launched, the 3D View Properties property sheet is
displayed in the left panel. It allows you to modify rendering parameters, add annotations to
the 3D scene, and position and orient the camera.
Select Menu
The Select menu contains the names of the data sets currently in ParaView, so it is inactive
until the first data set is created. The contents include data sets that have been loaded, data
sets created from the Source menu, and outputs from filters you have applied. There is also a
submenu called Glyphs that contains data sets placed at points in your data set by the Glyph
filter.
When an item is chosen from the Select menu, that item becomes the current data set. That
data set’s property sheet is displayed in the left panel of the user interface, and Source
becomes the selected item in the View menu.
Source Menu
The Source menu lists the various sources you can use to create data sets within ParaView. In
ParaView, a source is an object that creates data without using another data set as input or
reading data from a file. For example, the Cone source creates a cone in the 3D scene. User
interface controls are provided to manipulate the parameters of the cone. Each of the sources
is described in detail in Appendix A.
12 User Interface
Filter Menu
The Filter menu lists the filters you can apply to data sets in ParaView. The state of the entries
(enabled or disabled) in this menu changes based on the characteristics of the current data set
such as the data set type (polygonal, rectilinear, etc.) and information about the associated
point- and cell-based data. (See section 3.1 for information about the data set types ParaView
supports.) The Filter menu is inactive until a data set has been created in ParaView. Appendix
B contains a description of each of the filters in ParaView.
Window Menu
The entries in the Window menu control the visibility of the left panel (containing the current
property sheet) and cause separate windows to be displayed for various reasons.
Hide Left Panel: The first entry in the Window menu toggles the visibility of the left panel of
the ParaView user interface. Its text changes between Hide Left Panel and Show Left Panel
depending on whether the left panel is currently visible.
Command Prompt: In the Command Prompt window, enter Tcl commands in the
Command entry box at the top of the window. Press Enter to have ParaView execute the
command. ParaView’s user interface is written using Tcl/Tk, and some of the C++ code for
ParaView has been made available through Tcl/Tk. Because of this, it is possible to control
much of ParaView’s user interface from a Tcl command prompt.
Clicking the Dismiss button at the bottom of this window closes the Command Prompt
window and allows you to interact with the ParaView application again. The Command
Prompt is most useful to ParaView developers because it allows them to query the state of
various ParaView objects and to change their parameters interactively.
Error Log: When an error occurs in ParaView, a red exclamation mark is displayed on the
extreme right side of the status bar at the bottom of the ParaView window. Clicking on this
exclamation mark displays the Error Log which lists any current errors in this ParaView
session (The Error Log is also available from the Window menu.) In the Error Log window,
shown below, clicking the Clear button will delete the list of errors displayed in the window.
The Buffer Length menu button determines how many lines of text will be displayed in the
Error Log window. If you wish to keep a copy of the error log, click the Save button in the
upper left corner of the window. Doing so will display a dialog box for saving the file.
Clicking the Dismiss button closes the Error Log window and allows you to interact with the
ParaView application again. If you click the Dismiss button without clearing the error log,
the exclamation mark in the lower right corner of the ParaView window will become black.
14 User Interface
Timer Log: The Timer Log shows the duration of various ParaView events, mostly related to
rendering and filter execution. The options in the Timer Log window are similar to those for
the Error Log. An additional menu button, labeled Time Threshold, determines how long an
event must take in order to be recorded in the timer log. The Enable check box in the upper
right corner determines whether or not the timer log is recording events.
Help Menu
The Help menu contains options for displaying various types of information about the
ParaView application.
Help: This entry directs you to a web page for downloading ParaView documentation.
Play Demo: This option causes ParaView to load a script that has been created to demonstrate
several of ParaView’s main features. While the demo is playing, a dialog box will be
displayed describing the currently demonstrated feature. The demo will continue playing until
you click the Stop Demo button on the dialog box. When you exit the demo, ParaView
returns to its normal operating mode.
About ParaView: This entry displays a dialog box containing information about the current
version of ParaView.
At the right edge of any property sheet, there is a raised bar separating the property sheet in
the left panel from the display area. By left-clicking and dragging this bar, you can change the
width of the left panel and the display area with respect to each other.
Sometimes the contents of a property sheet may take up so much vertical space that not
everything in it can be displayed at once in the ParaView window. When this happens, a
vertical scroll bar will be displayed on the right side of the property sheet (to the left of the
resizing bar). Additionally, many of the main sections of the user interface have an X in the
upper right corner. Clicking this X hides the contents of that portion of the interface. The X is
replaced with a downward pointing triangle. Clicking the triangle expands that portion of the
user interface again.
2.3 Toolbar
ParaView’s toolbar is divided into three sections based on what the buttons in each section
control. The three buttons on the far left are used for positioning the camera to view the 3D
scene. The first button resets the camera to a default viewing direction and to a position so
that all visible data sets are within the viewing frustum. The following two buttons determine
whether mouse motions in the display area reposition the camera in 2D or 3D. The functions
of these buttons are described in more detail in section 6.2.
The middle section of the toolbar contains buttons that add some of ParaView’s most used
filters to the visualization pipeline. These buttons are enabled or disabled based on the current
data set. If the current data set could be an input to a filter on the toolbar, its button is enabled;
otherwise it is disabled. A description of the filters available in ParaView can be found in
Appendix B.
The buttons on the far right side of the toolbar are concerned with positioning the center of
rotation and toggling the visibility of the axes marking the center of rotation. Their
functionality is described in section 6.2.
In the title bar at the top of the display area, there is a button (shown to the left) for
changing the contents of the left panel. Clicking this button will toggle between the current
property sheet and the one for the 3D View Properties.
If Selection mode is chosen, as shown in the image below, then the names of the data
sets are listed sequentially in the order you created them. To the left of each entry is an
“eye” icon indicating whether that data set is currently visible. A dark icon indicates that the
data set is visible; when a data set is invisible, its icon is drawn in light gray. Clicking on the
“eye” icon toggles the visibility of the corresponding data set. In this example, ironProt.vtk
and Clip0 are visible, but Contour0 is not. Clip0 is also highlighted in yellow, indicating that
it is the current data set.
If you have selected Navigation mode, the data sets are drawn to indicate ParaView’s
current visualization pipeline. (The details of the visualization pipeline are discussed in
chapter 5.) Clicking on the name of a data set causes it to be displayed in the center of the
Navigation Window. Its immediate inputs are drawn to the left with right-pointing arrows
drawn from them to the data set in the center. Any filters that use this data set as input are
drawn to its right with right-pointing arrows connecting them. If there are any data sets
preceding or following the ones displayed in the Navigation Window, an ellipsis (. . .)
indicates this. In this mode, no indication of visibility is given, but the current data set is
displayed in black while all other data sets are displayed in blue.
Regardless of which mode the Selection / Navigation Window is in, left-clicking the name of
one of the data sets causes it to become the current data set. Its property sheet is displayed
below the Selection / Navigation Window in the left panel of the user interface. Right-
clicking a data set’s name displays a menu from which you can delete the data set (if it is at
18 User Interface
the end of the visualization pipeline), toggle its visibility, and change its display style (i.e., its
representation and interpolation). The visibility and display style options chosen are
synchronized with those on the Display tab of the data set’s property sheet.
Confirm on exit: If this option is selected, the dialog box shown on the left will be displayed
to give you the option of returning to the
application instead of exiting when you
choose Exit from the File menu. Selecting
Do not show this dialog anymore. from
this dialog box will also deselect Confirm
on Exit in Application Settings.
Show splash screen: ParaView’s splash screen is a separate window that is optionally
displayed on startup. It contains the ParaView logo and the logos of ParaView’s sponsors. It
also shows progress as different parts of the application are loaded.
2.8 Rendering Parameters 19
Show Tooltips: Tooltips are yellow text boxes containing context-sensitive help that are
displayed when the mouse is positioned for a few seconds over a portion of the user interface
that supports this feature.
Show source descriptions: When you create a data set from a reader, source, or filter, if this
option is on, a description of the reader, source, or filter will be displayed on the Parameters
tab of the data set’s property sheet. If this feature is not on, only the abbreviated help that is
shown in the status bar when a source or filter is selected from a menu will be available.
Show source names in browsers: Showing generated source names in the Selection /
Navigation Window (browser) is an advanced feature useful mainly to ParaView script
developers. A unique name for each reader, source, and filter is shown in parentheses in
addition to the name from the Parameters tab’s Label entry.
Show trace files on ParaView startup: When this check box is marked, you will be given
the option of deleting existing ParaView trace files when the application starts. Only trace
files whose names begin with “ParaViewTrace” will be deleted. While ParaView is running,
each action the user takes is recorded in a trace file. When ParaView exits normally, the trace
file is deleted by default. If ParaView does not exit normally (i.e., the application crashes),
any remaining trace files may provide information to ParaView developers about what went
wrong in the application to cause the crash.
The Toolbar Settings parameters in the second portion of the Application Settings tab
control how ParaView’s toolbar is displayed. Both the toolbar itself and the buttons it contains
can be drawn either flat or raised, as indicated by the two check boxes in this section. On
Windows, by default both the toolbar and the buttons are flat; on unix, both are raised.
On the General tab of the 3D View Properties property sheet is a section called Advanced
Render Parameters. This section contains three check boxes, Use parallel projection, Use
triangle strips, and Use immediate mode rendering, which are described below.
Use parallel projection: This toggle determines whether parallel or perspective projection is
used in rendering the 3D scene. In perspective projection, objects nearer to the camera appear
20 User Interface
larger than those that are farther away. In parallel projection, the size of the object drawn does
not change based on its distance from the viewing position.
Use triangle strips: If this option is selected, then the triangles in your data set will be
combined into triangle strips before they are drawn. This may improve rendering speed.
However, it also changes how normals are generated during the rendering process if your data
set does not already contain them, so the shading of the data set will be different depending on
whether this option is selected. Also, you can not currently color by cell attributes properly
when triangle strips are enabled.
Use immediate mode rendering: If immediate mode rendering is not used, then display lists
are used during rendering. Display lists can improve rendering speed for small data sets or
those whose geometry does not change. For cases other than these, using display lists can
slow rendering times because of the memory they consume and the overhead of re-creating
them.
The ParaView interface does not allow you to deselect both Use triangle strips and Use
immediate mode rendering simultaneously. When display lists are enabled, ParaView
automatically enables triangle strips. This reduces the memory required by the display list.
Some graphics drivers will cause ParaView to crash when display lists use too much memory.
Clicking the Set Background Color button causes an operating system dependent dialog box
for choosing a new color to be displayed. The Windows version of this dialog box is shown
below.
2.9 Background Color 21
Loading Data
Loading data is a fundamental operation in using ParaView for visualization. There are a few
methods for accomplishing this task in ParaView. Probably the most obvious is loading a data
file using the Open Data option in the File menu. Another option is to load a previously saved
session file (File menu, Load Session). This will return ParaView to its state at the time the
file was saved by loading data files, applying filters, setting preferences, etc. There are also
data set sources (available in the Source menu) in ParaView that create data sets without
loading data files.
ParaView can process both structured and unstructured data sets. It also has some support for
multi-block and time-varying data. These data sets can be read into ParaView from several
different file formats, some of which ParaView also uses for saving data to a file.
Unstructured Grid
Multi-block
In ParaView, it is possible to group several data sets together so that the same data processing
can be performed on all of them at once. This group of data sets in ParaView is referred to as
a multi-block or multi-part data set. Some of the file formats ParaView can load (e.g., the
EnSight reader) support multi-block data sets. If your data is not in one of these formats, it is
still possible to take advantage of ParaView’s multi-block functionality by running the Group
Parts filter on your data and selecting which currently loaded data sets you wish to process
together. This allows you to apply the same visualization algorithms (with the same
parameters) to each data set without needing to create the same visualization pipeline multiple
times. If you have a multi-block data set, but you want to process the parts independently,
running the Extract Parts filter on the multi-block data set allows you to select parts for
independent processing.
Time Support
In ParaView, one time step of a data set can be loaded at a time. It is possible to select files
containing several time steps and animate through them using the Animation interface. If the
filenames of several files in a directory seem to be time steps through a data set (e.g.,
file_0.vtp, file_1.vtp, file_2.vtp, etc.) or are specified as such in a .pvd file (See appendix ? for
information about the PVD file format.), then a Timestep slider will be displayed on the
Parameters page for that data set reader. To switch between time steps, move the Timestep
slider to the appropriate position, and click the Accept button.
If your data files are not named in such a way that ParaView recognizes them as a time series,
you can still manually load the files containing the various time steps. To do this, click on the
Timesteps button beside the Filename entry. A dialog similar to the one shown below will
appear.
26 Loading Data
The files listed in the right column are the ones currently in your time series. Their order
indicates successive time steps. The left column contains the names of the other files in the
same directory as the file you initially opened. The buttons between the two columns are for
moving files into or out of the time series. Add All moves all the file names in the left column
to the one on the right. The Remove All button moves all the file names in the opposite
direction. The Add and Remove buttons move only the selected file name to the appropriate
column. If the file names in the right column are not listed in the correct order, use the Up and
Down buttons below that column to reposition individual file names. When the order is
correct, click the Close button. When you return to the Parameters tab, a Timestep slider
will have been added, allowing you to select the current time step you wish to load.
• ParaView files: This is the default file format for ParaView. The data set created by
this reader may be of any type supported by ParaView (polygonal, uniform
rectilinear, nonuniform rectilinear, curvilinear, or unstructured). The file extension is
3.2 Supported Data File Formats 27
.pvd. This format supports spatially partitioned and multi-block data. ParaView can
write data files in this format. There are no modifiable parameters for reading
ParaView files unless the file contains multiple time steps.
• VTK files: This is the XML-based file format used by VTK. The data set created by
this reader may be of any type supported by ParaView (polygonal, uniform
rectilinear, nonuniform rectilinear, curvilinear, or unstructured). The file extensions
are as follows: .vtp for polygonal data, .vti for image data (uniform rectilinear data
sets), .vtr for rectilinear grids (nonuniform rectilinear data sets), .vts for structured
grids (curvilinear data sets), and .vtu for unstructured grids. ParaView can write data
files in this format. This file format allows you to select which data set attributes to
load.
• Parallel (partitioned) VTK files: This is the parallel version of the XML-based file
format used by VTK. The parallel VTK files contain information about the spatial
distribution of data and may point to multiple VTK files. The data set created by this
reader may be of any type supported by ParaView (polygonal, uniform rectilinear,
nonuniform rectilinear, curvilinear, or unstructured). The file extensions are as
follows: .pvtp for polygonal data, .pvti for image data (uniform rectilinear data sets),
.pvtr for rectilinear grids (nonuniform rectilinear data sets), .pvts for structured grids
(curvilinear data sets), and .pvtu for unstructured data. ParaView can write data files
in this format. This file format allows you to select which data set attributes to load.
• Legacy VTK files: This is the legacy (before VTK 4.2, although still supported)
VTK file format. All types of data are stored with the same file extension, .vtk. The
data set created by this reader may be of any type supported by ParaView
(polygonal, uniform rectilinear, nonuniform rectilinear, curvilinear, or unstructured).
ParaView can write data files in this format. There are no modifiable parameters for
reading legacy VTK files.
• Parallel (partitioned) legacy VTK files: This is the parallel version of the legacy
(before VTK 4.2, although still supported) VTK file format. All types of data are
stored with the same file extension, .pvtk. The data set created by this reader may be
of any type supported by ParaView (polygonal, uniform rectilinear, nonuniform
rectilinear, curvilinear, or unstructured). There are no modifiable parameters for
reading parallel legacy VTK files.
• EnSight Master Server files: This is the parallel version of CEI’s EnSight format.
The master file usually has a .sos extension and may point to multiple .case files.
This file format allows you to select which data set attributes to load.
• HDF5 raw image data files: This is the latest file format created by the Hierarchical
Data Format (HDF) group at the National Center for Supercomputing Applications
(NCSA) at the University of Illinois at Urbana-Champaign
(http://hdf.ncsa.uiuc.edu/). Files of this type have a .h5 extension. This format only
supports uniform rectilinear (image) data. This file format allows you to select which
data set attributes to load.
• VRML files: This is the file format for the Virtual Reality Modeling Language
(VRML). VRML 2.0 format is supported. Only the geometry from the VRML file is
loaded. The extension for files of this type is .wrl. This reader produces polygonal
data output. There are no modifiable parameters for reading VRML files.
• Protein Data Bank files: This file format is used by the Protein Data Bank (PDB),
an archive of experimentally determined three-dimensional structures of biological
macromolecules (http://www.rcsb.org/pdb/). These files have a .pdb extension. The
PDB reader produces polygonal data output. There are no modifiable parameters for
reading Protein Data Bank files.
• XMol Molecule files: This is the Minnesota Supercomputer Center’s XMol file
format. XMol uses the simple XYZ file format for representing molecules. It
describes atoms and bonds, but not values are stored on atoms. These files have a
.xyz extension. The XMol reader produces polygonal data output. XMol Molecule
files are automatically loaded when the file name is chosen from the file selection
dialog.
• PLOT3D files: This is the file format originally used by the PLOT3D plotting
package developed at NASA. ParaView can read both ASCII and binary PLOT3D
files. By default, ParaView assumes that the default file extension is .xyz for
geometry files and .q for solution files, but files with other extensions can also be
read. Only curvilinear output is produced, but it may be single- or multi-block.
• Stereo Lithography files: ParaView can read binary or ASCII stereo lithography
files. These files have a .stl extension. The output produced is polygonal. There are
no modifiable parameters for reading Stereo Lithography files.
• BYU files: ParaView can read MOVIE.BYU files. These files have a .g extension.
Only polygonal data is produced. There are no modifiable parameters for reading
BYU files.
3.2 Supported Data File Formats 29
• Gaussian Cube files: This is the file format used by the Gaussian software package
(http://www.gaussian.com). The default file extension is .cube. The output produced
is polygonal.
• Raw (binary) files: ParaView supports reading raw uniform rectilinear data from a
file. The default file extension is .raw. The user specifies the dimensions and data
type, and the reader computes the header size.
• XDMF files: The eXtensible Data Model and Format (XDMF) is an active, common
data hub used to pass values and metadata in a standard fashion between application
modules (http://www.arl.hpc.mil/ice/). These files have a .xmf extension. Metadata
is stored in the XDMF file using an XML format, and large attribute arrays are
stored in a corresponding HDF5 file. This format supports rectilinear and
unstructured grids. ParaView can write files in this format. This file format also
allows you to select which data set attributes to load.
• AVS files: ParaView can read binary or ASCII files stored in AVS UCD format.
These files have a .inp extension. The output of the AVS UCD reader is of type
unstructured grid. This file format allows you to select which data set attributes to
load.
• Meta Image files: ParaView can read UNC meta image data. Files of this type have
either a .mhd or .mha extension. This reader produces uniform rectilinear (image)
data output. ParaView can write files of this type. There are no modifiable
parameters for reading Meta Image files.
• PLY Polygonal files: The Stanford University PLY polygonal file format is
described at http://graphics.stanford.edu/data/3Dscanrep/. ParaView expects files of
this type to have a .ply extension. The PLY files that ParaView can read must have
the elements “vertex” and “face” defined. The “vertex” elements must have the
properties “x”, “y”, and “z”. The “face” elements must have the property
“vertex_indices” defined. There are no modifiable parameters for reading PLY files.
• Exodus files: If ParaView is built with Exodus support, ParaView can read ExodusII
files. The expected file extension is .ex2. This file format allows you to select which
data set attributes to load.
• SAF files: If ParaView is built with SAF support, ParaView can read SAF files. The
SAF reader produces uniform rectilinear grid, nonuniform rectilinear grid, and
unstructured grid output. This file format allows you to select which data set
attributes to load.
Chapter 4
Each time a data set is opened from a file, a source is selected, or a filter is applied, ParaView
creates a property sheet for the new resulting data set. From this property sheet you can
specify the parameters and display representation of your data. It also provides some
statistical information about the data once it has been loaded. The data property sheet created
has three tabs, Parameters, Display, and Information, which will be described in more detail
in this chapter.
4.1 Parameters
The Parameters tab is the first one created for each data property sheet. From this tab, you
can modify the parameters of the reader, source, or filter being used to create a new data set.
Most of the controls and information provided on this tab are dependent upon the reader,
source, or filter with which the property sheet is associated, but some features do not vary.
The following is a discussion of these features.
Name: At the top of the Parameters tab is the unique Name assigned to this data set. This is
not modifiable by the user. It is displayed in the Selection / Navigation Window if Show
source names in browsers is selected on the Application Settings property sheet (View
menu, Application Settings).
Class: Below the Name label is the Class label which displays the name of the VTK or
ParaView C++ class associated with this property sheet. This information is most useful to
ParaView users who are also familiar with VTK (the Visualization Toolkit), which handles
most of the data processing for ParaView.
32 Data Property Sheets
Label: Next is the Label entry box. It contains the name for this data set that is displayed in
the Selection / Navigation Window and in the Select menu. The default Label value matches
the unique Name identifier, but this value can be changed to something more meaningful by
typing in the provided entry box and pressing Enter. In the example shown below, the Label
value has been changed from “Cone1” to “my cone”. Both Name and Label are used because
we need a unique identifier for each data set, but allowing the user to specify a more
descriptive name helps in recognizing the data set when its name is listed in other parts of the
user interface.
Description: Following the Label entry box is a description of the reader, source, or filter. If
you do not wish for this description to be displayed, turn off the Show source descriptions
option in Application Settings, available from the View menu.
Below the description is a row of three buttons: Accept, Reset, and Delete. When a reader,
source, or filter is first selected, in most cases the associated data set is not immediately
created. This does not happen until the Accept button is pressed. (The exceptions to this rule
are some readers that do not have any parameters which the user can modify. For these
readers, the data file is loaded without the user pressing Accept.) Pressing the Accept button
passes the values on the Parameters tab to the data processing engine. When the values of the
user interface controls located below this row of buttons do not match the values of the
underlying data set, the Accept button will be displayed in green. This is the case when a
reader, source, or filter is first added to the visualization pipeline or when the value of at least
one of the user interface controls has been modified.
The Reset button sets the GUI controls for this data set to the state they were in the last time
Accept was pressed. If Accept has not been pressed yet, the controls are set to their initial
values for this data set.
4.2 Display 33
Pressing the Delete button removes the current data set from the visualization pipeline. If the
current data set is being used as the input to a filter, this button will be disabled. To delete a
data set that is in such a state, the filters that are using it must be deleted first. If you wish to
delete all of the data sets currently loaded in ParaView, select Delete All Modules from the
Edit menu.
4.2 Display
View
Once the Accept button has been pressed for the first time for a reader, source, or filter, the
Display and Information tabs are added to the property sheet for that data set. The Display
tab allows you to control how the data set is rendered in the Display Area. The contents of the
Display tab are divided into three sections: View, Color, and Display Style.
The items in the View section control what objects are displayed in the display area. A
description of each of the controls in this section follows.
Set View to Data: As described in section 6.2, the Set View to Data button is provided to
center the viewing position on this data set.
Data: The Data check box toggles the visibility of the data set in the 3D scene. It is
synchronized with the eye icon in the Selection Window.
Scalar bar: The Scalar bar option determines whether a scalar bar displaying the current
color map is drawn. The Scalar bar check box is only available if this data set has point- or
cell-centered attribute arrays, and one of them is being used to color the data (i.e., the value of
the Color by menu is not Property). In the above example, the Scalar bar check is grayed out
for one of these reasons.
Cube Axes: When the Cube Axes check box is marked, axes are displayed on three sides of
the bounding box of the current data set. The size of the data set in each dimension is labeled
on the corresponding axis. Cube Axes are described in more detail in section 7.4.
34 Data Property Sheets
Label Point Ids: In ParaView, each point has a corresponding id. Selecting Label Point Ids
causes these id numbers to be displayed next to the corresponding points. Labeling point ids is
covered further in section 7.5.
Color
The Color section, located just below the View section, is responsible for determining what
colors are used in displaying this data set. If a data set has point- or cell-centered attribute
arrays, the names of these arrays are listed in the Color by menu. In addition to the names of
the arrays, there is also an entry in the Color by menu labeled Property. If Property is chosen
from the menu, the data set will be displayed in a solid color. The Actor Color button will be
enabled, and the Scalar bar check box, the Map Scalars check box and the Edit Color Map…
button will be disabled. When the Actor Color button is clicked, a color selection dialog box
is displayed, similar to that for selecting the background color of the display area. (See section
2.9.) From this operating system dependent dialog box, you can select a single color for the
data set.
If an array name is selected from the Color by menu, the Scalar bar check box is enabled, as
is the Edit Color Map… button, and the colors used in displaying the data set will be derived
from this array. In this case, the Actor Color button will be disabled. For any single-
component array chosen, the values in the array will be passed through a color map to
determine the color each data value represents. When using vector arrays, you have the option
of determining the color based on one of the components of the array or on the magnitude of
each vector in the array. (The exception to this rule for vector arrays is a three-component
unsigned char data array, which is described below.) To select how to use a vector array, click
the Edit Color Map… button, and use the menus in the Vector section to select whether to use
vector magnitude or a single component of the vector for coloring the data set. The interface
for editing the color map is described in section 7.1. The Scalar bar check box (in the View
section of the Display tab) toggles the visibility of the scalar bar (showing the color map
being used) in the display area.
If the selected array contains three-component unsigned char data, then the Map Scalars
check box will become enabled. If the three components of your data array represent the red,
green, and blue color components, uncheck the Map Scalars check box to use the values in
this array directly as colors. Deselecting Map Scalars will also disable the Scalar bar check
box and the Edit Color Map… button because no color map is being used to determine the
4.2 Display 35
colors in your data set. If Map Scalars is checked, then the array selected from the Color by
menu will be mapped through a color lookup table just as any other array would be to
determine the colors for this data set. Map Scalars should be checked if the entries in the
selected array should not be directly interpreted as colors. The Maze source generates an RGB
(i.e., red, green, blue) unsigned char scalar color array and is an example of how this feature
works.
By default, ParaView selects an array from the current data set to use for coloring the data set.
If the source, reader, or filter that created the current data set created a point-centered single-
component array, then ParaView will use this array (or one of them if more than one were
created) for determining color. If this is not the case, then if a single-component cell-centered
array was created, ParaView will base its coloring of the current data set on this array. If no
new single-component point- or cell-centered arrays were created, then ParaView checks
whether the current data set is the result of a filter (i.e., there is an input to it). If this is the
case, then ParaView will try to color the current data set by the same array as was used in
coloring the input data set. If this is not possible (e.g., the filter removed this array, or the
input data set was colored by Property), then the current data set is colored by Property.
Display Style
In addition to selecting how the data set will be colored, you can also specify how the data set
will be geometrically represented and shaded. The user interface controls for doing this are
contained in the Display Style section of this data set’s Display tab.
The value selected from the Representation menu determines how the geometry of this data
set will be drawn in the display area. The available options are Outline, Surface, Wireframe
of Surface, and Points of Surface. (In some cases, a Volume Render option is also
available, as will be discussed later.) For unstructured data sets, when Outline is selected, an
axis-aligned bounding box of the data set will be drawn. In the structured cases, the outline
follows the edges of the data set, whether this results in an axis-aligned bounding box or not.
Choosing Surface means that the exterior faces of the cells in the data set will be rendered.
The wireframe representation renders the edges of each cell in the data set as lines. The
Points of Surface option causes only the points composing the cells in the data set to be
drawn. Most data sets default to using a surface representation. The exceptions to this are
unstructured grids containing more cells than the number specified on the Outline Threshold
36 Data Property Sheets
slider (on the General tab of the 3D View Properties property sheet) and 3D structured data
sets (curvilinear, nonuniform rectilinear, and uniform rectilinear). In these cases, an outline of
the data set is displayed by default.
Some data sets contain lines even when they are not using a wireframe or outline
representation. Surface representation is still the default for data sets composed only of lines
(e.g., the output of the Extract Edges filter). The result of this is that the back sides of the
lines appear black. Selecting the Wireframe of Surface representation instead causes the lines
to be drawn in the expected colors.
The Interpolation menu controls how shading (lighting effects) is applied to the data set when
it is drawn as a surface. If you select Flat from this menu, each polygon (face) of the data set
will have a single value, but different polygons will have different intensities, making the
surface look very faceted. If you choose Gouraud shading instead, and your data has point-
centered normals, the intensity values will be interpolated across each polygon, giving a
smoother appearance. (Gouraud shading has no effect without point-centered normal vectors.)
If your data set does not already have point-centered normals, you can add them using the
Normals generation filter. In the image below, the data set on the left was drawn using flag
shading, and in the one on the right Gouraud shading was used. The same data set is being
rendered at the same resolution in both images.
The two entry box / thumbwheel controls, Point size and Line width, at the bottom of the
Display Style section can be used to change the size of points and / or the width of lines in the
representation of the data set. Increasing these values will make the points or lines drawn in
the display area appear bolder.
4.2 Display 37
Volume Rendering
If the data set type of the current data set is unstructured grid, and there is at least one point-
centered single-component (scalar) array, then Volume Render will be added to the
Representation menu in the Display Style section. Data to be volume rendered must contain
only hexahedral cells (elements). If any of the cells in the data set are not hexahedral, an error
message will be generated; only the hexahedral cells will be volume rendered. When Volume
Render is selected from the Representation menu, the Color section is replaced by one
called Volume Appearance. The Interpolation, Point size, and Line width controls are
disabled because they are not relevant to volume rendering.
In the Volume Appearance section, any data arrays that are appropriate for using in volume
rendering are listed in the View Scalars menu. The Edit Volume Appearance… button
displays an interface for specifying how the selected scalar array will be used in volume
rendering the current data set.
The controls in the Volume Scalar Opacity section determine how opaque various parts of
the unstructured grid appear based on the selected scalar array. The Ramp Start Opacity and
Ramp End Opacity sliders determine the minimum and maximum opacity values,
respectively, used in rendering this data set. The Scalar Opacity Ramp double-ended slider
specifies which scalar values to associate with the minimum and maximum opacities. The
opacity values will be scaled linearly for the between the minimum and maximum scalar
values in the Scalar Opacity Ramp. The scalar values that fall outside the range of the Scalar
Opacity Ramp are assigned the minimum or maximum opacity, depending on which side of
the range the scalar value falls. The Unit Distance slider determines the distance over which a
given opacity is accumulated during ray-casting (the volume rendering method being used).
The Volume Scalar Color controls operate similarly to those in the Volume Scalar Opacity
section. The color range control specifies the range of colors to use in volume rendering this
data set. The buttons on either end of the color map display can be used to change the starting
and ending colors to use. The double-ended Color Ramp slider controls the scalar range over
which the specified color map is applied. The colors for the scalars within the range of the
Color Ramp are determined by interpolating the colors in RGB (i.e., red, green, blue) space.
Scalar values that fall outside the range of the Color Ramp will be assigned either the
minimum or maximum color, depending on which side of the Color Ramp the value falls.
4.3 Information
The Information tab for each data set contains statistical and geometric information about the
data set. The Statistics section lists the type of the data set (described in the previous
chapter), the number of points and cells it contains, and the amount of memory it consumes.
The amount of memory listed is just for that data set, not the whole pipeline required to create
it. The Bounds section lists the minimum and maximum X, Y, and Z values in this data set
and delta values indicating the distance between each minimum and maximum. These two
sections are displayed for any data set loaded or created in ParaView.
For structured data sets (curvilinear, nonuniform rectilinear, and uniform rectilinear), an
additional section called Extents is added to the Information tab. In this section, the
minimum and maximum voxel extents in each of the X, Y, and Z directions are listed as well
as a dimension label listing the number of divisions in each direction. The dimension value
equals the maximum value minus the minimum value plus 1.
Data Manipulation
You can change the input data set of a filter you have already loaded in ParaView using the
Input menu on the Parameters tab of the property sheet for that filter. Only data sets that
meet the qualifications for the input of this filter will be listed.
In ParaView, you can run several different filters on the same initial data set without having to
reload the data before each filtering operation. This is possible because the filters do not
overwrite the input data set in memory. Because of this, you have access to the state of your
data before or after any filter. You can also apply a new filter to the result of a previous
filtering operation.
data set is used as the input to a filter, and the output of that filter is used as the input of
another filter, etc. For example, suppose you create a sphere in ParaView by selecting Sphere
from the Source menu. In this example, the sphere is the initial data set. Then apply a Shrink
filter, available in the Filter menu. Because the sphere was the current data set when the
shrink filter was applied, it is used as the input to the shrink filter. Now apply an elevation
filter to the output of the shrink filter. You have just created a simple, linear pipeline in
ParaView. If you set the Selection / Navigation Window to navigation mode, and click on
Shrink0 in the Navigation Window, you will see the following pipeline illustration.
You can create branches in the pipeline as well. With Shrink0 selected, apply Extract Edges
from the Filter menu. Now the output of the shrink filter is being used as the input to both the
elevation and extract edges filters. This can be seen by again selected Shrink0 in the
Navigation Window.
After a filter has been applied, you can return to it and modify its parameters. When you do
this, the filters beyond the current one in the pipeline will be updated to reflect this change. In
our current example, change the Shrink factor of the shrink filter to 0.8, and click Accept to
apply the change. Because the outputs of both filters are visible, you will see the results in the
display area of the re-execution of these two filters.
Most of the readers, sources, and filters in VTK report their progress while they are executing.
ParaView displays the progress updates in the progress bar (at the right of the status bar)
when the progress events occur more than 0.5 seconds apart. This is to ensure that progress is
only displayed in cases where it is meaningful – when a reader, source, or filter takes a
reasonably long time to execute.
In VTK, readers, sources, and filters are connected in a pipeline by setting the output from
one of these to be the input to another, just as in ParaView. When a parameter to a process
object (i.e., a reader, source, or filter) is modified, the resulting data sets are updated upon
44 Data Manipulation
request. In ParaView, this happens when the Accept button is pressed. When an update
request occurs in VTK, it is also propagated to the process objects that are earlier in the
pipeline than the current one. When the update request reaches the beginning of the pipeline,
each successive process object in the pipeline determines if its input has changed, and if it
has, it re-executes. In ParaView, this request also must be passed to process objects later than
the current one so that modifying parameters in the middle of the pipeline causes the
appropriate changes further down the pipeline.
Chapter 6
Interaction
Once data has been loaded into ParaView, as discussed in chapter 3, you will likely want to
view the data from different perspectives to gain insight into the data. ParaView provides
several different mechanisms for changing the viewing position and interacting with the data.
First we discuss the level of detail (LOD) rendering strategy which provides interactive
display rates for large data sets. Then interactive and manual control of the camera and actors
is covered. These controls allow users to view their data from different positions and
orientations. This chapter concludes with a discussion of the embedded 3D widgets used for
setting certain parameters of sources and filters in ParaView.
The interface shown below, located on the General tab of the 3D View Properties property
sheet (View menu, 3D View Properties), is used for setting the parameters for creating a
lower-resolution approximation of the data.
LOD threshold: The value of this slider determines how much memory a data set is allowed
to consume before a lower-resolution version of it is used for interactive rendering. The LOD
threshold is a global attribute which is compared to the total memory used by visible
geometry in the application. The size of the visualization geometry is used for the
comparison, not the original data set. If an outline representation is used for a very large data
set, it will not contribute much to the LOD threshold. Also, if a data set is not visible, it will
not affect the LOD threshold at all. As shown, the default is 5 megabytes. What memory limit
is appropriate depends on the rendering capability of the machine(s) on which ParaView is
being run. If rendering is slow, then you may want to set the LOD threshold to a lower value
to keep interactivity rates reasonably high. On the other hand, if the rendering speed is fast, a
higher memory limit may be acceptable, allowing you to interact with the full-resolution
version of the data.
The check box in front of the LOD threshold slider determines whether a second level of
detail is used at all. When checked, a low-resolution data set will be created if the total
visualization geometry takes up more than the specified amount of memory; if unchecked, no
LOD will be created. Although the memory size of the geometry is not a perfect measure of
rendering load, it is more robust than other more intuitive parameters. Using the number of
cells in the data set breaks down if triangle strips are used. Using the number of points the
6.2 Camera Movement 47
data set contains is problematic if many points in the data set are not used by any cell.
Unchecking the option has a similar effect as setting a very high threshold. However, the
check box is a more intuitive way of disabling this feature.
LOD resolution: This slider controls the granularity of the LOD created. The algorithm used
for creating the LOD divides the data set into spatial bins, and the value of this slider
determines how many of these bins in each dimension are used. The larger the number of
bins, the higher the resolution of the approximation data set, but the less improvement in
interactivity gained by using the lower-resolution LOD. Higher-resolution LODs also take a
longer time to generate.
Outline Threshold: This slider determines whether an unstructured grid data set will be
displayed using a surface or outline representation based on the number of cells in the data
set. The external surface of a 3-dimensional unstructured grid data set is one of the most
expensive representations to compute in ParaView. This outline option allows ParaView to
avoid generating this geometry when it would take an appreciable amount of time. The user
can always change the representation back to surface using the Representation menu on the
Display tab of the data set’s property sheet. The value of the slider is expressed in millions of
cells. By default, only the outline (bounding box) will be drawn for data sets containing at
least 5 million cells. For those unstructured grid data sets containing fewer cells than specified
on the Outline Threshold slider, the surface of the data set will be rendered.
Allow rendering interrupts: This check box at the bottom of the LOD Parameters section
controls whether clicking on the user interface while the application is rendering causes the
application to stop rendering and respond to the mouse event. This option keeps ParaView’s
user interface responsive when the visualization geometry is very large. This is an advanced
option that under normal operation should not be modified; it should remain checked.
(Turning this option off is sometimes useful when running ParaView in parallel if the MPI
implementation does not fully support asynchronous communication.) Not all rendering
modules support rendering interrupts yet.
Reset Camera
The Reset Camera button on the extreme left side of the Toolbar resets the viewing
position so that everything in the 3D scene is within the viewing frustum. (The
orientation of the camera does not change.) This does not mean that everything in
48 Interaction
the scene will become visible; it is still possible that one data set is hidden behind another
one.
Standard Views
From the Standard Views section of the Camera tab of the 3D View Properties property
sheet (View menu, 3D View Properties), you can position the camera to view the scene from
any of the six major viewing directions by pressing the appropriately labeled button. These
directions are +X, -X, +Y, -Y, +Z, and -Z. Pressing any of these buttons resets the viewing
position so that everything in the 3D scene is within the viewing frustum and changes the
camera’s orientation to be looking down the specified axis.
2D / 3D Mouse-Controlled Motion
The sections of the interface for controlling 2D and 3D mouse motion are located below the
Stored Camera Positions section on the Camera tab of the 3D View Properties property
sheet. They are labeled Camera Control for 2D Movements and Camera Control for 3D
Movements, as shown below. Each contains nine menu buttons for assigning different types
of interaction to the mouse buttons, possibly in combination with the Shift or Control key.
Each menu button in the first row assigns an interaction to a mouse button alone, and
interactions listed in the second and third rows are performed by pressing a mouse button
together with the Shift or Control key, respectively.
In 2D, the interactions are constrained to the Z-plane of the camera. This
allows the user to reposition or reorient the camera without affecting which
part of the data is facing the camera. In 3D, all the 2D interactions are still
available, but other movements not constrained to a plane (e.g., rotation) are also available.
The two buttons pictured to the left toggle between 2D and 3D mouse motion. They are
50 Interaction
located to the right of the Reset Camera button on the left side of the Toolbar. The circular
arrow button indicates 3D motion, and the intersecting arrows indicate 2D motion. The
supported mouse-controlled movements are as follows.
• FlyIn: Move the camera in the direction indicated by the mouse. The speed at which
the camera moves is controlled by the Fly Speed scale at the bottom of the 3D
camera control section. Rotation is controlled by the placement of the mouse. The
farther from the center of the display area the mouse cursor is, the faster the rotation.
Speed is decreased as rotation occurs. Unlike other operations that require mouse
movement to cause a change in the camera parameters, the FlyIn operation will
execute continually while the corresponding mouse button / key combination is
pressed. FlyIn is not available in 2D interaction mode.
• FlyOut: Move the camera away from the direction indicated by the mouse. This
operation can be used to “back up” after flying in towards an object. FlyOut operates
in the same manner as FlyIn except that the direction of the camera movement is
reversed. FlyOut is not available in 2D interaction mode.
• Move: The current data set will be translated according to the mouse motion. This is
an interactive method for placing objects in the scene. Unlike other mouse
interactions, the Move operation changes the position of the data set instead of the
position of the camera. Move is only available in 3D interaction mode.
• Pan: The mouse motion translates the camera in the view plane (i.e., the X and Y
axes of the camera coordinate system). When the camera is in parallel projection
mode, panning is implemented as a translation of the camera’s position and focal
point. In perspective project, only the focal point changes. Panning is available for
both 2D and 3D modes.
• Roll: The mouse motion will roll the camera about its viewing direction. This form
of rotation is available in both 2D and 3D modes.
• Rotate: Rotate the camera around the center of rotation using azimuth and elevation
operations. (Specifying the center of rotation is discussed later in this section.) The
rotate operation is available only in 3D mode.
• Zoom: Zoom in or out of the scene. In a parallel projection, this is a change in the
parallel scale of the camera, which does not move the camera, so it is not possible to
zoom inside of an object. In perspective projection, the camera moves closer to the
data, so if the user zooms in far enough, the camera’s position can be moved inside
or even behind the data in the scene. Moving the camera in this way is commonly
referred to as a dolly, but the visual results are similar enough that we use the label
“Zoom” in both parallel and perspective cases. Zooming is available in both 2D and
3D modes.
6.3 Actor Placement 51
Pressing any of the Apply Elevation, Apply Azimuth, or Apply Roll buttons moves the
camera in the specified manner by the number of degrees in the entry box to the right of the
button pressed. Pressing one of these buttons repeatedly will incrementally move the camera
by the specified number of degrees. (For example, if you enter 30 in the entry box beside the
Apply Elevation button, the first time you press the button the elevation will change by 30
degrees, and the second time it will change by 30 more degrees – a total of 60 degrees)
the Actor Control section, there are entry boxes with right-pointing arrow buttons beside
them that pop up either a thumb wheel or a slider. Moving the thumb wheel or slider causes
the associated action to occur immediately; a value typed in an entry box will only take effect
when that entry box loses focus (i.e., when the user either presses Enter or clicks on another
part of the interface).
The Translate, Scale, and Orientation controls perform the expected affine transformations
on the actor. Each of the three entry boxes (and its associated thumb wheel or slider) specifies
the X, Y, or Z component of the particular transformation. The Origin is the point about
which rotation (orientation) or the actor occurs. The Opacity determines how translucent the
actor is. An opacity of 0 means that the actor is completely transparent, while an opacity of 1
makes the actor opaque. Note that polygons are not sorted by depth in ParaView, so images
generated with translucent polygons will often have visual artifacts.
6.4 3D Widgets
In addition to being controlled manually through entry boxes, sliders, etc., parameters of some
of the filters and sources in ParaView can be changed interactively by manipulating 3D
widgets in the display area. Often the 3D widgets are used to set the parameters
approximately, and then the manual controls are used for fine-tuning these values. In the
manual controls for each 3D widget, there is a Visibility check box for toggling whether the
3D widget is drawn in the scene. The Display 3D widgets automatically check button (in the
3D Interface Settings section of the General tab of the 3D View Properties property sheet)
controls whether the 3D widgets are visible by default for the filters and sources that use
them. The following 3D widgets are supported in ParaView.
Box Widget
The box widget is used for clipping and transforming data sets. Each face
of the box can be positioned by moving the handle (sphere) on that face.
Moving the handle at the center of the box causes the whole box to be
moved. (This can also be achieved by holding the Shift key while
interacting.) The box can be rotated by clicking and dragging with the left
mouse button on a face (not at the handle) of the box. Clicking and
6.4 3D Widgets 53
dragging inside the box with the right mouse button uniformly scales the box. Dragging
upward increases the box’s size; downward motion decreases it.
Traditional user interface controls, shown above, are also provided if more precise control
over the parameters of the box is needed. These controls provide the user with entry boxes
and thumb wheels or sliders to specify translation, scaling, and orientation in three
dimensions.
Line Widget
The line widget is used to set the orientation and the position of a line. It is
used in both the Stream Tracer and Elevation filters. The position of the
line can be changed by clicking on any point on the line except the
endpoints and dragging. To position the widget accurately, the user may
need to change the camera position as well. Holding the Shift key while
interacting will restrict the motion of the line widget to one of the X, Y, or
Z planes. (The plane chosen is the one most closely aligned with the direction of the initial
mouse movement.) To move one of the endpoints, simply use one of the point widgets on
each end of the line. These are marked by spheres which become red when clicked. Left-
clicking while the cursor is over the line and dragging will reposition the entire line. Doing
the same with the right mouse button causes the line to resize. Upward mouse motion
increases the length of the line; downward motion decreases it.
The controls shown above can be used to precisely set the endpoint coordinates and resolution
of the line. Depending on the source or filter using this widget, the Resolution entry box may
not be displayed. The value of the Resolution entry box determines the number of segments
composing the line.
54 Interaction
Plane Widget
The plane widget is used in clipping and cutting. The plane can be moved
parallel to its normal by left-clicking on any point on the plane except the
line center and dragging. Right-clicking on the plane (except on the
normal line center) and dragging scales the plane widget. Upward mouse
motion increases the size of the plane; downward motion decreases it. The
plane normal can be changed by manipulating one of the point widgets
(displayed as cones that become red when clicked) at each end of the normal vector.
Shown above, the standard user interface for this widget provides entry boxes for setting the
center position and normal direction of the plane. Buttons are provided for positioning the
plane at the center of the bounding box of the data set and for aligning the plane’s normal
with the normal of the camera, the X axis, the Y axis, or the Z axis.
Point Widget
The point widget is used to set the position of a point or the center of a
point cloud. It is used by both the Stream Tracer and Probe filters. The
position of the point can be changed by clicking on and dragging any of its
three axes. To position the widget accurately, the user may need to change
the camera position as well. Holding the Shift key while interacting will
restrict the motion of the point to one of the x, y or z planes. (The plane
chosen is the one that is most closely aligned with the direction of the initial mouse
movement.)
As shown above, entry boxes allow the user to exactly specify the coordinates of the point,
and a button is provided to position the point at the center of the bounds of the current data
set. If the point widget is being used to position a point cloud instead of a single point, entry
boxes are also provided to specify the radius of the point cloud and the number of points the
cloud contains.
Sphere Widget
The sphere widget is used in clipping and cutting. The sphere can be
moved by left-clicking on any point on the sphere and dragging. The radius
of the sphere is manipulated by right-clicking on any point on the sphere
and dragging. Upward mouse motion increases the sphere’s radius;
downward motion decreases it.
As shown below, the center and radius can also be set manually from the entry boxes on the
user interface. There is also a button to position the sphere at the center of the bounding box
of the current data set.
Annotation
In ParaView, there are several ways to annotate the data to better understand or (in the case of
corner annotation) explain it. Several of the annotations can be interactively placed in the 3D
scene. The parameters of the annotations are controlled using traditional user interface
elements.
In ParaView, the data attribute used for coloring the current data set is selected from the
Color by menu, located in the same part of the user interface as the Edit Color Map… button.
By default, any data attribute (contained in any data set currently loaded in ParaView) whose
name matches the one selected in the Color by menu contributes to the range of the color
map. The minimum and maximum values of the color map can be overridden by entering
different values in the Min and Max entry boxes in the Color Map section of the interface. By
changing the minimum and maximum color map values, it is possible to use the whole color
range for displaying only the values in the current data set. Pressing the Reset Range button
resets the range to the default.
58 Annotation
Below the Min and Max entries is a display of the current color map. The colors at the
endpoints of the color map can be edited by clicking on the color buttons at each end of the
color map. (In the above figure, the minimum and maximum color buttons are colored with a
blue and a red square, respectively.) Clicking on either of these buttons will bring up an
operating system dependent color selection dialog. The menu button (with a file folder icon)
to the left of the color map display contains the following color map presets: Blue to Red (the
default), Red to Blue, and Grayscale (black to white). Changing the color map sometimes
makes the color display more intuitive for a particular data attribute. (For example, if the
attribute being displayed is temperature, the most desirable color map is likely blue to red
because blue is considered a cold color and red a warm one.)
The Resolution slider below the color map display specifies the number of colors to in the
color map. The scale ranges from 2 to 256 (the default). The fewer the number of colors, the
larger the range each color covers. This is useful if the current array has a small number of
distinct values or if larger ranges of the array values should be mapped to the same color.
If the current data set is colored by an array of vectors, the Vector section of the interface will
be displayed. The first menu button in this section determines whether the data is colored by a
single vector component or by the vector magnitude (the default). If a single component is
being used, a second menu button allows you to select which component to use for coloring
the data. If the data is colored by a single-component (scalar) array, then this section of the
user interface will not be displayed.
In the Scalar Bar section, there are several different parameters available to you. First is the
Visibility check box which toggles the visibility of the scalar bar in the display area. This
7.1 Scalar Bar 59
check box is synchronized with the Scalar bar check box on the Display tab of the current
data set’s property sheet. Below the Visibility check button are the controls for displaying the
title and labels on the scalar bar. The first entry box, labeled Title, specifies the label that
appears above the scalar bar. If the current data set is being colored by a vector array, a
second Title entry box is displayed for indicating how the color is determined from the vector.
The entry box labeled Labels contains formatting text specifying the form of the scalar bar
labels (numbers). The format specification used is the same as that used by the printf
function in C++.
Below each of the Title and Labels entry boxes is a row of text formatting buttons for
controlling how the title and labels will be drawn in the display area. The leftmost of these
buttons controls the color of the text. The next button specifies the font; the available fonts are
Ariel (the default), Courier, and Times. Next are three formatting attribute buttons controlling
whether the text is boldfaced, italicized, or shadowed. The next interface control is an entry
box / slider (available by pressing the right arrow button) combination for controlling the
text’s opacity. It ranges from 0 (transparent) to 1 (opaque). The last button in the row is for
synchronizing the text formatting of the title and labels. Pressing the one for the Title copies
the formatting of the Labels to it, and vice versa for the button in the Labels row.
The Back button returns the user to the Display tab of the data property sheet for the current
data set.
When the scalar bar is displayed in the 3D scene, it can be positioned and resized
interactively, similar to interacting with 3D widgets. (See section 6.4.) Clicking and dragging
the scalar bar with the left mouse button repositions it in the display area. If the scalar bar
begins to move beyond the left or right side of the display area, it is reoriented vertically. It is
reoriented in a horizontal direction if it is moving off-screen at the top or bottom of the
display area. The scalar bar can be resized by left-clicking and dragging any of its sides or
corners.
The user interface controls for the orientation axes are located on the Annotate tab of the 3D
View Properties property sheet (View menu, 3D View Properties). The Display orientation
axes check box toggles the visibility of the orientation axes. The Interactive check box
controls whether the orientation axes can be repositioned and resized through mouse
interaction, similar to interacting with 3D widgets. (See section 6.4.) Left-clicking and
dragging the orientation axes repositions them in the display area. When the orientation axes
are in interactive mode, a bounding rectangle (outline) is displayed around the axes when the
mouse moves over them. Left-clicking and dragging on the edges of this outline resizes the
orientation axes. From the Set Outline Color button, you can change the color used for
displaying the bounding rectangle. This is useful for making the outline more visible if its
current color is similar to the color of the background or any object behind the outline (if the
orientation axes are placed in front of a data set). The orientation axes are always drawn in
front of any data set occupying the same portion of the display area. The Set Axis Label
Color button allows you to change the color of the labels for the three axes. The reasons for
changing the color of the axis labels are similar to those for changing the outline color.
7.3 Corner Text 61
The Display corner annotation check button toggles the visibility of the corner text. The text
to be shown is entered into the Upper left, Upper right, Lower left, and Lower right text
entry areas. Newly entered corner text will only be displayed after the text entry area in which
it was entered loses focus (by either pressing “Enter” or by clicking on another part of the
interface).
The Max line height entry and slider (displayed when the right-pointing triangle beside the
entry is pressed) specifies how much vertical space a line of the corner text is allowed to
62 Annotation
consume. The value is expressed as a percentage of half the height of the display area. The
text entered will be scaled to fit in the display area without overlapping, and the text for all
four corners will be scaled uniformly, so the text is not guaranteed to consume as much
vertical space as Max line height specifies.
Several text properties can be specified for the Corner Annotation. The Color button brings
up an operating system dependent color selection dialog for changing the color of the text.
The text font can be set to Ariel, Courier, or Times from the Font menu button. Using the
Style buttons, the user can set the text to be boldfaced, italicized, or shadowed.
The Opacity entry and slider (displayed when the right-pointing triangle beside the entry is
pressed) controls the transparency of the displayed corner text. When the opacity value is 0,
the text is completely transparent, and a value of 1 means the text is opaque.
Labels for all points in the data set will be displayed, even if the point is on a side of the data
set facing away from the camera. The labels will overlap if the points are not spaced far
enough apart, so this type of annotation is most useful for small data sets. Labeling all the
points in a large data set can also be very time consuming.
7.6 XY-Plot
When probing the current data set with a line (using the Probe filter), it is helpful to see the
values of the attributes in the data set plotted along the length of the line. All of the scalar
(single-component) attributes in the data set are displayed on the plot, so this annotation is
most helpful when the data range of the scalar attributes is similar. If there is more than one
scalar attribute, the lines showing their plots will be drawn in different colors, and the
attribute name will be shown in the same color.
The Resolution entry of the line widget determines the number of points along the line at
which data values are extracted. The Show XY-Plot check box on the Parameters tab of the
property sheet for the Probe filter toggles the visibility of this annotation.
7.6 XY-Plot 65
The XY-Plot can be interactively placed and positioned in the display area, similar to
interacting with 3D widgets. Left-clicking and dragging within the XY-Plot repositions the
annotation. Clicking and dragging any of the edges or corners resizes the XY-Plot.
Animation
8.1 Creating
The interface for creating animations in ParaView is available from the Animation entry in
the View menu. It is only useful after data has been loaded or created in ParaView. The
interface is divided into three sections: Animation Control, Actions, and Save. The first two
will be discussed in this section, and the final one will be covered later in this chapter.
68 Animation
Animation Control
The row of buttons at the top of the Animation Control section behave very much like the
controls on a VCR. The first and fourth buttons move you to the beginning and end of the
animation, respectively. The second button causes the animation to play, starting from the
current position of the Frame slider. (If the Frame slider is at the last frame, clicking the Play
button will start playing the animation from the first frame.) While the animation is playing,
the Stop button is enabled. Pressing this button terminates the animation when it finishes the
current frame. The button on the far right of this row of buttons puts the animation into a
repeating state. If this toggle button is on, then when the animation is playing and reaches the
last frame, it begins again from the first frame. The animation will continue playing until
either the Stop button is pressed, or the Repeat button is turned off and the animation reaches
the last frame.
The Frame slider indicates which frame of the animation is currently being shown in the
display area. The slider moves while the animation is playing. You can also view a particular
frame of the animation by moving the slider to the appropriate value.
The Number of Frames entry box under the Frame slider determines how many frames will
be included in the animation. As this number increases, so does the length of the animation,
but the amount of change from one frame to the next will decrease.
If your animation is playing too quickly, use the Delay slider to add a pause between each
frame. The units for this slider are in milliseconds. Using the Delay slider will add the
8.1 Creating 69
specified number of milliseconds between the end of one frame and the beginning of the next.
There is no guarantee that the time from the beginning of one frame to the beginning of the
next will be the same; that depends on how long it takes to generate each frame.
Actions
The Actions portion of the user interface determines what will happen during each animation
step. An action is a combination of a source and a parameter to vary for that source. Selecting
an action from the menu at the top of this section displays the interface for that action. The
numbering of the actions indicates the order in which each action will occur per frame.
In the Source menu, each data set currently loaded in ParaView will be displayed. The names
listed are the user-selected labels for each data set.
Once you have selected a data set, the Parameter menu will be filled with the parameters for
that data set that can be animated. For some parameters, animation does not make sense, so
they are not listed in this menu (e.g., the Capping option for the Cone or Cylinder sources
because this value is either on or off; there is not a range of values to interpolate between to
produce an animation). When you have selected a parameter to animate, two entry boxes will
be displayed for specifying the starting and ending value for this parameter. (This is not the
case if Script is the selected from the Parameter menu. This option is discussed at the end of
this chapter.) Default start and end values are provided, but you can change them to suit this
particular animation. The selected parameter will vary between the start and end value based
on the type of waveform used.
Figure 60. Specifying start and end values and a waveform for a particular parameter
There are three different waveforms that determine how the value of the parameter will vary
over time: Ramp, Triangle, and Sinusoid. If a Ramp waveform is chosen (the default), the
value of the parameter will be determined by interpolating linearly from the starting value to
the ending one. For the Triangle waveform, linear interpolation is still used, but the
Parameter value will move from the Start Value to the End Value and back to the start again.
The Sinusoid waveform is more complicated than the other two. It causes the Parameter
70 Animation
value to change according to a sine function where the start and end values are the minimum
and maximum of the function. Entry boxes (with a corresponding slider or thumbwheel) are
provided for specifying the frequency and phase of the sine function.
The phase value specifies the starting point of the sine function. It ranges from 0 to 360
degrees. The frequency value is the number of waveform cycles that will occur during the
course of the animation. If you choose a phase value of 90 degrees and a frequency value of 3,
then the animation will start at the maximum value of the function and move to the lowest
value and back to the highest three times while the animation progresses from the first to the
last frame.
When you have selected appropriate start and end values and a waveform, click the Add
Action button. This will add this action to the list of actions to be performed at each time step.
If your animation will only perform one action per time step, it is not necessary to click Add
Action; it will be performed automatically.
If you have added an action to the animation and later wish to remove it, select that action
from the menu at the top of the Actions section, and click the Delete Action button. That
action will be removed from the list, and the rest of the actions will be renumbered
accordingly.
Figure 62. Save section of Animation interface with Cache Geometry selected
8.3 Saving Images 71
Once the size of the images has been selected, the animation will play from beginning to end,
saving each frame in its own image file. (The frame number will be appended to the file name
you selected, so each image will have a unique name.) Make sure that no other window is in
front of the display area while the animation images are being saved. The portion of any
window that covers the display area will be captured in the resulting images. There are tools
available to create a movie file from the images you have captured.
set for each time step. If you want to operate on the parts individually, run the Extract Parts
filter to select the appropriate part(s).
8.5 Scripting
One of the options available from the Parameter menu in the Actions section of the animation
user interface is Script. When this option is chosen, a text box is displayed for entering a
custom Tcl script that will be executed at each frame of the animation.
The scripts are written in Tcl because many portions of ParaView’s user interface are
accessible through Tcl. Scripting ParaView animations is an advanced feature, and most
parameters you would choose to animate are available through the standard user interface.
Chapter 9
Saving
Once you have created a visualization of your data in ParaView, you will likely want to save
the resulting image (of the display area) or data set. You may also want to save ParaView’s
state to a file so the current state of the application can be reproduced. Each of these options is
available in the ParaView application. You may wish to save an image of the display area for
use in a report or paper. Saving the data may be useful for creating a starting point for further
visualizations.
If the data set you wish to save is composed of multiple time steps, a dialog box will be
displayed (after you enter the file name) asking whether you wish to save all the time steps the
data contains. If you choose Yes, a data file will be saved per time step with the time step
number appended to the file name you selected. (If the data is being saved as a .pvd file, then
this will be true of the files the .pvd file references.) If you select No, only the current time
step will be saved to disk.
74 Saving
When saving data sets containing multiple parts (or blocks), only the .pvd file format will be
available.
can then re-create your visualization by loading such a file. To load a session file in
ParaView, select Load Session from the File menu, and navigate to the file you wish to load.
Alternatively, if you are running ParaView from the command line, you can pass the name of
the session file to ParaView as a command-line option as shown below. ParaView only allows
you to pass in one session file name from the command line. Using the menu option instead,
you may load several sequentially.
$ ./paraview “/path/to/session/file/mySession.pvs”
State Files
A ParaView state file stores the current state of the ParaView application, including any data
files you have loaded or filters you have applied. It stores any actions you have performed so
far during this ParaView session that contribute to your visualization results. To save a state
file, select Save Session State from the file menu.
Trace Files
A ParaView trace file is more detailed than a state file. A trace file records all actions you
have performed during the current ParaView session, even if they do not contribute to your
final visualization results (e.g., applying and later deleting a filter). To save a trace file, select
Save Session Trace from the file menu.
A default trace file is saved each time ParaView is run, and it is deleted when the application
exits properly. If ParaView crashes, the trace file is not deleted; such a trace file is useful to
ParaView developers in correcting the problem that was encountered. When you restart
ParaView after such a crash has occurred, a dialog box will appear, asking whether you wish
to delete the session file(s) that has been saved.
Figure 66. Dialog box displayed when a default trace file is found
76 Saving
If there is more than one existing trace file called ParaView*.pvs, if you click the Delete
button, a second dialog box will appear asking whether to delete all the existing trace files.
Figure 67. Dialog box displayed when more than one trace file is found
Chapter 10
Batch Processing
In addition to saving images, geometry, or session files, you may also wish to create a batch
script to reproduce the results of your current visualization without launching the ParaView
user interface. The allows your to re-create the results without user intervention once
ParaView has been started in batch mode. This could be especially useful if you create the
visualization in ParaView using a subset or low-resolution version of your data set. After
storing a batch script, you can replace the data file name in the script with the file name of the
full-resolution version of your data. You can run ParaView in batch mode to obtain the results
from the complete data set.
Offscreen: Selecting the Offscreen option causes the rendering done by this batch script to
be performed offscreen. This is especially helpful if someone will be using the computer
while the batch script is running because it avoids the problem of another window blocking
the batch script’s render window. If you are saving images (see below) and not rendering
offscreen, the portion of any window that is blocking the render window will be captured in
the saved images.
Save Images: If the results of the batch script are to be stored to one or more images, the
Save Images check button should be marked. The entry box and Browse button below this
check box allow you to select the file name and location of the image(s) to be stored. (The
Browse button causes a file browser to be displayed.) If more than one image file is to be
saved, the image number will be inserted before the image file extension (e.g.,
testBatch00000.jpg and testBatch00001.jpg for storing two frames of an
animation).
Accept / Cancel: To store the batch script to a file, click the Accept button. If you do not
wish to save the batch script at this time, click the Cancel button.
Additionally, there is a pvbatch executable for running ParaView batch scripts. This
executable is smaller than the one for ParaView because it does not contain any of the
ParaView user interface code.
paraview –-batch=“/Path/to/Batch/Script/batchScript.pvb”
OR
paraview “/Path/to/Batch/Script/batchScript.pvb”
OR
pvbatch “/Path/to/Batch/Script/batchScript.pvb”
If your version of ParaView (or pvbatch) has been compiled with MPI support, you can run
batch scripts in parallel (stand-alone, multi-process mode). See your system administrator for
information about starting an MPI application on your system; the exact instructions for doing
so are implementation and system specific.
Because batch scripts in ParaView are just Tcl scripts with access to the Tcl-wrapped
elements of ParaView, advanced users may wish to edit batch scripts more extensively. Any
VTK object that can be created in ParaView can also be created in a batch script. For more
information about VTK, see The Visualization Toolkit User’s Guide by Kitware, Inc.
One advanced use of batch scripting is to create more elaborate animations than can be
constructed using ParaView’s animation editor. The batch script shown below simply creates
an image of a cone. Following that script is a code segment for iteratively changing the
camera position and creating new images from these new viewpoints.
#Initialization
vtkSMObject foo
set proxyManager [foo GetProxyManager]
foo Delete
vtkSMProperty foo
foo SetCheckDomains 0
foo Delete
set saveState 0
for {set i 1} {$i < [expr $argc - 1]} {incr i} {
if {[lindex $argv $i] == "-XML"} {
set saveState 1
set stateName [lindex $argv [expr $i + 1]]
}
}
if { $saveState } {
$proxyManager SaveState $stateName
} else {
$Ren1 UpdateVTKObjects
$Ren1 WriteImage {C:/Temp/cone.jpg} vtkJPEGWriter
}
$proxyManager UnRegisterProxies
The portion of this script that should be changed to animate the camera position is at the end
of the script – the part where the images are written. A for loop should be added; inside it
reposition the camera, and write an additional image file as shown below.
82 Batch Processing
if { $saveState } {
$proxyManager SaveState $stateName
} else {
for {set i 0} {$i < 5} {incr i} {
[$Ren1 GetProperty CameraPosition] SetElements3 \
[expr -2+$i] 0 3.41865
$Ren1 UpdateVTKObjects
$Ren1 WriteImage "C:/Temp/cone$i.jpg" vtkJPEGWriter
}
}
Chapter 11
Parallel processing for large data has been around for a long time and occurs in many
varieties. The earliest example is the use of vector processors for executing the same
operation on every element of an array. A more flexible approach allows multiple processes to
execute separate programs and communicate and synchronize results. Shared memory
supercomputers allow multiple processes to read and write to a common shared memory
space, but shared memory computers do not scale well above more than about 100 processors.
Because they scale well, distributed clusters are needed to attack the largest simulation
problems. These techniques can be used in different combinations to achieve desired
performance goals.
In the past, programs were created for specific super-computer architectures. Programmers
had to use specific features of the targeted platform in order to exploit the parallel architecture
for the desired performance improvement. In May 1994, the first version of MPI (message
passing interface) was completed, greatly simplifying programming parallel applications. This
abstraction for starting processes and communicating between them allows developers to
create cross-platform programs that can run on many supercomputing architectures.
and communication between processes is introduced as required. In the diagram below, three
processes are performing different tasks on different data sets. In time step 4, all the results
are passed to process 2 for rendering.
Timesteps
1 2 3 4 5
Isosurface
1 Read file 1 Cut Plane 1
1
Processes
Streamlines
2 Read file 2 Render
2
Triangulate
3 Read file 3 Decimate 3 Glyph 3
3
Figure 69. Task parallelism, passing results to one process for rendering
Pipeline parallelism is a more specific category. It is useful when processes have access to
separate resources, or when an operation requires many steps. The processing steps are
divided among multiple processes. In a simple isosurface example, one process might read the
data, a second process might generate an isosurface of the data, and a third process might
render the isosurface. Parallelism occurs when there are multiple data sets or time steps to
process. The processes execute the time steps of the data in rounds. This technique has an
advantage when resources (e.g., the file system or rendering hardware) are limited. Only one
process needs access to a file system and one process needs access to accelerated rendering.
The disadvantages of this technique are that the parallelism is specific to the decomposed
task, it does not scale well, and it can be difficult to balance the load on the processes.
Timesteps
1 2 3 4 5
In the above diagram, the data contained in three files needs to be read, isosurfaced, and
rendered. The arrows indicate that the data is passed from one process to another. Assume that
each of the tasks can be completed in the same amount of time (one time step). In the first
time step, only process 1 is doing useful work (i.e., reading the first file). In the second time
step, the first two processes are busy – process 1 is reading file 2, and process 2 is
isosurfacing the data read by process 1 in step 1. By step 3, all three processes are busy. If
reading, isosurfacing, and rendering of the data in these three files had to be done serially,
nine time steps would have been required, but by using pipeline parallelism, only 5 time steps
were necessary. The more files to be processed, the more beneficial this type of parallelism
becomes.
Data parallelism, the third type of parallelism, is also a very structured approach. A data set is
partitioned between processes, and all processes execute similar operations on the data. This
technique scales well as long as the data and operations can be partitioned. Of the three
categories, data parallelism has the least dependence on the specific problem, and is therefore
the best choice for a general purpose application like ParaView. ParaView creates an identical
visualization pipeline on each process of the data server, and each process operates on a
separate partition of the data.
Timesteps
1 2 3
Read Isosurface Render
1
partition 1 partition 1 partition 1
Processes
In the above example of data parallelism, each process first reads its partition of the data set.
Then each process creates an isosurface at the desired value. Finally each process renders its
results. Once all the results are rendered on their individual processes, these images may be
composited to form a final image. In pipeline parallelism, the tasks of reading, isosurfacing,
and rendering took five time steps. Using data parallelism and assuming that each task can be
completed on each process in the same amount of time, performing the same tasks takes only
three time steps.
86 Introduction to Parallel Computing and Visualization
Figure 72. Resulting images when using ghost levels (left) or not (right)
In the above images, the Loop Subdivision filter was applied to a model of a Kline bottle. In
the image on the left, ghost levels were used, producing the same results as expected when
running this filter on a single process. In the image on the right, no ghost levels were used,
and incorrect seams and artifacts are visible.
When ghost levels are added to a data set, an additional outer layer of cells are added to the
piece of the data set residing on each process. The ghost cells for a particular piece of the data
set already reside on the processes containing adjoining pieces, so the boundary cells are
duplicated. This is necessary for algorithms that require neighborhood information about a
cell to perform the computation for that cell. Another algorithm (besides the Loop
Subdivision algorithm, shown above) that requires ghost levels is the Normals Generation
filter. This filter computes a normal vector at each point in an input data set. To correctly
compute the normal at a point, it needs the face normals of each polygon surrounding that
point. The Feature Edges filter also benefits from the use of ghost levels. This filter extracts
various types of edges from a data set, and without ghost levels it would incorrectly extract
11.3 Gathering Results 87
piece boundary edges as data set boundary edges regardless of whether the piece boundaries
were actually data set boundaries.
The parallelism used in ParaView is configurable so that it can be optimized for any specific
problem. This is especially true for parallel rendering in ParaView.
Chapter 12
Parallel ParaView
The data server is primarily constructed from VTK readers and filters. It is responsible for
reading and processing data sets to create final geometric models needed for rendering. VTK
partitioning, ghost levels, and synchronous parallel filters are responsible for handling data
parallelism on the data server. Each data server process has an identical VTK pipeline, and
each process is told which partition of the data it should load.
The render server is responsible for rendering the final geometry. Like the data server, the
render server can run in parallel and creates identical visualization pipelines (only the
rendering portion of the pipeline) on all of its processes. Having the ability to run the render
server separately from the data server allows the optimal division of labor between computing
platforms. Most large computing clusters are primarily used for batch simulations, and do not
have hardware rendering resources. Since it is not desirable to move large data files to a
separate visualization system, the data server can run on the same cluster that ran the original
simulation. The render server can be run on a separate visualization cluster that has hardware
rendering resources.
It is possible to run the render server with fewer processes than the data server, but never
more. Visualization clusters typically have fewer nodes than batch simulation clusters, and
90 Parallel ParaView
processed geometry is usually significantly smaller than the original simulation dump.
ParaView repartitions the geometric models on the data server before they are sent to the
render server.
The client is a single-process program that connects to and communicates with both servers
via the server manager. Since it is useful to control the ParaView visualization system from a
desktop workstation, the client can be run on a separate machine from the servers. ParaView
has the option of using parallel rendering on the render server or rendering directly on the
client workstation. ParaView automatically chooses a rendering strategy to achieve the best
rendering performance. Smaller models are rendered on the client, and distributed rendering is
used for larger models.
ParaView can be run in many different configurations. In the simplest case the client, data
server, and render server all run on the same process. In the most extreme case they are run as
three separate programs: the client as a single-process program, the data server and render
server as MPI multi-process programs. MPI is used to send messages between processes on a
server, and socket connections are used to send messages between separate servers and
between the servers and the client.
./paraview
The other configurations for running ParaView will be discussed in the remaining sections of
this chapter.
It is also possible to have the server connect to the client using the command-line argument
--reverse-connection (or –rc). This is useful when the server is behind a firewall,
making it difficult for the client to connect to the server.
Client
RS 0 DS 0
RS 1 DS 1
RS N DS N
DS M
The main reason for reversing the direction of any of the initial connections is that from
behind a firewall a machine is able to initiate a connection to a machine outside the firewall,
but not vice versa. If the data server was behind a firewall, the servers should initiate the
connection with the client, and the data server nodes should connect to the render server
nodes. If the render server is behind a firewall, still the servers should connect to the client,
but now the render server nodes should initiate the connections with the nodes of the data
server.
In the remaining diagrams in this section, each arrow indicates the direction in which the
connection was initially established. Double-ended arrows indicate bi-directional connections
that have already been established. In the example command lines, optional arguments are
enclosed in []’s. The rest of this section will be devoted to discussing the two connections
required for running ParaView in render server mode.
Client
RS 0 DS 0
./pvserver [--port=data_server_port]
This is similar to running ParaView in client server mode, but with the addition of a render
server. The command lines for starting the client and the servers in this manner are shown
below. On the command line for the client, you will typically want to specify the host (node 0
of the data server) and the render server host (node 0 of the render server) because the default
for both of these is localhost. Either of these can be specified as a machine name or as an
IP address. You can also specify which ports to use in connecting the client to the render
server and the data server, but unless you must specify a specific port to open on a firewall, it
is best to use the default port numbers. The data server port (for the connection between the
client and the data server) is specified on the command line for the data server and the client
using the --port option. (The default is 11111.) The port specified on both the client and
data server command lines must match, so if you use this option, specify the port on both
command lines. To set up a similar connection for the render server, use the --render-
port command-line option when starting the client and the render server. (This defaults to
22221.) The port specified on both the client and the render server command lines must also
match, so if this option is used it must be specified both on the render server and client
command lines. In the rest of the examples in this section, the --port and --render-
port options will be omitted because they do not usually need to be specified.
In the above command lines, abbreviations can be used for certain command-line arguments.
These abbreviations will be used in the rest of the example command lines in this section.
(Some of the abbreviations listed here will be introduced later in this chapter. There are no
abbreviations for --port, --render-port, and --render-node-port.)
• --render-server -rs
• --client-render-server -crs
• --host -h
• --render-server-host -rsh
94 Parallel ParaView
• –-reverse-connection -rc
• –-machines -m
• –-connect-data-to-render -d2r
• –-connect-render-to-data -r2d
The connection between the client and the servers can also be initiated by the servers. In this
case, the client must be started before both servers (similar to reversing the connection in
client-server mode). The diagram indicating the initial connections is shown below.
Client
RS 0 DS 0
Figure 76. Reverse the connections between the servers and the client.
To do this, you must add --reverse-connection (or -rc) to the command lines for the
data server, render server, and client. Also --host (or -h) should appear on the data server
command line, --render-server-host (or -rsh) should appear on the render-server
command line; the value of both of these command-line arguments should be either the
machine name or IP address of the client.
In the rest of this section, when the connection between the client and the servers is to be
reversed, -rc will be used instead of --reverse-connection.
In the default case, each node of the data server connects to a corresponding node of the
render server, as shown in the diagram below. The information that the data server needs per
node of the render server is a machine name and a port number. The machine names are
12.4 Render Server 95
contained in a machine file that is passed to the render server on the command line using the
--machines (or -m) option. The format of this file is described in appendix C. By default,
the port number per machine is randomly generated. If you instead wish to specify a single
port number to use in connecting to each node of the render server, use the --render-
node-port argument on the render server command line. ParaView does not allow you to
specify a different port per machine.
Client
Machine file RS 0 DS 0
RS 1 DS 1
RS N DS N
DS M
./pvserver
Figure 77. Initialize the connection from the data server to the render server.
If you wish to explicitly indicate that the data server will be connecting to the render server,
add the --connect-data-to-render (or -d2r) option to the client command line.
However, since this is the default behavior, using this command-line argument is not
necessary. The command lines shown below indicate a standard connection between the client
and the servers. The nodes of the data server will connect to the nodes of the render server, so
the machine file is specified on the render server command line. We also demonstrate
indicating a specific port number for making the connections between the data- and render-
server nodes using the --render-node-port command-line option on the render-server
command line. Unlike --port and --render-port, this port number only needs to be
specified on a single command line.
96 Parallel ParaView
The direction of the initial connection between the nodes of the two servers may also be
reversed (i.e., the render server nodes connect to those of the data server). Typically when this
connection is reversed, the direction of the connection between the client and the servers is
also reversed (e.g., if the render server is behind a firewall). This means that the render server
will retrieve the machine names and ports from the data server via the client. This information
will then be used to establish a connection from the nodes of the render server to the first N
nodes of the data server. The machine file should list the machine names of the first N nodes
of the data server, and the --machines argument should be added to the data server
command line. Also if you wish to specify a single port number to use in connecting to each
of the data server nodes, use the --render-node-port option on the data server
command line. Regardless of the direction of the initial connection between the two servers,
the machine file and the render node port belong on the command line for the waiting server
(i.e., the server not initiating the connection).
Client
RS 0 DS 0 Machine file
RS 1 DS 1
RS N DS N
DS M
Figure 78. Reverse the connection between the servers and client, and connect the
render server to the data server.
The command-line option for changing the direction of the connection between the servers is
--connect-render-to-data (or -r2d); it is specified on the client command line. In
12.5 Parallel Rendering / Compositing 97
the command lines shown above, the direction of connection is reversed both between the
client and the servers and between the nodes of the data and render servers.
./pvserver
Tiled displays may be used similarly in client/data server/render server mode, as shown
below.
./pvserver
./pvserver -rs
In client/server tiled display mode, there must be at least as many server nodes as tiles. If the
number of nodes is greater than the number of tiles, then image compositing (of the final
image per node) will occur to reduce the number of images down to the number of display
tiles. Similarly, in client/data server/render server tiled display mode, the number of render
98 Parallel ParaView
server nodes cannot be smaller than the number of tiles. If there are more render server nodes
than tiles, compositing will be used as it was in client/server tiled display mode.
composite
composite
N0 N2
T0 T1
N1 N3
T2 T3
N4 N5
In the above diagram, there are six server nodes (N0 - N5) and only four tiles (T0 - T3)
composing the tiled display. The images from N0 and N1 are composited to form the image
for T0; the images from N2 and N3 are composited to form the image for T1. The image from
N4 is displayed directly on T2, and the image from T5 is shown on T3.
Chapter 13
Tutorials
The tutorials in this chapter are designed to introduce you to various concepts and features of
ParaView. The first tutorial is intended to introduce you to ParaView’s interface and some
basic operations of the application. The remaining tutorials provide examples of using
ParaView to perform real-world visualization tasks. Each successive tutorial is more complex
than the one before it; some of the concepts build on each other. These tutorials are not
intended to cover all aspects of the ParaView application but to demonstrate some of
ParaView’s capabilities and give you a starting point for performing your own visualization
tasks.
Accept button; this will pass the parameter values from the user interface to the sphere data
set and cause a polygonal approximation of a sphere to be drawn in the display area. Notice
also that Sphere1, the Label of this sphere data set is displayed in the Selection Window. It
is highlighted in yellow, indicating that it is the current data set, and the dark eye icon shows
that the sphere is visible.
Notice that Outline0 has been added to the Selection Window. It has become the current data
set, so it is now highlighted in yellow instead of Sphere1. Both Outline0 and Sphere1 have
dark eye icons beside them, showing that both data sets are visible. In many cases, when a
filter has been created in ParaView, the visibility of its input data set is turned off. In the case
of the Outline filter, the user probably wants to see both the input data set and its bounding
box, so the input’s visibility is not changed.
Because there are no attribute arrays (scalars, vectors, etc.) associated with an outline, its
Color by menu is set to Property. (Coloring by Property is still an option if attribute arrays
are present.) When a data set is colored by Property, the Actor Color button is enabled for
selecting a solid color for the entire data set. Clicking on it displays an operating system
dependent dialog box for selecting a new color. Try selecting a new color for the bounding
box.
13.1 A Simple Example 103
By applying both the Outline filter and the Shrink filter to the sphere, you have created a
branching visualization pipeline in ParaView. This is more readily visible from the
Navigation Window. Click the second button at the top of the Selection Window to display
the Navigation Window instead as shown in the image below.
104 Tutorials
The Navigation Window connects the names of data sets with arrows to indicate that one data
set is the input to a filter producing another data set. The name of the current data set is drawn
in the middle of the Navigation Window. In our example, this data set is Shrink0. Click on
Sphere1 to make it the current data set. Notice that there are two arrows coming from
Sphere1: one pointing to Outline0 and another pointing to Shrink0. This indicates that
Sphere1 is the input to both of these filters.
Select Shrink0 again, making it the current data set. To change how the output of Shrink0 is
colored, click on the Display tab and select Point Normals (3) from the Color by menu in the
Color section. The coloring of the sphere will be determined by a point-centered array called
“Normals”. The (3) indicates that this attribute is a three-component vector. When coloring is
based on a vector array, by default the color is determined by the vector’s magnitude. To
instead color by the first component of the vector, first click the Edit Color Map… button.
The interface shown below will be displayed.
Select Component from the menu button in the Vector section of the interface. When
coloring a data set by a vector component, the default is the X-component, as shown in the
second menu button in the Vector section. Press the Reset Range button in the Color Map
section to calculate the range of values in the first component of this vector array and update
the color map appropriately. Press the Back button at the bottom of the interface to return to
Shrink0’s Display tab.
13.2 Streamlines
Step 1: Start ParaView
Launch the ParaView application as described in section 1.3. The process of starting the
application varies across platforms, so see the subsection associated with your particular
platform. This tutorial assumes that you have not loaded any data before starting the tutorial;
if this is not the case, the labels for the data sets may not match those shown.
To load a data file into ParaView, select Open Data from the File menu. In the dialog box that
appears, navigate to the bluntfin.vts file and click Open. ParaView will read enough of the
data file to display some basic information about it. The left panel should look similar to the
one shown below.
For data file types where the user may want to modify parameters before reading the entire
data set, the Parameters tab is shown with a green Accept button as it would be for other
sources and filters. For the simpler file formats for which there are no parameters to modify,
ParaView loads the data set without Accept being pressed. For VTK XML readers, such as
the one used for loading bluntfin.vts, ParaView allows the user to select which point- and cell-
centered data set attributes to load. Our data file contains three point-centered attributes:
Density (a scalar array), Momentum (a vector array), and StagnationEnergy (another scalar
array). For this tutorial, we only need the Momentum attribute, so deselect the Density and
StagnationEnergy check boxes. Click Accept. The image in the display area should be
similar to the one below.
To color this subgrid by the magnitude of each Momentum vector, first click on the Display
tab of ExtractGrid0. From the Color by menu, select Point Momentum (3). As described in
the previous tutorial, Point indicates that Momentum is a point-centered array, and (3) shows
that it is a three-component vector array. After making this change and interacting with the
3D scene (as described in the previous tutorial), the display area should look similar to the
image below.
108 Tutorials
Before extracting a second subgrid, make bluntfin.vts the current data set either by clicking
on it in the Selection Window or by choosing it from the Select menu. We will create the
second subgrid using the same filter as for the first one: Extract Grid. This time set both the
minimum and maximum values of J to be 0 using the Min. and Max. sliders or entry boxes.
The resulting image should look similar to the one below.
interactively positioning the seed points. 3D widgets are discussed in more detail in section
6.4.
First we will create streamlines using a line to position the seed points. Select Line from the
menu in the upper left corner of the Seed section. Using the line 3D widget and / or the Point
1 and Point 2 entry boxes, position the endpoints of the line at (-3.59, 0.33, 2.86) and (-3.59,
5.48, 2.86). To change the endpoints using the 3D line widget, left-click and drag the spheres
drawn at each end of the line. Also change the Integration Direction to FORWARD. Click the
Accept button. The resulting streamlines are shown below. The camera has been repositioned
in the 3D scene as discussed in the previous tutorial to provide a better view of the
streamlines.
110 Tutorials
Now we will create some more interesting streamlines using a cloud of points to seed the
streamlines. Select Point Cloud from the menu in the Seed section. The 3D widget for
positioning the center of the point cloud is a point widget. To position the point, click and
drag any of the three axes composing the widget. The center of the point cloud should be
positioned at (-0.54, 0.28, 0.55). Also set the Radius value to 0.3 and the Number of Points
to 10 using the appropriate entry boxes. These two values cannot be set using the 3D widget.
Click the Accept button to generate the new streamlines. The streamlines previously
generated from points along a line will be removed.
platform. This tutorial assumes that you have not loaded any data before starting the tutorial;
if this is not the case, the labels for the data sets may not match those shown.
We do not need to modify any of the parameters of the PLOT3D reader, so click the Accept
button. Change the label of this data set to Combustor Data by typing the name in the Label
entry box and pressing Enter. This new label will be displayed in the Selection / Navigation
Window and in the Select menu. By changing the data set’s label to something more
meaningful, it is easier to locate a particular data set in the user interface.
We will now load the Q File containing the data set attributes for this data set. Click on the
Browse button beside the Q File entry box, and browse to the comb.q file. (This file is
located in the same directory as the comb.xyz file.) Select the file, and click Open in the file
selection dialog. Click Accept again to load the attributes.
The Scalars menu allows you to select which point-centered attribute to use in creating an
isosurface. All single-component arrays for this data set will be listed. For this data set, the
available attributes are Density and StagnationEnergy. We will use the Density attribute and
create a contour at 0.3. To add a contour value of 0.3, select this value from the New Value
slider in the Add Value section of the interface, and press the Add button. You will see that
the value 0.3 is now listed in the Contour Values list box. For this tutorial, make sure that the
Compute Scalars option is on. This will cause the contour filter to create a new attribute
array containing the value of the contour at each point. Click the Accept button. The results
of performing this operation are shown below.
114 Tutorials
Change the label for this data set to Animated Contour. (If you need help, instructions for
doing this are listed in Step 2.)
Change the attribute used to color this data set to Point Momentum (3) by selecting this value
from the Color by menu on the Display tab for this data set. The data set will be colored by
the magnitude of this vector at each point in the data set. You can also turn off the visibility of
the plane widget by deselecting the Visibility check box in the Clip Function portion of the
Parameters tab.
Notice the controls at the top of the Animation Control section. They are very similar to the
controls on a VCR. The leftmost button moves you to the very beginning of the animation.
The next button causes the animation to play, one time step at a time. Beside the Play button
is the Stop button. This will stop the animation at the current frame. This button is disabled
unless the animation is currently playing. The button after the stop button moves you to the
end of the animation. The final button in this row puts the animation in a repeating mode;
when the animation finishes playing to the end, it will start over again from the beginning. To
see the animation you have created, press the Play button.
Did the animation seem a little slow to you? Press the Play button again, and you should
notice a significant speedup. This happened because the Cache Geometry button (at the
bottom of the Save portion of the interface) was checked. This means that the first time a
116 Tutorials
particular animation is run, the resulting geometry is stored in memory as each time step is
computed. The next time the animation is run, the geometry can be retrieved from memory
instead of recalculating it at each frame. This can cause problems if your data set is too large
to keep several copies of it in memory at one time, but this example data set is small enough
to use this feature.
Now Animated Contour is the current data set and is at the end of the pipeline. We will not
need this filter for the remainder of this tutorial either, so delete it from the visualization
pipeline like you did for the Clipped Contour. Now Combustor Data is the current data set,
and we are ready to continue with this tutorial.
portion of the user interface, and choose Cut Values from the Parameter menu. The Start
value should be -5.0, and the End value should be 5.0. Play through the animation twice to
see the speedup from using the Cache Geometry option. Depending of the speed of the
computer you are running ParaView on, the animation may have moved too quickly when the
geometry was being loaded from memory. To make the animation move at a more reasonable
speed, we will add a 100 ms pause between each frame. To do this, move the Delay slider (in
the Animation Control section of the interface) to 100. Now press the Play button again, and
notice that the animation moves more slowly now.
This data set was created using CEI’s EnSight application. This is another file format for
which ParaView allows user input before loading the entire data set. EnSight files may
contain multiple time steps. If a particular data set uses this feature, when it is loaded into
ParaView, the Select time value portion of the interface is available to determine which time
step to load. For this tutorial, we want to view the data at time value 3.0, so click
3.00000e+000 in the Select time value box. The rest of the parameters are appropriate for
this tutorial, so click the Accept button.
To make the contours in this block more visible, we will apply a tube filter to them. Select
Tube from the Filter menu. Set the Num. sides value to 12 and the Radius to 0.025; the
defaults are appropriate for the other parameters. Press the Accept button.
block, and then press and hold the Ctrl button while clicking the entries for the other blocks.
Click Accept. You will notice that the other contour lines are now visible.
Sources
2D Glyph
The 2D Glyph source is used for generating a family of 2D glyphs, each of which lies in the
x-y plane. There are two parameters for 2D Glyphs.
• Glyph type: The types of 2D glyphs that can be created are Vertex, Dash, Cross,
Thick Cross, Triangle, Square, Circle, Diamond, Arrow, and Thick Arrow. The
default is Arrow.
• Filled: If the glyph is filled, it is drawn as a solid polygon; otherwise it is drawn with
only lines. By default Filled is off.
3D Text
The 3D Text source displays a text string as polygonal text. There is only one parameter for
3D Text.
• Text: Specify the text string to be displayed. The ASCII alphanumeric characters a-z,
A-Z, and 0-9 are supported; so are ASCII punctuation marks. The only supported
control character is "\n", which inserts a new line in the text string. The default value
is "3D Text".
124 Sources
Arrow
The Arrow source appends a cylinder to a cone to form a 3D arrow. The parameters for the
Arrow source are as follows.
• Tip resolution: Set the number of faces in the representation of the tip of the arrow
(the cone). As the resolution increases, the cone will become smoother. The default
value is 6.
• Tip radius: Specify the radius of the tip of the arrow (the cone). The length of the
whole arrow is 1.0 unit. The default value is 0.1 units.
• Tip length: Specify the length of the tip. The value ranges between 0.0 units and 1.0
unit (the length of the whole arrow). The default is 0.35 units.
• Shaft resolution: Set the number of faces of the shaft of the arrow (the cylinder). As
the resolution increases, the cylinder will become smoother. The default value is 6.
• Shaft radius: Specify the radius of the shaft of the arrow (the cylinder). The length
of the whole arrow is 1.0 unit. The default value is 0.03 unit.
The output of the Arrow source is polygonal data. This polygonal data will not contain
normals, so rendering of the arrow will be performed using flat shading. The appearance of
the arrow can be improved without significantly increasing the resolution of the tip and shaft
by generating normals (Normals generation filter).
Axes
The Axes source can be used to add a representation of the coordinate system axes to the 3D
scene. The X axis will be drawn as a blue line, the Y axis as a green line, and the Z axis as a
red line. The axes can be drawn either as three lines drawn in the positive direction from the
origin or as three lines crossing at the origin (drawn in both the positive and negative
directions). The Axes source has the following parameters.
• Scale: By default the axes lines have a length of 1 (or 1 in each direction, for a total
length of 2, if the Symmetric option is selected). This value can be changed to make
the axes larger or smaller.
• Origin: These entry boxes can be used to change the origin of the axes. The default
origin of the axes is at (0, 0, 0).
125
• Symmetric: When the Symmetric option is selected, the axes extend along both the
positive and negative directions for a distance equal to the scale value. When
unchecked (the default) the axes extend only in the positive direction.
The output of the Axes source is polygonal data. This polygonal data has a scalar per line so
that the lines can be colored. It also has normals defined.
Box
The Box source can be used to add a box to the 3D scene. The Box source has the following
parameters.
• X Length: This value specifies the length of the box along the X axis. By default the
X length of the box is 1.
• Y Length: This value specifies the length of the box along the Y axis. By default the
Y length of the box is 1.
• Z Length: This value specifies the length of the box along the Z axis. By default the
Z length of the box is 1.
• Center: These three values represent the coordinate at the center of the box. By
default the box is centered at (0, 0, 0).
The output of the Box source is polygonal data containing both normals and texture
coordinates.
Cone
The Cone source can be used to add a polygonal cone to the 3D scene. The Cone source has
the following parameters.
• Resolution: This value indicates the number of divisions around the cone. The
higher this number, the closer the polygonal approximation will come to representing
a cone, and the more polygons it will contain. The default resolution is 6.
• Radius: This is the radius of the cone. The default value is 0.5.
• Height: This is the height of the cone. The default value is 1.0.
• Capping: This check box indicates whether the cone is capped (i.e., there is a
polygon closing off the wide end of the cone) or open. By default the cone is capped.
Cylinder
The Cylinder source can be used to add a polygonal cylinder to the 3D scene. The following
parameters can be set for the Cylinder source.
• Resolution: This value indicates the number of divisions around the cylinder. The
higher this number, the closer the polygonal approximation will come to representing
a cylinder, and the more polygons it will contain. The default resolution is 6.
• Height: This is the height of the cylinder. The default value is 1.0.
• Radius: This is the radius of the cylinder. The default value is 0.5.
• Center: These three values represent the coordinate value at the center of the
cylinder. By default, the cylinder is centered at (0, 0, 0).
• Capping: This check box indicates whether the cylinder is capped (i.e., each end of
the cylinder is closed off by a polygon) or open. By default the cylinder is capped.
The output of the Cylinder source is polygonal data containing both normals and texture
coordinates.
Line
The Line source can be used to interactively (using a 3D widget) or manually (using the
entries on the user interface) add a line to the 3D scene. The Line source has the following
parameters.
• Point 1: These three values indicate the coordinates of one of the two end points of
the line. Moving one of the end points of the 3D widget will change these values.
The default coordinates of Point 1 are (-0.5, 0, 0).
• Point 2: These three values indicate the coordinates of the other of the two end
points of the line. Moving the other end point of the 3D widget will change these
values. The default coordinates of Point 2 are (0.5, 0, 0).
• Resolution: This value represents the number of line segments in the output line. By
default this value is 1. As opposed to some other sources (e.g., the sphere, cone, and
cylinder), increasing the resolution does not increase the accuracy of the line; it
simply increases the number of colinear line segments defining the line. This can
sometimes be useful when using the output as input to a filter.
There is also a Visibility check box in the Line Widget area of the parameters. This check box
toggles the visibility of the 3D line widget.
127
Mandelbrot
The Mandelbrot source can be used to add a uniform rectilinear grid with scalar values
derived from the Mandelbrot set to the 3D scene. The equation used is z = z2 + C (where z
and C are complex). The scalar values in the grid are the number of iterations of the equation
it takes for the magnitude of the value to become greater than 2. In the equation, the initial
value of z is 0. By default, the real component of C is mapped onto the X axis; the imaginary
component of C is mapped onto the Y axis; and the imaginary component of the initial value
is mapped onto the Z axis. If a two-dimensional extent is specified, the resulting image will be
displayed. If a three-dimensional extent is used, then the bounding box of the volume will be
displayed. The following parameters of the Mandelbrot source can be controlled.
• Extent: These six values indicate the X, Y, and Z extent of the output data. The first
two numbers are the minimum and maximum X extent; the next two are the
minimum and maximum Y extent; and the final two are the minimum and maximum
Z extent. The numbers are inclusive, so the default values of 0, 250, 0, 250, 0, 0
indicate that the dimensions of the output will be 251 x 251 x 1.
• Sub-space: These three values allow you to set the projection from the 4D space to
the axes of the 3D volume. By default, the real component of C (represented by 0) is
mapped to the X axis; the imaginary component of C (represented by 1) is mapped to
the Y axis; and the real component of X, the initial value (represented by 2) is
mapped to the Z axis. The imaginary component of X is represented by 3. All values
entered must be between 0 and 3, inclusive.
• Origin: These four values indicate the components of C (real and imaginary) and the
components of the initial value, X (real and imaginary). The first two numbers
represent the real and imaginary components of C, and the last two indicate the real
and imaginary components of X. The default values are -1.75, -1.25, 0, and 0.
• Size: These four values indicate the length of the output in each of the four
dimensions. (The three dimensions specified in the Sub-space will determine which
of these values specify the length of the axes in the output.) The default values are
2.5, 2.5, 2, and 1.5
• Max. iterations: This number indicates the maximum number of iteration to perform
in order to determine if the value will go above 2. The default value is 100.
Maze
The Maze source can be used to display a 2D maze in the 3D scene. The following parameters
can be specified.
• X Size: Specify the size of the maze in the X dimension. The default value is 20.
• Y Size: Specify the size of the maze in the Y dimension. The default value is 20.
• Run Factor: This value, which must be at least 2, determines the length of each run
(straight segment) of the maze. The default value is 20.
• Magnet Factor: This value, which must greater than 0, determines how the path
through the maze turns. With a value of 1, all directions have an equal probability of
being chosen. Larger values tend to choose paths that lie next to existing paths,
creating longer runs and more interesting mazes. The default value is 4.
• Random Seed: This value is used in determining the final maze. The default value is
111.
• Show Solution: This check box toggles the visibility of the maze'
s solution. By
default it is off.
Plane
The Plane source can be used to add a polygonal parallelogram to the 3D scene. Unlike the
sphere, cone, and cylinder sources, the parallelogram is exactly represented at the lowest
resolution, but higher resolutions may be desired if this plane is to be used as an input to a
filter. The Plane source has the following parameters.
• Origin: The origin is the location of one of the corners of the parallelogram. By
default this coordinate is (-0.5, -0.5, 0).
• First point: This coordinate represents the location of a second corner of the
parallelogram. One edge of the parallelogram will be the line connecting the origin
with this first point. This will be considered the X axis of the parallelogram. The
default coordinate of the First point is (0.5, -0.5, 0).
• Second point: This coordinate represents the location of a third corner of the
parallelogram. One edge of the parallelogram will be the line connecting the origin
with this second point. This will be considered the Y axis of the parallelogram. The
default coordinate of the Second point is (-0.5, 0.5, 0).
129
• X resolution: This is the number of divisions along the X axis of the parallelogram.
By default this value is 1.
• Y resolution: This is the number of divisions along the Y axis of the parallelogram.
By default this value is 1.
Sphere
The Sphere source can be used to add a polygonal sphere to the 3D scene. The following
parameters are available for the Sphere source.
• Center: This coordinate represents the center of the sphere. By default this value is
(0, 0, 0).
• Radius: This is the radius of the sphere. The default value is 0.5.
• Theta Resolution: This number represents the number of divisions between Start
Theta and End Theta around the sphere. The theta divisions are similar to longitude
lines on the earth. The higher the resolution, the closer the approximation will come
to a sphere, and the more polygons there will be. The default Theta Resolution is 8.
• Start Theta: To form a complete sphere, the Start Theta value should be 0 degrees,
and the End Theta value should be 360 degrees. The Start Theta value can be
adjusted to form only a portion of a sphere. The default value is 0 degrees.
• End Theta: The End Theta value can be adjusted to form only a portion of a sphere.
The default End Theta value is 360 degrees.
• Phi Resolution: This number represents the number of divisions between Start Phi
and End Phi on the sphere. The phi divisions are similar to latitude lines on the
earth. The default Phi Resolution value is 8.
• Start Phi: To form a complete sphere, the Start Phi value should be 0 degrees, and
the End Phi value should be 180 degrees. The Start Phi value can be adjusted to
form only a portion of a sphere. The default value is 0 degrees.
• End Phi: The End Phi value can be adjusted to form only a portion of a sphere. The
default End Phi value is 180 degrees.
The output of the Sphere source is polygonal data with point normals defined.
130 Sources
Superquadric
The Superquadric source can be used to add a polygonal superquadric to the 3D scene. This
source can be used to create a wide variety of shapes (e.g., a sphere, a box, or a torus) by
adjusting the roundness parameters. The Superquadric source has the following parameters.
• Center: This coordinate represents the center of the superquadric. By default this
value is (0, 0, 0).
• Scale: These three values can be used to scale the superquadric in X, Y, and Z. The
normals will be computed correctly even with anisotropic scaling. By default all
three values are set to 1.
• Theta resolution: This number represents the number of divisions in the theta
(longitudinal) direction. The default Theta Resolution value is 16. This value will
be rounded to the nearest multiple of 8.
• Phi resolution: This number represents the number of divisions in the phi
(latitudinal) direction. The default Phi Resolution value is 16. This number will be
rounded to the nearest multiple of 4.
• Thickness: If the Toroidal box is checked, this value represents the thickness of the
object as a value between 0 and 1. A value close to 0 leads to a thin object with a
large hole, and a value near 1 leads to a thick object with a very small hole.
• Theta roundness: Define the roundness in the theta (longitudinal) direction. A value
of 0 represents a rectangular shape, a value of 1 represents a circular shape, and
values greater than 1 produce higher order shapes. The default value is 1.
• Phi roundness: Define the roundness in the phi (latitudinal) direction. A value of 0
represents a rectangular shape, a value of 1 represents a circular shape, and values
greater than 1 produce higher order shapes. The default value is 1.
• Size: This value represents an isotropic size of the superquadric. By default it is 0.5.
Note that both the Size and Thickness parameters control coefficients of
superquadric generation, so the Size value may not exactly describe the size of the
superquadric.
• Toroidal: If this box is not checked (the default), the generated superquadric will not
contain a hole. If checked, a toroidal object is generated.
The output of the Superquadric source is polygonal data with point normals and texture
coordinates defined.
131
Wavelet
The Wavelet source can be used to create a uniform rectilinear grid in up to three dimensions
with values varying according to the following periodic function.
OS is the output scalar; M represents the maximum value; G represents the Gaussian; XM,
YM, and ZM are the X, Y, and Z magnitude values; and XF, YF, and ZF are the X, Y, and Z
frequency values. If a two-dimensional extent is specified, the resulting image will be
displayed. If a three-dimensional extent is used, then the bounding box of the volume will be
displayed. The Wavelet source has the following parameters.
• Extent: These six values indicate the X, Y, and Z extent of the output data. The first
two values represent the minimum and maximum X indices, the next two are the
minimum and maximum Y indices, and the last two are the minimum and maximum
Z indices. By default each axis ranges from -10 to 10.
• Center: This coordinate represents the center of the output data. By default this is (0,
0, 0).
• Maximum: This value is used to scale the scalar values in the output. The default
value is 255.
• X Freq.: This is the XF value from the above equation. The default value is 60.
• Y Freq.: This is the YF value from the above equation. The default value is 30.
• Z Freq.: This is the ZF value from the above equation. The default value is 40.
• X Mag.: This is the XM value from the above equation. The default value is 10.
• Y Mag.: This is the YM value from the above equation. The default value is 18.
• Z Mag.: This is the ZM value from the above equation. The default value is 5.
• Standard dev.: The standard deviation is used in the generation of the Gaussian
value in the above equation. The default value is 0.5.
Filters
All to N
The All to N filter is available when ParaView is run in parallel. It redistributes the data so
that it is located on the number of processes specified in the Number of Processes entry box.
It also does load-balancing of the data among these processes. This filter operates on
polygonal data and produces polygonal output.
Append Attributes
The Append Attributes filter takes multiple input data sets with the same geometry and
merges their point and cell attributes to produce a single output containing all the point and
cell attributes of the inputs. Any inputs without the same number of points and cells as the
first input are ignored. The input data sets must already be collected together, either as a result
of a reader that loads multiple parts (e.g., EnSight reader) or because the Group Parts filter
has been run to form a collection of data sets.
Append Datasets
The Append Datasets filter operates on multiple data sets of any type (polygonal, structured,
etc.). It merges their geometry into a single data set. Only the point and cell attributes that all
of the input data sets have in common will appear in the output. The input data sets must
already be collected together, either as a result of a reader that loads multiple parts (e.g.,
EnSight reader) or because the Group Parts filter has been run to form a collection of data
sets.
134 Filters
Append Geometry
The Append Geometry filter operates on multiple polygonal data sets. The data sets must
already be collected together, either as a result of a reader that loads multiple parts (e.g.,
EnSight reader) or because the Group Parts filter has been run to form a collection of data
sets. It merges their geometry into a single data set. Only the point and cell attributes that all
of the input data sets have in common will appear in the output.
Balance
The Balance filter is available when ParaView is run in parallel. It does load-balancing so that
all processes have the same number of cells. It operates on polygonal data sets and produces
polygonal output.
Calculator
The Calculator filter computes new data arrays as functions of existing scalar or
vector arrays. The Input menu allows the user to select the data set to which this
filter will be applied. The Result Array Name entry box allows the user to specify
the name of the array containing the results of the computation. The Attribute Mode menu
selects whether to operate on and produce results that are point-centered or cell-centered. If
point-centered arrays are used, the resulting array will also be point-centered. The same is true
for cell-centered arrays. The Calculator interface operates similarly to a scientific calculator.
In creating the function to evaluate, the standard order of operations applies.
Each of the calculator functions is described below. Unless otherwise noted, enclose the
operand in parentheses using the ( and ) buttons.
Clear: Erase the current function (displayed in the read-only text box above the calculator
buttons).
/: Divide one scalar by another. The operands for this function are not required to be enclosed
in parentheses.
*: Multiply two scalars, or multiply a vector by a scalar (scalar multiple). The operands for
this function are not required to be enclosed in parentheses.
-: Negate a scalar or vector (unary minus), or subtract one scalar or vector from another. The
operands for this function are not required to be enclosed in parentheses.
+: Add two scalars or two vectors. The operands for this function are not required to be
enclosed in parentheses.
x^y: Raise one scalar to the power of another scalar. The operands for this function are not
required to be enclosed in parentheses.
v1.v2: Compute the dot product of two vectors. The operands for this function are not
required to be enclosed in parentheses.
The digits 0 - 9 and the decimal point are used to enter constant scalar values.
iHat, jHat, and kHat are vector constants representing unit vectors in the X, Y, and Z
directions, respectively.
136 Filters
The scalars menu lists the names of the scalar arrays and the components of the vector arrays
of either the point-centered or cell-centered data. The vectors menu lists the names of the
point-centered or cell-centered vector arrays. The function will be computed for each point (or
cell) using the scalar or vector value of the array at that point (or cell).
The filter operates on any type of data set, but the input data set must have at least one scalar
or vector array. The arrays can be either point-centered or cell-centered. The Calculator
filter'
s output is of the same data set type as the input.
Cell Centers
The Cell Centers filter places a point at the center of each cell in the input data set. The
center computed is the parametric center of the cell, not necessarily the geometric or bounding
box center. The cell attributes of the input will be associated with these newly created points
of the output. The Input menu allows the user to select the data set to which this filter will be
applied. If the Generate vertices option is checked, then vertex cells will also be created for
each point in the output. This is useful because vertex cells are rendered, but points are not.
The points themselves could be used for placing glyphs (using the Glyph filter). The Cell
Centers filter takes any type of data set as input and produces a polygonal data set as output.
The Cell Data to Point Data filter averages the values of the cell attributes of the cells
surrounding a point to compute point attributes. The Input menu allows the user to select the
data set to which this filter will be applied. If the Pass cell data option is checked, then the
input cell attributes will also be copied to the cell attributes of the output; otherwise the output
will only have point attributes. The Cell Data to Point Data filter operates on any type of data
set, and the output data set is of the same type as the input.
Clean
The Clean filter takes polygonal data as input and generates polygonal data as output. This
filter can merge duplicate points, remove unused points, and transform degenerate cells into
their appropriate forms (e.g., a triangle is converted into a line if two of its points are merged).
The Input menu allows the user to select the data set to which this filter will be applied. If the
Point merging option is on, then points will be merged if they are within the specified
Tolerance or Absolute tolerance, depending on whether the Tolerance is absolute box is
checked. (Tolerance is specified as a fraction of the length of the diagonal of the bounding
box of the data set; Absolute tolerance is specified in the spatial units of the input data set.)
The transforming of degenerate cells into their appropriate forms is controlled by three check
boxes on the user interface: Convert lines to points, Convert polys to lines, and Convert
137
strips to polys. If any of these is unchecked, then degenerate cells of that type will not be
converted to another type of cell.
If the Piece invariant option is checked, the whole data set will be processed at once so that
cleaning this data set always produces the same results. If the box is unchecked, the data set
can be processed one piece at a time, so it is not necessary for the entire data set to fit into
memory, but the results are not guaranteed to be the same as they would be if the Piece
invariant option was on.
Clean to Grid
The Clean to Grid filter merges points that are within a tolerance of 1/100,000 of the length
of the diagonal of the bounding box of the data set. It also converts the data set to an
unstructured grid. You may wish to do this if you want to apply a filter to your data set that is
available for unstructured grids but not for the initial type of your data set (e.g., applying warp
vector to volumetric data). The Input menu allows the user to select the data set to which this
filter will be applied. The Clean to Grid filter operates on any type of data set.
Clip
The Clip filter cuts away a portion of the input data set using a plane, a sphere, a
box, or a scalar value. The menu in the Clip Function portion of the interface allows
the user to select which implicit function to use or whether to clip using a scalar
value. Making this selection loads the appropriate user interface. For the implicit functions,
the appropriate 3D widget (plane, sphere, or box) is also displayed. The use of these 3D
widgets, including their user interface components, is discussed in section 6.4.
If an implicit function is selected, the clip filter returns that portion of the input data set that
lies inside the function. If Scalars is selected, then the user must specify a scalar array to clip
according to. The clip filter will return the portions of the data set whose value in the selected
Scalars array is larger than the Clip value. Regardless of the selection from the Clip Function
menu, if the Inside Out option is checked, the opposite portions of the data set will be
returned.
This filter operates on all types of data sets, and it returns unstructured grid data on output.
This filter is available on the toolbar.
Connectivity
The Connectivity filter assigns a region id to connected components of the input data set.
(The region id is assigned as a point scalar value.) The Input menu allows the user to select
the data set to which this filter will be applied. This filter takes any data set type as input and
produces unstructured grid output.
138 Filters
Contour
The interface for adding contour values is very similar to the one for selecting cut offsets (in
the Cut filter). To add a single contour value, select the value from the New Value slider in
the Add value portion of the interface and click the Add button, or press Enter. To instead
add several evenly spaced contours, use the controls in the Generate range of values section.
Select the number of contour values to generate using the Number of Values slider. The
Range slider controls the interval in which to generate the contour values. Once the number
of values and range have been selected, click the Generate button. The new values will be
added to the Contour Values list. To delete a value from the Contour Values list, select the
value and click the Delete button. (If no value is selected, the last value in the list will be
removed.) Clicking the Delete All button removes all the values in the list. If no values are in
the Contour Values list when Accept is pressed, the current value of the New Value slider
will be used.
In addition to selecting contour values, you can also select additional computations to
perform. If any of Compute Normals, Compute Gradients, or Compute Scalars is selected,
the appropriate computation will be performed, and a corresponding point-centered array will
be added to the output.
The Contour filter operates on any type of data set, but the input is required to have at least
one point-centered scalar (single-component) array. The output of this filter is polygonal. This
filter is available on the Toolbar.
Crop
Curvature
The Curvature filter computes the curvature at each point in a polygonal data set. This filter
supports both Gaussian and mean curvatures; the type can be selected from the Curvature
type menu button. The Input menu allows the user to select the data set to which this filter
will be applied. If the Invert mean curvature option is checked, the mean curvature
calculation will be inverted. This is useful for meshes with inward-pointing normals.
139
Cut
The Cut filter extracts the portion of the input data set that lies along the specified
plane or sphere. From the Cut Function menu, you can select whether cutting will
be performed with a plane or a sphere. The appropriate 3D widget (plane widget or
sphere widget) will be displayed. The parameters of the cut function can be specified
interactively using the 3D widget or manually using the traditional user interface controls.
Instructions for using these 3D widgets and their corresponding user interfaces are found in
section 6.4.
By default, the cut lies on the specified plane or sphere. Using the Cut Offset Values portion
of the interface, it is also possible to cut the data set at some offset from the original cut
function. The Cut Offset Values are in the spatial units of the data set. To add a single offset,
select the value from the New Value slider in the Add value portion of the interface and click
the Add button, or press Enter. To instead add several evenly spaced offsets, use the controls
in the Generate range of values section. Select the number of offsets to generate using the
Number of Values slider. The Range slider controls the interval in which to generate the
offsets. Once the number of values and range have been selected, click the Generate button.
The new offsets will be added to the Offset Values list. To delete a value from the Cut Offset
Values list, select the value and click the Delete button. (If no value is selected, the last value
in the list will be removed.) Clicking the Delete All button removes all the values in the list.
The Cut filter takes any type of data set as input. Use the Input menu to choose a data set to
cut. The output of this filter is polygonal data. This filter is available on the Toolbar.
D3
The D3 filter is available when ParaView is run in parallel. It operates on any type of data set
to evenly divide it across the processors into spatially contiguous regions. The Boundary
Cells menu determines how cells that lie on processor boundaries are handled. The Assign
cells uniquely option assigns each boundary cell to exactly one process, which is useful for
isosurfacing. Selecting Duplicate cells causes the cells on the boundaries to be copied to each
process that shares that boundary. The Divide cells option breaks cells across process
boundary lines so that pieces of the cell lie in different processes. This option is useful for
volume rendering. The Global Id Array Name entry determines the name of the array
containing global point ids. Such an array is necessary for processing ghost cells and is useful
for removing duplicate points when merging sub-grids. The output of this filter is of type
unstructured grid.
Decimate
The Decimate filter reduces the number of triangles in a polygonal data set. Because this
filter only operates on triangles, first run the Triangulate filter on a data set that contains
polygons other than triangles. The Input menu allows the user to select the data set to which
140 Filters
this filter will be applied. The Reduction target slider specifies the desired reduction in the
total number of polygons (e.g., if the Reduction target value is 0.9, the Decimate filter will
attempt to produce an output data set that is 10% the size of the input.) If the Preserve
topology option is on, decimation will not split the data set or produce holes, but it may keep
the filter from reaching the reduction target. The Feature angle slider value is used in
determining where the data set may be split. If the angle between two adjacent triangles is >=
the Feature angle value, then their boundary is considered a feature edge where the data set
can be split. If the Boundary deletable option is on, then vertices on the boundary of the data
set can be removed. Turning this option off preserves the boundary of the data set, but it may
cause the filter not to reach its reduction target.
Elevation
The Elevation filter generates point scalar values for an input data set along a specified
direction vector. The Input menu allows the user to select the data set to which this filter will
be applied. Use the Scalar range entry boxes to specify the minimum and maximum scalar
value to be generated. The Low Point and High Point define a line onto which each point of
the data set is projected. The minimum scalar value is associated with the Low Point, and the
maximum scalar value is associated with the High Point. The scalar value for each point in
the data set is determined by the location along the line to which that point projects.
The line can be specified interactively using the 3D line widget. See section 6.4 for more
information about this widget.
Extract CTH Parts is a specialized filter for visualizing the data from a CTH simulation. It
first converts the selected cell-centered arrays to point-centered ones. It then contours each
array at a value of 0.5. The user has the option of clipping the resulting surface(s) with a
plane.
If the Show All option is on, all the cell-centered scalar (single-component) arrays will be
displayed in the array selection box; otherwise only the ones with "Fraction" or "fraction" in
the name will be shown. (This behavior is because by default the CTH volume fraction arrays
should be listed.) Clicking on the name of a particular array selects it. To choose multiple
contiguous array names, click the first one and press the Shift key while clicking the last name
you wish to select. If the names are not contiguous, press the Ctrl key while selecting the
names from the list. The selected arrays will be contoured.
If you wish to clip the contour surfaces with a plane, select On from the menu in the Clipping
section on this Parameters tab. You can interactively position and orient the plane using the
plane widget. (See section 6.4 for the details of using this widget or manually setting the
plane's parameters.)
141
Extract Edges
The Extract Edges filter produces a wireframe version of the input data set by extracting all
the edges of the data set's cells as lines. The Input menu allows the user to select the data set
to which this filter will be applied. This filter operates on any type of data set and produces
polygonal output.
Extract Grid
The Extract Grid filter returns a subgrid of a structured input data set (uniform
rectilinear, curvilinear, or nonuniform rectilinear). The VOI section of the interface
provides six sliders for specifying the extents of the desired output along each of the
I, J, and K axes. The Sample Rate thumb wheels control whether to subsample the input grid
in each dimension. Values greater than 1 result in subsampling. For example, if the Sample
Rate along the I axis is 2, then every other input point will be passed to the output. If the
Sample Rate in any dimension is greater than 1, then selecting the Include boundary option
will pass the values on the boundary of the data set to the output even if the boundary extent is
not an even multiple of the sample rate. The output data set type of this filter is the same as
the input type. This filter is available on the Toolbar.
Extract Parts
The Extract Parts filter operates on any type of data, but its input reader/source/filter must
have created multiple parts. The output type of this filter depends on the output type of the
selected part(s). This filter is useful for operating on only a subset of the parts available from
a reader, source, or filter.
Extract Surface
The Extract Surface filter extracts the polygons forming the outer surface of the input data
set. The Input menu allows the user to select the data set to which this filter will be applied.
This filter operates on any type of data and produces polygonal data as output.
Feature Edges
The Feature Edges filter extracts various subsets of edges from the input data set. Which
edges are extracted depends on which check boxes are marked. The four types of edges are as
follows.
• Feature edges: edges used by two polygons whose dihedral angle > the value from
the Feature angle slider
If the Coloring option is checked, then the extracted edges are assigned a scalar value based
on the type of the edge. The Input menu allows the user to select the data set to which this
filter will be applied.
Glyph
The Glyph filter generates a glyph (i.e., an arrow, cone, line, sphere, or 2D glyph) at
each point in the input data set. The glyphs can be oriented and scaled by the input
point-centered scalars and vectors.
From the Glyph menu, select which symbol should be drawn at each input point. The
available choices are Arrow, Cone, Line, Sphere, and Glyph2D. To change the parameters of
any of the glyphs (including which 2D glyph is drawn), choose the appropriate glyph from the
Glyphs submenu of the Select menu. Change the desired parameter(s) and click Accept. To
return to the Glyph interface, select this filter from the Selection / Navigation Window or
from the Select menu.
The Orient / Scale section of the interface determines how the point-centered scalars and
vectors contribute to the orientation and scale of the widgets. The Orient Mode menu
determines whether the glyphs are drawn in their original orientation (Off) or in an orientation
determined by a vector array (Vector). If the input does not contain point-centered vectors,
the Vector option in the Orient Mode menu will not be available.
The Scale Mode menu determines how the scale of the glyphs will be calculated. The options
are to scale by the selected scalar array (Scalar), to scale by the magnitudes of the selected
vector array (Vector Magnitude), to scale by each component of the selected vector array
(Vector Components), or to draw the all the glyphs at the same scale (Data Scaling Off). If
the input contains no point-centered scalar arrays, the Scalar option will be disabled. If it has
no point-centered vector arrays, the Vector Magnitude and Vector Components entries will
be unavailable. The value of the Scale Factor entry box is a multiplier that contributes to the
final size of the glyphs.
The Scalars and Vectors menus list the point-centered scalar (single-component) and vector
(three-component) arrays in the input data set. These menus are enabled and disabled
depending on the current Orient and Scale Mode selections.
143
The Glyph Parameters tab also contains controls for masking the input points before
glyphing. (This is a simplified version of the Mask Points filter interface.) To enable point
masking, turn on the Mask Points option. When this is selected, the Max. Number of Glyphs
thumbwheel sets an upper limit on the number of glyphs to display. If the Random Masking
option is on, the input points to glyph will be randomly selected; otherwise every second point
will be glyphed, starting from the first point id.
The Glyph filter operates on any type of data set. Its output is polygonal. This filter is
available on the Toolbar.
Gradient
The Gradient filter computes the gradient vector at each point in an image or volume. The
Input menu allows the user to select the data set to which this filter will be applied. The
Scalars menu determines from which scalar array the gradient will be computed. The
Dimensionality menu selects whether the gradient will be calculated in 2 or 3 dimensions. If
only 2 dimensions are used, gradients are only computed in X and Y. This filter uses central
differences to compute the gradients. The Gradient filter operates on uniform rectilinear
(image) data and produces image data output.
Gradient Magnitude
The Gradient Magnitude filter computes the magnitude of the gradient vector at each point in
an image or volume. The Input menu allows the user to select the data set to which this filter
will be applied. The Scalars menu allows the user to select which scalar array will be used
for gradient magnitude calculations. The Dimensionality menu determines whether the
gradient magnitude will be computed in 2 or 3 dimensions. If 2 dimensions are used, the
gradient magnitude will be computed from the gradients in X and Y. This filter operates on
uniform rectilinear (image) data and produces image data output.
Group Parts
The Group Parts filter causes different data sets to be grouped into a collection and treated as
a single data set for filtering purposes. All the data sets currently in ParaView will appear in
the selection list. Only visible data sets are selected by default To select a single data set, click
on its name. To select several sources whose names are contiguous in the list, select the first
name, press and hold the Shift key, and (while still holding the Shift key) click the last name.
To select several data sets whose names are non-contiguous, press and hold the Ctrl key while
clicking the names. This filter operates on any type of data. The output type depends on the
data sets selected for grouping.
144 Filters
Linear Extrusion
The Linear Extrusion filter creates a swept surface by translating the input data set along a
specified vector. This filter is intended to operate on 2D polygonal data. The Input menu
allows the user to select the data set to which this filter will be applied. The three Vector entry
boxes specify the X, Y, and Z components of the vector along which to sweep the input. The
value of the Scale factor entry determines the distance along the vector the data set will be
translated. (A scale factor of 0.5 will move the data set half the length of the vector, and a
scale factor of 2 will move it twice the vector's length.)
The Capping check box indicates whether to cap the ends of the swept surface. Capping
works by placing a copy of the input data set on either end of the swept surface, so it behaves
properly if the input is a 2D surface composed of filled polygons. If the input data set is a
closed solid (e.g., a sphere), then if capping is on, two copies of the data set will be displayed
on output (the second translated from the first one along the specified vector). If instead
capping is off, then an input closed solid will produce no output.
The Piece invariant check box determines whether the output will be the same regardless of
the number of processors used to compute the result. The difference is whether there are
internal polygonal faces on the processor boundaries. This filter operates on polygonal data
and produces polygonal data output.
Loop Subdivision
The Loop Subdivision filter increases the granularity of a polygonal mesh. It works by
dividing each triangle in the input into four new triangles. It is named for Charles Loop, the
person who devised this subdivision scheme. This filter only operates on triangles, so a data
set that contains other types of polygons should be passed through the Triangulate filter
before applying this filter to it. The Input menu allows the user to select the data set to which
this filter will be applied. The Number of divisions slider specifies the number of subdivision
iterations to be performed. (For example, if the number of divisions is 2, the triangles in the
initial mesh will each be divided into four new triangles. Then those new triangles will be
further subdivided.) This filter only operates on polygonal data (specifically triangle meshes),
and it produces polygonal output.
Mask Points
The Mask Points filter reduces the number of points in the data set. It operates on any type of
data set, but produces only points / vertices. This filter is often used before the Glyph filter,
but now the basic point-masking functionality is available on the Parameters page for the
Glyph filter.
The Input menu allows the user to select the data set to which this filter will be applied. The
value in the On ratio thumb wheel specifies the ratio of points to retain in the output. (For
145
example, if the on ratio is 3, then the output will contain 1/3 as many points -- up to the Max.
points value -- as the input.) The Max. points thumb wheel determines the maximum number
of points that will appear in the output. The Offset thumb wheel specifies the point in the data
set from which to start masking. If the Random check box is marked, then the output points
will be selected randomly from the input; otherwise every nth point (specified by the on ratio)
will be selected. Selecting points at random is helpful to avoid striping when masking the
points of a structured data set. If the Generate vertices option is checked, then a vertex cell
will be created for each point in the output.
Median
The Median filter operates on uniform rectilinear (image or volume) data and produces
uniform rectilinear output. It replaces the scalar value at each pixel / voxel with the median
scalar value in the specified surrounding neighborhood (Kernel Size). From the Input menu,
the user can select the data set on which to perform this calculation. The Scalar menu
determines which scalar array will be used to determine the median. The Kernel Size entry
boxes specify the number of pixels / voxels in each dimension to use in computing the median
to assign to each pixel / voxel. If the kernel size in a particular dimension is 1, then the
median will not be computed in that direction. Since the median operation removes outliers,
this filter is useful for removing high-intensity, low-probability noise (shot noise).
Normals generation
The Normals generation filter generates surface normals at the points of the input polygonal
data set to provide smooth shading of the data set. The resulting data set is also polygonal.
The filter works by calculating a normal vector for each polygon in the data set and then
averaging the normals at the shared points.
In creating surface normals, if the angle between two polygons at a shared edge is larger than
the value of the Feature angle slider, then that edge is considered a feature edge. If Splitting
is turned on, then the mesh will be split along feature edges, allowing points to be duplicated.
Because the duplicated points are no longer shared between the polygons meeting at the
feature edge, a normal at these points will be created per polygon rather than averaging the
polygon normals to produce one normal at each point. This allows the feature edges to remain
"sharp" after shading.
Generally the normals for a data set should either all point inward or all point outward. If the
Consistency check is on, then this filter will reorder the points of cells that whose normal
vectors are oriented the opposite direction from the rest of those in the data set. If the Flip
normals option is checked, this filter will reverse the normal direction (and reorder the
points) for all polygons in the data set. You might want to do this if your viewing position
will be inside the data set instead of outside of it. Sometimes you may have more than two
polygons sharing an edge (i.e., a non-manifold edge). When this is the case and the
Consistency option is checked, then if the Non-manifold check is on, this filter will try to
146 Filters
maintain consistent normals across non-manifold edge, but doing this can corrupt the ordering
of polygons at these edges.
This filter computes the normals at the points in the data set. In the process of doing this it
computes polygon normals too. If you want these normals to be passed to the output of this
filter, turn on the Cell normals option.
If this filter is run in parallel, the resulting data set will have seams along the processor
boundaries unless the Piece invariant check box is marked.
Outline
The Outline filter generates an axis-aligned bounding box for the input data set. The Input
menu specifies the data set for which to create a bounding box. This filter operates on any
type of data set and produces polygonal output.
Outline Corners
The Outline Corners filter generates the corners of a bounding box for the input data set
(specified by the Input menu). The Corner factor slider specifies the relative length of the
corners along the corresponding edges. This filter produces polygonal output.
Part Id Scalars
The Part Id Scalars filter assigns a unique scalar value to each part in the input. The input
parts must have been collected together either as a result of a reader that loads multiple parts
(e.g., EnSight reader) or because the Group Parts filter has been run to form a collection of
data sets. This is useful if you want to know which portions of the geometry belong to which
part if you wish to extract certain parts from this collection (using the Extract Parts filter).
Pick
The Pick filter displays the underlying data nearest to a user-selected point. A point
widget, with its usual controls in the display area and on the Parameters tab, is
provided for choosing this point. (See section 6.4 for information about using the
point widget.) Pressing the “P” key positions the point widget at the point on the data set
under the current cursor position. If you select Point from the Pick Type menu, the output of
the filter will be the nearest point to the point widget. If you select Cell, the output of the filter
is the cell which is closest to the selected point. All the output point-centered attributes, cell-
centered attributes, and original ids are displayed on the Parameters tab. Also, the selected
cell will be outlined in red in the display area, and the reference ids of the points within that
cell will be labeled.
147
The Pick filter operates on any type of data and produces unstructured grid output. This filter
is available on the Toolbar.
The Point Data to Cell Data filter averages the values of the point attributes of the points of a
cell to compute cell attributes. The Input menu allows the user to select the data set to which
this filter will be applied. If the Pass point data option is checked, then the input point
attributes will also be copied to the point attributes of the output; otherwise the output will
only have cell attributes. The Point Data to Cell Data filter operates on any type of data set,
and the output data set is of the same type as the input.
Probe
The Probe filter samples the data set attributes of the current data set at a point or
along a line. Selecting either Point or Line from the menu button in the Probe
object portion of the interface displays the appropriate 3D widget and its associated
user interface controls. See section 6.4 for more information about using 3D widgets.
If you are probing with a point, the values of the point-centered variables at the selected point
will be listed on the Parameters tab for this filter. If you are probing with a line, the values of
the point-centered variables along that line will be displayed in a 2D graph in the display area
if Show XY-Plot is selected.
Probing with a point is different from using the Pick filter at a point because the Pick filter
displays the values for the input point closest to the selected point. Instead the Probe filter
uses interpolation to determine the value at the selected point, whether or not it lies at an input
point.
The Probe filter operates on any type of data and produces polygonal output (a point or a
line). This filter is available on the Toolbar.
Process Id Scalars
The Process Id Scalars filter assigns a unique scalar value to each piece of the input
according to which processor it resides on. If the Random option is selected, the unique value
per piece will be chosen at random; otherwise it will match the process id. This filter operates
on any type of data when ParaView is run in parallel. It is useful for determining whether
your data is load-balanced across the processors being used. The output data set type is the
same as that of the input.
148 Filters
Quadric Clustering
To better align pieces of the data set assigned to different processors, select Use feature
edges and Use feature points. Use feature edges adjusts the representative points that
contain boundary edges (along processor divisions), and Use feature points further
influences the position of the feature points along the boundaries.
The Copy cell data toggle controls whether cell-centered data from the input should be
copied to the output.
Random Vectors
The Random Vectors filter generates a point-centered array of random vectors. It uses a
random number generator to determine the components of the vectors. The Min. speed and
149
Max. speed values determine the range of the vector magnitudes. This filter operates on any
type of data set, and the output data set will be of the same type as the input.
Reflection
The Reflection filter reflects the input data set across the specified plane. If the Copy Input
check box is marked, the output is the union of the input data set and its reflection. Otherwise
the output will contain only the reflection of the input data. If the value chosen from the Plane
menu is X, Y, or Z, the value of the Center entry determines where the plane is placed along
the specified axis. The other six entries, X Min, X Max, etc., place the reflection plane at the
specified face of the bounding box of the input data set. This filter operates on any type of
data set and produces an unstructured grid output.
Ribbon
The Ribbon filter creates ribbons from the lines in the input data set. This filter is useful for
visualizing streamlines. Both the input and output of this filter are polygonal data. The input
data set must also have at least one point-centered vector array.
The vectors and scalars for use in this filter can be selected from the Vectors and Scalars
menus respectively. If the Vary width option is on, the width of the ribbons will be scaled
according to the selected scalars. If Use default normal is off, the selected vector array will
be used as the normals of the ribbons. If Use default normal is on, the normal for the ribbons
is specified by the values in the Default normal entry boxes.
The Width entry box specifies half the width of the ribbons. If Vary width is on, then the
Width value specified is half the minimum width of the ribbons. The Angle value determines
the orientation of the ribbons; it specifies the offset angle (in degrees) of the ribbon from the
normal line.
Rotational Extrusion
The Rotational Extrusion filter forms a surface by rotating the input about the Z axis. This
filter is intended to operate on 2D polygonal data. The Input menu allows the user to select
the data set to which this filter will be applied. The value of the Resolution thumb wheel
specifies the number of steps taken in rotating from 0 to the value specified in the Angle entry
box. The Translation entry box determines the distance along the Z axis to be covered as the
data set is rotated. Specifying a non-zero Translation value allows you to create a corkscrew
or spring effect. The Delta radius entry box controls how much the radius of the rotation
increases as the new data set is swept out.
The Capping check box controls whether to close the open ends of the swept surface.
Capping works by placing a copy of the input data set on either end of the swept surface, so it
behaves properly if the input is a 2D surface composed of filled polygons. If the input data set
150 Filters
is a closed solid (e.g., a sphere), then either two copies of the data set will be drawn or no
surface will be drawn. No surface is drawn if either capping is on or if the two surfaces would
occupy exactly the same 3D space (e.g., Angle is a multiple of 360, and Translation and
Delta radius are 0).
Shrink
The Shrink filter causes the individual cells of a data set to break apart from each other by
moving each cell' s points toward the centroid of the cell. (The centroid of a cell is the average
position of its points.) The Shrink factor scale determines how far the points will move. A
value of 0 positions the points at the centroid of the cell; a value of 1 leaves them at their
original positions. This filter operates on any type of data set and produces unstructured grid
output.
Smooth
The Smooth filter operates on a polygonal data set by iteratively adjusting the position of the
points using Laplacian smoothing. (Because this filter only adjusts point positions, the output
data set is also polygonal.) This results in better-shaped cells and more evenly distributed
points. The Num. iterations thumb wheel specifies the maximum number of smoothing
iterations to perform. The Convergence slider limits the maximum motion of any point. It is
expressed as a fraction of the length of the diagonal of the bounding box of the data set. If the
maximum point motion during a smoothing iteration is less than the Convergence value, the
smoothing operation terminates.
Stream Tracer
The Stream Tracer filter generates streamlines in a vector field from a collection of
seed points. The vector field used is selected from the Vectors menu, so the input
data set is required to have point-centered vectors. The Seed portion of the interface
allows you to select whether the seed points for this integration lie in a point cloud or along a
line. Depending on which is selected, the appropriate 3D widget (point or line widget) is
displayed along with traditional user interface controls for positioning the point cloud or line
within the data set. Instructions for using the 3D widgets and the corresponding manual
controls can be found in section 6.4.
The Max. Propagation entry box allows you to specify the maximum length of the
streamlines. From the Max. Propagation menu, you can select the units to be either Time (the
time a particle would travel with steady flow) or Length (in the data set'
s spatial coordinates).
The Init. Step Len. menu and entry specify the initial step size for integration. (For non-
adaptive integrators, Runge-Kutta 2 and 4, the initial step size is used throughout the
integration.) The menu allows you to specify the units. Time and Length have the same
meaning as for Max. Propagation. Cell Length specifies the step length as a number of cells.
151
The Integration Direction menu determines in which direction(s) the stream trace will be
generated: FORWARD, BACKWARD, or BOTH.
The Integrator Type section of the interface determines which calculation to use for
integration: Runge-Kutta 2, Runge-Kutta 4, or Runge-Kutta 4-5. If Runge-Kutta 4-5 is
selected, controls are displayed for specifying the minimum and maximum step length and the
maximum error. The controls for specifying Min. Step Len. and Max. Step Len. are the same
as those for Init. Step Len. The Runge-Kutta 4-5 integrator tries to choose the step size so
that the estimated error is less than the value of the Maximum Error entry.
If the integration takes more than Max. Steps to complete, if the speed goes below Term.
Speed, if Max. Propagation is reached, or if a boundary of the input data set is crossed,
integration terminates.
This filter operates on any type of data set, provided it has point-centered vectors. The output
is polygonal data containing polylines. This filter is available on the Toolbar.
Subdivide
The Subdivide filter iteratively divides each triangle in the data set into four new triangles.
Three new points are added per triangle – one at the midpoint of each edge. The image below
shows a triangle with the new points inserted and the appropriate edges added to form the four
new triangles. The Num. divisions slider determines the number of subdivision passes the
filter will take through the data. This filter operates only on polygonal data containing
triangles, so run your polygonal data through the Triangulate filter first if it is not composed
of triangles. The output of this filter is also polygonal.
Tessellate
The Tessellate filter tessellates cells with nonlinear geometry and/or scalar fields into a
simplicial complex with linearly interpolated field values that more closely approximate the
original field. This is useful for the quadratic cells supported by VTK. There are several
settings that affect the tessellation.
152 Filters
The Output Dimension specifies whether nonlinear cells should have their volumes, surfaces,
or edges tessellated. When the Output Dimension is 3, 3-D cells produce tetrahedra, 2-D
cells produce triangles, and 1-D cells produce line segments. When the Output Dimension is
2, 3-D cells will have their boundaries tessellated with triangles. When the Output
Dimension is 1, then all cells except points produce line segments.
The Max Chord Error setting is the maximum allowed distance between the midpoint of any
output edge and the original nonlinear geometry.
The Max Field Error setting is a per-field error, also sampled at midpoints, but comparing the
linear and nonlinear field values.
The Max Num Of Subdivisions setting specifies the maximum number of times an edge may
be subdivided. Increasing this number allows further refinement but can drastically increase
the computational and storage requirements, especially when the Output Dimension is 3.
Tetrahedralize
The Tetrahedralize filter converts the 3D cells of any type of data set to tetrahedrons and the
2D ones to triangles. This filter always produces unstructured grid output.
Threshold
The Threshold filter extracts the portions of the input data set whose scalars lie
within the specified range. This filter operates on either point-centered or cell-
centered data. To select between these two options, select either Point Data or Cell
Data from the Attribute Mode menu. Once the Attribute Mode has been selected, choose the
scalar array from which to threshold the data from the Scalars menu. The Lower Threshold
and Upper Threshold sliders determine the range of the scalars to retain in the output. The All
Scalars check box only takes effect when the Attribute Mode is set to Point Data. If the All
Scalars option is checked, then a cell will only be passed to the output if the scalar values of
all of its points lie within the range indicated by the Lower Threshold and Upper Threshold
sliders. If unchecked, then a cell will be added to the output if the specified scalar value for
any of its points is within the chosen range. This filter operates on any type of data set and
produces unstructured grid output. The Threshold filter is available on the Toolbar.
Transform
The Transform filter allows you to specify the position, size, and orientation of polygonal,
unstructured grid, and curvilinear data sets. You can interactively perform these affine
transformations on the data by using the box widget, and the parameters can also be
controlled manually. See section 6.4 for the details of using the box widget and manually
setting its parameters. The output of this filter will have the same data set type as the input.
153
Triangle Strips
The Triangle Strips filter converts triangles into triangle strips and lines into polylines. The
Max. length slider determines the maximum number of triangles or lines to merge into a strip.
This filter operates on polygonal data sets and produces polygonal output.
Triangulate
The Triangulate filter decomposes polygonal data into only triangles, points, and lines. It
separates triangle strips and polylines into individual triangles and lines, respectively. The
output is polygonal data. Some filters that take polygonal data as input require that the data be
composed of triangles rather than other polygons, so passing your data through this filter first
is useful in such situations. You should use this filter in these cases rather than the
Tetrahedralize filter because they produce different output data set types. The filters
referenced require polygonal input, and the Tetrahedralize filter produces unstructured grid
output.
Tube
The Tube filter creates tubes around the lines in the input polygonal data set. The output is
also polygonal. The Num. sides value determines the number of faces around the
circumference of the tube. The Capping toggle specifies whether to close the end of the tube
with a polygon. The Radius entry determines the radius of the tube (or the minimum radius if
you are varying the radius). From the Vary radius menu, you can select whether the radius of
the tube should vary, and if so, whether it should be by scalar or by vector. If the radius is
varied by scalar, the tube radius is based on the point-based scalar values. If it is varied by
vector, the vector magnitude is used. If you are varying the radius, the value in the Radius
factor entry determines the maximum radius by specifying a multiplier of the Radius value.
Warp (scalar)
The Warp (scalar) filter translates the points of the input data set along a vector by a distance
determined by the specified scalars (selected from the Scalars menu). The Scale factor entry
allows you to rescale the scalar values used in warping the data.
The Normal entries specify the direction in which to warp the geometry if the Use normal
option is checked. If Use normal and X-Y plane are off, the data set will be warped along its
normals array. (If no normals array exists, the Normal value will be used.) If X-Y plane is on,
the Z-values in the data set are considered to be scalars, and warping is done along the Z axis.
This is useful for creating carpet plots. Any scalars in the data set are copied to the output, so
the data can be colored by them.
154 Filters
This filter operates on polygonal, curvilinear, and unstructured grid data sets containing
single-component scalar arrays. Because it only changes the positions of the points, the output
data set type is the same as that of the input.
Warp (vector)
The Warp (vector) filter translates the points of the input data set using a specified
vector array. The vector array chosen specifies a vector per point in the input. Each
point is translated along its vector by the value in the Scale factor entry box. This
filter operates on polygonal, curvilinear, and unstructured grid data sets. Because this filter
only changes the positions of the points, the output data set type is the same as that of the
input. This filter is available on the Toolbar.
Command-Line Options and Environment
Variables
The following is a list of options available when running ParaView from the command line.
When two options are listed, separated by a comma, either of them can be used to achieve the
specified result. Unless otherwise specified, all command-line options are used on the client
program. Following the list of command-line options is a set of environment variables
ParaView recognizes.
When ParaView is started, do not load any reader, source, or filter modules. In order
to load or create data in ParaView, you must load the XML file for any modules you
wish to use (File menu, Import Package).
--disable-registry, -dr
Launch ParaView in its default state; do not load any preferences saved in
ParaView’s registry file.
--batch, -b
Run ParaView without its user interface using a previously saved ParaView batch
(.pvb) file to produce your visualization results (e.g., --batch="test.pvb"). No
other command-line options can be used when running ParaView in batch mode.
You can also start ParaView in batch mode by passing only the name of the batch
file to the paraview executable. You may also pass the name of the batch file to
the pvbatch executable. The resulting images and/or data sets will be the same
regardless of the executable used.
./paraview “test.pvb”
--crash-on-errors
When an error occurs in ParaView, abort the application instead of just adding the
error to ParaView’s error log. This advanced option is only useful for developers.
--play-demo, -pd
Start ParaView in its demo mode to display some of its most important features. The
demo will keep playing, looping through its list of features, until you click the Stop
Demo button in the demo control panel dialog box. This demo option is also
available from ParaView’s Help menu.
--help
Start the client process to be attached to the server. The server must be started first
unless --reverse-connection (or –rc) is used.
--server, -v
This command-line option is one on the server. Separate the data processing from the
user interface. If a render server is also used, the rendering is performed there;
otherwise rendering happens on the same processors as the data processing. The
server may be composed of one or more processors. There is also a separate
pvserver executable; running it without any arguments has the same effect as
running ParaView with the --server command-line argument.
C.2 Client-Server Options 157
--host, -h
Tell the client process where to connect to the server. The default is --host=localhost.
This command-line option is normally used on the client. However, when the
--reverse-connection option is specified, the --host option is used on the
data server.
--port
Specify the port to use in establishing a connection between the client and the server.
The default is --port=11111. This option is used on the client unless the
--reverse-connection option is specified. In this case, this option is used on
the data server. If used, this argument must be specified on both the client and the
data server command lines, and the port numbers must match.
--user
Tell the client what username to pass to the server when establishing an SSH
connection.
--always-ssh
Establish the connection between the client and the server using SSH.
--client-render-server, -crs
Start the client process to be attached to the data server and render server. Both
servers must be started first.
--render-server, -rs
Perform rendering in a separate server from the data server. The render server may
be composed of one or more processors. Include this command-line option when
starting the render server. You may also start the ParaView render server using the
pvserver executable; the same --render-server command-line argument is
required.
--connect-data-to-render, -d2r
When in client-server mode with a render server, create a connection from the data
server to the render server once the client is connected to both servers. This is the
default behavior in client/data server/render server mode. This argument should only
be used on the command line for the client, regardless of whether --reverse-
connection is used.
--connect-render-to-data, -r2d
When in client-server mode with a render server, create a connection from the render
server to the data server once the client is connected to both servers. This argument
should only be used on the command line for the client, regardless of whether
--reverse-connection is used.
--machines, -m
Specify on the render server command line a list of the machines that will be a part
of the render server (--machines=machine_file). In the machines file, the
name of each machine to be used should be listed on a separate line. A sample
machines file for a render server with three nodes is shown below.
node 0 machine1
node 1 machine2
node 2 machine3
--render-server-host, -rsh
Tell the client process where to connect to the render server. The default is
--render-server-host=localhost. Use this option on the command line
for the client.
--render-port
Specify the port to use in establishing a connection between the client and the render
server. The default is --render-port=22221. This port should be specified
when you start the render server (unless you are using the default port). If used, this
argument must be specified on both the client and the render server command lines,
and the port numbers used must match.
--render-node-port
Specify the port to use in establishing a connection between the nodes of the render
server and those of the data server. This port number should only be specified on the
command line for the render server. If --connect-render-to-data is used,
then --render-node-port should instead be specified on the command line for
the data server.
C.3 Rendering Options 159
--reverse-connection, -rc
Cause the data and render servers to connect to the client. When using this option,
the client, data server, and render server (if used) must be started with this command-
line argument, and you should start the client before starting either server.
--connect-id
--render-module
--tile-dimensions-x, -tdx
Specify the number of tiles in the horizontal direction of the tiled display
(--tile-dimensions-x=number_of_tiles). This value defaults to 0. To
use this option, you must be running in client/server or client/data server/render
server mode, and this option must be specified on the client command line. Setting
this option to a value greater than 0 will enable the tiled display. If this argument is
set to a value greater than 0 and -tdy (see below) is not set, then -tdy will default
to 1.
--tile-dimensions-y, -tdy
Specify the number of tiles in the vertical direction of the tiled display
(--tile-dimensions-y=number_of_tiles). This value defaults to 0. To
use this option, you must be running in client/server or client/data server/render
server mode, and this option must be specified on the client command line. Setting
this option to a value greater than 0 will enable the tiled display. If this argument is
set to a value greater than 0 and -tdx (see above) is not set, then -tdx will default
to 1.
--cave-configuration, -cc
Specify the configuration file for the displays being used in the cave. This command-
line option is only used with the CaveRenderModule (selected by default when
this command-line option is used). The format for this file is discussed in section
21.5. ParaView can be run in a cave only in client-server mode, and the
configuration file should be passed to the client.
--use-software-rendering, -r
Use Mesa software rendering, which supports offscreen rendering on unix platforms.
--use-satellite-software, -s
Use Mesa software rendering, which supports offscreen rendering on unix platforms,
on the satellite processes (i.e., the processes not containing the user interface).
--use-offscreen-rendering, -os
--disable-composite, -dc
Use this command-line option if the data server does not have rendering resources
and you are not using a render server. All the rendering will then be done on the
client.
PV_DISABLE_COMPOSITE_INTERRUPTS
PV_INTERFACE_PATH
If you are starting ParaView without the default source, reader, and filter modules
loaded (i.e., using the --start-empty command-line option) or if you wish to
load extra modules, set this variable to the directory containing the XML files
ParaView should read to create its user interface.
C.4 Environment Variables 161
PV_OFFSCREEN
This environment variable has the same effect as using the --use-offscreen-
rendering command-line option.
PV_SEPARATE_RENDER_WINDOW
Set this environment variable to 1 if you want the display area to be in a separate
window from the rest of the ParaView user interface.
PV_SOFTWARE_RENDERING
This environment variable has the same effect as setting both the
--use-software-rendering and --use-satellite-software
environment variables.
VTK_CLIENT_SERVER_LOG
If set to 1, a log file will be created for the ParaView client, server, and render
server. The log files will contain any client-server streams sent to the corresponding
client, server, or render server.
ParaView Data (PVD) File Format
ParaView’s native data file format (PVD) supports any type of data set that can be loaded or
created in ParaView (polygonal, uniform rectilinear, nonuniform rectilinear, curvilinear, or
unstructured), including spatially partitioned, multi-block, and time series data. This file
format is XML-based. This appendix details the organization of this data file format.
The PVD file actually provides pointers to the collection of data files required to store the
various components of the current data set. Each of the data files in the collection uses the
XML-based VTK file format (either the serial or parallel version).
The first line in the PVD file specifies the XML version (currently "1.0"). Following that is
the VTKFile element. The attributes of this element are as follows.
• type: This attribute is set to "Collection", indicating that loading this data file
requires loading a group of data files.
• version: The version attribute lists the version of the vtkXMLWriter used in
writing this file. The current version is "0.1". This attribute is for informational
purposes only; it is not required.
• timestep: This attribute is only required for storing time-varying data sets. Its
value is an integer value greater than or equal to 0.
• group: The group attribute lists the unique ParaView-assigned identifier of the
source, reader, or filter that created this data set. This attribute is not required; it is
only for informational purposes.
• part: This attribute’s value is an identification number for this part of the current
data set. It is an integer value greater than or equal to 0.
• file: This attribute contains the file name of one of the sub-files in this data set. If
the sub-file is not in the same directory as the .pvd file, this attribute will contain a
relative path to the sub-file from the location of the .pvd file.
An example .pvd file is shown below. It contains five time steps of a time-varying data set.
<?xml version="1.0"?>
<VTKFile type="Collection" version="0.1"
byte_order="LittleEndian"
compressor="vtkZLibDataCompressor">
<Collection>
<DataSet timestep="0" group="" part="0"
file="examplePVD/examplePVD_T0000.vtp"/>
<DataSet timestep="1" group="" part="0"
file="examplePVD/examplePVD_T0001.vtp"/>
<DataSet timestep="2" group="" part="0"
file="examplePVD/examplePVD_T0002.vtp"/>
<DataSet timestep="3" group="" part="0"
file="examplePVD/examplePVD_T0003.vtp"/>
<DataSet timestep="4" group="" part="0"
file="examplePVD/examplePVD_T0004.vtp"/>
</Collection>
</VTKFile>
Part II: Developer’s Guide
Chapter 14
ParaView Architecture
CMake: files CMake uses to find specific packages and to specify some of the behavior of
ctest
Common
Data
Baseline: images and text used for comparing results of ParaView regression tests
Utility: contains code for comparing text results of ParaView regression tests
Examples: provides example code for adding your own reader, source, or filters classes to
ParaView
Client: parts of the user interface specific to ParaView, not contained in the
Widgets directory
Resources: icons and XML files from which ParaView loads most of its
user interface
Demos: script and necessary data sets for running ParaView in demo mode
Widgets: Tk widgets accessible through C++; these widgets form the basic
components of the ParaView user interface (buttons, menus, etc.)
Servers
Common: contains classes necessary for ParaView servers that are not specific to
filters or the server manager, but may be used by them
Utilities: contains code for various libraries used by ParaView (hdf5, HTMLHelp, IceT,
KWSys, TclTk, VTKClientServer, VTKTclWrapping, and Xdmf)
VTK: contains code for most of the data processing done in ParaView
One server manager controls all servers and has a simple interface which the client(s) can
access. A server manager is responsible for creating VTK objects on the server, changing the
settings of these objects, and obtaining information about these objects. The client will tell the
server manager to create or change a VTK object, and it will ask for information about
existing objects.
Data Render
Server Server
Server
Manager
Client
Figure 110. Information flow between servers, server manager, and client
14.3 Client
The ParaView client contains the user interface and is responsible for passing the values from
the user interface to the server manager. It also updates the user interface from information
(from the servers) that it requests from the server manager. Most of the information presented
in the User’s Guide portion of this book is pertaining to the ParaView client.
Chapter 15
Before compiling or installing ParaView, you must first download either ParaView source
code or binaries. If you want to make changes to the application, use features that are not
included in the downloadable binaries (e.g., MPI support), or build on a platform for which
precompiled binaries are not available, you will need to compile ParaView, so you will need
the source code. The source code and the binaries for the last two stable ParaView releases are
available on the download page of the ParaView web site
(http://www.paraview.org/HTML/Download.html). If you want the development version of
ParaView, you can access the source code for it through CVS using the commands below.
cvs –d:pserver:anoncvs@www.paraview.org:/cvsroot/ParaView co
ParaView
If you are compiling ParaView, you will also need a copy of CMake, the cross-platform build
system which ParaView uses. Source and binary distributions are available from the
download page of the CMake web site (http://www.cmake.org/HTML/Download.html). It is
highly recommended that you download the CMake binaries if they are available for your
platform. If they are not available, follow the instructions on the CMake install page
(http://www.cmake.org/HTML/Install.html) ParaView requires that you use version 2.0.1 or
later of CMake.
172 Compiling / Installing ParaView
Regardless of which platform you use to build ParaView, the approach is the same. First run
CMake. Then change any CMake configuration options for ParaView. Finally compile
ParaView. Specifics of compiling and installing ParaView on unix, Windows, and Macintosh
OSX platforms will be covered in the remainder of this chapter.
15.1 On Unix
Compiling
If you downloaded the ParaView source distribution from the web site, extract the distribution
tarball using the tar command (e.g., tar xvzf paraview-1.4.2.tar.gz).
When building ParaView, you must maintain separate source and build directories, so first
create the directory in which ParaView will be built. Use the cd command to enter the
directory where ParaView will be built. Either run CMake in wizard mode where you will
answer a series of questions about your new ParaView build (cmake
/path/to/ParaView/source -i), or run the terminal-based interface to CMake
(ccmake /path/to/ParaView/source). Change any necessary build parameters. For
most users, the default values will work. Make sure that CMAKE_C_COMPILER and
CMAKE_CXX_COMPILER (specifying the C and C++ compilers you wish to use) are set
correctly. This can prevent many build errors.
Once you have successfully configured your ParaView build, compile and install ParaView
using the command, make && make install.
Installing
If you built ParaView from source, installing it was the last step in the build process. If you
downloaded precompiled binaries from the web site, first extract the tarball you downloaded.
At this point, you will have a README file (containing brief instructions) and another
tarball. Use cd to select the installation prefix. Using either /usr/local or /opt is
recommended. The second tarball will extract to bin/, share/, etc.
15.2 On Windows
Compiling
If you downloaded the ParaView source distribution from the web site, extract the distribution
from the file you downloaded using either the tar command from the command-line or the
WinZip application.
Run the CMakeSetup application that you installed after you downloaded the installation file
from the CMake web site. From the Build For drop-down menu on the right, select which
compiler you will be using. Use the Browse… buttons (or the entry boxes) at the top of the
interface to select the location of the ParaView source code and the directory in which to
build the application. (The build directory is typically called something like ParaView-build.)
If you enter the name of a build directory that does not yet exist, CMakeSetup will prompt
you about whether it should create this directory for you. Change any necessary build
parameters for ParaView. (The default parameters are appropriate in most cases.) Click the
Configure button. In some cases, changing one parameter may cause more to need to be
specified. CMakeSetup will highlight values in red that you may need to change. (For
examples, if you set VTK_USE_MPI to ON, you may need to specify the directory where
your MPI distribution is located.) When no more values are highlighted in red, the OK button
will be enabled. Click it to generate the necessary file(s) for building ParaView. If you are
using Visual Studio, load the workspace (.dsw) or solution (.sln) file into Visual Studio.
Select the ALL_BUILD project and build it.
174 Compiling / Installing ParaView
There is not a make install option on Windows, so run the ParaView application from
the directory where you built it. The directory will be either ParaView-
build/bin/Debug or ParaView-build/bin/Release depending on which option
you selected when you built ParaView.
Installing
Select the Windows installer for the appropriate version of ParaView from the web site’s
download page. Save the installation executable to disk. Run the application from its saved
location. Follow the prompts to configure the ParaView installation.
15.3 On Macintosh
To run ParaView on a Macintosh system, you must build the application from source code.
Your system must be running a version of OS X at least as recent as Panther, and you must
use XWindows. Once these requirements are met, follow the instructions for building
ParaView on a unix system.
Chapter 16
ParaView XML
ParaView parses XML files to make the appropriate readers, sources, and filters available
within ParaView. There are two types of XML files ParaView uses: one for creating the user
interface for each reader, source, and filter, and another for creating the server manager
properties corresponding to each widget. There is also an XML file for adding camera
manipulators to ParaView (e.g., rotate, roll, pan). Its format is the same as for adding other
user interface components. In this chapter, we will first discuss the available tags for each
type of XML file. Then we will discuss the steps necessary to add a new module to ParaView
and demonstrate adding such a module.
Modules
<Module> </Module>: These are the tags that begin and end each ParaView module (a
reader, a source, or a filter).
176 ParaView XML
• root_name: This required attribute is the basis for forming unique identifiers for
the various readers, sources, and filters you create in ParaView (e.g.,
root_name="VectorText").
• module_type: The acceptable values for this required attribute are Reader,
Source, and Filter, indicating to which type of module the current XML
description belongs.
• extensions: This attribute is required for reader modules. It specifies the valid
file extensions for this type of reader.
the input remains visible (i.e., replace_input="0"). Setting the value to "1"
produces the default behavior.
• long_help: The value of this attribute is the text string that appears in the
Description label near the top of the Parameters tab of the data property sheet for
this module.
• short_help: The value of this attribute is the text string shown in the status bar
when a source or filter is highlighted in the appropriate menu.
Source is a sub-element of Module used for readers and sources. It has one attribute,
class, which specifies the name of the VTK class created by this module.
Filter is the corresponding sub-element for filter modules. It also has a class attribute
and contains the sub-element Input. The Input element has the following attributes.
• name: This is an XML identifier for this element. In most cases it is set to the value
"Input". "Source" is also be used when a filter has a secondary input. For
example, in the Glyph filter, the Input element for the data set being glyphed uses
the name "Input". The Input element for the glyph being placed at various
points in the data set is named "Source".
• class: The value of this attribute is the name of the VTK class acceptable as input
to this filter. Following is a list of the name of the VTK class associated with the
various data set types in ParaView.
• quantity: Most filters in ParaView take only one input. To indicate that multiple
inputs should be allowed, the value of this attribute should be "multiple".
The Input element may have sub-elements that put further restrictions on the type of input
accepted by this filter. The three possible sub-elements are as follows.
178 ParaView XML
• ArrayRequirement: When this requirement is listed, the input to this filter must
have attributes that meet the specified qualifications. The attribute called
"attribute" specifies whether point-centered or cell-centered attributes are
required (i.e., attribute="Point" or attribute="Cell"). You can use the
components attribute to specify the number of components the required array
must have (e.g., components="3").
• FixedTypeRequirement: Use this requirement to indicate that the data set type
of the output of this filter cannot change once it has been created. This is useful for
filters that accept inputs with multiple data set types.
The text enclosed within the Documentation tags provides more extensive information
about this module.
The remaining sub-elements of a Module element are various types of widgets displayed on
the Properties tab of the data property sheet for this module. For the widgets that use server
manager properties, the property attribute is required. (3D widgets, the container widget,
and the dummy widget do not use server manager properties.) The value of this attribute must
match that of the name attribute of the corresponding server manager property. Only the type
name of the associated server manager property (i.e., the server manager property’s class
name "vtkSM" removed) will be listed as a description of the property attribute for each
widget. A few widgets require multiple server manager properties. These attributes may have
different names, but only the type of the server manager property will be listed as an
explanation of the attribute. The XML for the server manager properties is described in the
next major section of this chapter. The interaction between widgets and server manager
properties is discussed in more detail in chapter 19.
A few additional attributes are available for all widgets, as described below.
• help: The value of this attribute is a text string that is displayed when the cursor
rests over this widget.
• suppress_reset: This allows this widget to get its initial value from the VTK
reader, source, or filter before the Accept button is pressed rather than getting the
value from the corresponding property.
16.1 User Interface XML 179
• id: This is an identifier for this widget that other widgets can access. This is useful
when one widget depends on another.
The following is a list of the widgets available in ParaView and the XML associated with
each. After each widget in the following list is a description of attributes specific to it.
• ArrayMenu: An array menu allows you to select from the input an attribute array
on which to operate. This widget only works with filters.
label: The label is the text string that appears to the left of the array
menu on the user interface (e.g., "Scalars" in the example above). This
is a required attribute.
property: StringVectorProperty
label_text: This attribute determines the label at the top of the frame
containing the array names and check boxes (e.g., "Point Arrays" in
the example above).
property: StringVectorProperty
• BoundsDisplay: The bounds display widget is a label that lists the minimum and
maximum coordinates in each dimension (X, Y, and Z) of the input data set.
label: This attribute determines the label at the top of the frame
containing the list of the bounds of the input data set (e.g., "Input
Bounds" in the example above).
input_menu: This widget depends on the value of the input menu of the
filter using this widget to determine the bounds to display. This value must
match the id value of the InputMenu XML element in this module.
property: DoubleVectorProperty
• BoxWidget: The box widget is a 3D widget, so it has both user interface and
display area components. Its uses are discussed and an image of its user interface is
shown in section 6.4.
use_label: This attribute of the box widget determines whether the label
3D Widget is displayed at the top of the user interface portion of this
widget. (A value of "0" means that the label is not displayed; a value of
"1" causes it to be shown.)
<CalculatorWidget trace_name="Equation"
function_property="Function"
182 ParaView XML
scalar_property="AddScalarVariable"
vector_property="AddVectorVariable"
attribute_mode_property="AttributeMode"
help="Enter the equation for the new
array."/>
<ContainerWidget trace_name="ScalarClip">
<Item>
<ScalarRangeLabel property="Value"
trace_name="ScalarRange"
16.1 User Interface XML 183
array_menu="it3.am1"/>
</Item>
<Item id="it3">
<ArrayMenu id="am1" property="SelectInputScalars"
trace_name="Scalars" label="Scalars"
help="Choose the clipping scalar array."
input_menu="im1"/>
</Item>
<Item>
<VectorEntry label="Clip value" trace_name="Offset"
type="float" property="Value"
help="Choose the scalar value to clip
with"/>
</Item>
</ContainerWidget>
• ContourEntry: In ParaView, the contour entry is used for adding values at which
to create isosurfaces.
label: This required attribute determines the label shown at the top of the
contour widget ("Contour Values" in the image above).
property: DoubleVectorProperty
• CutEntry: This widget appears identical to the contour entry except for the label at
the top of the widget. It allows you to specify an offset (in the coordinates of the data
set) from the cut you specified in the Cut filter. Adding more than one offset value
produces multiple cuts in the data set.
label: This required attribute determines the label shown at the top of the
contour widget.
property: DoubleVectorProperty
• DummyWidget: The dummy widget is essentially a place holder. It does not add
anything to ParaView’s user interface. It is used as a sub-widget of a select widget
16.1 User Interface XML 185
when a particular selection does not need to display any new widgets. The select
widget is described later in this section.
<DummyWidget trace_name="Dummy"/>
Figure 119. Select the minimum and maximum extent in each dimension.
<ExtentEntry label="VOI"
trace_name="VOI"
property="VOI"
input_menu="im"
help="Set the min/max values of the volume of
interest (VOI). The output will have the (I,J,K) extent
specified here."/>
label: The value of this attribute determines the text string that appears at
the top of this widget ("VOI" in the example above).
property: IntVectorProperty
• ExtractPartsWidget: The extract parts widget is intended for use with the
Extract Parts filter. It allows you to extract one or more parts from a multi-part data
set.
186 ParaView XML
Figure 120. Extracting the first and third parts from a group of 3
<ExtractPartsWidget trace_name="parts"
property="InputMask"
help="Choose the parts to extract."/>
property: IntVectorProperty
• FieldMenu: This widget allows you to select whether to operate on the point-
centered or cell-centered attributes in the input data set.
Figure 121. Run this filter using the input's point data arrays
<FieldMenu id="fm"
trace_name="FieldMenu"
input_menu="im"
property="AttributeMode"
help="Choose cell or point field to threshold." />
property: IntVectorProperty
• FileEntry: The file entry is used by reader modules to select the file name of the
data set to be loaded.
label: Use this attribute to indicate the label that appears to the left of the
file name entry box ("Filename" in the example above).
extension: This required attribute determines the file extension that will
be used when selecting a new data file using the Browse button to the right
of the file name entry box.
property: StringVectorProperty
• GroupInputsWidget: The group inputs widget is intended for use with the
Group Parts filter. It allows you to group one or more data sets to form a multi-part
data set. It does not have any unique attributes.
<GroupInputsWidget trace_name="inputs"
help="Choose inputs to group."/>
<ImplicitPlaneWidget trace_name="Plane"
use_label="0"
input_menu="im1"
help="Adjusts the parameters of the
plane to cut with."/>
• InputMenu: The input menu allows you to select the data set to use as input to a
filter.
label: This required attribute determines the text string displayed to the
left of the menu ("Input" in the example above).
input_name: The input name is used for identifying the input data set to
the instance of vtkPVSource using it as input.
property: InputProperty
• LabeledToggle: The labeled toggle widget adds a check box to the ParaView
user interface to toggle the value of a particular variable.
label: This is the text string that appears to the left of the check box
("Random Masking" in the above image).
property: IntVectorProperty
<LineSourceWidget trace_name="Line"/>
• LineWidget: The line widget is a 3D widget, so it has both user interface and
display area components. Its uses are discussed and an image of its user interface is
shown in section 6.4.
<LineWidget trace_name="Line"
point1_variable="LowPoint"
point2_variable="HighPoint"
point1_label="Low Point"
point2_label="High Point"
use_label="0"
show_resolution="0"
help="Set the minimum and maximum point for
elevation"/>
point1_label: The value of this attribute is the text string that appears
to the left of the point 1 entry boxes.
point2_label: The value of this attribute is the text string that appears
to the left of the point 2 entry boxes.
use_label: This attribute of the line widget determines whether the label
3D Widget is displayed at the top of the user interface portion of this
widget. (A value of "0" means that the label is not displayed; a value of
"1" causes it to be shown.)
• MinMax: A min max widget is a pair of sliders marking the minimum and maximum
of a range of values.
<MinMax trace_name="MinMax"
array_menu="am"
property="ThresholdBetween"
min_label="Lower Threshold"
max_label="Upper Threshold"
min_help="Choose the lower value of the
threshold"
max_help="Choose the upper value of the
threshold"/>
min_label: The value of this attribute is the text string that appears to the
left of the first scale in the min max widget.
max_label: The value of this attribute is the text string that appears to the
left of the second scale in the min max widget.
scalar_property: StringVectorProperty
vector_property: StringVectorProperty
orient_mode_property: IntVectorProperty
scale_mode_property: IntVectorProperty
scale_factor_property: DoubleVectorProperty
<PointSourceWidget trace_name="Point"
default_radius="0"
default_number_of_points="1"
show_entries="0"/>
unnecessary. The value of this attribute must match the id value of the
InputMenu XML element in this module.
• PointWidget: The point widget is a 3D widget, so it has both user interface and
display area components. Its uses are discussed and its user interface is displayed in
section 6.4.
• ScalarRangeLabel: The scalar range label displays the range of values stored in
a single-component attribute array.
<ScalarRangeLabel property="Value"
trace_name="ScalarRange"
array_menu="it3.am1"/>
property: DoubleVectorProperty
• Scale: The scale widget displays a slider from which you can select the value of
the associated variable.
The following XML attributes are associated with the scale widget.
label: This is the text string that appears to the left of the slider
("Shrink factor" in the above image).
<ScaleFactorEntry label="Width"
property="Width"
input_menu="im"
trace_name="Width"
scale_factor="0.01"
help="The half width of the ribbon (or
minimum)."/>
The attributes supported by the scale factor entry are listed below.
label: This is the text string that appears to the left of the slider
("Radius factor" in the above image).
property: DoubleVectorProperty
<SelectCTHArrays input_menu="im"
trace_name="ArraySelection"
property="AddVolumeArrayName"
help="Select the volume fraction arrays for
generating parts."/>
property: StringVectorProperty
• SelectionList: The selection list is a menu that provides you with a list of
possible values for a particular variable.
<SelectionList property="Plane"
trace_name="Plane"
label="Plane"
help="Select which plane of the bounding box
to reflect across">
<Item name="X" value="6"/>
<Item name="Y" value="7"/>
<Item name="Z" value="8"/>
<Item name="X Min" value="0"/>
<Item name="Y Min" value="1"/>
<Item name="Z Min" value="2"/>
<Item name="X Max" value="3"/>
<Item name="Y Max" value="4"/>
<Item name="Z Max" value="5"/>
</SelectionList>
label: This is the text string that appears to the left of the menu button
("Plane" in the above image).
16.1 User Interface XML 197
property: IntVectorProperty
The values in the selection list are added as sub-elements. Each sub-element is
enclosed in <Item> </Item> tags. The attributes you need to specify per sub-
element are name (the entry to display in the menu) and value (the integer value to
assign to the variable being controlled if this menu entry is selected).
• SelectTimeSet: This widget was designed specifically for use with the EnSight
readers. It allows you to select the time value you wish to load from the list of time
values included in the data file.
Figure 133. Choose the appropriate time value to load from the data file.
The select time set widget uses the XML attributes described below.
label: This is the text string that appears above the time selection box
("Select time value" in the above image).
property: DoubleVectorProperty
• SelectWidget: The select widget allows you to select different groups of widgets
to perform a desired task. A group of widgets is selected based on the value of the
menu button in the upper left corner of the select widget.
198 ParaView XML
Figure 134. The controls for the cut function change based on the menu item chosen.
label: This is the text string that appears above the frame of the select
widget ("Cut Function" in the above image).
The sub-widgets in the select widget are added as sub-elements. Each sub-element is
enclosed in <Item> </Item> tags. The attributes you need to specify per sub-
element are name (the entry to display in the menu) and value (the integer value to
16.1 User Interface XML 199
assign to the variable being controlled if this menu entry is selected). Each of these
sub-widgets will have their own sub-widgets – the widget group selected based on
the value of the menu button in the upper left corner of this select widget.
<SphereWidget use_label="0"
trace_name="Sphere"
help="Adjusts the parameters of the sphere to
clip with."/>
The sphere widget has only one unique attribute, as described below.
<StringEntry property="ResultArrayName"
trace_name="ResultArray"
label="Result Array Name"
help="Set the name of the array to hold the
results of this computation"/>
label: This is the text string that appears to the left of the text entry
("Result Array Name" in the above image).
property: StringVectorProperty
property: DoubleVectorProperty
label: This is the text string that appears to the left of the entry box
("Radius" in the above image).
Figure 138. Choose the center using the three entry boxes.
length: This attribute specifies how many entry boxes should be included
in this vector entry. The length should match the number of components in
the variable you are trying to set. In the example above, Center is a 3D
coordinate, so the length of the vector entry is 3.
label: This is the text string that appears to the left of the entry box(es)
("Center" in the above image).
each parameter, this widget provides a slider for selecting the number of iterations
you wish to read.
<XDMFParameters trace_name="xdmf_parameters"
property="ParameterIndex"
label="Parameters" />
label: This is the text string that appears above the frame containing the
sliders for the XDMF parameters ("Parameters" in the above image).
property: StringVectorProperty
Writers
ParaView’s data file writers are specified in their own XML file (Writers.xml). There is a
Writer XML element per data writer. All writers use the first five attributes listed below;
the final two attributes are optional.
• input: The value of this attribute is the name of the VTK class acceptable as input
to this data writer.
• class: This attribute specifies the appropriate ParaView writer class (e.g.,
class="vtkPVWriter").
• writer: This is the name of the VTK class created when this writer is instantiated.
16.2 Server Manager XML 203
• extension: This attribute specifies the valid file extensions for this type of writer.
• parallel: This attribute indicates whether this writer works in parallel. The
default is"0".
Manipulators
The camera manipulators in ParaView are also added using XML (Manipulators.xml).
Each camera manipulator is described using a Manipulator element. Each element has the
following three attributes.
• name: This is the name of the camera manipulator that appears in the menu buttons
in the Camera Control for 2D Movements and Camera Control for 3D Movements
sections located on the Camera tab of the 3D View Properties property sheet.
• class: The value of this attribute is the name of the ParaView C++ class that
defines this type of camera manipulation. All the classes listed are subclasses of
vtkPVCameraManipulator.
Each widget associated with each reader, source, and filter has a server manager property.
(Some widgets have more than one, as shown in the user interface XML description.) These
properties are sub-elements of SourceProxy. The following attributes are valid for all
server manager properties. (The first two are required.)
• name: This is the name of this server manager property specified by the property
attribute in the user interface XML.
• command: This attribute lists the name of the method to invoke on the reader,
source, or filter containing this property.
• update_self: If this attribute is set to "1", then the command is called on the
proxy using this property rather than on the VTK object residing on the server.
• default_values: This attribute allows the user to specify default values for each
element in this property. For example, for a DoubleVectorProperty containing
three elements, setting this attribute to "0.0 0.0 0.0" would initialize all three
of these elements to 0.0.
• repeat_command: Set this attribute to "1" if the command for this property
should be called multiple times (e.g., once per element). This attribute’s default
value is "0".
Following is a description of the XML for each type of server manager property, including a
description of the domain and information helper types used with each property. Both
domains and information helpers are sub-elements of their respective properties.
Each domain type is associated with only one type of property. Domains represent the
possible values a property may have. A property may have more than one domain. Some
domains also have required properties on which they depend. (For example, a domain which
lists the possible scalar arrays on which a filter may also depend on the InputProperty of
that filter.) Some widgets in ParaView (in ParaView/GUI/Client) require that the
domains they use have a specific value for the name attribute. Check the source code of the
particular widget you are using to determine if this is the case. (Look for a call to
GetDomain in the Update method of the widget class.) Any domain may use the attribute
optional with a value of "1" to indicate that this domain provides information (e.g., to
initialize the user interface) rather than to restrict the value of the property.
206 ParaView XML
<BoundsDomain name="bounds">
<RequiredProperties>
<Property name="Input" function="Input"/>
</RequiredProperties>
</BoundsDomain>
<ArrayRangeDomain name="scalar_range">
<RequiredProperties>
<Property name="Input" function="Input"/>
<Property name="SelectInputScalars"
function="ArraySelection"/>
</RequiredProperties>
</ArrayRangeDomain>
<EnumerationDomain>
<Entry value="0" text="X Min"/>
<Entry value="1" text="Y Min"/>
<Entry value="2" text="Z Min"/>
<Entry value="3" text="X Max"/>
<Entry value="4" text="Y Max"/>
<Entry value="5" text="Z Max"/>
</EnumerationDomain>
<ArrayListDomain name="array_list"
attribute_type="Scalars">
<RequiredProperties>
<Property name="Input" function="Input"/>
<Property name="AttributeMode"
function="FieldDataSelection"/>
</RequiredProperties>
</ArrayListDomain>
property) from which it retrieves the list of array names. This domain is
used when selecting which data arrays to load from a file.
<ProxyGroupDomain name="groups">
<Group name="sources"/>
210 ParaView XML
<Group name="filters"/>
</ProxyGroupDomain>
<DataTypeDomain name="input_type">
<DataType value="vtkImageData"/>
<DataType value="vtkRectilinearGrid"/>
<DataType value="vtkStructuredPoints"/>
<DataType value="vtkStructuredGrid"/>
</DataTypeDomain>
Rendering
In rendering.xml, the two main sub-elements of ProxyGroup are DisplayerProxy
and DisplayWindowProxy. In ParaView, a DisplayerProxy is created for each item
rendered. A DisplayerProxy manages the geometry filter (for converting any data set to
polygons), mapper, actor, and VTK property. It must be added to the
DisplayWindowProxy in order to be rendered.
Each of these proxies uses <SubProxy> </SubProxy> tags to indicate the beginning and
ending of each type of object it manages (e.g., renderer, actor, etc.). These objects use the
element type Proxy. Each Proxy element has a name and class attribute, just as the
SourceProxy did in the previous section.
Most of the sub-elements of Proxy are the same types of properties and domains as for
source, readers, and filters. The only additional sub-element is of type Property. The
attributes name, command, and immediate_update are defined for it. If
immediate_update is set to "1", then the value of this property is passed to the server as
soon as it changes. Otherwise an update event must occur in order for the property value to be
passed.
Utilities
The proxies contained in utilities.xml are general-purpose, and are usually used by properties
that need to pass a VTK object (rather than an int, float, or string) as a parameter of their
command. To do this, a ProxyProperty is added to a proxy. Its sub-element is
ProxyGroupDomain, whose sub-element is Group. The Group element indicates to
which proxy group the proxy being passed to the server belongs. (See ProxyProperty in
the Readers, Sources, and Filters section.)
The LookupTableProxy is the only new type of proxy used in utilities.xml. The
name and class attributes are defined for it. This proxy is used by the proxy for a mapper
(a sub-proxy of DisplayerProxy).
212 ParaView XML
<ModuleInterfaces>
<ServerManagerFile name="Package.pvsm"/>
…
</ModuleInterfaces>
Notice that the extension .pvsm is used for the server manager XML file in the above
example. If you are using PV_INTERFACE_PATH to load your XML files, it is important
that the server manager files use this extension. Files with the .xml file extension are treated
as user interface XML files. The file extension is less important if you use the Import
Package option on the File menu as long as the user interface XML file is the one you
attempt to open in this manner. The file .pvsm file extension was not necessary in the
previous section because these files are compiled into ParaView, not read from a file at run
time.
If the XML files for your new modules reference C++ classes that are not compiled into
ParaView, you will first need to compile your classes into a library, as described in
ParaView/Examples/PVLocal/README.txt. Then you will need to add another new
XML element, Library, to the user interface XML file to indicate the location of the new
library to load. The Library element has two attributes, name (the name of the library, not
including the extension) and directory (the directory containing the library). This element
should come just before the ServerManagerFile element.
<ModuleInterfaces>
<Library name="Package" directory="/Path/to/Library/"
<ServerManagerFile name="Package.pvsm"/>
…
</ModuleInterfaces>
Chapter 17
As a ParaView developer, it may be necessary for you to make changes to ParaView’s user
interface that cannot be accomplished through XML. For example, you may want to add a
button to one of the property sheets not associated with a data set or add a new menu option.
To accomplish either of these tasks, there are several important classes in ParaView that you
must be familiar with. This chapter will discuss these classes and their interactions with one
another. Using this information, it will also demonstrate how to add new user interface items
(widgets) to ParaView’s GUI.
vtkKWPushButton *PrintColorButton;
this->PrintColorButton = vtkKWPushButton::New();
In the destructor, be sure to delete this instance variable by calling Delete() on it. Once the
object has been deleted, set its pointer to NULL. This helps to make the ParaView code safer
because often we compare the value of an instance variable to NULL to determine whether it
has been initialized.
17.2 Add a Button 215
this->PrintColorButton->Delete();
this->PrintColorButton = NULL;
this->PrintColorButton->SetParent(
this->ColorsFrame->GetFrame());
this->PrintColorButton->Create(pvapp, "");
this->PrintColorButton->SetLabel("Print Color");
this->PrintColorButton->SetCommand(this, "PrintColor");
this->Script(
"pack %s -side top -padx 15 -pady 4 -expand 1 -fill x",
this->PrintColorButton->GetWidgetName());
The first line in the above code fragment uses the SetParent() method to specify within
which widget our new button should be displayed. In this case, we have chosen to place it in
the same frame as the Set Background Color button. The frame containing this button is
defined and created in vtkKWView, the superclass of vtkPVRenderView. The next line
uses the Create() method to create a button in the Tcl/Tk scripting language in which
ParaView’s user interface is written. The SetLabel() method used in the next line
determines the text that will be displayed on the button we are creating. The
SetCommand() method specifies the method that will be called when this button is clicked.
Our next task will be to create this method in C++. The last line in this code fragment uses
Tcl/Tk’s pack functionality to display the button in the user interface.
In order for this new button to perform the desired task when it is pressed, we need to add a
new method to vtkPVRenderView called PrintColor. Add the declaration of this
method in the public portion of the class definition in vtkPVRenderView.h.
void PrintColor();
void vtkPVRenderView::PrintColor()
{
216 Modifying the User Interface
Once you have made these changes in the code, you will need to recompile ParaView in order
for the changes to take effect. The next time you run ParaView, the top of the General tab of
the 3D View Properties property sheet should look similar to the image below. Pressing the
Print Color button should cause ParaView to display in the console window three values
representing the red, green, and blue components of the background color of the display area.
this->MainView->MakeSelected();
this->MenuFile->InsertCommand(this->GetFileMenuIndex(),
"Save Window Image", this,
"SaveWindowAsImage", 1,
"Save the ParaView window to an
image.");
17.3 Add a Menu Item 217
This command adds a new entry to the File menu with the name Save View Image as shown
in the image below. The first parameter of this command gets the index of the last entry added
to the file menu (Save View Image in our case). The next parameter specifies the text that
will appear in the menu. The following two parameters indicate an object and a method to use
when this menu entry is selected. The method will be called on the specified object. The next
parameter specifies where the underscore will be displayed in the name of the menu entry,
allowing quick access to this menu option. The final entry is a help string that will appear in
the status bar when the mouse is positioned over this menu entry.
Figure 141. File menu with new "Save Window Image" entry added
void SaveWindowAsImage();
void vtkPVWindow::SaveWindowAsImage()
{
char *fileName = NULL;
vtkKWLoadSaveDialog *saveDlg = vtkKWLoadSaveDialog::New();
saveDlg->Create(this->GetApplication(), 0);
saveDlg->SaveDialogOn();
saveDlg->SetParent(this);
218 Modifying the User Interface
saveDlg->Delete();
delete [] fileName;
}
If the format of your data files is not one supported by default in ParaView (see section 3.2),
you will either need to convert your data to a format ParaView can read, or you must write
your own data file reader for ParaView. The reader must operate within a standard VTK
pipeline. In this chapter, we will discuss integrating the new reader class into VTK, including
outlining which C++ methods should be overwritten for the reader to work properly. The
necessary user interface and server manager XML will be described. Creating parallel readers
and readers that output multiple parts will also be covered. For VTK information beyond the
scope of the chapter, see The VTK User’s Guide by Kitware, Inc. (especially chapter 10,
“Managing Pipeline Execution”, and chapter 12, “How to Write a Process Object”).
Execute: This method is where the data is read and assigned to an appropriate VTK data set
type: vtkPolyData, vtkUnstructuredGrid, vtkImageData,
vtkRectilinearGrid, or vtkStructuredGrid. It also has no return value. To
retrieve the data set to which to assign the values read from the file, use the GetOutput
method of vtkSource, and cast the results to the appropriate data set type. (See next
subsection below for an explanation of using GetOutput.) If GetOutput returns NULL,
then you must create a new data set of the appropriate type, and call either SetOutput (if
there is only one output from this reader) or SetNthOutput (if this reader supports
multiple outputs). SetNthOutput takes two parameters; the first is the index of the data set
(numbered from 0), and the second is a pointer to the data set. The code for handing the case
when GetOutput returns NULL is shown below.
vtkUnstructuredGrid *output =
(vtkUnstructuredGrid*)(this->GetOutput());
if ( ! output )
{
vtkUnstructuredGrid *newOutput = vtkUnstructuredGrid::New();
this->SetOutput(newOutput);
output = (vtkUnstructuredGrid*)(this->GetOutput());
newOutput->Delete();
}
In the above code segment, you will notice the use of New() and Delete() instead of
directly calling the constructor and destructor of vtkUnstructuredGrid. These methods
are used in VTK to allow for reference-counting. The constructor and destructor for each class
are protected, so they cannot be called directly from user’s code. When New is called, the
constructor of the class is called, and the reference count of the new object is set to 1. When
Delete is called, the reference count is decremented, and if the reference count is 0, the
destructor is called. Because SetOutput increments the reference count of newOutput,
we can safely call Delete on it once this method has been called.
The following additional methods should be defined for your new reader.
GetOutput: Your reader should actually implement two methods with this name; one takes
no parameters, and the other takes an output index. The second is especially necessary for
readers that produce more than one output. It should return NULL is the requested index is
larger than the number of outputs created. The return value of these two methods is a pointer
to vtkDataObject or one of its subclasses. One of the subclasses (e.g., vtkPolyData,
vtkUnstructuredGrid, etc.) should be used if your reader only produces data of a
single VTK data set type.
18.2 Multiple Outputs 223
CanReadFile: The purpose of this method is to determine whether this reader can read a
specified data file. Its input parameter is a const char* containing the name of a data file.
In this method you should not actually read the data but determine whether it in the correct
format to be read by this reader. This method should return an integer value: 1 indicates that
the specified file is of the correct type; 0 indicates it is not. It is not absolutely required that
this method be implemented, but ParaView will make use of it if it exists.
SetFileName: This method allows you to specify the name of the data file to be loaded by
your reader. The method is not required to have this exact name, but a method with this
functionality must be implemented. The easiest way to implement SetFileName is with a
vtkSetStringMacro in the header file for this class. (There is also an associated
vtkGetStringMacro for implementing GetFileName.) This method handles allocating
an array to contain the file name, and lets the reader know that the pipeline should be updated
when the name is changed.
vtkSetStringMacro(FileName);
When using this macro, you must also add a FileName instance variable of type char* in
the protected section of this class. In the constructor for your reader, assign FileName
the value NULL before you use SetFileName for the first time.
nmArray->Delete();
As in the code segment in the previous section, New and Delete methods are used in place
of standard constructors and destructors. The SetNumberOfTuples method called on
nmArray specifies the number of char’s to allocate in the vtkCharArray. The next to
last line in the above code segment adds the array containing the part name to output’s
FieldData. Each data set created in VTK may contain field data, and information about the
whole data set (e.g., its name) may be contained there. To add more information to a
FieldData, create a new array containing the desired information, and add the array to the
FieldData. By default, ParaView ignores the information contained in a data set’s
FieldData, but code has been specifically added to handle the case of naming a data set.
<Module name="HDF5RawImageReader"
root_name="HDF5RawImageReader"
output="vtkImageData"
class="vtkPVAdvancedReaderModule"
module_type="Reader"
extensions=".h5"
file_description="HDF5 Raw ImageData Files">
<Source class="vtkHDF5RawImageReader"/>
<VectorEntry length="3" label="Stride"
property="Stride" trace_name="Stride" type="int"
help="Read a subset of data spaced by the
stride."/>
<ArraySelection label_text="Point Arrays"
property="PointArrayStatus"
trace_name="PointArrays"/>
</Module>
The name of the module is a unique XML identifier. The root_name is used by ParaView
to create a unique name for each instance of this reader within a ParaView session. The
18.4 Required XML 225
output attribute lists the data set type of the output of this reader. The class is the name
of the C++ reader module class being used (vtkPVAdvancedReaderModule, in this
case). vtkPVReaderModule should be used if there are no parameters (other than the file
name) which can be set on this reader prior to actually reading the file(s). Use
vtkPVAdvancedReaderModule is there are other parameters of this reader that the user may
set (e.g., in this example, Stride and PointArrays).
The module_type for any ParaView reader will be "Reader" (as opposed to "Source"
or "Filter"). The extensions attribute lists the file extensions that should be associated
with this reader. The file_description attribute is used for indicating the description of
files that are read by this reader; this description will be listed beside the extension(s) in a file
dialog box for selecting a data file to load.
The class attribute of Source lists the C++ class name of the new ParaView reader you
have written. The sub-elements after Source allow ParaView to create the appropriate user
interface widgets for setting parameters of this reader. See section 16.1 for a complete list of
the widgets (and required user interface XML code per widget) that ParaView supports.
Notice that the property attribute of the user interface XML element for each widget
matches a Property (e.g., StringVectorProperty) name attribute in the server
manager XML (shown below).
This is the server manager XML code for the same reader. (Both types of XML code are
required for adding a new reader module.) A few parts of this XML code segment are
particularly worth noting, and more extensive information about server manager XML code
can be found in section 16.2. First, notice the StringVectorProperty element named
"FileName". It has a command attribute called "SetFileName". When the file name
of this reader is changed from the user interface, and the Accept button is pressed, this
command will be called.
GetPointArrayName: This method takes a single parameter – the array’s index (starting
from 0). This method returns the name of the array (a const char*) with this index or
NULL if the array has no name or if the index is larger than the number of arrays. For cell-
centered arrays, the method should be called GetCellArrayName.
<SourceProxy name="HDF5RawImageReader"
class="vtkHDF5RawImageReader">
<StringVectorProperty name="FileName" command="SetFileName"
number_of_elements="1">
<StringListDomain name="files"/>
</StringVectorProperty>
<StringVectorProperty name="PointArrayInfo"
information_only="1">
<ArraySelectionInformationHelper attribute_name="Point"/>
</StringVectorProperty>
<StringVectorProperty name="PointArrayStatus"
command="SetPointArrayStatus"
number_of_elements="0"
repeat_command="1"
number_of_elements_per_command="2"
element_types="2 0"
information_property="PointArrayInfo">
<ArraySelectionDomain name="array_list">
<RequiredProperties>
<Property name="PointArrayInfo" function="ArrayList"/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
20.1 Overview
The VTK Client-Server language is a platform-independent interpreted language capable of
creating, using, and destroying VTK objects. A client generates programs and sends them to a
server where they are executed by an interpreter. The server may or may not be the same
process, running on the same machine, or even running on the same platform as the client. In
ParaView, the server manager plays the role of the client and uses this language to drive VTK
on the ParaView server processes.
Messages are inserted into a stream by C++ code. The following example shows how the
stream in the above table can be constructed:
In this case, the messages are added into the stream held by the process module. The
GetStream method returns a reference to the stream which is then used to add a message.
Commands
Commands are enumerated by the vtkClientServerStream class definition:
In general, only the New, Invoke, Delete, and Assign commands are used in
constructing streams. The Reply and Error commands are stored in result streams created
by the interpreter after processing messages with other commands.
Arguments
Argument value types are enumerated by the vtkClientServerStream class definition:
int r = 12;
pm->GetStream() << vtkClientServerStream::Invoke
<< this->SourceID << “SetResolution” << r
<< vtkClientServerStream::End;
Arrays of fundamental types must be inserted using a syntax that includes specification of
length:
When this example is processed by the interpreter, the SetSpacing method will be called
with one argument consisting of a pointer to an array of three double values.
another process. This means that a pointer to a VTK object should not be added as an
argument in a stream except in cases when the stream will be interpreted only on the local
process. Such cases occur frequently inside the interpreter implementation as described
below, but otherwise rarely appear.
… …
… …
In this example, a pipeline connection is made without any need for the code that constructs
this stream to know what is returned by the GetOutput method.
vtkClientServerID id = pm->GetUniqueID();
pm->GetStream() << vtkClientServerStream::New
<< “vtkObject” << id
<< vtkClientServerStream::End;
// ... call methods ...
pm->GetStream() << vtkClientServerStream::Delete << id
<< vtkClientServerStream::End;
Since this pair of operations is so common, and the form of the code is always the same, the
process module provides special methods to simplify them. The standard way to create and
destroy an object uses these methods:
vtkClientServerID id = pm->NewStreamObject(“vtkObject”);
// ... call methods ...
pm->DeleteStreamObject(id);
Each of the above examples is equivalent to the other. In both cases, the code shown only
adds the messages to the stream and does not send the stream to any node. The process
module must still be asked explicitly to send the stream.
234 The VTK Client-Server Language
A server-side C++ class corresponding to the server manager class is created to hold the
method. By convention, this server-side class is given the same name as the server manger
class, but with a “vtkPVServer” prefix. Since many of these server-side classes need to
20.6 Server Helper Objects 235
have pointers to the process module on their own process, a standard superclass called
vtkPVServerObject is provided for them that holds this pointer.
// Description:
// Return the amount of memory allocated for an object.
long ComputeMemoryUsage(vtkDataObject*);
// ...
};
This class internally may or may not know about ParaView. Its code will execute on a server
node and can take full advantage of having real C++ pointers to the objects on the server.
void vtkPVMemory::CreateServerSide()
{
if(!this->ServerSideID.ID)
{
vtkPVProcessModule* pm = this->GetProcessModule();
236 The VTK Client-Server Language
this->ServerSideID =
pm->NewStreamObject(“vtkPVServerMemory”);
pm->GetStream() << vtkClientServerStream::Invoke
<< this->ServerSideID << "SetProcessModule"
<< pm->GetProcessModuleID()
<< vtkClientServerStream::End;
pm->SendStream(vtkProcessModule::DATA_SERVER_ROOT);
}
}
No instance of this class may exist on the server process, so it cannot directly access a
vtkDataObject through C++. Instead the ComputeMemoryUsage method uses the
server-side helper class to access the object and then gets the result from the interpreter on the
node containing the object. The CreateServerSide method creates the instance of
vtkPVServerMemory on the root node of the server if it does not exist and sets the server-
side process module pointer for it. The destructor of vtkPVMemory must destroy the server-
side helper in a similar manner.
Chapter 21
Render Modules
A ParaView render module represents all processing that is required to display and render a
data set. When a data set is loaded or generated in ParaView, it first goes through a filter to
generate a polygonal representation of the data. Then, VTK mappers, actors, properties and
lookup tables are created to render the polygonal representation. Since there are many
rendering features, including levels of detail, and ParaView can run in many distributed
modes, rendering can be quite complex. To simplify ParaView' s rendering architecture and
simplify the process of adding new rendering algorithms, an abstract render module API was
created with pluggable rendering options. Since ParaView automatically selects the
appropriate render module for its current execution mode, the user does not need to be
concerned with render modules. However, there are some optional render modules that can
be selected with a command line argument. The various sections of this chapter will help you
better understand the rendering options ParaView chooses based upon the mode in which you
are running ParaView. Such information is also helpful if you wish to write your own render
module to extend ParaView’s rendering capabilities, as described in the last section of this
chapter.
21.2 Compositing
ParaView has many options for running multi-process servers separately from the client user
interface. Each of these modes has specific rendering requirements that are implemented by
more sophisticated render modules. The two major additional features required are geometry
repartitioning and distributed sort-last rendering (compositing).
Repartitioning of geometry is necessary when the render server has fewer processes than the
data server. It is also used when geometry is transferred to the client to be rendered locally.
The VTK filter vtkMPIMoveData accomplishes all the repartitioning tasks necessary for
the multiple execution modes.
21.3 Ice-T
IceT is a tiled-display distributed-rendering library developed at Sandia National Laboratory.
ParaView makes extensive use of this library for its default render modules. IceT implements
an optimized tree-compositing algorithm. The bounds of each actor are analyzed before
rendering, and compositing is optimized by removing portions of render windows that are not
covered by geometry. Nodes with no geometry at all are completely removed from the
compositing schedule. IceT rendering modules are the default for any execution mode that
separates the client from the data or render servers.
The render server would be run with at least six processes and would be started with a
command similar to the following.
Additional command line options could be added to specify the server host name or a separate
render server as described in appendix C.
In this mode, the user interface and small render window are seen on the client, and the render
window is duplicated on the tiled display. ParaView has two modes for rendering to a tiled
display. When the rendered geometry is small, the geometry is duplicated on all nodes of the
render server and the client. Each node renders its assigned tile separately. This mode is very
fast because little communication between nodes is necessary. Only the cameras and
rendering parameters need to be synchronized. When rendered geometry becomes large, the
geometry remains distributed, and IceT is used to composite the final images. In this mode,
the client only renders a placeholder for the original large data. The decimated geometry is
collected to the client and is rendered even when interaction stops. The tiled display IceT
render module also uses image subsampling to obtain more interactive performance when the
user is manipulating the render window. The tiled displays are subsampled so that less data
needs to be moved around during interactive rendering.
The cave render module is selected with a command line argument on the client that specifies
the cave configuration file.
paraview -cave-configuration="caveConfig.txt"
The format of the cave configuration file is currently a simple text format that specifies the
display and screen position. Each display has an entry in the configuration file similar to the
following.
DISPLAY=amber1:0
240 Render Modules
The first line specifies the display environment variable. The second line is the lower left
corner of the display in cave coordinates, the third line is the lower right corner of the display
in cave coordinates, and the fourth line specifies the upper left corner in cave coordinates.
Chapter 22
Testing
To help maintain the quality of the ParaView application, a series of regression tests are run
nightly on the code, and a web-based dashboard is produced to display the results. It is
important that new tests be created when new features are added to ParaView or significant
bugs are corrected. We will discuss how to create and run these tests, and we will conclude
this chapter by looking at the ParaView dashboard.
The data used for testing should be located in the ParaView/Data directory. DataDir (in
CommandLineOptions.tcl) is set to the value ParaView/Data, so replace any instances of
the ParaView/Data directory in your Tcl script with $DataDir.
At the end of your testing script, you need to add code to set the size of the render window
used in the display area, compare the contents of the render window to the regression image,
and exit ParaView when the test completes. The following lines of Tcl code will perform
these tasks for you by loading an external Tcl script, calling a process it defines, and then
explicitly calling exit on the ParaView application.
$Application Exit
Once the test script has been written, a regression can be created for the test by running the
new test as described in the next section. To add this test to ParaView’s test suite, the test
script should be added to the ParaView/GUI/Testing/Tcl directory, and the name of
the test should be added to the PROJECT_TESTS section of the CMakeList.txt file in that
directory. Then rerun CMake on the ParaView project. Because no regression image exists for
the test yet, it will be created when the test is run the first time. The new regression image will
be located in the ParaView-build/Testing/Temporary directory (where
ParaView-build is the root of ParaView’s binary directory).
ctest –R testname
The -E option is used for excluding tests from this testing sequence. The argument is the
same type of regular expression used with the -R option. Using the -V option indicates that
the text output of these tests should be verbose. This can be especially useful in the process of
determining why a particular test is failing. In the example below, we will run all the tests
whose names contain Clip but do not contain RenderServer or MPI. These tests will be
run in verbose mode so it will be easier to determine why a test may have failed.
22.3 ParaView Dashboard 243
Using the -I option, it is possible to select by test number which tests to run. The parameters
to this option are the starting test number, the ending test number, and the stride between test
numbers (i.e., how many tests to skip). They are comma-separated. The first two parameters
default to the beginning and ending test number, so if you want to run every Nth test in the
test suite, these parameters may be left blank. This technique is used in the example below to
run only every 7th test.
ctest -I ,,7
Below the row of buttons is a link for checking which files in the ParaView source tree were
changed in the past 24 hours. It also provides information about what changes were made and
who contributed the changes.
Below that link are three sections displaying different types of building and testing results.
The first section, Nightly Builds, contains information from machines that build and test
ParaView overnight and submit the results to the dashboard daily. The next such section is
called Continuous Builds. A continuous build is started when a change is submitted to the
ParaView code repository. This is useful for giving a ParaView developer timely feedback
about the impact of the new changes. The next section is for Experimental Builds. It is
intended for platforms that the submitter is less confident about. It provides information about
how the building and testing performed on a new system, but because it is labeled
“experimental”, developers need not be quite as concerned if a build in this section fails.
The entries in each of these sections are formatted the same. Each entry lists the machine
name and compiler used for this build, any errors or warnings that happened during
compilation, and how many minutes it took for the build to complete. Next is an indication of
which tests passed, failed, were not run, or are not applicable on this platform. Immediately
following these indications is a field showing how many minutes it took for the tests to run.
The end of the line contains information about when compilation finished and when the entry
was submitted to the dashboard. The numbers indicating the number of build errors and
warnings as well as those indicating testing results are hyperlinks to more detailed
information about the building and testing on that machine.
There may also be up to two small icons to the right of the build name for each entry in the
dashboard; both are hyperlinks. Clicking the icon displays the script used to build, test, and
submit the dashboard on that machine. The icon beside it displays a dialog box indicating
what generator was used to create this dashboard entry. In most instances, the dialog box
specifies which version of ctest was used.
Following the sections for nightly, continuous, and experimental builds is a section labeled
Coverage. Each night a tool is run on the ParaView code to determine how many times each
line of code in the ParaView source tree is executed. Clicking on the Percentage number
listed takes you to a page listing coverage results for each source file. Clicking on the file
name displays the file with an indication beside each line indicating how many times it was
executed. Using the coverage information, it is possible to design new tests that exercise
previously untested lines of code.
The last section of the ParaView dashboard is called Dynamic Analysis. The information
provided in this section is the result of running Valgrind (http://valgrind.kde.org/) on the
ParaView application to check for memory problems (e.g., memory leaks or uninitialized
variables).
22.3 ParaView Dashboard 245
ctest -D Experimental
If you wish to schedule a nightly submission to the dashboard so that it is testing begins at the
same time every night, you must create a script to pass to ctest with the -S option. Put the
line shown below in a script that the scheduling program on your platform will recognize, and
use the scheduling program to set a recurring time for this script to be run.
ctest -S myTestScript.cmake -V
An example script that runs on Windows using the Microsoft Visual Studio 7 .NET 2003
compiler is shown below. Notice the -A option used in the CTEST_COMMAND. This option
posts your script (the filename following the -A option) to the appropriate line of the
dashboard, making it available from the icon.
################################################################
# The values in this section must always be provided.
################################################################
"C:/CMake20/bin/cmake.exe"
)
################################################################
# The values in this section are optional; you can either
# have them or leave them commented out.
################################################################
MAKECOMMAND:STRING=\"C:/PROGRA~1/MICROS~1.NET/Common7/IDE/devenv
.com\" ParaView.sln /build Release /project ALL_BUILD
CMAKE_MAKE_PROGRAM:FILEPATH=C:/PROGRA~1/MICROS~1.NET/Common7/IDE
/devenv.com
BUILDNAME:STRING=Win32-vs71
SITE:STRING=myComputer.mySite
BUILD_SHARED_LIBS:BOOL=OFF
CVSCOMMAND:FILEPATH=C:/cygwin/bin/cvs.exe
VTK_USE_PATENTED:BOOL=ON
BUILD_TESTING:BOOL=ON
")
################################################################
# You do not need to edit these values; they will be computed
# from the settings made above.
22.3 ParaView Dashboard 247
################################################################
SET (CTEST_SOURCE_DIRECTORY
"${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
SET (CTEST_BINARY_DIRECTORY
"${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
For additional information on testing (e.g., more advanced use of ctest, further detail about
dashboard submission options, etc.), see chapter 8 of Mastering CMake: A Cross-Platform
Build System by Ken Martin and Bill Hoffman.
Glossary
Glossary
3D Widget
Actor
Azimuth
Rotate the camera horizontally while keeping the focal point fixed.
Cell-Centered Attribute
Clipping
Cut away a portion of the data set (e.g., remove the portion of the data set that lies on
one side of a plane), usually to better see its interior.
250 Glossary
This is the data set currently being operated on by ParaView. A data set becomes
current because 1) it is the output of a reader, source, or filter for which the user has
just clicked Accept, 2) it has been chosen from the Select menu, or 3) it has been
selected from the Selection / Navigation Window.
Cutting
Extract the portion of a data set that lies on a specified plane or sphere.
Data Server
The data server is the part of the ParaView application where data sets are loaded or
created and where filters operate on that data. The data set is broken into pieces
across the processors of the data server. If a render server does not exist, each node
of the data server is also capable of rendering the results of its portion of the data set
so that a composited image can be displayed on the client (user interface).
Data Set
A data set in ParaView is created as the result of a reader, source, or filter. Each data
set can be drawn in the display area, and each has an associated data property sheet
(available from the Source entry on the View menu).
Domain
A domain in ParaView’s server manager describes the range of possible values for a
server manager property.
Elevation
Rotate the camera vertically while keeping the focal point fixed. (This is not the
sense in which “elevation” is used in the Elevation filter.)
Extent
Extents specify the image-space indices of a structured data set in the i, j, and k
dimensions. If kmax and kmin are the minimum and maximum extents in the k
direction, then kmax – kmin + 1 = number of pixels (or voxels) in the k direction.
251
Filter
A filter takes a data set as input and produces another data set as output. Filters are
used in ParaView for performing visualization tasks on the input data.
Information Helper
Lookup Table
Mapper
A mapper is a VTK entity that specifies the interface between a data set and
rendering primitives.
Module
In ParaView, a module is a reader, source, or filter and its associated user interface.
Observer
An observer is a VTK object that listens for VTK events and performs some task
based upon the event it receives.
Parallel Projection
When parallel projection is used, objects do not appear to increase or decrease in size
based on their distance from the camera. This is useful for comparing the relative
size of objects, but it can be confusing because of the loss of depth information.
Part
A part is a single data set that has been added to a collection of data sets so that they
can be processed together.
252 Glossary
Perspective Projection
In perspective projection, objects nearer to the camera appear larger than those of the
same size that are farther away.
Piece
A piece is the portion of a data set that is being manipulated by a given processor.
Point-Centered Attribute
Property
A property in ParaView’s server manager passes values from the user interface to the
data or render server.
Property Sheet
A property sheet is the part of the ParaView user interface that is displayed in the left
panel. Several different types of property sheets are available in ParaView, all
available from the View menu: data property sheets, an application settings property
sheet, an animation property sheet, and one for 3D view properties.
Proxy
Reader
Renderer
Render Server
A render server is a collection of processors responsible for rendering the data from
the data server. The resulting images are then collected and displayed on the client
(user interface).
Render Window
In VTK, a render window creates a window into which the renderers draw. A render
window may contain one or more renderers.
Roll
Source
A source creates data in ParaView without reading a data file or taking another data
set as input.
VOI
Index
G O
goals................................................................ 3 observer ......................................................251
on-line information ..... 5, See Help menu, Help
H
P
Help menu .................................................... 15
About ParaView ....................................... 15 parallel projection .................................20, 251
Help.......................................................... 15 ParaView demo..... See Help menu, Play Demo
Play Demo................................................ 15 part..............................................................251
perspective projection ...........................19, 252
piece............................................................252
I
pipeline navigation..........................................8
image data...... See uniform rectilinear data sets pipeline view............. See Selection/Navigation
immediate mode rendering ........................... 20 Window, Navigation mode
information helper ...................................... 251 point-centered attribute ...............................252
interpolating animation values...See animation, poly data ...................... See polygonal data sets
Waveform menu polygonal data sets........................................24
pop-up help ..See Application Settings property
L sheet, Show Tooltips
print screenshot.................See File menu, Print
launching ParaView........................................ 5 progress gauge ..............................................16
Macintosh................................................... 6 property.......................................................252
Unix............................................................ 6 property sheet........................................15, 252
Windows .................................................... 6 resize ........................................................15
left panel ....................................................... 15 scrolling....................................................15
left panel visibility ........................................ 13 toggle button.............................................16
level of detail (LOD) .................................. 251 proxy...........................................................252
load time steps manually .............................. 25 purpose............................................................3
lookup table ................................................ 251 pvserver executable.....................................156
M R
mapper ........................................................ 251 reader ..........................................................252
menu bar ......................................................... 8 rectilinear grid. See nonuniform rectilinear data
minimize user interface sections................... 15 sets
modularity....................................................... 4 render server ...............................................253
module ........................................................ 251 machines file...........................................158
259