LibraryLink`
LibraryLink`

MImage_setBit16 (C Function)

sets a single element of an MImage of MImage_Type_Bit16 type.

Details

  • Used in C/C++ code in a library function called from the Wolfram Language.
  • Uses the same numbering scheme as the Wolfram Language parts, i.e. the first element is 1.
  • The array is assumed to have length at least equal to the rank of .
  • In 2D, the first two elements of are assumed to be {row,column}.
  • In 3D, the first three elements of are assumed to be {slice,row,column}.
  • A nonzero error code value will be returned if the element does not exist or if is not an MImage of MImage_Type_Bit16 type.

Examples

Basic Examples  (1)

This sets the pixel at position 2,3 and channel 1 to be 1:

MImage I0;
mint pos[2];
int err;
...
pos[0] = 2;
pos[1] = 3;
err = libData->MImage_setBit16(I0, pos, 1, 1);