| Customize Help

Using the defaults



During the installation of your MIL software, you are asked a number of questions (such as, the type of Matrox hardware installed in your computer), so that the installer knows what to install. This information is also used to define the default settings that are configurable. You can change these default settings later, using the MILConfig utility, the MIL configuration utility.

Using the MILConfig utility to change your default settings

Review the Default Values tab in the MILConfig utility to make sure that your computer's default settings match your application's required default settings. If they don't match, you can use the MILConfig utility to change them. For example, you can use the MILConfig utility to change the default system, the default image buffer size and attributes, the default display settings, and the default digitizer's DCF.

Using your defaults

You can use the MappAllocDefault() macro to allocate a MIL application context and your default system. On this system, MappAllocDefault() also allows you to allocate your default image buffer, default display, and default digitizer. Alternatively, you can use MappAlloc(), MsysAlloc(), MbufAllocColor(), MdispAlloc(), and MdigAlloc() with M_DEFAULT to allocate these defaults. By allocating these using their default settings, you create a more portable, device-independent application, since these settings are not hard-coded in your application, and are determined when your client installs the MIL software.

If the MIL driver for a Matrox frame grabber has been installed, the size, number of bands, and attributes for the default image buffer will be established based on the specified DCF for the default digitizer. If a monochrome DCF is specified as the default, a single-band monochrome buffer is allocated as the default image buffer. If a color DCF is specified, a multi-band color buffer is allocated as the default image buffer. The default buffer size is the same as that of the image capture-size specified in the DCF.

When allocating both the default image buffer and the default display using MappAllocDefault(), the image buffer is given a displayable attribute, cleared, and selected to the display.

Note that although there are advantages to using the default settings, it can make debugging more difficult since the settings for the defaults are not determined within your application.