You are on page 1of 268

ParaView Guide

Contents

PART I: USER’S GUIDE ....................................................................................................... 1


OVERVIEW......................................................................................................................... 3
1.1 WHAT IS PARAVIEW?................................................................................................. 3
1.2 FUNDING AND SUPPORT ............................................................................................. 5
1.3 STARTING PARAVIEW ................................................................................................ 5
On Unix ............................................................................................................................. 6
On Windows ...................................................................................................................... 6
On Macintosh .................................................................................................................... 6
USER INTERFACE ............................................................................................................ 7
2.1 MENUS ....................................................................................................................... 8
File Menu .......................................................................................................................... 8
Edit Menu ........................................................................................................................ 10
View Menu ....................................................................................................................... 10
Select Menu ..................................................................................................................... 11
Source Menu.................................................................................................................... 11
Filter Menu...................................................................................................................... 12
Window Menu.................................................................................................................. 12
Help Menu ....................................................................................................................... 14
2.2 PROPERTY SHEETS ................................................................................................... 15
2.3 TOOLBAR ................................................................................................................. 16
2.4 DISPLAY AREA ......................................................................................................... 16
2.5 STATUS BAR ............................................................................................................. 16
2.6 SELECTION / NAVIGATION WINDOW ........................................................................ 17
2.7 APPLICATION SETTINGS ........................................................................................... 18
2.8 RENDERING PARAMETERS ........................................................................................ 19
2.9 BACKGROUND COLOR .............................................................................................. 20
LOADING DATA .............................................................................................................. 23
3.1 DATA SET TYPES ...................................................................................................... 23
VTK types ........................................................................................................................ 23
Multi-block ...................................................................................................................... 25
Time Support ................................................................................................................... 25
3.2 SUPPORTED DATA FILE FORMATS ............................................................................ 26
DATA PROPERTY SHEETS........................................................................................... 31
4.1 PARAMETERS............................................................................................................ 31
4.2 DISPLAY ................................................................................................................... 33
View ................................................................................................................................. 33
Color................................................................................................................................ 34
Display Style.................................................................................................................... 35
iv Contents

Volume Rendering ...........................................................................................................37


4.3 INFORMATION ...........................................................................................................38
DATA MANIPULATION .................................................................................................41
5.1 APPLYING FILTERS ...................................................................................................41
5.2 PIPELINE BASICS .......................................................................................................42
INTERACTION .................................................................................................................45
6.1 LEVELS OF DETAIL (LODS) ......................................................................................45
6.2 CAMERA MOVEMENT ...............................................................................................47
Reset Camera...................................................................................................................47
Set View to Data ..............................................................................................................48
Standard Views ................................................................................................................48
Storing Camera Positions................................................................................................48
2D / 3D Mouse-Controlled Motion..................................................................................49
Elevation, Azimuth, Roll ..................................................................................................51
Picking Center of Rotation ..............................................................................................51
6.3 ACTOR PLACEMENT..................................................................................................51
6.4 3D WIDGETS.............................................................................................................52
Box Widget.......................................................................................................................52
Line Widget......................................................................................................................53
Plane Widget....................................................................................................................54
Point Widget ....................................................................................................................54
Sphere Widget..................................................................................................................55
ANNOTATION ..................................................................................................................57
7.1 SCALAR BAR ............................................................................................................57
7.2 ORIENTATION AXES .................................................................................................60
7.3 CORNER TEXT ..........................................................................................................61
7.4 CUBE AXES...............................................................................................................62
7.5 POINT ID LABELS ......................................................................................................63
7.6 XY-PLOT ..................................................................................................................64
ANIMATION .....................................................................................................................67
8.1 CREATING .................................................................................................................67
Animation Control ...........................................................................................................68
Actions .............................................................................................................................69
8.2 CACHING DATA ........................................................................................................70
8.3 SAVING IMAGES........................................................................................................71
8.4 SAVING GEOMETRY ..................................................................................................71
8.5 SCRIPTING ................................................................................................................72
SAVING ..............................................................................................................................73
9.1 SAVING DATA...........................................................................................................73
9.2 SAVING IMAGES........................................................................................................74
v

9.3 COPYING IMAGES ..................................................................................................... 74


9.4 SESSION FILES .......................................................................................................... 74
State Files ........................................................................................................................ 75
Trace Files....................................................................................................................... 75
BATCH PROCESSING .................................................................................................... 77
10.1 CREATING A BATCH SCRIPT ..................................................................................... 77
10.2 ANIMATION IN BATCH SCRIPTS ................................................................................ 78
10.3 RUNNING PARAVIEW IN BATCH MODE .................................................................... 78
10.4 EDITING BATCH SCRIPTS .......................................................................................... 79
INTRODUCTION TO PARALLEL COMPUTING AND VISUALIZATION ........... 83
11.1 TYPES OF PARALLELISM ........................................................................................... 83
11.2 PARTITION INVARIANCE ........................................................................................... 86
11.3 GATHERING RESULTS ............................................................................................... 87
PARALLEL PARAVIEW................................................................................................. 89
12.1 PARALLEL THEORY .................................................................................................. 89
12.2 DISTRIBUTED STAND-ALONE MODE ........................................................................ 90
12.3 CLIENT / SERVER MODE ........................................................................................... 91
12.4 RENDER SERVER ...................................................................................................... 91
Connection1: Connecting the client and servers ............................................................. 92
Connection 2: Connecting the render and data servers .................................................. 94
12.5 PARALLEL RENDERING / COMPOSITING .................................................................... 97
12.6 OFFSCREEN RENDERING ........................................................................................... 97
12.7 TILED DISPLAY......................................................................................................... 97
TUTORIALS...................................................................................................................... 99
13.1 A SIMPLE EXAMPLE ................................................................................................. 99
Step 1: Start ParaView .................................................................................................... 99
Step 2: Create a sphere ................................................................................................... 99
Step 3: Draw the sphere in wireframe ........................................................................... 100
Step 4: Change the sphere’s resolution ......................................................................... 101
Step 5: Interactively manipulate the sphere .................................................................. 101
Step 6: Display a bounding box around the sphere....................................................... 102
Step 7: Change the display properties of the outline..................................................... 102
Step 8: Apply a second filter to the sphere .................................................................... 103
Step 9: Exit ParaView ................................................................................................... 105
13.2 STREAMLINES ......................................................................................................... 105
Step 1: Start ParaView .................................................................................................. 105
Step 2: Load the data..................................................................................................... 105
Step 3: Extract two subgrids.......................................................................................... 107
Step 4: Create streamlines............................................................................................. 108
Step 5: Generate tubes from the streamlines ................................................................. 111
Step 6: Save tube geometry............................................................................................ 111
vi Contents

13.3 ISOSURFACE ANIMATION ........................................................................................111


Step 1: Start ParaView ..................................................................................................111
Step 2: Load the data .....................................................................................................112
Step 3: Create a contour................................................................................................112
Step 4: Clip the isosurface .............................................................................................114
Step 5: Animate contour ................................................................................................115
Step 6: Delete filters ......................................................................................................116
Step 7: Cut the combustor data......................................................................................116
Step 8: Animate cut plane ..............................................................................................116
Step 9: Save animation results.......................................................................................117
13.4 MULTI-BLOCK / MULTI-PART DATA .......................................................................118
Step 1: Start ParaView ..................................................................................................118
Step 2: Load the data .....................................................................................................118
Step 3: Reposition the camera .......................................................................................119
Step 4: Create contours (isolines)..................................................................................119
Step 5: Highlight the contours in block 2 ......................................................................120
Step 6: Display the contours in the other two blocks.....................................................120
Step 7: Collect tubes and contour lines .........................................................................121
Step 8: Save the results to a file .....................................................................................121
SOURCES.........................................................................................................................123
FILTERS...........................................................................................................................133
COMMAND-LINE OPTIONS AND ENVIRONMENT VARIABLES ......................155
C.1 GENERAL OPTIONS .................................................................................................155
C.2 CLIENT-SERVER OPTIONS .......................................................................................156
C.3 RENDERING OPTIONS..............................................................................................159
C.4 ENVIRONMENT VARIABLES ....................................................................................160
PARAVIEW DATA (PVD) FILE FORMAT.................................................................163
PART II: DEVELOPER’S GUIDE........................................................................................3
PARAVIEW ARCHITECTURE ....................................................................................167
14.1 DIRECTORY STRUCTURE .........................................................................................167
14.2 SERVER MANAGER .................................................................................................169
14.3 CLIENT ...................................................................................................................169
COMPILING / INSTALLING PARAVIEW.................................................................171
15.1 ON UNIX .................................................................................................................172
Compiling ......................................................................................................................172
Installing ........................................................................................................................173
15.2 ON WINDOWS .........................................................................................................173
Compiling ......................................................................................................................173
Installing ........................................................................................................................174
15.3 ON MACINTOSH ......................................................................................................174
vii

PARAVIEW XML ........................................................................................................... 175


16.1 USER INTERFACE XML .......................................................................................... 175
Modules ......................................................................................................................... 175
Writers ........................................................................................................................... 202
Manipulators ................................................................................................................. 203
16.2 SERVER MANAGER XML ....................................................................................... 203
Readers, Sources, and Filters........................................................................................ 204
Rendering ...................................................................................................................... 211
Utilities .......................................................................................................................... 211
16.3 ADDING NEW MODULES ........................................................................................ 212
MODIFYING THE USER INTERFACE ...................................................................... 213
17.1 IMPORTANT CLASSES ............................................................................................. 213
17.2 ADD A BUTTON ...................................................................................................... 214
17.3 ADD A MENU ITEM ................................................................................................. 216
WRITING PARAVIEW READERS.............................................................................. 221
18.1 INTEGRATING WITH VTK ....................................................................................... 221
18.2 MULTIPLE OUTPUTS ............................................................................................... 223
18.3 PARALLEL READERS .............................................................................................. 224
18.4 REQUIRED XML..................................................................................................... 224
PVWIDGETS AND PROPERTIES ............................................................................... 227
THE VTK CLIENT-SERVER LANGUAGE................................................................ 229
20.1 OVERVIEW ............................................................................................................. 229
20.2 CLIENT-SERVER STREAMS ..................................................................................... 229
Commands ..................................................................................................................... 230
Arguments...................................................................................................................... 230
20.3 THE CLIENT-SERVER INTERPRETER........................................................................ 232
20.4 OBJECT CREATION AND DELETION ......................................................................... 233
20.5 RETRIEVING RESULTS ............................................................................................ 234
20.6 SERVER HELPER OBJECTS ...................................................................................... 234
RENDER MODULES ..................................................................................................... 237
21.1 LEVELS OF DETAIL ................................................................................................. 237
21.2 COMPOSITING ......................................................................................................... 238
21.3 ICE-T...................................................................................................................... 238
21.4 TILED DISPLAY....................................................................................................... 238
21.5 CAVE RENDER MODULE ......................................................................................... 239
TESTING.......................................................................................................................... 241
22.1 WRITING TESTS ...................................................................................................... 241
22.2 RUNNING TESTS ..................................................................................................... 242
22.3 PARAVIEW DASHBOARD ........................................................................................ 243
viii Contents

Overview ........................................................................................................................243
Submitting Dashboard Results.......................................................................................245
GLOSSARY......................................................................................................................249
INDEX...............................................................................................................................255
Part I: User’s Guide
Chapter 1

Overview

1.1 What is ParaView?


ParaView is an open-source application for visualizing two- and three-dimensional data sets.
The size of the data sets ParaView can handle varies widely depending on the architecture on
which the application is run. The platforms supported by ParaView range from single-
processor workstations to multiple-processor shared-memory supercomputers or workstation
clusters. Using a parallel machine, ParaView can process very large data sets in parallel and
later collect the results.

Some of the goals of the ParaView project include the following.

• Develop an open-source, scalable, multi-platform visualization application.


4 Overview

• Support distributed computation models to process large data sets.

• Create an open, flexible, and intuitive user interface.

• Develop an extensible, modular architecture based on open standards.

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.

Figure 1. ParaView Architecture

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.

ParaView’s architecture is intended to be modular. To that end, the data processing,


rendering, and user interface controls can all be run in separate processes (including being on
different machines). The visualization geometry may be the result of a simulation running on
a large parallel supercomputer; the rendering may be done on a separate machine with fewer
processors, and the user interface may be displayed on a single-processor workstation located
on an end-user’s desk.

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).

1.2 Funding and Support


ParaView is funded by the U.S. Department of Energy ASCI (Accelerated Strategic
Computing Initiative) Views program as part of a three-year contract awarded to Kitware, Inc.
by a consortium of three National Labs – Los Alamos, Sandia, and
Lawrence Livermore. The goal of the project is to develop scalable
parallel processing tools with an emphasis on distributed memory
implementations. The project includes parallel algorithms,
infrastructure, I/O, support, and display devices. One significant feature
of the contract is that all software developed is to be delivered open
source. Hence ParaView freely is available as an open-source system.

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.

1.3 Starting ParaView


In this section, we will discuss how to launch the ParaView application on different platforms.
We will only be concerned with launching the application in a single process because this is
the mode of operation supported by the precompiled ParaView binaries available on the
ParaView web site (http://www.paraview.org/HTML/Download.html). Many of ParaView’s
features can be demonstrated while running ParaView in single-process mode. ParaView’s
other modes of operation will be discussed in chapter 12. If precompiled binaries are not
available for your platform, or if you wish to use ParaView’s other modes of operation (e.g.,
6 Overview

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.

Menu Bar Toolbar

Display
Area
Property
Sheet
Status Bar

Figure 2. Initial ParaView GUI


8 User Interface

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

Figure 3. File menu


2.1 Menus 9

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

Figure 4. 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

Figure 5. 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

Figure 6. 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

Figure 7. 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

Figure 8. Window menu


2.1 Menus 13

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.

Figure 9. Command Prompt window

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

Figure 10. Error Log window

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.

Figure 11. Timer (Performance) Log window

Help Menu

Figure 12. Help menu


2.2 Property Sheets 15

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.

2.2 Property Sheets


Most of the user interface controls in ParaView are displayed in property sheets in the left
panel of the main window. Many of the property sheets have tabs across the top so that
multiple pages are accessible. The property sheet shown depends on the current data set and
the selection in the View menu. Each reader, source, and filter in your visualization pipeline
will have its own property sheet. There are separate property sheets for controlling application
settings, animation, and 3D view properties.

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.

Figure 13. Section of user interface shown expanded and minimized


16 User Interface

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.

2.4 Display Area


The display area (to the right of the left panel containing the property sheets) is probably the
most important part of the user interface because it shows the current view of the 3D scene.
This portion of the user interface displays the results of the current visualization pipeline.
Using mouse interaction in the display area, you can reposition the camera and interact with
3D widgets and some annotations.

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.

2.5 Status Bar


The status bar at the bottom of the main ParaView window is divided into three sections. The
ParaView logo is shown in the leftmost portion. The center section displays information about
what ParaView is currently doing (e.g., which filter is currently running or a description of the
current menu selection). The rightmost part of the status bar contains ParaView’s progress
gauge. When a reader, source, or filter could take a non-trivial amount of time to run, the
progress gauge shows the percentage of the process that has already been completed.
2.6 Selection / Navigation Window 17

2.6 Selection / Navigation Window


The Selection / Navigation Window provides two different views of the data sets in your
visualization. This window is visible above the current data set’s property sheet when Source
is selected from the View menu. To toggle between Selection and Navigation modes, click
the appropriate radio button at the top of the Selection / Navigation Window. The left button
is for Selection mode, and the right one is for Navigation mode. The mode you choose will
be saved when you exit ParaView so that it can be restored when you start the application
again.

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.

Figure 14. Selection Window

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.

Figure 15. Navigation Window

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.

2.7 Application Settings


ParaView’s application settings manage basic properties of its user interface. Your
preferences will be stored when you exit the application. The Application Settings property
sheet (View menu, Application Settings) is divided into two sections: Interface Settings and
Toolbar Settings. We will discuss the components of the Interface Settings portion first.

Figure 16. Application Settings interface

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.

Save window geometry on exit: This


option determines whether the size and
position of the main ParaView window will be stored so that the window’s geometry will be
the same when ParaView is restarted.

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.

2.8 Rendering Parameters

Figure 17. Controls for rendering parameters

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.

2.9 Background Color


Changing the background color can make parts of the 3D scene more visible. Before printing
an image, it is useful to set the background color to white. The background color chosen is
stored so that it remains the same across ParaView sessions (i.e., closing and restarting the
application). The interface for changing the background color of the display area is located on
the General tab of the 3D View Properties property sheet, just above the Advanced Render
Parameters section.

Figure 18. Set the background color

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

Figure 19. Background color selection dialog box


Chapter 3

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.

3.1 Data Set Types


VTK types
Several different types of data sets can be loaded into ParaView. Because ParaView’s data
processing is done through VTK, it shares VTK’s basic data set types. In the table below,
VTK’s name for the data set type is shown in parentheses if it differs from the ParaView
name.
24 Loading Data

Polygonal (Poly Data)

Polygonal data sets are composed of


points, lines, and 2D polygons.

Unstructured Grid

Unstructured grid data sets incorporate


the same cell types as polygonal data
(points, lines, and polygons) as well as
the following 3D cells: tetrahedra,
hexahedra, wedges, and pyramids.

Curvilinear (Structured Grid)

A curvilinear data set is defined by a


topologically regular but geometrically
irregular array of points. In 2D, the cells
formed by these points are
quadrilaterals; the 3D cells are
hexahedra.

Nonuniform Rectilinear (Rectilinear


Grid)

In a nonuniform rectilinear data set, the


three axes along which the points are
defined are orthonormal to each other.
The points along each of these axes are
not required to be evenly spaced.

Uniform Rectilinear (Image Data)

In a uniform rectilinear grid, the three


axes are orthonormal to each other, and
the points along each axis are evenly
spaced.
3.1 Data Set Types 25

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.

Figure 20. Data set reader with Timestep slider

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

Figure 21. Time series file selection dialog

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.

3.2 Supported Data File Formats


ParaView supports reading the following file formats. The formats ParaView also writes are
noted. If your data is not in a format that ParaView recognizes, you will need to add a reader
for your data to ParaView. See chapter 18 for information on how to do this. Some of the file
readers in ParaView do not have any modifiable parameters once you have selected the file
name. When loading data sets with these readers, the data set is read automatically without the
Accept button being pressed. The file formats for which this is the case are noted. Some of
ParaView’s readers allow you to select which attributes (scalars, vectors, etc.) to load; this is
noted for the file formats to which it applies. If a reader does not allow you to select which
attributes to load, all attributes contained in that data set will be loaded when the data is read.

• 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 files: This is the file format used by CEI’s EnSight


(http://www.ensight.com). ASCII and binary EnSight 6 and EnSight Gold formats
are supported. These files have a .case extension. The data set created by this reader
may be of any type supported by ParaView (polygonal, uniform rectilinear,
nonuniform rectilinear, curvilinear, or unstructured). This format also supports
multiple parts and time information. This file format allows you to select which data
set attributes to load.
28 Loading Data

• 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

Data Property Sheets

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.

Figure 22. Sample Parameters tab

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.

Figure 23. View section of the Display tab

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

Figure 24. Color section of the Display tab

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

Figure 25. Display style section of Display tab

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.

Figure 26. Flat vs. Gouraud shading

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.

Figure 27. Volume Appearance and Display Style

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.

Figure 28. Edit Volume Appearance


38 Data Property Sheets

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.

Figure 29. Typical layout of the Information tab


4.3 Information 39

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.

Figure 30. Extents section of the Information tab


Chapter 5

Data Manipulation

Manipulation in ParaView is fairly unique because of the underlying pipeline architecture


which it borrows from VTK. Unlike most visualization packages, you can apply several
filtering operations in different combinations to your data during a single ParaView session.
We will begin this chapter by discussing the process of applying filters in ParaView. Then we
will go into more detail about the underlying visualization pipeline.

5.1 Applying Filters


Once data has been loaded into ParaView, as discussed in chapter 3, there are several different
operations you can perform on it to better understand the data. In ParaView, these operations
are called filters. Different filters operate on different types of data sets, so the list of filters
available to you will change depending on the type of the current data set. You can see this by
loading a data set and looking at the enabled entries in the Filter menu and at the active filter
buttons on the toolbar. In the images below, the current data set is a polygonal data set with
point-centered scalars and vectors. Notice that on the toolbar, the Extract Grid button is
disabled, and several entries in the Filter menu are also inactive because the type of the
current data set is incompatible with the types of data these filters accept as input.

Figure 31. Filter Toolbar


42 Data Manipulation

Figure 32. Filter Menu

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.

5.2 Pipeline Basics


Connecting an initial data set loaded from a file or created from a ParaView source to one or
more filters to form a chain is referred to in ParaView as a visualization pipeline. The initial
5.2 Pipeline Basics 43

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.

Figure 33. Linear Pipeline

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.

Figure 34. Branching Pipeline

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.

6.1 Levels of Detail (LODs)


ParaView is often used to visualize very large data sets. Because of their large size, rates of
interaction with such data sets (e.g., rotating the camera around the 3D scene) at full
resolution would be very slow. To achieve reasonable interaction rates, ParaView reduces the
resolution used in rendering these data sets during interaction. These different resolutions are
also called levels of detail because the amount of detail visible in the model is different based
on the resolution at which it is rendered. Once interaction is complete, the data set will be
rendered at full resolution so that all of the detail available in the data set is displayed. In the
images below, the image on the right shows a lower-resolution version of the data set shown
on the left.
46 Interaction

Figure 35. Two levels of detail for displaying a CAD part

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.

Figure 36. Level of Detail Controls

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.

6.2 Camera Movement


ParaView offers several options for controlling the position and orientation of the camera
(i.e., the point from which the 3D scene is viewed). Some of the methods are interactive,
allowing you to control them using the mouse in the 3D scene; for others only manual user
interface controls are provided; and for some methods, both varieties of interaction are
available.

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.

Set View to Data


The Set View to Data button at the top of the
Display page for a source, filter, or reader sets the
viewing position so that the current source is within the viewing frustum and takes up most of
the Display Area. As with Reset Camera, the orientation of the camera does not change, and
if the current data set is behind another data set, it will not become visible. If this is the case,
setting the center of rotation to be the center of the current data set and then rotating the
camera (both described later in this section) may help in locating the current data set.

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.

Figure 37. Standard Camera Views

Storing Camera Positions


Below the Standard Views section on the 3D View Properties property sheet is a section
called Stored Camera Positions. This part of the interface allows the user to store and
retrieve up to six different views of the 3D scene. Initially all six camera position buttons are
labeled Empty. Right-clicking on any of the buttons stores the current camera position in that
button and displays the current image of the display area on that button. It overwrites the view
parameters stored in that button even if the button is non-Empty. Left-clicking a non-Empty
button sets the view to match the one stored in that button. Changing the data does not cause
the images on the buttons to be updated, so even though the camera parameters will be set to
the stored values, the view may appear different from the image on the clicked button. Left-
clicking on an Empty button does nothing.
6.2 Camera Movement 49

Figure 38. Stored Camera Views

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.

Figure 39. Camera Controls for 2D and 3D Movements

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

Elevation, Azimuth, Roll


Below the controls for 2D and 3D mouse motion on the Camera tab of the 3D View
Properties property sheet is a section for manipulating the elevation, azimuth, and roll of the
camera. The interface for changing the camera’s orientation in this manner is shown below.

Figure 40. Camera Orientation Control

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)

Picking Center of Rotation


ParaView allows the user to select the point about which the
camera rotates. The buttons controlling this behavior are
located on the far right side of the Toolbar. These four
buttons, shown on the right, control different aspects of choosing the center of rotation. The
first button changes the state of the mouse interaction so that the next point clicked in the 3D
scene becomes the new center of rotation. The second button sets the center of rotation to the
center of the bounding box of the current data set. The third button toggles the visibility of the
axes marking the center of
rotation in the 3D scene.
Clicking the fourth button
displays a set of three entry boxes for manually setting the X, Y, and Z coordinates of the
center of rotation and changes the direction of the small black triangle in the lower right
corner of this button so that it points to the left as shown in the image on the left. Clicking this
button again causes the center of rotation controls to be displayed as they were initially.

6.3 Actor Placement


As described in the previous section, the Move mouse operation translates the current data set
in the 3D scene. (In VTK terms, an actor is the representation of the data set in the 3D scene.)
As shown below, the Actor Control section of the Display tab for each data set also controls
translating the actor as well as performing other transformations on it. For each operation in
52 Interaction

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).

Figure 41. Control Actor Transformation

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.

Figure 42. Box widget user interface

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.

Figure 43. Line widget user interface

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.

Figure 44. Plane widget user interface

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.)

Figure 45. Point widget user interface


6.4 3D Widgets 55

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.

Figure 46. Sphere widget user interface


Chapter 7

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.

7.1 Scalar Bar


The interface for ParaView’s scalar bar is accessible from the Display tab of the data property
sheet for a particular data set. Pressing the Edit Color Map... button displays the interface for
manipulating the scalar bar as shown below. For instructions on enabling the Edit Color
Map… button, see section 4.2, Display.

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

Figure 47. Color Map and Scalar Bar Controls

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.

Figure 48. Scalar Bar displaying X-component of Normals


60 Annotation

7.2 Orientation Axes


When interacting with data in ParaView, it can be difficult to determine how the data set is
oriented in 3D. To remedy this problem, a marker showing labeled 3D axes (i.e., Orientation
Axes) can be displayed. The orientation of the axes matches that of the data, and the axes
reorient themselves as the camera is rotated about the 3D scene. (See section 6.2, Camera
Movement.)

Figure 49. 3D Orientation Axes

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

Figure 50. User interface controls for orientation axes

7.3 Corner Text


Often users want to display additional text in the 3D scene (e.g., when generating a still image
or an animation). In ParaView, this is done by adding Corner Annotation to the display area.
The interface for doing this are located on the Annotate tab of the 3D View Properties
property sheet (View menu, 3D View Properties), just above the Orientation Axes controls.

Figure 51. Corner Annotation interface

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.

Figure 52. Corner Annotation

7.4 Cube Axes


To better understand the dimensions of the current data set, you may choose to display Cube
Axes around it. In ParaView, the Cube Axes highlight three edges of the data set (one in each
of the X, Y, and Z dimensions), and mark the coordinates of the center and endpoints of each
edge. The coordinates used are the coordinates of the data set. The three axes are chosen in
such a way that they are visible from the current viewing position. Because of this, the axes
chosen will change as the viewing position changes. The Cube Axes check box, located in
the View section on the Display tab of the data property sheet for a data set, toggles the
visibility of the Cube Axes for that data set.
7.5 Point Id Labels 63

Figure 53. View section with Cube Axes option selected

Figure 54. Cube Axes

7.5 Point Id Labels


It is sometimes helpful in ParaView to know the id associated with each point in your data set
(e.g., when debugging a simulation or testing a new filter). If you are running ParaView in
single-processor mode, you can do this by turning on point id labels. (Labeling of point ids is
not available when running ParaView in any other mode.) The toggle button for doing this is
located in the View section of the Display tab of each data property sheet.

Figure 55. View section with point id labels enabled


64 Annotation

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.

Figure 56. Point Id Labels

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

Figure 57. XY-Plot interface for Probe filter

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.

Figure 58. XY-Plot of three variables


Chapter 8

Animation

In ParaView, an animation is a series of actions performed on a particular data set over a


number of animation frames. Several of the parameters of sources, filters, and readers can be
animated. Each frame can be stored in memory to increase the speed of playing the full
animation. Also the results of the animation can be saved to image files – one image per
animation frame. These images can then be combined together into a movie file using an
external application. The geometry per frame can also be saved using ParaView’s .pvd
format. When this data file is reloaded into ParaView, a slider will be included on the
Parameters tab of the reader to select which frame of the animation to load. Additionally, the
animations can be further customized through the use of a user-defined script that runs at each
time step.

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

Figure 59. Animation interface

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.

Figure 61. Specify Phase and Frequency for Sinusoid Waveform

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.

8.2 Caching Data


At the bottom of the Save section of the Animation interface is a check box labeled Cache
Geometry. By default, this option is checked. When it is on, each frame of the animation is
computed the first time the animation is played. As each frame is computed, it is stored in
memory so that during subsequent iterations through the animation, the data can be retrieved
from memory rather than recalculating it, causing the animation to run much faster. This
works correctly if the data is small enough that several copies of it (one per time step) can fit
in memory at once. If your data is too large for several copies to fit in memory at once, turn
off this option.

Figure 62. Save section of Animation interface with Cache Geometry selected
8.3 Saving Images 71

8.3 Saving Images


Once you have created an animation of your data, you may want to save the resulting images
(one per frame) to disk. To do this, click the Save Images button in the Save portion of the
Animation interface. A dialog box will be displayed to allow you to navigate to the location
where you wish to save your image files. Enter a file name, select an image file type (.jpg, .tif,
or .png), and click the Save button. Another dialog box will be displayed, allowing you to
select the dimensions of the image to be saved. The dimensions of the image cannot be larger
than those of ParaView’s display area.

Figure 63. Choose the dimensions of saved animation images.

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.

8.4 Saving Geometry


In addition to saving images of each time step in your animation, you may also wish to save
the data itself. Use the Save Geometry button in the Save section of the Animation interface
to do this. Pressing this button will cause a file navigation dialog box to be displayed.
Navigate to the location where you wish to save the geometry, and enter a file name. You
must save your data using ParaView’s .pvd file format. Press the Save button in the dialog.
The animation will play, and at each time step the geometry shown in the display area will be
saved to a file; the .pvd file will contain a pointer to each of these files. If you load the .pvd
file into ParaView, a Timestep slider will be shown on the Parameters tab of the property
sheet for the reader so you can select which time step to load. If multiple data sets were
displayed while the animation was running, they will be grouped together as a multi-part data
72 Animation

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.

Figure 64. Script text box

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.

9.1 Saving Data


Any current data set in ParaView (the result of a visualization pipeline) can be saved to a data
file. This can be accomplished by choosing the data set you wish to save either from the
Select menu or from the Selection / Navigation Window and selecting Save Data from the
File menu. This will cause a dialog box to be displayed. Navigate to the directory where you
wish to save the data, select a file type and filename, and click Save. The available file types
will change based on the data set type of the current data set. The file formats in which
ParaView can save data are discussed in section 3.2.

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

Figure 65. Saving multiple time steps

When saving data sets containing multiple parts (or blocks), only the .pvd file format will be
available.

9.2 Saving Images


Instead of saving the data resulting from your current visualization, you may wish to store the
contents of the display area as an image. To do this, select Save View Image from the File
menu. A dialog box will appear allowing you to navigate to the correct directory and select a
file name and an image type. The image formats that ParaView supports are as follows:
Windows Bitmap (.bmp), JPEG Images (.jpg), PNG Images (.png), Binary PPM (.ppm), and
TIFF Images (.tif). All the current contents of the display area will be stored in the image,
including any annotations you may have added. (See chapter 7.) When saving an image of the
display area, make sure that no other window is occluding any part of the display area. If this
is not the case, the resulting image will contain the portion of the other window that was
covering the display area.

9.3 Copying Images


In addition to saving an image of the contents of the display area, you may also wish to copy
these contents to the Windows clipboard so they can be pasted into various Windows
applications. This is possible when running ParaView on Windows because a Copy View
Image entry is added to the Edit menu. Corresponding functionality is not available on unix
machines. When copying the image from the display area, check that the entire display area is
on-screen and not covered by any other window. Otherwise only the visible portion of the
display area will be captured and saved to the clipboard.

9.4 Session Files


After you have spent time creating a visualization of your data, it is helpful to create a session
file recording what you have done if you wish to later re-create the same visualization. In
ParaView, the mechanism for doing this is to save either a state or trace file. Both types of
files use the Tcl scripting language for recording the actions you have performed. ParaView
9.4 Session Files 75

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.

10.1 Creating a Batch Script


Once you have created a visualization in ParaView, select Save Batch Script from the File
menu to begin creating a batch script. A dialog box will appear, allowing you to choose the
name of the batch script file. ParaView’s batch files are Tcl scripts, and have a .pvb file
extension. Once you have selected the file name, another dialog box will display the
modifiable parameters of the new batch script.
78 Batch Processing

Figure 68. Batch file parameters

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.

10.2 Animation in Batch Scripts


If you have created an animation any time in this ParaView session before you save a batch
script, the animation will be recreated when the batch script is run. If you are saving images,
one image will be created per frame of the animation. Any filters applied to the data set after
the animation was created will be applied to the data set at each frame in the animation. Any
new data sets created or loaded after the creation of the animation will be static in each of the
resulting images. The naming convention for these image files is that discussed under Save
Images in the previous section.

10.3 Running ParaView in Batch Mode


