TASKLIST:
> At this point I don't think a universal entry point for all the formats is strictly necessary.
I think that a limited version of a "universal entry point" for internal biohub formats is one the core value propositions of iohub. If we're requiring a user to know their data type and its corresponding API to access data/metadata, then I think adoption of iohub will be limited.
The current version of WaveorderReader in waveorder has been valuable to me because it serves as a universal entry point for compmicro's work. For example, when we started reading pycromanager datasets, @ieivanov added the PycromanagerReader class and adapted WaveorderReader to read these datasets with the existing API. I could continue to run WaveorderReader.shape and WaveorderReader.get_array with predictable results, and any unpredictable results were considered bugs and fixed.
I understand that there may be difficulty in the details. For example, PycromanagerReader.get_zarr might be incorrectly/poorly named, and some dataset types might support different lazy-loading operations (maybe .get_zarr is not one of the universal entry points?). But I still think that all of our datasets share some common properties and operations that users will want to perform regularly. I think this list of operations consists of
- what is the shape of the data in this dataset? (
.shape)
- what is it's basic metadata? (if it's available) (
.channel_names, .z_step_size, .dtype, etc)
- what are the actual values in this dataset? (
.get_array)
Can we have a universal entry point that supports these operations?
Originally posted by @talonchandler in #31 (comment)
This deserves a dedicated discussion IMHO, that's why creating a separate issue here.
Moving forward I think we should find ways to engineer a solution that provides a more unified API to the end user. Particularly for adoption of iohub across Biohub, I think this is crucial. Providing list of aforementioned operations(by @talonchandler ) on each dataset is a great start. But I think there is more than that we can do. Like:
- Currently we are implementing readers and writers, but perhaps we can engineer a single dataset class that can handle reading and writing appropriately? and can help us removing redundancies like creating writers from readers and so on.
- We can provide functional APIs like imread/imwrite in
skimage.io and help scripting users to adopt iohub quicker?
- We can provide a separated metadata API which can enable iohub to be used for inspection before reading different imaging datasets.
This is merely a starting point for universal entry points discussions, looking forward to read everyone's input.
TASKLIST:
This deserves a dedicated discussion IMHO, that's why creating a separate issue here.
Moving forward I think we should find ways to engineer a solution that provides a more unified API to the end user. Particularly for adoption of iohub across Biohub, I think this is crucial. Providing list of aforementioned operations(by @talonchandler ) on each dataset is a great start. But I think there is more than that we can do. Like:
skimage.ioand help scripting users to adopt iohub quicker?This is merely a starting point for universal entry points discussions, looking forward to read everyone's input.