| Customize Help
| Save Settings

MimAlloc



Function Map
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 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
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
Click to summarizeValue Description
Click to summarize M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Click to summarize 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
Click to summarizeValue Description
Click to summarize M_AUGMENTATION_CONTEXT

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

Click to summarize M_BINARIZE_ADAPTIVE_CONTEXT

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

Click to summarize M_BINARIZE_ADAPTIVE_FROM_SEED_CONTEXT

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

Click to summarize M_DEAD_PIXEL_CONTEXT

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

Click to summarize M_DEINTERLACE_CONTEXT

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

Click to summarize M_FIND_ORIENTATION_CONTEXT

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

Click to summarize M_FLAT_FIELD_CONTEXT

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

Click to summarize M_HISTOGRAM_EQUALIZE_ADAPTIVE_CONTEXT

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

Click to summarize M_LINEAR_FILTER_IIR_CONTEXT

Specifies an image processing context that can be used with MimConvolve() or MimDifferential().

Click to summarize M_LOCATE_PEAK_1D_CONTEXT

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

Click to summarize M_MATCH_CONTEXT

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

Click to summarize M_REARRANGE_CONTEXT

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

Click to summarize M_STATISTICS_CONTEXT

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

Click to summarize M_STATISTICS_CUMULATIVE_CONTEXT

Specifies an image processing context that can be used with MimStatCalculate() when calculating statistics from multiple images.

Click to summarize M_WAVELET_TRANSFORM_CONTEXT

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

Click to summarize 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 AUGMENTATION CONTEXT BINARIZE ADAPTIVE CONTEXT BINARIZE ADAPTIVE FROM SEED CONTEXT DEAD PIXEL CONTEXT DEINTERLACE CONTEXT FIND ORIENTATION CONTEXT FLAT FIELD CONTEXT HISTOGRAM EQUALIZE ADAPTIVE CONTEXT LINEAR FILTER IIR CONTEXT LOCATE PEAK 1D CONTEXT MATCH CONTEXT REARRANGE CONTEXT STATISTICS CONTEXT STATISTICS CUMULATIVE CONTEXT WAVELET TRANSFORM CONTEXT WAVELET TRANSFORM CUSTOM CONTEXT