Serving Local Nifti files Question
See original GitHub issueHi - My goal is to view a local nifti file (.nii) on the neuroglancer demo appspot. So, I made a directory and placed the file in it, then ran cors_webserver.py to serve that directory. However, when I entered the corresponding url into neuroglancer: nifti://<my local hrtp url>
I got a Failed to parse NIFTI header.
error. I thought this might be the .nii file format so I tried again with separate hdr and img files but stll got an error.
My .nii file is from the nitrc website, so I don’t think it is a case of a corrupted file. I wanted to ask if there is something obvious that I am doing wrong? Do I need to change the name of the nifti file or something?
Thanks in advance.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
for NIfTI and ANALYZE tools Orientation related question
I have some questions regarding load_nii function when used with nifti files. I am working on a project where the transform matrix saved...
Read more >How can Nifti files be restructured so that they can be fitted ...
You can resample the images to have the same voxel size and then crop them to cover the same physical size. This is...
Read more >Problem in conversion of nii to png · Issue #13
PS: Please go through "Case 2: Converting a single slice" under the NIFTI files section in the README.rst for this project. What if...
Read more >dcm2nii: questions
Hi, I don't want any reorientation or origin changing of my dicom images when converting to nii, but dcm2niix seems to do so...
Read more >Tools for NIfTI and ANALYZE image - File Exchange
1. load_untouch_header_only.m: Load only the header section of NIfTI or ANALYZE file. The input file will be automatically detected. NIfTI structure will be ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe the
nifti://
protocol expects a single nifti file, rather than the root directory (unlikeprecomputed://
for example)I’m not the maintainer of neuroglancer, just passer by 😅
with the neuroglancer hosted on appspot, there is an additional obstacle: it is hosted on https, and by default, browser will restrict HTTP calls made from https origin to http origin (not the otherway around).
A less risky way, perhaps, is to leverage the drag and drop of nifti, and use
URL.createObjectURL
on the dropped file, and point to it with thenifti://
(shameless self plug, we do that with our fork of the neuroglancer)