Skip to content

Update instructions for opening OME-Zarrs in BDV and MoBIE#33

Open
will-moore wants to merge 2 commits intoome:masterfrom
will-moore:bdv_mobie_update
Open

Update instructions for opening OME-Zarrs in BDV and MoBIE#33
will-moore wants to merge 2 commits intoome:masterfrom
will-moore:bdv_mobie_update

Conversation

@will-moore
Copy link
Member

Update as part of ome/ome-ngff-tools#26

cc @pwalczysko

@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch bdv_mobie_update

@will-moore
Copy link
Member Author

I've removed the Groovy script section as it's not working and I don't know where the script actually is or how to fix it.

@pwalczysko
Copy link
Member

I've removed the Groovy script section as it's not working and I don't know where the script actually is or how to fix it.

@will-moore Confused. Do you claim that the script is

  1. not working
  2. you do not know where the script is

How do you know Ad 1. when Ad 2. applies ?
The script is https://github.com/ome/omero-guide-fiji/blob/master/scripts/groovy/mobie_ome_zarr.groovy - i.e. in this repo.

Copy link
Member

@pwalczysko pwalczysko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address comment, thank you

@will-moore
Copy link
Member Author

I downloaded the script so that I could copy the text in it.
Then used the text as described (in Fiji Groovy script) which didn't work.
It just wasn't obvious to me how to go from https://omero-guides.readthedocs.io/en/latest/_downloads/3a34799ebcf96eb6e3487282b3976890/mobie_ome_zarr.groovy to find the script in github at https://github.com/ome/omero-guide-fiji/blob/master/scripts/groovy/mobie_ome_zarr.groovy

@will-moore
Copy link
Member Author

Error running the script is:

Started New_.groovy at Wed Apr 16 09:53:31 BST 2025
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
New_.groovy: 1: unable to resolve class org.embl.mobie.OMEZarrViewer
 @ line 1, column 1.
   import org.embl.mobie.OMEZarrViewer
   ^

New_.groovy: 2: unable to resolve class org.embl.mobie.io.ome.zarr.openers.OMEZarrS3Opener
 @ line 2, column 1.
   import org.embl.mobie.io.ome.zarr.openers.OMEZarrS3Opener
   ^

2 errors

	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:292)
	at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:910)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:692)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:666)
	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:373)
	at groovy.lang.GroovyClassLoader.lambda$parseClass$2(GroovyClassLoader.java:316)
	at org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
	at org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:314)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:298)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:258)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:350)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:159)
	at org.scijava.plugins.scripting.groovy.GroovyScriptLanguage$1.eval(GroovyScriptLanguage.java:97)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.scijava.script.ScriptModule.run(ScriptModule.java:173)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

#. In the text field, enter the desired URL e.g.

#. When the image is displayed in the BigDataViewer, select the dialog and press *P* to display the rendering controls.
``https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0062A/6001240.zarr``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not wfm.

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw error
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:308)
	at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:160)
	at ij.IJ.runPlugIn(IJ.java)
	at ij.Executer.runCommand(Executer.java:152)
	at ij.Executer.run(Executer.java:70)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw error
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:304)
	... 5 more
Caused by: java.lang.RuntimeException: Module threw error
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:131)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	... 1 more

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/ome/ome-ngff-tools/pull/26/files#diff-b4d68dc855d0f9476d3f2ee343853bd21bf82ea9960d0cf06661baa244439dd6R9 has the versions of BDV jars that I had when testing.
But otherwise I don't know how to troubleshoot that error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BDV? I am commenting on the MoBIE workflow...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, yep. Don't know what's going on there. Works for me, with latest MoBIE jars:

$ ls /Applications/Fiji.app/jars | grep mobie
mobie-io-4.0.3.jar
mobie-viewer-fiji-6.3.3.jar

But, the error doesn't seem to come from MoBIE code.

Copy link
Member

@pwalczysko pwalczysko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pwalczysko
Copy link
Member

I have downloaded a fresh Fiji and run the MoBIE manual workflow on it. The same error

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw error
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:308)
	at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:160)
	at ij.IJ.runPlugIn(IJ.java)
	at ij.Executer.runCommand(Executer.java:152)
	at ij.Executer.run(Executer.java:70)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw error
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:304)
	... 5 more
Caused by: java.lang.RuntimeException: Module threw error
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:131)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	... 1 more

occurred.
Imho, we need a third tester, as @will-moore is informing me that it works for him.

@pwalczysko
Copy link
Member

The Big Data Viewer workflow errors for me with

