Skip to content

Saving to OME-Zarr from virtual stack does not work #107

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

Open
oanegros opened this issue Apr 29, 2025 · 4 comments
Open

Saving to OME-Zarr from virtual stack does not work #107

oanegros opened this issue Apr 29, 2025 · 4 comments

Comments

@oanegros
Copy link

I downloaded the most recent fiji version for windows 10, and was not able to save to OME-Zarr when opening a .tif as virtual stack.
With this:

  • it makes the .zarr directory with .zgroup
  • (sometimes) makes an s0 directory, and .zattrs

When loading the full stack into memory the OME-Zarr saving seems to work on this same dataset.

I'm not very adept with Fiji so never get how to get a good full log (without the '6 more ...') but i got this output:

(Fiji Is Just) ImageJ 2.16.0/1.54p; Java 1.8.0_322 [64-bit]; Windows 10 10.0; 5824MB of 195584MB (2%)
 
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw exception
    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.lang.Thread.run(Thread.java:750)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw exception
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:304)
    ... 5 more
Caused by: java.lang.RuntimeException: Module threw exception
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:128)
    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)
    ... 1 more
Caused by: java.lang.NullPointerException
    at loci.formats.FormatReader.seriesToCoreIndex(FormatReader.java:1334)
    at loci.formats.FormatReader.setSeries(FormatReader.java:972)
    at loci.formats.DelegateReader.setSeries(DelegateReader.java:123)
    at loci.formats.ReaderWrapper.setSeries(ReaderWrapper.java:407)
    at loci.formats.ReaderWrapper.setSeries(ReaderWrapper.java:407)
    at loci.formats.ReaderWrapper.setSeries(ReaderWrapper.java:407)
    at loci.formats.ReaderWrapper.setSeries(ReaderWrapper.java:407)
    at loci.formats.ReaderWrapper.setSeries(ReaderWrapper.java:407)
    at loci.formats.ReaderWrapper.setSeries(ReaderWrapper.java:407)
    at loci.plugins.util.BFVirtualStack.getProcessor(BFVirtualStack.java:159)
    at net.imglib2.img.imageplus.ByteImagePlus.<init>(ByteImagePlus.java:98)
    at net.imglib2.img.ImagePlusAdapter.wrapByte(ImagePlusAdapter.java:157)
    at net.imglib2.img.ImagePlusAdapter.wrapLocal(ImagePlusAdapter.java:101)
    at net.imglib2.img.ImagePlusAdapter.wrap(ImagePlusAdapter.java:75)
    at net.imglib2.img.display.imagej.ImageJFunctions.wrap(ImageJFunctions.java:94)
    at org.janelia.saalfeldlab.n5.metadata.imagej.ImageplusMetadata.datasetAttributes(ImageplusMetadata.java:77)
    at org.janelia.saalfeldlab.n5.metadata.imagej.NgffToImagePlus.readMetadata(NgffToImagePlus.java:153)
    at org.janelia.saalfeldlab.n5.metadata.imagej.NgffToImagePlus.readMetadata(NgffToImagePlus.java:15)
    at org.janelia.saalfeldlab.n5.ij.N5ScalePyramidExporter.initializeBaseMetadata(N5ScalePyramidExporter.java:647)
    at org.janelia.saalfeldlab.n5.ij.N5ScalePyramidExporter.processMultiscale(N5ScalePyramidExporter.java:549)
    at org.janelia.saalfeldlab.n5.ij.N5ScalePyramidExporter.run(N5ScalePyramidExporter.java:1494)
    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)
    ... 6 more

Please let me know if you need more info :)

@oanegros
Copy link
Author

I'm also having other virtual stacking issues on this machine for some reason, even with this fresh fiji install, so it might also be something else? Can you all reproduce this?

@bogovicj
Copy link
Contributor

bogovicj commented May 5, 2025

Thanks @oanegros ,

So far, I have not been able to reproduce this so far (i.e. saving a virtual stack worked for me as expected).

This part

Caused by: java.lang.NullPointerException
    at loci.formats.FormatReader.seriesToCoreIndex(FormatReader.java:1334)
    at loci.formats.FormatReader.setSeries(FormatReader.java:972)
...
    at loci.plugins.util.BFVirtualStack.getProcessor(BFVirtualStack.java:159)

is suggestive that its a bio formats thing.
So my follow up questions:

  • what kind of file are you opening?
  • how are you using fiji to open it?

@oanegros
Copy link
Author

oanegros commented May 7, 2025

Ah okay; i was opening an imagej-tif made from fiji itself, using the bioformats importer with virtual stack on

@bogovicj
Copy link
Contributor

bogovicj commented May 7, 2025

thanks, I'll investigate

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

No branches or pull requests

2 participants