So3DMarkerEditor

InventorModule

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

dll

So3DXMarker

definition

So3DMarkerEditor.def

see also

XMarkerListContainer, SoView2DMarkerEditor

keywords

markerlist, vector, interaction, SoMarker, SoXMarker

Purpose

The module So3DMarkerEditor displays markers in 3D and allows for interactively editing the markers.

If you do not want to interact with the markers, then the So3DMarkerRenderer provides a faster alternative.

Usage

Since the module has an Open Inventor output, simply plug it into any kind of viewer. To synchronize the module with any other module that governs an XMarkerList, plug its output into the So3DMarkerEditor’s input.

If there should be interactive placement and editing of the markers, also plug the Open Inventor scene to work on into the corresponding module’s input. A StylePalette module can provide style information for the markers. At last, if there should be voxel position information displayed, make sure to connect a SoMLWorldToVoxel module to the matrix transformation input.

The most of the parameters available on the panel and the overall user interaction were designed to be as conform as possible with the user interface and usage of the well known SoView2DMarkerEditor.

Interaction

The interaction is supposed to be as close as possible to the 2D interaction. While having a 2D input and output device, the interaction in 3D has to be limited in some way. In this approach, we are limited to the surface of objects. However, with the options Edit 3D and Edit 3D vector checked, the markers can be moved in 3D along the x, y, or z axis.

The only draw mode that fully supports interaction is the Geometry mode.

Tips

If you are only interested in rendering many markers as spheres, then have a look at the SoPointSpriteRenderer and its example network.

Windows

Default Panel

../../../Modules/Inventor/So3DMarkerEditor/mhelp/Images/Screenshots/So3DMarkerEditor._default.png

Input Fields

stylePalette

name: stylePalette, type: StylePalette(MLBase), deprecated name: inputStylePalette

Optional style palette for unified rendering styles.

inputNode

name: inputNode, type: SoNode

Attach the Open Inventor scene on which picking should be performed to this input.

inputMatrixTransform

name: inputMatrixTransform, type: SoNode

Optional input for a matrix to render the texts at the correct location.

inXMarkerList

name: inXMarkerList, type: ListBase(MLBase), deprecated name: inputXMarkerList

The XMarkerList to interact with.

Output Fields

self

name: self, type: SoNode

outXMarkerList

name: outXMarkerList, type: XMarkerList(MLBase), deprecated name: outputXMarkerList

For accessing this object via scripting, see the Scripting Reference: MLXMarkerListWrapper.

outputMLModule (hidden)

name: outputMLModule, type: MLBase

Parameter Fields

Field Index

actionClass: String

Enable selection: Bool

numItems: Integer

actionId: Integer

Font Size: Integer

overflowMode: Enum

actionIndex: Integer

Geometry Complexity: Enum

ownsList: Bool

add: Trigger

Global Color: Color

Perform pre-hit test: Bool

Add on click: Bool

id: Integer

persistent: Bool

Ambient Color: Color

index: Integer

posC: Float

applySelect: Bool

insert: Trigger

posT: Float

Background: Color

interactionProviderID: String

posU: Float

clear: Trigger

Length: Float

posXYZ: Vector3

Color: Color

Line Style: Enum

Scale: Float

Color Mode (colorMode): Enum

listString: String

Shadow: Bool

Color Mode (textColorMode): Enum

listStringEnable: Bool

Specular Color: Color

copyItemToTemplate: Trigger

Marker Type For New Markers: Integer

Text Background Alpha: Float

copyTemplateToItem: Trigger

maxSize: Integer

Timepoint to Render (-1=all): Integer

currentIndex: Integer

Mode: Enum

type: Integer

cursorShape: Enum

name: String

update: Trigger

delete: Trigger

newName: String

upToDate: Bool

Delete All Markers: Trigger

newPosC: Float

Use Managed Interaction mode: Bool

Delete on click: Bool

newPosT: Float

useInsertTemplate: Bool

Draw markers: Bool

newPosU: Float

validStylePalette: Bool

Draw Mode: Enum

newPosXYZ: Vector3

vecLength: Float

Edit 3D: Bool

newType: Integer

Vector Draw Mode: Enum

Edit 3D vector: Bool

newVecXYZ: Vector3

Vector edit mode: Bool

Enable editing: Bool

Num Markers Threshold For Fast Rendering: Integer

vecXYZ: Vector3

Visible Fields

Scale

name: scaleSize, type: Float, default: 1, minimum: 0, maximum: 10

Sets an overall scale factor for each marker.

Length

name: scaleLength, type: Float, default: 1, minimum: 0, maximum: 100

Sets an overall scale factor for the vectors’ lengths.

Global Color

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

Sets a global color if no StylePalette is used.

Ambient Color

name: ambientColor, type: Color, default: 0 0 0

Sets the ambient color.

