LibraryLink`
LibraryLink`

MImage_getReal32Data (C Function)

gets an array of the data elements of an MImage of MImage_Type_Real32 type.

Details

  • Used in C/C++ code in a library function called from the Wolfram Language.
  • The array has a length equal to the flattened length.
  • Will cause an error to be launched if the MImage is not an of MImage_Type_Real32 type.

Examples

Basic Examples  (1)

This iterates over the data elements of an MImage:

MImage I0;
raw_t_real32* data;
mint i, len;
...
len = libData->MImage_getFlattenedLength(I0);
data = libData->MImage_getReal32Data(I0);
for (i = 0; i < len; i++) {
raw_t_real32 elem = data[i];
...
}