| MIL 10 User Guide
| Customize Help

MIL with .NET and Python



See also
Availability
Available in MIL-Lite

Available in MIL

Several wrappers are included with the installation of MIL. These are the MIL.NET wrapper and the MIL Python wrapper. These wrappers allow you to make use of MIL functions while writing applications in a MIL-supported .NET language (C#, Visual Basic), or in Python.

MIL with .NET

The MIL .NET wrapper is a set of classes, structures, and delegates that allows you to use MIL in a C# or Visual Basic .NET managed environment. To work in a managed .NET environment, you must first reference the Matrox.MatroxImaginglibrary.dll assembly in Visual Studio.

Using MIL with managed C# or Visual Basic is very similar to using MIL with unmanaged C or C++, as long as you keep in mind the characteristics of managed code, specifically the common language runtime and its garbage collector. In addition, when using the MIL .NET wrapper, all MIL functions and constants are exposed as methods and properties of a class called MIL. For more information on writing C# or Visual Basic code that calls MIL functions, see the MIL with.NET overview section of Chapter 36: Using MIL with.NET.

MIL with Python

The MIL Python wrapper is a Python library (module) that allows you to use MIL functions while writing code in Python language versions 2.7 and 3.4. To use MIL functions and constants in Python, you must reference the MIL wrapper within your application as described in the Importing required libraries and distribution of a MIL application in Python section of Chapter 37: Using MIL with Python.

Using MIL with Python is very similar to using MIL with C or C++ with a few exceptions. When using the MIL Python wrapper, all MIL functions and constants are defined in the MIL Python library (module), and when used, must be preceded with "MIL." throughout your Python code. For more information on writing Python code that calls MIL functions, see the MIL with Python overview section of Chapter 37: Using MIL with Python.