allen-cell-animated / volume-viewer

https://allen-cell-animated.github.io/volume-viewer/
Other
92 stars 7 forks source link

imageMetadata #98

Closed toloudis closed 1 year ago

toloudis commented 1 year ago

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:

  1. should I type this any differently than a generic Record<string, unknown> ?
  2. do we need a code path to create an imageMetadata for volumes that do not get created by IVolumeLoaders?