[Neuroimaging] writing gifti files
Michiel Cottaar
Michiel.Cottaar at ndcn.ox.ac.uk
Fri Apr 14 16:41:47 EDT 2017
Hi Emma,
The problem is that wb_view only supports float32 while python likes to
convert everything to float64. The produced gifti file opens normally in
wb_view, when I convert your data to float32 just before creating the
data arrays (see attached file).
Michiel
On 12/04/2017 09:54, Emma Robinson wrote:
> Hi
>
> I have a problem reading giftis that I write from nibabel. It works if
> I replace the data with data taken straight out of another gifti data
> array, but if I add a matrix of floats I am unable to read it into the
> HCP's workbench viewer, not use the FSL gifti reader. I get the
> following error messages:
>
> from wb_view
>
> Parse Error while reading
> /vol/medic01/users/ecr05/TESTINGRESULT2.func.gii: Decoding of GZip
> Base64 Binary data failed.Decoded 0 bytes but should be 0 bytes. line
> number: 15 column number: 68831
>
>
> from FSL
>
> terminate called after throwing an instance of 'GiftiException'
> what(): Requested non-float data from float GIFTI field
>
> I've attached some test code and the gifti file I tested it with. Any
> suggestions of how to fix this would be appreciated, thanks
>
> Emma
>
>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20170414/daa06fac/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testgiftisave.py
Type: text/x-python
Size: 900 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20170414/daa06fac/attachment.py>
More information about the Neuroimaging
mailing list