Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split view figure big images #412

Merged
merged 6 commits into from
Mar 15, 2023

Conversation

will-moore
Copy link
Member

Fixes #391

To test:

  • Select 1 or more images, including a Big image
  • Run Split_View_Figure script
  • Big Image won't be included in the UI and a warning is shown:

Screenshot 2022-10-05 at 11 01 25

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-python-superbuild-push#1211. See the console output for more details.
Possible conflicts:

--conflicts

@jburel
Copy link
Member

jburel commented Jan 10, 2023

@will-moore This PR could also be considered but first other PRs will need to be excluded due to the conflict so it can be tested

@snoopycrimecop
Copy link
Member

snoopycrimecop commented Jan 11, 2023

Conflicting PR. Removed from build OMERO-python-superbuild-push#114. See the console output for more details.
Possible conflicts:

--conflicts Conflict resolved in build OMERO-python-superbuild-push#1318. See the console output for more details.

@will-moore will-moore force-pushed the split_view_figure_big_images branch from 8179663 to 4b55425 Compare January 13, 2023 06:50
@jburel
Copy link
Member

jburel commented Jan 16, 2023

  • Select a big image only
  • The image is correctly not added to the UI
  • Warning message is displayed
  • I can still click on the button to create a figure. This should be disabled

Error in the info

WARNING:omero.gateway:ApiUsageException on <class 'omero.gateway.OmeroGatewaySafeCallWrapper'> to <0f04e147-e94c-4fd9-aafd-b93befe2eb70omero.api.RenderingEngine> renderCompressed((object #0 (::omero::romio::PlaneDef)
{
    slice = 0
    x = 0
    y = 0
    z = 0
    t = 0
    region = <nil>
    stride = 0
},), {})
Traceback (most recent call last):
  File "/home/omero/workspace/OMERO-server/.venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 4863, in __call__
    return self.f(*args, **kwargs)
  File "/home/omero/workspace/OMERO-server/.venv3/lib64/python3.6/site-packages/omero_api_RenderingEngine_ice.py", line 913, in renderCompressed
    return _M_omero.api.RenderingEngine._op_renderCompressed.invoke(self, ((_def, ), _ctx))
omero.ApiUsageException: exception ::omero::ApiUsageException
{
    serverStackTrace = ome.conditions.ApiUsageException: 78656×106560 plane too large, cannot exceed 2^31 pixels
	at omeis.providers.re.RGBIntBuffer.<init>(RGBIntBuffer.java:63)
	at omeis.providers.re.RenderingStrategy.getIntBuffer(RenderingStrategy.java:186)
	at omeis.providers.re.HSBStrategy.renderAsPackedInt(HSBStrategy.java:291)
	at omeis.providers.re.Renderer.renderAsPackedInt(Renderer.java:558)
	at ome.services.RenderingBean.renderAsPackedInt(RenderingBean.java:512)
	at ome.services.RenderingBean.renderCompressed(RenderingBean.java:542)
	at sun.reflect.GeneratedMethodAccessor2181.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy122.renderCompressed(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor2181.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy122.renderCompressed(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:172)
	at ome.services.throttling.Callback.run(Callback.java:56)
	at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)
	at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:140)
	at ome.services.blitz.impl.RenderingEngineI.renderCompressed_async(RenderingEngineI.java:354)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at omero.cmd.CallContext.invoke(CallContext.java:85)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy124.renderCompressed_async(Unknown Source)
	at omero.api._RenderingEngineTie.renderCompressed_async(_RenderingEngineTie.java:298)
	at omero.api._RenderingEngineDisp.___renderCompressed(_RenderingEngineDisp.java:1028)
	at omero.api._RenderingEngineDisp.__dispatch(_RenderingEngineDisp.java:2418)
	at IceInternal.Incoming.invoke(Incoming.java:221)
	at Ice.ConnectionI.invokeAll(ConnectionI.java:2536)
	at Ice.ConnectionI.dispatch(ConnectionI.java:1145)
	at Ice.ConnectionI.message(ConnectionI.java:1056)
	at IceInternal.ThreadPool.run(ThreadPool.java:395)
	at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832)
	at java.lang.Thread.run(Thread.java:748)

    serverExceptionClass = ome.conditions.ApiUsageException
    message = 78656×106560 plane too large, cannot exceed 2^31 pixels
}
Traceback (most recent call last):
  File "./script", line 803, in <module>
    run_script()
  File "./script", line 791, in run_script
    [file_annotation, message] = split_view_figure(conn, script_params)
  File "./script", line 634, in split_view_figure
    height, image_labels, algorithm, stepping, scalebar, overlay_colour)
  File "./script", line 385, in make_split_view_figure
    algorithm, stepping, scalebar, overlay_colour)
  File "./script", line 209, in get_split_view
    overlay = re.renderCompressed(plane_def)
  File "/home/omero/workspace/OMERO-server/.venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 4866, in __call__
    return self.handle_exception(e, *args, **kwargs)
  File "/home/omero/workspace/OMERO-server/.venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 4863, in __call__
    return self.f(*args, **kwargs)
  File "/home/omero/workspace/OMERO-server/.venv3/lib64/python3.6/site-packages/omero_api_RenderingEngine_ice.py", line 913, in renderCompressed
    return _M_omero.api.RenderingEngine._op_renderCompressed.invoke(self, ((_def, ), _ctx))
omero.ApiUsageException: exception ::omero::ApiUsageException
{
    serverStackTrace = ome.conditions.ApiUsageException: 78656×106560 plane too large, cannot exceed 2^31 pixels
	at omeis.providers.re.RGBIntBuffer.<init>(RGBIntBuffer.java:63)
	at omeis.providers.re.RenderingStrategy.getIntBuffer(RenderingStrategy.java:186)
	at omeis.providers.re.HSBStrategy.renderAsPackedInt(HSBStrategy.java:291)
	at omeis.providers.re.Renderer.renderAsPackedInt(Renderer.java:558)
	at ome.services.RenderingBean.renderAsPackedInt(RenderingBean.java:512)
	at ome.services.RenderingBean.renderCompressed(RenderingBean.java:542)
	at sun.reflect.GeneratedMethodAccessor2181.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy122.renderCompressed(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor2181.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy122.renderCompressed(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:172)
	at ome.services.throttling.Callback.run(Callback.java:56)
	at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)
	at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:140)
	at ome.services.blitz.impl.RenderingEngineI.renderCompressed_async(RenderingEngineI.java:354)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at omero.cmd.CallContext.invoke(CallContext.java:85)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy124.renderCompressed_async(Unknown Source)
	at omero.api._RenderingEngineTie.renderCompressed_async(_RenderingEngineTie.java:298)
	at omero.api._RenderingEngineDisp.___renderCompressed(_RenderingEngineDisp.java:1028)
	at omero.api._RenderingEngineDisp.__dispatch(_RenderingEngineDisp.java:2418)
	at IceInternal.Incoming.invoke(Incoming.java:221)
	at Ice.ConnectionI.invokeAll(ConnectionI.java:2536)
	at Ice.ConnectionI.dispatch(ConnectionI.java:1145)
	at Ice.ConnectionI.message(ConnectionI.java:1056)
	at IceInternal.ThreadPool.run(ThreadPool.java:395)
	at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832)
	at java.lang.Thread.run(Thread.java:748)

    serverExceptionClass = ome.conditions.ApiUsageException
    message = 78656×106560 plane too large, cannot exceed 2^31 pixels
}

@will-moore
Copy link
Member Author

@jburel That last commit should disable the Submit if there are no images

@jburel
Copy link
Member

jburel commented Jan 17, 2023

The Submit button is now disabled.
There is still a problem:

  • Select 2 images, one is a big image
  • Only one in the UI: expected
  • Error message in info

