Merged
Conversation
950d25c to
9e0c441
Compare
…e datasets * update tests * add custom exception handling.
…Image - Add Pyramidal5DImageDataDemo
…mageData` constructor with improved exception handling
…tion source to test directory Reasoning * Class Multiscales can be replaced by using N5 OMENgffMeta classes, which read the same information and make it accessible through their APIs * Purpose of class OMEZarrData was a bit unclear * MultiscaleImage does not seem to be needed for now, since access to Img / SourceAndConverters is possible via N5 function calls
…emove code duplication in the constuctor.
…e to enforce immutability.
…n `asPyramidalDataset`.
… `DefaultPyramidal5DImageData`.
…n `resolveRelativePath`.
…eImageException` both in `openImage`
…es inside one level.
New hierarchy:
Multiscale
├── name
├── resolutionLevels
├── level 0
├── level 1
└── level N
Remove conceptual leakage that an individual resolution level knows how many resolution levels there are
stefanhahmann
commented
Mar 2, 2026
Collaborator
Author
stefanhahmann
left a comment
There was a problem hiding this comment.
Thanks for the valuable comments. I tried to address them as appropriate.
Contributor
|
Many thanks for the fixes and/or additional explanations of the code. I would like to kindly ask for one last minor update/addition of a comment, and it's good to go for me then. |
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This pull request contains refactorings the way OME-Zarr datasets are opened and managed. It updates method names cleans up test and demo code.
Refactoring and Code Cleanup:
Moved
MultiscaleImage.java,Multiscales.javaandOMEZarrData.javato the test directory for a now, as these classes are currently not used anymore for production.It remains only:
Pyramidal5DImageData- the interfaceDefaultPyramidal5DImageData- the default implementation of the interface using N5Utils.open() for the ImgPlus andN5Viewer.buildN5Sourcesfor theSourceAndConverterPyramidalDataset- the extension ofDatasetDefaultPyramidal5DImageData:ResolutionLevelandMetadataAdapterthat partially serve similar purposes as the oldMultiscalesRefactored dataset opening logic in
ZarrOpenActionsto first attempt opening as a multiscale image, then fall back to single-scale, improving the user experienceError Handling and Robustness:
Added custom exceptions
NotAMultiscaleImageExceptionandNotASingleScaleImageExceptionto clearly signal when a dataset is not a valid multiscale or single-scale OME-Zarr image, and refactored code to throw and handle these exceptions appropriately.Improved error reporting to users and logging by showing more informative error dialogs and log messages when dataset opening fails (
ZarrOpenActions.java).API and Naming Consistency:
numResolutions()tonumResolutionLevels()inPyramidal5DImageDataand updated all usagesUser Interface Improvements:
OpenInBDVCommandpluginNew Demo and Documentation:
N5ReaderDemo.javato demonstrate metadata discovery and inspection for OME-Zarr datasets (N5ReaderDemo.java).