<div dir="ltr">Hello,<div>Thanks for the answer and sorry for my vague explanation. here is my code to compute the inverse problem by eLORETA using the provided MRI, DATA and  Source model in HCP.</div><div><br></div><div><div>% source localization for resting state HCP.</div><div>load('100307_MEG_3-Restin_rmegpreproc.mat') ; % loading the data;</div><div>load('100307_MEG_anatomy_headmodel.mat');% loading the headmodel</div><div>tmp = load('100307_MEG_anatomy_sourcemodel_3d6mm.mat');% sourcemodel by 6mm</div><div>individual_sourcemodel3d = tmp.sourcemodel3d;</div><div><br></div><div>%% MRI</div><div>individual_mri = ft_read_mri('T1w_acpc_dc_restore.nii.gz');</div><div>hcp_read_ascii('100307_MEG_anatomy_transform.txt');</div><div>individual_mri.transform = transform.vox07mm2bti;</div><div>individual_mri.coordsys = 'bti';</div><div><br></div><div>%% converting to the same coordination unit</div><div>individual_mri = ft_convert_units(individual_mri,'mm');</div><div>individual_sourcemodel3d = ft_convert_units(individual_sourcemodel3d,'mm');</div><div>headmodel = ft_convert_units(headmodel,'mm');</div><div>data.grad = ft_convert_units(data.grad,'mm');</div><div><br></div><div><br></div><div>%% leadfield matrix</div><div>cfg = [];</div><div>cfg.grid = individual_sourcemodel3d;</div><div>cfg.headmodel = headmodel;</div><div>cfg.grad = data.grad;</div><div>cfg.channel = ft_channelselection('MEG',data.label);</div><div>cfg.reducerank = 'no';</div><div>leadfield = ft_prepare_leadfield(cfg);</div></div><div><br></div><div><br></div><div><div>%% timelcok</div><div>cfg = [];</div><div>cfg.covariance = 'yes';</div><div>cfg.covariancewindow = [0 1000];</div><div>cfg.keeptrials = 'yes';</div><div>timelockanalaysis = ft_timelockanalysis(cfg,data);</div><div><br></div><div>%% Eloreta</div><div>cfg = [];</div><div>cfg.method = 'eloreta';</div><div>cfg.vol = headmodel;</div><div>cfg.grid = leadfield;</div><div>cfg.eloreta.lambda = 0.05; %Regularization parameters,cross-validation can be</div><div>%used but as it resting state and we really dont know what the outupt looks</div><div>%like then we have to use emprical numbers which </div><div>cfg.mne.projectnoise = 'yes';</div><div>cfg.keepmom = 'yes'; %keep dipole moment</div><div>cfg.mne.keepmom = 'yes';</div><div>cfg.senstype = 'meg';</div><div>cfg.keepfilter = 'yes';</div><div>cfg.eloreta.reducerank = 'no';</div><div>source_eloreta = ft_sourceanalysis (cfg, timelockanalaysis);<br></div></div><div><br></div><div>so far , I compute the eLORETA, now I would like to project the data into 3d surface, like the way it was done for beamformer in <a href="http://www.fieldtriptoolbox.org/tutorial/plotting">http://www.fieldtriptoolbox.org/tutorial/plotting</a>' and then make a parcellation based on some predefined atlases and then do the other analysis. </div><div>I do appreciate for your helping.</div><div>Thanks</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 3, 2016 at 1:53 PM Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mehdy,<br class="gmail_msg">
<br class="gmail_msg">
It is not clear to me what you want to achieve. It’s unclear what you mean with ‘the results’ to be visualized on ‘the surface’, and that you have no ‘anatomical information’ saved in ‘the matrix’, and that there is a lack of ‘any mapping’. All terms between the quotation signs (for the readers among us who understand Dutch: my daughter aptly calls these things ‘bovenkomma’tjes’) are not defined precisely enough by you to give pointers about what or whether anything is missing, or whether something goes wrong.<br class="gmail_msg">
<br class="gmail_msg">
In general, source-level data can be parcellated with ft_sourceparcellate, but only if your atlas is in the same space as your functional data. That is, there should be a one-to-one mapping between the source locations in your functional data, and the source locations in your atlas. If you want to use the AAL atlas, which is essentially defined as a volumetric image (probably at a voxel resolution of 1 or 2 mm), you need to interpolate/downsample this atlas onto your sourcemodel at the appropriate resolution .This would make most sense if your sourcemodel is also defined as a 3D grid, but it is not absolutely necessary. In order to interpolate the atlas onto your sourcemodel, you could use ft_sourceinterpolate (provided both atlas and sourcemodel are defined in the same coordinate system). Note that from your messages on this forum and on the HCP discussion list it is not clear to the reader what source model you used for the eLORETA.<br class="gmail_msg">
<br class="gmail_msg">
There is some information on the fieldtrip wiki that illustrates how to parcellate source reconstructed data <a href="http://www.fieldtriptoolbox.org/tutorial/networkanalysis" rel="noreferrer" class="gmail_msg" target="_blank">http://www.fieldtriptoolbox.org/tutorial/networkanalysis</a> In the example, it uses a surface-based parcellation, and parcellates a connectivity matrix. The function can also parcellate univariate data (e.g. time courses or power spectra), either or not defined on a 3D grid.<br class="gmail_msg">
<br class="gmail_msg">
Also, the HCP software+documentation that the MEG team released, and which accompanies the released data, might give you some pointers on how to do it. You could try and adapt the code provided to your own needs.<br class="gmail_msg">
<br class="gmail_msg">
Good luck,<br class="gmail_msg">
<br class="gmail_msg">
Jan-Mathijs<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
J.M.Schoffelen<br class="gmail_msg">
Senior Researcher<br class="gmail_msg">
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
> On 03 Nov 2016, at 20:11, mehdy dousty <<a href="mailto:mehdy.dousty@gmail.com" class="gmail_msg" target="_blank">mehdy.dousty@gmail.com</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> Hello all,<br class="gmail_msg">
> By using the data of HCP, and conduct eLORETA to compute the inverse problem, right now Id like to visualise the results to surface but  due to not having any anatomical information saved in the matrix it does not show any mapping. Moreover, Id like to parcellate the cortex based on the AAL atlas, so I really appreciate if anybody can help me.<br class="gmail_msg">
> Thanks<br class="gmail_msg">
> Mehdy<br class="gmail_msg">
> _______________________________________________<br class="gmail_msg">
> fieldtrip mailing list<br class="gmail_msg">
> <a href="mailto:fieldtrip@donders.ru.nl" class="gmail_msg" target="_blank">fieldtrip@donders.ru.nl</a><br class="gmail_msg">
> <a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" class="gmail_msg" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
fieldtrip mailing list<br class="gmail_msg">
<a href="mailto:fieldtrip@donders.ru.nl" class="gmail_msg" target="_blank">fieldtrip@donders.ru.nl</a><br class="gmail_msg">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" class="gmail_msg" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div>