| MIL 10 User Guide
| Customize Help

Organization of the MIL modules



See also
Availability
Available in MIL-Lite

Available in MIL

All functions in MIL are grouped into modules. Functions are named based on their module and functionality. Each function name is prefixed with the letter M for Matrox, followed by a few letters representing the function's module name, and ends with a word that describes the function's purpose. For example, MbufSave() saves a data buffer in a file.

Similar MIL functions in different modules

Functions are grouped into modules according to their main functionality. For example, the Buffer module contains all the functions in MIL that are specific to allocating, controlling, inquiring about, importing, and saving buffers. All MIL modules are based on the same structure and you can find similar functions in different modules. These functions differ depending on the specifications of the module, but they all perform the same basic task.

The following specifies MIL functions that are available in most MIL modules. For more information on a specific function, see the MIL Reference.

  • M...Alloc(). Allocates the specified MIL object (for example, buffer, display, or context) and its required resources. You must allocate these before you use them. Once you are finished using them, you should release them using M...Free().

  • M...Free(). Frees an allocated MIL object and its resources.

  • M...Control(). Sets the controls for the specified MIL object (for example, buffer, context, or element(s) that are contained in the context). An M...Control() function allows you to customize how the operations of that specific module are performed. Note that most control types have a default setting.

  • M...Inquire(). Inquires about a specified setting. Most settings that can be set using M...Control() can be inquired using the corresponding M...Inquire() function.

  • M...Save(). Saves the specified MIL object (for example, the specified context or buffer) to a specified file.

  • M...Restore() / M...Load(). Restores the specified MIL object (for example, the specified context or buffer) from a specified file.

  • M...HookFunction(). Allows you to attach or detach a user-defined function to a specified event. Once an event-handler function is defined and hooked to an event, it is automatically called when the event occurs. The event-handler function is also referred to as a hook-handler function.

  • M...GetHookInfo(). Retrieves information about the event that caused the hook-handler function to be called. This function should only be called within the scope of a hook-handler function call.

Processing and analysis modules

The following specifies MIL functions that are common in most MIL processing and analysis modules. For more information on a specific function, see the MIL Reference.

  • M...AllocResult(). Allocates the specified result buffer. Result buffers store results obtained from the module's M...Calculate(), M...Read(), or M...Find() operations. When the result buffer is no longer required, release its memory, using M...Free().

  • M...Calculate() / M...Read() / M...Find(). Perform the operation(s) specific to the module, respecting the controls specified using M...Control(). The results of the operations are stored in the specified result buffer.

  • M...GetResult(). Retrieves the results of the specified type from the specified result buffer.

  • M...Draw(). Draws specific source information or results destructively into the specified destination image buffer or stores them vectorialy in a specialized MIL container, known as a graphics list.

  • M...Stream(). Loads, restores, or saves the specified MIL object (for example, context) from/to a file or memory stream.

Interactive functionality

Under Microsoft Windows XP/7/8, some MIL functions can launch dialog boxes that allow you to specify certain information at runtime. The most common functions that support dialog boxes are listed below:

  • M...Save() with M_INTERACTIVE. Opens the File Save As dialog box from which you can interactively specify the drive, directory, and name of the file.

  • M...Restore() with M_INTERACTIVE. Opens the File Open dialog box from which you can interactively specify the drive, directory, and name of the file.

  • M...Stream() with M_INTERACTIVE. Opens a dialog box from which you can interactively specify the drive, directory, and name of the file, when the StreamType parameter is set to M_FILE.

For a full list of all the functions that support dialog boxes, type INTERACTIVE into the edit field of the Search tab, in the left pane of this help file, and enable the "Match similar words" option.

You can also interactively add, move, resize, and rotate graphics in a graphics list, if the graphics list is associated to the display and interactivity is enabled on the display (MdispControl() with M_GRAPHIC_LIST_INTERACTIVE). For more information, see the Creating and modifying graphics interactively section of Chapter 22: Generating graphics.

Note that Linux only supports interactive functionality with MbufRestore(), MbufSave(), and the MIL Graphics module.