SoExaminerViewer

InventorModule
genre View3D
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoViewers
definition SoViewers.def
see also SoCustomExaminerViewer, SoRenderArea
inherits from SoRenderArea
keywords rendering, scene, movie, recording, navigation, zoom, 3D

Purpose

The module SoExaminerViewer renders an Open Inventor scene and allows for interaction with and navigation of the scene.

It also offers facilities to generate movies.

Usage

This viewer uses a virtual trackball to rotate the scene. The point of rotation is by default the center of the scene bounding box, but can be placed anywhere in the scene. The viewer also allows you to translate in the screen plane, as well as dolly in and out (forward/backward movement).

On the right side, the viewer features the following buttons if decoration is turned on.

Viewer Button Function
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_pick.png Selects object manipulation mode (and deselects viewer mode). The cursor shape will change to an arrow. In this mode, the user is manipulating objects in the scene.
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_view.png Selects viewer mode (and deselects object manipulation mode). The cursor shape will change to a hand icon. In this mode, the user is moving a virtual camera in 3D space.
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_gethome.png Returns the virtual camera to its home position (initial position if not reset).
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_sethome.png Resets the home position to the current camera position.
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_viewall.png Brings the entire scene into view. This functions is also available in the Action menu.
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_seek.png Allows the user to select a new center of rotation for the virtual camera. When clicked on (and in viewer mode) the cursor changes to a crosshair. The next left mouse-button press causes whatever is underneath the cursor to be selected as the new center of rotation. Once the button is released, the camera animates to its new position.
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_cammode.png Selects the type of virtual camera used by the viewer. It toggles between the two available camera types – perspective and orthographic.

The following functions can be controlled by the mouse itself.

Mouse/Keyboard Function
Left Rotate virtual trackball.
Middle / CTRL+Left Translate up, down, left, right.
CTRL+Middle / Left+Middle Dolly in and out.
Wheel Dolly in and out if activated (through Enable zooming with mouse wheel)
SHIFT+(CTRL+)Wheel Rotate scene if activated (through Enable rotation with shift key and mouse wheel)
‘S’ then click onto an object Sets a new rotation center (Seek function).
Right Pop-up menu if activated.

Windows

Default Panel

../../../Modules/Inventor/SoViewers/mhelp/Images/Screenshots/SoExaminerViewer._default.png

Input Fields

child

name: child, type: SoNode

Output Fields

outputImage

name: outputImage, type: Image

self (hidden)

name: self, type: SoNode

Parameter Fields

Field Index

Animation: Bool Grab Key Focus: Bool Reset Position: Trigger
antialiasing: Bool Headlight: Bool Right Button Events: Enum
antialiasingNumPasses: Integer height: Float Rotation Angle: Float
Append count: Bool Initial: Enum Rotation Axis: Vector3
Apply: Enum inputDevicesList: String Rotation Current Step: Integer
Auto apply user setting: Bool Interactive Draw Style: Enum Rotation Steps: Integer
Auto Clipping: Bool isCameraStored: Bool rotationStopped: Trigger
Auto Redraw When Recording: Bool Keyboard Events: Enum Save Camera: Bool
Automatic View All: Bool Left Button Events: Enum Save Position: Trigger
Background: Color Mid Button Events: Enum Show snapshot: Bool
border: Bool miSelectedPointingAction: String Snap Count: Integer
boundingBoxCaching: Enum miSelectedPointingActionActive: Bool Snapshot Format: Enum
Cancel: Trigger miSelectedPointingActionProvider: String Start (startRecording): Trigger
Continue: Trigger Mouse Interaction: String Start (startRotation): Trigger
Create Movie: Trigger Movie Framerate: Float Status: String
Create Snapshot: Trigger nearDistance: Float Stereo Viewing: Bool
Current Camera: Enum Num Samples: Integer Stop (stopRecording): Trigger
Cursor: Bool Offset: Float Stop (stopRotation): Trigger
Decoration: Bool orientation: Rotation Stop animating: Trigger
Draw Style: Enum Output Movie File: String Store Current Orientation: Trigger
Enable Key Commands: Bool outputSnapshotFileWritten: String Store Current State: Bool
Enable rotation with shift key and mouse wheel: Bool perspective: Bool Transparency: Enum
Enable zooming with mouse wheel: Bool pickCulling: Enum Update: Trigger
farDistance: Float Popup menu: Bool Use Sample Buffers: Bool
feedback: Bool position: Vector3 User Orientation: Rotation
feedbackSize: Integer Record Rotation: Bool View All: Trigger
File: String Record Single Frame: Trigger viewAllFlag: Bool
focalDistance: Float renderCaching: Enum Viewing: Bool
forceRedrawOnInteraction: Bool renderCulling: Enum  
Grab Framerate: Float rescanScene: Trigger  

