C++
Developing Your Own C++ Modules
C++ Module Development
Introduction
The development of your own C++ modules can be done by ML modules and by Open Inventor modules.
Important Information:
Make sure to use a compiler that is compatible with your currently installed MeVisLab version.
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.
Open Inventor Modules on the C++ Level
- Most Open Inventor modules are objects derived from class SoNode, defined in the Open Inventor library.
- Open Inventor inputs and outputs are connectors to objects derived from class SoNode, defined in the Open Inventor library. Many Open Inventor modules will return themselves as outputs (“self”). On inputs, they may have connectors to child Open Inventor modules.
- Some Open Inventor modules are objects derived from class SoEngine. They are used for calculations and return their output not via output connectors but via parameter fields.
- Open Inventor modules may also have input and output connectors to Base objects and Image objects.
- All standard Open Inventor nodes defined in the Open Inventor library are available in MeVisLab as Open Inventor modules.
This chapter describes some examples for developing your own ML and Open Inventor modules.
Example 1: Creating a New ML Module for Adding a Value to Each Voxel
Example 1: Creating a New ML Module for Adding a Value to Each Voxel
Precondition
Make sure to have cmake installed. This example has been created using CMake Legacy Release (3.31.11).
Introduction
In this example, we develop our own C++ ML module, which adds a constant value to each voxel of the given input image.
Steps to Do
Create a New ML Module
Before creating the module, make sure to have your own user package available. See Package creation for details about Packages.


