ComposeWEMDescriptionForU3D

MacroModule

genre

WEMPersistence

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

definition

ComposeWEMDescriptionForU3D.def

see also

WEMSaveAsU3D

keywords

string, parse

Purpose

The module ComposeWEMDescriptionForU3D composes a valid WEM description string that can be parsed by the WEMSaveAsU3D module.

Usage

Connect the WEM Label field and the WEM Description field from the “Result” box to the appropriate fields in a WEM processing chain (e.g., in WEMLoad module or WEMModify module).

Details

The WEMSaveAsU3D module saves WEMs to U3D files as defined in Standard ECMA-363 (Universal 3D File Format), 4th edition (June 2007). It parses the Label property and the Description property of each WEM patch.

Each patch should have a unique name, specified by its Label property.

More detailed U3D object properties can be specified using the Description property of a WEM patch. All of the following U3D properties need to be composed to a single string and thereafter written to the Description property of a WEM patch to be parsed by the WEMSaveAsU3D module.

All these properties need to be in a defined format. For example: names must be strings that consist of the letters a..z, A..Z, spaces “ “, brackets “(” and “)”, and the numerals 0..9 only. This module creates valid WEM Label and WEM Description strings.

Example

This hierarchy is built up by the following settings.

../../../Modules/Macros/ComposeWEMDescriptionForU3D/mhelp/Images/U3DObjectsHierarchy.png

Settings:

Field

Value

U3D Object Name

BD territory B5

U3D Model Name

Demo_LDLT (XYZ123)

U3D Group Name

BD Territories

U3D Color

1.0 0.0 0.0 ( Transparency 0.0)

U3D Object Name

BD territory B6

U3D Model Name

Demo_LDLT (XYZ123)

U3D Group Name

BD Territories

U3D Color

0.0 1.0 0.0 ( Transparency 0.0)

U3D Object Name

BD territory B8

U3D Model Name

Demo_LDLT (XYZ123)

U3D Group Name

BD Territories

U3D Color

0.0 0.0 1.0 ( Transparency 0.0)

U3D Object Name

BD branch B8

U3D Model Name

Demo_LDLT (XYZ123)

U3D Group Name

BD Vessels

U3D Color

1.0 0.0 0.0 ( Transparency 0.0)

U3D Group Color

0.75 0.75 0.75 ( Transparency 0.0)

U3D Object Name

BD branch B6

U3D Model Name

Demo_LDLT (XYZ123)

U3D Group Name

BD Vessels

U3D Color

0.0 1.0 0.0 ( Transparency 0.0)

U3D Group Color

0.75 0.75 0.75 ( Transparency 0.0)

U3D Object Name

BD branch B4

U3D Model Name

Demo_LDLT (XYZ123)

U3D Group Name

BD Vessels

U3D Color

0.0 0.0 1.0 ( Transparency 0.0)

U3D Group Color

0.75 0.75 0.75 ( Transparency 0.0)

U3D Object Name

Liver

U3D Model Name

Demo_LDLT (XYZ123)

U3D Color

1.0 0.0 0.0 0.5

Windows

Default Panel

../../../Modules/Macros/ComposeWEMDescriptionForU3D/mhelp/Images/Screenshots/ComposeWEMDescriptionForU3D._default.png

Parameter Fields

Field Index

Transparency (U3DColorTransparency): Float

Use (UseU3DColor): Bool

Transparency (U3DGroupColorTransparency): Float

Use (UseU3DGroupColor): Bool

U3D Color: Color

Use (UseU3DSpecularColor): Bool

U3D Group Name: String

WEM Description: String

U3D Grouped Color: Color

WEM Label: String

U3D Model Name: String

U3D Object Name: String

U3D Specular Color: Color

Visible Fields

WEM Label

name: WEMLabel, type: String, persistent: no

Shows a label stored in the WEM.

WEM Description

name: WEMDescription, type: String, persistent: no

Shows a description stored in the WEM.

U3D Object Name

name: U3DObjectName, type: String

Sets an arbitrary but unique name that is converted to a valid U3D Object Name.

U3D Group Name

name: U3DGroupName, type: String

Sets a group name for an object to be group in.

Important: Although the U3D standard supports an almost arbitrary hierarchy depth, the WEMSaveAsU3D module currently supports only one group level. All groups will get the same hierarchy level (groups cannot be assigned to other groups, but to models).

U3D Model Name

name: U3DModelName, type: String

Sets a model name to which an object or a group is assigned to.

Important: The WEMSaveAsU3D module currently supports only one single model. Different model names may be specified, but only the last one found will be considered and used for all objects!

U3D Color

name: U3DColor, type: Color, default: 1 1 1

Sets the color of an object if the appropriate Use checkbox is marked.

U3D Specular Color

name: U3DSpecularColor, type: Color, default: 1 1 1

Sets the specular color of an object if the appropriate Use checkbox is marked.

U3D Grouped Color

name: U3DGroupColor, type: Color, default: 1 1 1

Sets the color of an object group if the appropriate Use checkbox is marked.

If specified, each object is written twice to the U3D file: once with its original color and once with its group color. Two groups are also created: once with the group name plus the appendix “ (color coded)” and once with the group name plus the appendix “ (grouped)”. If this property is not specified, only one group without appendix is created.

NB: This color must have the same value for all objects that are grouped into a group with the same name!

Transparency (U3DColorTransparency)

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

Sets the transparency of an object if the appropriate Use checkbox is marked.

Transparency (U3DGroupColorTransparency)

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

Sets the transparency of an object group if the appropriate Use checkbox is marked.

Use (UseU3DColor)

name: UseU3DColor, type: Bool, default: FALSE

If checked, the specified color is used for an object.

Use (UseU3DGroupColor)

name: UseU3DGroupColor, type: Bool, default: FALSE

If checked, the specified color is used for a group.

Use (UseU3DSpecularColor)

name: UseU3DSpecularColor, type: Bool, default: FALSE

If checked, the specified specular color is used.