Closed isacdaavid closed 1 month ago
Check whether the matrix needs to be transposed. Also, try using it in wb_view instead of freeview, and see if it works there.
Note, this repository is for cifti files, and does not support gifti files. The gifti matlab toolbox you are probably using is here:
I am in fact using these files in your repository, which I now figure you probably imported from that other project.
Transposing didn't help. In fact, reading and saving the same file unmodified is enough to corrupt it. This is also evident if I try to load it back in matlab:
gifti(PATH);
Error using read_gifti_file_standalone
[GIFTI] Loading of XML file myfile.gii failed.Error in gifti (line 71)
this = read_gifti_file_standalone(varargin{1},giftistruct);
Ah. The ft_cifti directory is for legacy purposes, it is not recommended to use it, and I don't plan to update it - basically it seemed unfriendly to just delete the previous code from the repository when I released the v2 library. That copy of the gifti toolbox was probably only used for loading .surf.gii files (which the old library tried to guess filenames for and load without asking, while the new library is much more "only the file you asked for, without modifications"). Please use the current version of the gifti toolbox for loading gifti files instead.
Hi,
I can successfully read gifti files using
However I need to write another gifti to disk after some processing. I have even tried saving the same file back:
This creates a file with the wrong geometry. If I try to overlay the new gifti on the same surface using Freesurfer's freeview I get the following error:
How can I properly save giftis?