As a developer, I'd like to easily create Volumes as mocks to unit test both Volume and the loader API.
As a developer, I'd like to use the same API to load raw data arrays (in nbvv, e.g.) as remote, formatted data.
Solution
Add a new raw data loader which implements IVolumeLoader. We should not have to modify LoadSpec to accomplish this. The loader should receive a TypedArray (or an array of TypedArrays representing one channel, or an array of arrays representing time points and channels) when createVolume is called, and hold on to it for when loadVolumeData is called.
Write good unit tests by using this new loader to create mocks.
Future work: update website-3d-cell-viewer, nbvv to load raw data via this path.
Use Case
Volume
s as mocks to unit test bothVolume
and the loader API.Solution
Add a new raw data loader which implements
IVolumeLoader
. We should not have to modifyLoadSpec
to accomplish this. The loader should receive aTypedArray
(or an array ofTypedArrays
representing one channel, or an array of arrays representing time points and channels) whencreateVolume
is called, and hold on to it for whenloadVolumeData
is called.Write good unit tests by using this new loader to create mocks.
Future work: update website-3d-cell-viewer, nbvv to load raw data via this path.