SoView2DExtension

InventorModule

genre

View2DExtended

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

dll

SoView2D

definition

view2d.def

Purpose

Modules derived from SoView2DExtension can overlay the image of a SoView2D with their own drawing and provide specific mouse and keyboard interactions.

Usage

Add the extensions to the Open Inventor scene graph in front of the SoView2D module on which they should be applied. The extensions and the SoView2D must be under the same SoSeparator node if one is used.

Output Fields

self

name: self, type: SoNode

Parameter Fields

Field Index

alt: Enum

createNewModeRequest: Trigger

needsValidVoxel: Bool

button1: Enum

cursorShape: Enum

renderOnSlab: Bool

button2: Enum

drawingOn: Bool

selectionTolerance: Float

button3: Enum

editingOn: Bool

setEventHandled: Bool

clipToSlice: Bool

fixZOn: Bool

shift: Enum

color: Color

ignoreHandledEvents: Bool

wantsAllEvents: Bool

control: Enum

interactionProviderID: String

wantsKeyEvents: Bool

createNewMode: Bool

maskValid: Bool

wantsMouseWheelEvents: Bool

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

Sets the provider ID of the Managed Interactions to override the ID provided by this extension (if SoView2D.useManagedInteraction is activated in the SoView2D). This ID is visible in SoInteractionInfo and can be used in SoInteractionMapping.

If this is left empty, the name of the module is used instead. This field is mainly intended to be used if the provider ID must be set from scripting to disambiguate several instances of the same macro module.

drawingOn

name: drawingOn, type: Bool, default: TRUE

If checked, the rendering of the extension overlay is enabled.

Disabling this usually also disables editingOn.

editingOn

name: editingOn, type: Bool, default: TRUE

If checked, the interaction with the extension through mouse and keyboard (if applicable) is enabled.

If drawingOn is disabled, this is usually also implicitly disabled.

maskValid

name: maskValid, type: Bool, persistent: no

fixZOn

name: fixZOn, type: Bool, default: TRUE

color

name: color, type: Color, default: 1 1 1

Sets the main color of the overlay rendering.

Derived modules might ignore this setting.

selectionTolerance

name: selectionTolerance, type: Float, default: 4

needsValidVoxel

name: needsValidVoxel, type: Bool, default: TRUE

If checked, mouse interaction only works on the underlay image.

Derived modules might ignore this setting.

button1

name: button1, type: Enum, default: IGNORED

Defines whether the left mouse button must be pressed for the main mouse interaction of the extension.

Values:

Title

Name

Pressed

PRESSED

Released

RELEASED

Ignored

IGNORED

button2

name: button2, type: Enum, default: IGNORED

Defines whether the middle mouse button must be pressed for the main mouse interaction of the extension.

Values:

Title

Name

Pressed

PRESSED

Released

RELEASED

Ignored

IGNORED

button3

name: button3, type: Enum, default: IGNORED

Defines whether the right mouse button must be pressed for the main mouse interaction of the extension.

Values:

Title

Name

Pressed

PRESSED

Released

RELEASED

Ignored

IGNORED

shift

name: shift, type: Enum, default: IGNORED

Defines whether the Shift modifier key must be pressed for the main mouse interaction of the extension.

Values:

Title

Name

Pressed

PRESSED

Released

RELEASED

Ignored

IGNORED

control

name: control, type: Enum, default: IGNORED

Defines whether the Control modifier key must be pressed for the main mouse interaction of the extension.

Values:

Title

Name

Pressed

PRESSED

Released

RELEASED

Ignored

IGNORED

alt

name: alt, type: Enum, default: IGNORED

Defines whether the Alt modifier key must be pressed for the main mouse interaction of the extension.

Values:

Title

Name

Pressed

PRESSED

Released

RELEASED

Ignored

IGNORED

wantsAllEvents

name: wantsAllEvents, type: Bool, default: FALSE

wantsKeyEvents

name: wantsKeyEvents, type: Bool, default: FALSE

wantsMouseWheelEvents

name: wantsMouseWheelEvents, type: Bool, default: FALSE

setEventHandled

name: setEventHandled, type: Bool, default: FALSE

If checked, the event is set as handled if it was used by this extension.

This setting is only relevant in classic event mode, not for Managed Interaction.

ignoreHandledEvents

name: ignoreHandledEvents, type: Bool, default: FALSE

If checked, events that have been marked as handled by a previous extension are ignored.

This setting is only relevant in classic event mode, not for Managed Interaction.

createNewMode

name: createNewMode, type: Bool, default: FALSE

If checked and in cooperation mode, the module is in creating mode (leaving the edit mode for other cooperative modules).

This setting is only used in classic event mode, not in Managed Interaction mode.

createNewModeRequest

name: createNewModeRequest, type: Trigger

When pressed, the module announces that it is in creating mode (leaving edit modes for other cooperative modules).

This setting is only used in classic event mode, not in Managed Interaction mode.

renderOnSlab

name: renderOnSlab, type: Bool, default: FALSE

clipToSlice

name: clipToSlice, type: Bool, default: FALSE

cursorShape

name: cursorShape, type: Enum, default: UNDEFINED_CURSOR

Defines the cursor shape for the main action of this extension.

Derived modules might ignore this value or might allow for specifying shapes for additional actions or states.

It is possible to override cursor shapes globally for your application. In your application .prefs file you need to specify the variable

OverrideCursorDirectory = <directory>

where the directory might start with $(LOCAL), which is replaced by the directory of the .prefs file. In this directory put PNG files, their names must be derived from the names of the enumeration values of the cursor shape field (upper-/lower-case is important on Linux):

FORBIDDEN_CURSOR -> forbiddenCursor.png
OTHER_CURSOR_1 -> otherCursor0.png
LUT_1_CURSOR -> lut1Cursor.png

Only the shapes you want to override need to be specified. If the hot spot (the active point) of the cursor shape is not in the middle of the image, you can specify the position (in x,y pixel coordinates) by modifying the file name by adding the position after an exclamation mark:

otherCursor0!3,3.png

Values:

Title

Name

Undefined Cursor

UNDEFINED_CURSOR

Default Cursor

DEFAULT_CURSOR

Forbidden Cursor

FORBIDDEN_CURSOR

Pointing Hand Cursor

POINTING_HAND_CURSOR

Open Hand Cursor

OPEN_HAND_CURSOR

Closed Hand Cursor

CLOSED_HAND_CURSOR

Move All Cursor

MOVE_ALL_CURSOR

Move Hori Cursor

MOVE_HORI_CURSOR

Move Vert Cursor

MOVE_VERT_CURSOR

Move Fdiag Cursor

MOVE_FDIAG_CURSOR

Move Bdiag Cursor

MOVE_BDIAG_CURSOR

Move Inout Cursor

MOVE_INOUT_CURSOR

Rotate X Cursor

ROTATE_X_CURSOR

Rotate Y Cursor

ROTATE_Y_CURSOR

Rotate Z Cursor

ROTATE_Z_CURSOR

Rotate Xy Cursor

ROTATE_XY_CURSOR

Zoom Cursor

ZOOM_CURSOR

Zoom In Cursor

ZOOM_IN_CURSOR

Zoom Out Cursor

ZOOM_OUT_CURSOR

Cross Cursor

CROSS_CURSOR

Cross Plus Cursor

CROSS_PLUS_CURSOR

Cross Minus Cursor

CROSS_MINUS_CURSOR

Cross Move Cursor

CROSS_MOVE_CURSOR

Cross Rotate Cursor

CROSS_ROTATE_CURSOR

Cross Rect Cursor

CROSS_RECT_CURSOR

Cross Oval Cursor

CROSS_OVAL_CURSOR

Cross Vector Cursor

CROSS_VECTOR_CURSOR

Cross Freeform Cursor

CROSS_FREEFORM_CURSOR

Cross Point Cursor

CROSS_POINT_CURSOR

Cross Line Cursor

CROSS_LINE_CURSOR

Cross Curve Cursor

CROSS_CURVE_CURSOR

Cross Polyline Cursor

CROSS_POLYLINE_CURSOR

Cross Polygon Cursor

CROSS_POLYGON_CURSOR

Cross Fill Cursor

CROSS_FILL_CURSOR

Cross Link Cursor

CROSS_LINK_CURSOR

Cross 0 Cursor

CROSS_0_CURSOR

Cross 1 Cursor

CROSS_1_CURSOR

Cross 2 Cursor

CROSS_2_CURSOR

Cross 3 Cursor

CROSS_3_CURSOR

Cross 4 Cursor

CROSS_4_CURSOR

Cross 5 Cursor

CROSS_5_CURSOR

Cross 6 Cursor