To start ParaView using a batch script you have previously stored, use the --batch
command-line option, as discussed in appendix C. ParaView does not accept any other
10.4 Editing Batch Scripts 79

command-line arguments when running in batch mode. Any additional command-line


arguments will be passed to the batch script. (See the next section for instructions on handling
such arguments.) This means that you can only batch scripts in ParaView in stand-alone mode
(single or multi-process). You can still create a batch script in another mode and then run the
batch script in stand-alone mode. The images generated will still be correct.

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.

10.4 Editing Batch Scripts


ParaView’s batch scripts are written in the Tcl scripting language. It is currently not possible
to write ParaView batch scripts in another language. Generally you should not edit a batch
script by hand, but one exception is for processing command-line arguments. Any command-
line arguments other than --batch that are passed to ParaView in batch mode are forwarded
to the batch script, but the script must be modified to check for whatever argument(s) you are
passing. The Tcl code segment below is part of any batch script created within ParaView. It
checks for a -XML command-line argument. Similar code would need to be added inside this
for loop to check for other command-line arguments and to perform some action based on
the arguments specified. Some knowledge of Tcl scripting is required to do this. A useful
reference for Tcl syntax is Tcl and the Tk Toolkit by John K. Ousterhout.

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]]
}
}
80 Batch Processing

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 Ren1 [$proxyManager NewProxy rendering DefaultDisplayWindow]


$proxyManager RegisterProxy rendering Ren1 $Ren1
$Ren1 UnRegister {}
[$Ren1 GetProperty BackgroundColor] SetElements3 0.33 0.35
0.43
[$Ren1 GetProperty Size] SetElements2 505 603
[$Ren1 GetProperty CameraPosition] SetElements3 0 0 3.41865
[$Ren1 GetProperty CameraFocalPoint] SetElements3 0 0 0
[$Ren1 GetProperty CameraViewUp] SetElements3 0 1 0
[$Ren1 GetProperty CameraViewAngle] SetElements1 30
[$Ren1 GetProperty CameraClippingRange] SetElements2 2.52277 \
4.55463

set pvTemp177 [$proxyManager NewProxy sources ConeSource]


$proxyManager RegisterProxy sources pvTemp177 $pvTemp177
$pvTemp177 UnRegister {}
[$pvTemp177 GetProperty Resolution] SetElement 0 6
[$pvTemp177 GetProperty Radius] SetElement 0 0.5
[$pvTemp177 GetProperty Height] SetElement 0 1.0
[$pvTemp177 GetProperty Capping] SetElement 0 1
$pvTemp177 UpdateVTKObjects

set pvTemp180 [$proxyManager NewProxy rendering


DefaultDisplayer]
10.4 Editing Batch Scripts 81

$proxyManager RegisterProxy rendering pvTemp180 $pvTemp180


$pvTemp180 UnRegister {}
[$pvTemp180 GetProperty Input] AddProxy $pvTemp177
[$Ren1 GetProperty Displayers] AddProxy $pvTemp180
[$pvTemp180 GetProperty DisplayAsOutline] SetElements1 0
[$pvTemp180 GetProperty ImmediateModeRendering] SetElements1 1
[$pvTemp180 GetProperty ScalarVisibility] SetElements1 0
[$pvTemp180 GetProperty ColorMode] SetElements1 0
[$pvTemp180 GetProperty InterpolateColorsBeforeMapping] \
SetElements1 1
[$pvTemp180 GetProperty Representation] SetElements1 2
[$pvTemp180 GetProperty Interpolation] SetElements1 1
[$pvTemp180 GetProperty LineWidth] SetElements1 1
[$pvTemp180 GetProperty PointSize] SetElements1 1
[$pvTemp180 GetProperty Position] SetElements3 0 0 0
[$pvTemp180 GetProperty Scale] SetElements3 1 1 1
[$pvTemp180 GetProperty Orientation] SetElements3 0 0 0
[$pvTemp180 GetProperty Origin] SetElements3 0 0 0
[$pvTemp180 GetProperty Opacity] SetElements1 1
[$pvTemp180 GetProperty Color] SetElements3 1 1 1
[$pvTemp180 GetProperty ScalarMode] SetElement 0 0
[$pvTemp180 GetProperty ColorArray] SetElement 0 {}
$pvTemp180 UpdateVTKObjects

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

Introduction to Parallel Computing and


Visualization

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.

11.1 Types of Parallelism


Parallel programs can be classified into three major categories: task parallelism, pipeline
parallelism, and data parallelism. Task parallelism is the most general category. It simply
indicates that tasks are divided among the processes. The tasks can be separated in any way,
84 Introduction to Parallel Computing and Visualization

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

1 Read file 1 Read file 2 Read file 3


Processes

Isosurface Isosurface Isosurface


2 1 2 3

3 Render 1 Render 2 Render 3

Figure 70. Data flow in pipeline parallelism


11.1 Types of Parallelism 85

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

Read Isosurface Render


2
partition 2 partition 2 partition 2

Read Isosurface Render


3
partition 3 partition 3 partition 3

Figure 71. Read, isosurface, and render using data parallelism

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

11.2 Partition Invariance


When data is spatially divided into multiple partitions, either internal communication
(synchronization) or ghost levels (duplicated boundary data) is often required for
appropriately processing the data at the boundaries of each partition. Both techniques cause
performance scaling to deviate from the ideal linear curve. In the extreme case, performance
may actually decrease when a problem is parallelized. It can take less time to process a small
data set on a single process than to divide the data set into multiple partitions and process it in
parallel.

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.

11.3 Gathering Results


At some point, the results of the visualization must be collected to a single process for
display. Although the most efficient implementation depends on the specific problem and
performance of the specific hardware, in general it is better to wait as long as possible to
collect the result. Typically, each visualization step reduces the size of the data set, so the
communication costs decrease. In the extreme case, every process reads, filters and renders
the data separately. Only the final images are collected and composited on a single process.

Figure 73. Compositing images from four processes

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

12.1 Parallel Theory


ParaView has three main logical components: client, data server, and render server. The client
is responsible for the user interface of the application. ParaView’s general purpose client was
written to be flexible and can be customized using XML specifications. The client can also be
easily replaced with a completely new GUI as required by any application specifications.

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.

Running ParaView as a single-process application is simple. Simply run the paraview


executable.

./paraview

The other configurations for running ParaView will be discussed in the remaining sections of
this chapter.

12.2 Distributed Stand-Alone Mode


When ParaView is compiled with MPI, the paraview executable can be used to run ParaView
in parallel. In this case, the data server nodes and the render server nodes share the same
processes. Each will have four logical nodes. The client will execute on node 0 of the MPI
group, which is also shared by node 0 of the data server and node 0 of the render server.

mpirun -np 4 ./paraview

Node 0: data server node 0, render server node 0, client

Node 1: data server node 1, render server node 1

Node 2: data server node 2, render server node 2


12.3 Client / Server Mode 91

Node 3: data server node 3, render server node 3

12.3 Client / Server Mode


The client is run separately by using the command-line argument –-client (or -c) and
--host (or -h) is used to specify where the server is running. In this mode both the data
server and render server share the same processes, and the client is completely separate.

./paraview --client --host=server_host

mpirun -np 4 ./pvserver

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.

./paraview --client --reverse-connection

mpirun -np 4 ./pvserver --reverse-connection --host=client_host

12.4 Render Server


The render server works when ParaView is run in client-server mode. It allows you to have a
separate group of machines (i.e., apart from the data server and the client) to perform
rendering. This means that you can select specialized rendering machines to do the parallel
rendering rather than relying on the data server machines which may have limited or no
rendering capabilities. In ParaView, the number of machines (N) composing the render server
must be no more than the number (M) composing the data server. There are two connections
that must be made for ParaView to run in render-server mode. The first connection is between
the client and the first node of each of the data and render servers. The second connection is
between the nodes of the render server and the first N nodes of the data server. The first
connection can be initially established either from the servers to the client or vice versa. The
second can be started by either the data server or the render server. Once both of these
connections are established, they are bi-directional. The diagram below depicts the
connections established when ParaView is running in render server mode. Each double-ended
arrow indicates a bi-directional connection from one machine to another. In all the diagrams
in this section, the render server nodes are denoted by RS 0, RS 1, …, RS N. The data server
nodes are similarly denoted by DS 0, DS 1, …, DS N, …, DS M.
92 Parallel ParaView

Client

RS 0 DS 0

RS 1 DS 1

RS N DS N

DS M

Figure 74. Connections required in render server mode

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.

Connection1: Connecting the client and servers


The first connection that must be established is between the client and the first node of both
the data and render servers. By default, the client initiates the connection to each server, as
shown in the diagram below. In this case, both the data server and the render server must be
running before the client is started.
12.4 Render Server 93

Client

RS 0 DS 0

./pvserver [--port=data_server_port]

./pvserver --render-server [--render-port=render_server_port]

./paraview --client-render-server --host=data_server_host0


--render-server-host=render_server_host0
[--port=data_server_port] [--render-port=render_server_port]

Figure 75. Start ParaView in render-server mode using standard connections.

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

./paraview -crs -rc

./pvserver -rs -rsh=client -rc

./pvserver -h=client -rc

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.

Connection 2: Connecting the render and data servers


Before the connection between the servers can be established, there must first be a connection
from each server to the client, as described in the previous section. Once the connection to the
client has been made, one server can access the necessary information to connect to the other
server. It retrieves this information from the waiting server via the client. This information is
then used to establish a connection between the nodes of the render server and the first N
nodes of the data server.

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

./pvserver -rs -m=machine_file [--render-node-


port=render_node_port]

./paraview -crs -h=data_server_host0 -rsh=render_server_host0

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

./paraview -crs -rc [-r2d]

./pvserver -rc -h=client -m=machine_file [--render-node-


port=data_node_port]

./pvserver -rs -rc -rsh=client

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.

12.5 Parallel Rendering / Compositing

12.6 Offscreen Rendering

12.7 Tiled Display


If you have a 2D grid of display devices on which you wish to show visualization results, you
should run ParaView is tiled display mode. Because the ParaView application window should
appear on a separate monitor from the tiled display, you must be running in either
client/server mode or client/data server/render server mode to use ParaView’s tiled display
capabilities. In either mode, the tiled display command-line arguments should be included in
the command line for the client, even when using --reverse-connection (or -rc). To
put ParaView in tiled display mode, you must specify the x- and y-dimensions of the tiled
display using --tile-dimensions-x (or -tdx) and --tile-dimensions-y (or -
tdy), respectively. The x- and y-dimensions default to 0. If you set only one of them to a
positive value on the command line, the other will be set to 1. The example below will create
a 3 x 2 tiled display.

./pvserver

./paraview -c -tdx=3 -tdy=2

Tiled displays may be used similarly in client/data server/render server mode, as shown
below.

./pvserver

./pvserver -rs

./paraview -c -tdx=3 -tdy=2

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

Figure 79. Compositing with tiled display

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.

13.1 A Simple Example


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.

Step 2: Create a sphere


The Source menu contains a list of data sets you can create in ParaView without loading a
data file. Select Sphere from the Source menu. The Parameters tab of the sphere’s property
sheet will be displayed in the left panel. Notice that the Accept button is drawn in green. The
Accept button is green when either the associated data set has not yet been created, or the
parameter values shown on the user interface differ from those of the data set. Click the
100 Tutorials

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.

Figure 80. Selection Window and Parameters tab

Step 3: Draw the sphere in wireframe


After Accept is pressed, two more tabs appear in the sphere’s property sheet: Display and
Information. Click on the Display tab to view the part of the user interface controlling how
the sphere is drawn in the display area. In the Display Style section, select Wireframe of
Surface from the Representation menu. This will cause the polygons composing the sphere
to be drawn as outlines instead of filled polygons. In the image below, the surface
representation of the sphere is shown on the left, and the wireframe one is on the right.
13.1 A Simple Example 101

Figure 81. Surface and wireframe representations

Step 4: Change the sphere’s resolution


Click on the Parameters tab to modify the parameters used in generating the sphere. The
parameters Theta Resolution and Phi Resolution control the number of polygons used in the
representation of the sphere. As the number of polygons in the sphere approximation
increases, the data set will approach a geometric sphere. The Theta Resolution specifies the
number of divisions the sphere will be divided into in the longitudinal direction; Phi
Resolution controls the latitudinal divisions. Using either the slider or the entry box for each
parameter, change the values of both Theta Resolution and Phi Resolution to 12. Click the
Accept button to pass these new values to the data set. Note the increased resolution of the
sphere in the display area.

Figure 82. Increased sphere resolution

Step 5: Interactively manipulate the sphere


By clicking and dragging with the mouse in the display area, you can change your view of the
3D scene. Select 3D View Properties from the View menu, and click on the Camera tab. The
Camera Control for 3D Movements section shows which mouse interaction is associated
with a particular camera manipulation. Try rotating the sphere using the left mouse button.
102 Tutorials

Step 6: Display a bounding box around the sphere


Next we will apply a filter to the sphere data set to create an axis-aligned bounding box
around it. The entries enabled in the Filter menu change depending on the type of the current
data set. Only the names of filters for which the current data set is an appropriate input will be
enabled. The Outline filter (for creating a bounding box) operates on any type of data set.
Select Outline from the Filter menu, and click the Accept button to create the outline. On the
Parameters tab for the Outline filter, notice that Sphere1 has been selected from the Input
menu. In this case, it is the only item in that menu, but if other data sets had been created that
were appropriate inputs to the Outline filter, they would have been listed there too. The
current data set when a filter is created becomes the default input to that filter.

Figure 83. Wireframe sphere with outline

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.

Step 7: Change the display properties of the outline


Each data set in ParaView has its own property sheet. Since the Display tab controls how the
data set is displayed, click on the Outline filter’s Display tab to change some of its display
properties. In the Display Style section of the Display tab, there is a Line width thumbwheel
which controls the thickness of any lines in its associated data set. Use the thumbwheel to set
the width of the lines in the bounding box to 4.

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

Figure 84. Display tab

Step 8: Apply a second filter to the sphere


In ParaView, more than one filter can be applied to the same data set. To make the sphere the
current data set, either click on Sphere1 in the Selection Window, or choose Sphere1 from
the Select menu. From Sphere1’s Display tab, change its representation back to Surface.
Now we will apply a second filter to the sphere data set. Select Shrink from the Filter menu.
(Notice that Sphere1 is selected in the Input menu.) This filter causes the points of each cell
in the input data set to move close to the center of the cell using them. The Shrink factor
slider controls how far from the cell’s center the points are. Choose a Shrink factor value of
0.75, and click Accept. Shrink0 has been added to the Selection Window and is the current
data set. Notice that now the eye icon beside Sphere1 is light gray, indicating that it is not
visible.

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

Figure 85. Navigation Window

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.

Figure 86. Branching pipeline

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.

Figure 87. Edit Color Map interface


13.2 Streamlines 105

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.

Figure 88. Color by X-component of point-centered Normals

Step 9: Exit ParaView


This concludes the first ParaView tutorial. To exit the application, select Exit from the File
menu. A dialog box will appear asking if you want to exit. If you do not want to be asked to
confirm that you wish to exit next time you run ParaView, select Do not show this dialog
anymore. from the Exit dialog box. Click Yes to exit ParaView.

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.

Step 2: Load the data


