JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for SPM Archives


SPM Archives

SPM Archives


SPM@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

SPM Home

SPM Home

SPM  November 2018

SPM November 2018

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: unsure why SPM12 unable to load GIFTI files during 1st-level Analysis

From:

"Flandin, Guillaume" <[log in to unmask]>

Reply-To:

Flandin, Guillaume

Date:

Fri, 16 Nov 2018 10:21:29 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (1 lines)

Dear Chao-Gan,



Use spm_mesh_render instead:

  spm_mesh_render('Left1.gii')

otherwise, with gifti/plot, you need to do this:

  plot(gifti('lh.white.gii'),gifti('Left1.gii'));



I will update gifti/plot to match spm_mesh_render's behaviour but have a

look at the contextual menu with spm_mesh_render as it gives you a lot

more functionalities.



Concerning a MATLAB-based viewer for GIfTI files, there is MRIcroS from

the prolific Chris Rorden:

  https://www.nitrc.org/projects/mricros/

otherwise if there is a viewer you like but does not support GIfTI, we

should be able to find a way to export the data in a suitable format.



Best regards,

Guillaume.





On 16/11/2018 03:52, YAN Chao-Gan wrote:

> Hi Rouhi and Guillaume,

> 

> Thank you very much for your response!

> 

> When I saved the gifti file as demonstrated by Guillaume, I can not plot

> it. Please see below for my codes and the error message, could you

> please give me some hints?

> gl = gifti('sub-Sub001_task-rest_space-fsaverage5_hemi-L.func.gii');

> ggl = gifti(gl.cdata(:,1));

> ggl.private.metadata = struct('name','SurfaceID','value','lh.white.gii');

> save(ggl,'Left1.gii','ExternalFileBinary');

> Left1=gifti('Left1.gii');

> plot(Left1)

> Error using gifti/subsref (line 24)

> Reference to non-existent field 'vertices'.

> 

> Error in gifti/plot (line 48)

>     'vertices',  subsref(this,struct('type','.','subs','vertices')),...

>  

> BTW, do you know if there is any nice matlab-based Viewer for gifti

> files? (I know I can view them in freeview, but trying to find a

> matlab-based one).

> 

> Thanks,

> 

> Chao-Gan

> 

> 

> 

> 

> 

> On Sat, Nov 10, 2018 at 7:53 AM Rouhollah Abdollahi <[log in to unmask]

> <mailto:[log in to unmask]>> wrote:

> 

>     Dear Chao-Gan,

> 

>     Freesurfer does not make the mid thickness surfaces. However you can

>     do it yourself by loading the pial and white surfaces in Matlab and

>     average them to make the mid thickness surface.  Also I have to

>     mention for the point of visualization the fsavrage surface is

>     pretty good and you don’t need the mid surface one. 

> 

>     Hope it helps 

> 

>     Best

>     Rouhi 

> 

>     On Sat 10. Nov 2018 at 00:17, YAN Chao-Gan <[log in to unmask]

>     <mailto:[log in to unmask]>> wrote:

> 

>         Hi Guillaume,

> 

>         Thank you very much for your response!

> 

>         Yes, this comes from fmriprep. Indeed there is a

>         sub-001_hemi-L_midthickness.surf.gii for each subject, however,

>         there is no midthickness file under the fsaverage5 in freesurfer.

> 

>         I am also ccing Chris to see if he has any suggestions. Hi

>         Chris, any insights?

> 

>         Thanks,

> 

>         Chao-Gan

> 

>         On Fri, Nov 9, 2018 at 6:41 PM Flandin, Guillaume

>         <[log in to unmask] <mailto:[log in to unmask]>> wrote:

> 

>             Dear Chao-Gan,

> 

>             I assume that these files are obtained from fmriprep? I

>             don't know if

>             things have changed in the meantime but rereading an email

>             exchange I

>             had with Chris and Oscar on this topic a year ago, the surface

>             (geometry) meshes for fsnative (native subject specific

>             surface) are in

>             ../anat/sub-*_T1w_midthickness.*.surf.gii while the other

>             surfaces (like

>             fsaverage5) are standard FreeSurfer surfaces and are

>             therefore to be

>             found in your FreeSurfer installation (possibly in a

>             different file format).

> 

>             Best regards,

>             Guillaume.

> 

> 

>             On 08/11/2018 00:06, YAN Chao-Gan wrote:

>             > Dear Guillaume,

>             >

>             > Thank you very much for your code example. I just wonder

>             where can I

>             > find 'mesh.surf.gii' in your example?

>             >

>             > For a functional image like

>             > "sub-001_task-rest_space-fsaverage5_hemi-R.func.gii", I

>             think I should

>             > find some thing like

>             "fsaverage5_hemi-R_midthickness.surf.gii". Do you

>             > happen to know where would

>             "fsaverage5_hemi-R_midthickness.surf.gii" exist?

>             >

>             > Thank you very much!

>             >

>             > Best,

>             >

>             > Chao-Gan

>             >

>             >

>             > On Fri, Oct 13, 2017 at 11:04 PM Guillaume Flandin

>             <[log in to unmask] <mailto:[log in to unmask]>

>             > <mailto:[log in to unmask] <mailto:[log in to unmask]>>>

>             wrote:

>             >

>             >     Hi Patrick,

>             >

>             >     Then, given you're not using them for proper

>             inference, it probably

>             >     doesn't matter too much - it's just that the

>             separation in two

>             >     hemispheres is an artefact of the preprocessing

>             pipeline (eg you would

>             >     rarely do that with volumetric data).

>             >

>             >     To combine the surface meshes, you can do something

>             like this:

>             >

