| MIL 10 Reference
| Customize Help
| Save Settings

MimAlloc



See also
Availability
Available in MIL-Lite with restrictions (see remarks)
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Previous
Synopsis
Allocate an image processing context.
Syntax
MIL_ID MimAlloc(
MIL_ID SysId, //in
MIL_INT64 ContextType, //in
MIL_INT64 ControlFlag, //in
MIL_ID *ContextImIdPtr //out
)
Description

This function allocates an image processing context on the specified system.

When the image processing context is no longer required, you should release its memory, using MimFree().

Note that image processing contexts allocated with MimAlloc() can be saved using either MimStream() or MimSave() and restored using MimRestore().

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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
SysId

Specifies the system on which to allocate the context. This parameter should be set to one of the following values:

function map For specifying the system identifier
CollapseValue Description
Collapse M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Collapse MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

ContextType INQ

Specifies the type of image processing context. This parameter should be set to one of the following values:

function map For specifying the type of context
CollapseValue Description
Collapse M_BINARIZE_ADAPTIVE_CONTEXT

Specifies an image processing context that can be used with MimBinarizeAdaptive() to perform an adaptive binarization.

Collapse M_BINARIZE_ADAPTIVE_FROM_SEED_CONTEXT

Specifies an image processing context that can be used with MimBinarizeAdaptive() to perform an adaptive binarization using seeds.

Collapse M_DEAD_PIXEL_CONTEXT

Specifies an image processing context that can be used with MimDeadPixelCorrection().

Collapse M_DEINTERLACE_CONTEXT

Specifies an image processing context that can be used with MimDeinterlace().

Collapse M_FIND_ORIENTATION_CONTEXT

Specifies an image processing context that can be used with MimFindOrientation().

Collapse M_FLAT_FIELD_CONTEXT

Specifies an image processing context that can be used with MimFlatField().

Collapse M_HISTOGRAM_EQUALIZE_ADAPTIVE_CONTEXT

Specifies an image processing context that can be used with MimHistogramEqualizeAdaptive().

Collapse M_LOCATE_PEAK_1D_CONTEXT

Specifies an image processing context that can be used with MimLocatePeak1d().

Collapse M_MATCH_CONTEXT

Specifies an image processing context that can be used with MimMatch().

Collapse M_REARRANGE_CONTEXT

Specifies an image processing context that can be used with MimRearrange().

Collapse M_STAT_MULTIPLE_CONTEXT

Specifies an image processing context that can be used with MimStatMultiple().

Collapse M_WAVELET_TRANSFORM_CONTEXT

Specifies an image processing context that can be used with MimWaveletTransform() and MimWaveletDenoise().

Collapse M_WAVELET_TRANSFORM_CUSTOM_CONTEXT

Specifies a custom image processing context that can be used with MimWaveletTransform() and MimWaveletDenoise().

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

ContextImIdPtr

Specifies the address of the variable in which to write the image processing context identifier. Since the MimAlloc() function also returns the image processing context identifier, you can set this parameter to M_NULL.

Return value
The returned value is the image processing context identifier if the allocation is successful. If allocation fails, M_NULL is returned.
Remark
  • [MIL-Lite]
    Note that some of the context types listed above are not available in MIL-Lite. See the context's corresponding operation function for MIL-Lite availability.
Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
DEFAULT HOST BINARIZE ADAPTIVE CONTEXT BINARIZE ADAPTIVE FROM SEED CONTEXT DEAD PIXEL CONTEXT DEINTERLACE CONTEXT FIND ORIENTATION CONTEXT FLAT FIELD CONTEXT HISTOGRAM EQUALIZE ADAPTIVE CONTEXT LOCATE PEAK 1D CONTEXT MATCH CONTEXT REARRANGE CONTEXT STAT MULTIPLE CONTEXT WAVELET TRANSFORM CONTEXT WAVELET TRANSFORM CUSTOM CONTEXT