diff --git a/omeroweb/webgateway/marshal.py b/omeroweb/webgateway/marshal.py index 5052580ab1..64fd9e7a7d 100644 --- a/omeroweb/webgateway/marshal.py +++ b/omeroweb/webgateway/marshal.py @@ -64,8 +64,10 @@ def getChannelsNoRe(image): left outer join fetch c.statsInfo where p.id=:id""" pixels = conn.getQueryService().findByQuery(query, params, conn.SERVICE_OPTS) - return [ChannelWrapper(conn, c, idx=n, img=image) - for n, c in enumerate(pixels.iterateChannels())] + return [ + ChannelWrapper(conn, c, idx=n, img=image) + for n, c in enumerate(pixels.iterateChannels()) + ] def eventContextMarshal(event_context): @@ -113,7 +115,8 @@ def getPixelRange(image): PixelsTypeint32: -2147483648, PixelsTypeuint32: 0, PixelsTypefloat: -2147483648, - PixelsTypedouble: -2147483648} + PixelsTypedouble: -2147483648, + } maxVals = { PixelsTypeint8: 127, PixelsTypeuint8: 255, @@ -122,7 +125,8 @@ def getPixelRange(image): PixelsTypeint32: 2147483647, PixelsTypeuint32: 4294967295, PixelsTypefloat: 2147483647, - PixelsTypedouble: 2147483647} + PixelsTypedouble: 2147483647, + } pixtype = image.getPrimaryPixels().getPixelsType().getValue() return [minVals[pixtype], maxVals[pixtype]] @@ -145,7 +149,7 @@ def rdefMarshal(rdef, image, pixel_range): channels = [] - for rdef_ch, channel in zip(rdef['c'], getChannelsNoRe(image)): + for rdef_ch, channel in zip(rdef["c"], getChannelsNoRe(image)): chan = { "emissionWave": channel.getEmissionWave(), @@ -368,7 +372,9 @@ def pixel_size_in_microns(method): if tiles: width, height = image._re.getTileSize() zoomLevelScaling = image.getZoomLevelScaling() - rv.update({"tile_size": {"width": width, "height": height}, "levels": levels}) + rv.update( + {"tile_size": {"width": width, "height": height}, "levels": levels} + ) if zoomLevelScaling is not None: rv["zoomLevelScaling"] = zoomLevelScaling