flatironinstitute / neurosift

Browser-based NWB visualization and DANDI exploration
Apache License 2.0
45 stars 6 forks source link

neurosift cannot open ImageSegmentation object. #183

Closed chrisvdt closed 4 months ago

chrisvdt commented 4 months ago

On this nwb file; https://gui-staging.dandiarchive.org/dandiset/214612/draft/files?location=sub-amarone&page=1

neurosift opens all the other objects in the file, but cannot display /processing/ophys/ImageSegmentation

With HD5View, I compared the file with another nwb file; sub-491604967_ses-496908818-StimB_behavior+image+ophys

Both use a pixel_mask with a pixel_index. The data structure looks identical, however, the second file does show an image of a mask in neurosift.

magland commented 4 months ago

Thanks for reporting that bug. It should be working now.

chrisvdt commented 4 months ago

Well, I do see an image now, however, there should be 48 rois, but I only see one. afbeelding

If I import the pixel_image with matnwb, it looks like this; afbeelding

It seems that the dimensions are not the same. The dimensions should be 512 by 796 pixels.

chrisvdt commented 4 months ago

@magland Thanks for your help. I've been able to solve this issue. Someone pointed me to the fact that the pixel_mask_index should be cumulative sums of a series of pixels_per_roi. It works now.