SoWEMDiagnosis

InventorModule
genre WEMInformation
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoWEM
definition SoWEM.def
see also WEMInfo
keywords error, warning, check

Purpose

The SoWEMDiagnosis runs a full diagnostics on the input WEM and reports these errors both as an Open Inventor scene and as a short and detailed list on its panel.

Usage

Just plug a WEM into the input. Optionally plug in the Inventor output to any 3D Viewer, together with the output of a SoWEMRenderer module.

Details

The main panel consists of four major parts.

  1. On the left an overview of all errors, warnings and notices with a short description of the occurred error is displayed.
  2. On the top right Display Options are shown, which allow to filter warnings and notices.
  3. Below these Display Options, is some detailed information about the selected primitive.
  4. At the bottom a status bar shows the total amount of errors, warnings and notices and a global status of the input WEM.
../../../Modules/Inventor/SoWEM/mhelp/Images/mainPanel.png

As can be seen each type of error has a different color indicating a different severity level of the error.

Icon Meaning
../../../Modules/Inventor/SoWEM/mhelp/Images/Fatal.png

FATAL ERROR

Other WEM modules using this mesh will not work (best case scenario) but most likely the module will crash or cause a segmentation fault.

Fatal errors include double linked primitives and invalid edges/faces.

../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png

ERROR

Although not fatal to other WEM modules, these errors are still severe enough to cause modules to fail.

Errors include non-connected primitives, inverted normals and invalid edge pointers.

../../../Modules/Inventor/SoWEM/mhelp/Images/Warning.png

WARNING

As the name suggests, these indicate certain things about the mesh that would better be fixed if one wants to have a perfect WEM.

Warnings include orphan/redundant nodes and zero-sized edges/faces.

../../../Modules/Inventor/SoWEM/mhelp/Images/Notice.png

NOTICE

These are totally harmless!

Notices include boundaries, flat regions and concave faces.

Each listview entry can be selected on which more information about the error and primitive are shown at the right of the panel. Use the display options to limit the amount of warnings and/or notices to be shown. This both applies to the listview as to the Open Inventor scene. Using the settings button at the bottom right one can also enable the merging of error messages to one single listview entry.

This is the full list of fatals, errors, warnings and notices, and their meaning.

Nodes:

Icon Message Meaning
../../../Modules/Inventor/SoWEM/mhelp/Images/Fatal.png Double Entry The node has a double listing for an edge/face, removing the edge/face results in an invalid listing.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Non Connected The node has an edge or face which has no connection to this node. Either the node has an edge or face too many, or the relationship between both is broken.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Bad Normal Length The node normal has a length which differs from 1. Since the node normal is calculated from the incident face normals, this means something is wrong with the surrounding faces. For instance: their area is zero, resulting in normals (0,0,0) and as such resulting in a node normal (0,0,0).
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Dead End The node only has one edge. This does not describe a valid 2-manifold.
../../../Modules/Inventor/SoWEM/mhelp/Images/Warning.png Orphan The node has no incident edges nor faces. Since it has no link with the rest of the mesh, it can safely be removed.
../../../Modules/Inventor/SoWEM/mhelp/Images/Warning.png Redundant/Collinear The node has two incident edges and faces and can be removed. This is certainly the case if this node and the other nodes from the incident edges are also collinear.
../../../Modules/Inventor/SoWEM/mhelp/Images/Warning.png Neighborhood Not Set The node has no edges and is not an orphan, but the WEM itself claims to have egdes. Edge relationship for this node should be built.
../../../Modules/Inventor/SoWEM/mhelp/Images/Notice.png Boundary The node is part of an edge which only has one incident face, the other being NULL, indicating a boundary.
../../../Modules/Inventor/SoWEM/mhelp/Images/Notice.png Flat Region The maximum angle between the node normal and the normals of the incident faces is smaller than one degree.
../../../Modules/Inventor/SoWEM/mhelp/Images/Notice.png Valence 3 The node has an edge valence of three, meaning there are three incident edges belonging to three incident triangles. Each edge is shared by two of these three triangles. This allows to merge these three triangles into one bigger triangle. Nodes with valence 3 result in ugly triangle configuration and should be avoided where possible.

Edges:

