| Customize Help
| Save Settings

MimAllocResult



Function Map
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 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 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
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().

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
Click to summarizeValue Description
Click to summarize 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_AUGMENTATION_RESULT, M_COUNT_LIST, M_LOCATE_PEAK_1D_RESULT, M_STATISTICS_RESULT, or M_WAVELET_TRANSFORM_RESULT.

(summarize)
Click to summarize Value > 0

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.

A specific number of entries cannot be specified when the ResultType parameter is set to M_COUNT_LIST, M_LOCATE_PEAK_1D_RESULT, M_STATISTICS_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
Click to summarizeValue Description
Click to summarize M_AUGMENTATION_RESULT

Specifies that the buffer can hold MimAugment() results.

Click to summarize M_COUNT_LIST

Specifies that the buffer can hold MimCountDifference() results.

Click to summarize M_EVENT_LIST +

Specifies that the buffer can hold MimLocateEvent() results.

Click to summarize M_EXTREME_LIST +

Specifies that the buffer can hold MimFindExtreme() results.

Click to summarize M_FIND_ORIENTATION_LIST +

Specifies that the buffer can hold MimFindOrientation() results.

Click to summarize M_HIST_LIST

Specifies that the buffer can hold MimHistogram() results.

Click to summarize 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)
Click to summarize M_PROJ_LIST +

Specifies that the buffer can hold MimProjection() results.

Click to summarize M_STATISTICS_RESULT

Specifies that the buffer can hold MimStatCalculate() results.

Click to summarize 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
Click to summarizeCombination value Description
Click to summarize M_FLOAT

Allocates a result buffer of type float. You should allocate a float result type buffer when the source buffer specified by MimProjection(), 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 MimProjection(), 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 AUGMENTATION RESULT COUNT LIST EVENT LIST EXTREME LIST FIND ORIENTATION LIST HIST LIST LOCATE PEAK 1D RESULT PROJ LIST STATISTICS RESULT WAVELET TRANSFORM RESULT FLOAT AUGMENTATION RESULT COUNT LIST LOCATE PEAK 1D RESULT STATISTICS RESULT WAVELET TRANSFORM RESULT COUNT LIST LOCATE PEAK 1D RESULT STATISTICS RESULT WAVELET TRANSFORM RESULT