Specular Color

name: specularColor, type: Color, default: 0.300000011920929 0.300000011920929 0.300000011920929

Sets the specular color.

Vector edit mode

name: enableVector, type: Bool, default: FALSE

If checked, vector markers can be edited.

Click onto a 3D surface to place the first markers and without releasing the mouse button, drag on the surface to define the marker vector’s end point.

Draw markers

name: drawingOn, type: Bool, default: TRUE

If checked, the markers are rendered in 3D.

Enable editing

name: editingOn, type: Bool, default: TRUE

If checked, editing is possible.

Enable selection

name: selectingOn, type: Bool, default: TRUE

If checked, the clicking on a set marker selects it.

Delete on click

name: deleteOnClick, type: Bool, default: FALSE

If checked, the clicked marker is deleted on click.

Add on click

name: addOnClick, type: Bool, default: TRUE

If checked, a new marker is added on clicking on a 3D surface.

Edit 3D

name: edit3DOn, type: Bool, default: FALSE

If checked, the markers offer handles to freely position them in 3D.

Otherwise, a marker can only be placed and moved along a 3D surface.

Edit 3D vector

name: edit3DVector, type: Bool, default: FALSE

If checked, the vector portion of a marker can be edited in 3D.

Use Managed Interaction mode

name: useManagedInteraction, type: Bool, default: TRUE

If checked, use Managed Interaction event handling, which, e.g., allows for overriding the mouse button/modifier key combination for this module with SoInteractionMapping.

This mode also allows for setting the cursor shape for this tool through cursorShape.

Edit 3D and Edit 3D vector are not available in this mode.

Perform pre-hit test

name: performPreHitTest, type: Bool, default: FALSE

If checked, a hit test is performed while hovering (only if Use Managed Interaction mode is used).

This allows for adapting the cursor while over eligible surfaces or markers and may allow other interactions to use the same button combination (when not over a surface or marker). A slight performance penalty may be introduced by this, though.

Color Mode (colorMode)

name: colorMode, type: Enum, default: COLOR_BY_TYPE

Defines the color lookup into the StylePalette.

Values:

Title

Name

Description

Index

COLOR_BY_INDEX

The index of the marker is used as a lookup.

Type

COLOR_BY_TYPE

The type of the marker is used as a lookup.

Id

COLOR_BY_ID

The ID of the marker is used as a lookup.

Marker Type For New Markers

name: markerType, type: Integer, default: 0

Sets the type of the next generated marker.

Color Mode (textColorMode)

name: textColorMode, type: Enum, default: COLOR_TEXT

Defines the mode of the text color.

Values:

Title

Name

Description

Like Marker

COLOR_LIKE_MARKER

The text has the same color as the marker itself.

Text

COLOR_TEXT

The text has the color set in Color.

Mode

name: textMode, type: Enum, default: TEXT_OFF

Defines which information is displayed as a text besides a marker.

Text is always drawn on top of other elements with the help of SoAnnotation nodes. This uses the delayed render path, which must be specifically activated when used below a SoViewportRegion (set SoViewportRegion.renderDelayedPaths).

Values:

Title

Name

Description

Off

TEXT_OFF

No text is displayed.

Styleindex

TEXT_STYLEINDEX

The index into the StylePalette is displayed.

Stylename

TEXT_STYLENAME

The name of the used style of the StylePalette is displayed.

Itemname

TEXT_ITEMNAME

The name associated with the marker is displayed.

Itemid

TEXT_ITEMID

The ID of the marker is displayed.

Voxelpos

TEXT_VOXELPOS

The voxel position is displayed.

Worldpos

TEXT_WORLDPOS

The world position is displayed.

Length

TEXT_LENGTH

The length of a vector is displayed.

Markertype

TEXT_MARKERTYPE

The type of the marker is displayed.

Markerlistindex

TEXT_MARKERLISTINDEX

The index of the marker is displayed.

Color

name: textColor, type: Color, default: 1 1 1

Sets the color of the text.

Shadow

name: textShadow, type: Bool, default: TRUE

If checked, a shadow is rendered behind the text to enhance readability.

Background

name: textBackgroundColor, type: Color, default: 0.5 0.5 0.5

Sets the color of the label in the background of the text.

Text Background Alpha

name: textBackgroundAlpha, type: Float, default: 0.30000001, minimum: 0, maximum: 1

Sets the alpha value of the label in the background of the text.

Font Size

name: textFontSize, type: Integer, default: 10

Selects the font size in pixels.

Vector Draw Mode

name: vectorArrow, type: Enum, default: VECTOR_NO_ARROWS

Defines the style of the vectors.

Values:

Title

Name

Vector No Arrows

VECTOR_NO_ARROWS

Vector End Arrow

VECTOR_END_ARROW

Vector Start Arrow

