| Customize Help
| Save Settings

MimGetResultSingle



Function Map
Synopsis
Get a result from a wavelet transformation or 1D locate peak result buffer.
Syntax
void MimGetResultSingle(
MIL_ID ResultImId, //in
MIL_INT64 Index1, //in
MIL_INT64 Index2, //in
MIL_INT64 ResultType, //in
void *UserArrayPtr //out
)
Description

This function retrieves a result of the specified type from a wavelet transformation or 1D locate peak result buffer. MIL performs wavelet transformations with MimWaveletTransform() and 1D peak intensity detection with MimLocatePeak1d().

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
ResultImId

Specifies the identifier of the wavelet transformation or 1D locate peak result buffer from which to get results.

Index1

Specifies the first index with which to indicate the result to retrieve.

For a wavelet transformation result, this parameter specifies a specific wavelet coefficient and level for which to get information. To retrieve the actual number of levels calculated, call MimGetResult() with M_NUMBER_OF_LEVELS. You can also use this parameter to retrieve information about the approximation (the low frequency rendition) of the wavelet transformation.

Set this parameter to one of the following:

function map For specifying the first index, for which to retrieve the wavelet transformation result
Click to summarizeValue Description
Click to summarize

Retrieves results about the diagonal wavelet coefficient, at the specified transformation level.

(summarize)
Parameters

Specifies the transformation level.

0 < Value <= M_NUMBER_OF_LEVELS

Specifies the valid transformation level.

Click to summarize

Retrieves results about the horizontal wavelet coefficient, at the specified transformation level.

(summarize)
Parameters

Specifies the transformation level.

0 < Value <= M_NUMBER_OF_LEVELS

Specifies the valid transformation level.

Click to summarize

Retrieves results about the vertical wavelet coefficient, at the specified transformation level.

(summarize)
Parameters

Specifies the transformation level.

0 < Value <= M_NUMBER_OF_LEVELS

Specifies the valid transformation level.

Click to summarize M_APPROXIMATION

Retrieves results about the approximation (the low frequency rendition) of the wavelet transformation at the last calculated level.

For a 1D locate peak result, set this parameter to one of the following values.

function map For specifying the index of the peak in the lane(s), for which to retrieve the 1D locate peak result
Click to summarizeValue Description
Click to summarize M_NULL

Specifies that no information is required for the Index1 parameter. This setting is only valid if you are retrieving the number of scan lanes (M_NUMBER_OF_SCAN_LANES) or when retrieving the initialization state of the result buffer with M_STATUS.

(summarize)
Click to summarize
M_SELECT_PEAK(
MIL_INT Frame,
MIL_INT Rank
)

Specifies the frame(s) and rank of the peak(s) for which to return the requested result (for the lane(s) specified with the Index2 parameter).

This macro is required if a MimLocatePeak1d() operation accumulated results from multiple frames in the result buffer (MimControl() with M_NUMBER_OF_FRAMES set to a value greater than 1).

(summarize)
Parameters

Specifies the index of the frame(s) for which the result was stored.

M_ALL

Specifies all frames.

Value >= 0

Specifies the index of the specific frame.

Specifies the peak(s) for which to return the requested result.

M_ALL

Specifies all peaks in the lane(s).

Value >= 0

Specifies the rank of the specific peak in the lane(s).

Click to summarize M_ALL

Retrieves the requested result for all peaks in the scan lane(s) specified using the Index2 parameter. If peaks are absent from a lane, MIL skips it unless M_INCLUDE_MISSING_DATA is specified. Ordering of the results is dependent on MimControl() with M_SORT_CRITERION.

Note that this setting is equivalent to using the M_SELECT_PEAK() macro above, with the Frame and Rank parameters set to 0 and M_ALL, respectively.

(summarize)
Click to summarize 0 <= Value < M_NUMBER +
M_INCLUDE_MISSING_DATA

Specifies the rank of the peak for which to retrieve the requested result, for the scan lane(s) specified using the Index2 parameter. Ordering of the results is dependent on MimControl() with M_SORT_CRITERION.

If the peak is absent from the lane, MIL skips it, unless M_INCLUDE_MISSING_DATA is specified.

(summarize)
Index2

Specifies the second index for which to retrieve results. For a wavelet transformation result, this information is not required; set this parameter to M_NULL.

For a 1D locate peak result, set this parameter to one of the following values.

