 |
ParVox 3.0 Tutorial
Last Modified: March 10, 2005
© Copyright 1998-2005, California Institute of Technology
ALL RIGHTS RESERVED.
U.S. Government Sponsorship Acknowledged under NAS7-1260
Contents
- [0] Introduction
- [0.1] Getting the Software
- [0.2] System Requirement
- [1] Installation
- [2] Input Data Format
- [2.1] Meta Library Functions
- [ 2.1.1] For Regular Structured Grid Dataset
- [ 2.1.2] For Unstructured Grid Dataset
[ 2.1.3] For Environment Files
- [2.2] Writing Data Conversion Programs
- [2.3] Example Data Conversion Program
- [3] Using xmparvox
- [3.1] Menu Bar
- [3.2] Command Panels
- [3.2.1] Slice
- [3.2.2] Iso Surface
- [3.2.3] Material Shading
- [3.2.4] Volume
- [3.2.5] Light
- [3.2.6] Bounding Box
- [3.3] Dialogs Windows
- [3.3.1] Load Data
- [3.3.2] Load/Save Environment
- [3.3.3] Output Size
- [3.3.4] Animation
- [4] Using netparvox
- [4.1] Non-Pipeline
- [4.2] Pipeline
- [5] Sample Interactive Session
- [6] Using ParVox API
This is a tutorial on ParVox 3.0
volume rendering system, developed at the Jet Propulsion Laboratory.
ParVox is made up of several components: the GUI xmparvox,
the remote renderer front-end netparvox, the ParVox
API, libparvox, and NetCDF input/output handling API,
libvlmeta. In the pipeline mode, there are two additional
modules: inparvox, the data input module, and outparvox
, the image output module. This tutorial will walk through the
installation procedure of the software, to run the existing GUI based
rendering system,
to generate NetCDF data files that are compatible with ParVox, and
to write applications using the ParVox API.
ParVox 3.0 will be released via OpenChannel
Foundation in April 2005.
If you're interested in obtaining ParVox 3.0,
please contact Peggy Li.
You'll need at least the following hardware and software:
- Unix clusters or servers with MPI support,
- Unix workstation with 24-bit color X and Motif library,
- NetCDF
library,
- icol colormap editor from the AHPCRC renderer,
Bob.
The ParVox renderer has been tested on SGI Origin, SGI Altix, and Linux Beowulf
clusters. The GUI has been tested on SGI Irix, Sun Solaris, Linux/x86
workstations and Mac OS X. The ParVox
GUI requires a 24-bit color X server. On some systems with multiple color
depth X servers, notably the Suns, the default visual must be set to 24-bit
TrueColor visual.
ParVox also requires netcdf-3.4 library. You may get netcdf-3.4 tar file
from
ftp.unidata.ucar.edu:/pub/netcdf through anonymous ftp.
To unpack the parvox source, use:
- gzip -dc parvox-3.0.tar.gz | tar xvf -
This will extract the
source into it's own directory, ParVox/.
The following subdirectories will be in the ParVox/ directory:
- Comp/
- Source files of wavelet compression routines for Cray's SHMEM
library (deprecated in ParVox 2.0),
- CompMPI/
- Souce files of wavelet compression library using MPI,
- ERIC2.0/
- Source files of the ERIC compression library,
- gui/
- Source files of xmparvox,
- in/
- Source files of pipeline input module inparvox,
- include/
- Header files for ParVox,
- meta/
- Source files of the Meta input/output library,
- net/
- Source files of netparvox,
- out/
- Source files of pipeline output module outparvox,
- parvox/
- Source files of the ParVox regular grid rendering API library,
- parvox_ug/
- Source files of the ParVox unstructured grid rendering API library,
- bin/
- Directory where the executables will be placed,
- lib/
- Directory where the libraries will be placed.
Now cd into the newly created ParVox/
directory and do the following:
- Edit Makefile to reflect your system,
- Run make clean and make depend
- Select the component to build:
- To make the GUI, xmparvox, type:
make xmparvox
- To make the non-pipeline version of the remote renderer,
netparvox, type: make netparvox
- To make the pipeline version of the remote renderer,
inparvox_pipe, netparvox, and
outparvox, type: make pipeline PIPELINE=1
- To make the pipeline version of the unstructured grid remote renderer,
inparvox_ug, netparvox_pipe_ug, and
outparvox_ug, type: make pipeline_ug PIPELINE=1
By default ParVox will install into the ParVox/ directory,
with executables in bin/ and libraries in lib/.
To install elsewhere, just copy the executables from bin/ to
the desired directory.
xmparvox and netparvox expect data to be
in the NetCDF
format. The stuctured
grid and unstructured grid data have different meta data information and different
file extensions. In addition, ParVox GUI allows user to save its rendering parameters
into an environment file, which can be loaded back in the a future ParVox
run. The environment file is also in NetCDF format. The default extensions for
the ParVox input files are listed as follows:
- .vox.nc voxel data for structured grid data in NetCDF format.
- .vox.raw voxel data for structured grid data in raw format.
- .ugrid.nc the grid definition for unstructured grid data in NetCDF format.
- .ugval.nc the grid data values for unstructured grid data in NetCDF format.
- .env.nc environment in NetCDF format.
ParVox comes
with
a
Meta
input/output
library,
libvlmeta, to help create, read, ans write the proper input data
files and the environment files.
The Meta library allows the user to easily create, read and write the ParVox
input data files and environment files.
The Meta library, libvlmeta, contains the following
functions:
A regular structured grid dataset, also called voxel data, has file extension .vox.nc.
The voxel data is stored as 3 dimensional array with one time step per file. The meta data contains the
following information:
- variable names
- number of variables
- dimension (idim, jdim, kdim)
- range
- nodata value
- bytes per voxel
- time step
Following is a sample header of a voxel file produced by a ncdump -h command:
netcdf oceanvec0009.vox {
dimensions:
idim = 640 ;
jdim = 624 ;
kdim = 37 ;
num_vars = 1 ;
range_span = 2 ;
max_var_name = 20 ;
variables:
float range(num_vars, range_span) ;
char var_name(num_vars, max_var_name) ;
float nodata(num_vars) ;
float voxel(num_vars, kdim, jdim, idim) ;
// global attributes:
:spacing = 1.f, 1.f, 2.f ;
:byte_per_voxel = 4s ;
:time_tag = 9s ;
data:
range =
0 , 201 ;
var_name =
"velocity" ;
nodata = 0 ;
}
The functions to access a voxel data file are:
- int vlmopen_vox(char *name, int dtype)
- Opens a voxel data file for reading. They return
an ncid file handle. This file handle is used by
all the ``get'' functions in the Meta library. The name
can be the full name of a ParVox file or just the prefix. Without an extension, .vox.nc
will be added automatically.
The dtype for the voxel data
can be either VL_NETCDF or VL_RAW.
VL_RAW is a test format, which is not fully supported.
- int vlmclose(int ncid, int dtype)
- Close the ncid from previous open calls.
- int vlmget_vdim4d(int ncid, vlmeta_voxel4d *vdata, int dtype)
- int vlmput_vdim4d(char *name, vlmeta_voxel4d *vdata)
- Reads and writes the definition portion of the vlmeta_voxel4d structure.
The dtype parameter in vlmget_vdim4d() should be VL_NETCDF or VL_RAW.
The data type VL_RAW is not fully supported in this version.
- int vlmget_slice4d(int ncid, vlmeta_voxel4d *vdata,
long voxel_start[], long voxel_count[], int dtype)
- int vlmget_voxel4d(int ncid, vlmeta_voxel4d *vdata, int dtype)
- Reads the voxel data from the opened file. int vlmget_slice4d()
will read a slice of voxel data defined by
voxel_start[] and voxel_count[].
voxel_start[] is the starting corner of the variable/3D slice,
and voxel_count[] is the size in the variable, i,
j, and k direction.
- int vlmput_voxel4d(char *name, vlmeta_voxel4d *vdata)
- Writes the vlmeta_voxel4d structure to file. If the
filename does not contain the extension .vox.nc, it
will be added on by the function.
A unstructured grid dataset is stored in two files, a grid definition
file and a set of data value files, one per timestep. ParVox currently
supports data represented as tetrahedrons only. In a grid definition file,
there are two
two-dimensional arrays -- the vertex array, a nx3 array
where n is the
number of nodes, contains the [x,y,z] location of the vertex, and
the cell array,
a
mx4 array where m is the number of cells, contains
the vertex indices for each cell. A grid definition file has an extension ".ugrid.nc".
In addition, a grid definition file contains the following metadata:
- number of variables
- number of vertices
- number of cells
- number of vertices per cell (4 for tetrahedrons)
- data range for each variable
- variable names
- the bounding box of the volume in 3D space
Following is a sample header from a grid definition file:
netcdf landers.ugrid {
dimensions:
num_vars = 3 ;
num_vertices = 257850 ;
num_cells = 1400198 ;
verts_per_cell = 4 ;
vert_dim = 3 ;
range_span = 2 ;
max_var_name = 20 ;
variables:
float range(num_vars, range_span) ;
char var_name(num_vars, max_var_name) ;
float vertex(num_vertices, vert_dim) ;
int cell(num_cells, verts_per_cell) ;
// global attributes:
:spacing = 1.f, 1.f, 1.f ;
:cell_type = 0s ;
:time_tag = 1000s ;
:boundingbox = -500.f, -480.f, -60.f, 500.f, 520.f, 0.f ;
data:
range =
-10, 10,
-100, 100,
0, 30 ;
var_name =
"1st-Invar",
"2nd-Invar",
"3rd-Invar" ;
}
A data value file for a unstructured grid dataset contains the variable values
on the vertices. ParVox always assume that the variable values are associated
with the vertex, not the cell. If a
dataset contains data at the center of a cell, it has to be interpolated onto
vertices first. A data value file may contain multiple variables and it contains
one time step per file. It has
the same prefex as its grid definition file followed by a fixed number of digits
representing the frame number and an extension ".ugval.nc".
Following is the header of a data value file corresponding to the grid definition
file shown above:
netcdf landers371.ugval {
dimensions:
num_vars = 3 ;
num_vertices = 257850 ;
num_cells = 1400198 ;
verts_per_cell = 4 ;
vert_dim = 3 ;
range_span = 2 ;
max_var_name = 20 ;
variables:
float range(num_vars, range_span) ;
char var_name(num_vars, max_var_name) ;
float value(num_vertices, num_vars) ;
// global attributes:
:spacing = 1.f, 1.f, 1.f ;
:cell_type = 0s ;
:time_tag = 371s ;
:boundingbox = -500.f, -480.f, -60.f, 500.f, 520.f, 0.f ;
}
The ParVox functions to access an unstructured grid dataset are:
- int vlmopen_ugrid(char *name, int dtype, int mode)
- Opens a grid definition file for reading. It returns an ncid file
handle. This file handle is used by vlmget_ugdim and vlmget_ugrid.
The name can be the full name of a ParVox file or just
the prefix. Without an extension, .ugrid.nc will be added automatically.
The dtype for the voxel data can be either VL_NETCDF or VL_RAW. VL_RAW is
currently not supported. The mode parameter is the NetCDF file
mode, which is either NC_WRITE or NC_NOWRITE.
- int vlmopen_ugval(char *name, int dtype, int mode)
- Opens a data value file for reading. It returns an ncid file
handle. This file handle is used by vlmget_ugdim and vlmget_ugval.
The name can be the full name of a ParVox file or just
the prefix. Without an extension, .ugval.nc will be added automatically.
The dtype for the voxel data can be either VL_NETCDF or VL_RAW. VL_RAW is
currently not supported. The mode parameter is the NetCDF file
mode, which is either NC_WRITE or NC_NOWRITE.
- int vlmclose(int ncid, int dtype)
- Close the ncid from previous open calls.
- int vlmget_ugdim(int ncid, vlmeta_ugrid *ugdata, int dtype)
- int vlmput_ugdim(char *name, vlmeta_ugrid *ugdata)
- Reads and writes the definition portion of the vlmeta_ugrid structure.
The dtype parameter in vlmget_ugdim() should be VL_NETCDF or VL_RAW.
The data type VL_RAW is not supported in this version.
- int vlmget_ugrid(int ncid, vlmeta_ugrid *ugdata, int dtype)
- int vlmput_ugrid(char* name, vlmeta_ugrid *ugdata)
- Reads and writes the vertex table and cell table of the vlmeta_ugrid from
or to a grid definition file. vlmget_ugrid also reads the dimension and meta information.
The dtype parameter in vlmget_ugdim() should
be VL_NETCDF or VL_RAW.
The data type VL_RAW is not supported in this version.
- int vlmget_ugvert(int ncid, vlmeta_ugrid *ugdata, long start, long
count, int dtype)
- int vlmget_ugcells(int ncid, vlmeta_ugrid *ugdata, long start, long
count, int dtype)
- The vlmget_ugvert and vlmget_ugcells functions read in
a section of the vertices and cells definition from a grid definition file with an NetCDF
handler ncid. The section starts with index start and contains
count numbers of elements. These two functions are used to support parallel input
from multiple input processors. There are no corresponding "put" functions.
- int vlmget_ugval(int ncid, vlmeta_ugrid *ugdata, long start, long
count, int dtype)
- int vlmput_ugval(char *name, vlmeta_ugrid *ugdata)
- The vlmget_ugval function reads in count elements
from a NetCDF file into the vertex value table ugdata->value starting
from index start . The vlmput_ugval writes the entire vertex value
table into a NetCDF file name. If no extension is given in the filename, a default
.ugval.nc will be added on by the function.
An environment file contains all the rendering parameters and transfer functions
for a specific dataset, including a transformation matrix, the isosurface definition
if any, the lighting parameters, the colormap
and the opacity map. An environment file can be saved from the ParVox GUI.
It can be reloaded into the ParVox GUI to restore the viewing position and
data
classification from a previous session.
A environment file is a NetCDF file with an extension ".env.nc". The following
information is included
in the file:
- Number of variables
- The color maps and opacity maps
- The isosurface definition
- The lighting and material information for isosurfaces
- The transformation Matrix
- The rotation, translation, scaling, and zooming factors
- The image size and the output format
- The input block size
A sample header of an environment file for a structured grid data set is as
follows: netcdf ichiro1.env {
dimensions:
num_vars = 1 ;
cmaps_size = 768 ;
num_cmaps = 1 ;
opacs_size = 256 ;
num_opacs = 10 ;
map_dim = 2 ;
num_surfs = 8 ;
surface_fields = 6 ;
mat_fields = 4 ;
num_lights = 5 ;
light_fields = 4 ;
variables:
char colormap(num_cmaps, cmaps_size) ;
float opacity(num_opacs, opacs_size) ;
short map(num_vars, map_dim) ;
float surface(num_vars, num_surfs, surface_fields) ;
float material(num_vars, mat_fields) ;
float light(num_lights, light_fields) ;
char light_enabled(num_lights) ;
// global attributes:
:filter_type = 1 ;
:screen_width = 768 ;
:screen_height = 768 ;
:block_per_pe = 2 ;
:block_idim = 128 ;
:block_jdim = 128 ;
:block_kdim = 37 ;
:nodata_color = 1.f, 0.f, 0.f, 0.f ;
:translations = 5.f, 2.f ;
:scale_factors = 1.f, 1.f, 1.f ;
:zoom = 0.58000016f ;
:trans_matrix = 0.83481598f, 0.049714163f, 0.5482915f,
0.f, -0.3772499f, 0.77700859f, 0.50394195f, 0.f,
-0.40097129f, -0.62753302f, 0.66741246f, 0.f,
0.f, 0.f, 0.f, 1.f ;
:file_type = 0 ;
:outputfile = "parvox" ;
:num_iso_tbl = 2s ;
}
The functions to access an environment file are:
- int vlmopen_env(char *name)
- Opens an environment file for reading. They return
an ncid file handle that can be used by vlmget_env(). The name
can be the full name of a ParVox file or just the prefix. Without an extension, the
default extension .env.nc will be added.
- int vlmget_env(int ncid, vlmeta_environ *environ)
- int vlmput_env(char *name, vlmeta_environ *environ)
- Reads and writes the environment file, respectively. The environment
file contains all the information in the vlmeta_environ
structure. It contains all of the information regarding the
visualization of the volume.
When writing a program to convert
existing data files to ParVox format, follow these steps:
- Include the header files vlmeta.h and
vlmetaproto.h.
- Declare a structure of type vlmeta_voxel4d. The
typedef for this structure is in vlmeta.h.
- Fill in the vlmeta_voxel4d structure members. The
structure members are:
- short idim, jdim, kdim
- Volume data size (width, length, and depth).
- short num_vars
- Number of variables included in the data file.
- vlpoint spacing
- Relative gaps between data points in the x, y, and z direction.
- short byte_per_voxel
- Size of each voxel data. char = 1, short
= 2, float = 4, double = 8.
- short time_tag
- Timestep number.
- float range[variable][min/max]
- Valid data ranges. The first index is the variable number,
the second index is [0] for minimum, and
[1] for maximum. Note: the
data range should be the same for all files in a multiple
timestep data set.
- char var_name[variable][length]
- Name string for each variable. This is an array of fixed length
strings. Each string should be no longer than
MAX_VAR_NAME - 1 long.
- float nodata[variable]
- Value that indicates a ``no data'' point for each variable.
- void *voxel_data
- Pointer to the block of voxel data. The user needs to
malloc() the memory for the data, then store
the data in the order with idim varying the fastest,
then jdim, then kdim, and finally the
variable. To put it another way, the data should
be ordered as data[variable][kdim][jdim][idim]
in C.
- Call the Meta library function vlmput_voxel4d().
vlmput_voxel4d() takes two parameters: an output
filename and the pointer to the vlmeta_voxel4d
structure to be written to the output file.
This will create a data file with the filename passed to
vlmput_voxel4d(). If the filename does not contain
the extension .vox.nc, it will be added on by the function.
The normal practice is to create filenames with a base name and the timestep.
For example, suppose we have a wind velocity dataset we want to create,
we could name the files wind000.vox.nc,
wind001.vox.nc, and so forth.
conv.c is a sample data conversion
program. This sample program is designed to read in one timestep of a
128 x 128 x 128 volume, the volume containing one variable, density.
The original data file was raw four byte float organized in the same
order as ParVox, so we just read the file directly. We then walk
through the data and do any necessary conversions. We also keep track
of our minimum and maximum values in order to set the v4d.range[][]
variables.
xmparvox is the graphical user interface that runs on the
workstation. It works in concert with netparvox, which
runs on the parallel machine and calls the rendering API in response to
xmparvox controls. The order is important when running
xmparvox and netparvox. The program that is
started first becomes the server, while the other one assumes
the role of client (see also [4]
Using netparvox). To run xmparvox, use:
- xmparvox [-server hostname] [-port N]
[-diskbuf buffer_file]
The -server hostname should be used when
netparvox is started first. hostname is the name
of the host that netparvox is running
on, N is the port number that netparvox is listening
on. If -server host is not specified,
xmparvox assume the server role. If the port is not specified,
then xmparvox will
use SERVER_PORT from vlnet.h as the port number.
This value is defined to be 6543 in the standard ParVox distribution.
If the workstation running the GUI does not have enough physical memory
to buffer all the desired animation frames, use -diskbuf buffer_file
to buffer animation images to disk filename buffer_file.
Note this can cause a significant slow down of animation playback if the
disk access is slow.
Once xmparvox successfully connects to netparvox,
it'll display its main window. There are four main areas in the GUI:
Menu Bar, Command Panels,
Image Display, and Message Panel. The Menu Bar
is across most of the top of the GUI. The Command Panels
will appear on the left 30% of the GUI. On startup this portion of the
GUI is empty except for the ParVox logo. The Image Display is the big
black area that dominates the GUI. This is where all the rendered images
will be displayed. Finally, the Message Panel is under the Image Display.
This is the area where transient messages will be displayed.

