SoWEMRenderer

InventorModule

genre

WEMRendering

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

dll

SoWEM

definition

SoWEM.def

see also

WEMIsoSurface, WEMInfo

keywords

visualization, surface

Purpose

The SoWEMRenderer renders the faces of a WEM as an Open Inventor scene.

Usage

Just plug in a WEM into the input, and the module’s output into an Open Inventor viewer.

Details

A WEM can consist of multiple WEMPatches. By default, all patches are rendered.

The module SoWEMRenderer can also render either single patches or multiple patches. This is controlled by Render Patch Selection Mode.

A LUT can be attached to this module to color the nodes of the rendered WEM(Patches). For this, the value stored in a Primitive Value List (PVL) is used as a lookup into the LUT. Typically, the attached LUT is a 1D LUT, but a 2D or 3D LUT can also be attached. Depending on Use only first LUT entry of a 2D/3D LUT, either the first 1D LUT is used for coloring all nodes of all rendered WEMPatches, or the index of a rendered WEMPatch is used as a row lookup into a 2D LUT. If a 3D LUT is attached, only the first layer is used. This way, it is possible to provide an individual LUT for each WEMPatch.

Interaction

A rendered WEM can be selected in the viewer. On the module’s GUI, some information on the clicked position, the ID of the hit WEMPatch, as well as some additional information on the local configuration of the hit position is displayed.

Windows

Default Panel

../../../Modules/Inventor/SoWEM/mhelp/Images/Screenshots/SoWEMRenderer._default.png

Input Fields

The input is the WEM to be rendered and an option LUT for coloring the WEM (only meaningful if the WEM has values stored in at least one PVL).

inWEM

name: inWEM, type: WEM(MLBase)

For accessing this object via scripting, see the Scripting Reference: MLWEMWrapper.

inLUT

name: inLUT, type: LUTFunction(MLBase)

inExtensions

name: inExtensions, type: SoNode

Allows for adding extension modules to the SoWEMRenderer.

Output Fields

The WEM as an Open Inventor scene.

self

name: self, type: SoNode

Parameter Fields

Field Index

Allow Hits: Bool

Highlight selected patch: Bool

Nearest Value: Float

Angle: Float

Hit Face: Integer

Patch Index: Integer

Apply: Trigger

Hit information valid: Bool

Patch Indices: String

Auto Apply: Bool

Hit Patch: Integer

Perform pre-hit test: Bool

Auto Update: Bool

Hit Position: Vector3

primitiveValueListAlphaValid: Bool

autoClear: Bool

hitModifierKey: Enum

primitiveValueLists: String

Color: Color

Intensity: Float

primitiveValueListValid: Bool

Color Mode: Enum

interactionProviderID: String

Render Patch Selection Mode: Enum

cursorShape: Enum

isMouseOverSurface: Bool

Send triangle adjacency: Bool

Enable Crease Angle: Bool

maxWEMPatchIndex: Integer

Use only first LUT entry of a 2D/3D LUT: Bool

Face Rendering Mode: Enum

Nearest Node: Integer

Visible Fields

Auto Apply

name: autoApply, type: Bool, default: TRUE

If checked, all parameter changes lead to a new generation of the output scene.

Auto Update

name: autoUpdate, type: Bool, default: TRUE

If checked, all input changes lead to a new generation of the output scene.

Apply

name: apply, type: Trigger

When pressed, the module generates a new Open Inventor scene.

Enable Crease Angle

name: enableCreaseAngle, type: Bool, default: FALSE

If checked, the normals on the triangles will be calculated for each node depending on the angle of the neighboring triangles, using the Angle angle.

This allows for rendering sharp edged on WEMs, which would not be possible otherwise.

Angle

name: creaseAngle, type: Float, default: 75, minimum: 0, maximum: 175

Sets the angle between neighboring triangles which is used to detect sharp/creasing edges.

Highlight selected patch

name: useHighlightSelected, type: Bool, default: FALSE

If checked, the selected WEMPatch is highlighted by a blinking silhouette.

This costs a lot of performance, so handle with care.

Color

name: highlightColor, type: Color, default: 1 0 0

Sets the highlight color of the selected WEM.

Intensity

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

Sets the intensity of the highlight.

Face Rendering Mode

name: faceRenderingMode, type: Enum, default: WEM_FACE_RENDERING_MODE_AUTO

Defines the rendering mode of faces.

Values:

Title

Name

Description

​Auto

​WEM_FACE_RENDERING_MODE_AUTO

​The rendering mode is determined automatically.

It will be DOUBLE_SIDE if the WEMPatch to be rendered has transparencies or holes, so that the backsides of faces are correctly rendered.

Otherwise, the render mode is SINGLE_SIDE.

However, the module cannot detect if a WEM is cut by a clipping plane.

​Single Side

​WEM_FACE_RENDERING_MODE_SINGLE_SIDE

​Only the front faces are rendered. This leads to a faster rendering as there are only half the amount of primitives to be processed.