VECTOR_START_ARROW

Vector Both Arrows

VECTOR_BOTH_ARROWS

Vector Plus Minus

VECTOR_PLUS_MINUS

Vector Pm With Arr

VECTOR_PM_WITH_ARR

Box Start To End

BOX_START_TO_END

Box Plus Minus

BOX_PLUS_MINUS

Vector And Sphere

VECTOR_AND_SPHERE

Vector And Disc

VECTOR_AND_DISC

No Vector

NO_VECTOR

Line Style

name: lineStyle, type: Enum, default: Solid

Defines the line style of the vectors.

Values:

Title

Name

None

None

Solid

Solid

Dashed

Dashed

Dotted

Dotted

Draw Mode

name: drawMode, type: Enum, default: DrawModeGeometry

Defines the overall drawing mode.

Values:

Title

Name

Deprecated Name

Description

Points

DrawModePoints

DrawModeFast

The markers are rendered as OpenGL points. This is very fast, especially for a large number of markers but style information will get lost.

Interaction is currently limited to adding new markers, other interactions are not supported.

Geometry

DrawModeGeometry

DrawModeCorrect

The markers are rendered as simple Open Inventor scenes. This can produce many polygons, slowing down the rendering but all style information is used for the rendering.

This is currently the only mode which supports full interaction with the rendered markers.

Point Sprites

DrawModePointSprites

The markers are rendered as spheres, using the point sprite renderer. The Scale is interpreted as millimeters.

Interaction is currently limited to adding new markers, other interactions are not yet supported.

Geometry Complexity

name: geometryComplexity, type: Enum, default: LOW

Defines the complexity of the rendered geometry.

Values:

Title

Name

Very Low

VERY_LOW

Low

LOW

Medium

MEDIUM

High

HIGH

Very High

VERY_HIGH

Num Markers Threshold For Fast Rendering

name: numMarkersThresholdForFastRendering, type: Integer, default: 5000

Sets a threshold for the number of markers for deciding the draw mode.

If the field’s value is negative, no automatic adjustment to the draw mode is made.

Otherwise, if the number of markers exceed the threshold value, the module switched automatically from CORRECT mode to FAST mode.

Timepoint to Render (-1=all)

name: timepointToRender, type: Integer, default: -1

Sets the time point to render; -1 means all time points.

Delete All Markers

name: deleteAll, type: Trigger

When pressed, all stored markers are being deleted.

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

validStylePalette

name: validStylePalette, type: Bool, persistent: no

cursorShape

name: cursorShape, type: Enum, default: UNDEFINED_CURSOR

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

listString

name: listString, type: String

numItems

name: numItems, type: Integer, persistent: no

index

name: index, type: Integer, default: 0

persistent

name: persistent, type: Bool, default: FALSE

listStringEnable

name: listStringEnable, type: Bool, default: FALSE

ownsList

name: ownsList, type: Bool, persistent: no

applySelect

name: applySelect, type: Bool, default: FALSE

id

name: id, type: Integer, persistent: no

name

name: name, type: String

newName

name: newName, type: String

actionClass

name: actionClass, type: String, persistent: no

actionIndex

name: actionIndex, type: Integer, persistent: no

actionId

name: actionId, type: Integer, persistent: no

currentIndex

name: currentIndex, type: Integer, persistent: no

overflowMode

name: overflowMode, type: Enum, default: None

Values:

Title

Name

None

None

Remove First

RemoveFirst

Remove Last

RemoveLast

Remove All

RemoveAll

Remove New

RemoveNew

maxSize

name: maxSize, type: Integer, default: 0

delete

name: delete, type: Trigger

insert

name: insert, type: Trigger

add

name: add, type: Trigger

update

name: update, type: Trigger

useInsertTemplate

name: useInsertTemplate, type: Bool, default: FALSE

copyItemToTemplate

name: copyItemToTemplate, type: Trigger

copyTemplateToItem

name: copyTemplateToItem, type: Trigger

clear

name: clear, type: Trigger

upToDate

name: upToDate, type: Bool, persistent: no

posXYZ

name: posXYZ, type: Vector3, default: 0 0 0

posC

name: posC, type: Float, default: 0

posT

name: posT, type: Float, default: 0

posU

name: posU, type: Float, default: 0

vecXYZ

name: vecXYZ, type: Vector3, default: 0 0 0

vecLength

name: vecLength, type: Float, persistent: no

type

name: type, type: Integer, default: 0

newPosXYZ

name: newPosXYZ, type: Vector3, default: 0 0 0

newPosC

name: newPosC, type: Float, default: 0

newPosT

name: newPosT, type: Float, default: 0

newPosU

name: newPosU, type: Float, default: 0

newVecXYZ

name: newVecXYZ, type: Vector3, default: 0 0 0

newType

name: newType, type: Integer, default: 0