New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nibabel.load problem with mri_vol2surf nifti output #100
Comments
Not for me. What nibabel are you using? What platform are you on? |
it fails with current master on both my mac and my ubuntu box. Try:
I get an IOError: ... IOError: Expected -4 bytes, got 661100 bytes from file "bad2.nii"
|
Hmm - sorry - I didn't try to load the data. Looking at the header, it claims dimensions of -1, 1, 1 which I guess must be wrong. FSL also barfs on this: [mb312@tom ~/Downloads]$ fslinfo bad2.nii ** ERROR: nifti_convert_nhdr2nim: bad dim[1] ** ERROR (nifti_image_read): cannot create nifti image from header 'bad2.nii' ** ERROR: nifti_image_open(bad2): bad header info ERROR: failed to open file bad2 ERROR: Could not open file I guess it would be good to have a more helpful error message though. |
FYI this nii file contains a 1d vector (shape 165275 x 1 x 1) freesurfer mri_info says: $ mri_info bad2.nii voxel to ras transform: voxel-to-ras determinant -1 ras to voxel transform: |
OMG that's horrible. It looks like freesurfer is extending the nifti1 standard to look for -1 in the If we're going to support that we should discuss it on the list; that's painful. |
:)
it looks like a pb with an uint16 used to store the dim in nifti1 format...
my work around was to use .mgz and use the nibabel mgz io to make this can you send the email on the ML? |
@agramfort - can you check this works for you? It does on bad2.nii |
I have found that I cannot read these files when they are very large using version |
Hi Dan - sorry - I was in Cuba and mostly out of internet. Can you try the latest development version? If that doesn't work, or you can't try it, is there an example file you can put somewhere I can get it? |
the following file produces an error with nibabel.load:
http://dl.dropbox.com/u/2140486/bad2.nii
FYI it was produced with freesurfer mri_vol2surf
The text was updated successfully, but these errors were encountered: