The shape of my array is (46129, 61752, 3). This is a single layer from the original .svs and each pixel represented with 3 values (RGB) where each value is dtype=uint8. Thus, I have one plane (image layer). I have no Z stack and no Time sequence. I'm assuming that the sizes for those parameters should each be '1' and the Color size is '3'. My script bits, cribbed from the documentation example:
- Code: Select all
planes = [reconstitutedArrayFromTiles]
sizeZ = sizeT = 1
sizeC = 3
desc = "Image created from reading numpy array off disk"
i = conn.createImageFromNumpySeq(
plane_gen(), "numpy image", sizeZ, sizeC, sizeT, description=desc,
dataset=None)
This keeps giving me the following error:
- Code: Select all
ERROR:omero.gateway:Failed to setPlane() on rawPixelsStore while creating Image
Traceback (most recent call last):
File "/home/omero/OMERO.server/lib/python/omero/gateway/__init__.py", line 3764, in createImageFromNumpySeq
image, dtype = createImage(plane, channelList)
File "/home/omero/OMERO.server/lib/python/omero/gateway/__init__.py", line 3684, in createImage
sizeY, sizeX = firstPlane.shape
ValueError: too many values to unpack
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-102-c91df066e6d0> in <module>()
3 i = conn.createImageFromNumpySeq(
4 p_gen(), "numpy image", sizeZ, sizeC, sizeT, description=desc,
----> 5 dataset=None)
6 print 'Created new Image:%s Name:"%s"' % (i.getId(), i.getName())
/home/omero/OMERO.server/lib/python/omero/gateway/__init__.pyc in createImageFromNumpySeq(self, zctPlanes, imageName, sizeZ, sizeC, sizeT, description, dataset, sourceImageId, channelList)
3791 exc = e
3792 if exc is not None:
-> 3793 raise exc
3794
3795 # simply completing the generator - to avoid a GeneratorExit error.
ValueError: too many values to unpack
The error makes me think that there is more data in the array than the function was expecting. Have I got my parameters/dimensions correct? Is the organization of the array correct? Should I have more planes? Anything else that I've obviously messed up?