-
Notifications
You must be signed in to change notification settings - Fork 262
nib.get_header() return negative dim #548
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
Comments
What version of nibabel are you using? From what I can see in the header you posted on the FreeSurfer/neuroimaging@python lists, this case should be handled by the large vector hack. What do you get from: import nibabel as nib
img = nib.load('fmcpr.up.sm0.self.lh.nii.gz')
print(img.shape) Edit: And is there any chance you could make this image available? |
Thanks for your reply, my nibabel version got by As to the command, I also tried
And I get the real dim by
|
I would strongly recommend upgrading to 2.1.0. If you're using Debian/Ubuntu, NeuroDebian contains many up-to-date packages, including nibabel. |
Yes, I install nibabel by |
when I tried to use nibabel to get data from
fmcpr.up.sm0.self.lh.nii.gz
, which was created through freesurferpreproc-sess -surface self
command, I get -1 in dim, like this:dim : [ 4 -1 1 1 451 1 1 1]
, which actually has 140k vertex if checked bymri_info
.It seems due to the limitation of Nifti1, the dim cannot larger than 32k, and I tried
mri_convert *.nii.gz *.mgz
could fix this, but it may be helpful for others if nibabel could get data from these negative dim file. And if freesurfer could write files by Nifti2 format, this could also be solved.Thanks for your reading:)
The text was updated successfully, but these errors were encountered: