question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Serving Local Nifti files Question

See original GitHub issue

Hi - 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:open
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
xgui3783commented, Nov 5, 2021

I believe the nifti:// protocol expects a single nifti file, rather than the root directory (unlike precomputed:// for example)

0reactions
xgui3783commented, Nov 5, 2021

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 the nifti:// (shameless self plug, we do that with our fork of the neuroglancer)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found