CROSS_6_CURSOR

Cross 7 Cursor

CROSS_7_CURSOR

Cross 8 Cursor

CROSS_8_CURSOR

Cross 9 Cursor

CROSS_9_CURSOR

Lut Cursor

LUT_CURSOR

Lut 1 Cursor

LUT_1_CURSOR

Lut 2 Cursor

LUT_2_CURSOR

Lut 3 Cursor

LUT_3_CURSOR

Slicing Cursor

SLICING_CURSOR

Other Cursor 0

OTHER_CURSOR_0

Other Cursor 1

OTHER_CURSOR_1

Other Cursor 2

OTHER_CURSOR_2

Other Cursor 3

OTHER_CURSOR_3

Other Cursor 4

OTHER_CURSOR_4

Other Cursor 5

OTHER_CURSOR_5

Other Cursor 6

OTHER_CURSOR_6

Other Cursor 7

OTHER_CURSOR_7

Other Cursor 8

OTHER_CURSOR_8

Other Cursor 9

OTHER_CURSOR_9

Other Cursor 10

OTHER_CURSOR_10

Other Cursor 11

OTHER_CURSOR_11

Other Cursor 12

OTHER_CURSOR_12

Other Cursor 13

OTHER_CURSOR_13

Other Cursor 14

OTHER_CURSOR_14

Other Cursor 15

OTHER_CURSOR_15

Other Cursor 16

OTHER_CURSOR_16

Other Cursor 17

OTHER_CURSOR_17

Other Cursor 18

OTHER_CURSOR_18

Other Cursor 19

OTHER_CURSOR_19

Other Cursor 20

OTHER_CURSOR_20

Other Cursor 21

OTHER_CURSOR_21

Other Cursor 22

OTHER_CURSOR_22

Other Cursor 23

OTHER_CURSOR_23

Other Cursor 24

OTHER_CURSOR_24

Other Cursor 25

OTHER_CURSOR_25

Other Cursor 26

OTHER_CURSOR_26

Other Cursor 27

OTHER_CURSOR_27

Other Cursor 28

OTHER_CURSOR_28

Other Cursor 29

OTHER_CURSOR_29

Other Cursor 30

OTHER_CURSOR_30

Other Cursor 31

OTHER_CURSOR_31

Other Cursor 32

OTHER_CURSOR_32

Other Cursor 33

OTHER_CURSOR_33

Other Cursor 34

OTHER_CURSOR_34

Other Cursor 35

OTHER_CURSOR_35

Other Cursor 36

OTHER_CURSOR_36

Other Cursor 37

OTHER_CURSOR_37

Other Cursor 38

OTHER_CURSOR_38

Other Cursor 39

OTHER_CURSOR_39

Other Cursor 40

OTHER_CURSOR_40

Other Cursor 41

OTHER_CURSOR_41

Other Cursor 42

OTHER_CURSOR_42

Other Cursor 43

OTHER_CURSOR_43

Other Cursor 44

OTHER_CURSOR_44

Other Cursor 45

OTHER_CURSOR_45

Other Cursor 46

OTHER_CURSOR_46

Other Cursor 47

OTHER_CURSOR_47

Other Cursor 48

OTHER_CURSOR_48

Other Cursor 49

OTHER_CURSOR_49

Other Cursor 50

OTHER_CURSOR_50

Other Cursor 51

OTHER_CURSOR_51

Other Cursor 52

OTHER_CURSOR_52

Other Cursor 53

OTHER_CURSOR_53

Other Cursor 54

OTHER_CURSOR_54

Other Cursor 55

OTHER_CURSOR_55

Other Cursor 56

OTHER_CURSOR_56

Other Cursor 57

OTHER_CURSOR_57

Other Cursor 58

OTHER_CURSOR_58

Other Cursor 59

OTHER_CURSOR_59

Other Cursor 60

OTHER_CURSOR_60

Other Cursor 61

OTHER_CURSOR_61

Other Cursor 62

OTHER_CURSOR_62

Other Cursor 63

OTHER_CURSOR_63

Other Cursor 64

OTHER_CURSOR_64

Other Cursor 65

OTHER_CURSOR_65

Other Cursor 66

OTHER_CURSOR_66

Other Cursor 67

OTHER_CURSOR_67

Other Cursor 68

OTHER_CURSOR_68

Other Cursor 69

OTHER_CURSOR_69

Blank Cursor

BLANK_CURSOR