function map For specifying the index of the lane for which to retrieve the 1D locate peak result
Click to summarizeValue Description
Click to summarize M_NULL

Specifies that no information is required for the Index2 parameter. For a 1D locate peak result, this setting is only valid if you are retrieving the number of scan lanes (M_NUMBER_OF_SCAN_LANES) or when retrieving the initialization state of the result buffer with M_STATUS.

(summarize)
Click to summarize M_ALL

Specifies to retrieve the requested result for all scan lanes. If the specified peak(s) are absent from a lane, MIL skips it unless M_INCLUDE_MISSING_DATA is specified. Ordering of the results is dependent on MimControl() with M_SORT_CRITERION.

(summarize)
Click to summarize 0 <= Value < M_NUMBER_OF_SCAN_LANES

Specifies the lane for which to retrieve the requested result. If the specified peak(s) are absent from a lane, MIL skips it unless M_INCLUDE_MISSING_DATA is specified. Empty elements are added after the other elements, at the end of the returned array. Ordering of the results is dependent on MimControl() with M_SORT_CRITERION.

(summarize)
ResultType

Specifies the type of result to retrieve.

See the Parameter associations section for possible values that can be specified.

UserArrayPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ]
  • array of type MIL_FLOAT [optionally, in C++: a reference to a std::vector<MIL_FLOAT> ]
  • array of type MIL_ID [optionally, in C++: a reference to a std::vector<MIL_ID> ]
  • array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ]
  • array of type MIL_INT32 [optionally, in C++: a reference to a std::vector<MIL_INT32> ]
  • array of type MIL_INT64 [optionally, in C++: a reference to a std::vector<MIL_INT64> ]
  • MIL_DOUBLE
  • MIL_FLOAT
  • MIL_ID
  • MIL_INT
  • MIL_INT32
  • MIL_INT64

Specifies the address of the one-dimensional array in which to write the results read from the MIL result buffer.

See the Parameter associations section for possible values that can be returned.

The tables below list possible values for the ResultType parameter and possible values returned to the UserArrayPtr parameter.

To retrieve a result from the specified wavelet coefficient and detail level (Index1), set ResultType to one of the following:

function map For specifying the type of result to retrieve, when using a wavelet transformation result
Click to summarize
ResultType
Description
UserArrayPtr
- Possible values returned
Click to summarize M_WAVELET_COEFFICIENTS_IMAGE_ID +

Retrieves the identifier of the internal image buffer that holds the wavelet data specified by the Index1 parameter. For example, if you use M_WAVELET_COEFFICIENTS_IMAGE_ID with the Index1 parameter set to M_DIAGONAL_LEVEL(3), you will retrieve the identifier of the internal image buffer that holds the diagonal wavelet coefficient at level three.

The type and depth (per band) of the data in each internal wavelet buffer is 32-bit floating-point.

There is a separate internal image buffer for every wavelet coefficient result, at every level, and for each numerical domain. You can specify the domain by combining M_WAVELET_COEFFICIENTS_IMAGE_ID with M_REAL_PART (the default) or M_IMAGINARY_PART. To display an internal image buffer, you must inquire its system using MbufInquire() with M_OWNER_SYSTEM, and allocate a display on it using MdispAlloc(). You can then use this allocated display to visualize the content of M_WAVELET_COEFFICIENTS_IMAGE_ID.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: address of a MIL_ID
Click to summarize MIL image buffer identifier

Specifies the identifier of the internal image buffer.

Click to summarize M_WAVELET_LEVEL_PADDING_OFFSET_X +

Retrieves the X-offset of the padding used to calculate the result.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize Value > 0

Specifies the X-offset, in pixels.

Click to summarize M_WAVELET_LEVEL_PADDING_OFFSET_Y +

Retrieves the Y-offset of the padding used to calculate the result.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize Value > 0

Specifies the Y-offset, in pixels.

Click to summarize M_WAVELET_LEVEL_SIZE_X +

Retrieves the width of the undistorted (non-padded) region that was used to calculate the result.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize Value > 0

Specifies the width, in pixels.

Click to summarize M_WAVELET_LEVEL_SIZE_Y +

Retrieves the height of the undistorted (non-padded) region that was used to calculate the result.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize Value > 0

Specifies the height, in pixels.

Combination values for M_WAVELET_COEFFICIENTS_IMAGE_ID.

You can add one of the following values to the above-mentioned value to specify whether to retrieve information about the real or imaginary numbers in the wavelet result.

