4.3. Preferences

[Note]Note

Settings in the Preferences panel overwrite the corresponding settings in the mevislab.prefs file.

The Preferences (along with other information, such as the list of recent files or stored user layouts) are saved in a manner that prevents them from being overwritten during updates or reinstallations of MeVisLab:

[Tip]Tip

For many options in the Preferences, a mouse-over tooltip is available.

4.3.1. Preferences — General

Figure 4.6. Preferences — General

Preferences — General

User Name

The user currently signed in to this computer.

Resources

The optimal Resources settings depend on the system and platform. Use the default settings if uncertain.

Image Processing

Image Processing Cache Size (MB)

Defines the memory available for caching (intermediate) ML image tiles/pages within a network of image processing modules. Reducing the cache size will slow down the image processing pipelines because images will be recalculated more frequently in individual modules. Cache sizes too large might cause a collapse of your system because of reduced memory for other programs. For 2 GB RAM, a value of 512 MB is well-tested. For details, see the ML Programming Guide, “Optimizing Data Flow in Module Networks”.

Maximum Threads Used for Image Processing

Sets the number of parallel threads for image processing. For more details on multi-threading, see Section 28.6, “Multi-threading in MeVisLab”.

Use classic ML host

If checked, the classic ML host is used. Otherwise, an ML host is used that implements an optimized multi-threading for the ML.

Visualization

Total Texture Memory on Graphics Card (MB)

Sets the amount of texture memory (texture RAM, TRAM) on the graphics card to be used for MeVisLab texture processing, for example, in the View2D module.

Volume Renderer Texture Cache Usage (%)

Defines the percentage of texture memory that the GVR volume renderer may use.

IDE Options

Auto reload files when changed

If selected, the .def, .script, and .py files of a module are reloaded when reloading the module panel (by double-clicking the module or selecting Show WindowPanel from the module context menu).

[Note]Note

Networks .mlab files (for macro modules) are not reloaded.

Auto save network documents

If selected, MeVisLab networks are auto-saved as <NetworkName>.mlab.auto upon major changes. This allows restoration in case of system crashes. Auto-saved copies are deleted when the corresponding networks are saved.

Show network selector when switching documents via CTRL-Tab

If selected, pressing CTRL+TAB (or SHIFT+CTRL+TAB) does not switch directly to the next or previous network document, but shows a network selector preview. For more details, see Section 3.15, “Network Selector”.

Restore module panels

If selected, opening a network restores all module panels (including window size and position) to their state (opened, minimized, positioning, etc.) when the network was last saved.

Enable debugging of widgets

Enables/disables debugging module panels. When enabled, CTRL+left-clicking a GUI control in a module panel opens the .script file in the default text editor at the line in which the GUI control is defined.

Auto Load Network Documents

Sets the number of recent networks to be loaded automatically upon MeVisLab startup. This may considerably slow down the startup process.

[Note]Note

If loading a network causes a crash, this option can be problematic, as the network will automatically load upon the next start of MeVisLab, potentially leading to another crash. Use this option with caution!

Display System Info...

Displays system information regarding the Open GL vendor, the available GL extensions, and more in an extra window.

Check External Tools...

Starts the Tools Check tool that checks for software necessary for certain build tasks. This tool is also part of the ToolRunner. See the ToolRunner Documentation for details.

4.3.2. Preferences — Packages

MeVisLab modules are organized in packages. These are defined as certain folder structures (see the Package Structure documentation for details). The Packages category gives an overview over the available and active packages.

Figure 4.7. Preferences — Packages

Preferences — Packages

The packages are separated into:

  • User Packages: Packages found in the user path (packages in other paths can be added manually). These are the default packages for user-defined modules.

  • mevislab.prefs: Packages resulting from the paths given in the prefs file.

  • Installed Packages: Packages resulting from an installation of, e.g., the MeVisLab SDK.

If a package with the same PackageIdentifier is found more than once, the last package found will overwrite the previously loaded packages (in the order given above, see the Package Structure documentation for details). Overwritten packages will be grayed out and labeled “(Overwritten)”.

Create New Package

Opens the Package Wizard, see Section 26.5, “Packages”.

Add Existing User Packages

Opens the default file browser to add a user package. Folders are read recursively and all packages below them are automatically included.

Remove

Removes the selected user package from MeVisLab's search path. (Installed packages cannot be removed.) Removed user packages can always be re-added later.

4.3.3. Preferences — Module Groups

The Module Groups category lists optional groups of modules that are not loaded by default. Check the corresponding group to get access to modules of the group.

Figure 4.8. Preferences — Module Groups

Preferences — Module Groups

Scroll to the right to see additional comments and the number of modules for each group.

After confirming the selection with OK, the package groups of the selected modules and the user packages are scanned and loaded.

Show modules by the current user

If checked, the module written by the current user are always available and shown. The current user's name is displayed on the General tab, see Figure 4.6, “Preferences — General”. If this username appears as a value in the “author” or “maintainer” tag, the module will be available, except the module is in the “deprecated” group.

4.3.4. Preferences — Supportive Programs

Figure 4.9. Preferences — Supportive Programs

Preferences — Supportive Programs

Internal Text Editor

Use internal text editor (MATE)

If selected, the internal text editor MATE is used, offering many useful features for MeVisLab files. Recommended! See Chapter 27, MATE for details.

Handled Extensions

Allows the definition of a list of file extensions for which MATE is automatically opened.

External Programs

Allows the definition of external applications and program arguments for file types used in MeVisLab. Click Browse to select the applications manually, or Detect to autodetect applications that work especially well with MeVisLab.

[Note]Note

On Linux, it can happen that an external program depends on a third party library that MeVisLab provides. If problems occur, e.g., because a KDE program loads an incompatible Qt library from MeVisLab, then use a shell script that clears LD_LIBRARY_PATH before it calls the external program.

For example, to safely run konqueror from MeVisLab, place the following script in ~/bin and make sure ~/bin is the first entry in PATH before running MeVisLab.

#!/bin/sh
LD_LIBRARY_PATH= konqueror
      

Arguments are options added when starting the program. They can be entered manually or are added by the Detect feature.

Extensions lists the extensions for which the assigned program will be used. This overrides system settings, but only within the MeVisLab context.

  • TextEditor: Although it is recommended to use the internal text editor MATE, other text editors can be used in conjunction with MeVisLab. With the argument %f(%l), a file and a line number in it will be passed to the text editor. The Detect feature will check for TextPad on Windows (see the web link for installing) and set the options accordingly.

  • ImageViewer: Graphic applications may be used in conjunction with MeVisLab. If none is set, the system default will be used. The Detect feature will check for IrfanView on Windows (see the web link for installing) and set the options accordingly.

  • MoviePlayer, HTMLBrowser: May primarily be needed to be set on Linux.

Network Proxy

Allows the configuration of a proxy server for HTTP connections to access the Internet.

  • Enable proxy: If selected, a proxy will be used to access the Internet.

  • Type: Sets the type of the used protocol.

  • Host name: Sets the host name of the proxy server.

  • Port: Sets the port of the proxy server.

4.3.5. Preferences — Paths

Figure 4.10. Preferences — Paths

Preferences — Paths

Default File Dialog Path

Sets the default path in the file dialog. If none is specified, the path last used will be offered.

Screenshot Path

Sets the path for files of the View Screenshot Gallery, see Chapter 19, Screenshot Gallery.

Snippets Path

Sets the path for network snippets, see Chapter 25, Snippets List

Applications Settings Path

Sets the path in which MeVisLab applications save their settings.

Logfile

Sets the path to the logfile written by MeVisLab.

[Note]Note

You can also set the path to the logfile in the .prefs file with logfile = <absolutePath/file.log>.

4.3.6. Preferences — Scripting

Figure 4.11. Preferences — Scripting

Preferences — Scripting

Scripting

Default Python Code

Sets a default Python code snippet to be used in the scripting console.

Additional Python Path

Adds the path to an additional Python package so that it can be found in the import statement.

Python Debugger Code

Sets Python debugger code as described in the Scripting Reference.

[Note]Note

The 'Additional Python Path' and the 'Python Debugger Code' are for attaching an external debugger to Python.

Using an external Python debugger is obsolete since MATE has a built-in debugger for Python (see Section 27.8, “Python Debugger”).

4.3.7. Preferences — Network Appearance

Figure 4.12. Preferences — Network Appearance

