Mesh Compression

Modular Virtual Environment - 2


Modular Virtual Environment 2 (MVE-2) project is based on .NET Technology. It offers easy-to-use, data-flow based modular environment. Its primary "customers" are researches and students together with their projects. Our environment makes these projects compatible with each other by minimum additional effort. API of module is forcing to follow good programming habits, such as clear problem decomposition, precise comment writing and cooperation with other programmers. Use of MVE-2 leads to less routine programming due to compatibility and reusability of existing modules. Therefore, users can concentrate on their particular problem and employ modules for marginal tasks.

Project structure

Main part is MveCore that provides runtime and module management functionality. Functionality of core is accessed by GUI and command line frond-end.

Advantage of our system is implementation simplicity of plain module. However, there is power and flexibility when needed. This advantage is very important for programmers at the beginning of their career. Another speciality of MVE-2 is execution mechanism of module network. Possibilities of modules topology are on the half way between simple pipeline and complete visual programming (such as LabView). Many other advantages arise from use of pure .NET.

Important features:

  • general core, ready for modules and data types from any application area,
  • module-map support cycles and sub-branches,
  • intuitive and friendly API for modules and data structures,
  • automatic generation of modules library documentation,
  • XML representation of all data types and module-maps.


MapEditor is a GUI front end of MVE-2 system. It allows module map editing, module configuration and execution. Screenshot of GUI with convolution example follows.

In the upper left corner is edit window with a simple pipeline using two sources (PictureLoader, ConovlutionMask) and two sinks of RegGrid2DRenderer. In the upper right corner there is a ModuleView dialogue that contains list of available modules that are ordered according to namespace. The standard output is redirected to the output console, which usually displays important messages from modules and core. Currently it displays running time of modules. The two blue cars in the center are the original and the filtered image rendered by renderers. In the bottom left corner a setup dialogue of convolution source module is shown. User can define the convolution mask via this dialogue.

Sinus is an example of sub-branch construction. Execution of Sinus module is controlled by GraphCreator module. In this particular case: Whole module-map runs only once while the Sinus module runs 100 times.

Counter is an example of a DelayModule usage. The DelayModule acts as a single place memory with initialization. It returns data form previous (N-1) step. In the first step it returns data from initialization port. Thus it allows cycles in module-map graph. This example counts from zero to number of runs minus one. The DelayModules can be chained.

Module creation is based on inheritance mechanism. There are only two methods that have to be overridden. The first one is constructor, which creates ports and defines its names and accepted data types. The second one is Execute method that represents the activity of module. There is a set of methods that can be called and set of events that can be handled by module, which provides good flexibility for module. Data type creation is by analogy.

Example of implementation of simple module that calculate sinus of input value follows.

using System;

using Zcu.Mve.Core;

namespace Examples


  [ModuleInfo("Milan Frank", "Module calculate sinus of given number.", IconName="Sinus.ico")]

  [PortInfo("in", "Independent variable")]

  [PortInfo("out", "Dependent variable")]

  public class Sinus : Zcu.Mve.Core.Module


    ScalarNumber y = new ScalarNumber();

    public Sinus()


      AddInPort("in", typeof(ScalarNumber));

      AddOutPort("out", typeof(ScalarNumber));



    public override void Execute()


      ScalarNumber x = (ScalarNumber) GetInput("in");

      y.Val = Math.Sin(x.Val);

      SetOutput("out", y);




Documentation of module library can be generated automatically by MMDoc utility distributed with MVE-2 system.

Project supported by MSMT project 235200005 and Microsoft Research 2003-178