OpenDX Documentation
Full Contents QuickStart Guide User's Guide User's Reference
Previous Page Next Page Table of Contents Partial Table of Contents Index Search

3.8 Tasks and Tools

The following examples illustrate a number of techniques and tools that are helpful in using Data Explorer.

Adding Captions

The Caption tool allows you to control the placement, font, size, wording, and other aspects of a caption in the Image window.

  1. Open visual program .../Caption.net.
  2. Select Open All Control Panels in the Windows pull-down menu. A control panel appears.
  3. Select Execute on Change in the Execute pull-down menu. When the image appears, note that the caption at the bottom of the Image window is the same as the name of the realization technique shown in the control panel.
  4. Click on the option button in the control panel and select Streamlines. Both the image and the caption change accordingly.

Use the Caption configuration dialog box to change the placement and font size of the caption.

  1. Double click on the Caption icon to open the configuration dialog box and click on the position toggle button.
  2. Clear the position parameter field and type "0 1".
  3. Click on OK. The caption moves from its default position to the top left corner of the Image window.

    Note: [0 0] specifies the bottom left corner and [1 1] the top right.

  4. Reopen the Caption configuration dialog box and click on Expand to show the hidden parameters.
  5. Click on the height toggle button.
  6. Double click on the associated parameter field to highlight the value there.
  7. Type a larger value in its place (e.g., if the value was "15," type in "20").
  8. Click on OK. The caption type changes size. (See "Displaying and hiding parameters".)

To change the wording of a caption, you must use the Format tool:

  1. In the VPE window, disconnect the Caption input from the Selector interactor.
  2. Select Annotation and Format in the palettes.
  3. Position the Format icon between Selector and Caption and open the configuration dialog box.
  4. Drag the cursor over "(none)" in the template parameter field and then type "Visualization Method: %s" in its place (%s indicates that a string will be inserted).
  5. Click on OK.
  6. Connect the second output tab of Selector to the second (middle) input tab of Format.
  7. Connect the Format output to Caption and reexecute the visual program. The caption reads "Visualization Method: Streamlines."

    See Caption and Format in IBM Visualization Data Explorer User's Reference.

Adding Input Tabs to Tool Icons

Tools such as Compute, Options, and Switch, among others, can have a variable number of inputs. If you need more tabs than the number shown by a default icon, you can increase the number:

  1. Select the tool icon to which you want to add tabs.
  2. Select Input/Output Tabs in the Edit pull-down menu and select Add Input Tab in the cascade menu. An input tab is added to the icon.
  3. Repeat Step 2 as many times as necessary.

Note: You can also remove tabs from a tool icon by following the same procedure, but select Remove Input Tab in Step 2.

Connecting Scattered Data Points

Many Data Explorer modules cannot be used with scattered data points that have no connections (i.e., interpolation elements). However, Data Explorer does provide two methods for creating connections between scattered data values.

  1. The first method uses the Connect module.
  2. The second method uses the Regrid module.

    See Connect and Regrid in IBM Visualization Data Explorer User's Reference.

Controlling Execution with Switch

Switch allows you to decide which portions of a visual program are executed (e.g., whether a data set is visualized with Isosurface or MapToPlane).

  1. Open visual program .../Switch.net.
  2. Select Execute on Change in the Execute pull-down menu. The image that appears is a streamline representation of the data set.
  3. Select Open All Control Panels in the Windows pull-down menu. You can now use the selector interactor to switch from one visualization to the other.

You can modify the selector interactor and increase the number of choices.

  1. Double click on the interactor to open the Set Selector Attributes dialog box.
  2. Double click on the Value parameter field and type "3" in that space.
  3. Double click on the Label parameter field and type "MapToPlane." in that space.

    Note: The integer passed from Selector to the first input tab of Switch determines what input, if any, is passed on to another module. If the integer is "0" or greater than the number of objects being passed to the module, the output is NULL. Thus, "1" selects the first input (second input tab), "2" the second input (third input tab), and so on.

  4. Click on Add. A new third line should appear under the first two.
  5. Click on OK to close the dialog box. If you click on the option button in the selector, you will see that it now offers a third choice. Leave the control panel open.

The third choice shown in the Selector, however, is not yet operative (select MapToPlane in the control panel and reexecute the visual program). To implement this choice, you must incorporate a third visualization in the program, such as that represented by the program segment on the right side of the VPE canvas. This segment computes a MapToPlane of temperature data.

  1. Click on the Switch icon to highlight it.
  2. Select Add Input Tab in the Edit pull-down menu. A new input tab is added to Switch.
  3. Connect the first ("mapped") output tab of the AutoColor icon (below the MapToPlane icon) to the new input tab of Switch.
  4. Select MapToPlane in the control panel and reexecute the visual program. The MapToPlane visualization appears in the Image window.

Note: Switch selects among inputs. The corresponding module that selects among outputs is Route. Both are described in IBM Visualization Data Explorer User's Reference.

Controlling Inputs: Configuration Dialog Boxes

A configuration dialog box allows you to change the parameter values of a module. To open the dialog box, double click on the module's icon or single-click on the icon and select Configuration from the Edit pull-down menu. You can close the dialog box by clicking on OK.

Changing parameter values

A configuration dialog box displays the input parameters of a module.

You can change a parameter value by typing in a new value in the corresponding parameter field on the right side of the dialog box.

Note: If a tab is already connected to an arc, you must first disconnect the arc before typing in a new value.

Displaying and hiding parameters

Most configuration dialog boxes can be "expanded" to display "hidden" parameters for less commonly used functions. If a dialog box has hidden parameters, the Expand and Collapse buttons at the bottom of the box are enabled (i.e., their labels appear in solid type; otherwise, both labels are gray).

To display hidden parameters, click on the Expand button. To restore the dialog box to its previous state, click on Collapse.

Notes:

  1. Whether a parameter is hidden or visible is determined by the associated toggle button in the Hide column of the dialog box.
  2. The number of input tabs on an icon varies with the number of visible parameters in the dialog box.

Controlling Inputs: Interactors

Using a configuration dialog box to specify tool inputs can be awkward, especially if the inputs are changed frequently or if the number of inputs is large. A simpler means of controlling input values makes use of interactors, which appear only in Control Panels. They are represented on the VPE canvas by stand-ins, or icons, selected from the category and tool palettes just as tools are. The output of an interactor, like that of any tool, can be connected to one or more inputs.

For this part of Tutorial II, you will use a scalar interactor stand-in to control an isosurface value. A scalar interactor can control any parameter that accepts a scalar value as input. Other types of interactor (e.g., vector, integer, string) can control parameters that take the corresponding type of input.

Begin by opening visual program .../Isosurface3D.net.

Selecting interactors and placing stand-ins

The procedure here is essentially the same as that for selecting tools and placing icons (see "Selecting tools and placing icons").

  1. Select Interactor in the categories palette.
  2. Select Scalar in the tools palette and position the cursor (now an inverted "L") above Isosurface.
  3. Click again. The stand-in for the Scalar interactor appears.

Connecting the interactor

  1. Click and hold on the Scalar output tab and drag the cursor to the middle Isosurface input tab (which lights up when the cursor touches it).
  2. Release the mouse button to establish a connection (represented by a rectilinear black line) between the two.

Creating a control panel

Double click on the Scalar icon. A control panel appears containing a scalar interactor labeled Isosurface value. Stepper arrowheads can be used to change this value.

Setting the interactor attributes

To set interactor attributes, you must open a Set Attributes... dialog box by:

When the dialog box appears, you are ready to (re)set the attribute values:
  1. Click on the Maximum field. The value disappears.
  2. Type 1 and press Enter to set the new value.
  3. Repeat Steps 1 and 2 for Minimum, and change the value to .1.
  4. Repeat Steps 1 and 2 for Global Increment and change the value to .01.
  5. Repeat Steps 1 and 2 for Decimal Places and change the value to 2. (You can also reset this value with the stepper buttons.)
  6. Click on OK. The dialog box closes.

When the minimum and maximum values are set, Data Explorer will prevent values outside that range from being entered.

Note: As discussed in "Data-driven Tools", data-driven interactors derive their own minimum and maximum from the data itself.

Executing the program on change

  1. Select Execute On Change in the Execute pull-down menu of the VPE menu bar.
  2. Use the right-hand stepper arrowhead in the interactor to increase the isosurface value. As the value changes, so does the image in the Image window.

    Notes:

    1. You can also change the isosurface value by clicking on it, typing in a new value, and Pressing Enter.
    2. You can accelerate the value change by holding down the mouse button after selecting a stepper arrowhead.
    3. If you change values faster than Data Explorer can generate images, it will complete processing the current value and then "jump" to the one most recently specified, passing over any intermediate values.
  3. Click on the left-hand stepper arrow to decrease the value. Again, new images appear in the Image window.
  4. Select End Execution in the Execute pull-down menu.

Changing the interactor style

In this example, you will change the interactor style from "stepper" (as in the preceding example) to "slider."
  1. Click on the scalar interactor Isosurface value if it is not already highlighted.
  2. Click on Set Style in the Edit pull-down menu of the control panel. Another pull-down menu appears.
  3. Click on Slider. The interactor changes appearance.
  4. Select Execute On Change as in the preceding example.
  5. Using the left mouse button, drag the slider tab to the right or left to increase or decrease the isosurface value.
  6. Release the mouse button to generate an image corresponding to the new value.
  7. Select End Execution in the Execute pull-down menu.

Changing the interactor label

The default label of an interactor connected to a tool is the name of the tool followed by the name of the input parameter: in this case "Isosurface value."

  1. Click on the Isosurface value interactor if it is not already highlighted with a white border.
  2. Click on Set Label... in the Edit pull-down menu. The Set Interactor Label... dialog box appears.
  3. Double click on the Interactor Label field or drag the mouse cursor over the text.
  4. Type in a new name and click on OK. The dialog box closes and the new interactor label appears in place of the previous one.

    Note: You may break the label into two or more lines by typing \n where you want the desired line break(s) to appear.

Creating Animations

This example demonstrates a few ways of using a sequencer.

  1. Open (but do not execute) visual program .../Animate.net.
  2. Select Sequencer from the Execute pull-down menu. Note that both the Loop and Palindrome buttons in the control panel are already activated (recessed).
  3. Click on the Forward button (>): the visual program executes. The Image window opens and the image begins to run continuously through an "animation" sequence in which a data slice changes position.
  4. Click on the Stop button (&sqbul;).
  5. Disconnect the leftmost AutoColor icon from Image and connect the left output tab of the other AutoColor icon to Image.
  6. Click on the Forward button (>) again. The animation sequence shows a set of streamlines growing longer and then shorter and then repeating the process.
  7. Disconnect AutoColor from Image and connect Isosurface to Image.
  8. Click on the Forward button (>). The sequence is that of a continuously changing isosurface.
  9. Click on the Stop button (&sqbul;) to halt the sequence.

See Sequencer in IBM Visualization Data Explorer User's Reference.

