| MIL 10 Reference
| Customize Help
| Save Settings

MimGetResultSingle



See also
Availability
Not available in MIL-Lite
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
None.
Synopsis
Get a result from a wavelet transformation or 1D locate peak result buffer.
Syntax
void MimGetResultSingle(
MIL_ID ResultImId, //in
MIL_INT Index1, //in
MIL_INT 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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
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, with which to indicate the wavelet transformation result
CollapseValue Description
Collapse

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

(summarize)
Parameters

Specifies the transformation level. It must be greater than 0, and be less than or equal to the number of levels calculated for the specified wavelet transformation result.

Collapse

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

(summarize)
Parameters

Specifies the transformation level. It must be greater than 0, and be less than or equal to the number of levels calculated for the specified wavelet transformation result.

Collapse

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

(summarize)
Parameters

Specifies the transformation level. It must be greater than 0, and be less than or equal to the number of levels calculated for the specified wavelet transformation result.

Collapse M_APPROXIMATION

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

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

function map For specifying the index of the peak in the lane, with which to indicate the locate peak 1D result
CollapseValue Description
Collapse M_NULL

Specifies that no information is required for the Index1 parameter. This setting is only valid if you are using M_NUMBER_OF_SCAN_LANES.

(summarize)
Collapse M_ALL

Specifies that the returned buffer will contain the requested result information for each rank. If M_INCLUDE_MISSING_DATA is specified, the size of the returned result is the M_NUMBER_OF_PEAKS control setting multiplied by the size specified with the Index2 parameter. This value can be obtained by specifying M_NUMBER as the result type in combination with M_INCLUDE_MISSING_DATA. Ordering of data is dependent on the M_SORT_CRITERION control.

(summarize)
Collapse Value >= 0

Specifies the peak for which to return the requested information. MIL returns data for each element corresponding to that peak. The M_SORT_CRITERION control sets how to order the data.

The returned buffer can be a 1D buffer where each value corresponds to a row or column in the source or a single value, depending on the value specified with the Index2 parameter. If the peak is absent from the lane, MIL skips it, unless M_INCLUDE_MISSING_DATA is present or the Index2 parameter is set to an integer value.

(summarize)
Index2

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

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

function map For specifying the index of the lane, with which to indicate the locate peak 1D result
CollapseValue Description
Collapse M_NULL

Specifies that no information is required for the Index2 parameter. Only valid with M_NUMBER_OF_SCAN_LANES (or a wavelet transformation result buffer).

(summarize)
Collapse M_ALL

Specifies that the returned buffer will contain the requested result information for each scan lane. If M_INCLUDE_MISSING_DATA is specified, the size of the returned result is the number of scan lanes times multiplied by the size specified with the Index1 parameter. This value can be obtained by specifying M_NUMBER as the result type in combination with M_INCLUDE_MISSING_DATA. Ordering of data is dependent on the M_SORT_CRITERION control.

(summarize)
Collapse Value >= 0

Specifies the lane for which to return the requested information. MIL returns data for each element corresponding to that lane. The M_SORT_CRITERION control sets how to order the data.

The returned buffer can be either a 1D buffer or a single value depending on the value specified with the Index1 parameter, where each value corresponds to a detected peak in the lane. The size of the returned array depends on the number of detected peaks in the lane unless M_INCLUDE_MISSING_DATA is present. In this case, it is the maximum number of peaks, and the empty elements are added after the other elements.

(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
  • array of type MIL_FLOAT
  • array of type MIL_ID
  • array of type MIL_INT
  • array of type MIL_INT32
  • array of type 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:

Unless otherwise specified, the following values require that you pass the UserArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to 1.

function map For specifying the type of result to retrieve, when using a wavelet transformation result
CollapseResultType Description
UserArrayPtr
- Possible values returned
Collapse 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)
Collapse MIL image buffer identifier

Specifies the identifier of the internal image buffer.

Collapse M_WAVELET_LEVEL_PADDING_OFFSET_X +

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

(summarize)
Collapse Value > 0

Specifies the X-offset, in pixels.

Collapse M_WAVELET_LEVEL_PADDING_OFFSET_Y +

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

(summarize)
Collapse Value > 0

Specifies the Y-offset, in pixels.

Collapse M_WAVELET_LEVEL_SIZE_X +

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

(summarize)
Collapse Value > 0

Specifies the width, in pixels.

Collapse M_WAVELET_LEVEL_SIZE_Y +

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

(summarize)
Collapse Value > 0

Specifies the height, in pixels.

Combination constants 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
CollapseCombination value Description
Collapse 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)
Collapse 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:

Unless otherwise specified, the following values require that you pass the UserArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to M_NUMBER .

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

Retrieves a single numerical element, indicating the number of elements that would be returned, given the values specified for the Index1 and Index2 parameters (including any specified combination value).

(summarize)
Collapse M_NUMBER_OF_SCAN_LANES +

Retrieves the number of elements that would be required by an array to contain the result if exactly one peak was found in each lane. When using M_NUMBER_OF_SCAN_LANES, you must set the Index1 and Index2 parameters to M_NULL.

(summarize)
Collapse M_PEAK_INTENSITY +

Retrieves the peak's intensity.

(summarize)
Collapse M_PEAK_POSITION +

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

(summarize)
Collapse M_PEAK_POSITION_X +

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

(summarize)
Collapse M_PEAK_POSITION_Y +

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

(summarize)
Collapse M_PEAK_WIDTH +

Retrieves the peak's detected width.

(summarize)
Collapse M_RANK_INDEX +

Retrieves the peak's index of the data.

(summarize)
Collapse M_SCAN_LANE_INDEX +

Retrieves the lane's index of the data.

(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
CollapseResultType Description
UserArrayPtr
- Possible values returned
Collapse M_INCLUDE_MISSING_DATA

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

(summarize)
Collapse M_INVALID

Specifies an empty lane or rank.

Collapse 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)
Collapse 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
CollapseCombination value Description
Collapse M_FIXED_POINT + n

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

(summarize)

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

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

Casts the requested results to a MIL_DOUBLE.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_DOUBLE
    Array size: depends on the ResultType parameter, see above
    Note: When multiple results.

  • Data type: MIL_DOUBLE
    Note: When a single result, see above.

Collapse M_TYPE_MIL_FLOAT

Casts the requested results to a MIL_FLOAT.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_FLOAT
    Array size: depends on the ResultType parameter, see above
    Note: When multiple results.

  • Data type: MIL_FLOAT
    Note: When a single result, see above.

Collapse M_TYPE_MIL_ID

Casts the requested results to a MIL_ID.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_ID
    Array size: depends on the ResultType parameter, see above
    Note: When multiple results.

  • Data type: MIL_ID
    Note: When a single result, see above.

Collapse M_TYPE_MIL_INT

Casts the requested results to a MIL_INT.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_INT
    Array size: depends on the ResultType parameter, see above
    Note: When multiple results.

  • Data type: MIL_INT
    Note: When a single result, see above.

Collapse M_TYPE_MIL_INT32

Casts the requested results to a MIL_INT32.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_INT32
    Array size: depends on the ResultType parameter, see above
    Note: When multiple results.

  • Data type: MIL_INT32
    Note: When a single result, see above.

Collapse M_TYPE_MIL_INT64

Casts the requested results to a MIL_INT64.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_INT64
    Array size: depends on the ResultType parameter, see above
    Note: When multiple results.

  • Data type: MIL_INT64
    Note: When a single result, see above.

Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
APPROXIMATION NULL ALL NULL ALL 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 INCLUDE MISSING DATA INVALID ONLY MISSING DATA INVALID FIXED POINT n TYPE MIL DOUBLE TYPE MIL FLOAT TYPE MIL ID TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64 ALL NULL NULL NULL NULL