This page imported from: /afs/bu.edu/cwis/webuser/web/s/c/scv/documentation/tutorials/SciVis/explorer.html
Introduction to Scientific Visualization Tools

Introduction to Scientific Visualization Tools

Numerical Algorithms Group Explorer V3.0 Tutorial

This tutorial of Numerical Algorithm Group’s Explorer should be
enough to get you started.

Explorer is a block-diagram, algorithmic approach to setting up visualizations.
Each saved flowchart is called a “map”, and it describes the layout of the
“modules” used (although it does not save session parameters). Every map must
have a “Reader” which imports the data into a “lattice” structure. In order to
be useful, every map must also have a “Render” module and a way of converting
the input data into geometry for output.

Components of the interface:

The interface is made up of maps and modules and three main windows: the Librarian, the
Map Editor, and the Log Window.

Maps

Maps represent the flow of control of the visualization. They can be stored and
retrieved. Examples of maps are colored blue in the Librarian.

A Map

Modules

Modules are the functional elements that make up a map. The area of the module
containing the Motif widgets is the control panel. From the control panel you set the parameters for that module. There are three different representations of a module in the Map Editor,
micro, mini, and normal.
Micro

Mini

Normal

The Librarian

The Librarian contains a list of all the modules available
to Explorer. With the mouse, select the upper right hand corner of the
Librarian window frame and resize it so that it is horizontal and all the
different categories of modules are displayed in their respective groups.
This make it easier to find things. All of the modules are present in the
“Modules” category to the far left.

The Map Editor

The Map Editor is where you drag and drop modules and/or previously
constructed maps, so that you can edit the flow of control and parameter
settings. Each module has a unique miniature representation that is fully
functional. More information about the settings of a particular module can
be seen by popping up the full sized representation of the module, by
clicking on the maximize button (the square button on the right hand side of
the title bar of the miniature module in the Map Editor).

The Log Window

The Log Window is a place where error messages and warnings get posted.
It can be popped up or down by going to the “Layout” menu of the Map Editor
and select the “Log” toggle button.

Now you are ready to start –>

  1. First set up your environment:
  2. If you do not have an “explorer” directory in your home directory, make
    one now.
    cd to your ~/explorer directory.
    setenv EXPLORERUSERHOME ~/explorer

    It is important that you do these steps before you run explorer, or it
    will not know where to look for your specific files. Also, it will get
    confused when you try to save files.

  3. Type “explorer” on the command line.
  4. Get some data for your simple map:
  5. All maps must have data. Usually data is imported into Explorer via a “Reader”
    module. For this simple example, we will generate one using the GenLat module. This
    is often done to test a new map before importing vast quantities of data.

    Find GenLat in the Modules list and place the pointer over it. Select GenLat. While keeping the
    mouse button pressed, drag the module into the Map Editor, and then release the mousebutton. You
    should now see a miniature representation of the GenLat module. See that the sliders and option
    menus are active and not just visual representations.

    We need to setup
    the parameters on GenLat to make it automatically generate an interesting lattice. Select
    “curvilinear” from the option menu “Coord Representation”.
    In the control panel of the GenLat module, we are going to set some parameters to output a
    curvilinear 2-d lattice of a particular type. Select “Curv Random” from the CoordType option
    menu. Move the Dimensions slider to 2, or alternatively, select the text area just
    underneath the “Dimensions” label (where it currently has a 3 as the default) and
    enter a 2. (This text field is annoyingly well-hidden. I didn’t know it was there until I
    hit it by accident).

  6. Drag a Render module onto the Map Editor:
  7. Find the Render module and drag it into the Map Editor also.

  8. Convert the Data to the proper format for rendering
  9. We also need to convert the “lattice data” that will be output by the GenLat
    module into Geometry data for the input of the Render module. Drag and drop a LatToGeom module
    onto the Map Editor.

  10. Connect the modules
  11. Anatomy of a micro-module

    Now we need to hook up all the modules. There are two rectangular areas just underneath
    the title bar of the mini-module. The area to the left is the “input port”, the area to the
    right is the “output port”. Selecting those areas with the third mouse button pops up a
    list of inputs or outputs for the module. Popup the output port list on GenLat and select
    Lattice. All of the possible input ports in the current map will light up with lime green
    and the current output port will be displayed in teal. You must select a corresponding input
    or output or unselect this port. Select the input port on LatToGeom, and select “Lattice”.
    A bright blue pipe will be drawn between the output port of GenLat and the input port of
    LatToGeom. Maximize the render window to see what you’ve got. Granted, this is a
    visualization of some random data, but now you know how to hook things up.

    To unselect a port that is waiting for an output or an input: Select the window of the Map
    Editor.

    To delete a connection: Select the port which has a pipe you’d like to delete. A list of
    pipes that enter or leave this pipe will be shown in the menu or in a cascaded menu off of
    a button with the name of

    Multiple Selection: Multiple modules may be selected by keeping the shift key down while selecting.

