[Neuroimaging] Writing a Gifti Label file

Bhattacharya, Suryava suryava.bhattacharya at kcl.ac.uk
Wed Apr 18 06:03:11 EDT 2018


Dear Neuroimaging at python,


The Connectome Workbench is throwing up this error:

ERROR: Parse error while reading: Decompression of Binary data failed.
Uncompressed 0 bytes but should be 129968 bytes., line number: 17 column number: 9935


This occurs when I try to use the wb_command -label-resample to resample label files that I have created. I write the label files using the nibabel module in Python, where I import an array of int32 values and I load a .label gifti image and copy it two a new gifti image variable. On this new gifti image variable, I replace the darrays[0].data (which is int32) with the new label data array (which is also int32). Then I output using nibabel.gifti.giftiio.write to a .label.gii file. I have attached my code and an example label.gii file. Any suggestions of how to fix this would be appreciated, thanks


Thanks and Regards,

Suryava
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20180418/600b150a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Parcellation.py
Type: application/octet-stream
Size: 1957 bytes
Desc: Parcellation.py
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20180418/600b150a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 40.R.label_1_for_40_regions_drawem.label.gii
Type: application/octet-stream
Size: 14236 bytes
Desc: 40.R.label_1_for_40_regions_drawem.label.gii
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20180418/600b150a/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 40.L.label_1_for_40_regions_drawem.label.gii
Type: application/octet-stream
Size: 13454 bytes
Desc: 40.L.label_1_for_40_regions_drawem.label.gii
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20180418/600b150a/attachment-0002.obj>


More information about the Neuroimaging mailing list