Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/omero_cli_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@
Image is assumed if <object>: is omitted

Output:
<Status>: <Pixels ID> <Time (in sec) to load the thumbnail> \
<Error details, if any>
<Status>: Pixels:<Pixels ID> Image:<Image ID> <Time (in sec) \
to load the thumbnail> <Error details, if any>

Where status is either ok, miss, fill, cancel, or fail.

Expand Down Expand Up @@ -752,10 +752,10 @@ def test(self, args):
""" Implements the 'test' command """
self.gateway.SERVICE_OPTS.setOmeroGroup('-1')
for img in self.render_images(self.gateway, args.object, batch=1):
self.test_per_pixel(
self.client, img.getPrimaryPixels().id, args.force, args.thumb)
self.test_per_image(
self.client, img, args.force, args.thumb)

def test_per_pixel(self, client, pixid, force, thumb):
def test_per_image(self, client, img, force, thumb):
ctx = {'omero.group': '-1'}
fail = {"omero.pixeldata.fail_if_missing": "true"}
fail.update(ctx)
Expand All @@ -766,6 +766,8 @@ def test_per_pixel(self, client, pixid, force, thumb):
error = ""
rps = client.sf.createRawPixelsStore()

pixid = img.getPrimaryPixels().id

try:
rps.setPixelsId(long(pixid), False, fail)
msg = "ok:"
Expand Down Expand Up @@ -799,7 +801,8 @@ def test_per_pixel(self, client, pixid, force, thumb):
tb.close()

stop = time.time()
self.ctx.out("%s %s %s %s" % (msg, pixid, stop-start, error))
self.ctx.out("%s Pixels:%s Image:%s %s %s" %
(msg, pixid, img.id, stop-start, error))
return msg


Expand Down