OpenDX Intro 4: Rendering Data in OpenDX

Author: R.S. Weigel and M. Wiltberger
Date: 06/02/2005
Note: Used in the 2005 NCAR Summer school and content from Lab 8 of the 2004 CISM Summer School

Keywords and Acronyms:

List: An OpenDX data structure that contains OpenDX data structures.


In this section we will render the data of a Field using the Glyph module. From the top menu bar, select File, Open Program, type /usr/local/CISM_DX/Labs/2005_AFWA_ShortCourse/IntroToOpenDX/nets/*.net
in the Filter section, and double click the file OpenDXRendering.net.
(If you do not want to type this path, enter /*.net in the Filter section and use the mouse to find the directory)

In the VPE select File, Open, and OpenDXRendering.net. Type CTRL-E and rotate the object so that you can see all glyphs. The Glyph module takes in a Field created by the Construct module and adds a component that describes the properties of a glyph for each data point. In this network, the Collect module is used; this module takes an input of two different renderable objects (two Fields) and has an output of a OpenDX list data structure that contains these objects (a "Group"). The Image module is smart enough to know that if it is passed a Group containing multiple Fields, it should render each one in the same window.

Test your knowledge:

Explore:

Other View Controls:

The View Control dialog box allows you to control (among other aspects of an object) the following:

To open this dialog box, from the image menu bar select Options, View Control (or just CTRL-V).

Controlling the Viewing Direction

To change the viewing direction, select Set View in the dialog box. This list includes a set of head on views (top, front, left, etc.) and a set "off angle" view directions (off top, off bottom, etc.). When you select a view of an object, the image is automatically altered (note the highlighted Execute in the menu bar).

Controlling Rotation

To rotate an object in the image window, first click on the Mode option box (initially displaying None) and then select Rotate from the displayed list. Rotate becomes the current mode and a set of axes appears in the lower right-hand corner of the window. You can rotate the object in two dimensions (clockwise and counterclockwise) or in three by rotating the axes. You can also cause the object to rotate "continuously" (i.e., in coordination with the axes).

2-D Rotation Position the mouse cursor in the image window and hold down the right mouse button: clockwise movement of the mouse produces clockwise rotation of the axes; counterclockwise movement produces counterclockwise rotation. When the mouse button is released, the object rotates by the same amount as the axes have, assuming the same relative position in the window.

3-D Rotation Position the mouse cursor in the image window and hold down the left mouse button: the mouse now behaves like a track ball and the axes move accordingly. When the mouse button is released, the object rotates by the same amount as the axes have, assuming the same relative position in the window.

Continuous Rotation

Once you have selected Rotate mode, you can make the object rotate along with the axes: select Execute in the menu bar and then Execute on Change in the pull-down menu (Execute is highlighted). The image is now replaced by a dot representation of the object. The movement of the mouse (and the axes) is reflected directly and continuously in the movement of this dot version.

Turn off Execute on Change by selecting End Execution in the Execute pull-down menu. To restore the original view of the object, select Reset in the View Control dialog box. Rotation Mode can be obtain by typing CTRL-R with the cursor is in the image window.

Controlling the Field of View

Pan/Zoom mode allows you to change the center of focus while zooming in or out. Select Pan/Zoom in the Mode option list of the dialog box. Position the mouse cursor at the point in the image window that you want as the center of the new "picture," and press the appropriate mouse button (left to zoom in or right to zoom out). Move the mouse in any direction to display the overlay rectangle. The "zooming" behavior of the object with respect to the rectangle will be the same as that just described. To restore the original view of the object, select Reset in the dialog box. NB: You can get to the Pan/Zoom Mode by typing CTRL-G in the image window.

Using Control Panels

Control panels give you direct control of inputs to a visual program. The control panel included with example1.net, for example, allows you to incorporate a colored plane in the image of an object and to decide the number of contour lines to be displayed in that plane. To open the control panel: Select Windows in the menu bar of the image window. Select Open Control Panel By Name in the pull-down menu and then select Control Panel.

To display a colored plane: Click on off in the Show MapToPlane interactor. Select on when it appears in the selection list. Select Execute in the menu bar of either the control panel or the image window. Select Execute on Change in the pull-down menu. The visual program re-executes and the colored plane is incorporated as part of the current image.

To specify the number of contour lines, click on one of the two stepper arrowheads in the number of contour lines interactor (right to increase the number, left to decrease it). Since Data Explorer is in Execute on Change mode, the number of contours changes when the number in the interactor changes. Click on on in the Show MapToPlane interactor and then select off when it appears. The plane disappears and the original image is restored.


Move on to the next exercise.