MeVisLab Toolbox Reference
WEM Base Modules

Notifications

The communication of WEM modules in a MeVisLab network is performed mostly via touching fields. But for synchronizing visualization modules, it is essentially that those modules are able to communicate 'horizontally'. This is archieved by using an observer pattern. A module can register itself as an observer on the WEM. If certain notifications are fired (like repaint or selection), the module can react in its individual way.

While firing a notification, a std::vector of WEMEventContainer is propagated through the network. In this container class the event can be described per patch.

In MeVisLab version 2.8, a number of changes have been introduced to the WEM base classes, see below.

WEMModule

This is the base class for the WEMGenerator, WEMProcessor and WEMInspector. In this class the processing state and the elapsed processing time is maintained.

WEMGenerator

Modules should derive from the WEMGenerator class if a new WEM is generated here. Accordingly, this class provides a module skeleton with one WEM output.

As of MeVisLab 2.8:

  • the method _cleanup() has been removed; the clearing of the output WEM is now done in the method _process()
  • the fields _autoClearFld and _autoUpdateFld have been removed. A new trigger field _clearFld and a new enum field _updateModeFld have been introduced

WEMProcessor

The WEMProcessor class provides one WEM input and one WEM output and is meant for modules that change a WEM.

As of MeVisLab 2.8:

  • the WEMProcessor module do not work directly on its input WEM by default anymore. By default, the module works on a copy.
  • a WEMProcessor can, however, still work directly on its input WEM but the field controlling this is hidden on the automatic panel to avoid misuse by accident. A WEMProcessor does not output the WEM it is working directly on anymore, neither is auto[Update|Clear] available if a WEMProcessor works directly on its input. Instead, those modules have to be enscapsulated in a macro and the flow control has to be implemented explicitly with Python

WEMInspector

The WEMInspector class provides just one WEM input and is meant to be used for modules that compute and display information on the WEM, or perform a rendering.