{
slice = 0
x = 0
y = 0
z = 0
t = 0
region =
stride = 0
},), {})
Traceback (most recent call last):
File "/home/omero/workspace/OMERO-server/.venv3/lib64/python3.6/site-packages/omero/gateway/init.py", line 4863, in call
return self.f(*args, **kwargs)
File "/home/omero/workspace/OMERO-server/.venv3/lib64/python3.6/site-packages/omero_api_RenderingEngine_ice.py", line 913, in renderCompressed
return _M_omero.api.RenderingEngine._op_renderCompressed.invoke(self, ((_def, ), _ctx))
omero.ApiUsageException: exception ::omero::ApiUsageException
{
serverStackTrace = ome.conditions.ApiUsageException: 62425×60101 plane too large, cannot exceed 2^31 pixels
at omeis.providers.re.RGBIntBuffer.(RGBIntBuffer.java:63)
at omeis.providers.re.RenderingStrategy.getIntBuffer(RenderingStrategy.java:186)
at omeis.providers.re.HSBStrategy.renderAsPackedInt(HSBStrategy.java:291)
at omeis.providers.re.Renderer.renderAsPackedInt(Renderer.java:558)
at ome.services.RenderingBean.renderAsPackedInt(RenderingBean.java:512)
at ome.services.RenderingBean.renderCompressed(RenderingBean.java:542)
at sun.reflect.GeneratedMethodAccessor2173.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

indicates that the big image is still pass to the server.

Since this PR still requires some work, we should not hold back on the dependencies upgrade work and include this PR in a later version and release asap

@jburel
Copy link
Member

jburel commented Jan 17, 2023

This time:

  • Selected 2 images (not big). Both images are in the UI. The figure is created with the 2 images and attached to the first one
  • Selected 2 images: one big. Only the "small" image is in the UI. The figure is created with 1 image and attached to the image
  • Select one big image only:
 File "/home/omero/workspace/OMERO-web/.venv3/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)

  File "/home/omero/workspace/OMERO-web/.venv3/lib64/python3.6/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/home/omero/workspace/OMERO-web/.venv3/lib64/python3.6/site-packages/omeroweb/decorators.py", line 544, in wrapped
    retval = f(request, *args, **kwargs)

  File "/home/omero/workspace/OMERO-web/.venv3/lib64/python3.6/site-packages/omeroweb/decorators.py", line 603, in wrapper
    context = f(request, *args, **kwargs)

  File "/home/omero/workspace/OMERO-web/.venv3/lib64/python3.6/site-packages/omeroweb/webclient/views.py", line 4271, in figure_script
    image = validImages[imageIds[0]]

IndexError: list index out of range

<WSGIRequest: GET '/web/webclient/figure_script/SplitView/?Image=105665'>

@jburel
Copy link
Member

jburel commented Feb 14, 2023

I have removed exclude label. This will be included in the build

@will-moore
Copy link
Member Author

Since the Split-View Figure is broken now (see #443 (comment)) and might be removed, this PR is on-hold till that is resolved

@will-moore
Copy link
Member Author

The issues with #443 (comment) are now resolved, so this is ready for another test.

@will-moore
Copy link
Member Author

Saw from demo today - coming from Split-View figure...

Internal Server Error: /webclient/render_image/249148/

ApiUsageException at /webclient/render_image/249148/
exception ::omero::ApiUsageException
{
    serverStackTrace = ome.conditions.ApiUsageException: 81672×37589 plane too large, cannot exceed 2^31 pixels

@will-moore
Copy link
Member Author

Ready for a "final" test... I'll list in standup...

@pwalczysko
Copy link
Member

Tested all the workflows mentioned above by @jburel - lgtm

@knabar knabar added this to the 5.19.0 milestone Mar 10, 2023
@knabar knabar merged commit 3f6061a into ome:master Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SplitView figure script fails with big images
5 participants