When imported to matlab, the gifti doesn't seem to have any data, other
than the field "cdata" which is 32492 by 209. It's possible there are some
private fields, but I don't have any experience with private fields in
matlab so I'd have to look into this.
I could also give you a header printout of the gifti file in the terminal.
Is this what you're referring to?

On Tue, Mar 14, 2017 at 7:09 PM, Glasser, Matthew <glass...@wustl.edu>
wrote:

> Dims of the gifti you read in.
>
> Peace,
>
> Matt.
>
> From: Rita Elena Loiotile <rloiot...@gmail.com>
> Date: Tuesday, March 14, 2017 at 6:07 PM
>
> To: Matt Glasser <glass...@wustl.edu>
> Cc: "hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org>
> Subject: Re: [HCP-Users] GIFTI read and save in Matlab
>
> Sorry, I'm not sure what you mean.  I have a saved gifti file that I'm
> reading into matlab and a matrix that I've made that I want to output as a
> gifti. Can you specify the array?
>
> On Tue, Mar 14, 2017 at 7:04 PM, Glasser, Matthew <glass...@wustl.edu>
> wrote:
>
>> I was referring to the array you read into matlab.
>>
>> Peace,
>>
>> Matt.
>>
>> From: Rita Elena Loiotile <rloiot...@gmail.com>
>> Date: Tuesday, March 14, 2017 at 6:01 PM
>>
>> To: Matt Glasser <glass...@wustl.edu>
>> Cc: "hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org>
>> Subject: Re: [HCP-Users] GIFTI read and save in Matlab
>>
>> both the gifti.cdata and the matrix have dimensions 32492 by 209.
>>
>> On Tue, Mar 14, 2017 at 5:29 PM, Glasser, Matthew <glass...@wustl.edu>
>> wrote:
>>
>>> Is the input file only a single column?
>>>
>>> Peace,
>>>
>>> Matt.
>>>
>>> From: Rita Elena Loiotile <rloiot...@gmail.com>
>>> Date: Tuesday, March 14, 2017 at 3:34 PM
>>>
>>> To: Matt Glasser <glass...@wustl.edu>
>>> Cc: "hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org>
>>> Subject: Re: [HCP-Users] GIFTI read and save in Matlab
>>>
>>> Hi Matthew,
>>>
>>> Thanks for the help.  I have 2 versions on my lab computer, both give
>>> the same problem.  It seems like the newest version of GIFTI (according to
>>> artefact) is 1.6.  Please let me know if there's a newer one that I'm
>>> missing.
>>>
>>> I've attached screenshots of the info, in case there is really something
>>> obvious that I'm doing incorrectly.
>>>
>>> Thanks again,
>>> Rita
>>>
>>> On Tue, Mar 14, 2017 at 7:43 AM, Glasser, Matthew <glass...@wustl.edu>
>>> wrote:
>>>
>>>> Do you have the latest version of the GIFTI matlab toolbox?
>>>>
>>>> Peace,
>>>>
>>>> Matt.
>>>>
>>>> From: Rita Elena Loiotile <rloiot...@gmail.com>
>>>> Date: Tuesday, March 14, 2017 at 1:27 AM
>>>> To: Matt Glasser <glass...@wustl.edu>
>>>> Cc: "hcp-users@humanconnectome.org" <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>
>>>> 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> on behalf of Rita Elena
>>>>> Loiotile <rloiot...@gmail.com>
>>>>> Date: Monday, March 13, 2017 at 8:00 PM
>>>>> To: "hcp-users@humanconnectome.org" <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/softwa
>>>>> re/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
>>>>> 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.
>>>>
>>>
>>>
>>> ------------------------------
>>>
>>> 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.
>>
>
>
> ------------------------------
>
> 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