Now for something a little more complex: a Slice

  1. Delete our previous example map.

  2. Go to the Edit Menu on the main menu bar of the Map Editor and select Delete All just
    to start a new demonstration.

  3. Drop a volumetric map on the MapEditor.
    In order to slice a dataset, the dataset must be volumetric. Drop the map volume onto
    the Map Editor. We are not really interested in ReadLat, WireFrame or
    IsosurfaceLat
    right now, so you can delete them to save rendering time.

  4. Drop the following modules onto the Map Editor: Slice, LatToGeom, TransformGen and
    Render
    .

  5. Connect Lattice on the output port of ReadLat to Input Lattice on the input
    port of Slice.

  6. Connect the Lattice on output port of TransformGen to Transform In – Lattice on the input of port of Slice.

  7. Connect Colormap — Lattice on the output port of GenerateColormap to Colormap — Lattice on the input port of LatToGeom.

  8. Connect the Output Lattice on the output port of Slice to Input–Lattice on the input port of LatToGeom

  9. Connect the Colormap Lattice on the output port of Generate Colormap to the input port of VolumeToGeom
  10. Finally connect Geometry on the output port of LatToGeom to Geometry on the input port of Render. You should now
    see a slice of the volume that looks like this in the Render window connected to LatToGeom:

  11. TransformGen defines the plane of the slice. Play with it to see
    what different angled slices reveal about the volume.

Some local examples:

Lets look at some example maps that you will find in /usr/local/examples/explorer. All saved explorer maps will appear in the Librarian’s Modules list and Maps list. All the scv examples will have the prefix “buex”.

buexSurfaceColor

Drop buexSurfaceColor on the MapEditor. This is an example of displacing some 2D data to
create a surface. Maximize the DisplaceLat module. Increase the displacement, and thus the
height of the surface by turning the scaleknob. With the third mousebutton, single-click
DisplaceLat’s input port menu and single click again on the Function cascade button to
see that the function DisplaceLat is operating on is a simple 2D lattice read in by
ReadLat. Do the same for the Displacement cascade. In this case, DisplaceLat is
also using the simple 2D input lattice to displace itself. This means that each point in the 2D
domain of the lattice will be displaced by an amount equal to itself multiplied by the scale factor
in the DisplaceLat module. You spot the maximums and minimums of the data.

In addition to the displacement providing clues about distribution of data, the colormap highlights
those features and gives us more specific information. The input port of the GenColormap gets its
data from the 2D input data. It maps each datum to a color, and pipes that map to LatToGeom, which
uses it to construct the image.

Maximize GenColormap. It looks like this:

Make sure the Color Space is HSV, ColorBand is Value, Edit Mode is Move and Output? is
Build, for the time being. There is a colorbar area
called the Palette Window which has representations of all the colors in the map in ascending order
from the minimum (-3.0) to the maximum (30.0). The minimum and maximum can be input by hand (ie, when
the user knows a particular range of data) or can be obtained by using the MinMax module. Note the area
just below the colorbar, called the Edit Window. It displays values in the data range at increments
which you have, unfortunately, no control over. Each little square in the Edit Window is actually
a control point in a spline that allows you to control the shape of the curve for that Color Band.
You are only able to modify the curve that represents the current Color Band. In HSV ColorSpace the
Color Band’s curve in the Edit Window will be Red=Hue, Green=Saturation, Blue=Value, White=Opacity.
(In RGB mode the mapping is Red->Red, etc).

