MImage_getBit16Data (C Function)

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


  • 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 of MImage_Type_Bit16 type.


Basic Examples  (1)

This iterates over the data elements of an MImage:

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