Preferences — Network Appearance

Mini Map

Show Mini Map

The Mini Map provides an overview of the entire network. See also Section 3.13, “Using the Mini Map”.

The following settings for the Mini Map are available:

Show Mini Map

  • Automatic: Is displayed when parts of the network are outside the workspace.

  • Never: Is never displayed.

  • Always: Is always displayed.

Position

Defines the position of the Mini Map: Upper Right (default), Lower Right, Upper Left, Lower Left.

Show parent navigation frames

(For macro modules only) Shows the hierarchy of the opened networks. For example, when adding a View2D module, opening its internal network and there the internal network of View2DExtensions, the hierarchy of involved macro modules will be displayed in small frames next to the usual mini map (which might not be shown, depending on its mode).

Network Rendering Style

Style

Offers four options for styling the network rendering:

  • Full (Default): Network is rendered in color with 3D and highlighting effects.

  • Print (Black & White): Network is rendered as simple black-and-white drawing.

  • Print (Color): Network is rendered as a simple color drawing without effects and a white background.

  • Comic: Network is rendered as a simple color drawing without effects but with a gray background.

All four styles are fully functional in terms of editing, connecting modules, displaying a Mini Map, etc. However, it is recommended to use the print styles only when screen-capturing and printing the network.

Halo

Offers two options for styling the halo of highlighted modules:

  • Classic (Default): The halo is rendered as classic halo effect.

  • Alternative: The halo is rendered as rectangle around the module.

To change the halo colors of the selected modules and the modules attached to them, edit the settings of Selected, Source, and Destination by clicking on the respective color field.

Global Zoom

Factor

Sets a global zoom factor. Only applicable to modules and networks that do not fill the network space automatically. Other modules/networks will be displayed with the given global zoom factor upon double-clicking the networks space or using the button (Show the entire network) in the toolbar.

Default Colors

Groups

Sets the background color for module groups, see Section 3.11, “Using Groups”. The default is green.

Notes

Sets the background color for notes, see Section 3.12, “Using Notes”. The default is yellow.

Modules

Font Size

Sets the font size of the module name in the display (number referring to a zoom of 100%).

Snap to grid

Sets the grid size in the workspace to which the modules snap when moved.

Show ML image state

Shows the image states by coloring the connectors.

  • Green: Valid and updated ML image.

  • Yellow: Valid but not updated ML image.

  • Red: Invalid ML image.

Badge Script

Selects a script that provides a badge icon for modules. Badge icons are intended to make users aware of certain properties of a module. See Section 4.3.7.1, “How to define your own badge scripts” for how to define your own badge scripts.

Connector Details

Show connector detail info

Enables detailed information for ML image, Inventor, or Base objects currently available on the connectors when a single module is selected.

Detail Font Size

Sets the font size for the connector detail info.

Details On Zoom

Sets the threshold zoom factor below which the details are not displayed.

Verbose Details On Zoom

Sets the threshold zoom factor below which the verbose details are not displayed.

Connector Image Preview

Show Connector Image Preview

Shows an image preview at an image connector when a single module is selected.

Image Preview Thumbnail Size

Sets the size of the image preview thumbnails in pixels.

[Note]Note

All sizes and fonts relate to a zoom factor of 100%.

4.3.7.1. How to define your own badge scripts

A badge script consists of a single .py Python file and a .def file (which just points to the Python file and declares a title for display in a combo box).

The script is treated like an invisible macro module. For each module type, the run() function of the script is called with the module's type as string argument. The run() function may return a dictionary with the entries iconicon which should be the path to an icon (preferably .png), description, a text displayed in the tooltip of the module; and optionally icon_size, if the icon must be scaled down for network display (e.g., "20x20"). If no icon should be displayed for a module, None can be returned.

Example MyBadgeScript.def file:

BadgeScript {
  title  = "Some example badge script"
  source = "$(LOCAL)/MyBadgeScript.py"
}      

Example MyBadgeScript.py file:

from mevis import MLAB

def run(moduleName):
    author = MLAB.moduleInfo(moduleName).get("author")
    if author and "John" in author:
        return {
            "icon": "$(LOCAL)/johns.png",
            "description": "Module written by a John"
        }
      

