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 Inventor viewer.
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.
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
.
Parameter Fields¶
Field Index¶
Allow Hits : Bool |
Enable Crease Angle : Bool |
isMouseOverSurface : Bool |
Angle : Float |
Face Rendering Mode : Enum |
maxWEMPatchIndex : Integer |
Apply : Trigger |
Highlight selected patch : Bool |
Nearest Node : Integer |
Auto Apply : Bool |
Hit Face : Integer |
Nearest Value : Float |
Auto Update : Bool |
Hit information valid : Bool |
Patch to Render (-1=all) : Integer |
autoClear : Bool |
Hit Patch : Integer |
Perform pre-hit test : Bool |
Cache Patches : Bool |
Hit Position : Vector3 |
primitiveValueListAlphaValid : Bool |
Color : Color |
hitModifierKey : Enum |
primitiveValueLists : String |
Color Mode : Enum |
Intensity : Float |
primitiveValueListValid : Bool |
cursorShape : Enum |
interactionProviderID : String |
Send triangle adjacency : Bool |
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.
Enable Crease Angle¶
Angle¶
-
name:
creaseAngle
, type:
Float
, default:
75
, minimum:
0
, maximum:
175
¶ 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.
Intensity¶
-
name:
highlightIntensity
, type:
Float
, default:
0.5
, minimum:
0
, maximum:
1
¶ 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
¶ The index of the hit (picked) WEMPatch.
Nearest Node¶
-
name:
hitNearestNodeIndex
, type:
Integer
, persistent:
no
¶ The index of the nearest node to the hit position.
Nearest Value¶
-
name:
hitNearestNodeValue
, type:
Float
, persistent:
no
¶ The value of the node nearest to the hit position.
Hit Position¶
-
name:
hitPosition
, type:
Vector3
, persistent:
no
¶ The position where the picking ray first hit the surface.
Hit information valid¶
-
name:
isHitInformationValid
, type:
Bool
, persistent:
no
¶ This field is true if 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 this is checked, a hit test is performed while hovering. This allows to adapt 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
¶ Determines 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. |
Patch to Render (-1=all)¶
-
name:
wemPatchToRender
, type:
Integer
, default:
-1
, minimum:
-1
, maximum:
:field:`maxWEMPatchIndex`
¶ Sets the patch index to render. If set to -1, all patches are rendered.
Cache Patches¶
-
name:
cachePatches
, type:
Bool
, default:
FALSE
¶ If enabled, all WEM patches are pre-generated as Open Inventor facesets, even if
Patch to Render (-1=all)
is not -1. This allows to do fast patch animations, e.g. when the patches are for individual time points.