I find it better to reuse the GIFTI object one read into matlab in the first place:
gnew=g; gnew.cdata=M; save(gnew,’saveName.gii’); Peace, Matt. From: <[email protected]<mailto:[email protected]>> on behalf of Rita Elena Loiotile <[email protected]<mailto:[email protected]>> Date: Monday, March 13, 2017 at 8:00 PM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: [HCP-Users] GIFTI read and save in Matlab Hi, I’m hoping someone can recommend a fix for a problem I’m having. I have been using GIFTI library (http://www.artefact.tk/software/matlab/gifti/) to read GIFTIs into Matlab and perform computations. I would like to save as a gifti. Using the software, I have tried the following: M; % matrix of values [vertices by timepoints] g=gifti(M); % converts my matrix to a gifti object with M stored under g.cdata; save(g, ’saveName.gii’); This seems to work fine. I can re-load the saved gift into Matlab— newGifti=gifti(’saveName.gii’);— and it looks correct. However, when I try to open saveName.gii using a non-Matlab visualization software— e.g. tksurfer, wb_view, freeview— I either encounter errors or load what looks like a gift containing all 0’s. Has anyone had success using GIFTI library to save or is there an alternative technique? Thank you very much in advance, Rita _______________________________________________ HCP-Users mailing list [email protected]<mailto:[email protected]> http://lists.humanconnectome.org/mailman/listinfo/hcp-users ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ HCP-Users mailing list [email protected] http://lists.humanconnectome.org/mailman/listinfo/hcp-users
