allen-cell-animated / volume-viewer

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

add a raw array volume loader #171

Closed toloudis closed 4 months ago

toloudis commented 9 months ago

resolves #133

This allows the "raw array" volume data to be loaded in the same way that files are loaded. This code path is used by nbvv to pass numpy arrays directly into the viewer from jupyter. The new types RawArrayData and RawArrayInfo introduced here will be exported by website-3d-cell-viewer and used as props to that component, and passed through to this loader.

To test/demo: select the "procedural" volume from the dropdown in the test app. It should show a 3 channel volume with one torus, one sphere and one cone.

ShrimpCryptid commented 9 months ago

I'm noticing a bug I think is unrelated to your changes?

  1. Switch to OME ZARR (IDR 1)
  2. Quickly switch to another loader (ex, Procedural)
    Uncaught (in promise) TypeError: Cannot convert undefined or null to object
    at Function.assign (<anonymous>)
    at VolumeDrawable.setChannelOptions (VolumeDrawable.ts:159:48)
    at VolumeDrawable.onChannelLoaded (VolumeDrawable.ts:457:12)
    at View3d.onVolumeData (View3d.ts:222:17)
    at Volume.onChannelDataArrived [as channelLoadCallback] (index.ts:875:10)
    at Volume.ts:321:37
    at Array.forEach (<anonymous>)
    at Volume.onChannelLoaded (Volume.ts:321:11)
    at Volume.setChannelDataFromVolume (Volume.ts:355:10)
    at _callee4$ (OmeZarrLoader.ts:484:13)
toloudis commented 9 months ago

I'm noticing a bug I think is unrelated to your changes?

  1. Switch to OME ZARR (IDR 1)
  2. Quickly switch to another loader (ex, Procedural)

This is a good bug that we have to fix! We have to cancel all outstanding requests when a new loader/volume is added

toloudis commented 6 months ago

putting this PR in draft mode as it needs reworking due to lots of volume loader changes.

toloudis commented 5 months ago

This PR is re-done to be up-to-date with the current loader api.