WEMLoad

MLModule
genre WEMGenerate
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLWEMModules
definition MLWEMModules.def
see also LocalWEMLoad, WEMSave
inherits from WEMGenerator
keywords surface, file, format, off, ply, stl, geom

Purpose

The module WEMLoad loads different 3D mesh file formats from disk and converts them to a WEM.

Usage

Select a filename for the 3D mesh by browsing your file system and connect the output to the input of any WEM module.

Surface models generated by other applications sometimes have a counter-clockwise ordering of nodes in the faces. If such models are loaded, all the face normals will point inward, so do not forget to check Mirror Faces. This applies to Stanford models, for example.

Details

The following 3D mesh file formats are currently supported by this module:

Format Description
Object File Format (.off, .geom)

This file format was developed in 1986 at Digital Equipment Corporation’s Workstation Systems Engineering for the interchange and archiving of 3D objects. It is mostly known as the GeomView Object File Format due to its use in the 3D mesh viewer of the same name.

Useful links:

http://www.geomview.org/

Wavefront (.obj)

This file format is used by the WaveFront suite of commercial high-end animation packages. It was developed by Wavefront/Alias Technologies and is also used in 3D photography.

Useful link:

https://people.sc.fsu.edu/~jburkardt/data/obj/obj.html

Polygon File Format (.ply)

This file format is also known as the Stanford File Format and is widely recognized because of the Stanford Bunny, which is a scan-converted 3D mesh of a bunny. Its shape is well-suited for testing triangle reduction and triangle decimation algorithms due to its specific geometry.

Useful links:

https://people.sc.fsu.edu/~jburkardt/data/ply/ply.html

https://graphics.stanford.edu/data/3Dscanrep/

Standard Tessellation Language (.stl)

STL (Standard Tessellation Language) is a file format native to the stereolithography CAD software created by 3D Systems in Valencia, CA, USA. STL files describe only the surface geometry of a three-dimensional object without any representation of color, texture, or other common CAD model attributes.

Useful link:

Wikipedia - STL

VRML (.wrl) WEMLoad supports a rudimentary VRML format for loading indexed triangle faces with colors and normals.
Winged Edge Mesh (.wem) This format was created to support the ever-growing number of WEM features. It is the only format that can hold the very specific WEM parameters. More advanced WEM-related elements cannot be stored by other public formats. Its main goal is to keep the loading process as fast as possible, and it achieves this by loading meshes at least two to four times faster. The size on disk is also considerably smaller.

Windows

Default Panel

../../../Modules/ML/MLWEMModules/mhelp/Images/Screenshots/WEMLoad._default.png

Output Fields

The loaded mesh in WEM format.

outWEM

name: outWEM, type: WEM(MLBase)
For accessing this object via scripting see the Scripting Reference: MLWEMWrapper.

Parameter Fields

Field Index

Auto Apply: Bool id: Integer Mode: Enum
Automatically load WEM on opening network: Bool isProcessing: Bool Overwrite label and description: Bool
Close: Trigger Label: String progress: Float
Description: String Load: Trigger shouldComputeNormals: Bool
elapsedTime: Float loading: Bool Status: String
Filename: String Loading was successful: Bool Triangulate Faces: Bool
filenameInfo: String loadSurface: Trigger updateMode: Enum
Generate Edges: Bool Mirror Faces: Bool  

Visible Fields

Auto Apply

name: autoApply, type: Bool, default: TRUE

If checked, any changed parameter automatically applies to an already loaded WEM.

see also WEMGenerator.autoApply

Load

name: apply, type: Trigger

When pressed, the specified mesh file is loaded as a WEM.

see also WEMGenerator.apply

Close

name: clear, type: Trigger, deprecated name: unloadSurface

When pressed, the output WEM is cleared (made empty).

see also WEMGenerator.clear

Overwrite label and description

name: overwriteLabelDescription, type: Bool, default: FALSE

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

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 3D mesh file on disk.

Loading was successful

name: loadingOK, type: Bool, persistent: no

Shows whether the loading was successful.

Automatically load WEM on opening network

name: autoLoad, type: Bool, default: TRUE

If checked, the module loads the WEM from the specified mesh file when loading the network.

Mirror Faces

name: mirrorFaces, type: Bool, default: FALSE

If checked, the coordinates of each polygon are flipped in the mesh so that the inside becomes the outside.

Some meshes are stored in clockwise vertex ordering, while others are in counter-clockwise ordering. This option lets you choose how the mesh is intended to be used.

Generate Edges

name: generateEdges, type: Bool, default: TRUE

If checked, WEM edges are generated.

Generating WEM edges takes up half of the loading time, so if edges are not needed for further processing or visualization, this option can be turned off. This will speed up the loading process by a factor of two. If modules in the WEM pipeline do need edges, they will be generated in that module, with the exception of the SoWEM modules.

Triangulate Faces

name: triangulateFaces, type: Bool, default: FALSE

If checked, non-triangle faces are triangulated after loading.

Normally, this module outputs a 3D mesh with the same number and type of faces as described in the file and its format. This can include triangles, quads, or arbitrary polygons. With this option, the WEM will only output triangles. Some WEM modules support arbitrary polygons, while others do not.

Mode

name: triangulationMode, type: Enum, default: Strip

Defines the triangulation mode.

Values:

Title Name Description
Center node Center node A center node is calculated for each non-triangle polygon and shared by all resulting triangles that compose this polygon.
Fan Fan A triangle fan is created.
Strip Strip A triangle strip is created.

Status

name: status, type: String, persistent: no

Shows the status of this module.

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, persistent: no, deprecated name: autoUpdate

If checked, the module loads on network start-up.

see also WEMGenerator.updateMode

shouldComputeNormals

name: shouldComputeNormals, type: Bool, default: FALSE

see WEMGenerator.shouldComputeNormals

loading

name: loading, type: Bool, persistent: no

loadSurface

name: loadSurface, type: Trigger

progress

name: progress, type: Float, persistent: no

filenameInfo

name: filenameInfo, type: String, persistent: no