Each Volume now gets a imageMetadata object.
The object is empty by default, and is intended to be populated by the IVolumeLoaders.
There is a simple utility function for now, which does the same thing for every volume. But in the future now there is room for the VolumeLoaders to inject metadata that is available only in the file format they are loading (e.g. OME Metadata).
The intent here is that the website-3d-cell-viewer can now just pick up this volume.imageMetadata for its metadata display, and not need to consider what its contents are.
2 open questions:
should I type this any differently than a generic Record<string, unknown> ?
do we need a code path to create an imageMetadata for volumes that do not get created by IVolumeLoaders?
Each Volume now gets a imageMetadata object. The object is empty by default, and is intended to be populated by the IVolumeLoaders. There is a simple utility function for now, which does the same thing for every volume. But in the future now there is room for the VolumeLoaders to inject metadata that is available only in the file format they are loading (e.g. OME Metadata).
The intent here is that the website-3d-cell-viewer can now just pick up this
volume.imageMetadata
for its metadata display, and not need to consider what its contents are.2 open questions: