This section describes the most frequently used SCIRun module, the ViewScene module, which displays interactive graphical output to the computer screen. ViewScene is used any time the user wants to see a geometry or spatial data. The ViewScene module also provides access to many simulation parameters and controls, and indirectly initiates new iterations of simulation steps, which is important for computational steering (see Computational Steering). Multiple ViewScene windows can be created. Each window is independent of the others.
This section begins with an overview of the ViewScene window and its controls, then describes the options and variations.
- 1 Anatomy of the ViewScene Window
- 2 Recording Moview
- 3 Mouse Control in the ViewScene Window
- 4 Extended Control Window
- 5 Control Widgets
Anatomy of the ViewScene Window
The ViewScene window contains two main areas. The upper portion, which displays graphics and is called the Graphics window, and the lower portion where the majority of control buttons are found. The figure below contains an example of a ViewScene window. In the Graphics window, viewing is controlled by the mouse, mouse buttons, and various modifier keys (shift/control/alt). In the lower window there are several buttons and sliders. Their function is described in this section.
The visible controls along the bottom of the ViewScene window set default configurations as follows:
- Restores the display to a default condition. Useful when some combination of settings result in objects disappearing from the view window.
Set Home View
- Captures the setting of the current view so the user can return to it later by clicking the ``Go home button.
- Restores the current home view.
- Lists a number of standard viewing angles and orientations. The view directions align with the Cartesian axes of the objects, and the ``Up vector option sets the orientation of the objects when viewed along the selected axis.
The display's rendering speed is shown in the lower left corner of the ViewScene's control window.
More controls can be revealed by clicking the [+] button in the lower right corner of the ViewScene window (see Extended Control Window for a description of extended controls).
The ViewScene window's menu bar contains the File, Edit, and Visual menus and the NewWindow button.
File - The File menu contains the following items:
- Save Image... - Saves the contents of the ViewScene window as an image to a file. A dialog prompts the user for a file name, an image format, and an image size.
- Record Movie... - Saves the contents of the ViewScene window as a movie. See Recording Movies for more information.
Edit - The Edit menu contains the following items:
- View/Camera... - Edit eye point, look at point, up vector, and field of view settings.
- Light Sources... - Edit light sources, colors, and brightness. Light source locations are specified relative to the camera. Alternatively, using module AddLight (category Visualization in the SCIRun package), light sources can be specified as objects in the scene.
- Background... - Change the ViewScene's window's background color.
- Clipping Planes... - Edit the orientation and visibility of clipping planes.
- Point Size... - Increase or decrease the size of points.
- Line Width... - Increase or decrease the width of lines.
- Polygon Offset... - Set the polygon offset parameter. This parameter is used to improve rendering of coplanar polygons, lines, and points by offsetting polygons (by a small amount) from other objects.
- Scene Materials... - Edit scene material properties.
- Fog Controls... - Edit the fog controls such as the start and end location.
Visual - Allows the user to select different graphics hardware settings that are available on the workstation. The list is ordered heuristically from most to least useful.
NewWindow - NewWindow creates a new ViewScene window when pressed. Each window is independent of other windows.
The ViewScene's recording control window controls movie recording. The above figure shows the recording control window. Select Record Movie... from the ViewScene window's File menu to show the movie control window.
SCIRun makes a movie by recording the content of the ViewScene window each time the window is redrawn. The width and height of each frame is the same size as the width and height of the ViewScene control window. The width and height of each frame may be changed by clicking button Resize and typing width and height values into the resize text boxes--this must be done before recording the movie.
A movie can be saved as a series of PPM frames, one frame per file, or as an MPEG file.
When saving a movie as a series of PPM files, the files are named according to the C-style format string in the the Name: text box and the initial frame number in the Frame: text box. The frame number is formatted according to the conversion specification introduced by the percent '%' character. For example, if Name: is movie.%04d and Frame: is 1 then the following series of file names are generated: movie.0001, movie.0002, ..., movied.1000 for a PPM movie with one thousand frames.
When recording an MPEG movie, the Name: text box contains the name of the MPEG file.
Click radio button PPM to begin a PPM recording. Click button Mpeg to begin an MPEG recording. Click button Stop Recording to end a movie.
Mouse Control in the ViewScene Window
The ViewScene's mouse controls are extensive and flexible. The resulting action depends on the choice of mouse button, how the mouse is moved and simultaneously pressed control keys. The descriptions in Tables 6.1 and 6.2 may seem complicated, but with practice, use of the mouse becomes intuitive.
|Middle||Rotate scene about its center on an arc ball that surrounds it; rotation direction is a function of the initial mouse location so try different sites and not the response|
|Right||Zoom or scale scene (downwards and to the right increases size, upwards or to the left decreases size)|
|Shift||Left||Select and move a widget in the display|
|Middle||Toggle through the modes for a widget|
|Right||Pop up a widget information window|
|Control||Left||Translate in the Z-direction, i.e., zoom in and out of the screen (down moves closer, up further away). Moving left and right increases the ``throttle of the Z-direction motion. If the cursor is over a point on an object when clicked, this point becomes the center of the screen for translation.|
|Middle||Rotate the camera view about the eye point (usring arcball motion).|
|Right||Unicam movement (see next table)|
|Initial mouse location||Action|
|Near edge of display||rotat objects on the arc ball|
|Near the objects||Following behavior:|
|Initial mouse movement||Action|
|Vertical||Zoom and pan: down = zoom in, up = zoom out, left and right= pan left and right)|
|None||Set rotation point for subsequent arc ball rotation.|
Extended Control Window
Clicking on the [+] button in the lower right corner of the default ViewScene window expands to reveal an extended panel of control buttons as shown in the figure below. Note that [+] changes to [-]. Clicking on the [-] button hides the extended control panel. The following sections describe the control options available in the extended control window.
The left part of the extended ViewScene window contains global rendering settings. Objects can override global settings. See Object Selection and Settings for making object specific settings.
The rendering options are:
Toggles whether or not the Viewer applies lighting to the display. Objects without lighting have a constant color.
Draws objects with variable intensity based on their distance from the user, also known as ``depth cueing. Close objects appear brighter while more remote objects fade gradually into the background as a function of distance from the front.
Toggles whether the ViewScene draws the selected objects in full detail, or as a simple bounding box.
Applies up to six clipping planes to the display. To control the clipping plane locations, use the ``Edit -> Clipping Planes menu at the top of the Viewer window.
Displays only the forward facing facets of any surface objects in the display.
Cache the list of objects to be displayed. This option accelerates rendering when the content of the display does not change.
Show only the wire mesh of objects.
Draw each facet with a constant color.
Linearly interpolate color across facets.
The right column of the extended ViewScene window contains controls for displaying the axes and creating stereoscopic rendering.
Object Selection and Settings
The middle panel of the extended ViewScene window lists objects displayed in the ViewScene window. Each list entry consists of the following items (from left to right):
- Selection button. An object is selected when the selection button is depressed. The ViewScene window only displays selected objects.
- An object's name.
- A Options... pop-up menu. The Options... menu controls object specific rendering settings. If item Use Global Controls is set then object specific settings are ignored and global rendering settings are used. Rendering settings are discussed in Rendering Controls.
The right part of the of the extended ViewScene window contains the following settings:
Autoview on Load
Toggles whether to autoview the scene when initially loaded.
Toggles the display of coordinate axes centered at coordinate (0, 0, 0).
Toggles the display of orientation axes. Orientation axes are displayed in the upper right corner of the ViewScene window.
Toggles between perspective and orthographic views.
Toggles stereo view on and off. Stereo view requires hardware LCD glasses synchronized with the display, so visibility in each eye coincides with the display of the appropriate view.
Controls left and right eye image separation for stereo viewing. Allows the user to establish a separation that is suited to facial anatomy and distance from the screen.
SCIRun supports powerful display widgets. Examples of widget capabilities include managing cutting surfaces colored according to the local data values, displaying streamlines in vector fields, or selecting sub-volumes within the display area for further manipulation.
SCI has made interaction with widgets as consistent as possible. For example, controlling parameters is usually done by clicking and dragging on a cylindrical collar or a sphere element of the widget. Note that a single widget can have more than one purpose depending on the context in which it exists. The Rake widget, for example, selects a clipping or display plane through a three-dimensional object, and sets the seed points for a streamline module.
This section describes the widgets available within SCIRun and BioPSE.
Appearance The point widget consists of a sphere.
Purpose The primary purpose of the Point Widget is to select and retrieve information about a point, for example when probing a field.
Controls Clicking and dragging the sphere moves the point widget to a new location.
Appearance The Rake Widget has an orientation, length, and value. It consists of two spheres (A) connected by a cylinder (B) with a small slider collar (C) on the cylinder. There are also small resize cylinders (D) extending from the spheres.
Purpose The primary use of the Rake Widget is to set the location and density of streamlines emerging from the long cylinder. It can also be used as a more general purpose three-dimensional slider, or a source for a stream surface.
Controls Clicking and dragging either sphere changes the widget's orientation. Dragging either of the resize cylinders causes the size of the widget to change, and dragging any point on the main cylinder moves the whole widget without any change in orientation. Dragging the slider collar changes the associated value, typically the density of seed points for a streamline source.
Appearance The Frame Widget consists of four cylinders connected in a rectangle. In the middle of each cylinder there is a sphere (B), from which a resize cylinder extends (C).
Purpose The Frame Widget is primarily used for image plane definition, defining stream volumes, and as a tie dye similar to the Ring Widget described in Ring Widget.
Controls Dragging a sphere rotates the widget about its center. Dragging on a resize cylinder extends or contracts the rectangle. Dragging any cylinder drags the entire widget through space.
Appearance The Box Widget consists of twelve connected cylinders (A) to form a hexahedral box (B) (three-dimensional rectangle). In the middle of each face of the box is a sphere with a protruding cylinder (C) providing resize control.
Purpose The Box Widget is primarily used to select a subvolume of the workspace for further manipulation (e.g., volume rendering, isosurfaces, streamlines, mesh adaption) where the faces of the widget act as orthogonal clipping planes.
Controls Clicking on and dragging a sphere rotates the widget about its center without changing the position of the center. Clicking on and dragging any resize handle causes the associated face to extend without changing its orientation. Dragging a cylinder causes the entire widget to move without changing its orientation.
Appearance The Ring Widget consists of a ring (A) with four embedded spheres (B), each with a resize cylinder attached (D). Between two of the spheres is a sliding collar (C). One of the resize cylinders has a special material property (typically a different color from the other cylinders) to indicate that it is the halfway point for the slider (E).
Purpose The Ring Widget is primarily used to set the density of streamlines emerging from the ring. The ring serves as a set of seed points from which streamlines emerge. The Ring Widget can serve as a three-dimensional angle gauge, as a source for multiple streamlines throughout its surface, as a source for a stream surface from the outer ring, and as a source for a stream volume. The Ring Widget can also be used as a color sheet, or tie dye, in which the surface is colored as a function of the scalar value of the field at each point.
Controls Clicking and dragging the slider collar along the ring changes the density of the seed points or some other related parameter. Dragging the spheres controls the orientation of the Ring Widget, while moving the resize cylinders change the radius of the Ring Widget about its center. Dragging any other point on the ring moves the ring in space without changing its radius or orientation.