Do you have the latest version of the GIFTI matlab toolbox?

Peace,

Matt.

From: Rita Elena Loiotile <rloiot...@gmail.com<mailto:rloiot...@gmail.com>>
Date: Tuesday, March 14, 2017 at 1:27 AM
To: Matt Glasser <glass...@wustl.edu<mailto:glass...@wustl.edu>>
Cc: "hcp-users@humanconnectome.org<mailto:hcp-users@humanconnectome.org>" 
<hcp-users@humanconnectome.org<mailto:hcp-users@humanconnectome.org>>
Subject: Re: [HCP-Users] GIFTI read and save in Matlab

Hi Matthew and HCP,

Thank you for the suggestion, Matthew.   I tried this a while back, and have 
since forgotten it.  I thought it might work (on account of preserving some 
internal info).  It is also the case that re-saving the original gifti under a 
new name produces a file that opens properly in other viewing software.  That 
suggested that this was the right approach.

Unfortunately, I can't seem to assign new values to the original gifti.cdata.

The command "gnew.cdata=M" yields the following: Error using gifti/subsasgn 
(line 95) Syntax not implemented.

Perhaps this has been updated if it works for you?  A very dumb workaround for 
this would be to loop through every possible index of the matrix M and assign 
each value separately.  However, I'd very much like to avoid this if possible, 
since it's quite slow.

Please let me know if this works for you, and/or if I am missing something 
obvious.

Thank you again,
Rita

On Mon, Mar 13, 2017 at 11:04 PM, Glasser, Matthew 
<glass...@wustl.edu<mailto:glass...@wustl.edu>> wrote:
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: 
<hcp-users-boun...@humanconnectome.org<mailto:hcp-users-boun...@humanconnectome.org>>
 on behalf of Rita Elena Loiotile 
<rloiot...@gmail.com<mailto:rloiot...@gmail.com>>
Date: Monday, March 13, 2017 at 8:00 PM
To: "hcp-users@humanconnectome.org<mailto:hcp-users@humanconnectome.org>" 
<hcp-users@humanconnectome.org<mailto:hcp-users@humanconnectome.org>>
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
HCP-Users@humanconnectome.org<mailto:HCP-Users@humanconnectome.org>
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.


________________________________
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
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to