| MIL 10 Reference
| Customize Help
| Save Settings

MappAllocDefault



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Partially supported on:
Partially supported on Host system
Partially supported on Matrox CronosPlus
Partially supported on Matrox GigE Vision driver
Partially supported on Matrox IEEE 1394 IIDC driver
Partially supported on Matrox Iris GT
Partially supported on Matrox Morphis
Partially supported on Matrox Morphis QxT
Partially supported on Matrox Orion HD
Partially supported on Matrox Radient eCL
Partially supported on Matrox Radient eV-CXP
Partially supported on Matrox Solios eA/XA
Partially supported on Matrox Solios ecl/xcl/ev-cl
Partially supported on Matrox USB3 Vision driver (requires Update 19)
Partially supported on Matrox Vio

Fully supported on:
Fully supported on Matrox GPU processing driver

For any information regarding a MIL system added during a MIL Update, see the MIL system’s release note

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
cameraevents.cpp
chunkmode.cpp
circleshapefinder.cpp
clprotocol.cpp
detectfpgaconfig.cpp
enumfeatures.cpp
fdkaddconstantmain.cpp
fdkhistogrammain.cpp
fdklutmapmain.cpp
fdkminmaxmain.cpp
fdkoffsetgainlutmapmain.cpp
fdkoffsetgainmain.cpp
fdkoffsetgainminmaxmain.cpp
findimageorientation.cpp
histogramequalizeadaptive.cpp
imagedownscalingmodes.cpp
imageupscalingmodes.cpp
interactivebayer.cpp
m3dmap.cpp
m3dmap.cs
m3dmap.vb
mappbenchmark.cpp
mappbenchmark.cs
mappbenchmark.vb
mappstart.cpp
mappstart.cs
mappstart.vb
mbead.cpp
mbead.cs
mbead.vb
mblob.cpp
mblob.cs
mblob.vb
mbufbayer.cpp
mbufcolor.cpp
mbufcolor.cs
mbufcolor.vb
mbufpointeraccess.cpp
mbufpointeraccess.cs
mcal.cpp
mcal.cs
mcal.vb
mcode.cpp
mcode.cs
mcode.vb
mcol.cpp
mcol.cs
mcol.vb
mdigautofocus.cpp
mdigautofocus.cs
mdigautofocus.vb
mdigdoublebuffering.cpp
mdigdoublebuffering.cs
mdigdoublebuffering.vb
mdiggrab.cpp
mdiggrab.cs
mdiggrab.vb
mdiggrabsequence.cpp
mdiggrabsequence.cs
mdiggrabsequence.vb
mdigprocess.cpp
mdigprocess.cs
mdigprocess.vb
mdispgtk.cpp
mdispmfc.cpp
mdispoverlay.cpp
mdispoverlay.cs
mdispoverlay.vb
mdispqtapp.cpp
mdispwindowleveling.cpp
mdispwindowleveling.cs
mdispwindowleveling.vb
medge.cpp
medge.cs
medge.vb
mfunc.cpp
mfunc.cs
mfunc.vb
mgrainteractive.cpp
mgrainteractive.cs
mgrainteractive.vb
mgratext.cpp
mgratext.cs
mgratext.vb
milgige.cpp
mimbinarizeadaptive.cpp
mimconvolve.cpp
mimconvolve.cs
mimconvolve.vb
mimdeinterlace.cpp
mimdeinterlace.cs
mimdeinterlace.vb
mimfft.cpp
mimfft.cs
mimfft.vb
mimhistogram.cpp
mimhistogram.cs
mimhistogram.vb
mimlocatepeak1d.cpp
mimlocatepeak1d.cs
mimlocatepeak1d.vb
mimmorphic.cpp
mimpolar.cpp
mimpolar.cs
mimpolar.vb
mimprocessing.cpp
mimprocessing.cs
mimprocessing.vb
mimsegment.cpp
mimsegment.cs
mimsegment.vb
mimwarp.cpp
mimwarp.cs
mimwarp.vb
mmeas.cpp
mmeas.cs
mmeas.vb
mmet.cpp
mmet.cs
mmet.vb
mmod.cpp
mmod.cs
mmod.vb
mmodeltracking.cpp
mmodeltracking.cs
mmodeltracking.vb
mocr.cpp
mocr.cs
mocr.vb
monitoringapplication.cpp
mpat.cpp
mpat.cs
mpat.vb
mreg.cpp
mreg.cs
mreg.vb
mseqprocess.cpp
mseqprocess.cs
mseqprocess.vb
mstr.cpp
mstr.cs
mstr.vb
mthread.cpp
mthread.cs
mthread.vb
multicamera.cpp
multicastmaster.cpp
multicastmonitor.cpp
multicastslave.cpp
objectseparation.cpp
packetdelay.cpp
processingfpga.cpp
publishingapplication.cpp
segmentationandanalysisofcells.cpp
simpledilateerode.cpp
utilmatchcolormap.cpp
variousdenoising.cpp
wavelettransformation.cpp
Synopsis
Allocate default MIL objects.
Syntax
void MappAllocDefault(
MIL_INT InitFlag, //in
MIL_ID *ContextAppIdPtr, //out
MIL_ID *SysIdPtr, //out
MIL_ID *DispIdPtr, //out
MIL_ID *DigIdPtr, //out
MIL_ID *ImageBufIdPtr //out
)
Description

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.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
InitFlag

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:

function map For specifying the type of initialization setup
CollapseValue Description
MIL system-specific
tooltip (†)
Collapse 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
Collapse M_COMPLETE +

Specifies to initialize the system completely; the system is initialized to its default state and any required resident software is downloaded. At least one complete initialization is necessary after you power-up your system.

(summarize)
a b c d e f g h i j k l m n o p q r s
Collapse M_PARTIAL +

Specifies to initialize the system to its default state, but it does not download any resident software.

M_PARTIAL should only be selected if the required resident software has already been downloaded. This option is particularly useful when debugging since resident software generally needs to be downloaded once after power-up (or rebooting the system) and the downloading process can take a substantial amount of initialization time on certain systems.

(summarize)
d
Combination constant for the values listed in For specifying the type of initialization setup.

You can add the following value to the above-mentioned values to specify a cluster node value without using a cluster manager.

function map For specifying a cluster node value
CollapseCombination value Description
Collapse

Specifies a cluster node value when none is specified with a cluster manager. A Distributed MIL publishing application requires a cluster node value that identifies the publishing application. If you have not specified a cluster manager for this application, ensure that each publishing application in the cluster has a unique, non-zero value.

Note that a cluster manager automatically assigns a cluster node value to an application. It is the prefered method of managing cluster node values.

(summarize)
Parameters

Specifies the cluster node value.

Value > 0

Specifies the cluster node value.

ContextAppIdPtr

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.

SysIdPtr

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).

DispIdPtr

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.

DigIdPtr

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.

ImageBufIdPtr

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.

Examples

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);
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
DEFAULT COMPLETE PARTIAL DISP