WEMSceneLoader

MLModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll WEMSceneLoader
definition WEMSceneLoader.def
inherits from WEMGenerator
keywords file, format, surface

Purpose

The WEMSceneLoader allows for loading triangle meshes as WEM patches using the Open Asset Import Library (assimp). The meshes are automatically triangulated if they contain quads or other non-triangle polygons.

Note: The STL format support of assimp is limited to loading only the first mesh in the STL file!

If you want to join identical vertices (Join Identical Vertices) that have different normals, you need to enable the Force Normal Generation and set Generate Normals to “SmoothNormals”.

It supports:

Format File Ending
3D GameStudio Model .mdl
3D GameStudio Terrain .hmp
3D Studio Max 3DS .3ds
3D Studio Max ASE .ase
AC3D .ac
AutoCAD DXF .dxf
Autodesk DXF .dxf
Blender .blend
Biovision BVH .bvh
CharacterStudio Motion .csm
DirectX X .x
Doom 3 .md5mesh, .md5anim, .md5camera
Irrlicht Mesh .irrmesh, .xml
Irrlicht Scene .irr,.xml
LightWave Model .lwo
LightWave Scene .lws
Milkshape 3D .ms3d
Modo Model .lxo
Neutral File Format .nff
Object File Format .off
Ogre .mesh.xml, .skeleton.xml, .material
Quake I .mdl
Quake II .md2
Quake III .md3
Quake 3 BSP .pk3
Quick3D .q3o, q3s
Raw Triangles .raw
RtCW .mdc
Sense8 WorldToolkit .nff
Stanford Polygon Library .ply
Stereolithography .stl
Terragen Terrain .ter
TrueSpace .cob, .scn
Valve Model .smd, .vta
Wavefront Object .obj
XGL .xgl, .zgl

Parameter Fields

Visible Fields

Auto Apply

name: autoApply, type: Bool, default: TRUE

If checked, the module loads anew on every parameter change.

see also WEMGenerator.autoApply

Apply

name: apply, type: Trigger

When pressed, the module loads anew.

see also WEMGenerator.apply

Overwrite label and description

name: overwriteLabelDescription, type: Bool, default: FALSE

If checked, the label and description strings in the output WEM are set to Label and Description, respectively.

see also WEMGenerator.overwriteLabelDescription

Label

name: label, type: String

Sets a label string in the output WEM.

see also WEMGenerator.label

Description

name: description, type: String

Sets a description string in the output WEM.

see also WEMGenerator.description

Filename

name: filename, type: String

Sets the filename of the scene.

Log Detail

name: logDetail, type: Enum, default: Errors

Defines the detail of the logging.

Values:

Title Name
Errors Errors
Warnings Warnings
Verbose Verbose
Debugging Debugging

Generate Normals

name: generateNormals, type: Enum, default: SmoothNormals

Defines how normals are generated when they are not present in the file.

Values:

Title Name
Smooth Normals SmoothNormals
Normals Normals
None None

Generate Edges

name: generateEdges, type: Bool, default: FALSE

If checked, edges are generated in the loaded WEM.

Normal Smoothing Crease Angle

name: normalSmoothingCreaseAngle, type: Float, default: 175

Sets an angle limit; if adjacent face normals have an angle greater than this limit, their shared nodes will be duplicated.

Join Identical Vertices

name: joinIdenticalVertices, type: Bool, default: TRUE

If checked, vertices that have identical position and properties are joined.

Find Degenerates

name: findDegenerates, type: Bool, default: TRUE

If checked, degenerate faces will be identified and removed.

Find Invalid Data

name: findInvalidData, type: Bool, default: TRUE

If checked, invalid data will be identified and a warning will be issued.

Optimize Meshes

name: optimizeMeshes, type: Bool, default: FALSE

If checked, the mesh will be optimized.

Force Normal Generation

name: forceNormalGeneration, type: Bool, default: FALSE

If checked, normal generation is forced even if the loaded file contains normals.

Hidden Fields

isProcessing

name: isProcessing, type: Bool, persistent: no

see WEMGenerator.isProcessing

elapsedTime

name: elapsedTime, type: Float, persistent: no

see WEMGenerator.elapsedTime

id

name: id, type: Integer, default: 0

see WEMGenerator.id

updateMode

name: updateMode, type: Enum, default: AutoUpdate

see WEMGenerator.updateMode

clear

name: clear, type: Trigger

see WEMGenerator.clear

shouldComputeNormals

name: shouldComputeNormals, type: Bool, default: TRUE

see WEMGenerator.shouldComputeNormals