However, transparencies, open WEMs (holes or clipping planes) are not rendered correctly.

​Double Side

​WEM_FACE_RENDERING_MODE_DOUBLE_SIDE

​Both, the front and the back side of polygons are rendered.

This mode always renders correctly, but always slow.

Hit Patch

name: hitPatchIndex, type: Integer, persistent: no

Shows the index of the hit (picked) WEMPatch.

Hit Face

name: hitFaceIndex, type: Integer, persistent: no

Shows the index of the hit (picked) face.

Nearest Node

name: hitNearestNodeIndex, type: Integer, persistent: no

Shows the index of the nearest node to the hit position.

Nearest Value

name: hitNearestNodeValue, type: Float, persistent: no

Shows the value of the node nearest to the hit position.

Hit Position

name: hitPosition, type: Vector3, persistent: no

Shows the position where the picking ray first hit the surface.

Hit information valid

name: isHitInformationValid, type: Bool, persistent: no

Shows whether the hit information on the GUI is valid.

Allow Hits

name: allowHits, type: Bool, default: FALSE

If checked, the module evaluates picking information.

Perform pre-hit test

name: performPreHitTest, type: Bool, default: FALSE

If checked, a hit test is performed while hovering. This allows for adapting the cursor while over eligible WEMs and may allow other interactions to use the same button combination (when not over a WEM). A slight performance penalty may be induced by this, though.

This option should also be activated if several SoWEMRenderer modules in the same scene allow picking at the same time, since otherwise only the first module will get the click. Note though that the Hit information valid field will never get unset in this mode.

Color Mode

name: colorMode, type: Enum, default: WEM_COLOR_GENERAL

Defines how the WEM (faces) should be colored.

Values:

Title

Name

Description

​General

​WEM_COLOR_GENERAL

​The WEM is colored according to the module’s own color settings.

​Node Colors

​WEM_COLOR_NODE_COLORS

​The WEM is colored with the nodes’ color.

​Lut Values

​WEM_COLOR_LUT_VALUES

​The WEM is colored with a LUT using the selected PVL.

​Lut Values Integer

​WEM_COLOR_LUT_VALUES_INTEGER

​The WEM is colored with a LUT using the selected PVL rounded to integers.

​Textured

​WEM_COLOR_TEXTURED

​The WEM is textured.

​None

​WEM_COLOR_NONE

​The WEM is not colored and a SoMaterial node can be used to set the color.

Use only first LUT entry of a 2D/3D LUT

name: useOnlyFirstLUT, type: Bool, default: TRUE

If checked, only the first row and layer of a 2D/3D LUT is used as a LUT. Otherwise, the index of a rendered WEMPatch is used as a row lookup into a multidimensional LUT (in the first layer, in the case it is a 3D LUT).

Render Patch Selection Mode

name: renderPatchSelectionMode, type: Enum, default: WEM_RENDER_PATCH_SELECT_SINGLE

Defines the patch index selection mode for rendering WEMPatches.

Values:

Title

Name

Description

​All

​WEM_RENDER_PATCH_SELECT_ALL

​All WEMPatches are rendered.

​Single

​WEM_RENDER_PATCH_SELECT_SINGLE

​The geometry of all WEMPatches is generated, but only the WEMPatch at the specified index is rendered.

The geometry of all WEMPatches is generated to cache it; changing the index updates only the rendering without regenerating the geometry, thus allowing fast changes (e.g., for animations).

A value of -1 means that all WEMPatches are rendered; this is for backward compatibility.

​Multiple

​WEM_RENDER_PATCH_SELECT_MULTIPLE

​The WEMPatches with the specified space-separated indices are rendered.

The indices must be unsigned integers and may include duplicate entries. The number of spaces between entries does not matter, and any negative integers are ignored.

Patch Index

name: renderPatchSelectionIndex, type: Integer, default: -1, minimum: -1, maximum: :field:`maxWEMPatchIndex`, deprecated name: wemPatchToRender

Sets the index of the WEMPatch to render.

A value of -1 means that all WEMPatches are rendered; this is only for backward compatibility.

Patch Indices

name: renderPatchSelectionIndices, type: String

Sets a space-separated list of unordered indices of WEMPatches to render.

Send triangle adjacency

name: sendAdjacency, type: Bool, default: FALSE

If checked, the WEM renderer sends triangle adjacency information when drawing (using GL_TRIANGLES_ADJACENCY).

This allows for accessing the three adjacent triangles of each triangle in a geometry shader.

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

autoClear

name: autoClear, type: Bool, default: TRUE

isMouseOverSurface

name: isMouseOverSurface, type: Bool, persistent: no

cursorShape

name: cursorShape, type: Enum, default: CROSS_CURSOR

Defines the cursor shape displayed if the picking action is active.

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

​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 Cursor

​LUT_CURSOR

​Lut 1 Cursor

​LUT_1_CURSOR

​Lut 2 Cursor

​LUT_2_CURSOR

​Lut 3 Cursor

