[Neuroimaging] Writing GIFTI surfaces demo

Thomas Kirk thomas.kirk at eng.ox.ac.uk
Thu Feb 21 09:09:48 EST 2019


Hi all,

I spent the most part of yesterday working out how to save surfaces in GIFTI format via Nibabel. Though the online documentation is comprehensive with respect to the classes etc I didn't find much in the way of examples or explanations of the bare essentials required to do this. I got there in the end by trial and error and by loading up existing surfaces via Nibabel and inspecting those.

I think I have now worked out the minimal steps required to save a pair of points and triangle arrays as a .surf.gii that plays nicely with other tools such as wb_command (it works for me anyway). I have put this onto a demo file for my future reference and would like to offer it for the website documentation - is there space for this somewhere? If so you are welcome to it; this would have saved me a lot of time. Of course you are free to modify as you see fit.

Kind regards
Tom Kirk

Institute of Biomedical Engineering, Oxford University

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20190221/ef80386f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gii demo.py
Type: application/octet-stream
Size: 2914 bytes
Desc: gii demo.py
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20190221/ef80386f/attachment.obj>


More information about the Neuroimaging mailing list