The data set for this tutorial may be downloaded from the ParaView web site
(http://www.paraview.org/HTML/Download.html). The curvilinear data set contained in this
file shows airflow over a flat plate with a blunt fin rising from the plate. The data file was
converted from a PLOT3D data distributed by NASA. The PLOT3D file is available at
http://www.nas.nasa.gov/Research/Datasets/datasets.html.
106 Tutorials

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.

Figure 89. Left panel after opening bluntfin.vts

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.

Figure 90. Display of bluntfin.vts data set


13.2 Streamlines 107

Step 3: Extract two subgrids


Now that the data is loaded into ParaView, we will extract two subgrids from this
curvilinear data set using the Extract Grid filter. This filter is available on the
toolbar using the button shown on the left, or you can select Extract Grid from the
Filter menu. This filter extracts a subgrid from a structured data set and includes the option of
resampling the data. This filter is described in more detail in Appendix B. For the first
subgrid, set the Min. and Max. values in the I direction to 18. Click Accept.

Figure 91. Extract Grid interface

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

Figure 92. First subgrid colored by magnitude of Momentum

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.

Figure 93. Two subgrids extracted from bluntfin data set

Step 4: Create streamlines


To visualize the air flow, we will create streamlines. First make sure that
bluntfin.vts is the current data set. Also turn off the visibility of the first subgrid to
make the streamlines easier to see. The most straightforward way to do this is to
left-click on the eye icon beside ExtractGrid0 in the Selection Window. To add a streamline
filter to the visualization pipeline, click on the Stream Tracer button in the toolbar. (The
button’s icon is shown to the left.) Alternatively, you may select Stream Tracer from the
Filter menu. At this point, ParaView’s left panel should look similar to the image below. The
interface for this filter is fairly complicated, but for this tutorial we are most concerned with
the Seed section for specifying the seed points for the streamlines. In addition to the
traditional interface components in this section, a 3D widget is added to the display area for
13.2 Streamlines 109

interactively positioning the seed points. 3D widgets are discussed in more detail in section
6.4.

Figure 94. Stream Tracer interface

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

Figure 95. Streamlines generated from points along a line

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.

Figure 96. Streamlines generated from a point cloud


13.3 Isosurface animation 111

Step 5: Generate tubes from the streamlines


To make the streamlines easier to see and understand, we will create tubes from the
streamlines we generated in the previous step. Tubes increase the width of the streamlines and
provide shading. To add a tube filter to the pipeline, select Tube from the Filter menu. Check
that Stream0 is selected in the Input menu. Set the value in the Num. sides entry box to 8,
indicating that there will be eight facets around the circumference of each tube. The Radius
value of the tubes should be set to 0.03. Click the Accept button. One of the point attributes
created by the Stream Tracer filter is AngularVelocity. To better see this attribute, color the
tubes by this point-centered array. The following image shows the tubes colored by the
AngularVelocity array.

Figure 97. Stream tubes showing angular velocity

Step 6: Save tube geometry


We will conclude this tutorial by saving the geometry created by the tube filter to a data file.
First check that Tuber0 is the current data set. Select Save Data from the File menu. An
operating system dependent file dialog box will appear. Navigate to the location where you
wish to save the data file. Set the file type to ParaView Data Files (*.pvd) if it is not already
set to this, and set the file name to tubes. Click the Save button to store this data file in the
location you have chosen. This concludes the streamlines tutorial; you may now exit the
application.

13.3 Isosurface animation


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
112 Tutorials

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.

Step 2: Load the data


For this tutorial, we will be using a PLOT3D data set. This file format stores the attributes and
the geometry in separate files. The files needed for this tutorial are available from the
Download page of the ParaView web site at http://www.paraview.org/HTML/Download.html.
(If you have completed the Streamlines tutorial, you have already downloaded the appropriate
data.) Select Open Data from the File name, and navigate to the comb.xyz file.

Figure 98. PLOT3D reader parameters

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.

Step 3: Create a contour


Now create a contour of this data set. First either select Contour from the Filter
menu, or click the Contour button on the toolbar. (Its image is shown to the left.)
The initial state of the user interface for the Contour filter is shown below.
13.3 Isosurface animation 113

Figure 99. Contour Parameters tab

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

Figure 100. Contour of Density at 0.3

Change the label for this data set to Animated Contour. (If you need help, instructions for
doing this are listed in Step 2.)

Step 4: Clip the isosurface


Next we will clip the results of contouring the data set. To do this, either select Clip
from the Filter menu or click the button on the toolbar. By clipping the data set, we
will be able to better see the interior parts of the isosurface. By default, a plane is
used for clipping. The corresponding 3D widget is shown in the display area. In this case, the
initial parameters are appropriate, so click the Accept button to clip the isosurface. Change
the label of this data set to Clipped Contour.

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.

Figure 101. Clipped contour


13.3 Isosurface animation 115

Step 5: Animate contour


We will now animate through a series of contour values for this data set. To access the
Animation interface, select Animation from the View menu.

Figure 102. Animation interface

In ParaView, an animation consists of a series of actions performed over some number of


frames. In this example, our action will be to change the value of the contour created earlier.
To do this, first select Animated Contour from the Source menu in the Actions section of
the interface. Then choose Contour Values from the Parameter menu (just below the Source
menu). Change the Start value to 0.3 and the End value to 0.6. Because we are using the
Ramp waveform, this means that over the course of this animation, the value of the contour
will vary between 0.3 and 0.6, changing by the same amount at each time step. In the
Animation Control area, change the value of Number of Frames to 20.

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.

Step 6: Delete filters


Now go back to the property sheet for the Clip filter (View menu, Source). Change the
Selection / Navigation Window to Navigation Window mode. You will see that Clipped
Contour is at the end of our visualization pipeline. Because no other filter is using the results
of the Clipped Contour, we can delete it. Do this by clicking the Delete button on the
Parameters tab for this data set.

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.

Step 7: Cut the combustor data


We will now create a cut plane through the combustor data set. Add a Cut filter to
the pipeline either by selecting Cut from the Filter menu or by clicking the Cut
button on the toolbar (as shown to the left). Like the Clip filter, the Cut filter
provides you with a 3D plane widget in the display area for positioning the plane for this
filter. The default Cut parameters are appropriate for this tutorial, so click the Accept button.
Also turn off the 3D widget by deselecting the Visibility check box in the Cut Function
section of the user interface. Change the Label for this filter to Cut-plane.

Figure 103. Cut plane through combustor data set

Step 8: Animate cut plane


Return to the Animation page again by selecting Animation from the View menu. Because
we will be animating the cut plane, select Cut-plane from the Source menu in the Actions
13.3 Isosurface animation 117

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.

Step 9: Save animation results


To save the images from this animation to a series of files, click the Save Images button in
the Save section of the interface. From the dialog that appears, select the location on your
disk to save the images. Set the File name to CutImage. Any of the image file formats listed
are acceptable. Press the Save button. The animation will play from beginning to end, storing
each frame in a separate image file. Some of the frames from this animation are shown below.

Frame 0 Frame 4 Frame 8

Frame 12 Frame 16 Frame 19

Table 1. Selected animation frames

This concludes this tutorial. Now you may exit ParaView.


118 Tutorials

13.4 Multi-block / Multi-part Data


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.

Step 2: Load the data


The data for this tutorial is available from the Download portion of the ParaView web site at
http://www.paraview.org/HTML/Download.html. (If you have completed the Streamlines and
Isosurface animation tutorials, you have already downloaded the appropriate data.) Select
Open Data from the File menu. Navigate to the file naca.bin.case. Select this file, and click
the Open button in the file browser dialog box. The left panel of ParaView’s user interface
should look similar to the image below.

Figure 104. Left panel after loading naca.bin.case


13.4 Multi-block / Multi-part Data 119

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.

Step 3: Reposition the camera


Using the zoom and pan mouse interactions, reposition the camera so that the right center
portion of the data set is the focal point and takes up most of the display area. See tutorial 1, A
Simple Example, step 5 if you need help with this operation. After repositioning the camera,
the display area should appear similar to the image below.

Figure 105. Pan and zoom in on the naca.bin data set

Step 4: Create contours (isolines)


We will now create contours of the density variable in this data set. To do this, first
either click on the Contour button on the toolbar (shown on the left), or select
Contour from the Filter menu. The isolines we want to generate are at the values
1.035 and 0.99. Add each of these to the Contour Values list by selecting them from the New
Value slider or entry in the Add Value section and clicking the Add button. Click the Accept
button to create the contours.
120 Tutorials

Step 5: Highlight the contours in block 2


EnSight data sets often contain multiple blocks of data which may or may not have the same
data set type. The EnSight reader groups these parts together so they can be processed as a
single unit, but it is sometimes useful to operate on a subset of these parts. In this case we
want to emphasize the parts of the isolines that lie in block 2. To do this, first make sure that
Contour0 is the active data set. Then select Extract Parts from the Filter menu. Click on
block 2 in the part selection list so that it is the only part highlighted. Click the Accept button
to separate this data block from the other two blocks in this data set. Notice that for this filter,
once Accept has been pressed, the part selection list is removed, and only the selected part is
listed on the Parameters tab. To extract other parts, you would need to apply another Extract
Parts filter.

Figure 106. Extract Parts interface with selection list

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.

Step 6: Display the contours in the other two blocks


After extracting the contours from block 2, you probably noticed that the contours in the other
two blocks were no longer visible. We want to see the isolines in all three blocks, so we need
to also extract blocks 1 and 3 from the Contour filter. Select Contour0 either from the
Selection Window or from the Select menu. Choose Extract Parts from the Filter menu
again. This time we want to select blocks 1 and 3. To select multiple blocks, select the first
13.4 Multi-block / Multi-part Data 121

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.

Step 7: Collect tubes and contour lines


Suppose we now want to do some more processing of the tubes from block 2 and the contour
lines from blocks 1 and 3 together. We could apply the same filters to Tuber0 and
ExtractParts1 individually to accomplish this, but ParaView provides a simpler solution, the
Group Parts filter. To collect these blocks of data together for processing, select the Group
Parts filter from the Filter menu. The interface that is displayed is very similar to the one for
the Extract Parts filter. In the part selection list, select only Tuber0 and ExtractParts1. Click
the Accept button.

Step 8: Save the results to a file


If we want to perform more processing on the contour lines and tubes later, it is useful to save
the results to a data file. (This may not seem necessary in this tutorial, but it can be very
helpful when performing more complex visualization tasks.) Make sure that GroupParts0 is
the current data set, and select Save Data from the File menu. Navigate to the location where
you wish to save the data, and type contours in the File name entry box. Click the Save
button to store the data on disk. Notice that ParaView Data Files (.pvd) is the only available
file type. This is because it is the only data writer currently in ParaView that handles multi-
block (or multi-part) data. This concludes this tutorial, so you may exit ParaView.
Appendix A

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.

The output of the 2D Glyph source is polygonal data.

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

The output of the 3D Text source is polygonal data.

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.

The output of the Cone source is polygonal data.


126 Sources

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

The output of the Line source is polygonal data.

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.

The output of the Mandelbrot source is image (uniform rectilinear) data.


128 Sources

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.

The output of the Maze source is polygonal data.

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.

The output of the Plane source is polygonal data.

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 = M * G * (XM * sin(XF * x) + YM * sin(YF * y) + ZM * cos(ZF * z))

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.

The output of the Wavelet source is image (uniform rectilinear) data.


Appendix B

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.

sin: Compute the sine of a scalar.


135

cos: Compute the cosine of a scalar.

tan: Compute the tangent of a scalar.

asin: Compute the arcsine of a scalar.

acos: Compute the arccosine of a scalar.

atan: Compute the arctangent of a scalar.

sinh: Compute the hyperbolic sine of a scalar.

cosh: Compute the hyperbolic cosine of a scalar.

tanh: Compute the hyperbolic tangent of a scalar.

x^y: Raise one scalar to the power of another scalar. The operands for this function are not
required to be enclosed in parentheses.

sqrt: Compute the square root of a scalar.

e^x: Raise e to the power of a scalar.

log: Compute the logarithm of a scalar.

ceil: Compute the ceiling of a scalar.

floor: Compute the floor of a scalar.

abs: Compute the absolute value of a scalar.

v1.v2: Compute the dot product of two vectors. The operands for this function are not
required to be enclosed in parentheses.

mag: Compute the magnitude of a vector.

norm: Normalize a vector.

The operands are described below.

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.

The Calculator filter is available on the Toolbar.

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.

Cell Data to Point Data

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 Contour filter computes isolines or isosurfaces using a selected point-centered


scalar array. The available scalar arrays are listed in the Scalars menu. The scalar
range of the selected array will be displayed.

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

The Crop filter extracts an area/volume of interest from a 2D image or a 3D volume by


allowing the user to specify the minimum and maximum extents of each dimension of the
data. The Input menu allows the user to select the data set to which this filter will be applied.
Both the input and output of this filter are uniform rectilinear data.

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

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

This filter only operates on unstructured data. It produces polygonal output.

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.

• Boundary edges: line cells or edges used by only one polygon


142 Filters

• Feature edges: edges used by two polygons whose dihedral angle > the value from
the Feature angle slider

• Non-manifold edges: edges used by three or more polygons

• Manifold edges: edges used by exactly two polygons

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.

This filter operates on polygonal data and produces polygonal output.

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.

Point Data to Cell Data

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

Figure 107. Contour broken across four processors

Quadric Clustering

The Quadric Clustering filter produces a reduced-resolution polygonal approximation of the


input polygonal data set. This filter is the one used by ParaView for computing LODs. It uses
spatial binning to reduce the number of points in the data set; points that lie within the same
spatial bin are collapsed into one representative point. The Divisions entries specify the
number of bins along the X, Y, and Z axes of the data set. If Use input points is on, the
representative point for each bin is selected from one of the input points that lies in that bin;
the input point that produces the least error is chosen. Without this option selected, the
location of the representative point is calculated to produce the least error possible for that
bin, but the point will most likely not be one of the input points.

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.

Figure 108. Subdivided triangle

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.

C.1 General Options


--start-empty, -e

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

Display a list of the command-line arguments and their descriptions.

C.2 Client-Server Options


--client, -c

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

If --connect-render-to-data is used, and the render server contains N


nodes, then the machines file should instead contain entries for the first N nodes of
the data server, and --machines should be specified on the data server command
line.

--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

Using a connect ID is a security feature in client-server mode. To use this feature,


pass this command-line argument with the same ID number to the client and
server(s). If you do not pass the same ID number, the server(s) will be shut down.

C.3 Rendering Options


--stereo

Enable stereo rendering in ParaView.

--render-module

Specify how ParaView should perform its rendering


(--render-module=render_module). ParaView automatically selects the
appropriate default rendering module, so most users will not need to use this option.
It is useful for debugging or if you create your own rendering 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

Use offscreen rendering on the satellite processes. On unix platforms, software


rendering or mangled Mesa must be used with this option.

--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.

C.4 Environment Variables


In addition to the command-line options previously listed, ParaView also recognizes the
following environment variables.

PV_DISABLE_COMPOSITE_INTERRUPTS

If this variable is set to 1, it is not possible to interrupt the compositing of images in


parallel rendering. Otherwise it is interruptible through mouse interaction.

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.

• byte_order: This attribute is either set to "BigEndian" or


"LittleEndian", depending on the byte order of the platform where this file is
being written. PCs use little endian byte order; Macintosh machines and most unix
workstations use big endian. Because this is an ASCII file, this attribute is not
required.

• compressor: This attribute should be set to "vtkZLibDataCompressor".


This attribute is not required.
The immediate XML sub-element of VTKFile is Collection. The <Collection>
</Collection> tags surround the DataSet elements listing the individual data files in
this collection. The DataSet elements (one per sub-file) support the following XML
attributes.

• 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

14.1 Directory Structure