Visible Fields

Background

name: background, type: Color, default: 0 0 0

Sets the background color.

see also SoRenderArea.background

Transparency

name: transparency, type: Enum, default: BLEND

Defines the type of transparency used in the rendering.

see also SoRenderArea.transparency

Use Sample Buffers

name: useSampleBuffers, type: Bool, default: FALSE

Enables the usage of sample buffers for multi sample anti-aliasing (MSAA)

see also SoRenderArea.useSampleBuffers

Num Samples

name: numSamples, type: Integer, default: 8

Sets the number of sample buffers to use. 0 means the maximum supported number of sample buffers is used.

see also SoRenderArea.numSamples

Grab Key Focus

name: grabKeyFocus, type: Bool, default: TRUE

If checked, the viewer grabs the key focus whenever the mouse cursor is moved over the viewer.

Otherwise, the user has to click onto the viewer to focus it.

see also SoRenderArea.grabKeyFocus

Enable Key Commands

name: enableKeyCommands, type: Bool, default: TRUE

see SoRenderArea.enableKeyCommands

Snapshot Format

name: snapshotFormat, type: Enum, default: SNAPSHOT_RGB

Defines the format for snapshots.

see also SoRenderArea.snapshotFormat

Start (startRecording)

name: startRecording, type: Trigger

If pressed, the recording of a movie is started.

see also SoRenderArea.startRecording

Stop (stopRecording)

name: stopRecording, type: Trigger

If pressed, a recording in process is stopped.

see also SoRenderArea.stopRecording

Cancel

name: cancelRecording, type: Trigger

If pressed, a recording in process is stopped and all saved images are being removed.

see also SoRenderArea.cancelRecording

Record Single Frame

name: singleFrame, type: Trigger

If pressed, the currently rendered image is saved to disc as a part of a movie.

see also SoRenderArea.singleFrame

Continue

name: continueRecording, type: Trigger

If pressed, the recording of a movie is paused if running, or resumed if paused.

see also SoRenderArea.continueRecording

Create Movie

name: createAvi, type: Trigger

If pressed, a movie of the frames you have recorded after pressing the Start button is created.

see also SoRenderArea.createAvi

Output Movie File

name: outputAviFile, type: String

Sets the name of the output movie file.

If no filename is given, the movies are automatically created in the screenshot gallery.

see also SoRenderArea.outputAviFile

Auto Redraw When Recording

name: autoRedrawWhenRecording, type: Bool, default: TRUE

If checked, the scene is getting redrawn anew when recording even if the scene is not being changed.

Grab Framerate

name: frameRate, type: Float, default: 7

Sets the refresh frame rate of the viewer.

see also SoRenderArea.frameRate

Movie Framerate

name: frameRateAvi, type: Float, default: 15

Sets the frame rate for the target movie.

see also SoRenderArea.frameRateAvi

Status

name: status, type: String, persistent: no

Shows status information.

see also SoRenderArea.status

File

name: outputSnapshotFile, type: String, default: none

Sets the file name for the output snapshot file.

see also SoRenderArea.outputSnapshotFile

Append count

name: autoIncreaseFile, type: Bool, default: TRUE

If checked, the filenames bear the frame count in their names.

see also SoRenderArea.autoIncreaseFile

Update

name: updateMLOutput, type: Trigger

If pressed, the output ML image to current viewer image is being updated.

see also SoRenderArea.updateMLOutput

Create Snapshot

name: doSnapshot, type: Trigger

If pressed, a snapshot of the current rendering is saved.

However, better press F11 in a viewer to create a snapshot that is automatically saved to the screenshot gallery.

see also SoRenderArea.doSnapshot

Show snapshot

name: showSnapshotWithShell, type: Bool, default: FALSE

If checked, a newly created snapshot is opened with the system’s default image viewer.

see also SoRenderArea.showSnapshotWithShell

Snap Count

name: snapCount, type: Integer, default: 0

Sets a counter offset for consecutive snapshot file names.

see also SoRenderArea.snapCount

Headlight

name: headlight, type: Bool, default: TRUE

If checked, the scene is illuminated with a default headlight.

Decoration

name: decoration, type: Bool, default: TRUE

If checked, the viewer’s border are decorated with tool buttons.

Viewing

name: viewing, type: Bool, default: TRUE

If checked, the viewer is in navigation mode (rotating, panning). Otherwise, the viewer is in picking mode.

Auto Clipping

name: autoClipping, type: Bool, default: TRUE

If checked, the viewer clips the scene automatically at the default (frontal) clipping plane.

Draw Style

name: drawStyle, type: Enum, default: VIEW_AS_IS

Defines the drawing style for still images.

Values:

Title Name
As Is VIEW_AS_IS
Hidden Line VIEW_HIDDEN_LINE
No Texture VIEW_NO_TEXTURE
Low Complexity VIEW_LOW_COMPLEXITY
Line VIEW_LINE
Point VIEW_POINT
Bbox VIEW_BBOX
Low Res Line VIEW_LOW_RES_LINE
Low Res Point VIEW_LOW_RES_POINT
Wireframe Overlay VIEW_WIREFRAME_OVERLAY
Same As Still VIEW_SAME_AS_STILL

Interactive Draw Style

name: interactiveDrawStyle, type: Enum, default: VIEW_LOW_COMPLEXITY

Defines the drawing style for rendering while navigating.

Values:

Title Name
As Is VIEW_AS_IS
Hidden Line VIEW_HIDDEN_LINE
No Texture VIEW_NO_TEXTURE
Low Complexity VIEW_LOW_COMPLEXITY
Line VIEW_LINE
Point VIEW_POINT
Bbox VIEW_BBOX
Low Res Line VIEW_LOW_RES_LINE
Low Res Point VIEW_LOW_RES_POINT
Wireframe Overlay VIEW_WIREFRAME_OVERLAY
Same As Still VIEW_SAME_AS_STILL

View All

name: viewAll, type: Trigger

If pressed, the viewer centers on the bounding box of the attached scene.

Save Position

name: saveHomePosition, type: Trigger

If pressed, the current viewing direction and the focal point are being saved.

Reset Position

name: resetToHomePosition, type: Trigger

If pressed, a previously saved home viewing direction and focal point are being restored.

Initial

name: initialCameraOrientation, type: Enum, default: CAMERA_KEEP_AS_IS

Defines how the camera should view the scene initially (on opening the viewer or on pressing View All).

Values:

Title Name
Keep As Is CAMERA_KEEP_AS_IS
Axial CAMERA_AXIAL
Sagittal CAMERA_SAGITTAL
Coronal CAMERA_CORONAL
Head Profile CAMERA_HEAD_PROFILE
User Setting CAMERA_USER_SETTING

Apply

name: applyCameraOrientation, type: Enum, default: CAMERA_KEEP_AS_IS

Defines how the camera should view the scene on setting a value here.

Values:

Title Name
Keep As Is CAMERA_KEEP_AS_IS
Axial CAMERA_AXIAL
Sagittal CAMERA_SAGITTAL
Coronal CAMERA_CORONAL
Head Profile CAMERA_HEAD_PROFILE
User Setting CAMERA_USER_SETTING

Current Camera

name: cameraType, type: Enum, default: CAMERA_PERSPECTIVE

Defines the type of the internal camera.

This is overwritten when using an external camera.

Values:

Title Name
Perspective CAMERA_PERSPECTIVE
Orthographic CAMERA_ORTHOGRAPHIC

Auto apply user setting

name: autoApplyUserSettingOrientation, type: Bool, default: FALSE

If checked, the viewing direction defined in Apply is set as soon as the value in User Orientation is changed.

User Orientation

name: userSettingOrientation, type: Rotation, default: 0 0 1 0

Sets a user camera orientation.

Store Current Orientation

name: storeAsUserSetting, type: Trigger

If pressed, the current camera viewing direction is stored in User Orientation.

Automatic View All

name: automaticViewAll, type: Bool, default: FALSE

If checked, the viewer automatically shows the whole scene (computed on base of the bounding box) on opening the viewer or changing the attached scene.

Store Current State

name: storeCurrentState, type: Bool, default: TRUE

If checked, the viewer stores the current state every tick of settings like using a headlight, the draw style, showing decoration.

Save Camera

name: saveCamera, type: Bool, default: TRUE

If checked, the viewer saves if a perspective or an orthographic camera is used.

Cursor

name: cursor, type: Bool, default: TRUE

If checked, the mouse cursor over the viewer reflect the interaction/navigation state.

Stereo Viewing

name: stereoViewing, type: Bool, default: FALSE

If checked, stereo viewing is enabled. Note that stereo viewing needs to be supported by your graphic card.

Offset

name: stereoOffset, type: Float, default: 3

Sets an offset value for stereo viewing. This value describes how far the two alternating cameras are apart.

Left Button Events

name: button1events, type: Enum, default: TO_VIEWER

Deprecated, rather use field Mouse Interaction below.

Values:

Title Name
Scene TO_SCENE
Viewer TO_VIEWER
Scene And Viewer TO_SCENE_AND_VIEWER
Scene Or Viewer TO_SCENE_OR_VIEWER

Mid Button Events

name: button2events, type: Enum, default: TO_VIEWER

Deprecated, rather use field Mouse Interaction below.

