Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #8888 (closed)

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

Bug: Render with No Active Channels

Reported by: saloynton Owned by: cxallan
Priority: major Milestone: OMERO-4.4.4
Component: Services Version: n.a.
Keywords: n.a. Cc: ajpatterson, wmoore
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2012-09-25 (5)

Description (last modified by wmoore)

Split-view of thumbnails, missing images shown for images in dataset with no blue channels. Should have a space filler generated of correct size to preserve the layout.

  • OMERO-merge-blue - Build # 157

This is due to the fact that the rendering Engine throws an exception if you turn off all the channels then try to render

i = conn.getObject("Image", 145)
pid = i.getPixelsId()
re = conn.createRenderingEngine()
re.lookupPixels(pid)
re.load()
pd = omero.romio.PlaneDef()
pd.z = 10
pd.t = 0
re.renderCompressed(pd)       # OK
re.setActive(0, False)              # This is a single-channel image
re.renderCompressed(pd) 

  File "/Users/will/Desktop/OMERO/dist/lib/python/omero_api_RenderingEngine_ice.py", line 326, in renderCompressed
    return _M_omero.api.RenderingEngine._op_renderCompressed.invoke(self, ((_def, ), _ctx))
omero.ApiUsageException: exception ::omero::ApiUsageException
{
    serverStackTrace = ome.conditions.ApiUsageException: No active channel bindings found.
	at omeis.providers.re.GreyScaleStrategy.findFirstActiveChannelBinding(GreyScaleStrategy.java:274)
	at omeis.providers.re.GreyScaleStrategy.renderAsPackedInt(GreyScaleStrategy.java:131)
	at omeis.providers.re.Renderer.renderAsPackedInt(Renderer.java:511)

Attachments (1)

error-questionmark.png (147.5 KB) - added by saloynton 10 years ago.

Download all attachments as: .zip

Change History (14)

Changed 10 years ago by saloynton

comment:1 Changed 10 years ago by jburel

  • Cc wmoore added
  • Component changed from Insight to Web
  • Owner changed from jburel to web-team@…

This is an issue in Web

comment:2 Changed 10 years ago by wmoore

  • Component changed from Web to Services
  • Description modified (diff)
  • Owner changed from web-team@… to cxallan
  • Summary changed from Bug: Split-view of thumbnails missing images to Bug: Render with No Active Channels

comment:3 Changed 9 years ago by jburel

Scott:

what is the strategy you want to see implemented:

  • if no channels, rendering engine turns one on. This could become annoying and breaks actual usage.
  • clients check first or handle exception

Note that nothing stops the user to turn all the channels off.

Last edited 9 years ago by jburel (previous) (diff)

comment:4 Changed 9 years ago by Will Moore <will@…>

(In [4f0e6bde087f098866b20f417026d4b3e9690f65/ome.git] on branch develop) Split view center plugin uses webclient/render_image. See #8888

Switched from using webgateway/render_image since this doesn't use the webclient login_required
and can fail to set the correct group for looking up of images etc.

comment:5 Changed 9 years ago by wmoore

Since this gives a black image: /webclient/render_image/1/15/0/?c=-1|70:314$0000FF,-2|396:1564$00FF00,-3|533:2798$FF0000,-4|445:4566$FF0000&m=c&p=normal&ia=0&q=0.9&zm=63&x=0&y=0
need to check what's different here vv code above.

comment:6 Changed 9 years ago by wmoore

This appears to only affect single channel images.

E.g. this throws an exception for single channel images:

http://localhost:8000/webclient/render_image/102/15/0/?c=-1

Some improved code below

from omero.gateway import BlitzGateway
import omero
from cStringIO import StringIO
import Image

conn = BlitzGateway('will', 'ome', host='localhost')
conn.connect()

i = conn.getObject("Image", 101)
pid = i.getPixelsId()
re = conn.createRenderingEngine()
sopts = {'omero.group':'-1'}
re.lookupPixels(pid, )
if not re.lookupRenderingDef(pid, sopts):
    re.resetDefaults(sopts)
    re.lookupRenderingDef(pid, sopts)
re.load()
pd = omero.romio.PlaneDef()
pd.z = 10
pd.t = 0
re.renderCompressed(pd)       # OK
re.setActive(0, False)              # This is a single-channel image
data = re.renderCompressed(pd)

i = StringIO(data)
rv = Image.open(i)
rv.show()

comment:7 Changed 9 years ago by cxallan

  • Milestone changed from OMERO-Beta4.4 to OMERO-Beta4.4.1

comment:8 Changed 9 years ago by cneves

  • Owner changed from cxallan to cneves-x

comment:9 Changed 9 years ago by cxallan

  • Owner changed from cneves-x to cxallan
  • Status changed from new to accepted

Server side exception when there are no active channels is as follows:

 	

exception ::omero::ApiUsageException
{
    serverStackTrace = ome.conditions.ApiUsageException: No active channel bindings found.
	at omeis.providers.re.GreyScaleStrategy.findFirstActiveChannelBinding(GreyScaleStrategy.java:274)
	at omeis.providers.re.GreyScaleStrategy.renderAsPackedInt(GreyScaleStrategy.java:131)
	at omeis.providers.re.Renderer.renderAsPackedInt(Renderer.java:511)
	at ome.services.RenderingBean.renderAsPackedInt(RenderingBean.java:478)
	at ome.services.RenderingBean.renderCompressed(RenderingBean.java:532)
...

comment:10 Changed 9 years ago by cxallan

  • Remaining Time set to 0.25
  • Sprint set to 2012-09-25 (5)

comment:11 Changed 9 years ago by cxallan

  • Remaining Time changed from 0.25 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed

comment:12 Changed 9 years ago by Chris Allan <callan@…>

(In [23fb2e16b33158d971242edb1ca1da22fcb5de83/ome.git] on branch develop) Allow greyscale rendering when no channel binding active. (See #8888)

This commit ensures that like the HSBStrategy rendering with the
GreyScaleStrategy? while no channel binding is active is possible
and returns a completely blank image.

comment:13 Changed 9 years ago by Josh Moore <josh@…>

(In [a201915b0fb65134ec9c7e826ebcc978390aa22d/ome.git] on branch develop) Merge pull request #360 from chris-allan/8888_no_active_channels

Allow greyscale rendering when no channel binding active. (See #8888)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.67756 sec.)

We're Hiring!