SoCustomExaminerViewer¶
-
InventorModule
¶ genre View3D
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoCustomViewer
definition SoCustomViewer.def see also SoExaminerViewer
,SoSpacemouseAccess
,SoPowerMateAccess
,SoAppleRemoteAccess
inherits from SoExaminerViewer
keywords customizable
,rendering
,scene
,movie
,recording
,navigation
,zoom
,3D
Purpose¶
The module SoCustomExaminerViewer
provides additional camera control buttons for axial, sagittal, and coronal views and allows to customize the display of all viewer buttons.
Furthermore, it adds camera control to the picking mode by taking advantage of an six degrees of freedom input device and the user’s bi-manual control skills.
Usage¶
Connect an Open Inventor scene graph to the viewer.
Details¶
The display of the following button groups can be customized:
Buttons | Function |
---|---|
Picking and Viewing mode | |
Home and Set Home camera parameters | |
View entire scene (View All) | |
Seek | |
Axial, Sagittal, Coronal, and Opposite Side View | |
Projection Type (perspective, orthographic) | |
Display ‘Dolly’ instead of ‘Zoom’ for perspective projection type |
A Spacemouse or Spaceball can be used to control the virtual camera of the SoCustomExaminerViewer
by using the less-dominant hand of the user. The camera is positioned on a virtual sphere surrounding the displayed scene whereby an automatic reorientation maintains the focal point. The distance of the virtual camera to the focal point can be changed by moving the cap or ball of the input device to or away from the screen in front of the user. The position of the virtual camera on the sphere is controlled by the rotation of the cap or ball.
Parameter Fields¶
Field Index¶
Visible Fields¶
Background¶
-
name:
background
, type:
Color
, default:
0 0 0
¶ Sets the background color.
see also SoExaminerViewer.background
Transparency¶
-
name:
transparency
, type:
Enum
, default:
BLEND
¶ Defines the type of transparency used in the rendering.
see also SoExaminerViewer.transparency
Use Sample Buffers¶
-
name:
useSampleBuffers
, type:
Bool
, default:
FALSE
¶ If checked, the viewer renders polygons with anti-aliasing (MSAA).
see also SoExaminerViewer.useSampleBuffers
Num Samples¶
-
name:
numSamples
, type:
Integer
, default:
8
¶ Sets the number of sample points for anti-aliasing (MSAA).
see also SoExaminerViewer.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 use has to click onto the viewer to focus it.
see also SoExaminerViewer.grabKeyFocus
Snapshot Format¶
-
name:
snapshotFormat
, type:
Enum
, default:
SNAPSHOT_RGB
¶ Defines the format for snapshots.
see also SoExaminerViewer.snapshotFormat
Start (startRecording)¶
-
name:
startRecording
, type:
Trigger
¶ If pressed, the recording of a movie is started.
see also SoExaminerViewer.startRecording
Stop (stopRecording)¶
-
name:
stopRecording
, type:
Trigger
¶ If pressed, a recording in process is stopped.
see also SoExaminerViewer.stopRecording
Cancel¶
-
name:
cancelRecording
, type:
Trigger
¶ If pressed, a recording in process is stopped and all saved images are being removed.
see also SoExaminerViewer.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 SoExaminerViewer.singleFrame
Continue¶
-
name:
continueRecording
, type:
Trigger
¶ If pressed, the recording of a movie is paused if running, or resumed if paused.
see also SoExaminerViewer.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 SoExaminerViewer.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 SoExaminerViewer.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.
see also SoExaminerViewer.frameRate
Movie Framerate¶
-
name:
frameRateAvi
, type:
Float
, default:
15
¶ Sets the frame rate for the target movie.
see also SoExaminerViewer.frameRateAvi
Status¶
-
name:
status
, type:
String
, persistent:
no
¶ Shows status information.
see also SoExaminerViewer.status
File¶
-
name:
outputSnapshotFile
, type:
String
, default:
none
¶ Sets the file name for the output snapshot file.
see also SoExaminerViewer.outputSnapshotFile
Append count¶
-
name:
autoIncreaseFile
, type:
Bool
, default:
TRUE
¶ If checked, the filenames bear the frame count in their names.
see also SoExaminerViewer.autoIncreaseFile
Update¶
-
name:
updateMLOutput
, type:
Trigger
¶ If pressed, the output ML image to current viewer image is being updated.
see also SoExaminerViewer.updateMLOutput
Create Snapshot¶
-
name:
doSnapshot
, type:
Trigger
¶ If pressed, a snapshot of the current rendering is saved.
see also SoExaminerViewer.doSnapshot
Show snapshot¶
-
name:
showSnapshotWithShell
, type:
Bool
, default:
FALSE
¶ If checked, a newly created snapshot is opened with the system’s default image viewer.
Snap Count¶
-
name:
snapCount
, type:
Integer
, default:
0
¶ Sets a counter offset for consecutive snapshot file names.
see also SoExaminerViewer.snapCount
Input Devices¶
-
name:
inputDevicesList
, type:
String
¶ Sets the device class names separated by spaces.
Headlight¶
-
name:
headlight
, type:
Bool
, default:
TRUE
¶ If checked, the scene is illuminated with a default headlight.
see also SoExaminerViewer.headlight
Decoration¶
-
name:
decoration
, type:
Bool
, default:
TRUE
¶ If checked, the viewer’s border are decorated with tool buttons.
see also SoExaminerViewer.decoration
Viewing¶
-
name:
viewing
, type:
Bool
, default:
TRUE
¶ If checked, the viewer is in navigation mode (rotating, panning). Otherwise, the viewer is in picking mode.
see also SoExaminerViewer.viewing
Auto Clipping¶
-
name:
autoClipping
, type:
Bool
, default:
TRUE
¶ If checked, the viewer clips the scene automatically at the default (frontal) clipping plane.
see also SoExaminerViewer.autoClipping
Draw Style¶
-
name:
drawStyle
, type:
Enum
, default:
VIEW_AS_IS
¶ Defines the drawing style for still images.
see also SoExaminerViewer.drawStyle
Interactive Draw Style¶
-
name:
interactiveDrawStyle
, type:
Enum
, default:
VIEW_LOW_COMPLEXITY
¶ Defines the drawing style for rendering while navigating.
View All¶
-
name:
viewAll
, type:
Trigger
¶ If pressed, the viewer centers on the bounding box of the attached scene.
see also SoExaminerViewer.viewAll
Save Position¶
-
name:
saveHomePosition
, type:
Trigger
¶ If pressed, the current viewing direction and the focal point are being saved.
see also SoExaminerViewer.saveHomePosition
Reset Position¶
-
name:
resetToHomePosition
, type:
Trigger
¶ If pressed, a previously saved home viewing direction and focal point are being restored.
see also SoExaminerViewer.resetToHomePosition
Initial¶
Apply¶
-
name:
applyCameraOrientation
, type:
Enum
, default:
CAMERA_KEEP_AS_IS
¶ Defines how the camera should view the scene on setting a value here.
Current Camera¶
-
name:
cameraType
, type:
Enum
, default:
CAMERA_PERSPECTIVE
¶ Defines the type of the internal camera.
This is overwritten when using an external camera.
see also SoExaminerViewer.cameraType
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 inUser 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
.
see also SoExaminerViewer.storeAsUserSetting
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.
see also SoExaminerViewer.automaticViewAll
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.
see also SoExaminerViewer.storeCurrentState
Save Camera¶
-
name:
saveCamera
, type:
Bool
, default:
TRUE
¶ If checked, the viewer saves if a perspective or an orthographic camera is used.
see also SoExaminerViewer.saveCamera
Cursor¶
-
name:
cursor
, type:
Bool
, default:
TRUE
¶ If checked, the mouse cursor over the viewer reflect the interaction/navigation state.
see also SoExaminerViewer.cursor
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.
see also SoExaminerViewer.stereoViewing
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.
see also SoExaminerViewer.stereoOffset
Left Button Events¶
-
name:
button1events
, type:
Enum
, default:
TO_VIEWER
¶ Deprecated, rather use field
Mouse Interaction
below.
see also SoExaminerViewer.button1events
Mid Button Events¶
-
name:
button2events
, type:
Enum
, default:
TO_VIEWER
¶ Deprecated, rather use field
Mouse Interaction
below.
see also SoExaminerViewer.button2events
Right Button Events¶
-
name:
button3events
, type:
Enum
, default:
TO_VIEWER
¶ Deprecated, rather use field
Mouse Interaction
below.
see also SoExaminerViewer.button3events
Keyboard Events¶
-
name:
keyEvents
, type:
Enum
, default:
TO_VIEWER
¶ Defines whether the viewer or the scene (or both) should react on keyboard events.
see also SoExaminerViewer.keyEvents
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.
see also SoExaminerViewer.animationEnabled
Stop animating¶
-
name:
stopAnimating
, type:
Trigger
¶ If pressed, all animations are stopped.
see also SoExaminerViewer.stopAnimating
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’
see also SoExaminerViewer.mouseInteraction
Start (startRotation)¶
-
name:
startRotation
, type:
Trigger
¶ If pressed, a rotating animation is started.
see also SoExaminerViewer.startRotation
Stop (stopRotation)¶
-
name:
stopRotation
, type:
Trigger
¶ If pressed, a rotating animation in progress is stopped.
see also SoExaminerViewer.stopRotation
Rotation Axis¶
-
name:
rotationAxis
, type:
Vector3
, default:
0 1 0
¶ Sets a rotation axis for a rotation animation.
see also SoExaminerViewer.rotationAxis
Rotation Angle¶
-
name:
rotationAngle
, type:
Float
, default:
360
¶ Sets a rotation angle for a rotation animation.
see also SoExaminerViewer.rotationAngle
Rotation Steps¶
-
name:
rotationSteps
, type:
Integer
, default:
80
¶ Sets the number of steps for a rotation animation.
see also SoExaminerViewer.rotationSteps
Rotation Current Step¶
-
name:
rotationCurrentStep
, type:
Integer
, persistent:
no
¶ Shows the current rotation animation step.
see also SoExaminerViewer.rotationCurrentStep
Record Rotation¶
-
name:
recordRotation
, type:
Bool
, default:
TRUE
¶ If checked, the rotation animation is recorded once it has started.
see also SoExaminerViewer.recordRotation
Enable rotation with shift key and mouse wheel¶
-
name:
wheelRotationEnabled
, type:
Bool
, default:
FALSE
¶
Enable picking and viewing buttons¶
-
name:
enablePickNView
, type:
Bool
, default:
TRUE
¶ If checked, buttons for toggling picking/viewing mode are shown.
Enable home and set home buttons¶
-
name:
enableHome
, type:
Bool
, default:
FALSE
¶ If checked, buttons for set/go to home are shown/
Enable view all button¶
-
name:
enableViewAll
, type:
Bool
, default:
TRUE
¶ If checked, a view all button is shown.
Enable seeking button¶
-
name:
enableSeek
, type:
Bool
, default:
FALSE
¶ If checked, a seeking button is shown.
Enable axial, sagittal, coronal, opposite buttons¶
-
name:
enableASC
, type:
Bool
, default:
TRUE
¶ If checked, buttons for axial, sagittal, coronal and opposite viewing are shown.
Enable projection type buttons¶
-
name:
enableProjType
, type:
Bool
, default:
FALSE
¶ If checked, a button for toggling perspective/orthographic view is shown.
Set Label (overwriteDollyWheelLabel)¶
-
name:
overwriteDollyWheelLabel
, type:
Bool
, default:
FALSE
, deprecated name:
enableDolly
¶ If checked, a button for dolly is shown instead of a zoom button.
Label (Perspective) (dollyWheelPerspectiveText)¶
-
name:
dollyWheelPerspectiveText
, type:
String
, default:
Dolly
¶
Label (Perspective) (rotXWheelPerspectiveText)¶
-
name:
rotXWheelPerspectiveText
, type:
String
, default:
Rotx
¶
Label (Perspective) (rotYWheelPerspectiveText)¶
-
name:
rotYWheelPerspectiveText
, type:
String
, default:
Roty
¶
Label (Orthographic) (dollyWheelOrthographicText)¶
-
name:
dollyWheelOrthographicText
, type:
String
, default:
Zoom
¶
Label (Orthographic) (rotXWheelOrthographicText)¶
-
name:
rotXWheelOrthographicText
, type:
String
, default:
Rotx
¶
Label (Orthographic) (rotYWheelOrthographicText)¶
-
name:
rotYWheelOrthographicText
, type:
String
, default:
Roty
¶
Enable Motion3Event camera control¶
-
name:
enableM3Control
, type:
Bool
, default:
FALSE
¶ If checked, the viewer evaluates SoMotion3 events emitted by device drivers (e.g. by a SoQtSpacemouse).
Choose Observer View¶
-
name:
chooseView
, type:
Enum
, default:
VIEW_ANTERIOR
¶ Defines a predefined view.
Note that this works only if the scene’s camera has already been located by the viewer.
Values:
Title | Name |
---|---|
Anterior | VIEW_ANTERIOR |
Posterior | VIEW_POSTERIOR |
Left | VIEW_LEFT |
Right | VIEW_RIGHT |
Superior | VIEW_SUPERIOR |
Inferior | VIEW_INFERIOR |