SoView2DRectangle

InventorModule
genre Interaction
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoView2D
definition view2d.def
see also SoView2D
inherits from SoView2DExtension
keywords cut, select, extension

Purpose

The module SoView2DRectangle allows for a drawing and interactive adjustment of a 2D rectangle in a 2D viewer.

It is also possible to add a text label to the box.

Note: although this mode is called SoView2D*Rectangle*, it actually draws a 3D box.

Interaction

Click and drag with the adjusted key modifier and mouse button to span a rectangle.

The first click determines the start position and the end position is set on a release event.

Windows

Default Panel

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

Output Fields

self

name: self, type: SoNode

Parameter Fields

Visible Fields

Drawing On

name: drawingOn, type: Bool, default: TRUE

If checked, the 3D box is drawn.

see also SoView2DExtension.drawingOn

Editing On

name: editingOn, type: Bool, default: TRUE

If checked, the 3D box can interactively be edited.

see also SoView2DExtension.editingOn

Fix Z

name: fixZOn, type: Bool, default: FALSE

If checked, the interaction with an existing marker (node of box) happens in the marker’s original z-position.

Color (color)

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

Sets the color of the rendered rectangle.

see also SoView2DExtension.color

Selection Tolerance

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

Sets a distance the mouse needs to be moved after clicking to activate an interaction.

Alt

name: alt, type: Enum, default: IGNORED

see SoView2DExtension.alt

Create Mode

name: createNewMode, type: Bool, default: FALSE

see SoView2DExtension.createNewMode

Create

name: createNewModeRequest, type: Trigger

see SoView2DExtension.createNewModeRequest

Start World Pos

name: startWorldPos, type: Vector3, default: -1 -1 -1

Shows and sets the start position of the 3D box.

End World Pos

name: endWorldPos, type: Vector3, default: -1 -1 -1

Shows and sets the end position of the 3D box.

Blend Inside

name: blendInside, type: Float, default: 0.2, minimum: 0, maximum: 1

Sets an alpha factor for rendering the faces of the box if the current slice crosses the box.

Blend Onto

name: blendOnto, type: Float, default: 0.5, minimum: 0, maximum: 1

Sets an alpha factor for rendering the faces of the 3D box that lie directly on the current viewer’s slice.

Blend Outside

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

Sets an alpha factor for rendering the faces of the box if the current slice does not cross the box at all.

Line Blend Inside

name: lineBlendInside, type: Float, default: 0.5, minimum: 0, maximum: 1

Sets an alpha factor for rendering the edges of the box if the current slice crosses the box.

Line Blend Onto

name: lineBlendOnto, type: Float, default: 0.69999999, minimum: 0, maximum: 1

Sets an alpha factor for rendering the edges of the box if the current slice crosses the box.

Line Blend Outside

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

Sets an alpha factor for rendering the edges of the box if the current slice does not cross the box at all.

Select Outside

name: selectOutside, type: Bool, default: FALSE

If enabled, the rectangle can be selected outside of its z range if blendOutside or lineBlendOutside > 0.

Allow Drag

name: allowDrag, type: Bool, default: FALSE

If checked, an existing rectangle can be translated by clicking it in the interior and dragging it on the viewer.

Cooperative

name: cooperative, type: Bool, default: FALSE

If checked, the module evaluates internal states so that if other module actually set this state, an interaction is evaluated by only one module.

Shade Exterior

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

Sets a darkening factor of the image outside the rectangle. Default is 0 (that is: not darken at all).

Shade All Exterior

name: shadeAllExterior, type: Bool, default: FALSE

If checked, all exterior is shaded (see Shade Exterior). Otherwise, if the current slice does not cross the box, the projection area of the box is also shaded.

Line Style

name: lineStyle, type: Enum, default: SOLID

Defines the line style of the rectangle.

Values:

Title Name
Solid SOLID
Dashed DASHED
Dotted DOTTED
Long Dashed LONG_DASHED

Vertical Offset

name: labelVerticalOffset, type: Float, default: 0

Vertical label offset in pixels (in addition to the position determined by Vertical Position on Box and Vertical Alignment).

Vertical Alignment

name: labelVerticalPosition, type: Enum, default: Center

The vertical label alignment relative to the position specified by Vertical Position on Box.

Values:

Title Name
Above Above
Center Center
Below Below

Vertical Position on Box

name: labelVerticalBoxPosition, type: Enum, default: Center

The vertical label position on the rectangle.

Values:

Title Name
Top Top
Center Center
Bottom Bottom

Horizontal Offset

name: labelHorizontalOffset, type: Float, default: 0

The horizontal label offset in pixels (in addition to the position determined by Horizontal Position on Box and Horizontal Alignment).

Horizontal Position on Box

name: labelHorizontalBoxPosition, type: Enum, default: Center

The horizontal label position on the rectangle.

Values:

Title Name
Left Left
Center Center
Right Right

Horizontal Alignment

name: labelHorizontalPosition, type: Enum, default: Center

The horizontal label alignment relative to the position specified by Horizontal Position on Box.

Values:

Title Name
Left Left
Center Center
Right Right

Text

name: labelText, type: String

Text of the label.

The text can also be multi-line if you enter it through the automatic panel or through scripting.

Color (labelColor)

name: labelColor, type: Color, default: 1 1 1

Color of the label text.

Draw shadow

name: labelShadow, type: Bool, default: TRUE

If checked, draw the label text with a black shadow.

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

see SoView2DExtension.interactionProviderID

maskValid

name: maskValid, type: Bool, persistent: no

needsValidVoxel

name: needsValidVoxel, type: Bool, default: TRUE

see SoView2DExtension.needsValidVoxel

wantsAllEvents

name: wantsAllEvents, type: Bool, default: FALSE

wantsKeyEvents

name: wantsKeyEvents, type: Bool, default: FALSE

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

renderOnSlab

name: renderOnSlab, type: Bool, default: FALSE

clipToSlice

name: clipToSlice, type: Bool, default: FALSE

cursorShape

name: cursorShape, type: Enum, default: CROSS_CURSOR

see SoView2DExtension.cursorShape

singleClicked

name: singleClicked, type: Trigger, persistent: no

doubleClicked

name: doubleClicked, type: Trigger, persistent: no

resetToImage

name: resetToImage, type: Bool, default: FALSE

drawLabel

name: drawLabel, type: Bool, default: FALSE

If enabled, the label text given in Text is drawn.

labelFontSize

name: labelFontSize, type: Integer, default: 12

isUnderMouse

name: isUnderMouse, type: Bool, persistent: no