Compression 'org.janelia.saalfeldlab.n5.blosc.BloscCompression' could not be registered
[ERROR] Command errored: Open OME-Zarr...
java.lang.NoClassDefFoundError: Could not initialize class org.janelia.saalfeldlab.n5.blosc.BloscCompression
	at org.janelia.saalfeldlab.n5.zarr.ZarrCompressor$Blosc.getCompression(ZarrCompressor.java:185)
	at org.janelia.saalfeldlab.n5.zarr.ZarrCompressor$Blosc.getCompression(ZarrCompressor.java:128)
	at org.janelia.saalfeldlab.n5.zarr.ZArrayAttributes.getDatasetAttributes(ZArrayAttributes.java:154)
	at org.janelia.saalfeldlab.n5.zarr.ZarrKeyValueReader.createDatasetAttributes(ZarrKeyValueReader.java:423)
	at org.janelia.saalfeldlab.n5.zarr.ZarrKeyValueReader.getDatasetAttributes(ZarrKeyValueReader.java:381)
	at org.janelia.saalfeldlab.n5.zarr.ZarrKeyValueReader.getDatasetAttributes(ZarrKeyValueReader.java:76)
	at org.janelia.saalfeldlab.n5.universe.metadata.ome.ngff.v04.OmeNgffMetadataParser.parseMetadata(OmeNgffMetadataParser.java:88)
	at org.janelia.saalfeldlab.n5.universe.metadata.N5MetadataParser.apply(N5MetadataParser.java:71)
	at org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer.parseMetadataShallow(N5DatasetDiscoverer.java:323)
	at org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer.discoverShallow(N5DatasetDiscoverer.java:409)
	at org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer.discoverAndParseRecursive(N5DatasetDiscoverer.java:443)
	at org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer.discoverAndParseRecursive(N5DatasetDiscoverer.java:431)
	at org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer.discoverAndParseRecursive(N5DatasetDiscoverer.java:424)
	at org.janelia.saalfeldlab.n5.universe.N5MetadataUtils.parseMetadataTree(N5MetadataUtils.java:163)
	at org.janelia.saalfeldlab.n5.universe.N5MetadataUtils.parseMetadata(N5MetadataUtils.java:113)
	at org.janelia.saalfeldlab.n5.universe.N5MetadataUtils.parseMetadata(N5MetadataUtils.java:106)
	at org.janelia.saalfeldlab.n5.universe.N5MetadataUtils.parseMetadata(N5MetadataUtils.java:101)
	at org.embl.mobie.io.imagedata.N5ImageData.open(N5ImageData.java:163)
	at org.embl.mobie.io.imagedata.N5ImageData.getNumDatasets(N5ImageData.java:95)
	at org.embl.mobie.command.open.OpenOMEZARRCommand.run(OpenOMEZARRCommand.java:107)
	at org.scijava.command.CommandModule.run(CommandModule.java:196)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class org.janelia.saalfeldlab.n5.blosc.BloscCompression
	at org.janelia.saalfeldlab.n5.zarr.ZarrCompressor$Blosc.getCompression(ZarrCompressor.java:185)
	at org.janelia.saalfeldlab.n5.zarr.ZarrCompressor$Blosc.getCompression(ZarrCompressor.java:128)
	at org.janelia.saalfeldlab.n5.zarr.ZArrayAttributes.getDatasetAttributes(ZArrayAttributes.java:154)
	at org.janelia.saalfeldlab.n5.zarr.ZarrKeyValueReader.createDatasetAttributes(ZarrKeyValueReader.java:423)
	at org.janelia.saalfeldlab.n5.zarr.ZarrKeyValueReader.getDatasetAttributes(ZarrKeyValueReader.java:381)
	at org.janelia.saalfeldlab.n5.zarr.ZarrKeyValueReader.getDatasetAttributes(ZarrKeyValueReader.java:76)
	at org.janelia.saalfeldlab.n5.universe.metadata.ome.ngff.v04.OmeNgffMetadataParser.parseMetadata(OmeNgffMetadataParser.java:88)
	at org.janelia.saalfeldlab.n5.universe.metadata.N5MetadataParser.apply(N5MetadataParser.java:71)
	at org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer.parseMetadataShallow(N5DatasetDiscoverer.java:323)
	at org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer.discoverShallow(N5DatasetDiscoverer.java:409)
	at org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer.discoverAndParseRecursive(N5DatasetDiscoverer.java:443)
	at org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer.discoverAndParseRecursive(N5DatasetDiscoverer.java:431)
	at org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer.discoverAndParseRecursive(N5DatasetDiscoverer.java:424)
	at org.janelia.saalfeldlab.n5.ui.DatasetSelectorDialog.ok(DatasetSelectorDialog.java:865)
	at org.janelia.saalfeldlab.n5.ui.DatasetSelectorDialog.lambda$run$5(DatasetSelectorDialog.java:353)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:262)
	at java.awt.Component.processMouseEvent(Component.java:6539)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6304)
	at java.awt.Container.processEvent(Container.java:2239)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2297)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
	at java.awt.Container.dispatchEventImpl(Container.java:2283)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:733)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

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.

2 participants