function map For specifying whether to retrieve information about the real or imaginary numbers in the wavelet result
Click to summarizeCombination value Description
Click to summarize M_IMAGINARY_PART

Retrieves information about the imaginary part of the values in the wavelet result. Only available for complex wavelet transformations (MimGetResult() with M_TRANSFORMATION_DOMAIN must return M_COMPLEX).

(summarize)
Click to summarize M_REAL_PART

Retrieves information about the real numbers in the result. Available for any type of wavelet transformation.

This is the default value.

(summarize)

To retrieve a result from a 1D locate peak result buffer, ResultType can be set to one of the following:

function map For specifying the type of result to retrieve, when using a 1D locate peak result
Click to summarize
ResultType
Description
UserArrayPtr
- Possible values returned
Click to summarize M_NUMBER +

Retrieves the number of elements that would be returned, given the values specified for the Index1 and Index2 parameters.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_NUMBER_OF_SCAN_LANES +

Retrieves the number of scan lanes.

When using M_NUMBER_OF_SCAN_LANES, you must set the Index1 and Index2 parameters to M_NULL.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_PEAK_INTENSITY +

Retrieves the peak's intensity.

Note that if the M_INCLUDE_MISSING_DATA combination value is specified, empty elements are set to M_INVALID and placed at the end of the returned array.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ] MORE
Click to summarize M_PEAK_POSITION +

Retrieves the peak's position along the scan lane, in pixels.

Note that if the M_INCLUDE_MISSING_DATA combination value is specified, empty elements are set to M_INVALID and placed at the end of the returned array.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ] MORE
Click to summarize M_PEAK_POSITION_X +

Retrieves the X-coordinate of the peak's position along the image's X-axis, in pixels.

Note that if the M_INCLUDE_MISSING_DATA combination value is specified, and M_SCAN_LANE_DIRECTION is set to M_HORIZONTAL, empty elements are set to M_INVALID and placed at the end of the returned array. If, however, M_SCAN_LANE_DIRECTION is set to M_VERTICAL, the lane indices of the empty elements are placed at the end of the returned array.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ] MORE
Click to summarize M_PEAK_POSITION_Y +

Retrieves the Y-coordinate of the peak's position along the image's Y-axis, in pixels.

Note that if the M_INCLUDE_MISSING_DATA combination value is specified, and M_SCAN_LANE_DIRECTION is set to M_VERTICAL, empty elements are set to M_INVALID and placed at the end of the returned array. If, however, M_SCAN_LANE_DIRECTION is set to M_HORIZONTAL, the lane indices of the empty elements are placed at the end of the returned array.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ] MORE
Click to summarize M_PEAK_WIDTH +

Retrieves the peak's detected width.

Note that if the M_INCLUDE_MISSING_DATA combination value is specified, empty elements are set to M_INVALID and placed at the end of the returned array.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ] MORE
Click to summarize M_RANK_INDEX +

Retrieves the peak's index along the scan lane.

Note that if the M_INCLUDE_MISSING_DATA combination value is specified, the rank indices of the empty elements are placed at the end of the returned array.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ] MORE
Click to summarize M_SCAN_LANE_INDEX +

Retrieves the lane's index of the data.

Note that if the M_INCLUDE_MISSING_DATA combination value is specified, the lane indices of the empty elements are placed at the end of the returned array.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ] MORE
Click to summarize M_STATUS +

Retrieves the initialization state of a 1D locate peak result buffer.

When using M_STATUS, you must set the Index1 and Index2 parameters to zero; otherwise, MIL will generate an error.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_COMPLETE

Specifies that the result buffer has been preprocessed and contains data from a previous operation.

Once data is accumulated using MimLocatePeak1d(), M_STATUS will return M_COMPLETE.

(summarize)
Click to summarize M_UNINITIALIZED

Specifies that the result buffer has not been preprocessed.

Click to summarize M_VALID

Specifies that the result buffer has been properly preprocessed, but has not been used in any operation.

After preprocessing, but before accumulating any data, M_STATUS will return M_VALID. To preprocess a result buffer without accumulating data, use MimLocatePeak1d() with M_PREPROCESS.

(summarize)

You can add one of the following values to the above-mentioned values to specify how to handle missing data, when using a 1D locate peak result.

If you do not specify any of these combination constants, MIL does not include missing data when returning information about the specified result type. That is, empty scan lanes and ranks are skipped.

