[Neuroimaging] first dimension too large

Tim Schäfer ts+ml at rcmd.org
Wed Jun 5 16:40:44 EDT 2019


AFAIK this is a limitation of the format, so there is no general way around it. 

However, instead of writing the data into one very long dimension, it can be split over several smaller ones instead (the so-called FreeSurfer hack). But for the resulting file to be of any use, the program reading the file has to be aware of the hack and handle the file accordingly (see, e.g., https://github.com/nipy/nibabel/issues/428).

Can you save in another format, like MGH/MGZ for further analysis? What program has to read the file?

Tim

> On June 5, 2019 at 3:12 PM Karla Kort <karla_kort at hotmail.com> wrote:
> 
> 
> Hi,
> 
> I am trying to write to a new Nifti file in python, but I get this error when running the script from the commandline: 'UserWarning: Using large vector Freesurfer hack; header will not be compatible with SPM or FSL' And this file does not work. When I run the script in jupyter notebook it doesn't give an error, but the file still still doesn't work and seems empty.  I read online that this is because the first dimension is too large, the dimensions of my data are (498511, 1, 1). So I guess that really is the problem, but I could not find any way to work around this. Is there a way? I do really need the complete file.
> Also, is there a way to just replace the data part in a nifti file? I noticed that .set_fdata() is not an existing command.
> 
> Kind regards,
> Karla
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging

--
Dr. Tim Schäfer
Postdoc Computational Neuroimaging
Department of Child and Adolescent Psychiatry, Psychosomatics and Psychotherapy
University Hospital Frankfurt, Goethe University Frankfurt am Main, Germany


More information about the Neuroimaging mailing list