ome / bioformats

Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the Open Microscopy Environment. Bio-Formats is released under the GNU General Public License (GPL); commercial licenses are available from Glencoe Software.
https://www.openmicroscopy.org/bio-formats
GNU General Public License v2.0
378 stars 242 forks source link

CZIReader in BioFormats does not support reading CZIs compressed using ZSTD #3870

Closed zeissmicroscopy closed 2 years ago

zeissmicroscopy commented 2 years ago

Hi all,

I am not sure if you are aware of the fact that some ZEN version already and very soon all ZEN version will be able to save CZI using the ZSTD compression

https://github.com/facebook/zstd

This new, very fast and efficient compression is already implemented internally in ZEN and in our new libCZIrw (C++, soon on Github) library as well as inside our pylibCZIrw

image

I gave the latest BioFormats in Fiji I try and got errors, but i think it should be supported since BioFormats 6.8.0.

Here the link to the file: https://www.dropbox.com/s/wcvqr2k1pagtwcm/w96_A1%2BA2_analyzed_ZSTD.czi?dl=0

(Fiji Is Just) ImageJ 2.3.0/1.53f51; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 168MB of 24379MB (<1%)

java.lang.NoClassDefFoundError: io/airlift/compress/zstd/ZstdDecompressor
    at loci.formats.in.ZeissCZIReader$SubBlock.readPixelData(ZeissCZIReader.java:4100)
    at loci.formats.in.ZeissCZIReader$SubBlock.readPixelData(ZeissCZIReader.java:4017)
    at loci.formats.in.ZeissCZIReader$SubBlock.readPixelData(ZeissCZIReader.java:4012)
    at loci.formats.in.ZeissCZIReader.initFile(ZeissCZIReader.java:773)
    at loci.formats.FormatReader.setId(FormatReader.java:1443)
    at loci.formats.ImageReader.setId(ImageReader.java:849)
    at io.scif.bf.BioFormatsFormat$Parser.typedParse(BioFormatsFormat.java:472)
    at io.scif.bf.BioFormatsFormat$Parser.typedParse(BioFormatsFormat.java:450)
    at io.scif.AbstractParser.parse(AbstractParser.java:244)
    at io.scif.AbstractParser.parse(AbstractParser.java:314)
    at io.scif.AbstractParser.parse(AbstractParser.java:53)
    at io.scif.AbstractReader.setSource(AbstractReader.java:271)
    at io.scif.services.DefaultInitializeService.initializeReader(DefaultInitializeService.java:91)
    at io.scif.img.ImgOpener.createReader(ImgOpener.java:483)
    at io.scif.img.ImgOpener.openImgs(ImgOpener.java:242)
    at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:152)
    at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:133)
    at io.scif.io.DatasetIOPlugin.open(DatasetIOPlugin.java:94)
    at io.scif.io.DatasetIOPlugin.open(DatasetIOPlugin.java:52)
    at org.scijava.io.DefaultIOService.open(DefaultIOService.java:93)
    at org.scijava.io.DefaultIOService.open(DefaultIOService.java:68)
    at HandleExtraFileTypes.openImage(HandleExtraFileTypes.java:549)
    at HandleExtraFileTypes.run(HandleExtraFileTypes.java:97)
    at ij.IJ.runUserPlugIn(IJ.java:241)
    at ij.IJ.runPlugIn(IJ.java:204)
    at ij.IJ.runPlugIn(IJ.java:193)
    at ij.io.Opener.openWithHandleExtraFileTypes(Opener.java:518)
    at ij.io.Opener.openUsingHandleExtraFileTypes(Opener.java:372)
    at ij.io.Opener.openImage(Opener.java:359)
    at ij.io.Opener.openImage(Opener.java:243)
    at ij.io.Opener.open(Opener.java:109)
    at ij.io.Opener.openAndAddToRecent(Opener.java:292)
    at ij.plugin.DragAndDrop.openFile(DragAndDrop.java:194)
    at ij.plugin.DragAndDrop.run(DragAndDrop.java:160)
    at java.lang.Thread.run(Thread.java:748)
zeissmicroscopy commented 2 years ago

Ok, I think I am missing a dependency, but for users it is not clear where to get it?

io.airlift.aircompressor ?

dgault commented 2 years ago

Hi @zeissmicroscopy, yes the ZSTD compression should be supported and testing the sample file with the latest release does not show any errors. How are you accessing Bio-Formats, is it through the command line tools, FIJI, or another method? If you are using a download of the Bio-Formats package or command line tools from https://www.openmicroscopy.org/bio-formats/downloads/, then the dependency will be included. For FIJI the aircompressor dependency should come as part of the main install (from Fiji 2.4.0 onwards).

sebi06 commented 2 years ago

Hi @dgault ,

after all the ongoing Fiji updates I check again and you are correct. The JAR is there :-). Therefore I think this issue can be closed.

dgault commented 2 years ago

Thanks, glad to hear that everything is sorted