The 3D viewer plays a central role in amira. Here all geometric objects are shown in 3D space. The 3D viewer offers powerful and fast interaction techniques. It can be regarded as a virtual camera which can be moved to an arbitrary position within the 3D scene. The left mouse button is used to change the view direction by means of a virtual trackball. The middle mouse button is used for panning, while the left and the middle mouse button pressed together allow you to zoom objects.
The virtual trackball controlled by the left mouse button allows for free rotation of the camera. The camera trackball, displayed by default in the lower right corner of the viewer, is used for constrained rotation: rotation of the camera about the screen-aligned X, Y, or Z axes. Click on the vertical wheel (it becomes red when you select it) and move the mouse up/down to rotate about the X axis. Click on the horizontal wheel (it becomes green when you select it) and move the mouse left/right to rotate about the Y axis. Click on the third wheel (it becomes blue) and move the mouse up/down to rotate about the Z axis.
Sometimes you need to manipulate objects directly in the 3D viewer. For example, this technique, called 3D interaction, is used by the transform editor. The editor provides special draggers that can be picked and translated or rotated in order to specify the transformation of a data object. Before you can interact with these draggers, you must switch the viewer into interaction mode. This is done by clicking on the arrow button in the upper left corner. If the viewer is in interaction mode, the mouse cursor will be an arrow instead of a hand symbol. You can use the [ESC] key in order to quickly switch between interaction mode and viewing mode. If the viewer is in interaction mode, use the [Alt] key to temporarily switch to viewing mode.
| Figure 36: amira's viewer window provides a virtual trackball for easy navigation, as well as a camera trackball (lower right) for constrained rotation. The toolbar contains several controls, allowing you for example to switch between viewing mode and interaction mode, to choose certain orientations, or to take snapshots. |
More than one viewer can be active at a time. Standard screen layouts with one, two, or four viewers can be selected via the View menu. Additional viewers can be created using the Tcl command viewer <n> show, where <n> is an integer number between 0 and 15. While viewers 0 to 3 will be placed in a common panel window, viewers 4 to 15 will create their own top-level window. For more specific control, the viewer provides an extensive command set, which is documented in Section 5.3.3.1.
The toolbar of the main viewer window provides several buttons and controls, see Figure 36. The precise meaning of these controls is described below.
Interact:
Switches the viewer into interaction mode. You can also use
the [ESC] key to toggle between viewing mode and interaction mode.
Trackball:
Switches the viewer into viewing mode. You can also use the
[ESC] key to toggle between interaction mode and viewing mode.
The left mouse button is used to
change the view direction by means of a virtual trackball.
Translate:
Same as Trackball except that the left mouse button is used for
panning (translation).
Zoom:
Same as Trackball except that in this mode vertical motion of
the left mouse button controls zooming.
Rotate:
Rotates the camera
around the current view direction. By default, a clockwise rotation of
one degree is performed. If the Shift-key is pressed while clicking, a
90 degree rotation is done. If the Ctrl-key is pressed, the rotation
will be counterclockwise.
Seek:
Pressing the seek button and then clicking on an arbitrary object in the
scene causes the object to be moved into the center of the viewer window.
Moreover, the camera will be oriented parallel to the normal direction at
the selected point. Seeking mode may also be activated by pressing the [S] key in the viewer window.
Home:
Resets camera to the home position.
Set Home:
Sets the current position as the new home position.
Perspective/Ortho:
Toggles between a perspective and an orthographic camera. By default, a
perspective camera is used. You may want to use an orthographic camera
in order to measure distances or to exactly align objects in 3D space.
Note: Only one of these buttons will be visible
at a time, the button indicating the currently active camera type.
View All:
or
Repositions the camera so that all objects become
visible. The orientation of the camera will not be changed.
Note: The first button is seen if technical naming has been selected in
the Edit/Preferences/Layout dialog, the second button
will be displayed if medical naming has been selected.
YZ-, XY- and XZ-Views:
or
Adjusts the camera according to the specified viewing direction. The
viewing direction is parallel to the coordinate axis perpendicular to
the specified coordinate plane. Medical doctors are used to viewing series
of tomographic images parallel to the XY-plane with the y-axis pointing
downwards. This convention is followed by the XY-button. The opposite view
direction is used if the Shift key is pressed.
Note:
The first set of buttons is seen if technical naming has been selected in
the Edit/Preferences/Layout dialog, the second set of buttons
will be displayed if medical naming has been selected. They correspond to
axial, coronal, and sagittal views respectively.
Stereo:
Allows you to enable or disable stereo viewing, as well as specify
various stereo viewing parameters via the
Stereo Preferences dialog.
Measuring:
Pressing this button creates an instance of a
Measuring module that lets you measure distances
and angles on objects within the viewer. Clicking on the down arrow will
display a menu of measuring tools to chose from: 2D line, 3D line, 2D angle,
3D angle, and annotation. See the Measuring module's
documentation for details. Note: Only one of these buttons will be visible
on the toolbar at a time, the button of
the measuring tool most recently accessed from the viewer toolbar.
Snapshot:
Takes a snapshot of the current rendering area and saves it in a file. The
filename as well as the desired output format must be entered through
the Snapshot dialog. Snapshots may also be taken
using the viewer command snapshot.
Layout:
Selects the viewer layout: a single view, two viewers side-by-side,
two viewers stacked, or four viewers.
Fullscreen:
Selects fullscreen mode. In this mode, the viewer occupies the entire screen and
no other windows will be visible. To exit fullscreen mode, click the right mouse
button and uncheck Fullscreen in the popup menu.
In addition to these buttons, the amira viewers provide an extensive set of Tcl commands, which are listed in Section 5.3.3.1.