| MIL 10 Reference
| Customize Help
| Save Settings

MimAllocResult



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
Synopsis
Allocate an image processing result buffer.
Syntax
MIL_ID MimAllocResult(
MIL_ID SysId, //in
MIL_INT NbEntries, //in
MIL_INT64 ResultType, //in
MIL_ID *ResultImIdPtr //out
)
Description

This function allocates a result buffer with the specified number of entries, for use with some of the Image Processing module's functions (for example, the statistical functions).

When the result buffer is no longer required, you should release its memory, using MimFree().

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 INQ

Specifies the system on which to allocate the result buffer. 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().

NbEntries INQ

Specifies the number of buffer entries to allocate for the specified result buffer. This parameter should be set to one of the following values:

function map For specifying the number of buffer entries
CollapseValue Description
Collapse M_DEFAULT

Specifies that MIL automatically establishes the size of the result buffer. You can only use this value when the ResultType parameter is set to M_LOCATE_PEAK_1D_RESULT, M_STAT_LIST, M_STAT_MULTIPLE_RESULT, or M_WAVELET_TRANSFORM_RESULT.

(summarize)
Collapse Value

Specifies the number of buffer entries. This value should take into account the type of result buffer being allocated. A specific number of entries must be specified when the ResultType parameter is set to M_EVENT_LIST, M_EXTREME_LIST, M_FIND_ORIENTATION_LIST, M_HIST_LIST, or M_PROJ_LIST. For an M_COUNT_LIST result buffer, this value must be set to 1.

A specific number of entries cannot be specified when the ResultType parameter is set to M_LOCATE_PEAK_1D_RESULT, M_STAT_LIST, M_STAT_MULTIPLE_RESULT, or M_WAVELET_TRANSFORM_RESULT.

(summarize)
ResultType INQ

Specifies the type of data that will be stored in this result buffer. This parameter must be set to one of the following values:

function map For specifying the type of data
CollapseValue Description
Collapse M_COUNT_LIST

Specifies that the buffer can hold MimCountDifference() results.

Collapse M_EVENT_LIST +

Specifies that the buffer can hold MimLocateEvent() results.

Collapse M_EXTREME_LIST +

Specifies that the buffer can hold MimFindExtreme() results.

Collapse M_FIND_ORIENTATION_LIST +

Specifies that the buffer can hold MimFindOrientation() results.

Collapse M_HIST_LIST

Specifies that the buffer can hold MimHistogram() results.

Collapse M_LOCATE_PEAK_1D_RESULT

Specifies that the buffer can hold MimLocatePeak1d() results. In this case, you must set the NbEntries parameter to M_DEFAULT.

(summarize)
Collapse M_PROJ_LIST +

Specifies that the buffer can hold MimProject() results.

Collapse M_STAT_LIST

Specifies that the buffer can hold MimStat() results.

Collapse M_STAT_MULTIPLE_RESULT

Specifies that the buffer can hold MimStatMultiple() results.

Collapse M_WAVELET_TRANSFORM_RESULT

Specifies that the buffer can hold results from MimWaveletTransform() and MimWaveletDenoise(). Such results can themselves be processed. That is, you can use the wavelet result as the source with which to perform MimWaveletTransform() and MimWaveletDenoise().

(summarize)

You can add the following value to the above-mentioned values to set the type of data stored in the result buffer .

function map For M_PROJ_LIST, M_EXTREME_LIST, or M_EVENT_LIST to change the type of data to store
CollapseCombination value Description
Collapse M_FLOAT

Allocates a result buffer of type float. You should allocate a float result type buffer when the source buffer specified by MimProject(), MimFindExtreme(), or MimLocateEvent() is of type float. If the specified source buffer is of type float and the result buffer is not, the functions can produce inaccurate results.

Note that allocating a result buffer of type float when the source buffer is not, will slow down the operations performed by the MimProject(), MimFindExtreme(), or MimLocateEvent() function.

(summarize)
ResultImIdPtr

Specifies the address of the variable in which to write the image processing result buffer identifier. Since MimAllocResult() also returns the image processing result buffer identifier, you can set this parameter to M_NULL. If allocation fails, M_NULL is written as the identifier.

Return value
The returned value is the result buffer identifier if the allocation is successful. If allocation fails, M_NULL is returned.
Remark
  • [MIL-Lite]
    Note that some of the result buffer types listed above are not available in MIL-Lite. See the result buffer'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 DEFAULT COUNT LIST EVENT LIST EXTREME LIST FIND ORIENTATION LIST HIST LIST LOCATE PEAK 1D RESULT PROJ LIST STAT LIST STAT MULTIPLE RESULT WAVELET TRANSFORM RESULT FLOAT DEFAULT DEFAULT