>             >     M = gifti({'L.surf.gii','R.surf.gii'});

>             >     M = spm_mesh_join(M);

>             >     save(gifti(M),'mesh.surf.gii')

>             >

>             >     and for the functional data it would be something like:

>             >

>             >     gl = gifti('L.func.gii');

>             >     gr = gifti('R.func.gii');

>             >     for i=1:size(gr.cdata,2)

>             >       gg = gifti([gl.cdata(:,i);gr.cdata(:,i)]);

>             >       gg.private.metadata =

>             >     struct('name','SurfaceID','value','mesh.surf.gii');

>             >      

>             >   

>              save(gg,spm_file('mesh.func.gii','suffix',sprintf('_%05d',i)),'ExternalFileBinary');

>             >     end

>             >

>             >     As with the previous snippet, I haven't tried it so it

>             might require

>             >     adjustments...

>             >

>             >     Best regards,

>             >     Guillaume.

>             >

>             >

>             >     On 13/10/17 15:39, Patrick Sadil wrote:

>             >     > Hello Guillaume,

>             >     >      I see. We had only been planning on using these

>             data as a

>             >     really rough localizer, grabbing voxels that were

>             active as

>             >     determined by an uncorrected p-value threshold. But,

>             it sounds like

>             >     even that would be improved by analyzing the entire

>             hemisphere

>             >     together. Sorry, to keep asking questions about this,

>             but do you

>             >     know of a reliable way to combine these hemispheres?

>             >     >

>             >     > Best,

>             >     > Patrick

>             >     >

>             >

>             >     --

>             >     Guillaume Flandin, PhD

>             >     Wellcome Trust Centre for Neuroimaging

>             >     University College London

>             >     12 Queen Square

>             <https://maps.google.com/?q=12+Queen+Square+%0D%0A+%C2%A0+%C2%A0+%C2%A0London+WC1N+3BG&entry=gmail&source=g>

>             <https://maps.google.com/?q=12+Queen+Square+%0D%0A+%C2%A0+%C2%A0+%C2%A0London+WC1N+3BG&entry=gmail&source=g>> 

>                London WC1N 3BG

>             <https://maps.google.com/?q=12+Queen+Square+%0D%0A+%C2%A0+%C2%A0+%C2%A0London+WC1N+3BG&entry=gmail&source=g>

>             >

>             >

>             >

>             > --

>             > Chao-Gan YAN, Ph.D.

>             > Professor, Principal Investigator

>             > Deputy Director, Magnetic Resonance Imaging Research Center

>             > Institute of Psychology, Chinese Academy of Sciences

>             > 16 Lincui Road, Chaoyang District, Beijing 100101, China

>             <https://maps.google.com/?q=16+Lincui+Road,+Chaoyang+District,+Beijing+100101,+China&entry=gmail&source=g>

>             > -

>             > Initiator

>             > <http://rfmri.org/DPARSF>DPABI

>             > <http://rfmri.org/DPABI><http://rfmri.org/DPARSF>,

>             > <http://dpabi.org>DPARSF <http://rfmri.org/DPARSF>, PRN

>             > <http://rfmri.org/PRN> and The R-fMRI Network

>             <http://rfmri.org>

>             > (RFMRI.ORG <http://RFMRI.ORG> <http://rfmri.org/>)

>             > http://rfmri.org/yan

>             > http://scholar.google.com/citations?user=lJQ9B58AAAAJ

> 

>             -- 

>             Guillaume Flandin, PhD

>             Wellcome Centre for Human Neuroimaging

>             UCL Queen Square Institute of Neurology

>             London WC1N 3BG

> 

> 

> 

>         -- 

>         Chao-Gan YAN, Ph.D.

>         Professor, Principal Investigator

>         Deputy Director, Magnetic Resonance Imaging Research Center

>         Institute of Psychology, Chinese Academy of Sciences

>         16 Lincui Road, Chaoyang District, Beijing 100101, China

>         <https://maps.google.com/?q=16+Lincui+Road,+Chaoyang+District,+Beijing+100101,+China&entry=gmail&source=g>

>         -

>         Initiator

>         <http://rfmri.org/DPARSF>DPABI

>         <http://rfmri.org/DPABI><http://rfmri.org/DPARSF>,

>         <http://dpabi.org>DPARSF <http://rfmri.org/DPARSF>, PRN

>         <http://rfmri.org/PRN> and The R-fMRI Network <http://rfmri.org>

>         (RFMRI.ORG <http://rfmri.org/>)

>         http://rfmri.org/yan

>         http://scholar.google.com/citations?user=lJQ9B58AAAAJ

> 

>     -- 

>     Sent from Gmail Mobile

> 

> 

> 

> -- 

> Chao-Gan YAN, Ph.D.

> Professor, Principal Investigator

> Deputy Director, Magnetic Resonance Imaging Research Center

> Institute of Psychology, Chinese Academy of Sciences

> 16 Lincui Road, Chaoyang District, Beijing 100101, China

> -

> Initiator

> <http://rfmri.org/DPARSF>DPABI

> <http://rfmri.org/DPABI><http://rfmri.org/DPARSF>,

> <http://dpabi.org>DPARSF <http://rfmri.org/DPARSF>, PRN

> <http://rfmri.org/PRN> and The R-fMRI Network <http://rfmri.org>

> (RFMRI.ORG <http://rfmri.org/>)

> http://rfmri.org/yan

> http://scholar.google.com/citations?user=lJQ9B58AAAAJ



-- 

Guillaume Flandin, PhD

Wellcome Centre for Human Neuroimaging

UCL Queen Square Institute of Neurology

London WC1N 3BG

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager