MImage_getBit


gets an element from an MImage of MImage_Type_Bit type.

DetailsDetails

  • Used in C/C++ code in a library function called from Mathematica.
  • Uses the same numbering scheme as Mathematica 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 .
  • In 3D, the first three elements of are assumed to be .
  • A nonzero error code value will be returned if the element does not exist or if is not an MImage of MImage_Type_Bit type.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

This gets the pixel at position 2,3 and channel 1:

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