When opening a DataViewer application, you should get the following Figure.
The next paragraphs describe each of the menus of DataViewer.
The File menu has two items: User and Quit.
The User item calls the application depend control window. The widgets in this window are defined by each application inside its own python class with help of the UserWidgets() function. See the documentation for each application for more details. Some applications, like VBM have disabled this operation and are defining their control windows in a different manner.
The Quit item quits DataViewer.
The Set View menu contains two groups of items, as is it shown in Figure.
The first group, containing 6 items, allows you to set the view camera to 6 predefined positions. The location and direction of the camera for each of these positions is the following:
Axis \ Direction | Positive | Negative |
X | Front | Back |
Y | Left | Right |
Z | Top | Bottom |
The Set control scales ... calls the dialog in Figure.
The Set Control Scales window.
In this window, the first 3 typeins define the speed of response of the DataViewer scene to the mouse and keyboard actions. Basically, they define the range of change to be done in one key stroke. You may have to change this if you modify the perspective angle.
The Default zoom is the zoom of the scene when the camera position is chosen using the 6 predefined positions (front, back, ...).
The Pick size sets the error tolerance for selecting regions in the scene with the mouse. It is only used by those applications of DataViewer that have implemented a selection interaction with the scene.
For example, for VBM, the pick size defines the size of the region used for mouse selections. I.e. it is the amount by which you can miss exactly clicking on a vertex and still select it. There is a tradeoff though. If the region is too large, then multiple vertices can be selected with a single click. Which one actually gets used in that case is (mostly) random.
The Perspective Angle sets the perspective features of the camera. Thus, a big perspective angle will approach the vanishing point and make the close objects look much bigger than distant objects. A small perspective angle will move away the vanishing point, coming closer to an effect of parallel projection. If the perspective angle is set to a value below 1, then the resulting image can be 2 dimensional at the pixel level.
The Close and Far Cuts define the positions of the clipping planes for the drawn area. You may need to decrease the close cut value and increase the far cut value if the scene does not appear entirely on the window.
The Set background color... calls the dialog in Figure.
The Set Background Color window.
In this window, you can choose the background color using the 0 to 255 rgb convention. The chosen color will be displayed in the bottom right box above the Cancel button. A translation of the color into 2 hexadecimal units is displayed under the "Selection" label. The OK button sets the background of the main window to the chosen color and closes the dialog. The Cancel button closes the dialog without modifying the background color of the main window. Note that whenever you load another scene in the DataViewer main window, the background color turns to black again.
The Timer menu, shown in Figure, sets the Timer feature on and off.
If the Timer is on, then in the window where DataViewer is running from, you should see the number of frames per second that are being drawn. To use it, turn the timer on, then give a rotation motion to the scene (see Section). The next time you click to stop the scene's rotation, you will get a message with the number of frames achieved during the whole operation. This feature can be used for benchmarking graphics cards.
The Animation menu, shown in Figure, has a single item.
Compiled animation
The "Animation Window..." operation calls the window in Figure, which handles the animation defined by the application in c++ through selection containers.
This window allows you to control the animation of the scene, in case the scene constructed by the application is designed with animation features.
For programmers: the animation is done in DataViewer using
the classes DVselection_container
,
DVrotation_interpolation_container
and
DVtranslation_interpolation_container
. The last two are in an
experimental phase.
The animation is done by displaying a number of frames extracted or interpolated from the scene tree. The way the display is done is controlled by the buttons on this window.
On the first line, the first button moves the frame pointer to the first frame of the animation. The second button stops the animation that is running. The third button starts a frame by frame animation. The last button moves the animation button to the last animation frame.
The second line lets you move through the animation frames doing one step forward or backward at a time.
The last line contains a button that closes the animation window.
Scripted animation
The "Animate Draw Window..." operation calls the window in Figure which handles the animation defined by the application in Python.
This dialog window concerns a special function, named "AnimateDraw" that can be defined by any DataViewer geometrical window (any application). By default, this function is equivalent to the draw function. The application can redefine this function to perform a specific transformation of the scene that can turn into an animation. For example, the bifurcation diagram window in VBM defines the AnimateDraw function as moving the current pointer one step forward in the diagram.
The first button, labeled "Next", makes one call of the AnimateDraw function.
The second line contains a typein specifying a number of steps for running the AnimateDraw function. It is used by the run button described in the next paragraph.
The third line contains a run button that makes a number of calls of the AnimateDraw function equal to the number of steps previously defined.
The last button, labeled "Quit", closes this dialog.
Animation tools
The "Frames per second..." operation calls the window in Figure. In this dialog, one can specify the speed of the animation for the compiled animation, and possibly soon for the scripted animation too. The default value for this parameter is 30.
The "Record start..." menu item opens a file dialog where you can specify a file name for taking snapshots of the window. When the record is on, at each call of the Draw function, a new snapshot is taken from the window and saved as a ppm bitmap file under a name that is a composition of the specified name and a frame number. This can be used to record the compiled or scripted animation, as well as any move of the scene on the screen, namely rotation, translation or zoom.
The "Record stop" operation cancels the recording going on.
DataViewer currently provides five exporting formats, available from the Export menu in Figure.
The first line in this menu exports the current scene in the ppm bitmap . This operation calls a file dialog where you must specify the name of a ppm file. Then a snapshot of the main DataViewer window will be saved as ppm in the specified file.
Note: as for most snapshot facilities, you must be sure that no other window stands in front of the DataViewer main window at export time, otherwise the resulting image may be disturbed.
The second option in the Export menu saves the current scene in the required by POV-Ray, the Persistence of Vision raytracer. The output file will contain, besides the description of the geometrical objects composing the scene, together with their properties, the position of the camera such that the scene can be rendered in the almost exact position as it was in DataViewer. For a good view of the scene, the file will also contain a number of shadowless spotlights, and only one normal spotlight depending on the view point.
Radius note. When exporting DVlines, DVframed, DVaxes, and DVpoints_1D objects, simple OpenGL lines and points do not have a direct representation as POV-Ray objects, so they will be transformed into cylinders or spheres. In the case, the radius of the exported objects is computed on the basis of the size of the whole scene, so the result can be hazardous. We recommend to draw these objects in DataViewer as cylinders or spheres before exporting to POV-Ray, to have a better control over the radius.
Smoothing note. If the geometry complexity of DVlines, DVframed, and DVcones objects is superior to 8, at each point of the centerline will be placed a sphere with the same radius as the centerline. Thus, the rendered centerline will look smooth, otherwise gaps could appear between each two cylinders or cones. Most of the applications of DataViewer provide a control over the geometrical complexity of the whole scene, which is transmitted to each object unless the object defines its own geometrical complexity. Thus, in most cases, if you turn the geometrical complexity of the scene to 9, the centerline will be exported as cylinder/cones and spheres.
This is a debugging especially meant for programmers of DataViewer. The output file will contain a description of the current scene with all the details of the objects it contains in an easy to read .
This option export the current scene to DataViewer's native scene file . The output file can be viewed directly with the Scene file application (see Section).
This option simply exports the current scene as raw data. In the output file, each point is written on a line with simple spaces between its coordinates, and each group of points is separated by an empty line.
The last two actions under this menu concern an extra geometrical buffer that can be useful for many applications.
Save to buffer
This action saves the current geometrical scene to a buffer that is also drawn by any Draw action. The content of the buffer is thus visible and can be rotated, translated and scaled with together with the current scene, but that cannot be used for interaction. This feature allows the user to compare two scenes produced by different calls of the Draw function inside the same DataViewer window. The contents of the buffer is also exported by any of the exporting methods together with the current scene.
Each time the user saves the current scene to the buffer, it is added to the current content of the buffer. Thus, it is possible to accumulate multiple 3D snapshots of the geometrical scene in the same window. For example, in VBM one can simultaneously view the solutions corresponding to multiple points of the bifurcation diagram. In the Scene File application, one can merge any number of scene files by opening them and saving them to the buffer, and by exporting the entire geometrical scene as a scene file.
Clear buffer
This action deleted the contents of the extra geometrical buffer, that has been created by the previous action (Save to buffer).
The Stereo menu contains 3 items, as shown in Figure.
This menu concerns the machines provided with a stereo device. According to the way it is installed, it is very likely that you have to set the screen to a stereo combination before you can turn the device on.
Local note. On lcvmsg2, you have to run the script
SGIStereoOn
before you can turn the stereo on inside
DataViewer. It is recommended to turn the stereo screen combination
off after quitting DataViewer, with the script SGIStereoOff
.
The first two items of the menu turn the Stereo device on and off. If you turn the stereo on, then you will be able to see a 3D image with help of the glasses associated with the device.
The Eye Separation... item calls the dialog shown in Figure.
The stereo device is generating and sending each eye a separate image through the special glasses. In this dialog you can choose the distance between these images which is best for your eyes, with help of the Eye Separation typein. A bigger eye separation makes the image appear larger and more distant to you and increases the perspective effect. A too big eye separation can be difficult for the eyes to manage. The default value for this parameter is 0.005.
The Magellan menu, shown in Figure, can turn on and off the 6D control device called Magellan.
According to its installation, you may have to turn the device on at a
hardware level before you use it inside DataViewer. For the lcvmsg2,
this operation is done with the MagellanOn
script which opens a
dialog window. By closing it, the Magellan is turned off at a hardware
level.