ome / omero-py

Python project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
20 stars 33 forks source link

createImageFromNumpySeq handles big images #276

Closed will-moore closed 3 years ago

will-moore commented 3 years ago

This adds support for big images to conn.createImageFromNumpySeq().

Previously this failed if the numpy planes were larger than 3k * 3k.

Fixes https://github.com/ome/omero-figure/issues/403

I was hoping that this method would "just work" exactly the same with big images and small images, so you didn't have to worry about whether you were creating a big image or not. Unfortunately, the TileLoop for populating big images with setTile() wants to consume planes in the order:

for t in range(size_t):
    for c in range(size_c):
       for z in range(size_z):
           ...

so the planeGenerator passed to `conn.createImageFromNumpySeq() needs to provide planes in that order. But for small images, we need:

for z in range(size_z):
    for c in range(size_c):
       for t in range(size_t):
           ...

Obviously this is not ideal. But I couldn't think of any way to populate Big Images with the order of planes that is already required by conn.createImageFromNumpySeq().

NB: the OMERO.figure issue above is still fixed, since we only have a single Z and T :)

will-moore commented 3 years ago

Closing since this isn't ready and it's now conflicting with https://github.com/ome/omero-py/pull/290#issuecomment-851731411

imagesc-bot commented 1 year ago

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/how-to-get-large-image-arrays-in-a-omero-script/70085/8