MIL_ID DestBufId, | //in |
MIL_INT64 DataFormat, | //in |
MIL_INT Band, | //in |
MIL_INT OffX, | //in |
MIL_INT OffY, | //in |
MIL_INT SizeX, | //in |
MIL_INT SizeY, | //in |
const void *UserArrayPtr | //in |
This function copies data from a user-supplied array to a specified area in one or all bands of a specified MIL destination buffer.
Specifies the identifier of the destination buffer.
If the specified buffer is an image buffer with an associated region of interest (ROI), an error will occur.
Specifies the data format of the user-supplied array. The internal data format of the destination buffer need not match the specified data format of the user-supplied array; an internal conversion will be performed if necessary. Note, however, if the formats do match, the operation will be much faster.
See the Parameter associations section for possible values that can be specified.
Specifies the index of the band in which to copy. This parameter can be set to one of the values below.
For specifying the index of the
band
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_ALL_BANDS |
Copies to all bands. |
||||||||||||||||||||||||||||||||||||||
M_BLUE |
Copies to the blue band (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
M_GREEN |
Copies to the green band (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
M_HUE |
Copies to the hue band (for HSL buffers). |
||||||||||||||||||||||||||||||||||||||
M_LUMINANCE |
Copies to the luminance band (for HSL buffers). |
||||||||||||||||||||||||||||||||||||||
M_RED |
Copies to the red band (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
M_SATURATION |
Copies to the saturation band (for HSL buffers). |
||||||||||||||||||||||||||||||||||||||
0 <= Value < #bands |
Specifies the index of the band to copy. (more details...) |
Specifies the horizontal offset of the destination buffer area in which to put the data, relative to the destination buffer's top-left coordinate.
Specifies the vertical offset of the destination buffer area in which to put the data, relative to the destination buffer's top-left coordinate.
Specifies the address of the user array from which to copy data into the destination buffer. Ensure that user array is large enough to contain the data to be copied to the destination buffer.
See the Parameter associations section for possible values that can be specified.
The table below lists possible values for the DataFormat and UserArrayPtr parameters.
Note that SizeX and SizeY denote the destination buffer's width and height, respectively.
For specifying the data
format
|
|||||||||||||||||||||||||||||||||||||||
DataFormat |
Description
|
||||||||||||||||||||||||||||||||||||||
UserArrayPtr | |||||||||||||||||||||||||||||||||||||||
M_PACKED + |
Copies the bands in an interleaved manner (for example, RGB RGB RGB...). (more details...) |
||||||||||||||||||||||||||||||||||||||
UserArrayPtr data type info |
Data
type: array of type unsigned char |
||||||||||||||||||||||||||||||||||||||
M_PLANAR |
Copies the bands one after the other (RRR...GGG...BBB...). (more details...) |
||||||||||||||||||||||||||||||||||||||
UserArrayPtr data type info |
Data
type: array of same type as the buffer |
||||||||||||||||||||||||||||||||||||||
M_SINGLE_BAND |
Copies to a single band. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserArrayPtr data type info |
Data
type: array of same type as the buffer |
You must add one of the following values to the above-mentioned value to set the packed data format.
For more information on these formats, see the RGB buffers section of Chapter 19: Data buffers.
For setting the packed data
format
|
|||||||||||||||||||||||||||||||||||||||
DataFormat |
Description
|
||||||||||||||||||||||||||||||||||||||
UserArrayPtr | |||||||||||||||||||||||||||||||||||||||
M_BGR24 |
Stores the data in a BGR24 packed format. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserArrayPtr data type info |
Data
type: array of type unsigned char |
||||||||||||||||||||||||||||||||||||||
M_BGR32 |
Stores the data in a BGR32 packed format. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserArrayPtr data type info |
Data
type: array of type unsigned char |
||||||||||||||||||||||||||||||||||||||
M_RGB15 |
Stores the data in a RGB15 packed format. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserArrayPtr data type info |
Data
type: array of type unsigned char |
||||||||||||||||||||||||||||||||||||||
M_RGB16 |
Stores the data in a RGB16 packed format. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserArrayPtr data type info |
Data
type: array of type unsigned char |
||||||||||||||||||||||||||||||||||||||
M_RGB24 |
Stores the data in a RGB24 packed format. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserArrayPtr data type info |
Data
type: array of type unsigned char |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |