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¶
The module SoView2DLabel
displays 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 Open Inventor scene before an SoView2D
module.
Parameter Fields¶
Field Index¶
Visible Fields¶
Drawing On¶
-
name:
drawingOn
, type:
Bool
, default:
TRUE
¶ If checked, the label is rendered.
see also SoView2DExtension.drawingOn
Editing On¶
-
name:
editingOn
, type:
Bool
, default:
FALSE
¶ If checked, 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 checked, the world coordinate is snapped to the current slice on dragging (only if
Text Positioning
is WORLD_COORDINATES).
Color¶
-
name:
color
, type:
Color
, default:
1 1 1
¶ Sets the text color of the label.
see also SoView2DExtension.color
Viewer Id¶
-
name:
viewerId
, type:
String
¶ Sets 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
¶ Sets 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
¶ If checked, the label is kept 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
¶ If checked, the depth visibility feature is enabled.
This only works if
World Position
is used.
Depth Visibility¶
-
name:
depthVisibility
, type:
Float
, default:
1
¶ Sets the distance of the depth visibility (in voxels or millimeters, depending on
Depth Visibility Mode
).
Depth Visibility Mode¶
-
name:
depthVisibilityMode
, type:
Enum
, default:
DEPTH_IN_SLICES
¶ Defines 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
¶ Sets 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.
Time Point¶
-
name:
timePoint
, type:
Integer
, default:
0
¶ Sets the time point at which to show this label.
Show label on all time points¶
-
name:
showLabelOnAllTimePoints
, type:
Bool
, default:
TRUE
¶ If checked, the label is shown for all time points, regardless of the value of
Time Point
.
Offset (verticalOffset)¶
-
name:
verticalOffset
, type:
Float
, default:
0
¶ Sets 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
¶ Defines 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
¶ Sets 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
¶ Defines 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
¶ Sets the 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
¶ If checked, a (black) text shadow is displayed.
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
¶ Sets the 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
¶ Sets the background color of the label (only works when
Draw Background
is used).
Draw Background¶
-
name:
drawBackground
, type:
Bool
, default:
FALSE
¶ If checked, the background is shown.
Alpha (backgroundAlpha)¶
-
name:
backgroundAlpha
, type:
Float
, default:
1
, minimum:
0
, maximum:
1
¶ Sets an 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).