SoView2DLabel¶
-
InventorModule
¶ genre View2DExtended
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoView2D
definition view2d.def see also SoView2D
,SoView2DAnnotation
,SoView2DVoxelValue
inherits from SoView2DExtension
keywords Label
,String
,Annotation
,Position
,Text
,Font
Purpose¶
This module shows a text label at a given world position in a 2D viewer.
Usage¶
Provide the world position and a string to display, and add this module into an OpenInventor scene before an SoView2D module.
Parameter Fields¶
Field Index¶
Visible Fields¶
Drawing On¶
-
name:
drawingOn
, type:
Bool
, default:
TRUE
¶ Determines if the label is shown or not.
see also SoView2DExtension.drawingOn
Editing On¶
-
name:
editingOn
, type:
Bool
, default:
FALSE
¶ If set, the label can be moved with the mouse cursor.
This is implemented with Managed Interaction. The pointing action is named “moveLabel”.
see also SoView2DExtension.editingOn
Snap to slice on drag¶
-
name:
fixZOn
, type:
Bool
, default:
TRUE
¶ If set, snap the world coordinate to the current slice on dragging (only if
Text Positioning
is WORLD_COORDINATES).
Color¶
-
name:
color
, type:
Color
, default:
1 1 1
¶ Text color of the label.
see also SoView2DExtension.color
Viewer Id¶
-
name:
viewerId
, type:
String
¶ The name of the viewer to display this label in. If you leave this empty, the label will be shown in every connected viewer that shows this world coordinates. Otherwise the label will only be shown in the SoView2D with this exact name.
Text Positioning¶
-
name:
textPositioning
, type:
Enum
, default:
WORLD_COORDINATES
¶ Defines how the text position set.
Values:
Title | Name | Description |
---|---|---|
World Coordinates | WORLD_COORDINATES | The position is set as world coordinates which are transformed to viewer space. |
Relative To Viewer | RELATIVE_TO_VIEWER | The position is set relative to the viewer’s visible device rectangle in [0..1]. |
World Position¶
-
name:
worldPosition
, type:
Vector3
, default:
0 0 0
¶ The position in world coordinates this label is referring to.
Relative Viewer Position¶
-
name:
relativeViewerPosition
, type:
Vector2
, default:
0.5 0.5
¶ Sets a relative viewer position for the text.
Keep Label In Viewer¶
-
name:
keepLabelInViewer
, type:
Bool
, default:
TRUE
¶ Keep the label inside the viewer even when its position is panned out of the viewer (only works when
World Position
is used).
Use Depth Visibility¶
-
name:
useDepthVisibility
, type:
Bool
, default:
FALSE
¶ Enables the depth visibility feature (only works when
World Position
is used).
Depth Visibility¶
-
name:
depthVisibility
, type:
Float
, default:
1
¶ Selects the distance of the depth visibility (in voxels or mm, depending on
Depth Visibility Mode
).
Depth Visibility Mode¶
-
name:
depthVisibilityMode
, type:
Enum
, default:
DEPTH_IN_SLICES
¶ Selects the units for
Depth Visibility
.
Values:
Title | Name | Description |
---|---|---|
Slices | DEPTH_IN_SLICES | Depth Visibility is given in number of slices. |
Mm | DEPTH_IN_MM | Depth Visibility is given in millimeters. |
Depth Minimum Alpha¶
-
name:
depthMinimumAlpha
, type:
Float
, default:
0
¶ Selects the minimum alpha that is used for depth visibility. If the label is outside of the depth visibility range, it will get this alpha value.
Show label on all time points¶
-
name:
showLabelOnAllTimePoints
, type:
Bool
, default:
TRUE
¶ If set, the label is shown for all time points, regardless of the value of
Time Point
.
Offset (verticalOffset)¶
-
name:
verticalOffset
, type:
Float
, default:
0
¶ The vertical offset (in device coordinates - that is pixels) to the world position to display the label at.
Vertical Position¶
-
name:
verticalPosition
, type:
Enum
, default:
POS_VCENTER
¶ Where to (vertically) put the label relative to the point described by
World Position
andOffset
.
Values:
Title | Name | Description |
---|---|---|
Above | POS_ABOVE | Position label so that it is just above the point. |
Vcenter | POS_VCENTER | Position label so that it is vertically centered over the point. |
Below | POS_BELOW | Position label so that it is just below the point. |
Offset (horizontalOffset)¶
-
name:
horizontalOffset
, type:
Float
, default:
0
¶ The horizontal offset (in device coordinates - that is pixels) to the world position to display the label at.
Horizontal Position¶
-
name:
horizontalPosition
, type:
Enum
, default:
POS_RIGHT
¶ Where to (horizontally) put the label relative to the point described by
World Position
andOffset
.
Values:
Title | Name | Description |
---|---|---|
Left | POS_LEFT | Position label so that it is just left of the point. |
Hcenter | POS_HCENTER | Position label so that it is horizontally centered over the point. |
Right | POS_RIGHT | Position label so that it is just right of the point. |
Font Size Mode¶
Values:
Title | Name | Description |
---|---|---|
Mm | FONT_SIZE_IN_MM | Font Size is given in millimeters. |
Pixels | FONT_SIZE_IN_PIXELS | Font Size is given in pixels. |
Voxels | FONT_SIZE_IN_VOXELS | Font Size is given in voxels (or, more precisely, in multiples of the width of a voxel). |
Alpha (alpha)¶
-
name:
alpha
, type:
Float
, default:
1
, minimum:
0
, maximum:
1
¶ Alpha (opacity) value of the label. 1 means the label obscures the image below completely, 0 means the label is invisible.
Draw text shadow¶
-
name:
textShadow
, type:
Bool
, default:
FALSE
¶ Whether to display a (black) text shadow. This can improve readability on bright images. The type of shadow depends on system settings.
Border Mode¶
-
name:
borderMode
, type:
Enum
, default:
SHOW_BORDER_OFF
, deprecated name:
drawBorderWhenHighlighted
¶ Defines the border mode of the background.
Values:
Title | Name | Deprecated Name | Description |
---|---|---|---|
Off | SHOW_BORDER_OFF | False | The background never has a border. |
When Highlighted | SHOW_BORDER_WHEN_HIGHLIGHTED | True | The background only has a border if the label is highlighted. |
Always | SHOW_BORDER_ALWAYS | The border of the background is always rendered. |
Border color¶
-
name:
borderColor
, type:
Color
, default:
1 1 1
¶ Border color of the label (only works when
Border Mode
is not set to SHOW_BORDER_OFF).
Background¶
-
name:
backgroundColor
, type:
Color
, default:
0 0 0
¶ Background color of the label (only works when
Draw Background
is used).
Draw Background¶
-
name:
drawBackground
, type:
Bool
, default:
FALSE
¶ Determines if the background is shown or not.
Alpha (backgroundAlpha)¶
-
name:
backgroundAlpha
, type:
Float
, default:
1
, minimum:
0
, maximum:
1
¶ Alpha (opacity) value of the background. 1 means the label obscures the image below completely, 0 means the label is invisible (only works when
Draw Background
is used).