Specify resolution level for reading OME-Zarr
tischi opened this issue · 6 comments
Use Case
For processing OME-Zarr image data it will be very useful to specify with resolution level to work on.
Solution
Currently the resolution level appears to be hard-coded here.
We could see two ways to implement this:
- Specify the resolution level
R
during the opening of the file - Have
R
as an additional in the ACISImage dimensions
The second option seems more flexible, but probably is less easy to implement in your current framework?
This is something we are very likely to add to the API in bioio which is getting close to its first release.
What do you think of setting the resolution level in the same way that we handle scenes? Something like get_num_resolution_levels
and then set_current_resolution_level
. And then you can call .dims
and .get_image_data
as usual.
Hi, thank you for the fast answer! And great that you will support this! I am a total beginner in terms of aicsimageio and thus probably not the best person to make recommendations here. I take the liberty to ping @joshmoore who maybe can express a more informed opinion on how to exactly implement this?!
I like the solution you proposed @toloudis , would the setter you describe raise NotYetImplemented
for readers/plugins by default? We would of course immediately add an implementation for the OME ZARR reader.
(Linking this to the bioio issue for this for my own sake)
I'd say that the setter function should raise a ValueException if you pass a value that is out of range of range(get_num_multiresolution_levels)
. So basically, it should only accept 0 for anything that doesn't have multiresolution data.
tischi commented 2 days ago
maybe can express a more informed opinion on how to exactly implement this?!
If in doubt:
AICSImageIO is entering maintenance mode meaning we will only be applying easy-to-implement critical bugfixes. Replacing AICSImageIO is BioIO (soon to be officially released) with the same features just refactored for various reasons seen here.
Here is a similar issue in BioIO, but feel free to open another issue in BioIO or add onto that one if you feel it doesn't capture your request.