Icon Message Meaning
../../../Modules/Inventor/SoWEM/mhelp/Images/Fatal.png NULL Head The head of the winged edge is NULL which makes it an invalid edge.
../../../Modules/Inventor/SoWEM/mhelp/Images/Fatal.png NULL Tail The tail of the winged edge is NULL which makes it an invalid edge.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png NULL Pointer One of this edge’s edge pointers (lPred, lSucc, rPred or rSucc) is NULL. This points to an invalid or partially set edge neighborhood.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Equal Pointer One of this edge’s edge pointers (lPred, lSucc, rPred or rSucc) is equal to another of those edge pointers. This is mostly the consequence of an illegal operation which leaves the edge neighborhood broken or not updated.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Non Connected Pointer One of this edge’s edge pointers (lPred, lSucc, rPred or rSucc) is not connected to either the head or tail of this edge.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Edge Pointer Link One of this edge’s edge pointers (lPred, lSucc, rPred or rSucc) does not link back to this edge.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Circular Pointer One of this edge’s edge pointers (lPred, lSucc, rPred or rSucc) points to this edge.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Order The order of the edges for the left or right face of this edge are not in the correct order to belong to a left or right face.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Fold The edge creates a fold on the mesh. Two incident faces of an edge are folding when their normals make an angle of approximate 180 degrees.
../../../Modules/Inventor/SoWEM/mhelp/Images/Warning.png Zero Length The edge has zero length. As a consequence the triangles to which this edge belongs have a zero-sized area.
../../../Modules/Inventor/SoWEM/mhelp/Images/Warning.png Neighborhood Not Set The edge has no edge pointers (lSucc, lPred, rSucc and rPred), but the WEM itself claims to have edges. Edge relationship for this edge should be built.
../../../Modules/Inventor/SoWEM/mhelp/Images/Notice.png Boundary The edge is part of a boundary, having only one incident face the other being NULL.

Faces:

Icon Message Meaning
../../../Modules/Inventor/SoWEM/mhelp/Images/Fatal.png NULL Node The face has a node which is NULL.
../../../Modules/Inventor/SoWEM/mhelp/Images/Fatal.png NULL Edge The face has an edge which is NULL.
../../../Modules/Inventor/SoWEM/mhelp/Images/Fatal.png Invalid The amount of nodes and edges for this face differs. This does not describe a valid face.
../../../Modules/Inventor/SoWEM/mhelp/Images/Fatal.png Double Entry The face has a double listing for a node/edge. Removing the node/edge results in an invalid listing.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Non Connected The face has a node/edge which does not link back to this face.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Edge Offset The order of nodes and edges for this face is not the same. Suppose i to be the index of the node in the nodes list of this face: node i and node i+1 are not part of edge i. This is required by a lot of WEM modules.
../../../Modules/Inventor/SoWEM/mhelp/Images/Error.png Normal Inverted The normal is inverted. This only applies to (concave) faces where the normal was wrongfully calculated.
../../../Modules/Inventor/SoWEM/mhelp/Images/Warning.png Zero Area The face has a zero area. This also means at least one of the edges has a zero length. The face should be removed since it is not visible.
../../../Modules/Inventor/SoWEM/mhelp/Images/Warning.png Bad Normal Length The normal of the face has a length which differs from 1. This mostly results from having a zero area resulting in a normal (0,0,0) with length 0.
../../../Modules/Inventor/SoWEM/mhelp/Images/Warning.png Neighborhood Not Set The face has no edges, but the WEM itself claims to have edges. Edge relationship for this face should be built.
../../../Modules/Inventor/SoWEM/mhelp/Images/Notice.png Concave The face is concave. Actually this should be avoided since rendering these faces may result in visual artefacts.

Windows

SoWEMDiagnosis

../../../Modules/Inventor/SoWEM/mhelp/Images/Screenshots/SoWEMDiagnosis.SoWEMDiagnosis.png

Settings

../../../Modules/Inventor/SoWEM/mhelp/Images/Screenshots/SoWEMDiagnosis.Settings.png

Input Fields

inputWEM

name: inputWEM, type: WEM(MLBase)

The WEM to be diagnosed.

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

Output Fields

self

name: self, type: SoNode

The Open Inventor scene containing the parts of the WEM where anything out of the ordinary was diagnosed.

Parameter Fields

Visible Fields

Alpha (nodeAlpha)

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

Sets the alpha value for the rendered nodes.

Alpha (edgeAlpha)

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

Sets the alpha value for the rendered edges.

Alpha (faceAlpha)