Values:

Title Name
Scene TO_SCENE
Viewer TO_VIEWER
Scene And Viewer TO_SCENE_AND_VIEWER
Scene Or Viewer TO_SCENE_OR_VIEWER

Right Button Events

name: button3events, type: Enum, default: TO_VIEWER

Deprecated, rather use field Mouse Interaction below.

Values:

Title Name
Scene TO_SCENE
Viewer TO_VIEWER
Scene And Viewer TO_SCENE_AND_VIEWER
Scene Or Viewer TO_SCENE_OR_VIEWER

Keyboard Events

name: keyEvents, type: Enum, default: TO_VIEWER

Defines whether the viewer or the scene (or both) should react on keyboard events.

Values:

Title Name
Scene TO_SCENE
Viewer TO_VIEWER
Scene And Viewer TO_SCENE_AND_VIEWER
Scene Or Viewer TO_SCENE_OR_VIEWER

Animation

name: animationEnabled, type: Bool, default: FALSE

If checked, the scene will keep on turning if it is interactively turned and the mouse button is released in motion.

Stop animating

name: stopAnimating, type: Trigger

If pressed, all animations are stopped.

Mouse Interaction

name: mouseInteraction, type: String

Sets a sequence of mouse interactions as a string.

Syntax: ‘(*);function1:combo1,combo2,…;function2:…’

A * at the beginning clears the default mouse functions.

Available functions: pick, spin, pan, dolly, seek

Combos are represented by characters ‘123sca’

(left, middle, right, shift, control, alt resp.)

Big letters ‘SCA’ mean ‘don’t care about this modifier’

Example: ‘* spin:1 pan:1s,1c,2 dolly:12,2c,1sc’

Start (startRotation)

name: startRotation, type: Trigger

If pressed, a rotating animation is started.

Stop (stopRotation)

name: stopRotation, type: Trigger

If pressed, a rotating animation in progress is stopped.

Rotation Axis

name: rotationAxis, type: Vector3, default: 0 1 0

Sets a rotation axis for a rotation animation.

Rotation Angle

name: rotationAngle, type: Float, default: 360

Sets a rotation angle for a rotation animation.

Rotation Steps

name: rotationSteps, type: Integer, default: 80

Sets the number of steps for a rotation animation.

Rotation Current Step

name: rotationCurrentStep, type: Integer, persistent: no

Shows the current rotation animation step.

Record Rotation

name: recordRotation, type: Bool, default: TRUE

If checked, the rotation animation is recorded once it has started.

Enable zooming with mouse wheel

name: wheelZoomEnabled, type: Bool, default: TRUE

Enable zooming the scene with the mouse wheel.

Enable rotation with shift key and mouse wheel

name: wheelRotationEnabled, type: Bool, default: TRUE

Enable rotating the scene with the mouse wheel (with shift key pressed).

Hidden Fields

renderCaching

name: renderCaching, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

boundingBoxCaching

name: boundingBoxCaching, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

renderCulling

name: renderCulling, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

pickCulling

name: pickCulling, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

border

name: border, type: Bool, default: FALSE

antialiasing

name: antialiasing, type: Bool, default: FALSE

antialiasingNumPasses

name: antialiasingNumPasses, type: Integer, default: 1

outputSnapshotFileWritten

name: outputSnapshotFileWritten, type: String, default: none

inputDevicesList

name: inputDevicesList, type: String

miSelectedPointingAction

name: miSelectedPointingAction, type: String, persistent: no

see SoRenderArea.miSelectedPointingAction

miSelectedPointingActionProvider

name: miSelectedPointingActionProvider, type: String, persistent: no

see SoRenderArea.miSelectedPointingActionProvider

miSelectedPointingActionActive

name: miSelectedPointingActionActive, type: Bool, persistent: no

see SoRenderArea.miSelectedPointingActionActive

rescanScene

name: rescanScene, type: Trigger

viewAllFlag

name: viewAllFlag, type: Bool, default: FALSE

isCameraStored

name: isCameraStored, type: Bool, default: FALSE

perspective

name: perspective, type: Bool, default: TRUE

height

name: height, type: Float, default: 0

position

name: position, type: Vector3, default: 0 0 0

orientation

name: orientation, type: Rotation, default: 0 0 1 0

nearDistance

name: nearDistance, type: Float, default: 0

farDistance

name: farDistance, type: Float, default: 0

focalDistance

name: focalDistance, type: Float, default: 0

forceRedrawOnInteraction

name: forceRedrawOnInteraction, type: Bool, default: FALSE

feedback

name: feedback, type: Bool, default: FALSE

feedbackSize

name: feedbackSize, type: Integer, default: 32

rotationStopped

name: rotationStopped, type: Trigger