Code:
In [80]: numpy.array([1,2,3], dtype=tables.UInt8Atom())
Out[80]: array([1, 2, 3], dtype=uint8)
In [81]: numpy.array([1,2,256], dtype=tables.UInt8Atom())
Out[81]: array([1, 2, 0], dtype=uint8)
...
In [83]: a = numpy.array([1,2,3], dtype=tables.UInt8Atom())
In [84]: print a
[1 2 3]
In [85]: omero.grid.MaskColumn(None, None, None, None, None, None, None, None, None, [a])
Out[85]:
object #0 (::omero::grid::MaskColumn)
{
name = None
description = None
imageId = {}
theZ = {}
theT = {}
x = {}
y = {}
w = {}
h = {}
bytes =
{
[0] =
{
[0] = <invalid value - expected byte>
[1] = <invalid value - expected byte>
[2] = <invalid value - expected byte>
}
}
}
...
In [90]: a
Out[90]: array([ 1, 2, -128], dtype=int8)
In [91]: a = numpy.array([1,2,127], dtype=tables.Int8Atom())
In [92]: a
Out[92]: array([ 1, 2, 127], dtype=int8)
In [93]: omero.grid.MaskColumn(None, None, None, None, None, None, None, None, None, [a])
Out[93]:
object #0 (::omero::grid::MaskColumn)
{
name = None
description = None
imageId = {}
theZ = {}
theT = {}
x = {}
y = {}
w = {}
h = {}
bytes =
{
[0] =
{
[0] = <invalid value - expected byte>
[1] = <invalid value - expected byte>
[2] = <invalid value - expected byte>
}
}
}
Or do the various ranges for Ice::Byte (-128,127 or 0, 255) make this difficult/impossible?