​LUT_3_CURSOR

​Slicing Cursor

​SLICING_CURSOR

​Other Cursor 0

​OTHER_CURSOR_0

​Other Cursor 1

​OTHER_CURSOR_1

​Other Cursor 2

​OTHER_CURSOR_2

​Other Cursor 3

​OTHER_CURSOR_3

​Other Cursor 4

​OTHER_CURSOR_4

​Other Cursor 5

​OTHER_CURSOR_5

​Other Cursor 6

​OTHER_CURSOR_6

​Other Cursor 7

​OTHER_CURSOR_7

​Other Cursor 8

​OTHER_CURSOR_8

​Other Cursor 9

​OTHER_CURSOR_9

​Other Cursor 10

​OTHER_CURSOR_10

​Other Cursor 11

​OTHER_CURSOR_11

​Other Cursor 12

​OTHER_CURSOR_12

​Other Cursor 13

​OTHER_CURSOR_13

​Other Cursor 14

​OTHER_CURSOR_14

​Other Cursor 15

​OTHER_CURSOR_15

​Other Cursor 16

​OTHER_CURSOR_16

​Other Cursor 17

​OTHER_CURSOR_17

​Other Cursor 18

​OTHER_CURSOR_18

​Other Cursor 19

​OTHER_CURSOR_19

​Other Cursor 20

​OTHER_CURSOR_20

​Other Cursor 21

​OTHER_CURSOR_21

​Other Cursor 22

​OTHER_CURSOR_22

​Other Cursor 23

​OTHER_CURSOR_23

​Other Cursor 24

​OTHER_CURSOR_24

​Other Cursor 25

​OTHER_CURSOR_25

​Other Cursor 26

​OTHER_CURSOR_26

​Other Cursor 27

​OTHER_CURSOR_27

​Other Cursor 28

​OTHER_CURSOR_28

​Other Cursor 29

​OTHER_CURSOR_29

​Other Cursor 30

​OTHER_CURSOR_30

​Other Cursor 31

​OTHER_CURSOR_31

​Other Cursor 32

​OTHER_CURSOR_32

​Other Cursor 33

​OTHER_CURSOR_33

​Other Cursor 34

​OTHER_CURSOR_34

​Other Cursor 35

​OTHER_CURSOR_35

​Other Cursor 36

​OTHER_CURSOR_36

​Other Cursor 37

​OTHER_CURSOR_37

​Other Cursor 38

​OTHER_CURSOR_38

​Other Cursor 39

​OTHER_CURSOR_39

​Other Cursor 40

​OTHER_CURSOR_40

​Other Cursor 41

​OTHER_CURSOR_41

​Other Cursor 42

​OTHER_CURSOR_42

​Other Cursor 43

​OTHER_CURSOR_43

​Other Cursor 44

​OTHER_CURSOR_44

​Other Cursor 45

​OTHER_CURSOR_45

​Other Cursor 46

​OTHER_CURSOR_46

​Other Cursor 47

​OTHER_CURSOR_47

​Other Cursor 48

​OTHER_CURSOR_48

​Other Cursor 49

​OTHER_CURSOR_49

​Other Cursor 50

​OTHER_CURSOR_50

​Other Cursor 51

​OTHER_CURSOR_51

​Other Cursor 52

​OTHER_CURSOR_52

​Other Cursor 53

​OTHER_CURSOR_53

​Other Cursor 54

​OTHER_CURSOR_54

​Other Cursor 55

​OTHER_CURSOR_55

​Other Cursor 56

​OTHER_CURSOR_56

​Other Cursor 57

​OTHER_CURSOR_57

​Other Cursor 58

​OTHER_CURSOR_58

​Other Cursor 59

​OTHER_CURSOR_59

​Other Cursor 60

​OTHER_CURSOR_60

​Other Cursor 61

​OTHER_CURSOR_61

​Other Cursor 62

​OTHER_CURSOR_62

​Other Cursor 63

​OTHER_CURSOR_63

​Other Cursor 64

​OTHER_CURSOR_64

​Other Cursor 65

​OTHER_CURSOR_65

​Other Cursor 66

​OTHER_CURSOR_66

​Other Cursor 67

​OTHER_CURSOR_67

​Other Cursor 68

​OTHER_CURSOR_68

​Other Cursor 69

​OTHER_CURSOR_69

​Blank Cursor

​BLANK_CURSOR

primitiveValueLists

name: primitiveValueLists, type: String

primitiveValueListValid

name: primitiveValueListValid, type: Bool, default: FALSE

primitiveValueListAlphaValid

name: primitiveValueListAlphaValid, type: Bool, default: FALSE

maxWEMPatchIndex

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

hitModifierKey

name: hitModifierKey, type: Enum, default: AllModifiersMask

Values:

Title

Name

​No Modifier

​NoModifier

​Shift Modifier

​ShiftModifier

​Control Modifier

​ControlModifier

​Alt Modifier

​AltModifier

​All Modifiers Mask

​AllModifiersMask