3.4. Adding Viewers to ImageLoad

Instead of using the Output Inspector (whose display might change with every clicked connector), it is sensible to add a viewer to the network. There are two standard macro modules available in MeVisLab which provide standard viewer configurations for 2D and 3D rendering, namely View2D and View3D. Especially the 2D Viewer is frequently used to examine image processing results within a module pipeline, for example. Once you begin to implement your own applications, you are free to create your own viewer implementations adapted to your special tasks.

3.4.1. Adding the View2D Module

  1. Add a View2D module to your network. In the Modules menu it is located at ModulesVisualization2D ViewersView2D.

    The View2D module has one input connector for the image to be rendered, as well as three Inventor inputs.

  2. Feed in the image by connecting the image output of the ImageLoad module with the image input of the View2D module. This is done as follows:

    1. Click the output connector of ImageLoad.

    2. Keep the left mouse button pressed while dragging the connection to the input connector of View2D (white line).

    3. Check that the connection is well-defined (green line).

    4. At the input connector of View2D, release the mouse button and establish the connection (blue line).

    Figure 3.15. Setting up the Connection

    Setting up the Connection


    There are many more ways to connect and to disconnect modules, see Section 3.4, “Connecting, Disconnecting, Moving, and Replacing Connections”.

    Although the connection is established, no image rendering has started yet. To initialize rendering, open the View2D panel by double-clicking the View2D module in your network. As you can see, the default panel is the viewer itself.

    Figure 3.16. Panel of View2D

    Panel of View2D

    The View2D panel provides a standard viewer with many features, like slicing, zooming, windowing, annotations, slab view, cine mode, and many more. A full description of all supported features and how to use them can be found on the View2D help page which you can open from the module's context menu.

    The View2D module offers various settings. As the default panel is the viewer, the Settings panel needs to be opened explicitly from the context menu via Show WindowSettings.

    Figure 3.17. Opening the Settings Panel of View2D

    Opening the Settings Panel of View2D

    Figure 3.18. Settings Panel of View2D

    Settings Panel of View2D


    A module always has one automatic panel and may have an arbitrary number of additional panel windows, as defined in an MDL file (in the .script file by default). The automatic panel lists all variables, fields and inputs/outputs of the module; the scripted panels may only include a fraction of these fields (see also Section 2.7, “User Interfaces Controls”) or more controls than fields.

    Figure 3.19. Automatic and Settings Panel of View2D

    Automatic and Settings Panel of View2D

  3. Now is a good time to save your network as MyFirstNetwork.mlab. You can do this in several ways:

    • Select FileSave or press the respective keyboard shortcut (for how to get a list of all shortcuts, see the MeVisLab Reference Manual, chapter Shortcuts).

    • Click the disk symbol in the toolbar.

    The network modules and all module parameters are stored. Next time you open the network, you will get access to the loaded image at the output of the ImageLoad module immediately.


    You can quickly re-open the last twenty networks via the menu bar, FileRecent Files.


    The most recent network file can be opened via FileOpen Most Recent File which has an own keyboard shortcut.


    If the option Auto save MeVisLab documents in the Preferences is selected, MeVisLab networks are auto-saved as <NetworkName>.mlab.auto upon major changes. This allows for restoring the networks in case of system crashes. Auto-saved copies are deleted when the according networks are saved.

3.4.2. Adding the View3D Module

The View3D macro module is an easy-to-use application of the SoGVRVolumeRenderer module, which is a high-end, hardware-based image rendering module using 3D textures. Adding the View3D module to the network, we get access to a 3D scene of our example image.

Figure 3.20. Connecting the View3D Module

Connecting the View3D Module

Figure 3.21. The View3D Panel

The View3D Panel

In addition to the 3D display offered by the Output Inspector, the View3D viewer comes with several panels on which you can set display details or even record a movie.