You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current monorepo bundles everything — imglib2 model, Fiji/BDV integration, backend I/O (N5, zarr-java), and UI — into a single artifact. This makes it impossible for non-Fiji Java tools (QuPath, Icy, custom pipelines) to depend on just the OME-Zarr reading logic without pulling in the full Fiji stack. It also forces Fiji plugin authors to take both backends even if they only need one.
Proposed artifacts and dependency hierarchy
ome-zarr-imglib2 (API, no backend)
/ | \
ome-zarr-n5 ome-zarr-zarr-java ome-zarr-fiji (API, no backend)
\ | /
ome-zarr-fiji-ui
Both ome-zarr-imglib2 and ome-zarr-fiji are API-only artifacts (analogous to slf4j-api): they define interfaces and integration layers but ship no backend. Neither is useful in isolation — a backend must be present on the classpath. The backends (ome-zarr-n5, ome-zarr-zarr-java) pull in ome-zarr-imglib2 as a transitive dependency, so downstream consumers rarely need to declare it directly.
ome-zarr-imglib2(API, no backend)
No dependencies on Fiji, ImageJ, BDV, N5, or zarr-java
Define the backend-agnostic subset that will live in ome-zarr-imglib2: numChannels, numTimepoints, numResolutionLevels, getType, getName, getOmeroProperties
Add a new asImg()
Move Fiji/BDV-typed methods off the interface — asPyramidalDataset(), asPyramidalDataset(int), voxelDimensions(), and (currently on the impl) asDataset(), asImagePlus(), asSources(), asImgPlus()
Add generics to the load method rather than the PyramidBackend interface - <T...> PyramidContents load(URI inputURI)
Allow a PyramidBackend to be instantiated independently of the URI it reads
Clean up PyramidContents
(from tpietzsch comment "On the interface boundary")
For the fields numChannels / numTimepoints / numDimensions — add javadoc; either drop the fields in favor of final methods, or provide a default that derives them from resolution level 0
Reduce overspecification — derive dimensions from the full-resolution CachedCellImg instead of storing them
Resolve channelAxisIndex vs zAxisPresent/timeAxisPresent inconsistency (and overlap with AxisCalibration) — remove, or make them methods consistently for all axis types
Remove mpicbg.spim.data.sequence.VoxelDimensions — AxisCalibration already carries this information
Document the source/target coordinate systems for transforms
Separate the volatile (V) type from the imglib2 layer
(from tpietzsch + stefanhahmann comments)
Drop the V generic from PyramidContents → PyramidContents (and from PyramidBackend)
Remove the volatileImgs field (and volatileType) from PyramidContents — these belong in the future Fiji layer
Do the VolatileViews wrapping in the Fiji layer; have the Fiji layer expose V (used only for BDV display)
Audit current Volatile/VolatileViews usage in Pyramidal5DImageDataImpl, PyramidalBdv, and both backends so the wrapping has a clear new home
Resolve the in-code TODOs
Pyramidal.java:46 — decide the fate of the "may be removed" delegating defaults (numChannels, numTimepoints, getOmeroProperties, voxelDimensions); align with the new backend-agnostic subset
PyramidalDataset.java:62 — move preferredMaxWidth handling out of the Pyramidal5DImageData level (e.g. into the opening Command), since it's a UI/opening concern
OpenResolutionLevelCommand.java:101 — allow PyramidalDataset to be constructed from (context, pyramidContents, level) without a Pyramidal5DImageData, decoupling the dataset from the backend impl
Layer/dependency hygiene within the current monorepo
(prep so packages map cleanly onto future artifacts)
Verify no class in the future ome-zarr-imglib2 set references Fiji/ImageJ/BDV/N5/zarr-java types (the interface + metadata model + transforms)
Confirm both backends (backend/n5, backend/zarrjava) carry no Fiji dependencies
Update BackendBenchmark to compare N5 vs zarr-java loading times (validates backends stay independently usable)
Tasks for the actuall splitting into artefacts
Decide whether this is a Maven multi-module repo or separate repos
Identify which current classes belong in each artifact
Ensure ome-zarr-imglib2 compiles with no Fiji/BDV/N5/zarr-java deps
Ensure ome-zarr-n5 and ome-zarr-zarr-java compile with no Fiji deps
Motivation
The current monorepo bundles everything — imglib2 model, Fiji/BDV integration, backend I/O (N5, zarr-java), and UI — into a single artifact. This makes it impossible for non-Fiji Java tools (QuPath, Icy, custom pipelines) to depend on just the OME-Zarr reading logic without pulling in the full Fiji stack. It also forces Fiji plugin authors to take both backends even if they only need one.
Proposed artifacts and dependency hierarchy
Both
ome-zarr-imglib2andome-zarr-fijiare API-only artifacts (analogous toslf4j-api): they define interfaces and integration layers but ship no backend. Neither is useful in isolation — a backend must be present on the classpath. The backends (ome-zarr-n5,ome-zarr-zarr-java) pull inome-zarr-imglib2as a transitive dependency, so downstream consumers rarely need to declare it directly.ome-zarr-imglib2(API, no backend)PyramidalinterfacePyramidalContentsclass (backend-agnostic methods only:numChannels,numTimepoints,numResolutionLevels,getType,getName,getOmeroProperties), OME-Zarr metadata model, imglib2 types, coordinate transforms, channel/timepoint metadataPyramidBackendinterfaceasImg()methodome-zarr-n5orome-zarr-zarr-javadirectly; they getome-zarr-imglib2transitivelyome-zarr-n5ome-zarr-imglib2+ N5-universePyramidBackendome-zarr-zarr-javaome-zarr-imglib2+ zarr-javaome-zarr-fiji(API, no backend)ome-zarr-imglib2only — no backend dependencyPyramidalBdv,PyramidalDataset,PyramidalPreprocessor,PyramidalServiceome-zarr-n5orome-zarr-zarr-javaome-zarr-fiji+ome-zarr-n5; one who wants zarr-java declaresome-zarr-fiji+ome-zarr-zarr-java.ome-zarr-fiji-uiome-zarr-fiji+ome-zarr-n5+ome-zarr-zarr-javaDnDHandlerPlugin,ZarrOpenActions,DnDActionChooserdialog,OpenInBDVCommand,OpenResolutionLevelCommand,ClipboardUtils,ScriptUtilsSummary: who depends on what
ome-zarr-n5orome-zarr-zarr-javaboth pull inome-zarr-imglib2transitivelyome-zarr-fiji+ome-zarr-n5ome-zarr-fiji+ome-zarr-zarr-javaome-zarr-fiji-ui(pulls in everything)Preparation for splitting repo:
(from issue "Key design decision" + tpietzsch comments)
asImg()(from tpietzsch comment "On the interface boundary")
(from tpietzsch + stefanhahmann comments)
(prep so packages map cleanly onto future artifacts)
Tasks for the actuall splitting into artefacts
ome-zarr-imglib2compiles with no Fiji/BDV/N5/zarr-java depsome-zarr-n5andome-zarr-zarr-javacompile with no Fiji deps