name: faceAlpha, type: Float, default: 0.40000001, minimum: 0, maximum: 1

Sets the alpha value for the rendered faces.

Scale (scaleNodes)

name: scaleNodes, type: Float, default: 2, minimum: 0.1, maximum: 10

Scales the size of the displayed nodes.

Scale (scaleEdges)

name: scaleEdges, type: Float, default: 1, minimum: 0.1, maximum: 10

Scales the thickness of the displayed edges.

Elevation

name: faceElevation, type: Float, default: 0.1

Adjusts how much the faces are elevated into the normal direction to enhance their visibility.

Show redundant nodes

name: showRedundant, type: Bool, default: TRUE

If checked, redundant nodes are detected and displayed.

Show collinear nodes

name: showCollinear, type: Bool, default: TRUE

If checked, collinear nodes are detected and displayed.

Show orphan nodes

name: showOrphan, type: Bool, default: TRUE

If checked, orphan ndoes are detected and displayed.

Show flat regions

name: showFlatRegion, type: Bool, default: TRUE

If checked, flat regions (adjacent faces have the same normal) are detected and displayed.

Show boundaries

name: showBoundary, type: Bool, default: TRUE

If checked, boundaries are detected and displayed.

Show concave faces

name: showConcave, type: Bool, default: TRUE

If checked, concave faces are detected and displayed.

Show neighborhood not set

name: showNeighborhood, type: Bool, default: TRUE, deprecated name: showNeighbourhood

If checked, non-set neighborhood primitves (missing pointers) are detected and displayed.

Show zero-size primitives

name: showZeroSize, type: Bool, default: TRUE

If checked, zero-size primitives (faces and edges) are detected and displayed.

Show nodes with valence 3

name: showValence3, type: Bool, default: TRUE

If checked, nodes with a valence of 3 (three edges attached) are detected and displayed. Those nodes typically do not contribute to the overall geometry but spoil the rendering because of their contribution ot the normal calculation.

Show duplicate nodes

name: showDuplicateNodes, type: Bool, default: TRUE

If checked, duplicate nodes (share the same position) are detected and displayed.

Show holes

name: showHoles, type: Bool, default: TRUE

If checked, holes are detected and displayed.

Show inverted

name: showInverted, type: Bool, default: TRUE

If checked, inverted faces are detected and displayed.

Max. Displayed Messages

name: useMaxNumDisplayedErrors, type: Bool, default: TRUE

If checked, the Max Num Displayed Errors is used to limit the amout of displayed single errors.

Max Num Displayed Errors

name: maxNumDisplayedErrors, type: Integer, default: 10, minimum: 10

Adjusts the maximum number of displayed single errors. If there are more errors than this number, they are collected into one, but the Inventor output will still feature all erroneous primitives.

Status

name: status, type: String

Displays the status of this module. The icon shows the worst detected state.

Hidden Fields

renderCaching

name: renderCaching, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

boundingBoxCaching

name: boundingBoxCaching, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

renderCulling

name: renderCulling, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

pickCulling

name: pickCulling, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

patchAlpha

name: patchAlpha, type: Float, default: 1

hitFaceEntryNum

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

errorString

name: errorString, type: String, persistent: no

selectedType

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

selectedEntry

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

selectedErrorString

name: selectedErrorString, type: String

numRedundant

name: numRedundant, type: Integer, default: 0

numCollinear

name: numCollinear, type: Integer, default: 0

numOrphan

name: numOrphan, type: Integer, default: 0

numFlatRegion

name: numFlatRegion, type: Integer, default: 0

numBoundary

name: numBoundary, type: Integer, default: 0

numConcave

name: numConcave, type: Integer, default: 0

numNeighborhood

name: numNeighborhood, type: Integer, default: 0, deprecated name: numNeighbourhood

numZeroSize

name: numZeroSize, type: Integer, default: 0

numValence3

name: numValence3, type: Integer, default: 0

numDuplicateNodes

name: numDuplicateNodes, type: Integer, default: 0

numHoles

name: numHoles, type: Integer, default: 0

numInverted

name: numInverted, type: Integer, default: 0

numFatal

name: numFatal, type: Integer, default: 0

numError

name: numError, type: Integer, default: 0

numWarning

name: numWarning, type: Integer, default: 0

numNotice

name: numNotice, type: Integer, default: 0

shouldUpdate

name: shouldUpdate, type: Trigger