gifti icon indicating copy to clipboard operation
gifti copied to clipboard

How to write a 2D matrix into gii file in matlab?

Open vidasun opened this issue 1 year ago • 1 comments

Hi! I used the gii.cdata matrix to perform filtering. And after that, I wondered if there's any way to write this 2D matrix into a new gii file.?I've looked at the example in tutorial and it seemed the isosurface function can only be used on 3D data. Thanks!

vidasun avatar Sep 28 '23 02:09 vidasun

Hi @vidasun, If I understand you correctly, you can use the .cdata field to store your 2D array and have it saved in a new GIfTI file, e.g.:

g = gifti;
g.cdata = rand(256,16);
save(g,'data.gii')

gllmflndn avatar Sep 28 '23 09:09 gllmflndn