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

RFE: Add resolution support to `getTile` #271

Open joshmoore opened 3 years ago

joshmoore commented 3 years ago

It should be easier to load a lower-resolution tile from the getTile method rather than:

    # Get info on number of levels and sizes
    print([(r.sizeX, r.sizeY) for r in pix.getResolutionDescriptions()])

    pix.setResolutionLevel(2)
    print(pix.getTileSize())
    w, h = pix.getTileSize()
    tile = pix.getTile(z, c, t, x, y, w, h)

Questions:

see: https://forum.image.sc/t/omero-py-how-to-get-tiles-at-different-zoom-level-pyramidal-image/45643/2?u=joshmoore

cc: @will-moore

joshmoore commented 3 years ago

@will-moore also points out that at resolution 1 there were exceptions of the form:

 File "/opt/anaconda3/envs/omeroweb22/lib/python3.7/site-packages/omero_api_RawPixelsStore_ice.py", line 998, in getTile
    return _M_omero.api.RawPixelsStore._op_getTile.invoke(self, ((z, c, t, x, y, w, h), _ctx))
omero.InternalException: exception ::omero::InternalException
{
    serverStackTrace = ome.conditions.InternalException:  Wrapped Exception: (java.lang.RuntimeException):
loci.formats.FormatException: Invalid tile size: x=0, y=0, w=256, h=256