SoView2DMarkerEditor

InventorModule
genre Interaction
author Florian Link
package MeVisLab/Standard
dll SoView2D
definition view2d.def
see also SoView2D, StylePalette
keywords draw, markerlist, vector, seed, point, pixel, extension, xmarker, sphere, box

Purpose

The module SoView2DMarkerEditor allows for an interactive placement, editing and showing of markers on a 2D viewer.

Details

If the module is used alone, it also contains the marker list; otherwise, if there are more marker editors or marker list container modules present, and they are connected, they all share one marker list.

Tips

If a StylePalette is attached to set the marker type with it, make sure to check the field Use icon file.

A standard icon file comes with the SoView2DMarkerEditor, but if custom markers should be used, an own icon file can be provided via Icon File. The icon file needs to be in TIF format and contain all the icons in 32x32 pixel format. Multiple icons needs to be arranged horizontally; so an icon file containing 10 markers has the size 320x32.

Windows

Default Panel

../../../Modules/Inventor/SoView2D/mhelp/Images/Screenshots/SoView2DMarkerEditor._default.png

Input Fields

stylePalette

name: stylePalette, type: MLBase

Optional input of a style palette.

inXMarkerList

name: inXMarkerList, type: MLBase, deprecated name: inputXMarkerList

Optional input of a marker list.

Output Fields

self

name: self, type: SoNode

outXMarkerList

name: outXMarkerList, type: MLBase, deprecated name: outputXMarkerList

outputMLModule (hidden)

name: outputMLModule, type: MLBase

Parameter Fields

Field Index

actionClass: String fixZOn: Bool posXYZ: Vector3
actionId: Integer Highlight Selection: Bool React on button release event only: Bool
actionIndex: Integer Icon File: String renderOnSlab: Bool
add: Trigger Icon Index: Integer Selecting on: Bool
Add on click: Bool id: Integer Selection boxes for current only: Bool
Alpha Factor: Float ignoreHandledEvents: Bool Selective Drawing: Bool
applySelect: Bool index: Integer Set to create mode: Bool
clear: Trigger insert: Trigger setEventHandled: Bool
clipToSlice: Bool internalIconFile: String Show text only for selected marker: Bool
Color: Color List Size: Integer Size: Float
Color Mode: Enum listString: String Snap to current slice: Bool
Cooperative: Bool listStringEnable: Bool Snap to voxel: Bool
copyItemToTemplate: Trigger maskValid: Bool Text Color: Color
copyTemplateToItem: Trigger Max Size: Integer Text Color Mode: Enum
Create: Trigger Max. Num. of Lines: Integer Text Font Size: Integer
Current: Integer Minimum Alpha: Float Text Mode: Enum
Current Style Index: Integer name: String Text Position: Enum
Current Type: Integer needsValidVoxel: Bool Text shadow: Bool
Currently busy: Bool newName: String Timepoint: Integer
cursorShape: Enum newPosC: Float type: Integer
Cut text: Bool newPosT: Float update: Trigger
delete: Trigger newPosU: Float upToDate: Bool
Delete All: Trigger newPosXYZ: Vector3 Use anti-aliasing: Bool
Delete on click: Bool newType: Integer Use icon file: Bool
Depth Visibility: Float newVecXYZ: Vector3 Use Vector Length As Marker Size: Bool
Depth Visibility Mode: Enum Overflow Mode: Enum useInsertTemplate: Bool
Depth Visualization Mode: Enum Overwrite Current Time Point: Bool Vector Draw Mode: Enum
Draw Marker Shapes With Lines: Bool ownsList: Bool Vector Line Width: Integer
Draw Mode: Enum Persistent: Bool vecXYZ: Vector3
Drawing on: Bool posC: Float wantsAllEvents: Bool
Editing on: Bool posT: Float wantsKeyEvents: Bool
Editor Mode: Enum posU: Float wantsMouseWheelEvents: Bool

Visible Fields

Drawing on

name: drawingOn, type: Bool, default: TRUE

If checked, markers are rendered onto a viewer.

Editing on

name: editingOn, type: Bool, default: TRUE

If checked, markers can be interactively edited.

Color

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

Sets a general marker color if not overwritten by an attached StylePalette.

Size

name: selectionTolerance, type: Float, default: 4, minimum: 2, maximum: 40, deprecated name: selectDistance

Sets a general marker size if not overwritten by an attached StylePalette.

Set to create mode

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).

Create

name: createNewModeRequest, type: Trigger

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

Depth Visibility

name: depthVisibility, type: Float, default: 1, minimum: 0

Sets the depth visibility (in slices or in mm).

Markers (and vectors) not on the currently visible slice are drawn with some alpha attenuation. The depth visibility also controls in which depth the user can still interact with markers: if a marker is visible, one can interact with it. A value of 0.0 means that the marker is only visible on the slice it has been drawn on.

Snap to voxel

name: snapToVoxel, type: Bool, default: TRUE

If checked, all created or moved markers are placed into the middle of the next fitting voxel.

Snap to current slice

name: snapToSlice, type: Bool, default: TRUE

If checked, this is the same as Snap to voxel, only that is works for the z-dimension and not only for the x- and y-dimensions.

If turned of, it is possible to edit a marker in the depth without altering its z-coordinate.

Current Type

name: currentType, type: Integer, default: 0

Sets the current marker type.

This information is stored in each created marker and can be used in conjunction with the StylePalette.

Delete on click

name: deleteOnClick, type: Bool, default: FALSE

If checked, a click on an existing marker deletes it.

Add on click

name: addOnClick, type: Bool, default: TRUE

If checked, the module adds a new marker if clicked somewhere outside existing markers.

Otherwise and if Delete on click is not checked, the existing marker is being selected.

Alpha Factor

name: alphaFactor, type: Float, default: 1, minimum: 0, maximum: 1

Sets a global alpha factor.

Minimum Alpha

name: minimumAlpha, type: Float, default: 0.1, minimum: 0, maximum: :field:`alphaFactor`

This value is used as minimum alpha value for markers.

Icon File

name: iconFile, type: String, default: $(MLAB_MeVisLab_Standard)/Modules/Resources/Images/markerIcons.tif

Sets a path to an icon file.

Use icon file

name: useIconFile, type: Bool, default: FALSE

If checked, the icons specified in Icon File are used to render the markers.

The icons are chosen on base of the marker's type.

Note that you have to use a StylePalette in order to make use of the icon files.

Icon Index

name: iconIdx, type: Integer, default: 0

Sets an offset value for using the icons read from a file.

Default is 0, meaning that all markers from index 0 on are visualized with the loaded icons.

Draw Marker Shapes With Lines

name: drawMarkerShapesWithLines, type: Bool, default: FALSE

If checked, the marker shapes defined in an attached style palette are rendered with OpenGL lines. If not checked, the textures of the loaded icon file are used.

Selecting on

name: selectingOn, type: Bool, default: TRUE

If checked, existing markers can be selected.

React on button release event only

name: actOnReleaseOnly, type: Bool, default: FALSE

If checked, the module only reacts on button releases and not on button presses.

This can be used to reduce the number of notifications in a network or to let other modules only compute anew if the interaction with a marker is finished.

Editor Mode

name: editorMode, type: Enum, default: EDIT_MARKER

Defines the editor mode.

Values:

Title Name
Marker EDIT_MARKER
Vector EDIT_VECTOR
Object EDIT_OBJECT

Color Mode

name: colorMode, type: Enum, default: COLOR_BY_TYPE

Defines the color mode.

Values:

Title Name
Index COLOR_BY_INDEX
Type COLOR_BY_TYPE
Id COLOR_BY_ID

Text Color Mode

name: textColorMode, type: Enum, default: COLOR_TEXT

Defines the text color mode.

Values:

Title Name
Like Marker COLOR_LIKE_MARKER
Text COLOR_TEXT

Text Mode

name: textMode, type: Enum, default: TEXT_OFF

Defines the text mode.

Values:

Title Name
Off TEXT_OFF
Styleindex TEXT_STYLEINDEX
Stylename TEXT_STYLENAME
Itemname TEXT_ITEMNAME
Itemid TEXT_ITEMID
Voxelpos TEXT_VOXELPOS
Worldpos TEXT_WORLDPOS
Length TEXT_LENGTH
Markertype TEXT_MARKERTYPE
Markerlistindex TEXT_MARKERLISTINDEX

Text Position

name: textPosition, type: Enum, default: TEXT_POSITION_RIGHT_BELOW

Defines the text position if text is displayed.

Values:

Title Name
Center TEXT_POSITION_CENTER
Above TEXT_POSITION_ABOVE
Right Above TEXT_POSITION_RIGHT_ABOVE
Right TEXT_POSITION_RIGHT
Right Below TEXT_POSITION_RIGHT_BELOW
Below TEXT_POSITION_BELOW
Left Below TEXT_POSITION_LEFT_BELOW
Left TEXT_POSITION_LEFT
Left Above TEXT_POSITION_LEFT_ABOVE

Text Color

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

Sets a color for text, depending on Text Color Mode.

Text shadow

name: textShadow, type: Bool, default: TRUE

If checked, a shadow is rendered behind the text.

Text Font Size

name: textFontSize, type: Integer, default: 12

Sets the size of the text.

Show text only for selected marker

name: showTextOnlyForSelectedMarker, type: Bool, default: FALSE

If checked, a text is only displayed for the selected marker.

Cut text

name: cutText, type: Bool, default: FALSE

If checked, the text may have only that many lines before being cut as the field Max. Num. of Lines allows.

Max. Num. of Lines

name: maxNumberOfLines, type: Integer, default: 1

Sets the maximum number of lines for the text.

Vector Draw Mode

name: vectorArrow, type: Enum, default: VECTOR_END_ARROW

Defines the vector draw mode.

Only affects vector markers.

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 Line Width

name: vectorLineWidth, type: Integer, default: 1, minimum: 1, maximum: 8

Sets the line width for vectors in range [1..8].

Use anti-aliasing

name: useAntiAlias, type: Bool, default: TRUE

If checked, all markers and vectors are rendered using anti-aliasing.

Use Vector Length As Marker Size

name: useVectorLengthAsMarkerSize, type: Bool, default: FALSE

If checked, and markers with vectors are rendered as markers, the size of the markers will be half the length of the vector.

Otherwise, the marker will just have the set marker's size.

Current Style Index

name: currentStyleIndex, type: Integer, persistent: no

Shows the style index of the currently selected marker or a -1 if no marker is selected.

Depth Visualization Mode

name: depthVectorDrawMode, type: Enum, default: DRAW_HIGHLIGHT_SLICE_SEGMENT

Defines how vectors are rendered if crossed by the current slice.

Values:

Title Name Description
None DRAW_NONE Vectors not lying in the current slice (crossing the current slice) are not rendered at all.
Highlight Slice Segment DRAW_HIGHLIGHT_SLICE_SEGMENT

Vectors crossed by the current slice are rendered as:

  • normal below the current slice
  • bold on the current slice
  • stippled above the current slice

Draw Mode

name: drawMode, type: Enum, default: DRAW_MARKER

Defines the draw mode for markers and vectors.

Values:

Title Name
Vector DRAW_VECTOR
Marker DRAW_MARKER
Disc DRAW_DISC
Sphere DRAW_SPHERE
Vector And Disc DRAW_VECTOR_AND_DISC

Highlight Selection

name: highlightSelection, type: Bool, default: TRUE

If checked, the selected marker will be rendered highlighted.

Selective Drawing

name: selectiveDrawing, type: Bool, default: FALSE

If checked, only the selected marker is rendered as a vector.

All other markers, even if they are vectors are rendered as just markers.

Selection boxes for current only

name: selectionBoxesForCurrentOnly, type: Bool, default: FALSE

If checked, only the selected marker vector is rendered with selection boxes at the start and the end.

All other vectors are rendered just as vectors.

Cooperative

name: cooperative, type: Bool, default: FALSE

If checked, the module does not evaluate events marked by other modules as being handled.

Currently busy

name: busy, type: Bool, persistent: no

Shows if the module is currently busy.

Overwrite Current Time Point

name: overwriteCurrentTimePoint, type: Bool, default: FALSE

If checked, the currently shown time point in the viewer is being overwritten by the time point given in Timepoint.

Timepoint

name: newCurrentTimePoint, type: Integer, default: 0

Sets the new current time for the viewer.

Depth Visibility Mode

name: depthVisibilityMode, type: Enum, default: DEPTH_IN_SLICES

Defines the unit used in depth visibility of markers and vectors.

Values:

Title Name
Slices DEPTH_IN_SLICES
Mm DEPTH_IN_MM

List Size

name: numItems, type: Integer, persistent: no

Shows the number of markers in the marker list.

Persistent

name: persistent, type: Bool, default: FALSE

If checked, the internal marker list is saved with saving the network where the SoView2DMarkerEditor is in.

Current

name: currentIndex, type: Integer, persistent: no

Shows the index of the currently selected marker or -1 if no marker is selected.

Overflow Mode

name: overflowMode, type: Enum, default: None

Defines the overflow mode that handles how an additional marker is treated if the maximum size of the marker list is reached.

Values:

Title Name
None None
Remove First RemoveFirst
Remove Last RemoveLast
Remove All RemoveAll
Remove New RemoveNew

Max Size

name: maxSize, type: Integer, default: 0

Sets the maximum size of the marker list. Size 0 means unlimited markers.

See also Overflow Mode.

Delete All

name: deleteAll, type: Trigger

If pressed, all markers are deleted.

Hidden Fields

maskValid

name: maskValid, type: Bool, default: FALSE

fixZOn

name: fixZOn, type: Bool, default: TRUE

needsValidVoxel

name: needsValidVoxel, type: Bool, default: TRUE

wantsAllEvents

name: wantsAllEvents, type: Bool, default: FALSE

wantsKeyEvents

name: wantsKeyEvents, type: Bool, default: TRUE

wantsMouseWheelEvents

name: wantsMouseWheelEvents, type: Bool, default: FALSE

setEventHandled

name: setEventHandled, type: Bool, default: FALSE

ignoreHandledEvents

name: ignoreHandledEvents, type: Bool, default: FALSE

renderOnSlab

name: renderOnSlab, type: Bool, default: FALSE

clipToSlice

name: clipToSlice, type: Bool, default: FALSE

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
Lut Cursor LUT_CURSOR
Slicing Cursor SLICING_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 1 Cursor LUT_1_CURSOR
Lut 2 Cursor LUT_2_CURSOR
Lut 3 Cursor LUT_3_CURSOR

internalIconFile

name: internalIconFile, type: String

listString

name: listString, type: String

index

name: index, type: Integer, default: 0

listStringEnable

name: listStringEnable, type: Bool, default: FALSE

ownsList

name: ownsList, type: Bool, default: TRUE

applySelect

name: applySelect, type: Bool, default: FALSE

id

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

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

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, default: TRUE

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

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

Table Of Contents