Skip to content

don't attempt ROI stats on big images#223

Merged
sbesson merged 3 commits intoome:developfrom
will-moore:batch_roi_export_big_images
Nov 26, 2025
Merged

don't attempt ROI stats on big images#223
sbesson merged 3 commits intoome:developfrom
will-moore:batch_roi_export_big_images

Conversation

@will-moore
Copy link
Member

@will-moore will-moore commented Sep 13, 2024

If you try to run the Batch_ROI_Export script on Big images, it fails with:

> > serverStackTrace = ome.conditions.ApiUsageException: This method cannot handle tiled images yet. 
> > at ome.services.roi.GeomTool.getStatsRestricted(GeomTool.java:415) 

To avoid this, we first check for whether this is a big image and if so, we don't try to load stats.

To test, draw ROIs on a Big Image(s) and run Batch_ROI_Export script:

Screenshot 2024-09-13 at 09 10 48

@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/omero-web-script-batch-roi-export/103609/5

@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/omero-web-script-batch-roi-export/103609/7

@pwalczysko
Copy link
Member

Compared merge-ci with 2 rectangle ROIs on a large image with outreach (release version).

With this PR, the Batch_ROI_export works fine and produces csv outputs.
On release version of the Batch_ROI_export, an error occurrs as follows

omero.ApiUsageException: exception ::omero::ApiUsageException
{
    serverStackTrace = ome.conditions.ApiUsageException: This method cannot handle tiled images yet.
	at ome.services.roi.GeomTool.getStatsRestricted(GeomTool.java:415)
	at ome.services.blitz.impl.RoiI$8.doWork(RoiI.java:260)
	at sun.reflect.GeneratedMethodAccessor295.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 

@sbesson sbesson closed this Nov 25, 2025
@sbesson sbesson reopened this Nov 25, 2025
@sbesson sbesson linked an issue Nov 26, 2025 that may be closed by this pull request
@sbesson sbesson merged commit 0c7356a into ome:develop Nov 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Error while exporting ROI

4 participants