The left and right control points (which you will see when you select a control point) change the
slope of the curve. Note what happens when you move them up and down. Control points that are on
the line can be moved horizontally vertically along the line by dragging with the mouse down.

We would like to make a particular value stand out from it’s neighboring values. Locate the place
on the x axis of the EditWindow that looks to be around 15. There should be a sizeable block of
similar colors there. Drag a control point horizontally so that it is over 15. Select Insert for
EditMode and create new control points on either side of this one and pretty close to it.
Go back to Move mode, and select the original control point that you placed over 15, and drag it
so that the color above it is very distinct from its neighbors. You should have something that
looks like this:

Now select Run from the Output? mode
and locate the color you just put in the map for the value 15. You should be able to easily locate
the places in the image where the value is (close to) 15.
This is just one way of doing it.

This would be a lot easier if you could select a specific value and just enter a color for it. It
would also be nice if you could have some control over the display of values along the x-axis
of the Edit Window. Oh, well…

buexSurfaceConstant

Drop buexSurfaceConstant on the MapEditor. This is virtually the same example as
buexSurfaceColor, but with two important differences. Note that the entire image is the same
color. This is because the Function input to DisplaceLat is a lattice output by LatFunction instead of
the original data. All you need to know about this instance of LatFunction is that it
creates a lattice with the same dimensions and size as the 2D input lattice and fills it
with zeros. So, why is it all one color? Because DisplaceLat outputs a lattice with Function’s
data, but with the new coordinates it just calculated. Since Function is zero at all points,
the color in the colormap at location zero is used.

buexSurfaceGray

Drop buexSurfaceGray on the MapEditor. This also is virtually the same example as
buexSurfaceColor, except that there is an greyscale input colormap to GenColormap.

buexVolumeViz1

Drop buexVolumeViz1 on the MapEditor. This is an example of 3D volume data.
The isosurface is the thing that looks kind of like a light bulb, and the lattice data
points are represented by colored spheres called “splats” (some of them look bigger or
smaller because of distance from the camera). It is actually rather difficult to see patterns
in the data with the splat size being so small. We can increase their size by maximizing
the VolumeToGeom module, and using the splat size knob. Try values around 1.0, and you
should be able to tell how the data is concentrated. Values around 2.0 are generally
suggested for linear and gaussian splats. Decrease the error factor to something close to
zero. This will increase the number of times the space is sub-divided in the volume
rendering algorithm, and should produce more accurate results.

buexVolumeViz2

Drop buexVolumeViz2 on the MapEditor. This is the same data set as buexVolumeViz1,
but we add some more modules to inspect other features of the data. Namely, Vectors and Gradients.
Since the vector information is not stored explicitly in this data set, we need to calculate
it using the Gradient module. The Gradient module produces magnitude and direction informat
and outputs it as a Lattice. The Vector module takes this data and displays a 3D vector
field, whose locations are the coordinates of the lattice and who magnitude and direction
are provided by the Gradient module.

Explorer Input Data – The Lattice:

Lattices are used all over the place to define data structures, not just to define input
data. For example, a transformation matrix in Explorer is a regular lattice with scalar data.
A range of values, ie. two values, a max and min, can be read from a file into a lattice
used to set the max and min on GenerateColormap. You get used to it after awhile.
DataScribe is used to build data conversion modules when a user’s data doesn’t conform
to the standard Explorer formats. It is an interface to building a conversion script and
module interface that will appear on the Librarian like any other module. You can find
DataScribe detailed in Chapter 7 of the Explorer User’s Guide.

Upcoming tutorial: Animation and loop controllers