<div dir="ltr"><div><div><div><div><div><div><div><div><div>Dear Jan-Mathijs, Sara and FT community,<br><br></div>I'd like to bring up this old thread which I think might be of interest us all. I don't know if there's been any new development on the MNE approach (?) since this thread was started one year ago. Anyway, in order to get template-registered surfaces that allow for inter-subject comparison/averaging, I tried using Jan-Mathijs suggestion to post-process the surfaces that come out of the freesurfer pipeline according to the recipe described on <a href="http://brainvis.wustl.edu/wiki/index.php/Caret:Operations/Freesurfer_to_fs_LR" rel="noreferrer" target="_blank">http://brainvis.wustl.edu/wiki/index.php/Caret:Operations/Freesurfer_to_fs_LR</a>.<br><br>- I managed to get the .coord and .topo files using CARET<br></div>- I managed to create 8196 pnt mesh ( using "mne_setup_source_space --ico -6") registered to the template (fsaverage I assume) using the following files. Actually I'm not 100% sure these are the correct files I should read (the output seems to make sense though):<br>ft_read_headshape({[%SubjectID.%Hemisphere.164k_fs_LR.topo.gii'] [%SubjectID.%Hemisphere.midthickness_orig.164k_fs_LR.coord.gii']}); % for rh/lh.orig<br>ft_read_headshape({[%SubjectID.%Hemisphere.164k_fs_LR.topo.gii']
[%SubjectID.%Hemisphere.sphere.164k_fs_LR.coord.gii']}); %
for rh/lh.sphere<br>ft_read_headshape({[%SubjectID.%Hemisphere.164k_fs_LR.topo.gii']
[%SubjectID.%Hemisphere.white_orig.164k_fs_LR.coord.gii']}); %
for rh/lh.white (JM did not say anything about rh/lh.white but mne_setup_source_space required it)<br><br></div>- I got the resulting template-registered sourcespace properly co-registered in the correct coordinate system (individual sensor space)<br></div>- and successfully applied MNE on the template-registered sourcespace. Sources make sense are meshes are exchangeable across subjects (which I think makes sense since they're all registered to a template).<br></div><div><br></div>HOWEVER, I'm stuck in what I think should be a rather straight forward step, which is the creation of a template sourcemodel/grid (from the fsaverage or Colins brain) that I can use in the same way as the MNI-aligned template grid is used; that is a Talairach aligned surface with 8196 pnts that I can. I tried to use the 'cortex_8196.surf.gii' like in the lines below, but without success (because of MNI instead of TAL aligned?):<br><br>template_sourcemodel = ft_read_headshape('cortex_8196.surf.gii');<br>template_sourcemodel = ft_convert_units(template_sourcemodel, 'cm');<br>bnd.pnt = template_sourcemodel.pnt;<br>bnd.tri = template_sourcemodel.tri;<br><br></div>Any ideas about how to get such a template mesh will be highly appreciated!<br></div><br></div>Best wishes<br></div>Marc<br><div><div><div><div><div><div><div><div><div><br></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 1, 2015 at 4:07 PM, Schoffelen, J.M. (Jan Mathijs) <span dir="ltr"><<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Sara,<br>
<br>
What you need are some of the .coord files, and the .topo files.<br>
<br>
Specifically, the midthickness_orig and the sphere files should be converted into a format that the mne-software can work with.<br>
The only way I managed this, was to convert the gifti files back into freesurfer’s format:<br>
<br>
tmp = ft_read_headshape({‘something-something.topo.gii’ ‘somethingelse-.L.midthickness_orig.coord.gii’});<br>
ft_write_headshape(‘lh.orig’, tmp, ‘format’, ‘freesurfer’);<br>
<br>
and likewise for the right hemisphere, as well as for the spheres.<br>
<br>
Then, you can proceed with using mne_setup_source_space to create the 8196 mesh. The final tricky thing eventually is to get the stuff properly co-registered in the correct coordinate system again, but this should proceed in the same way as when you would have used non-surface registered meshes.<br>
<br>
The creation of the volume conduction model is a separate step (and does not require the cortical meshes).<br>
<br>
Best,<br>
Jan-Mathijs<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Oct 1, 2015, at 4:48 PM, Sara Aurtenetxe <<a href="mailto:s.aurtenetxe@bcbl.eu">s.aurtenetxe@bcbl.eu</a>> wrote:<br>
<br>
> Dear Jan Mathijs,<br>
><br>
> Thank you very much for your quick and detailed answer!<br>
><br>
> As suggested, I post-processed the surface of one of my subjects based on the recipe on the link.<br>
> The process resulted into a bunch of files (e.g. .L.164k_fs_L.topo.gii, .L.white_mni.164k_fs_LR.coord.gii, .L.def_sphere.164k_fs_L.coord.gii),<br>
> but at this point I am not sure about how to proceed. So I have now several questions:<br>
><br>
> - Do you know which are the files containing the registered data for the creation of the meshes?<br>
> How should I create them given the current format? most are .gii files.<br>
> - Once creating the meshes, should I follow with the creation of the volume conduction model<br>
> and analysis of the functional data as described in the tutorial? <a href="http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate" rel="noreferrer" target="_blank">http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate</a><br>
><br>
> Apologize for all these specific questions but it is being a little bit confusing to me.<br>
> So if anyone has experienced the same and/or have any suggestion, any comment would be very welcomed.<br>
><br>
> Thanks a lot in advance,<br>
><br>
> Best,<br>
><br>
> Sara<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> ----- Original Message -----<br>
> From: "Schoffelen, J.M. (Jan Mathijs)" <<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a>><br>
> To: "FieldTrip discussion list" <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br>
> Sent: Wednesday, September 30, 2015 9:33:03 AM<br>
> Subject: Re: [FieldTrip] Interpolate, normalise and sourcegrandaverage with MNE<br>
><br>
> Hi Sara,<br>
><br>
> I think that in this case there is no absolutely ‘correct’ approach, although some approaches may make more sense than others.<br>
> At this point in time it is indeed not well documented how to proceed from individual subject results source-reconstructed onto an individual cortically constrained mesh to a group analysis.<br>
> In the past, we have been working with a procedure where the surface data were interpolated onto a 3D-grid so that we could use volumetric normalization techniques in order to get the subjects into a common space to allow for group statistics. So, here the order of the steps would be to call ft_sourceinterpolate, followed by ft_volumenormalise, or to interpolate the functional data directly onto a MNI-warped grid (<a href="http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space" rel="noreferrer" target="_blank">http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space</a>).<br>
> In the code you pasted in your e-mail message, there is also reference to ft_volumerealign, but I am not sure I understand why this is a required step at this point in the pipeline.<br>
><br>
> All the above being said, nowadays I would advocate a slightly different approach, which bypasses the volumetric interpolation, where per subject I would use cortical meshes that is surface-registered to a template mesh, which as a consequence allows for direct comparison of source locations across subjects. The way to achieve this would be to post-process the surfaces that come out of the freesurfer pipeline according to the recipe described on <a href="http://brainvis.wustl.edu/wiki/index.php/Caret:Operations/Freesurfer_to_fs_LR" rel="noreferrer" target="_blank">http://brainvis.wustl.edu/wiki/index.php/Caret:Operations/Freesurfer_to_fs_LR</a>. After this registration step, the low-resolution (i.e. in this case the 8196-vertex) meshes can be created.<br>
><br>
> Best wishes,<br>
> Jan-Mathijs<br>
><br>
><br>
><br>
><br>
> Jan-Mathijs Schoffelen, MD PhD, Senior researcher<br>
><br>
> Max Planck Institute for Psycholinguistics<br>
> Donders Centre for Cognitive Neuroimaging<br>
><br>
> E-mail: <a href="mailto:j.schoffelen@donders.ru.nl">j.schoffelen@donders.ru.nl</a><br>
> Telephone: <a href="tel:%2B31-24-3614793" value="+31243614793">+31-24-3614793</a><br>
><br>
> <a href="http://www.fieldtriptoolbox.org" rel="noreferrer" target="_blank">http://www.fieldtriptoolbox.org</a><br>
> <a href="http://www.hettaligebrein.nl" rel="noreferrer" target="_blank">http://www.hettaligebrein.nl</a><br>
><br>
><br>
><br>
> On Sep 29, 2015, at 5:27 PM, Sara Aurtenetxe <<a href="mailto:s.aurtenetxe@bcbl.eu">s.aurtenetxe@bcbl.eu</a>> wrote:<br>
><br>
>> Dear all,<br>
>><br>
>> I am working on the source analysis of ERF data from ElektaNeuromag system, with individual T1s, using minimum-norm estimate as described in the following tutorial:<br>
>> <a href="http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate" rel="noreferrer" target="_blank">http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate</a><br>
>> I am exactly following the suggested steps, and so got the source estimation for each of my subjects (bellow the output for one subject), which i can nicely plot with the ft_plot_mesh function:<br>
>><br>
>> sourceest =<br>
>><br>
>> time: [1x1401 double]<br>
>> inside: [8196x1 logical]<br>
>> pos: [8196x3 double]<br>
>> method: 'average'<br>
>> avg: [1x1 struct]<br>
>> cfg: [1x1 struct]<br>
>><br>
>> Now, prior to a ft_sourcegrandaverage and ft_sourcestatistics,<br>
>> I am trying to normalise (ft_volumenormalise) and interpolate (ft_sourceinterpolate) the functional and anatomical data.<br>
>><br>
>> However, I am struggling in this two last steps.<br>
>> Since I did not find a clear pipeline/tutorial about the exact approach (am I missing something?)<br>
>> and after trying several options (bellow I copy the code I am using), it is not clear to me:<br>
>><br>
>> - which is the exact input data for each of these last two functions, and<br>
>> - in which order they should be called.<br>
>><br>
>> Now, I would highly appreciate if anyone could give me any cue about which the correct approach is.<br>
>><br>
>> Thank you in advance,<br>
>><br>
>> All the best,<br>
>><br>
>> Sara<br>
>><br>
>><br>
>><br>
>> %%%%%%%%%%%%<br>
>><br>
>> % Inverse solution<br>
>> cfg = [];<br>
>> cfg.method = 'mne';<br>
>> cfg.grid = leadfield;<br>
>> cfg.vol = vol;<br>
>> cfg.mne.prewhiten = 'yes';<br>
>> cfg.mne.lambda = 3;<br>
>> cfg.mne.scalesourcecov = 'yes';<br>
>> cfg.senstype = 'MEG';<br>
>><br>
>> sourceest = ft_sourceanalysis(cfg,erf);<br>
>><br>
>> % read T1 volume - coords in scanner space<br>
>> mri = ft_read_mri('s01.nii');<br>
>> mri.coordsys = 'neuromag';<br>
>><br>
>> % read headshape - Neuromag coords<br>
>> hsf = 's01.fif';<br>
>> [headshape] = ft_read_headshape(hsf);<br>
>><br>
>> % align T1 with head posiiton in MEG<br>
>> cfg = [];<br>
>> cfg.method = 'headshape';<br>
>> cfg.parameter = 'anatomy';<br>
>> cfg.headshape.headshape = headshape;<br>
>> cfg.headshape.interactive = 'no';<br>
>><br>
>> mri_real = ft_volumerealign(cfg,mri);<br>
>><br>
>> % normalize the realinged individual MRI to SPM template<br>
>> cfg = [];<br>
>> cfg.spmversion = 'spm8';<br>
>> % cfg.template='T1.nii'; % when enabling this field, an incoming error message indicates that the template is not in the spm coordinate system.<br>
>> % However, is the one used by default in this function (as mentioned in the reference) so it is confusing to me<br>
>><br>
>> norm_mri = ft_volumenormalise(cfg,mri_real);<br>
>><br>
>> % interpolate Source with MEG-aligned T1<br>
>> cfg = [];<br>
>> cfg.parameter = 'all';<br>
>> cfg.downsample = 2;<br>
>><br>
>> source_int = ft_sourceinterpolate(cfg, sourceest,norm_mri);<br>
>><br>
>> %%%%%%%%%%%%%%<br>
>><br>
>><br>
>> _______________________________________________<br>
>> fieldtrip mailing list<br>
>> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
>> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
><br>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Marc Recasens<br>Tel.: +34 639 24 15 98<br></div>
</div>