After you have downloaded the ParaView source code, either through CVS or from the
ParaView web site (http://www.paraview.org/HTML/Download.html), you will see the
following directory structure under the ParaView base directory. (Each level of
subdirectories is indented further than its parent directory.)

Figure 109. ParaView directory structure


168 ParaView Architecture

CMake: files CMake uses to find specific packages and to specify some of the behavior of
ctest

Common

KWCommon: classes not in VTK that are not GUI- or filter-specific

Data

Baseline: images and text used for comparing results of ParaView regression tests

Data: sample data files distributed with ParaView

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

GUI: ParaView’s user interface

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

Testing: regression-testing scripts

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

Filters: ParaView filters not in VTK to be executed on the compute server

ServerManager: handles communication between client and server

Testing: provides basic tests for the Servers subdirectories


14.2 Server Manager 169

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

14.2 Server Manager


The server manager in ParaView is a layer of code between the data and render servers and
the user interface. It provides an interface to create and manage objects in parallel. The server
manager runs on a single processor – either the client (when running ParaView in
client/server mode) or the first process (when running in distributed stand-alone mode). The
server manager sends commands to the server, and the server is responsible for executing
them. The ParaView GUI has access to the server manager, and this is the only way for the
GUI to access the server objects. Because of this, it is possible to create new GUIs for
ParaView as long as they can communicate appropriately with the server manager.

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

Compiling / Installing ParaView

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 login


(Respond with an empty password.)

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.

Figure 111. Terminal-based CMake interface


15.2 On Windows 173

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

Figure 112. CMakeSetup interface

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.

16.1 User Interface XML


ParaView/GUI/Client/Resources is the directory containing the XML files for
ParaView’s user interface. The files are Readers.xml, Sources.xml, Filters.xml,
Writers.xml and Manipulators.xml.

<ModuleInterfaces> </ModuleInterfaces>: These are the tags that begin and


end a ParaView user interface XML file.

Modules
<Module> </Module>: These are the tags that begin and end each ParaView module (a
reader, a source, or a filter).
176 ParaView XML

Each Module element may contain the following attributes.

• name: This is a unique identifier per module (e.g., name="VectorText"). This


is a required attribute.

• class: In Readers.xml, this attribute specifies the appropriate ParaView reader


module (e.g., class="vtkPVDReaderModule"). It is a required attribute in
Readers.xml. It is unnecessary in the XML files for other types of modules.

• 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").

• menu_name: In Sources.xml and Filters.xml, this attribute indicates the


entry in the Source or Filter menu that corresponds to this module (e.g.,
menu_name="3D Text").

• button_image: If the ParaView module being described has a corresponding


toolbar button, this XML attribute specifies the name of the image to display on the
button.

• button_help: If the ParaView module being described has a corresponding


toolbar button, this XML attribute specifies the help string to display when the cursor
is over the toolbar button for this module.

• 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.

• file_description: This attribute is required for reader modules. It indicates the


description of this file type that will be listed in an Open File dialog.

• multiprocess_support: Use this attribute to specify whether this module runs


only in a single process, only in parallel, or in both cases. By default, ParaView
expects modules to run in both modes. The accepted values are single_process,
multiple_processes, and both.

• replace_input: By default in ParaView, when a filter is applied to a data set, the


visibility of its input is turned off. Use this attribute to change this behavior so that
16.1 User Interface XML 177

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.

ParaView data set type VTK class name


Polygonal vtkPolyData
Unstructured Grid vtkUnstructuredGrid
Curvilinear vtkStructuredGrid
Nonuniform Rectilinear vtkRectilinearGrid
Uniform Rectilinear vtkImageData

• 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

• GroupRequirement: This requirement specifies that this filter operates on


grouped inputs. It has one attribute, quantity, which can be set to "Multiple",
"Single", or a specific number of inputs.

• 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.

• trace_name: This required attribute allows a module to access its widgets by


name, so each widget in a particular module must have a unique trace_name
value.

• 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.

Figure 113. Array menu for selecting scalars

<ArrayMenu id="am" property="SelectInputScalars"


trace_name="Scalars" label="Scalars"
field_menu="fm"
help="Choose the threshold scalar array."/>

The following attributes are supported by the ArrayMenu element.

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.

input_menu: The value of the input_menu attribute must match the


id value of the InputMenu XML element in this module. The arrays
listed in the array menu will be taken from the selected input. This is a
required attribute.

field_menu: The value of the field_menu attribute must match the id


value of the FieldMenu XML element in this module. This allows the
user to specify whether the arrays listed are point-centered or cell-centered.
If a filter either operates only on point-centered data or only on cell-
centered data, then this attribute is not needed because there will be no field
menu.

property: StringVectorProperty

• ArraySelection: An array selection is used in reader modules to choose which


point-centered (as shown in the image below) or cell-centered attributes to load from
the data file.
180 ParaView XML

Figure 114. Array selection for choosing point arrays

<ArraySelection label_text="Point Arrays"


property="PointArrayStatus"
trace_name="PointSelection"/>

The following attributes are supported by the ArraySelection element.

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.

Figure 115. Bounds display widget

<BoundsDisplay show_hide_frame="1" label="Input Bounds"


property="InputBounds"
trace_name="Input Bounds"
input_menu="im1"/>

BoundsDisplay supports the following attributes.

show_hide_frame: This attribute accepts values of "0" and "1" to


determine whether the X appears in the upper right corner of the widget,
which allows the frame to be minimized. (A value of "1" was used in the
example shown above.) The default value is 0.
16.1 User Interface XML 181

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.

<BoxWidget use_label="0" trace_name="Box"


help="Adjusts the parameters of the box to clip
with."/>

The box widget’s unique attribute is described below.

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: The calculator widget is a widget similar to a scientific


calculator. It is used only with the Calculator filter.

Figure 116. Calculator interface

<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."/>

The attributes of the CalculatorWidget are as follows.

function_property: This required attribute specifies the name of the


server manager property associated with the function entry box near the top
of the calculator widget. The server manager property is of type
StringVectorProperty.

scalar_property: This required attribute specifies the name of the


server manager property associated with the scalars menu button near the
bottom of the calculator widget. The server manager property is of type
StringVectorProperty.

vector_property: This required attribute specifies the name of the


server manager property associated with the vectors menu button near the
bottom of the calculator widget. The server manager property is of type
StringVectorProperty.

attribute_mode_property: This required attribute specifies the


name of the server manager property associated with the Attribute Mode
menu button at the top of the calculator widget. The server manager
property is of type IntVectorProperty.

• ContainerWidget: The container widget is used for grouping together other


widgets. This is helpful if you wish to display multiple widgets on the same line or if
multiple widgets should change based on the option chosen from a select widget (as
described later in this section.)

Figure 117. Container widget grouping three sub-widgets

<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>

The ContainerWidget has only one unique attribute.

pack_direction: The pack_direction attribute determines from


which side of the container widget sub-widgets will be added. The accepted
values are "left", "right", "top", and "bottom". The default value
is "top".

Each sub-widget in a container widget is enclosed in <Item> </Item> tags, which


may have an id attribute as described previously in this section. Any ParaView
widget can be a sub-widget of a container widget.

• ContourEntry: In ParaView, the contour entry is used for adding values at which
to create isosurfaces.

Figure 118. Adding a contour value at -0.0178328


184 ParaView XML

<ContourEntry label="Contour Values"


trace_name="Contour Values"
array_menu="am" property="ContourValues"
help="List of current contour values." />

The attributes the ContourEntry element supports are listed below.

label: This required attribute determines the label shown at the top of the
contour widget ("Contour Values" in the image above).

array_menu: This widget depends on the value of an array menu to


determine the allowable range of contour values. This value must match the
id value of the point-centered ArrayMenu XML element in this module.

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.

<CutEntry label="Cut Offset Values"


trace_name="Cut Values"
input_menu="im1" property="ContourValues"
help="List of current offset values. This can be
used to create multiple cut planes/spheres with different
centers. Each entry represents a new cut with center shifted
by the offset value."/>

The cut entry supports the following attributes.

label: This required attribute determines the label shown at the top of the
contour widget.

input_menu: This widget depends on the value of the input menu to


determine the allowable range of cut offsets. This value must match the id
value of the InputMenu XML element in this module.

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"/>

• ExtentEntry: The extent entry is used for selecting a sub-region of a volumetric


data set. Six sliders allow you to choose the minimum and maximum extent in each
dimension.

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."/>

The following attributes are supported for the extent entry.

label: The value of this attribute determines the text string that appears at
the top of this widget ("VOI" in the example above).

input_menu: This widget depends on the value of the input menu to


determine the minimum and maximum extents in each dimension. This
value must match the id value of the InputMenu element in this module.

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."/>

The only additional attribute supported by the ExtractPartsWidget is


property.

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." />

The following XML attributes are supported.

input_menu: This widget depends on the value of the input menu to


determine which types of attributes are available. This value must match
the id value of the InputMenu in this module.

property: IntVectorProperty

• FileEntry: The file entry is used by reader modules to select the file name of the
data set to be loaded.

Figure 122. Loading timestep 0 with a file entry


16.1 User Interface XML 187

<FileEntry label="Q File"


trace_name="QFileName"
property="QFileName" extension="q"
help="Set the plot3d q file to read."/>

This element supports the following attributes.

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.

Figure 123. Select inputs to group together.

<GroupInputsWidget trace_name="inputs"
help="Choose inputs to group."/>

• ImplicitPlaneWidget: The implicit plane 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.

<ImplicitPlaneWidget trace_name="Plane"
use_label="0"
input_menu="im1"
help="Adjusts the parameters of the
plane to cut with."/>

The implicit plane widget’s unique attributes are described below.


188 ParaView XML

use_label: This attribute of the implicit plane 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.)

input_menu: This required attribute allows ParaView to place the display


area portion of the implicit plane widget with respect to the current input to
the filter using this widget. The value of this attribute must match the id
value of the InputMenu XML element in this module.

• InputMenu: The input menu allows you to select the data set to use as input to a
filter.

Figure 124. Select the input to a filter.

<InputMenu trace_name="Input" label="Input" property="Input"


help="Set the input to this filter."
input_name="Input"/>

InputMenu has the following XML attributes.

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.

source_list: Use this attribute to indicate which list of sources to use


when populating the input menu. The options are "Sources" and
"GlyphSources". "Sources" is the default.

property: InputProperty

• LabeledToggle: The labeled toggle widget adds a check box to the ParaView
user interface to toggle the value of a particular variable.

Figure 125. Toggle the value of Random Masking.


16.1 User Interface XML 189

<LabeledToggle label="Random Masking"


trace_name="RandomMask"
property="RandomMode"
help="Choose points at random to mask" />

LabeledToggle supports the following attributes.

label: This is the text string that appears to the left of the check box
("Random Masking" in the above image).

property: IntVectorProperty

• LineSourceWidget: The line source widget is a 3D widget, so it has both user


interface and display area components. Its uses are discussed in section 6.4. (Its user
interface is the same as that for the line widget.) Use the line source widget when the
line itself should be used as input to the filter using this widget. If your filter only
needs the endpoints of the line, use the line widget instead.

<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"/>

The line widget’s unique attributes are described below.

point1_variable: This attribute is the name of the variable being


controlled by point 1 of the line widget.

point2_variable: This attribute is the name of the variable being


controlled by point 2 of the line widget.
190 ParaView XML

resolution_variable: This attribute is the name of the variable being


controlled by the resolution entry box of the line widget.

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.

resolution_label: The value of this attribute is the text string that


appears to the left of the resolution entry box.

show_resolution: This attribute is a boolean value that determines


whether to display the resolution entry box and its associated label. By
default the resolution controls are displayed.

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.

Figure 126. Select the upper and lower threshold 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"/>

MinMax’s XML attributes are listed below.


16.1 User Interface XML 191

array_menu: This widget depends on the value of an array menu to


determine the range of the sliders. This value must match the id value of
the ArrayMenu XML element in this module.

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.

min_help: The value of this attribute is a text string that is displayed


when the cursor rests over the minimum value slider.

max_help: The value of this attribute is a text string that is displayed


when the cursor rests over the maximum value slider.

property: IntVectorProperty or DoubleVectorProperty

• OrientScaleWidget: The orient scale widget is a special-purpose widget for use


with the Glyph filter. It changes the value of the scale factor based on the scalar or
vector chosen for scaling the glyphs. It also enables and disables the scalar and
vector menus as appropriate based on the scaling and orientation options chosen.

Figure 127. Set up orientation and scaling for glyphs

<OrientScaleWidget trace_name="OrientScale" input_menu="im"


scalar_property="SelectInputScalars"
vector_property="SelectInputVectors"
orient_mode_property="SetOrient"
scale_mode_property="SetScaleMode"
scale_factor_property="SetScaleFactor"/>

The OrientScaleWidget supports the following XML attributes.


192 ParaView XML

input_menu: This required attribute allows ParaView to determine the


bounds of the input data set to the filter using this widget. The bounds are
necessary for computing the scale factor value. The value of this attribute
must match the id value of the InputMenu XML element in this
module.

scalar_property: StringVectorProperty

vector_property: StringVectorProperty

orient_mode_property: IntVectorProperty

scale_mode_property: IntVectorProperty

scale_factor_property: DoubleVectorProperty

• PointSourceWidget: The point source widget is a 3D widget, so it has both user


interface and display area components. Its uses are discussed in section 6.4. (Its user
interface is the same as that for the point widget.) Use the point source widget when
the point (or point cloud) itself should be used as input to the filter using this widget.
If your filter only needs the coordinates of the point(s), use the point widget instead.

<PointSourceWidget trace_name="Point"
default_radius="0"
default_number_of_points="1"
show_entries="0"/>

The PointSourceWidget supports the following unique attributes.

default_radius: The value of this attribute determines the initial


radius of the point cloud. If unspecified, the radius of the point cloud will be
0 (i.e., a single point).

default_number_of_points: The value of this attribute determines


the initial number of points in the point cloud. If unspecified, the number of
points will be 1.

show_entries: This attribute controls whether the Radius and Number


of Points entry boxes are displayed. By default these entries are displayed.

input_menu: This attribute allows ParaView to place the display area


portion of the implicit plane widget with respect to the current input to the
filter using this widget. If this behavior is not desired, then this attribute is
16.1 User Interface XML 193

unnecessary. The value of this attribute must match the id value of the
InputMenu XML element in this module.

radius_scale_factor: The value of this attribute is used in


determining the value in the Radius entry box. The radius is determined by
multiplying the longest edge of the data set’s bounding box by the scale
factor. The default radius scale factor is 0.1.

• 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.

<PointWidget trace_name="Point" variable="WorldPoint"/>

The point widget’s unique attributes are described below.

variable: This attribute is the name of the variable being controlled by


this widget.

use_label: This attribute of the point 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.) The default value is "1".

• ScalarRangeLabel: The scalar range label displays the range of values stored in
a single-component attribute array.

Figure 128. Label displaying the range of a single-component attribute array

<ScalarRangeLabel property="Value"
trace_name="ScalarRange"
array_menu="it3.am1"/>

The XML attributes supported by this widget are shown below.

array_menu: This widget depends on the value of an array menu to


determine the array from which to compute the scalar range to be displayed.
The value of this required attribute must match the id value of an
ArrayMenu XML element in this module.
194 ParaView XML

property: DoubleVectorProperty

• Scale: The scale widget displays a slider from which you can select the value of
the associated variable.

Figure 129. Move the slider to select a Shrink factor value.

<Scale label="Shrink factor"


trace_name="ShrinkFactor"
property="ShrinkFactor"
help="Set the amount to shrink by"
resolution="0.01"
display_entry="1"
entry_and_label_on_top="0"
display_value="0"/>

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).

resolution: This attribute determines the granularity of the slider. The


default resolution is 1.

display_entry: The display_entry attribute determines whether


an entry box will be displayed to the right of the slider. By default the entry
is not displayed.

entry_and_label_on_top: This attribute controls whether the label


and entry are displayed above the slider or at either end of it. By default the
label and entry are drawn above the slider.

display_value: This attribute determines whether the current value of


the scale is displayed above it. By default this value is displayed.

trace_slider_movement: By default this attribute is set to "0". If it


is set to "1", then each time you move the slider, the new value will be
recorded in ParaView’s trace file. Otherwise the value will only be recorded
when the Accept button is pressed for a reader, source, or filter.
16.1 User Interface XML 195

• ScaleFactorEntry: The scale factor entry is a specialized version of the vector


entry (described later in this section). It always has one entry, and its initial value is
based on a multiplier and the bounds of the data set.

Figure 130. Enter a Radius factor value.

<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).

input_menu: This widget depends on the value of the input menu to


determine the bounds of the input data set to the filter using this widget. The
bounds are used in calculating the scale factor for this widget. The value of
this attribute must match the id value of the InputMenu XML element
in this module.

scale_factor: The scale factor is the constant value that is multiplied


by the length of the longest edge of the input data set’s bounding box to
determine the initial value of the scale factor entry. The default scale factor
is 0.1.

property: DoubleVectorProperty

• SelectCTHArrays: The select CTH arrays widget is specialized for selecting


CTH volume fractions. By default only arrays with “Volume Fraction” in the array
name are displayed. If the Show All check box is marked, all arrays in the data set
are displayed.

Figure 131. Select arrays from the list of available ones.


196 ParaView XML

<SelectCTHArrays input_menu="im"
trace_name="ArraySelection"
property="AddVolumeArrayName"
help="Select the volume fraction arrays for
generating parts."/>

The XML attributes supported by this widget are described below.

input_menu: This widget depends on the value of the input menu to


determine the cell-centered attribute arrays of the input data set to the filter
using this widget. The value of this attribute must match the id value of the
InputMenu XML element in this module.

property: StringVectorProperty

• SelectionList: The selection list is a menu that provides you with a list of
possible values for a particular variable.

Figure 132. Choose the value of Plane from the menu.

<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>

This widget supports the following XML attributes.

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

option_width: This attribute allows you to specify the desired width of


the menu button in numbers of characters. If this option is not specified, the
size of the menu will change to accommodate the current selection.

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.

<SelectTimeSet label="Select time value"


property="SetTimeValue"
trace_name="TimeSet"/>

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.

<SelectWidget label="Cut Function"