The menu bar has the following options:
- File
-
- Load Data
- Request netparvox to load data
file(s).
- Load Env
- Load environment file from local workstation
disk.
- Save Env
- Save environment file to local workstation
disk.
- Exit
- Exits the GUI and netparvox.
- Option
-
- Output
- Selects different output types and sizes.
The current supported output types are:
- PPM - Write images to PPM files. The PPM files are stored
in the output/ subdirectory on the
netparvox side. Warning: the PPM
filenames are hard coded, therefore they should be renamed
to something else before rerendering to PPM files.
- Wavelet - Compress images using wavelet compression before
sending to GUI.
- Raw - Send the raw images directly to GUI.
The Output Size selection will bring up the
Output Size dialog box.
- Autorender
- Toggles on/off automatic rendering whenever changes are made
in Command Panels. This can be slow if the remote
renderer and/or the network is slow.
- Fast Render
- Toggles on/off faster (but poorer) rendering algorithm.
- Visualization
-
- Slice
- Selects the Slice Command Panel.
- Iso Surface
- Selects the Iso Surface Command Panel.
- Volume
- Selects the Volume Command Panel.
You must select a visualization before you can choose Animation or
View.
- Animation
-
- Pre-Compute Images
- Requests netparvox to precompute the classification
and/or shading for all the timesteps. This is necessary
before animating if changes to the volume conditions have
occurred.
- Do Animation
- Brings up the Animation dialog box to control
the timestep animation.
- View
-
- Light
- Selects the Light Command Panel.
- Bounding Box
- Selects the Bounding Box Command Panel.
The GUI will put up different command panels on the left side in response
to different user actions. These panels provide the user with various
settings and controls for manipulating and rendering the volume. In
most of these panels, there are Apply buttons which will send
the new settings from that command panel onto netparvox
and request a new image. Pressing these buttons are unnecessary if
Autorender is set.
The user can select the variable(s) to render, and up to 8 slices per
variable. Each selected slice must be perpendicular to the x,
y, or z axis, and it can be selected via the radio
buttons under Direction. The next three sliders and text boxes
allows the user to select the starting and stopping point along the
chosen axis for the slice, and the opacity of this slice. If the opacity
value is set to zero, the opacity map set in the Volume
Panel will be used to determine the voxel opacity in the slice. The
Enable toggle button allows a user to turn on and off a slice for
rendering purposes. Note: settings for disabled slices will not
be saved when the user saves an environment. The
Apply button sends the settings to netparvox and
requests a new image.
User can select variable/surface similar to Slice,
above. For each variable/surface, the user can set the threshold for
the surface, its opacity, and its thickness. The Display toggle
button behaves the same as the Enable toggle in the
Slice Command Panel. The Material Shading
button will switch the panel to the Material Shading
Control Panel. Finally, the Apply button sends the settings to
netparvox and requests a new image.
User can select the material properties for the isosurface being edited.
The Restore button restores the properties to the values when the
user first invoked this panel. The Done button saves the material
property within the GUI and returns to the Iso Surface
command panel, but does not send it to netparvox yet. The user
must use the the Apply button in Iso Surface command panel (or
autorender) in order to send the new settings
to netparvox and receive a new image.
User can select a variable
to render as volume. The Colormap
shows the current colormap corresponding to the data range. The Opacity
shows the current opacity values over the same range.
The range can be modified by entering values in Lower Range and Higer
Range text
boxes. After the range is set, click on UpdateRange. Both the data range for
Colormap and Opacity map will be changed. The Edit
Colormap/Opacity button
spawns
an
icol
process. Note: an instance of icol is started every
time the Edit Colormap/Opacity button is pressed. Therefore it is
not a good idea to click on this button repeatedly. If multiple instances
of icol are running, then the most recent change by any of
the instances will be used. Icol can be a bit difficult to use, so there
is a separate Icol Tutorial.
The Update Colormap and Update Opacity buttons
update the corresponding map by using the temporary file created by
icol. Update Opacity only uses the red channel of
the colormap being edited by icol. Therefore the user only
needs to use the red channel to create an opacity curve. Reset Default
resets both maps to ParVox
system default. Apply sends all of this to netparvox
and requests a render of the volume.
User can select up to 5 point lights located at infinity. The toggle
in front of each light specification enables/disables that light. The
X, Y, and Z specifies the direction where the light
points. The Intensity sets the intensity of the light. OK
sends all the lights to netparvox and rerenders.
 |
