Chapter 13. Introduction to C++ Modules

Table of Contents

13.1. Module and Connection Specifics on the C++ Level
13.2. Some Tips for Module Design
13.2.1. Macro Modules or C++ Modules?
13.2.2. Combining Functionalities
13.2.3. Tips for Module Testing
13.3. Programming Examples

There are different types of modules that may be developed by the user of MeVisLab:

There are several noticeable characteristics for all these modules types, and it is not always easy to choose the best way of implementing a new project. In the following chapter, you will find information on:

13.1. Module and Connection Specifics on the C++ Level

ML modules on the C++-level:

  • Image processing modules are objects derived from class Module defined in the ML library and therefore are also called ML modules.

  • Image inputs and outputs are connectors to objects of class PagedImage, which are defined in the ML library.

  • Inputs and outputs for abstract data structures are connectors to pointers of objects derived from class Base and are called Base objects.

Inventor modules on the C++-level:

  • Most Inventor modules are objects derived from class SoNode defined in the Open Inventor library.

  • Inventor inputs and outputs are connectors to objects derived from class SoNode defined in the Open Inventor library. Many Inventor modules will return themselves as outputs (“self”). On inputs, they may have connectors to child Inventor modules.

  • Some Inventor modules are objects derived from class SoEngine. They are used for calculations and return their output not via output connectors but via fields.

  • Inventor modules may also have input and output connectors to Base objects and Image objects.

  • All standard Inventor nodes defined in the Open Inventor library are available in MeVisLab as Inventor modules.

Modules

In Section 2.3, “MeVisLab Modules”, we introduced modules by their functions and looks. Here a brief look at their programming basis:

1 Inventor Modules: green. Objects derived from class SoNode or SoEngine defined in the Open Inventor library.

2 ML Modules: blue. Objects derived from class Module defined in the ML library.

3 Macro Modules: brown. MeVisLab intern objects of the type MLABMacroModule.

There is no special module type for MLBase objects.

Module Inputs/Outputs

1 Inventor: Inputs/Outputs: half-circles. Connectors from/to objects derived from class SoNode defined in the Open Inventor library .

2 Image: Inputs/Outputs: triangles. Connectors from/to Image objects of type PagedImage defined in the ML library.

3 Base: Inputs/Outputs: squares. Connectors from/to objects derived from class Base defined in the ML library.