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

Unidata dependency unification #15

Closed
sbesson opened this issue Mar 14, 2022 · 1 comment
Closed

Unidata dependency unification #15

sbesson opened this issue Mar 14, 2022 · 1 comment

Comments

@sbesson
Copy link
Member

sbesson commented Mar 14, 2022

From the testing in #8

Using the latest Bio-Formats command-line tools bundle (6.9.1), extracting the OMEZarr artifact and executing it against sample data leads to java.lang.NoSuchMethodError when running openBytes:

(java_dev) sbesson@Sebastiens-MacBook-Pro bftools % BF_CP=~/Downloads/bftools/OMEZarrReader-0.1.0-SNAPSHOT.jar ./showinf ~/Desktop/embl/cyx.ome.zarr/.zattrs -noflat -autoscale
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/sbesson/Downloads/bftools/bioformats_package.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/sbesson/Downloads/bftools/OMEZarrReader-0.1.0-SNAPSHOT.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
No native library available for this platform.
Checking file format [Zarr]
Initializing reader
ZarrReader initializing /Users/sbesson/Desktop/embl/cyx.ome.zarr/.zattrs
Initialization took 0.162s

Reading core metadata
filename = /Users/sbesson/Desktop/embl/cyx.ome.zarr/.zattrs
Used files:
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s2/.zarray
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s2/.zattrs
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s2/0/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s2/1/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s2/3/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s2/2/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/.zattrs
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/.zgroup
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/.zarray
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/.zattrs
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/0/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/0/0/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/0/1/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/0/1/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/1/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/1/0/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/1/1/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/1/1/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/3/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/3/0/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/3/1/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/3/1/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/2/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/2/0/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/2/1/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s1/2/1/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/.zarray
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/.zattrs
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/0/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/0/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/0/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/1/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/1/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/1/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/1/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/3/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/3/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/3/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/3/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/2/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/2/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/2/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/0/2/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/0/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/0/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/0/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/1/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/1/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/1/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/1/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/3/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/3/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/3/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/3/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/2/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/2/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/2/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/1/2/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/0/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/0/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/0/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/1/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/1/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/1/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/1/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/3/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/3/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/3/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/3/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/2/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/2/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/2/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/3/2/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/0/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/0/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/0/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/0/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/1/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/1/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/1/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/1/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/3/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/3/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/3/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/3/2
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/2/0
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/2/1
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/2/3
	/Users/sbesson/Desktop/embl/cyx.ome.zarr/s0/2/2/2
Series count = 1
Series #0 :
	Resolutions = 3
		sizeX[0] = 1024
		sizeX[1] = 512
		sizeX[2] = 256
	Image count = 4
	RGB = false (1) 
	Interleaved = false
	Indexed = false (false color)
	Width = 1024
	Height = 930
	SizeZ = 4
	SizeT = 1
	SizeC = 1
	Tile size = 1 x 256
	Thumbnail size = 128 x 116
	Endianness = intel (little)
	Dimension order = XYCZT (uncertain)
	Pixel type = uint16
	Valid bits per pixel = 16
	Metadata complete = false
	Thumbnail series = false
	-----
	Plane #0 <=> Z 0, C 0, T 0
	Plane #2 <=> Z 2, C 0, T 0
	Plane #3 <=> Z 3, C 0, T 0


Reading pixel data (0-3)
Exception in thread "main" java.lang.NoSuchMethodError: 'ucar.ma2.DataType ucar.ma2.DataType.getType(java.lang.Class, boolean)'
	at com.bc.zarr.ucar.NetCDF_Util.createArrayWithGivenStorage(NetCDF_Util.java:46)
	at com.bc.zarr.ZarrArray.read(ZarrArray.java:326)
	at com.bc.zarr.ZarrArray.read(ZarrArray.java:298)
	at loci.formats.services.JZarrServiceImpl.readBytes(JZarrServiceImpl.java:239)
	at loci.formats.in.ZarrReader.openBytes(ZarrReader.java:405)
	at loci.formats.ImageReader.openBytes(ImageReader.java:465)
	at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:348)
	at loci.formats.MinMaxCalculator.openBytes(MinMaxCalculator.java:269)
	at loci.formats.MinMaxCalculator.openBytes(MinMaxCalculator.java:260)
	at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:334)
	at loci.formats.tools.ImageInfo.readPixels(ImageInfo.java:825)
	at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:1055)
	at loci.formats.tools.ImageInfo.main(ImageInfo.java:1121)

Using the latest Bio-Formats 6.9.1-SNAPSHOT, including ome/bioformats#3788 suffices to fix the error and display the data.

The alternative is to update https://github.com/ome/bioformats/blob/ef26436c2d079f05c1047816e564ffcc63bb0b04/tools/bf.sh#L60 and prepend the JAR to the classpath rather than appending it so that the latest cdm-core dependency is loaded first. In general though this is probably an incentive to moving towards a Bio-Formats (patch?) release with the cdm upgrade to make our tools less dependent on the classpath

@sbesson
Copy link
Member Author

sbesson commented May 16, 2022

This should be solved with the Bio-Formats 6.9.1 release which bumps cdm-core to same version as the one used in jzarr. This question of compatility matrix between the upstream Bio-Formats JARs and ZarrReader still remains but I think this is another component of the larger discussion in #32 so I am closing this issue in favor of the more recent one.

@sbesson sbesson closed this as completed May 16, 2022
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

1 participant