trace_name="Cut Function"
property="CutFunction">
<Item label="Plane" value="Plane">
<ImplicitPlaneWidget trace_name="Plane"
use_label="0"
input_menu="im1"
help="Adjusts the parameters of the
plane to cut with."/>
</Item>
<Item label="Sphere" value="Sphere">
<SphereWidget trace_name="Sphere"
use_label="0"
help="Adjusts the parameters of the sphere
to cut with."/>
</Item>
</SelectWidget>

Below is a list of supported XML attributes.

label: This is the text string that appears above the frame of the select
widget ("Cut Function" in the above image).

property: DoubleVectorProperty, IntVectorProperty,


InputProperty, ProxyProperty, StringVectorProperty

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: The sphere 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.

<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.

use_label: This attribute of the sphere 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.)

• StringEntry: A string entry is an entry box that accepts text strings.

Figure 135. Enter the name of the result array.

<StringEntry property="ResultArrayName"
trace_name="ResultArray"
label="Result Array Name"
help="Set the name of the array to hold the
results of this computation"/>

Listed below are the supported XML attributes of this widget.

label: This is the text string that appears to the left of the text entry
("Result Array Name" in the above image).

property: StringVectorProperty

• TempTessellatorEntry: The temp tessellator entry was specifically designed


to work with the Tessellate filter. It allows you to specify the maximum allowable
chord error per point-centered attribute for subdivisions during tessellation.
200 ParaView XML

Figure 136. Select arrays to consider in tessellation.

<TempTessellatorEntry label="Max Field Error"


trace_name="FieldError2"
property="FieldError2"
help="The maximum field error allowed
at any edge midpoint in the output tessellation."
input_menu_id="tess_source_select"/>

Listed below are the XML attributes for this widget.

input_menu_id: This widget depends on the value of the input menu to


determine the point-centered attribute arrays of the input data set to the filter
using this widget. The value of this required attribute must match the id
value of the InputMenu XML element in this module.

property: DoubleVectorProperty

• ThumbWheel: The thumb wheel widget is a combination of an entry box and a


right-pointing arrow button that displays a thumb wheel. It is useful when the
variable you are setting has a minimum allowable value but no maximum one.

Figure 137. Select the radius value.

<ThumbWheel label="Radius" trace_name="Radius"


property="Radius"
resolution="0.01" minimum_value="0"
help="Set the radius of the widget part of the
cone" />
16.1 User Interface XML 201

This widget supports the following XML attributes.

label: This is the text string that appears to the left of the entry box
("Radius" in the above image).

resolution: Moving the thumb wheel will increase or decrease the


value of this widget by an amount proportional to the value of this attribute.

minimum_value: The value of this attribute is the smallest allowable


value of this widget.

property: DoubleVectorProperty or IntVectorProperty

• VectorEntry: The vector entry widget consists of a label followed by one or


more numeric entry boxes.

Figure 138. Choose the center using the three entry boxes.

<VectorEntry label="Center" property="Center"


trace_name="Center"
type="float" length="3"
help="Set the x, y, z coordinates of the origin
of the axes" />

This widget supports the following XML attributes.

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).

type: A vector entry can accept either integer (type="int") or floating-


point (type="float") values. The default is floating-point.

property: DoubleVectorProperty or IntVectorProperty

• XDMFParameters: The XDMF parameters widget is a specialized widget for the


XDMF reader. A number of parameters are specified in each XDMF data set. For
202 ParaView XML

each parameter, this widget provides a slider for selecting the number of iterations
you wish to read.

Figure 139. Choose the number of iterations per parameter.

<XDMFParameters trace_name="xdmf_parameters"
property="ParameterIndex"
label="Parameters" />

This widget supports the following XML attributes.

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.

• file_description: The file_description attribute indicates the


description of this file type that will be listed in a Save Data dialog.

• parallel: This attribute indicates whether this writer works in parallel. The
default is"0".

• data_mode_method: If this attribute is used, it sets the C++ method to be used to


set the data mode (i.e., ASCII or binary) for writing data with this writer. By default,
no method is specified.

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.

• types: This attribute specifies whether this manipulator operates in 2D mode


("2D"), in 3D mode ("3D"), or in both modes ("2D 3D").

• 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.

16.2 Server Manager XML


While the user interface XML specifies what controls should be provided for the ParaView
modules, writers, and manipulators, the XML for ParaView’s server manager determines how
the values changed by these controls affect the underlying sources, filters, etc. Each of the
user interface XML files for ParaView modules has a corresponding server manager XML file
(i.e., readers.xml, sources.xml, and filters.xml). These files are located in the
ParaView/Servers/ServerManager/Resources directory. The other two XML
files in this directory contain information for utilities and rendering.

<ServerManagerConfiguration> </ServerManagerConfiguration>: These


are the tags that begin and end each server manager XML file.
204 ParaView XML

The type of the only direct sub-element of ServerManagerConfiguration is


ProxyGroup. The ProxyGroup element has one attribute, name, which is used by the
proxy manager to refer to a group of proxies. The valid value of this attribute for the
readers.xml and sources.xml files is "sources". The filters.xml file uses
"filters", and the rendering.xml file uses "rendering". There are several proxy
groups in utilities.xml; their names are "lookup_tables",
"implicit_functions", "transforms", "matrices", and "data_arrays".

Readers, Sources, and Filters


Each reader, source, and filter is represented by a SourceProxy element (a sub-element of
ProxyGroup). The SourceProxy element has the following two attributes.

• name: This is the unique identifier of this source proxy.

• class: This is the name of the VTK class to be created.

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.

• information_only: Use this attribute to specify that this property is for


retrieving information instead of setting it.

• information_property: List the name of a property (with


information_only set to "1") that is being used to obtain information for 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.

The three vector properties, DoubleVectorProperty, IntVectorProperty, and


StringVectorProperty, each represent a list of one or more values of the type
indicated by the property name. These property types have several additional XML attributes
in common.
16.2 Server Manager XML 205

• number_of_elements: The value of this attribute is the length of the list of


double values contained in this property.

• 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".

• number_of_elements_per_command: This attribute determines the number


of elements that should be passed as parameters of command each time command is
called. For example, if this property has four elements, repeat_command="1",
and this attribute has a value of "2", then command would be called twice: once
with the first two elements and once with the second two.

• use_index: If this attribute and repeat_command have values of "1", then an


integer index will be included as the first parameter to this command. For example, if
the command is SetValue, there are four elements (0.0, 1.0, 2.0, and 3.0),
two per command, and use_index is set to "1", then the command will be called
twice as shown below.

SetValue 0 0.0 1.0


SetValue 1 2.0 3.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

An information helper is only used with server manager properties whose


information_only attribute is set to "1". It gathers the required information from the
server for the property with which it is associated.

• DoubleVectorProperty: The DoubleVectorProperty represents a list of one or


more values of type double. It supports the following types of domains.

DoubleRangeDomain: This domain provides the minimum and/or the


maximum value of this property. Its attributes are name, min, and max. If
the name attribute is set to "range", then the variable controlled by this
property can be animated.

BoundsDomain: To appropriately set some variables, it is necessary to


know information about the bounds (an axis-aligned bounding box) of the
data set being manipulated. To provide this information, we use a
BoundsDomain. This domain has two attributes: name and mode. The
possible values of the mode attribute are "normal" (i.e., the values of the
domain are the bounds of the data set) and "magnitude" (i.e., the values
are the diagonal of the bounding box and its negative). The default value is
"normal".

To use this domain, an InputProperty must also be specified. Because


it is a required property for this domain, it must be enclosed in
<RequiredProperties> </RequiredProperties> tags as
shown below. The value of the name attribute must match that of the
InputProperty of the filter being described. The function attribute
is used in looking up a particular required property. For the
BoundsDomain, its value must be "Input".

<BoundsDomain name="bounds">
<RequiredProperties>
<Property name="Input" function="Input"/>
</RequiredProperties>
</BoundsDomain>

ArrayRangeDomain: If the range of values for this variable depends on


the range of values in a particular data array (i.e., a data set attribute), use
the ArrayRangeDomain. The only attribute for this domain is name. It
has two required properties: input (as described for the BoundsDomain)
and a StringVectorProperty associated with the array selection
menu determining which array’s range to use. The function for the
StringVectorProperty must be "ArraySelection".
16.2 Server Manager XML 207

<ArrayRangeDomain name="scalar_range">
<RequiredProperties>
<Property name="Input" function="Input"/>
<Property name="SelectInputScalars"
function="ArraySelection"/>
</RequiredProperties>
</ArrayRangeDomain>

• IntVectorProperty: The IntVectorProperty represents a list of one or more


values of type int. It supports the following domains and information helpers.

BooleanDomain: Use this domain if this IntVectorProperty can only


have the values "0" or "1" (e.g., if this property is associated with a toggle
button). The only XML attribute for this domain is name.

ExtentDomain: This domain can be used with structured data sets to


provide information about the extents of the data set. This domain only has
a name attribute. It is required to have an InputProperty. The XML
specification for this is described in the section about the BoundsDomain
of the DoubleVectorProperty.

EnumerationDomain: An EnumerationDomain contains a list of


acceptable integer values for this property and an associated text string for
each value. An Entry sub-element for each value/text pair must be
provided. An example of the XML for doing this is shown below.

<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>

IntRangeDomain: This domain provides the minimum and/or the


maximum value of this property. Its attributes are name, min, and max. If
the name attribute is set to "range", then the variable controlled by this
property can be animated.
208 ParaView XML

SimpleIntInformationHelper: This information helper calls its


property’s command on the appropriate server and uses the values returned
to populate the property. It does not have any XML attributes.

• StringVectorProperty: The StringVectorProperty represents a list of


text strings. This property is also used when the parameters to a function do not all
have the same data type. It supports the following attributes, domains, and
information helpers.

element_types: If an instance of StringVectorProperty will


have non-string elements, this attribute allows you to specify which type(s)
to use. To specify multiple elements, provide a space-separated list. A
StringVectorProperty can handle elements of type int (="0"), double
(="1"), and string (="2"). For example, if the parameters to your
command are two strings followed by an int, this attribute would be set to
"2 2 0".

ArrayListDomain: The ArrayListDomain contains a list of arrays


obtained from the input to the filter using this property. The attributes
supported by this domain are name, attribute_type (one of
"Scalars", "Vectors", "Normals", or "TCoords", indicating the
attribute type of the array names to include), and input_domain_name
(lists the name of the appropriate InputArrayDomain if the input has
more than one of them).

The ArrayListDomain also has two required properties: an input


property and an IntVectorProperty (to determine whether the data
arrays are point-centered or cell-centered). The IntVectorProperty is
only required if the filter can operate on either point- or cell-centered data.

<ArrayListDomain name="array_list"
attribute_type="Scalars">
<RequiredProperties>
<Property name="Input" function="Input"/>
<Property name="AttributeMode"
function="FieldDataSelection"/>
</RequiredProperties>
</ArrayListDomain>

ArraySelectionDomain: An ArraySelectionDomain lists array


names that are valid text strings for this property. Its only attribute is name.
Its required property is a StringVectorProperty (an information
16.2 Server Manager XML 209

property) from which it retrieves the list of array names. This domain is
used when selecting which data arrays to load from a file.

StringListDomain: As the name implies, this type of domain contains


a list of text strings that are valid values for this property. It may include a
required StringVectorProperty from which to obtain the list of
strings. It is required to have a name attribute.

XDMFPropertyDomain: This domain contains a list of strings for use


with the XDMF reader. It supports the name attribute. It has a required
StringVectorProperty from which it obtains this information. That
property must have an XDMFInformationHelper (described below).

ArraySelectionInformationHelper: This information helper


retrieves information from the server about the names of the attribute arrays
contained in the data set being loaded by the reader using this property.
(This information helper is only used with readers, not sources or filters.)
The only attribute supported by this information helper is
attribute_name. The acceptable values of attribute_name are
"Cell" and "Point", indicating cell-centered or point-centered data
arrays.

XDMFInformationHelper: The XDMFInformationHelper obtains


XDMF parameters from the data server. This information is propagated to
the XDMFPropertyDomain. This information helper does not require
any XML attributes.

SimpleStringInformationHelper: This information helper calls


its property’s command on the appropriate server and uses the values
returned to populate the property. It does not have any XML attributes.

• ProxyProperty: The ProxyProperty represents pointer(s) to object(s). This


property supports the ProxyGroupDomain.

ProxyGroupDomain: This domain contains a list of proxy groups on


which this property operates. Its only attribute is name. It contains one sub-
element called Group per appropriate proxy group. The only attribute of
the Group element is its name, which must match the name of the proxy
group containing proxies appropriate for the task performed by this
property.

<ProxyGroupDomain name="groups">
<Group name="sources"/>
210 ParaView XML

<Group name="filters"/>
</ProxyGroupDomain>

• InputProperty: The InputProperty represents the input to a filter. This


property supports the following attributes and domains in addition to the
ProxyGroupDomain (described above). This domain can be used by two
properties because it is defined for vtkSMProxyProperty, the superclass of
vtkSMInputProperty.

clean_command: The value of this attribute is a command to remove the


inputs to the filter using this InputProperty. If this attribute is set, the
clean_command will be called before the command is called.

multiple_input: Setting the value of this attribute is set to "1"


indicates that the filter using this InputProperty accepts multiple
inputs (e.g., the Append filter or the Stream Tracer filter)

DataTypeDomain: This domain is used to specify which data set types


are appropriate for this InputProperty. Its only attribute is name. It has
one sub-element called DataType per data set type; its only attribute is
value, which indicates the name of the VTK class for that data set type. If
a filter can accept any data set type as input, value should be set to
"vtkDataSet".

<DataTypeDomain name="input_type">
<DataType value="vtkImageData"/>
<DataType value="vtkRectilinearGrid"/>
<DataType value="vtkStructuredPoints"/>
<DataType value="vtkStructuredGrid"/>
</DataTypeDomain>

NumberOfPartsDomain: The NumberOfPartsDomain restricts


whether the filter using this property operates only on a single input or only
on a group of inputs (a multi-part data set). In addition to the name
attribute, this domain also uses an attribute called multiplicity. The
possible values for multiplicity are "single" and "multiple".

InputArrayDomain: The InputArrayDomain requires that an input


to this filter must have one or more attribute arrays. Besides the name
attribute, this domain also supports attribute_type ("point" or
"cell" to indicate whether the arrays must be point- or cell-centered), and
number_of_components. Neither attribute_type nor
16.2 Server Manager XML 211

number_of_components are required in all cases. Additionally, this


domain may have a required IntVectorProperty (like that used for
the ArrayListDomain) to determine whether the arrays are point- or
cell-centered.

FixedTypeDomain: This domain is necessary when a filter accepts


multiple types of data sets as input, but the type cannot change once it has
been initially set. Its only attribute is its name.

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.

The DisplayWindowProxy is responsible for managing the renderer, render window,


composite manager, camera, and image writer (for taking screen shots of the display area).

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

16.3 Adding New Modules


In order to add any new modules to ParaView, you must write both of the necessary user
interface and server manager XML files as described in the previous two sections. Place these
files in the same directory. They will be loaded if their directory is the one pointed to by the
PV_INTERFACE_PATH environment variable, or you can use the Import Package option on
the File menu to load the user interface XML file. In either case, the user interface XML file
will be loaded first, and an additional XML element, ServerManagerFile, needs to be
added to indicate the name of the server manager XML file. Its only attribute is name, the
name of the server manager XML file. This new XML element should be added immediately
after the <ModuleInterfaces> tag as shown below.

<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

Modifying the User Interface

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.

17.1 Important Classes


Before you can begin modifying the ParaView user interface, there are a few important
classes with which you should become familiar.

Widgets: The classes in this directory (ParaView/GUI/Widgets) are Tcl/Tk widgets


(buttons, sliders, etc.) to which ParaView provides access through C++. The superclass for all
of these widgets is vtkKWWidget. Some of the C++ widgets are composed of more than
one Tcl/Tk widget. Every widget has a SetParent method (to specify the widget within
which the new widget will be displayed) and a Create method (to create the corresponding
Tcl/Tk widget). Many widgets also have a SetCommand method to specify a C++ method to
call when an action is performed on this widget. Many of the classes in the
ParaView/GUI/Client directory are more specialized versions of those in
ParaView/GUI/Widgets. Additional functionality has been added to specify the widgets
through XML and to allow them to interact with the server manager.
214 Modifying the User Interface

vtkPVWindow: vtkPVWindow is a subclass of vtkKWWindow. It is responsible for


creating the main application window. It contains the menu bar, the status bar, the left panel,
and the display area (vtkPVRenderView). It provides access to the
vtkPVApplication (discussed next).

