Global Macro
Example 2.2: Creation of global macro modules
Example 2.2: Global macro modules
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
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.
Example 2.4: GUI development
Example 2.4: Building a Panel Layout: Interactions with macro modules
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) .
Creating a panel for the macro module flilter
Creation of a module panel
In Example 2.2 we created the global macro module Filter
. By now, this module does not have a proper panel. When double-clicking
the module, the Automatic Panel is shown.
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. But, much more important: You can access module inputs and outputs, as well as module fields to process their parameters and data. You can equip user interfaces and panel with custom functionalities. Python can be used to implement module interactions. When you open a panel or you press a button in a panel, the executed actions are implemented via Python scripting.
Example 2.5.2: Module interactions via Python scripting
Example 2.5.2: Module interactions via Python scripting
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 ]. Select Macro module and press Run.
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. Then add a View2D
and View3D
to your workspace and connect the modules as seen below.
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.
The viewer is empty because the image needs to be set via Python scripting.