MIL_INT InitFlag, | //in |
MIL_ID *ContextAppIdPtr, | //out |
MIL_ID *SysIdPtr, | //out |
MIL_ID *DispIdPtr, | //out |
MIL_ID *DigIdPtr, | //out |
MIL_ID *ImageBufIdPtr | //out |
MappAllocDefault() is implemented as a macro. This macro can allocate and set up the requested MIL objects using the defaults specified during allocation and using the MILConfig utility. This macro can allocate and initialize a MIL application context, and allocate the default MIL system. On this system, MappAllocDefault() can allocate the default digitizer and display, and allocate and clear a default displayable image buffer.
The installation customizes the default setup. After installation, if you want to review or change the default settings of MappAllocDefault(), use the MILConfig utility.
Note, if allocating the default digitizer and the default DCF, selected using the MILConfig utility, is for a 3-band color (RGB) camera, then the default image buffer will be 3-band if allocated; otherwise, it will be 1-band if allocated. The size of a default image buffer is 640x480, in pixels.
Note, upon execution of this function, a default graphics context is automatically allocated. This default graphics context can be used in MIL function calls by specifying M_DEFAULT wherever a graphics context identifier is required.
When you have finished using the allocated MIL objects, you must free them using MappFreeDefault(). With multiple threads, you must free the allocated application context (using MappFreeDefault()) in the thread in which it was allocated.
Specifies the type of initialization setup to perform and is used principally to initialize the default system. This parameter can be set to one of the following:
For specifying the type of initialization
setup
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_COMPLETE. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_COMPLETE + |
Specifies to initialize the system completely; the system is initialized to its default state and any required resident software is downloaded. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_PARTIAL + |
Specifies to initialize the system to its default state, but it does not download any resident software. (more details...) |
† | d |
You can add the following value to the above-mentioned values to specify a cluster node value without using a cluster manager.
For specifying a cluster node
value
|
|||||||||||||||||||||||||||||||||||||||
Combination value |
Description
|
||||||||||||||||||||||||||||||||||||||
Specifies a cluster node value when none is specified with a cluster manager. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the cluster node value. |
|||||||||||||||||||||||||||||||||||||||
|
Specifies the address of the variable in which to write the application context identifier. Upon execution of this function, the application context is allocated and its identifier returned. Instead of using MappAllocDefault(), you can use MappAlloc() to allocate an application context. Note, an application context must be allocated to allocate any other object in MIL.
Specifies the address of the variable in which to write the system identifier. Upon execution of this function, the default system is allocated and its identifier returned. Instead of using MappAllocDefault(), you can use MsysAlloc() to allocate a system. MappAlloc() will also allocate a default Host system. Note, a system must be allocated to allocate any other objects on it (display, digitizer or data buffers).
Specifies the address of the variable in which to write the identifier of the default display. If this parameter is set to M_NULL, a display is not allocated; otherwise, the default display is allocated and its identifier returned.
Specifies the address of the variable in which to write the identifier of the default digitizer. If this parameter is set to M_NULL, a digitizer is not allocated; otherwise, the default digitizer is allocated and its identifier returned.
Specifies the address of the variable in which to write the identifier of the default image buffer. If this parameter is set to M_NULL, an image buffer is not allocated; otherwise, the default image buffer is allocated and its identifier returned. It is then cleared and displayed on the system's display screen.
For example, a typical setup for Matrox Radient board in its power-up state with one input device and one default image buffer (full-screen size) selected on the default display is:
MappAllocDefault(M_COMPLETE, &Application, &System, &Display, &Digitizer, &ImageBuffer);
If, for example, you don't need to acquire data from the camera but want to perform the rest of the above setup, you would make the following call:
MappAllocDefault(M_COMPLETE, &Application, &System, &Display, M_NULL, &ImageBuffer);
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |