SoView2DLegend

InventorModule
genre View2DExtended
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoView2D
definition view2d.def
see also SoView2D, SoView2DAnnotation, SoView2DContour
inherits from SoView2DExtension
keywords Contour, Annotation

Purpose

The module SoView2DLegend displays a legend of values, lines styles and colors.

This module is meant to be used in conjunction with the SoView2DContour module, but can also be used to display other, similar information.

Details

The field Legend String is the interface to fill the legend with information. It expects a list (separated by white spaces) of items.

An item must have the form:

$(item rr gg bb line_width line_stipple <user_text>)

Where:

rr           = red   channel (0..255)
gg           = green channel (0..255)
bb           = blue  channel (0..255)

line_width   = in screen pixel
line_stipple = OpenGL stipple pattern (0..65535)

<user_text>  = some string that is displayed (this could be a
               threshold value, as in the example network)

Windows

Default Panel

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

Output Fields

self

name: self, type: SoNode

Parameter Fields

Field Index

Alignment: Enum cursorShape: Enum maskValid: Bool
alt: Enum Draw box: Bool needsValidVoxel: Bool
Box Color: Color drawingOn: Bool renderOnSlab: Bool
button1: Enum editingOn: Bool selectionTolerance: Float
button2: Enum fixZOn: Bool setEventHandled: Bool
button3: Enum Font Size: Enum shift: Enum
clipToSlice: Bool ignoreHandledEvents: Bool Show: Bool
color: Color interactionProviderID: String Text shadow: Bool
control: Enum Legend Format: Enum wantsAllEvents: Bool
createNewMode: Bool Legend String: String wantsKeyEvents: Bool
createNewModeRequest: Trigger Margin: Float wantsMouseWheelEvents: Bool

Visible Fields

Show

name: showLegend, type: Bool, default: TRUE

If checked, the legend is displayed. The Legend String must be non-empty.

Text shadow

name: textShadow, type: Bool, default: TRUE

If checked, a shadow is rendered behind the text.

Legend String

name: legendString, type: String

Sets a list of items of the form $(item rr gg bb line_width line_stipple <user_text>).

Font Size

name: legendFontSize, type: Enum, default: AUTO_SIZE_LEGEND

Defines the font size of the legend.

Values:

Title Name Description
Auto Size Legend AUTO_SIZE_LEGEND The font size is automatically chosen on base of the viewer’s size.
Small Legend SMALL_LEGEND A small font size.
Medium Legend MEDIUM_LEGEND A medium font size.
Large Legend LARGE_LEGEND A large font size.

Alignment

name: legendAlignment, type: Enum, default: LEGEND_BOTTOM

Defines where the legend is displayed in the viewer.

Values:

Title Name
Top LEGEND_TOP
Bottom LEGEND_BOTTOM
Left LEGEND_LEFT
Right LEGEND_RIGHT

Legend Format

name: legendFormat, type: Enum, default: TEXT_LINE

Defines the format of the legend entries.

Values:

Title Name Description
Text Line TEXT_LINE Text first, line sample second.
Line Text LINE_TEXT Line sample first, text second.

Margin

name: margin, type: Float, default: 0, minimum: 0, maximum: 100

Sets a margin value in pixel.

Draw box

name: drawTheBox, type: Bool, default: TRUE

If checked, a box is drawn as a background behind the legend. The size of the box scales with the number of displayed items.

Box Color

name: boxColor, type: Color, default: 0.200000002980232 0.200000002980232 0.699999988079071

Sets the color of the optional box around the legend items.

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

see SoView2DExtension.interactionProviderID

drawingOn

name: drawingOn, type: Bool, default: TRUE

see SoView2DExtension.drawingOn

editingOn

name: editingOn, type: Bool, default: TRUE

see SoView2DExtension.editingOn

maskValid

name: maskValid, type: Bool, persistent: no

fixZOn

name: fixZOn, type: Bool, default: TRUE

color

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

see SoView2DExtension.color

selectionTolerance

name: selectionTolerance, type: Float, default: 4, deprecated name: selectDistance

needsValidVoxel

name: needsValidVoxel, type: Bool, default: TRUE

see SoView2DExtension.needsValidVoxel

button1

name: button1, type: Enum, default: IGNORED

see SoView2DExtension.button1

button2

name: button2, type: Enum, default: IGNORED

see SoView2DExtension.button2

button3

name: button3, type: Enum, default: IGNORED

see SoView2DExtension.button3

shift

name: shift, type: Enum, default: IGNORED

see SoView2DExtension.shift

control

name: control, type: Enum, default: IGNORED

see SoView2DExtension.control

alt

name: alt, type: Enum, default: IGNORED

see SoView2DExtension.alt

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

see SoView2DExtension.setEventHandled

ignoreHandledEvents

name: ignoreHandledEvents, type: Bool, default: FALSE

see SoView2DExtension.ignoreHandledEvents

createNewMode

name: createNewMode, type: Bool, default: FALSE

see SoView2DExtension.createNewMode

createNewModeRequest

name: createNewModeRequest, type: Trigger

see SoView2DExtension.createNewModeRequest

renderOnSlab

name: renderOnSlab, type: Bool, default: FALSE

clipToSlice

name: clipToSlice, type: Bool, default: FALSE

cursorShape

name: cursorShape, type: Enum, default: UNDEFINED_CURSOR

see SoView2DExtension.cursorShape