Note: In this example, a transmitter and several receivers are used to make "invisible" connections between tools. The frame tool below the Sequencer icon is a transmitter. The other frame tools are receivers. Receivers and transmitters belong to the Special category of tools (see IBM Visualization Data Explorer User's Reference).

Changing the limits of the sequencer

  1. If the sequence is still running, click on the Stop button (&sqbul;) to halt it.
  2. Click on the ellipsis button (...) in the Sequence Control panel to open the Frame Control dialog box.
  3. Click on the Max parameter field, type in "30," and then press Enter.
  4. Click on the Forward button (>) to start the sequence. The isosurface sequence now proceeds to larger isovalues (smaller isosurfaces).
  5. Close both control panels by double clicking on the top left button of the Sequence Control box.
For Future Reference

Min and Max control the minimum and maximum number of frames that a sequencer can generate. Start and End are set by default to the same values, but they can take any values in the range. The Increment parameter controls the difference between output values (frames).

Creating and Using Macros

Macros are collections of tools that can be represented by a single icon in the VPE canvas. Macros thus allow you not only to simplify the appearance of your visual program but also to share commonly used functions between programs. This section briefly introduces the basic concepts of creating and using macros. (The topic is treated in detail in IBM Visualization Data Explorer User's Guide.) The general procedure for creating a macro follows on the next page.

  1. Decide how many inputs and outputs your macro will have.
  2. For each input, select Special in the categories palette and then Input in the tools palette.
  3. Position the mouse cursor in the VPE canvas and click once to generate an Input icon.
  4. Repeat Steps 2 and 3 for Output.
  5. Open the configuration dialog box for each tool to give it an appropriate name, description, and default value.
  6. Select any additional tools you want to include in the macro and place their icons on the canvas.
  7. Connect the Input and Output icons to the appropriate tools.
  8. Select Macro Name in the Edit pull-down menu and name the macro.
  9. Save the macro.
For Future Reference
  • To use the new macro, you must first load it into Data Explorer: select Load Macro from the File pull-down menu.

    Once loaded, the macro will be available from the tools palettes. Simply select it and place its icon on the canvas.

  • For descriptions of the inputs and outputs specified when the macro was created, open its configuration dialog box.
  • To see the component contents of the macro, click on the icon to highlight it and then select Open Selected Macro in the Windows pull-down menu.

The following example illustrates the use of a macro in a visual program.

  1. Select Load Macro in the File pull-down menu.
  2. Type /usr/lpp/dx/samples/tutorial/SampleMacro.net in the Filter field at the top of the dialog box and press Enter. The name of the macro appears under Files on the right side of the dialog box.
  3. Click on the macro name to highlight it, and then click on Load Macro at the bottom of the dialog box. A new category appears in the categories palette: Macros.
  4. Select the new category. The name of the new macro appears in the tools palette. Now you can open a visual program that uses this macro.
  5. Open and execute visual program .../UseSampleMacro.net.

    Although the visual program looks simple, the image it produces is quite elaborate.

  6. Click on the SampleMacro icon to highlight it and then select Open Selected Macro in the Windows pull-down menu. A new window appears, displaying the "network" of SampleMacro: This macro performs various operations on the output from three Input modules (top) and feeds the result to a single Output module (bottom). It is this output that is fed to the Display module in the visual program.

Data-driven Tools

Many of the tools in Data Explorer can be "data driven". That is, their attributes (e.g., limits) can be determined dynamically at run time from the data set being used.

Note: The attributes of data-driven tools become effective only after the first execution with the new data set.

Data-Driven Colormap Editor

  1. Open and execute visual program .../DataDrivenColormap.net. The image is a color-mapped slice of data, with a color bar at the top of the Image window.
  2. Select Open All Control Panels in the Windows pull-down menu and change the Selector value to wind.

  3. Reexecute the visual program. The color map changes to reflect the new data set.

See Colormap in IBM Visualization Data Explorer User's Reference.

Data-Driven scalar interactor

Scalar, integer, and vector interactors can all be data driven. The example here is that of a scalar interactor.

  1. Open and execute visual program .../DataDrivenScalar.net.
  2. Select Open All Control Panels in the Windows pull-down menu and change Format value to cloudwater.
  3. Leave the control panel open and reexecute the visual program. The Isosurface value (along with the image) is updated to reflect the new data set.

See Scalar in IBM Visualization Data Explorer User's Reference.

Data-driven selector

In this example, the input from Import to the Selector interactor is a data group consisting of two fields.

  1. Open and execute visual program .../DataDrivenSelector.net. The image is a temperature field.
  2. Select Open All Control Panels in the Windows pull-down menu.
  3. Select wind_velocity in the control panel and reexecute the visual program.

The control-panel options temperature and wind_velocity are derived from the field names of the imported data.

In this network, Inquire determines whether or not the data set is "vector" and, if so, Include excludes invalid data values. If the data is not vector, the path followed goes directly from Select to Switch.

See Selector in IBM Visualization Data Explorer User's Reference.

Data-driven sequencer

In this example, the limits for the Sequencer are set automatically according to the number of elements in the x-dimension of the data set (as determined by the Inquire module).

  1. Open (but do not execute) visual program .../DataDrivenSequencer.net.
  2. Select Sequencer from the Execute pull-down menu. Note that both the Loop and Palindrome buttons in the control panel are already activated (recessed).
  3. Click on the Forward button (>): the visual program executes. The Image window opens and the image begins to run continuously through an "animation" sequence of two dozen frames.
  4. Stop the animation sequence by:

See Sequencer in IBM Visualization Data Explorer User's Reference.

Modules: Using AutoColor

The AutoColor module automatically colors data for you. By default, it colors data from blue (for minimum values) to red (for maximum values).

  1. Open and execute visual program .../AutoColor.net. The image is a translucent isosurface and a colored plane.
  2. Select Sequencer in the Execute pull-down menu and click on the Forward (>) button in the Sequence Control panel. The colors represent wind data.
  3. Click on the Stop button (&sqbul;) before proceeding.

Because AutoColor colors each plane individually, the full blue-red range is used each time to represent the wind variation in a single plane. As a result, the same color in different planes can represent different data values and different colors can represent the same value. In order to make the color representation consistent from plane to plane:

  1. Connect the output tab of the rightmost Import icon to the second (projecting) input tab of AutoColor ("min").
  2. Click on the Forward button (>) of the Sequencer again. AutoColor now applies the blue-red range to the entire data set, so that the same color values consistently represent the same data values in every plane.
  3. Open the AutoColor configuration dialog box and click on Expand to show the hidden parameters. (See "Displaying and hiding parameters".)
  4. Click on the opacity toggle button and change the value in the parameter field to ".3."
  5. Click on the Forward button (>) of the Sequencer again and note the change in the plane.

See AutoColor in IBM Visualization Data Explorer User's Reference.

Modules: Using Compute

Compute is a general purpose module for performing algebraic, trigonometric, and logical operations on data. It can also extract components from vectors, create vectors from scalar components, and cast between different data types.

  1. Open and execute visual program .../Compute.net. The image represents wind velocity over the surface of the earth. Color values are based on the magnitude of the wind velocity, and the small black squares and rectangles represent missing data.
  2. Disconnect Include from AutoColor and connect the output of Compute to AutoColor instead.
  3. Execute the visual program. Now the colors are based on the absolute value of the x-component of the wind velocity.
  4. Double click on the Compute icon to open the configuration dialog box. In this example the module has a single input (wind), and the operation to be performed is to determine the absolute value of its x-component.
  5. Change "abs(wind.x)" in the Expression field to "abs(wind.y)." and reexecute the visual program. The image changes accordingly.

Note: Compute is not limited to a single input, and input tabs can be added with the Add Input Tab function in the Edit pull-down menu (see "Adding Input Tabs to Tool Icons"). By default the inputs to Compute are labeled a, b, c,..., but you can rename them.

It is also possible to use Compute on components other than data. For example, suppose you wanted to display a regular 2-D grid of latitude and longitude on a spherical surface. You could use Compute to convert the x,y positions of latitude and longitude to x, y, and z positions of a spherical surface. For an example, open and execute visual program .../WarpedGrid.net, which generates two entirely different objects (in separate Image windows) from the same data.

See Compute in IBM Visualization Data Explorer User's Reference.

Modules: Using Map

The Map module maps one field of data onto another. The field to be mapped to is the first parameter; the field to be mapped from, the second parameter. In the most common use of this module, no other parameters are set: the positions of the first field are used as indices to the positions of the second; the associated data values from the second field are then mapped as new data values onto the first.

Components other than positions and data can also be mapped to one another.

  1. Open and execute visual program .../Map.net. In this example, wind values are mapped onto an isosurface of cloud-water quantity and the result is colored. In addition, wind values are mapped onto a probe point and displayed as text glyphs.
  2. Double click on the right-hand Import icon to open its configuration dialog box. The name parameter field contains a file name ending in "wind".
  3. Change "wind" to "temperature" and click on OK.
  4. Reexecute the visual program. The image is now a color map of temperatures on the isosurface. The number displayed is the data value of the probe point.
  5. To move the probe point, first select View Control in the Options pull-down menu.
  6. Next select Cursors in the Mode pull-down menu. The probe point appears as a small white square immediately to the left of the data value.
  7. Drag the probe point to reposition it, and then release the mouse button. The data value is updated and displayed next to the newly positioned probe point.

See Map and Probe in IBM Visualization Data Explorer User's Reference.

Modules: Using Plot

Plot creates a 2-dimensional plot from x,y data. (Data Explorer expects the "positions" component to contain the x-values, and the data component the y-values. You can pass (import) a group of such fields to Plot, which plots them as multiple lines. You can also add data-point markers to the lines.

  1. Open and execute visual program .../Plot.net. Two Image windows appear: one a color map of elevation data for the southeastern United States; the other, a plot of the elevations along the purple line shown in the color map. (The Slab module extracts the elevation data along the line, but Construct could have been used to create the line and Map to map the elevation data onto the line. Note that Compute is used to extract only the x-component of the positions.)
  2. To animate the line:
    1. Select Special and Sequencer in the palettes.
    2. Position the Sequencer icon above Slab.
    3. Double click on the icon to open the Sequence Control panel and then single-click on the ellipsis button (...) to open the Frame Control dialog box.
    4. Set Min to "0" and Increment to "5."
    5. Click on the ellipsis button again to close the Frame Control dialog box.
    6. Double click on Slab to open its configuration dialog box.
    7. Click on the position toggle button to deactivate it (the associated parameter field will read "(all)") and then on OK.
    8. Connect the Sequencer output tab to the third input tab of Slab ("position").
    9. Click on the Forward button (>) in the Sequence Control panel.
  3. The limits of the plot change somewhat from frame to frame because they are based on the line given for each frame. To make the limits constant:
    1. Double click on the Plot icon to open its configuration dialog box.
    2. Set the corners toggle button on and change the values in the parameter field to {[260, -6000][290, 2000]}.
    3. Click on Expand (to show the hidden parameters) and then on the font toggle button (to change the font to "roman_tser").
    4. Click on OK at the bottom of the dialog box.
    5. Click on the Forward button in the Sequence Control panel.
  4. To place data-point markers on the data plot:
    1. Disconnect Plot from Unmark.
    2. Connect the Options output tab to the first ("input") tab of Plot.
    3. Reexecute the visual program. The markers appear as small open circles.
    4. To see what options were specified, double click on the Options icon to open its configuration dialog box. In this example, the "mark" attribute is set to "circle" and the "mark every" attribute is set to "10." Thus every tenth data point is marked with a circle.

See Plot in IBM Visualization Data Explorer User's Reference.

Processing Images

A variety of image processing functions are available with the Compute, Filter, and Overlay modules. A few of these functions are demonstrated in this example.

  1. Open visual program .../ImageProcessing.net.
  2. Select Open All Control Panels in the Windows pull-down menu. The control panel displays two selector interactors:
  3. Select Execute on Change in the Execute pull-down menu. You can now select these different functions and observe their effects.

Saving and Printing Images

Once you have created an image, you can save it to a file or send it to a printer. (See also IBM Visualization Data Explorer User's Guide.)


Full Contents QuickStart Guide User's Guide User's Reference

[ OpenDX Home at IBM | OpenDX.org ]