4.3.8. Preferences — Network Interaction

Figure 4.13. Preferences — Network Interaction

Preferences — Network Interaction

Module Placement

Placement of newly created or pasted modules

Defines where newly created or pasted modules are placed in the network:

  • Into the middle of a network: Modules are inserted in the middle of the network; multiple modules are inserted with a slight offset in position.

  • At current mouse position (Default): Modules are inserted at mouse position; multiple modules are inserted in a cascading manner. If the mouse cursor is outside the network's window, the modules are placed into the middle of the network.

Module Arrangement Spacing

Horizontal / Vertical

Enter arbitrary values to adjust the distances between modules for the autoArrange scripting command. (These settings do not directly correspond to pixels but depend on zoom level and other factors.)

Network Zoom Style

Zoom to

Defines the position around which the zoom should be centered. Available options include zooming to the center of the network or to the current cursor location.

Network Mouse Gestures

Use mouse gestures to close current network document

Enables or disables the use of mouse gestures (see Section 3.17, “Network Mouse Gestures” for details).

This option only affects Windows systems, as on Linux and macOS, context menus are opened on right-click rather than on right-button release.

Interaction Device

Device Selection

Allows the selection of special interaction devices (mice, touchpads, especially Apple devices). For each selected option, the available features are listed below.

  • Three-button mouse with scroll wheel: (Default)

  • Two-button mouse with scrolling in multiple directions: For example, Apple Magic Mouse

  • Multi-touch pad: For example, Apple MacBook Touchpad

4.3.9. Preferences — Error / Debug Handling

Figure 4.14. Preferences — Error / Debug Handling

Preferences — Error / Debug Handling

cout (standard output stream) and cerr (standard error output stream) are standard outputs in C++. The difference is that std::cout is a buffered stream, making it especially useful for general output, while std::cerr is unbuffered, making it ideal for error messages. The outputs are independent of each other, allowing both to be directed to different targets.

Redirect cout

Enables the redirection of the cout stream.

Send to MeVisLab debug output

Redirects cout to the Debug Output (default).

Send to Visual C++ debug console (Windows only)

(Only if MeVisLab is started from within Visual C++) Redirects cout to the Visual C++ Debug Console (on Windows).

Use default cout

Redirects cout to the default output (for example a console). Must be activated explicitly; otherwise, only the redirection will be output.

Redirect cerr

Enables the redirection of the cerr stream.

Send to MeVisLab debug output

Redirects cerr to the Debug Output. (default).

Send to Visual C++ debug console (Windows only)

(Only if MeVisLab is started from within Visual C++) Redirects cerr to the Visual C++ debug console.

Use default cerr

Redirects cerr to the default output (for example, a console). Must be activated explicitly; otherwise, only the redirection will be output.

Exception Handling

Catch Inventor exceptions and Catches core exceptions

Exceptions are handled as selected for each type of exception:

On Warnings, On Errors, etc.

Defines the actions to be taken upon warnings, errors, etc. This is especially helpful if no source code is available for detailed tracing. Possible settings: Continue, Abort, Exit(0), Exit(ErrCode).

Symbol Controlled Debugging

Print all debug output

Prints out all debug outputs from the code (for example, everything tagged with ML_DEBUG).

Use symbol controlled debugging

Debugging is based on symbols, which are special classes. Enter the debug symbols to filter in the text field, for example, ML_ERRORTEST.

[Note]Note

Refer to the ML Guide for detailed information on symbol-controlled debugging.

4.3.10. Preferences — Shortcuts

Figure 4.15. Preferences — Shortcuts

Preferences — Shortcuts

The shortcut editor allows to set and/or change shortcuts for various actions. It also shows which shortcuts are active at the moment.

To remove a shortcut for an action, select the action, select its shortcut key (if there are multiple), and press Remove Key.

To set a keyboard shortcut, select the action and click the field labeled Click to add key. Then, press the key or key combination you want to assign to this action. This can be done multiple times, adding a shortcut for the action with each repetition.

[Note]Note

The same shortcut editor is available in MATE.

Reset To Default

Resets the keyboard shortcut for the selected action to its default setting.

Remove Key

Removes the currently shown shortcut key for the selected action.

Reset All To Default

Resets all keyboard shortcuts to their default settings.