vtkPVApplication: vtkPVApplication (in ParaView/GUI/Client) is a subclass of


vtkKWApplication (in ParaView/GUI/Widgets) that is specific to ParaView.
vtkKWApplication is primarily responsible for managing the windows in an application.
Only one instance of vtkPVApplication exists when ParaView is run. As each widget in
ParaView is created, this instance of vtkPVApplication is passed to it.

vtkPVRenderView: vtkPVRenderView (in ParaView/GUI/Client) is responsible


for displaying the results of a visualization pipeline in ParaView as well as any annotations
that have been enabled. The 3D View Properties property sheet is associated with the render
view.

vtkPVApplicationSettingsInterface: This class (in ParaView/GUI/Client) and its


superclass, vtkKWApplicationSettingsInterface, contain the controls for the
Application Settings property sheet.

17.2 Add a Button


First we will demonstrate adding a button to the General tab of the 3D View Properties
property sheet to print the current color of the display area. In vtkPVRenderView.h (in
ParaView/GUI/Client), add the following line in the protected section.

vtkKWPushButton *PrintColorButton;

In vtkPVRenderView.cxx, add the following line to the constructor. In ParaView, we


use this-> before instance variables and methods defined for that class, making them stand
out from other functions and variables. This increases code readability, and does not incur any
additional overhead.

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;

In the vtkPVRenderView::CreateViewProperties() method we will add our new


button to the user interface. The classes in ParaView that add widgets to the interface will
have a Create***() method for doing this. Our new code must be placed after the call to
the superclass’s CreateViewProperties() method.

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();

We also need to add the implementation of this new method to vtkPVRenderView.cxx. We


want to print the red, green, and blue components of the color of the display area in the
terminal window. We will use the vtkKWView::GetRendererBackgroundColor
method to get the appropriate values to print.

void vtkPVRenderView::PrintColor()
{
216 Modifying the User Interface

double red, green, blue;


this->GetRendererBackgroundColor(&red, &green, &blue);
cout << "color: " << red << " " << green << " " << blue
<< endl;
}

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.

Figure 140. Print Color button added to user interface

17.3 Add a Menu Item


Now that we have discussed adding a button, we will next demonstrate adding a menu item to
ParaView’s File menu. The menu entry we will add will allow you to capture the ParaView
application window in an image. The new entry should be located just below the Save View
Image entry already in the File menu. The Save View Image entry is added in vtkKWView’s
Select method. The following line in the method vtkPVWindow::CreateMainView
causes the Select method to be called, so we will add our new menu option at the end of
CreateMainView.

this->MainView->MakeSelected();

At the end of vtkPVWindow::CreateMainView, add the following C++ command.

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

When this entry is selected from the menu, the method


vtkPVWindow::SaveWindowAsImage will be called, so we must now add this new
method to this class. First add this declaration in the public section of the class definition
for vtkPVWindow (in ParaView/GUI/Client/vtkPVWindow.h).

void SaveWindowAsImage();

The implementation of this method should be added in


ParaView/GUI/Client/vtkPVWindow.cxx. We will need a dialog box to select the
file name to use in saving the image, and we will use the method
vtkKWWidget::TakeScreenDump to capture the image.

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->SetTitle("Save ParaView Window");


saveDlg->SetFileTypes("{{PNG Images} {.png}}");
if (saveDlg->Invoke())
{
fileName = vtkString::Duplicate(saveDlg->GetFileName());
}

if (fileName && vtkString::Length(fileName) > 0)


{
this->MainView->ForceRender();
this->TakeScreenDump(fileName, 48);
}

saveDlg->Delete();
delete [] fileName;
}

To create the dialog, use the vtkKWLoadSaveDialog (found in


ParaView/GUI/Widgets). Once we have created a new instance of it using
vtkKWLoadSaveDialog::New(), we use the Create method to create the Tcl/Tk
widget associated with vtkKWLoadSaveDialog. Be sure to call SaveDialogOn() on
this object to indicate to the dialog that it will be used for saving a file, not for loading one.
We set the parent of the dialog to be this vtkPVWindow. The title is set to Save ParaView
Window. The method we will use to capture an image of the ParaView window only creates
.png files, so the file types specified to the dialog box must indicate this. If this dialog’s Save
button is clicked, then saveDlg->Invoke() will return a value greater than 0. We will
save the specified file name, force ParaView to re-render (as discussed below), and then
capture the image of the ParaView window. After you have recompiled ParaView to
incorporate the changes we have made, selecting the Save Window Image entry from the File
menu will display the following dialog box.
17.3 Add a Menu Item 219

Figure 142. Dialog box for saving image of ParaView window

The TakeScreenDump method in vtkKWWidget allows you to capture an image of a


widget (the instance of vtkKWWidget on which this method is called) and to save the
results in a .png file. In addition to specifying the file name, you may specify offsets from the
default image from the top, bottom, left, and right sides – in that order. The default for all of
these offsets is 0, but we used an offset of 48 from the top in the above example to capture
the title bar of the ParaView window.) In our example, ForceRender is called on
MainView (the ParaView display area) so that the dialog box just displayed is not captured
in the resulting image. Do not move any other windows over the ParaView window while the
image is being captured and written; otherwise the portion of these windows covering the
ParaView window will be stored in the final image. Using the new menu entry produces the
following screen capture of the ParaView application window after sample data has been
loaded and processed.
220 Modifying the User Interface

Figure 143. Example ParaView screen shot


Chapter 18

Writing ParaView Readers

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”).

18.1 Integrating with VTK


VTK is written in C++, and new readers added to it should also be written in this language. A
reader is a type of vtkSource, making it a sufficient subclass for the new reader. In order
for a reader to function properly in within VTK’s pipeline mechanism, the following methods
from vtkSource should be overwritten. Both of them belong in the protected section of
your new class.

ExecuteInformation: This method takes no parameters. Its purpose is to configure the


output of this reader. For example, if the reader produces uniform rectilinear (image) data,
then the spacing, origin, dimensions, etc., should be set here. This method returns nothing.
222 Writing ParaView Readers

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.

18.2 Multiple Outputs


If your reader produces multiple outputs, ParaView will group them together, creating a
multi-part data set. (See the Execute portion of the previous section for information on
creating multiple outputs.) The individual parts can be extracted using the Extract Parts filter.
If you want specific names for the various parts to be displayed in the Extract Parts widget,
the reader must create per part a vtkCharArray containing the desired name, and that array
should be added to FieldData for that data set. C++ code demonstrating this procedure is
shown below.

vtkCharArray* nmArray = vtkCharArray::New();


nmArray->SetName("Name"); // name of VTK array containing
// part name
size_t len = strlen(partName); // part name displayed in Extract
// Parts widget
nmArray->SetNumberOfTuples(static_cast<vtkIdType>(len)+1);
char* copy = nmArray->GetPointer(0);
memcpy(copy, partName, len);
copy[len] = '\0';
output->GetFieldData()->AddArray(nmArray);
224 Writing ParaView Readers

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.

18.3 Parallel Readers

18.4 Required XML


To use your new reader within ParaView, you must write XML code both for the user
interface and for the server manager. The process of adding a new module (in this case, a
reader module) to ParaView is described in section 16.3. The user interface XML code for the
HDF5 raw image data reader is shown below.

<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.

The StringVectorProperty named "PointArrayStatus" is associated with the


ArraySelection widget in the previous XML code segment. For the example reader
shown, the command for selecting which array(s) to read is called
SetPointArrayStatus. This method of the reader takes two parameters: the first is the
name of the array, and the second is an integer (0 or 1) indicating whether to read the array.
The StringVectorProperty named PointArrayInfo is used for collecting the
names of the point-centered arrays available in this data file. (See the nested Property sub-
element.) In order for this to work, the following two methods must be implemented for your
reader. (The method names are specified by vtkPVServerArraySelection.cxx.)

GetNumberOfPointArrays: Return the number (an int) of point-centered arrays


contained in the data file being read. This method does not accept any parameters. A similar
method called GetNumberOfCellArrays is required if you want to select cell-centered
arrays instead of or in addition to point-centered ones.
226 Writing ParaView Readers

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.

Lastly, notice the IntVectorProperty named Stride. It is associated with the


VectorEntry XML element in the above code segment. When the values in the vector
entry change, the SetStride command is called. This method takes three int’s as input
parameters.

<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>

<IntVectorProperty name="Stride" command="SetStride"


number_of_elements="3"
default_values="1 1 1" >
<IntRangeDomain name="range" min="1 1 1" />
</IntVectorProperty>
<!-- End HDF5RawImageReader -->
</SourceProxy>
Chapter 19

PVWidgets and Properties


Chapter 20

The VTK Client-Server Language

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.

VTK Client-Server programs are represented by a vtkClientServerStream and


interpreted by a vtkClientServerInterpreter. One interpreter instance is present on
every ParaView server process, including the server manager. The process module on the
server manager holds an instance of vtkClientServerStream in which Client-Server
programs may be constructed. Server manager code constructs a program in this stream and
asks the process module to send it to one or more server nodes. The interpreter on every node
that receives the stream executes its contents locally on that node.

20.2 Client-Server Streams


A statement in the VTK Client-Server language is called a message. Each message has a
command, zero or more arguments, and an End token. Zero or more messages are stored by a
vtkClientServerStream in a platform-independent binary format. Streams may be
visualized in the form of a table:
230 The VTK Client-Server Language

Command Arguments (0, 1, …) End


Message 0 New string(vtkObject), id(10) End
Message 1 Invoke id(10), string(Modified) End
Message 2 Delete id(10) End

Messages are inserted into a stream by C++ code. The following example shows how the
stream in the above table can be constructed:

vtkClientServerID objID = {10};


pm->GetStream() << vtkClientServerStream::New
<< “vtkObject” << objID
<< vtkClientServerStream::End;
pm->GetStream() << vtkClientServerStream::Invoke
<< objID << “Modified”
<< vtkClientServerStream::End;
pm->GetStream() << vtkClientServerStream::Delete << objID
<< vtkClientServerStream::End;

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:

Command Name Arguments Description


New string, id Create an instance of a class and assign it to an id
Invoke id, string, arbitrary… Invoke a method on an object
Delete id Delete the value associated with an id
Assign id, arbitrary… Assign a value to an id
Reply arbitrary… Represent a result value from another command
Error string Represent an error message from the interpreter

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:

Enumeration Name C++ Type Name Description


intN_value vtkTypeIntN Signed N-bit integer+
uintN_value vtkTypeUIntN Unsigned N-bit integer+
20.2 Client-Server Streams 231

floatN_value vtkTypeFloatN N-bit IEEE floating-point number+


intN_array vtkTypeIntN[M] Array of M Signed N-bit integers+
uintN_array vtkTypeUIntN[M] Array of M Unsigned N-bit integers+
floatN_array vtkTypeFloatN[M] Array of M N-bit floating-point+
string_value const char* C-style NULL-terminated string
id_value vtkClientServerID Identifier for the interpreter object
map
stream_value vtkClientServerStream Nested stream instance
vtk_object_pointer vtkObjectBase* C++ pointer to a VTK object instance
LastResult (runtime dependent) Placeholder for last result of
interpreter
+
N may be 8, 16, 32, or 64 for integers and 32 or 64 for floating-point. M is runtime dependent.

The vtkTypeIntN, vtkTypeUIntN, and vtkTypeFloatN types are provided as


platform-independent names for integers and floating-point values of fixed size. In most
cases, code outside the Client-Server implementation classes does not need to use these type
names. Method signatures in vtkClientServerStream are written in terms of native C
types and automatically translate them to the matching Client-Server argument types.
Therefore values of fundamental types in addition to instances of vtkClientServerID
and strings can be inserted into a stream with no special syntax. The following example
constructs a stream that will call the SetResolution method with a single argument
consisting of the integer value 12.

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:

double xyz[3] = {2,2,2};


pm->GetStream() << vtkClientServerStream::Invoke
<< this->ImageID << “SetSpacing”
<< vtkClientServerStream::InsertArray(xyz, 3)
<< vtkClientServerStream::End;

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.

Arguments of type vtk_object_pointer should not be used when constructing a stream


for remote invocation because the C++ pointer stored in the stream will not be valid in
232 The VTK Client-Server Language

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.

20.3 The Client-Server Interpreter


Once messages have been added to a stream, the process module is asked to send it to one or
more ParaView nodes using the SendStream method with the appropriate arguments (e.g.,
vtkProcessModule::DATA_SERVER or vtkProcessModule::RENDER_SERVER)
After the stream is sent, its contents are cleared so that a new sequence of messages may be
added. Each node that receives the stream uses its own instance of
vtkClientServerInterpreter to process the commands.

The interpreter stores a map from identifiers to vtkClientServerStream instances.


These instances may hold references to VTK objects, results of previously invoked
commands, or anything else that can be stored in a stream. When an argument to an Invoke
command is of type id_value, it is used to lookup an entry in the interpreter’s map. The
value stored in the first message of the entry found is substituted into the command before it is
processed:

Invoke id(10) string(Modified)

… …

id(10) Reply vtk_object_pointer(A7B36280)

… …

Invoke vtk_object_pointer(A7B36280) string(Modified)

The vtk_object_pointer argument type is used by the interpreter to reference VTK


objects in its internal map. It is also used in the temporary copy of an Invoke command that
is created with substitutions before the real invocation occurs. Since the temporary stream is
never sent to another process, this is a safe use of the argument type.

An interpreter also stores a special vtkClientServerStream instance that holds the


result of the most recently processed command. Arguments of type LastResult cannot be
given a value when the stream is constructed. Instead, the interpreter replaces such arguments
with the value stored in the last result stream. This is particularly useful for invoking the
set/get pattern commonly seen in VTK:
20.4 Object Creation and Deletion 233

pm->GetStream() << vtkClientServerStream::Invoke


<< this->SourceID << “GetOutput”
<< vtkClientServerStream::End
<< vtkClientServerStream::Invoke
<< this->FilterID << “SetInput”
<< vtkClientServerStream::LastResult
<< vtkClientServerStream::End;

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.

20.4 Object Creation and Deletion


Two of the most common operations that the server manager performs are object creation and
deletion on one or more nodes. Every object that is created must have a unique identifier for
use in calling methods and deleting the object. Objects are created through the New command
and deleted through the Delete command. Unique identifiers are obtained from the process
module through the GetUniqueID method. Code to create and destroy an object looks like
this:

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

20.5 Retrieving Results


Most streams generated by the server manager will invoke operations on the server nodes
without retrieving any results. This is sufficient because pipeline output data are transferred to
the client process through other mechanisms. Occasionally, however, the server manager will
need to get the return value from a specific command invoked on a server node. The
interpreter object on every node has a stream representing the result of the most recently
executed command. The server manager can get the result stream from the interpreter on the
root server node by using the GetLastResult method on the process module.

The following code is an example of querying information from a server node.

pm->GetStream() << vtkClientServerStream::Invoke


<< this->ListID << “GetNumberOfEntries”
<< vtkClientServerStream::End;
pm->SendStream(vtkProcessModule::DATA_SERVER_ROOT);
const vtkClientServerStream& res =
pm->GetLastResult(vtkProcessModule::DATA_SERVER_ROOT);
int numberOfEntries = 0;
if(res.GetArgument(0, 0, &numberOfEntries))
{
// ... Use numberOfEntries ...
}

First a stream is constructed to invoke the GetNumberOfEntries method on a


hypothetical list object. Then the stream is sent to the root node of the server where it is
executed and the result is stored as the last result on that node. Next the process module’s
GetLastResult method retrieves the result from the interpreter on the root node. Finally
the number of entries is extracted from the stream and used if it was successfully extracted.

20.6 Server Helper Objects


The VTK client-server language does not have any control statements or expressions.
Programs described in this language can only invoke methods on objects of classes that exist
on the node where the operation is to be performed. When a server manager class needs to
execute complicated code on a server process, it must be implemented by C++ method
compiled into the server.

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.

In the following example, a hypothetical vtkPVMemory class has a corresponding class


vtkPVServerMemory on the server that executes some non-trivial code and returns a
result. The server-side class might look like this:

class vtkPVServerMemory: public vtkPVServerObject


{
public:
static vtkPVServerMemory* New();
// ...

// 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.

The server manager class might look like this:

class vtkPVMemory: public vtkPVFoo


{
public:
static vtkPVMemory* New();
// ...
long ComputeMemoryUsage(vtkClientServerID id);
protected:
// ...
vtkClientServerID ServerSideID;
void CreateServerSide();
};

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);
}
}

long vtkPVMemory::ComputeMemoryUsage(vtkClientServerID id)


{
this->CreateServerSide();
vtkPVProcessModule* pm = this->GetProcessModule();
pm->GetStream() << vtkClientServerStream::Invoke
<< this->ServerSideID
<< “ComputeMemoryUsage” << id
<< vtkClientServerStream::End;
pm->SendStream(vtkProcessModule::DATA_SERVER_ROOT);
long usage = 0;
return pm->GetLastResult(
vtkProcessModule::DATA_SERVER_ROOT).
GetArgument(0, 0, &usage)?usage : -1;
}

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.1 Levels of Detail


By default, ParaView uses a render module that creates geometric levels of detail to ensure
interactive rendering performance for large data sets. For single process execution, the
rendering module is LODRenderModule. Although all other render modules inherit from
this LOD render module and provide the same LOD features, there is one simpler superclass
that defines the render module API. This render module is never used by ParaView unless --
238 Render Modules

render-module="RenderModule" is specified on the command line when ParaView is


started.

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.

Compositing refers to sort-last distributed rendering. Although ParaView is not limited to


sort-last rendering, it is the only distributed rendering that is currently implemented in the
render modules. ParaView uses subclasses of vtkParallelRenderManager for
distributed rendering. These are stand-alone VTK classes than can work independent of
ParaView. They link to the renderer and render window with VTK observers.

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.

21.4 Tiled Display


Tiled display is a method of achieving very high pixel counts by appending multiple smaller
displays in a grid. ParaView can drive a tiled display by running the render server in parallel
and assigning a separate node to each of the sub-displays. The user specifies that ParaView
should use a tiled display render module with the --tiled-display client command line
argument. The dimensions of the tiled display are specified with additional command line
arguments. For a 3x2 display, the ParaView client would be started with a command similar
to the following.
21.5 Cave Render Module 239

paraview -client -tiled-display -tiled-display-x=3 -tiled-


display-y=2

The render server would be run with at least six processes and would be started with a
command similar to the following.

mpirun -np 6 paraview -server

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.

21.5 Cave Render Module


The cave render module is similar to the tiled display render module, except that the displays
do not have to be arranged in a tiled array. Also, compositing is not yet implemented for the
cave render module.

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

0.0 0.0 0.0


1.0 0.0 0.0
0.0 1.0 0.0

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.

22.1 Writing Tests


ParaView tests are Tcl scripts that perform a series of actions on the ParaView application.
The easiest way to write a ParaView test is to start by saving out a ParaView session file
(either a state or trace file). At the beginning of the session file (but after the first two lines
where the main window and main view are assigned to Tcl variables), add the following lines
of Tcl code. These lines load an external Tcl script and call a process defined in it to process
the -D (the location of the ParaView data directory) and -UC (testing the compositing
functionality) command-line arguments and cause ParaView to exit when the test completes.

source [file join [file dirname [info script]] \


CommandLineOptions.tcl]
ParseCommandLine $pw(vtkTemp43) $argv $argc
242 Testing

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.

source [file join [file dirname [info script]] Compare.tcl]


Compare $Application $argv $argc

$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).

22.2 Running Tests


To run the ParaView regression tests, we use a command-line tool called ctest that is
distributed with CMake. To run tests for a particular ParaView build, run ctest from the root
of the ParaView build tree. There are four important command-line options when running
ctest: -R, -E, -V, and -I. The -R option indicates which tests to run. The argument is a
regular expression identifying the appropriate test names. For example, the command line for
running a single test is as follows.

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

ctest -R “Clip” -E “RenderServer|MPI” –V

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

22.3 ParaView Dashboard


Overview
The ParaView dashboard is a web site updated daily to display the results of building and
testing ParaView on a variety of platforms. Because dashboards from the past several days are
saved, it is possible to view a previous dashboard as well. The Date and arrow buttons (in the
row of buttons near the top of the dashboard) provide this functionality. Also from this row of
buttons, you can access the ParaView CVS repository, view the Doxygen documentation
(http://www.stack.nl/~dimitri/doxygen/) pages for ParaView, visit the bug tracker for the
ParaView project, and go to the ParaView home page.

Figure 144. Sample ParaView dashboard


244 Testing

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

Submitting Dashboard Results


Earlier in this chapter, we discussed using ctest to run regression tests for ParaView. This
tool can also be used to submit your testing results to the ParaView dashboard. The easiest
way to submit experimental results to the dashboard (i.e., to compile and test ParaView and
submit the results to the Experimental section of the dashboard) is by using the following
command.

ctest -D Experimental

Substituting Nightly or Continuous for Experimental will direct your submission to


the appropriate portion of the ParaView dashboard.

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.
################################################################

# These are the name of the source and binary directory on


# disk. They will be appended to DASHBOARD_ROOT.
SET (CTEST_SOURCE_NAME ParaView)
SET (CTEST_BINARY_NAME ParaViewVS71)

# which ctest command to use for running the dashboard


SET (CTEST_COMMAND
"C:/CMake20/bin/ctest.exe -D Nightly -C Release -A
${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
)

# what cmake command to use for configuring this dashboard


SET (CTEST_CMAKE_COMMAND
246 Testing

"C:/CMake20/bin/cmake.exe"
)

################################################################
# The values in this section are optional; you can either
# have them or leave them commented out.
################################################################

# should ctest wipe the binary tree before running


SET (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)

# This is the initial cache to use for the binary tree, be


# careful to escape any quotes inside of this string if you use
# it.
SET (CTEST_INITIAL_CACHE "

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

CMAKE_GENERATOR:INTERNAL=Visual Studio 7 .NET 2003

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
")

# what cvs command to use for configuring this dashboard


SET (CTEST_CVS_COMMAND "C:/cygwin/bin/cvs.exe")

################################################################
# You do not need to edit these values; they will be computed
# from the settings made above.
22.3 ParaView Dashboard 247

################################################################

# if the script didn't specify a DASHBOARD_ROOT then use the


# default
IF (NOT CTEST_DASHBOARD_ROOT)
IF (WIN32)
SET (CTEST_DASHBOARD_ROOT "C:/Dashboards/My Tests")
ELSE (WIN32)
SET (CTEST_DASHBOARD_ROOT "$ENV{HOME}/Dashboards/My Tests")
ENDIF (WIN32)
ENDIF (NOT CTEST_DASHBOARD_ROOT)

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

In ParaView, a 3D widget is an object displayed in the 3D scene used for specifying


a parameter of a reader, source, or filter.

Actor

In VTK, an actor represents a data set in the rendered scene.

Azimuth

Rotate the camera horizontally while keeping the focal point fixed.

Cell-Centered Attribute

A cell-centered attribute is a set of values (e.g., temperature, momentum) sampled at


each cell (or element) in a data set.

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

Current Data Set

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

An information helper gathers information from a ParaView server for a server


manager property whose information_only flag is set to 1.

Level of Detail (LOD)

Use a reduced-resolution version of a data set to increase rendering speed in places


where speed is more important than detail. This method is used in ParaView to
achieve reasonable rendering rates during interaction.

Lookup Table

A lookup table is used for mapping scalar values to colors.

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

A point-centered attribute is a set of values (e.g., temperature, momentum) sampled


at each point (or node) in a data set.

Property

A property in VTK (not to be confused with ParaView’s property sheet) represents


the surface properties of a data set that is being rendered. It manages such things as
shading parameters, geometry representation, and opacity.

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

A proxy is a server manager object that represents a VTK object on a server.

Reader

A reader loads a data set into ParaView from a data file.

Renderer

In VTK, a renderer controls the rendering for a set of actors.


253

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

Rotate the camera about its direction of projection.

Source

A source creates data in ParaView without reading a data file or taking another data
set as input.

VOI

VOI is an acronym for “Volume of Interest”. It is a subset of a structured data set


that is specified by choosing the minimum and maximum extent of the data set along
each of the I, J, and K axes.
Index

Index

3 selecting parameter value range................69


Sinusoid waveform ...................................70
3D widget ...................................................249 Source menu .............................................69
VCR controls ............................................68
A Waveform menu .......................................69
Animation Control frame ..............................68
actor ............................................................249
Application Settings
Advanced Render Parameters .......................19
Confirm on exit.........................................18
Use immediate mode rendering ................20
Save window geometry on exit.................18
Use Parallel Projection .............................19
Show source descriptions..........................19
Use triangle strips .....................................20
Show source names in browsers ...............19
animation
Show splash screen ...................................18
Add Action button ....................................70
Show Tooltips...........................................19
adding an action........................................69
Show trace files on ParaView startup .......19
Cache Geometry .......................................70
Toolbar Settings........................................19
creating .....................................................67
Application Settings property sheet ..............18
Delay slider...............................................68
architecture......................................................4
delete an action.........................................70
ARL contract...................................................5
Frame slider..............................................68
ASCI Views ....................................................5
image dimensions .....................................71
azimuth........................................................249
Number of Frames slider ..........................68
Parameter menu ........................................69
Save Geometry .........................................71 C
saving images ...........................................71 cache animation geometry.............................70
scripting....................................................72
256 Index

capture screenshot... See File menu, Save View D


Image
cell-centered attribute ................................. 249 data loading methods ................................9, 23
clipping....................................................... 249 data server...................................................250
command-line options data set ........................................................250
--always-ssh............................................ 157 data set list ....................................................17
--batch, -b ............................................... 156 data set types.................................................23
--cave-configuration, -cc ........................ 160 data set visibility ...........................................17
--client, -c ............................................... 156 default session trace file................................19
--client-render-server, -crs...................... 157 delete old trace files .. See Application Settings,
--connect-data-to-render, -d2r ................ 157 Show trace files on ParaView startup
--connect-id ............................................ 159 developer' s guide overview.............................4
--connect-render-to-data, -r2d ................ 158 display area ...................................................16
--crash-on-errors..................................... 156 background color......................................20
--disable-composite, -dc ......................... 160 display lists ...................................................20
--disable-registry, -dr.............................. 155 domain ........................................................250
--help ...................................................... 156
--host, -h ................................................. 157 E
--machines, -m........................................ 158
Edit menu
--play-demo, -pd..................................... 156
Copy View Image.....................................10
--port ...................................................... 157
Delete All Modules...................................10
--render-module...................................... 159
elevation......................................................250
--render-node-port .................................. 158
environment variables
--render-port ........................................... 158
PV_DISABLE_COMPOSITE_INTERRUP
--render-server, -rs.................................. 157
TS.......................................................160
--render-server-host, -rsh........................ 158
PV_INTERFACE_PATH.......................160
--reverse-connection, -rc ........................ 159
PV_OFFSCREEN ..................................161
--server, -v .............................................. 156
PV_SEPARATE_RENDER_WINDOW 161
--start-empty, -e...................................... 155
PV_SOFTWARE_RENDERING...........161
--stereo ................................................... 159
VTK_CLIENT_SERVER_LOG ............161
--tile-dimensions-x, -tdx......................... 159
error indicator ... See Window menu, Error Log
--tile-dimensions-y, -tdy......................... 159
Error Log .......... See Window menu, Error Log
--use-offscreen-rendering, -os ................ 160
exit ParaView.....................See File menu, Exit
--user ...................................................... 157
Exit ParaView dialog box .............................18
--use-satellite-rendering, -s..................... 160
extent ..........................................................250
--use-software-rendering, -r.................... 160
eye icon.........................................................17
copy screenshot...... See Edit menu, Copy View
Image
current data set................................ 11, 17, 250 F
curvilinear data sets ...................................... 24 file formats supported ...................................26
cutting......................................................... 250 AVS..........................................................29
BYU .........................................................28
EnSight.....................................................27
257

EnSight master server...............................28 Clean to Grid ..........................................137


Exodus......................................................29 Clip .........................................................137
Gaussian cube...........................................29 Connectivity............................................137
HDF5 raw image data...............................28 Contour...................................................138
legacy VTK ..............................................27 Crop ........................................................138
meta image ...............................................29 Curvature ................................................138
parallel (partitioned) legacy VTK.............27 Cut ..........................................................139
parallel (partitioned) VTK ........................27 D3 ...........................................................139
ParaView (PVD).......................................26 Decimate...........................................139–40
PLOT3D ...................................................28 Elevation.................................................140
PLY polygonal .........................................29 Extract CTH Parts.............................140–41
Protein Data Bank (PDB) .........................28 Extract Edges..........................................141
raw (binary) ..............................................29 Extract Grid ............................................141
SAF ..........................................................29 Extract Parts......................................25, 141
stereo lithography .....................................28 Extract Surface .......................................141
VRML ......................................................28 Feature Edges ...................................141–42
VTK..........................................................27 Glyph ................................................142–43
XDMF ......................................................29 Gradient ..................................................143
XMol Molecule ........................................28 Gradient Magnitude ................................143
File menu ........................................................9 Group Parts.......................................25, 143
Exit ...........................................................10 Linear Extrusion .....................................144
Import Package...........................................9 Loop Subdivision....................................144
Load Session...............................................9 Mask Points ......................................144–45
Open Data...................................................9 Median....................................................145
Open Recent File ........................................9 Normals generation...........................145–46
Page Setup ..................................................9 Outline ....................................................146
Print ............................................................9 Outline Corners.......................................146
Save Batch Script .......................................9 Part Id Scalars.........................................146
Save Data....................................................9 Pick...................................................146–47
Save Session State ......................................9 Point Data to Cell Data ...........................147
Save Session Trace .....................................9 Probe.......................................................147
Save View Image........................................9 Process Id Scalars .............................147–48
filter ............................................................251 Quadric Clustering..................................148
Filter menu....................................................12 Random Vectors ...............................148–49
filters Reflection ...............................................149
All to N...................................................133 Ribbon ....................................................149
Append Attributes ..................................133 Rotational Extrusion .........................149–50
Append Datasets.....................................133 Shrink .....................................................150
Append Geometry ..................................134 Smooth....................................................150
Balance ...................................................134 Stream Tracer ...................................150–51
Calculator .........................................134–36 Subdivide................................................151
Cell Centers ............................................136 Tessellate ..........................................151–52
Cell Data to Point Data...........................136 Tetrahedralize .........................................152
Clean ................................................136–37 Threshold................................................152
258 Index

Transform............................................... 152 multi-block data set........See multi-part data set


Triangle Strips........................................ 153 multi-part data set .........................................25
Triangulate ............................................. 153
Tube ....................................................... 153 N
Warp (scalar) .................................... 153–54
Warp (vector) ......................................... 154 nonuniform rectilinear data sets ....................24

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

render window ............................................253 status bar .......................................................16


renderer.......................................................252 structured grid .............See curvilinear data sets
roll...............................................................253
T
S
Tcl control of ParaView ................................13
save animation geometry ..See animation, Save time series selection dialog ...........................26
Geometry time step selection.........................................25
save animation images ... See animation, saving time steps, multiple .......................................67
images timing events....See Window menu, Timer Log
save screenshot ....... See File menu, Save View toolbar ...........................................................16
Image camera manipulation buttons ....................16
save window geometry ............See Application center of rotation buttons ..........................16
Settings, Save window geometry on exit filter buttons..............................................16
scalability........................................................4 toolbar button appearance ....... See Application
script an animation......See animation, scripting Settings, Toolbar Settings
select animation frame ....See animation, Frame triangle strips.................................................20
slider
Select menu...................................................11 U
Selection/Navigation Window ......................17
data set menu ............................................17 uniform rectilinear data sets ..........................24
Navigation mode ......................................17 unstructured grid data sets.............................24
Selection mode .........................................17 user interface overview ...................................7
source..........................................................253 user's guide overview ......................................4
Source description.........................................19
Source menu .................................................11 V
sources
View menu ....................................................10
2D Glyph ................................................123
3D View Properties...................................11
3D Text.............................................123–24
Animation .................................................10
Arrow .....................................................124
Application Settings..................................10
Axes..................................................124–25
Source.......................................................10
Box .........................................................125
visualization pipeline ..................................4, 8
Cone .......................................................125
VOI .............................................................253
Cylinder..................................................126
Line ..................................................126–27
Mandelbrot .............................................127 W
Maze .......................................................128 Window menu ...............................................13
Plane.................................................128–29 Command Prompt.....................................13
Sphere.....................................................129 Error Log ..................................................13
Superquadric...........................................130 Hide Left Panel.........................................13
Wavelet...................................................131 Show Left Panel........................................13
splash screen See Application settings property Timer Log.................................................14
sheet, Show splash screen
starting ParaView....... See launching ParaView

You might also like