flatironinstitute / neurosift

Browser-based NWB visualization and DANDI exploration
Apache License 2.0
39 stars 4 forks source link

error with TwoPhotonSeries widget #145

Open bendichter opened 3 months ago

bendichter commented 3 months ago

It looks like the TwoPhotonSeries visualization widget chokes when faced with volumetric data

examples:

https://neurosift.app/?p=/nwb&url=https://api.dandiarchive.org/api/assets/203ad33d-6aa9-42aa-8dfb-005e470cda0f/download/&dandisetId=000296&dandisetVersion=0.220805.1724&tab=neurodata-item:/acquisition/TwoPhotonSeries|TwoPhotonSeries

https://neurosift.app/?p=/nwb&url=https://api.dandiarchive.org/api/assets/d5d9e22a-8efd-499c-b231-6e5d0a91f6bd/download/&dandisetId=000951&dandisetVersion=draft&tab=neurodata-item:/acquisition/TwoPhotonSeries|TwoPhotonSeries

Interface gets stuck on load:

image

Javascript console:

Uncaught (in promise) Error: For now, you can't slice more than two dimensions at a time. You tried to slice 3 dimensions for /acquisition/TwoPhotonSeries/data.
    at fv.getDatasetData (index-d8517f37.js:199:66723)
    at index-d8517f37.js:227:146546
    at index-d8517f37.js:227:146718
    at uc (index-d8517f37.js:40:24296)
    at Js (index-d8517f37.js:40:42448)
    at index-d8517f37.js:40:40760
    at f (index-d8517f37.js:25:1544)
    at MessagePort.R (index-d8517f37.js:25:1906)
magland commented 3 months ago

Thanks for the report and for including the console message.

I implemented the 3d slicing capability, so it should be working now. However, it's going to be slow due to the nature of the chunking. I think this would be a good candidate for creating a supplementary .mp4 file using dendro. Do you think this would be of value?

It would be helpful if you could take a look at these examples and verify that the images look reasonable. It's easy to make a mistake with the indexing when doing complex slicing.

bendichter commented 3 months ago

@h-mayorquin, since you worked with some of this data, could you help validate that these visualizations are working?

h-mayorquin commented 3 months ago

The for the 3D data is still hanging on me:

https://neurosift.app/?p=/nwb&url=https://api.dandiarchive.org/api/assets/80be44d6-db90-4807-bb1b-abdac5c580eb/download/&dandisetId=000727&dandisetVersion=0.240106.0043&tab=neurodata-item:/acquisition/TwoPhotonSeriesAnatomicalGreen|TwoPhotonSeries