This panel lets the user move and scale the data volume. The Show
Axis toggle turns on and off the reference axis on the wireframe
bounding box at the bottom. World Axis toggles the manipulation
axis between object (if toggle is off) and world (if toggle is on).
World axis means the absolute X-Y-Z axes in space, while object axis
is the relative axes to the object, i.e. the object X axis
would lie along the data's i dimension, and so forth.
The controls under Translation, Rotation, and Scale
perform those functions along the chosen axis. The unstructured grid renderer
supports both perspective view and orthographic views. The Perspective toggle
turns on and off the perspective rendering for the unstructured grid datasets.
It is ignored for structured grid renderer because only the orthographic rendering
is supported. When the Show Boundingbox toggle is selected, a wireframe showing
the bounding box of the volume will be displayed in the Image window.
The Rotation wheels for X, Y, and Z axes were implemented using a SGI ThumbWheel
Widget and are only available on SGI workstations by compiling with a -DSGI
switch. Rotation can also be accomplished via the wireframe representation
of the dataset at the bottom
window by clicking and holding down the left mouse button and
dragging with the mouse. Hold down and drag the right mouse button will translate
the volumn and drag the middle mouse
button will zoom in and out the volumn. The Render button
sends all the changes to netparvox and
rerenders the image.
|
Enter the data file name and path to be loaded by netparvox
in the Filename field. The data must be accessible by
netparvox, and the path is relative to the directory
where netparvox was started from. To load multiple timesteps,
use a filename of the format ``basename####''. For example,
to load a series of data files named landers000.ugval.nc to
wind030.ugval.nc in the directory /tmp1/peggy/GEM/parvox,
the user would enter /tmp1/peggy/GEM/parvox/landers### in the Filename
text field.
The user then selects timesteps toggle
and enter
the timestep range and the interval between each timestep.
The image on the left is a dialog box for unstructured grid input dataset. Note
the grid definition file named landers.ugrid.nc will be loaded first.
No
file extension should be given in the Filename field. The default extension will
be added automatically.
For structured grid data set, the user can define how
data is distributed by
netparvox over the processing elements. The user can either
specify Blocks/PE or the size of each data block in idim ×
jdim × kdim. If Blocks/PE is not zero,
it will override the block size selection. The Raw and NetCDF
toggles select the type of data file format being read in. In the current
version of ParVox, only the NetCDF format is supported. However, on some
machines the binary format may be faster. Use the
nc2raw utility to convert NetCDF format data to raw format.
The image to the right is a input dialog box for the unstructured grid dataset.
The default file extension for structured grid dataset is .vox.nc if not
specified.
The Load Environment and Save Environment dialog boxes are very simple.
They have just one text field where the user enters the name of the
environment file to load or save on the local workstation. Note:
the environment file is saved to the local workstation that is running
xmparvox, not to the remote netparvox side.
The environment file is saved with the filename entered in the dialog
box plus the .env.nc extension.
The Output Size dialog box allows the user to select the
image size to render. The dialog box provides the user with several
predefined sizes, as well as an option to use the current GUI window
size and a user defined size. The change in size will take effect starting
with the next rendered image.
The Animation dialog box has four control buttons (in order appearing in
control panel):
- Back Step (
)
- Single steps back one frame if the animation is paused. If
the animation is not paused, the button will pause the animation
first.
- Stop (
)
- Stops current animation and resets to the first frame. Flushes
local playback buffer.
- Play/Pause (
/
)
- Initiates the animation through the timesteps. The Play
button becomes the Pause button while the animation is
playing. If Pause is activated, then the animation will
pause at the current frame. Pressing Play will continue
the animation from the paused frame.
- Forward Step (
)
- Single steps forward one frame if the animation is paused. If
the animation is not paused, the button will pause the animation
first.
When netparvox completes all of the time frames, the GUI
will replay the rendered image frames in a loop if Animation Loop Playback toggle
is on.
Note: the GUI buffers all of the rendered frames locally on the
workstation. This can cause local memory to be used up very fast, so be
careful. Use the [-diskbuf buffer_file] option to
xmparvox if you need to buffer to disk.
The user can also specify a range of frames to animate. By default
ParVox will animate all the loaded timesteps. By changing the Start
and Stop values, a subset of the timesteps can be animated.
The Done button will stop the animation and close the dialog box.
netparvox is the ``remote'' renderer that runs on a parallel
machine. Version 3 of ParVox supports two renderers, netparvox for regular structured
grid and netparvox_ug for unstructured grid. The regular structured grid renderer
runs in pipeline and non-pipeline mode.
The unstructured grid renderer only works in pipeline mode. The names of the
executables for these three different modes are:
- Regular structured grid, non-pipeline renderer -- netparvox
- Regular structured grid, pipeline renderer -- netparvox_pipe, inparvox,
outparvox
- Unstructured grid, pipeline renderer -- netparvox_ug_pipe, inparvox_ug,
outparvox_ug
The GUI
xmparvox and the renderer netparvox communicates
via ASCII commands over the network socket connection. The commands
are documented in net_interface(5)
man page.
To run netparvox in non-pipeline mode, use:
- netparvox [-server hostname] [-port N]
[-preload name from to step blk/pe idim jdim kdim dtype(0/1)]
[-prefetch frames]
If the option -server hostname is specified,
then netparvox will act as a client and connect to a GUI
acting as server on hostname. If this option is not specified,
netparvox will act as a server and listen for a client
connection.
The option -port N specifies the port
number to use for for connecting to the GUI. If
-port N is not specified, netparvox will
use SERVER_PORT from vlnet.h as the port number.
This value is set to 6543 in the standard ParVox distribution.
The -preload option is for preloading data. If specified,
netparvox will preload the specified data file(s) before
listening for the GUI connection. The parameter to -preload
are the same as the fields in the Load Data dialog
window of the GUI. The dtype is the data type: 0
means raw data, and 1 means NetCDF data. NetCDF data
format is the only officially supported ParVox data format for this
version.
The -prefetch option is for prefetching data for out-of-core rendering.
When specified, only frames number of frames will be loaded into memory when the
input data are loaded. Input files beyong frames number of timesteps will be loaded
one frame at a time during animation.
Once netparvox completes initialization, it will wait for
a connection from the GUI if -server was not specified.
At this point, it will print out ``Go for it''. The user can then
start the GUI on the local workstation. If -server was
specified, it will try to connect to the host specified by
-server on the port specified by -port.
To run netparvox in pipeline mode, inparvox,
netparvox, and outparvox must be started at
the same time using mpirun.
On the HP Exemplar, the SGI Origin 2000, and
the Linux Beowulf cluster running MPICH, mpirun can be
invoked with a -f app-file command line option.
Here are sample app-file for the tested platforms:
- HP Exemplar (16 unstructured grid render, 8 input, 8 output nodes, waiting
for GUI to connect on port 7777):
- -np 16 bin/netparvox_pipe_ug -port 7777
-np 8 bin/inparvox_ug
-np 8 bin/outparvox_ug
- SGI Origin 2000 (8 render, 4 input, 3 output nodes, connecting to GUI
running at host spartan.jpl.nasa.gov on the default port):
- -np 8 bin/netparvox_pipe -server spartan.jpl.nasa.gov:
-np 3 bin/outparvox :
-np 4 bin/inparvox
- Linux Beowulf cluster running MPICH (8 render, 4 input, 3 output
nodes):
- local 0
nimrod01.jpl.nasa.gov 1 /home/peggy/ParVox/bin/netparvox_pipe
nimrod02.jpl.nasa.gov 1 /home/peggy/ParVox/bin/netparvox_pipe
nimrod03.jpl.nasa.gov 1 /home/peggy/ParVox/bin/netparvox_pipe
nimrod04.jpl.nasa.gov 1 /home/peggy/ParVox/bin/netparvox_pipe
nimrod05.jpl.nasa.gov 1 /home/peggy/ParVox/bin/netparvox_pipe
nimrod06.jpl.nasa.gov 1 /home/peggy/ParVox/bin/netparvox_pipe
nimrod07.jpl.nasa.gov 1 /home/peggy/ParVox/bin/netparvox_pipe
nimrod17.jpl.nasa.gov 1 /home/peggy/ParVox/bin/inparvox
nimrod18.jpl.nasa.gov 1 /home/peggy/ParVox/bin/inparvox
nimrod19.jpl.nasa.gov 1 /home/peggy/ParVox/bin/inparvox
nimrod20.jpl.nasa.gov 1 /home/peggy/ParVox/bin/inparvox
nimrod21.jpl.nasa.gov 1 /home/peggy/ParVox/bin/outparvox
nimrod22.jpl.nasa.gov 1 /home/peggy/ParVox/bin/outparvox
nimrod23.jpl.nasa.gov 1 /home/peggy/ParVox/bin/outparvox
Consult your MPI documentation for the correct way of running multiple
processes with one mpirun call. On our Linux cluster, the
entire cluster is behind node 0 under one IP address. In this instance
IP Masquerading must be installed, and the renderer must act as
the client while the GUI acts as the server (i.e. netparvox
connects out instead of waiting for an incoming connection). Consult
your system administrator regarding IP Masquerading.
There are no command line
parameters to inparvox, inparvox_ug and outparvox,
and
the parameters to netparvox_pipe are the same as the
non-pipeline version. The parameters to is
very similar to that of netparvox, please see the man page for
netparvox_pipe_ug.
Here's a sample interactive session using xmparvox and
netparvox. Hopefully this will help the reader get a feel
for the order of events.
- On the parallel machine, acquire an interactive queue using the local queuing
system command. For instance, if PBS is used, type the following command
to request a 16 processor queue for 30 minute wall clock in interactive
mode:
%qsub -I -V -lncpus=16 -lwalltime=00:30:00
- Type mpirun -np 16 netparvox to run netparvox on
16 processors. Wait until it prints ``Go for it''.
- On your local workstation, run xmparvox -server hostname (hostname
being the name of the host netparvox is running on), the parvox
main window will be displayed.
- Select File from the menu bar, then Load Data. This
pops up the Load Data dialog box.
- Type in data file name, using the form name### for
multiple timesteps, then clicking on the Timesteps toggle
and enters the range and step size. Accept default value for
Block/PE.
- Wait for data to load. The message panel at the bottom of the GUI
will print ``Loading Data...'' while data is loading. It will
be cleared when data loading is complete.
- Select Visualization from menu bar and chose one.
- Enter the desired settings in the Command Panel on the left. Make
sure to select Enable for slices and isosurfaces. Press
Apply to render.
- Select View from menu bar and choose Bounding Box.
- Toggle on Show Axis for reference and rotate the wireframe
box at the bottom of the Command Panel till we get the desired
orientation. Press Render to rerender.
- Select Animation in the menu bar and pick Pre-Compute Images
.
- Select Animation again, and pick Do Animation.
- Press Play (
)
in the Animation dialog box. Watch the timesteps
being rendered. Press the same button (now the Pause
( ) button) to pause the animation.
Press again to continue. Press Stop
( ) when done.
- We like the timesteps, so select Output from the menu bar
and chooses PPM. Then select Size for the desired
output size.
- Press Start in the Animation dialog box again. This time
netparvox renders to PPM files on the parallel machine
for later use.
- Once done, select File from menu bar and choose Exit.
The rendering portion of ParVox is implemented as an API library. This
means the users can write their own programs to render images.
main.c is an sample program that reads an environment
file saved by the GUI and renders the images. This program is used to
render in batch mode once the user has selected a desired view with
xmparvox. It is also an example of how to call the ParVox
API directly. For more detailed description of the ParVox API, refer to
the ParVox API Manual.
|
 |