allen-cell-animated / website-3d-cell-viewer

Other
5 stars 5 forks source link

update rawData interface #217

Closed toloudis closed 4 months ago

toloudis commented 4 months ago

Time to review: ~10-15 min?

Volume-viewer has a new RawArrayLoader so that raw array data can be passed through the same IVolumeLoader code path as files.

Currently https://github.com/allen-cell-animated/nbvv is the only client that passes raw array data in.

This PR updates the viewer props interface to use the new code path, and exports the appropriate data structures so that nbvv is ready to use it.

There's one key change in the loading code that initiates the volume data request only after the front end has had a chance to set up React state for channel settings. This is because the RawArrayLoader is completely synchronous and fires the channel data callback immediately.