Macro Modules

Chapter I: Basic Mechanisms of MeVisLab

Basic Mechanics of MeVisLab (Example: Building a Contour Filter) In this chapter you will learn the basic mechanisms of the MeVisLab IDE. You will learn how to re-use existing modules to load and view data and you will build your first processing pipeline.      This example is also available on YouTube. Extra Infos:  Additional information on the basics of MeVisLab are explained here Loading Data First, we need to load the data we would like to work on, e.

Example 2: Macro modules and Module Interaction

Example 2: Macro modules Macro modules and Module Interactions via User Interface and Python Scripting MeVisLab provides different types of modules, which can be distinguished by their color. The brown modules are called Macro modules. Macro modules condense a whole network into one module. You can open the internal network by pressing the middle mouse button or via right mouse click and select [ Help → Show Internal Network ]. Macro modules provide the possibility to create customized user interfaces and Python interactions.

Example 2.2: Creation of global macro modules

Example 2.2: Global macro modules      This example is also available on YouTube. Introduction In this chapter you will learn how to create global macro modules. There are many ways to do this. You can convert local macros into global macro modules or you can directly create global macro modules using the Project Wizard. In contrast to local macro modules, global macro modules are commonly available throughout projects and can be found via module search and under [ Modules ].

Example 2.3: Creation of module help

Example 2.3: Creation of module help Generating help of a macro module is part of the video about macro modules from Example 2: Creation of global macro modules      This example is also available on YouTube. Introduction In this chapter, you will learn how to create a help page and an example network. For hands-on training, we will use the macro module Filter, which was created in the previous chapter. Depending on the way the macro module was created the default help page and example network might or might not exist.

Example 2.4: GUI development

Example 2.4: Building a Panel Layout: Interactions with macro modules      This example is also available on YouTube. Introduction This chapter will give you an introduction into the creation of module panels and user interfaces. For the implementation you will need to use the MeVisLab Definition Language (MDL) . Extra Infos:  More information about GUI design in MeVisLab can be found here Creating a panel for the macro module flilter Creation of a module panel In Example 2.

Example 2.5: Interactions via Python scripting

Example 2.5: Module Interactions Using Python Scripting Introduction This chapter will give you an overview over Python scripting in MeVisLab. Here, no introduction into Python will be given. However, basic knowledge in Python is helpful. Instead, we will show how to integrate and use Python in the MeVisLab SDK. In fact, nearly everything in MeVisLab can be done via Python scripting: You can add modules to your network, or remove modules, you can dynamically establish and remove connections and so on.

Example 2.5.2: Module interactions via Python scripting

Example 2.5.2: Module interactions via Python scripting      This example is also available on YouTube. Introduction In this example, you will learn how to add Python scripting to your User Interface. The network used in Chapter V will be used for creating the macro module. Steps to do Creating the macro module First, we condense the example network into a macro module and then we create a panel for that module. To create a macro module use the Project Wizard, which you find under [ File → Run Project Wizard ].

Example 3: Creating a simple application

Example 3: Creating a simple application Introduction In the previous examples, you already learned how to create macro modules, user interfaces and how to interact with your UI via Python scripting. In this example, you will learn how to create a simple Prototype application in MeVisLab including a User Interface with 2D and 3D viewer. You will learn how to implement field listeners and react on events. Steps to do Create your network Start with an empty network and add the Module ImageLoad to your workspace.

Step 2: Prototyping - Create a macro module

Step 2: Prototyping - Create a macro module      This example is also available on YouTube. Introduction In this example, we encapsulate the previously developed prototype network into a macro module for future application development and automated testing. Steps to do Make sure to have your *.mlab file from the previous tutorial available. Package creation Packages are described in detail in Example 2.1: Package creation. If you already have your own package, you can skip this part and continue creating a macro module.

Example 1: WebCam access with OpenCV

Example 1: WebCam access with OpenCV Introduction In this example, we are using the PythonImage module and access your WebCam to show the video in a View2D. Steps to do Creating the network to be used for testing Add the modules to your workspace and connect them as seen below. Example Network The viewer is empty because the image needs to be set via Python scripting. Info:  More information about the PythonImage module can be found here Create a macro module Now you need to create a macro module from your network.