Add support to open NIfTI assets in Neurosift#2700
Add support to open NIfTI assets in Neurosift#2700kabilar wants to merge 1 commit intodandi:masterfrom
Conversation
yarikoptic
left a comment
There was a problem hiding this comment.
looks reasonable , lets do it!
|
if no objections from @dandi/archive-maintainers voiced, I will merge some time not too early next week |
| regex: /\.nii(\.gz)?$/, | ||
| maxsize: Infinity, | ||
| endpoint: | ||
| "https://neurosift.app/dandiset/$dandiset_id$?tab=$asset_path$", |
There was a problem hiding this comment.
Can you explain why the path is needed for Neurosift? Typically, the API yields file contents through the asset_url value.
(I bring this up because I'm always wary when we expand this "API", especially since we're always seeming to do so in an ad hoc way.)
There was a problem hiding this comment.
IIRC it is because neurosift indexes entire dandisets via lindi and refer to them by original path...
@magland is that correct or we could refer also by an asset id?
There was a problem hiding this comment.
I wasn't able to construct a Neurosift URL with the DANDI asset_url so that the .nii.gz is displayed. Perhaps I am doing something wrong, or in fact Neurosift does just need the path for visualization in NiiVue.
There was a problem hiding this comment.
@yarikoptic neurosift/lindi only indexes public nwb files, and does not use the path.
In this case, it's BIDS... right? So the path is used to refer to the .nii.gz file, correct?
There was a problem hiding this comment.
Yes, in this case, it needs the path, not the asset url.
yarikoptic
left a comment
There was a problem hiding this comment.
I think @magland followed up and it should work. I think this is worth merging as is as minimal and would be easy to handle happen issue reports would
Example asset in Neurosift: https://neurosift.app/dandiset/001289?tab=derivatives/dwi/sub-MR243/sub-MR243_sample-brain_acq-MulShell_desc-DWImasked.nii.gz
cc @magland @satra