Click here to show toolbars of the Web Online Help System: show toolbars |
Table: | For specifying the interpolation mode |
+ combination: | For overscan |
MIL_ID SrcBufId, | //in |
MIL_INT NumPixels, | //in |
const MIL_DOUBLE *PixXArrayPtr, | //in |
const MIL_DOUBLE *PixYArrayPtr, | //in |
MIL_INT64 InterpolationMode, | //in |
void *UserArrayPtr | //out |
This function reads the values in the source buffer, at the specified positions, and places their values in a user-defined array.
If the source buffer is compressed, MIL decompresses the data before copying it to the user-supplied array.
When executing the operation on a buffer that has multiple bands, the red band is read first; the red values at the specified positions are placed in the first third of the user-defined array. Then, the green band is read; the green values at the specified positions are placed in the second third of the user-defined array (immediately following the red values). Finally, the blue band is read; the blue values at the specified positions are placed in the last third of the user-defined array (immediately following the green values). For example, if you want to read 3 pixels, the function will store the red band of each pixel, then the green band, and finally the blue band (RRR, GGG, BBB not RGB, RGB, RGB).
Note that if the source buffer has multiple bands, its format should match the implicit format of the user array (that is, planar RGB); otherwise an internal conversion has to be done (from the source to a temporary buffer) before executing the operation using the temporary buffer. Likewise, if the source buffer is compressed, an internal decompression has to be done (from the source to a temporary buffer) before executing the operation using the temporary buffer.
Specifies the identifier of the source buffer. This buffer can be a single-band (monochrome) or multi-band buffer and is not limited to image buffers.
If the specified buffer is an image buffer with an associated region of interest (ROI), an error will occur.
Specifies the number of values to get.
When using a standard vector (std::vector) overload function in C++, you can pass M_DEFAULT to this parameter and MIL will automatically determine the size based on the number of items in the vector passed to the PixXArrayPtr or PixYArrayPtr parameter.
Specifies the address of an array containing the X-position corresponding to the pixels to get.
Specifies the address of an array containing the Y-position corresponding to the pixels to get.
Specifies the interpolation mode. The specified mode controls how the function behaves with non-integer positions.
This parameter must be set to one of the values below.
For specifying the interpolation mode
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_NEAREST_NEIGHBOR with M_OVERSCAN_ENABLE. |
||||||||||||||||||||||||||||||||||||||
M_BICUBIC + |
Specifies bicubic interpolation. |
||||||||||||||||||||||||||||||||||||||
M_BILINEAR + |
Specifies bilinear interpolation. |
||||||||||||||||||||||||||||||||||||||
M_NEAREST_NEIGHBOR + |
Specifies nearest neighbor interpolation. |
You can add one of the following values to the above-mentioned values to determine how the function behaves with positions that fall outside the source buffer.
For overscan
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description | ||||||||||||||||||||||||||||||||||||||
M_OVERSCAN_CLEAR |
Sets the destination position to 0, if the associated point falls outside the source buffer. |
||||||||||||||||||||||||||||||||||||||
M_OVERSCAN_DISABLE |
Leaves the destination position as is, if the associated point falls outside the source buffer. |
||||||||||||||||||||||||||||||||||||||
M_OVERSCAN_ENABLE |
Uses the values of the source buffer's ancestor buffer, if the associated point falls outside the source buffer. |
Data type: array of the same
type as the buffer (SrcBufId) [optionally, in C++: a reference to a
std::vector of the same type
as the buffer]
Required array size:(NumPixels) * MbufInquire ( M_SIZE_BAND )
Specifies the address of a user-defined array in which the values are placed. The data type of this array must match the data type of the source buffer. Its number of entries is determined by the number of values to get and also by the number of bands of the source buffer.
void MbufGetListDouble
(MIL_ID SrcBufId,
MIL_INT NumPixels,
const MIL_DOUBLE *PixXArrayPtr,
const MIL_DOUBLE *PixYArrayPtr,
MIL_INT64 InterpolationMode,
void *UserArrayPtr)
Parameters
SrcBufId See SrcBufId of the main function for a description. NumPixels See NumPixels of the main function for a description. PixXArrayPtr See PixXArrayPtr of the main function for a description. PixYArrayPtr See PixYArrayPtr of the main function for a description. InterpolationMode See InterpolationMode of the main function for a description. UserArrayPtr See UserArrayPtr of the main function for a description. |
void MbufGetListInt32
(MIL_ID SrcBufId,
MIL_INT NumPixels,
const MIL_INT32 *PixXArrayPtr,
const MIL_INT32 *PixYArrayPtr,
MIL_INT64 InterpolationMode,
void *UserArrayPtr)
Parameters
SrcBufId See SrcBufId of the main function for a description. NumPixels See NumPixels of the main function for a description. PixXArrayPtr See PixXArrayPtr of the main function for a description. PixYArrayPtr See PixYArrayPtr of the main function for a description. InterpolationMode See InterpolationMode of the main function for a description. UserArrayPtr See UserArrayPtr of the main function for a description. |
void MbufGetListInt64
(MIL_ID SrcBufId,
MIL_INT NumPixels,
const MIL_INT64 *PixXArrayPtr,
const MIL_INT64 *PixYArrayPtr,
MIL_INT64 InterpolationMode,
void *UserArrayPtr)
Parameters
SrcBufId See SrcBufId of the main function for a description. NumPixels See NumPixels of the main function for a description. PixXArrayPtr See PixXArrayPtr of the main function for a description. PixYArrayPtr See PixYArrayPtr of the main function for a description. InterpolationMode See InterpolationMode of the main function for a description. UserArrayPtr See UserArrayPtr of the main function for a description. |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |