help > Error message "error in reaging NIFTI header.0"
Showing 1-15 of 15 posts
Display:
Results per page:
Dec 6, 2018  01:12 PM | hannasofia - Gothenburg university
Error message "error in reaging NIFTI header.0"
To whom it may concern, 

I try to open a file named "BETA_Subject_001:condition001_source.nii" in MRIcron and receive this message: "error in reaging NIFTI header.0". It is still possible to open NIFTI anatomical Pictures named T1_3d_TRA.nii. Does somebody know what cpuld be wrong? Neither can I open files named "corr_subject001_condition001_Source001.nii":

Thank you in advance,
Hanna
Dec 6, 2018  02:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
1. What version of MRIcron are you using and what operating system are you using, e.g. MRIcron v1.0.20181114 on MacOS. 
2. If you are not using the latest version, does upgrading fix your problem?
3. Be aware that some file systems do not allow the ':'character in filenames.
4. Does fslhd report any problems with these images?
5. If the above does not fix your problems, you can share a copy with me for more feedback.
Dec 6, 2018  03:12 PM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hi Chris, 

Thank you for your reply. I'm using the latest version of mricron on Mac. There are no ":" characters in file names. I'm not sure I understan n.4 of your points. But I haven't seen FSL or FSLHD report anything. The only information given can be seen in the screenshot I've attached. 

Best Regards, 
Hanna
Dec 6, 2018  03:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
I can not provide much more advice without seeing the image, but this error usually suggests a file permission error. I would suggest you run 'ls -l "filename.nii"' from the command line. You will want to make sure that you have read access permission for the file. Often you can fix this with a "chown" or "chmod" command.

Again, running 'fslhd "filename.nii"' from the command line is likely to provide more feedback (assuming you have installed fsl).
Dec 7, 2018  02:12 PM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hello again, thank you for your reply. 

I'm a beginner in using mricron and working with fmri-images. Could you please try to explain this in a simpler way? I'm not sure that I have the program fslhd, if its not downloaded per default together with mricron. And I cannot find where to download it. 

Thank you in advance, 
Hanna
Dec 7, 2018  03:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
Hanna-
 Unix files have permissions associated with them, so a user may not have permission to open a particular file. 
 FSL is a popular and free tool for brain imaging. One of the many tools it includes is 'fslhd' that will read a brain imaging header and describe the contents. Check Google to find out how to install and use fsl.
 I strongly recommend the fsl training course - they not only describe their own tools, but provide an introduction in how to use Unix computers. It has a lot of useful information for beginners as well as experts (I went this year, even though I have been in the field for decades):
   https://fsl.fmrib.ox.ac.uk/fslcourse/
 I also suggest you look at Martin Lindquist's book and course
  http://www.biostat.jhsph.edu/~mlindqui/main.html
 Finally, all the material and slides for my own course is here
   https://www.mccauslandcenter.sc.edu/crnl/psyc589888
Dec 12, 2018  02:12 PM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hi, 

Now I've installed fsl to figure out why I cannot open files with Mricron. I'm using Mac, so in Terminal I receive this info;

"ml-181128-006:~ Xerhad$ fslhd corr_Subject001_Condition001_Source001.nii
Image Exception : #63 :: No image files match: corr_Subject001_Condition001_Source001
No image files match: corr_Subject001_Condition001_Source001
ml-181128-006:~ Xerhad$"

Seems to me the problem isn't about permission, right? Could you help me further? I've never used Terminal before. 

Thanks in advance, 
Hanna
Dec 12, 2018  03:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
Can I suggest you contact a local friend who is familiar with Linux. The fact that FSL can not open the file suggests the problem is not with MRIcron, but I am not even sure you are in the correct folder. You would want to run "ls -l" from the command line to make sure your terminal is in the correct folder and that you have permissions. Someone familiar with computers can help you out. The Unix handout here might be a good starting point.
https://fsl.fmrib.ox.ac.uk/fslcourse/
Dec 17, 2018  10:12 AM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hi Chris, 

A friend helped me out in terminal (Mac) and made sure that permission was given to all files in the folder where my files are saved. Unfortunately it does´nt seem to solve the problem.

When I open a file named "corr_subject002_condition001_source001.nii" in Mricron it says "Error reading NIFTI header-0" followed by "File not open, press ok to ignore risk and data corruption. Press Abort to kill the program". 

What could be the problem then?

Thanks in advance, 
Hanna Eriksson
Dec 17, 2018  03:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
Did you install fsl and see what the output of 'fslhd corr_subject002_condition001_source001.nii'. If you want to send me a copy of your image by email I can take a look. However, you may also want to chat to some of the experienced neuroimagers at your university.
Dec 20, 2018  12:12 PM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hi, 


Please see attached files for terminal screen shot when typing ´fslhd corr_subject002_condition001_source001.nii'.

Thank you in advance, 
Hanna
Dec 20, 2018  02:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
Your screenshot only shows part of the output. Why don't you see if you can upload the .nii file or send it to me directly.
Dec 28, 2018  06:12 PM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hi Chris, 

Please see attached corrupt file. 

This is the file permissions of the file:

-rw-r--r-- 1 Xerhad staff 3610868 Dec 28 18:56 corr_Subject001_Condition001_Source001.nii
And this is the result from fslhd:
filename corr_Subject001_Condition001_Source001.nii
size of header 348
data_type FLOAT32
dim0 3
dim1 91
dim2 109
dim3 91
dim4 1
dim5 1
dim6 1
dim7 1
vox_units mm
time_units s
datatype 16
nbyper 4
bitpix 32
pixdim0 -1.000000
pixdim1 2.000000
pixdim2 2.000000
pixdim3 2.000000
pixdim4 0.000000
pixdim5 0.000000
pixdim6 0.000000
pixdim7 0.000000
vox_offset 352
cal_max 0.000000
cal_min 0.000000
scl_slope 1.000000
scl_inter 0.000000
phase_dim 0
freq_dim 0
slice_dim 0
slice_name Unknown
slice_code 0
slice_start 0
slice_end 0
slice_duration 0.000000
toffset 0.000000
intent Unknown
intent_code 0
intent_name
intent_p1 0.000000
intent_p2 0.000000
intent_p3 0.000000
qform_name Aligned Anat
qform_code 2
qto_xyz:1 -2.000000 0.000000 -0.000000 90.000000
qto_xyz:2 0.000000 2.000000 -0.000000 -126.000000
qto_xyz:3 0.000000 0.000000 2.000000 -72.000000
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Right-to-Left
qform_yorient Posterior-to-Anterior
qform_zorient Inferior-to-Superior
sform_name Aligned Anat
sform_code 2
sto_xyz:1 -2.000000 0.000000 0.000000 90.000000
sto_xyz:2 0.000000 2.000000 0.000000 -126.000000
sto_xyz:3 0.000000 0.000000 2.000000 -72.000000
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Right-to-Left
sform_yorient Posterior-to-Anterior
sform_zorient Inferior-to-Superior
file_type NIFTI-1+
file_code 1
descrip
aux_file

Could you help further? 

Best Regard, 
Hanna Eriksson
Dec 28, 2018  08:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
I just downloaded MRIcron (v1.0.20181114) on my MacBookPro11,1 using MacOS 10.13.6 and your sample image loaded just fine. By the way, if you press the shift key down while starting MRIcron it will ask you if you want to reset all of its default values - this can help if something unusual happens. Unfortunately, I can not replicate your issue.
Jan 26, 2024  07:01 PM | Fabien Hauw
RE: Error message "error in reaging NIFTI header.0"

Hello Chris,


I also get this error when trying to add an overlay.


And exploring the header, I can't see specific difference between an overlay that fails, or another that doesn't...


Have you find the reason and a potential fix?


Thanks,
Best


Fabien