function map For specifying how to handle missing data, when using a 1D locate peak result
Click to summarize
ResultType
Description
UserArrayPtr
- Possible values returned
Click to summarize M_INCLUDE_MISSING_DATA +

Specifies that missing data is included as part of the information returned by the result type.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: address of a MIL_INT  |  array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ] MORE
Click to summarize M_INVALID

Specifies an empty lane or rank.

Click to summarize M_ONLY_MISSING_DATA +

Specifies that only empty elements are returned by the result type. Alignment with other peaks is not checked. Empty lanes for rank i are always those where at most i-1 peaks were detected even when data inspection suggests that the last detected peak should be part of rank i.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: address of a MIL_INT  |  array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ] MORE
Click to summarize M_INVALID

Specifies an empty lane or rank.

You can add the following value to the above-mentioned values to specify returned data using fixed point with fractional bits, when using a 1D locate peak result.

function map For using fixed point with fractional bits, when using a 1D locate peak result
Click to summarizeCombination value Description
Click to summarize M_FIXED_POINT + n

Expresses results using fixed point with n fractional bits. Results must be an integer.

(summarize)

You can add the following value to the above-mentioned values to determine the required array size (number of elements) to store the returned values.

function map For determining the required array size (number of elements) to store the returned values
Click to summarizeResultType combination value Description
UserArrayPtr
- Possible values returned
Click to summarize M_NB_ELEMENTS

Retrieves the required array size (number of elements) to store the returned values.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE MORE

You can add one of the following values to the above-mentioned values to cast the requested results to the required data type.

Note: In C++, when using a standard vector (std::vector) instead of an array, the values listed in this combination table must not be used. If you need to use a specific data type, instantiate the vector with the necessary data type.

function map For the ResultType parameter to cast the required results to the requested data type
Click to summarizeResultType Description
UserArrayPtr
- Possible values returned
Click to summarize M_TYPE_MIL_DOUBLE

Casts the requested results to a MIL_DOUBLE.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ]  |  address of a MIL_DOUBLE MORE
Click to summarize M_TYPE_MIL_FLOAT

Casts the requested results to a MIL_FLOAT.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_FLOAT [optionally, in C++: a reference to a std::vector<MIL_FLOAT> ]  |  address of a MIL_FLOAT MORE
Click to summarize M_TYPE_MIL_ID

Casts the requested results to a MIL_ID.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_ID [optionally, in C++: a reference to a std::vector<MIL_ID> ]  |  address of a MIL_ID MORE
Click to summarize M_TYPE_MIL_INT

Casts the requested results to a MIL_INT.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ]  |  address of a MIL_INT MORE
Click to summarize M_TYPE_MIL_INT32

Casts the requested results to a MIL_INT32.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_INT32 [optionally, in C++: a reference to a std::vector<MIL_INT32> ]  |  address of a MIL_INT32 MORE
Click to summarize M_TYPE_MIL_INT64

Casts the requested results to a MIL_INT64.

(summarize)
Expand data type infoCollapse data type info UserArrayPtr extra info
Data type info: Data type: array of type MIL_INT64 [optionally, in C++: a reference to a std::vector<MIL_INT64> ]  |  address of a MIL_INT64 MORE
Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
NUMBER OF LEVELS NUMBER OF LEVELS NUMBER OF LEVELS APPROXIMATION NULL ALL ALL ALL NUMBER M INCLUDE MISSING DATA NULL ALL NUMBER OF SCAN LANES WAVELET COEFFICIENTS IMAGE ID FLOAT PROC WAVELET LEVEL PADDING OFFSET X WAVELET LEVEL PADDING OFFSET Y WAVELET LEVEL SIZE X WAVELET LEVEL SIZE Y IMAGINARY PART REAL PART NUMBER NUMBER OF SCAN LANES PEAK INTENSITY PEAK POSITION PEAK POSITION X PEAK POSITION Y PEAK WIDTH RANK INDEX SCAN LANE INDEX STATUS COMPLETE UNINITIALIZED VALID INCLUDE MISSING DATA INVALID ONLY MISSING DATA INVALID FIXED POINT n NB ELEMENTS TYPE MIL DOUBLE TYPE MIL FLOAT TYPE MIL ID TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64 NULL COMPLETE NULL NULL COMPLETE NULL NULL NULL COMPLETE NULL NULL NUMBER NUMBER M_FIXED_POINT + n