<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Olga,
<div class=""><br class="">
</div>
<div class="">The ‘template grid’ refers to a so-called source model, i.e. the set of positions that you use to model your sources.</div>
<div class="">The headmodel refers to the volume conduction model of the head.</div>
<div class=""><br class="">
</div>
<div class="">The inverse warping is intended to facilitate group comparisons after the source reconstruction.</div>
<div class=""><br class="">
</div>
<div class="">For the source reconstruction you can use these ‘inverse warped template grids’, but it is advisable to always use a volume conduction model based on the participant’s anatomy, as Simon already suggested in his reply.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 09 Mar 2016, at 17:18, Olga Sysoeva <<a href="mailto:olga.v.sysoeva@gmail.com" class="">olga.v.sysoeva@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="">
<div class="">
<div class="">
<div class="">Dear Simon,<br class="">
<br class="">
</div>
Thank you very much for the answer, but I think that this code should<span class=""> "create the subject specific grid, using the template grid"</span> as specified in tutorial here
<a href="http://www.fieldtriptoolbox.org/tutorial/sourcemodel" class="">http://www.fieldtriptoolbox.org/tutorial/sourcemodel</a>.<br class="">
"<br class="">
<pre class=""><span class="">% create the subject specific grid, using the template grid that has just been created</span>
cfg = <span class="">[</span><span class="">]</span>;
cfg.<a title="" href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html" class=""><span class="">grid</span></a>.<span class="">warpmni</span> = <span class="">'yes'</span>;
cfg.<a title="" href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html" class=""><span class="">grid</span></a>.<span class="">template</span> = template_grid;
cfg.<a title="" href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html" class=""><span class="">grid</span></a>.<span class="">nonlinear</span> = <span class="">'yes'</span>; <span class="">% use non-linear normalization</span>
cfg.<span class="">mri</span> = mri;
cfg.<a title="" href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html" class=""><span class="">grid</span></a>.<span class="">unit</span> =<span class="">'mm'</span>;
<a title="" href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html" class=""><span class="">grid</span></a> = ft_prepare_sourcemodel<span class="">(</span>cfg<span class="">)</span>;</pre>
I believe it "align/project" the template grid with individual mri using non-linear transformation.<br class="">
</div>
<div class=""><br class="">
</div>
Correct me if I'm wrong.<br class="">
I'll be more than happy to get more comments on this.<br class="">
<br class="">
</div>
Best Regards,<br class="">
</div>
Olga.<br class="">
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Wed, Mar 9, 2016 at 2:43 PM, Simon Homolle <span dir="ltr" class="">
<<a href="mailto:s.homolle@donders.ru.nl" target="_blank" class="">s.homolle@donders.ru.nl</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="">Dear Olga,<span class="">
<div class="">
<blockquote type="cite" class="">
<div dir="ltr" class="">
<p style="margin-bottom:0in;line-height:12px" class="">Should I use template or subject-specific headmodel with “projected to template grid individualized grid”?</p>
</div>
</blockquote>
</div>
<div class=""><br class="">
</div>
</span>
<div class="">I would use the individual head model based on the MRI as it provides more information for your source analysis. This should provide more accurate results.</div>
<span class="">
<div class=""><br class="">
</div>
<div class="">
<blockquote type="cite" class="">
<div dir="ltr" class="">
<p style="margin-bottom:0in;line-height:12px" class="">Actually I tried both ways for one subject and did not notice any difference in the results. </p>
</div>
</blockquote>
</div>
<div class=""><br class="">
</div>
</span>
<div class="">It seems to that this is due to this line of code, but I’m not quite sure about that:</div>
<span class="">
<div class=""><br class="">
</div>
<div class="">
<blockquote type="cite" class="">
<div dir="ltr" class="">
<p style="margin-bottom:0in;line-height:12px" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" class="">cfg = [];</font></font></font></p>
<p style="margin-bottom:0in;line-height:12px" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" class="">cfg.grid.warpmni = 'yes';</font></font></font></p>
<p style="margin-bottom:0in;line-height:12px" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" class="">cfg.grid.template = template_grid;</font></font></font></p>
<p style="margin-bottom:0in;line-height:12px" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" class="">cfg.grid.nonlinear = 'yes'; % use non-linear normalization</font></font></font></p>
<p style="margin-bottom:0in;line-height:12px" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" class="">cfg.mri = mri_cm{Subj_i};</font></font></font></p>
<p style="margin-bottom:0in;line-height:12px" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" class="">grid_ind{Subj_i} = ft_prepare_sourcemodel(cfg);</font></font></font></p>
</div>
</blockquote>
</div>
<div class=""><br class="">
</div>
</span>
<div class="">I think with this configuration the source model that is prepared is only based on the cfg.grid.template, and completely ignores the MRI (which you are interested in). This might explain why you see no difference.</div>
<div class=""><br class="">
</div>
<div class="">Bests,</div>
<div class=""><br class="">
<div class="">Simon Homölle<br class="">
PhD Candidate<br class="">
Donders Institute for Brain, Cognition and Behaviour<br class="">
Centre for Cognitive Neuroimaging<br class="">
Radboud University Nijmegen<br class="">
Phone: +31-(0)24-36-65059 </div>
<br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">
<div class="h5">
<div class="">On 09 Mar 2016, at 11:57, Olga Sysoeva <<a href="mailto:olga.v.sysoeva@gmail.com" target="_blank" class="">olga.v.sysoeva@gmail.com</a>> wrote:</div>
<br class="">
</div>
</div>
<div class="">
<div class="">
<div class="h5">
<div dir="ltr" class="">
<p style="margin-bottom:0in;line-height:100%" class="">Pipeline for sourceanalysis with individualize grip</p>
<p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
<div style="margin-bottom:0in;line-height:100%" class=""><br class="">
</div>
<p style="margin-bottom:0in;line-height:100%" class="">Dear field trippers,</p>
<p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
<p style="margin-bottom:0in;line-height:100%" class="">I have a question related to pipeline for sourceanalysis with individualize grid.</p>
<p style="margin-bottom:0in;line-height:100%" class="">Should I use template or subject-specific headmodel with “projected to template grid individualized grid”? Below is my pipeline with details of what I mean. Actually I tried both ways for one subject and
did not notice any difference in the results. Does it mean that I do not need to constract headmodel for each subject? That's indeed save a lot of time, but I'd like to get your green light on this.</p>
<p style="margin-bottom:0in;line-height:100%" class="">Best Regards,</p>
<p style="margin-bottom:0in;line-height:100%" class="">Olga.</p>
<p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
<p style="margin-bottom:0in;line-height:100%" class="">% 1. load template grid, e.g.
</p>
<p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">load(</font></font></font><font color="#a020f0" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">'/net/server/mnt/programs/olgas/fieldtrip-20160119/template/sourcemodel/standard_sourcemodel3d10mm.mat'</font></font></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">);</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">template_grid = sourcemodel;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
<p style="margin-bottom:0in;line-height:100%" class=""><a name="-1098129259_make_the_individual_subjects_grid" class=""></a><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">%2.
</font></font></font>Make the individual subjects' grid</p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">%a) Load individual subject mri, e.g.</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">[mri{Subj_i}] = ft_read_mri(path_MRI{Subj_i});</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">mri_cm{Subj_i} = ft_convert_units(mri{Subj_i}, 'cm');</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">%</font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">b)</font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">
construct individual grid by projecting to template grid</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""></font><br class="">
</p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg = [];</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.grid.warpmni = 'yes';</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.grid.template = template_grid;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.grid.nonlinear = 'yes'; % use non-linear normalization</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.mri = mri_cm{Subj_i};</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">grid_ind{Subj_i} = ft_prepare_sourcemodel(cfg);</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
<p style="margin-bottom:0in;line-height:100%" class="">% 3. Make source reconstruction, using individualized grid and<b class=""> template? or individual headmodel</b></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">%</font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">a)
load template volume</font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class=""> load('/net/server/data/programs/olgas/fieldtrip-20160119/template/headmodel/standard_singleshell.mat');</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">template_vol = vol;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg = [];</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.grid = grid_ind{Subj_i};</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class=""><b class="">cfg.vol = vol_K0012_cm;
</b></font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class=""><b class="">%
</b></font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class=""><b class="">individual</b></font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class=""><b class="">
</b></font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class=""><b class="">or template
</b></font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class=""><b class="">vol???</b></font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.channel = {</font></font></font><font color="#a020f0" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">'MEG'</font></font></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">};</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.grad = freq_cmb{Subj_i}.grad;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">sourcemodel_lf_K0012 = ft_prepare_leadfield(cfg, freq_cmb{Subj_i});</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""></font><br class="">
</p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg = [];</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.frequency = freq_cmb{Subj_i}.freq;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.grad = freq_cmb{Subj_i}.grad;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.method =
</font></font></font><font color="#a020f0" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">'dics'</font></font></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.keeptrials =
</font></font></font><font color="#a020f0" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">'yes'</font></font></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class=""><b class="">cfg.grid = sourcemodel_lf{Subj_i}; %
</b></font></font></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class=""><b class="">sourcemodel after leadfield with individual or template headmodel?</b></font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><b class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.vol = vol_K0012_cm;
</font></font></b></font><b class=""><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">%
</font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">individual</font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">
</font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">or template
</font></font></font><font color="#228b22" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">vol???</font></font></font></b></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.keeptrials =
</font></font></font><font color="#a020f0" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">'yes'</font></font></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.dics.lambda =
</font></font></font><font color="#a020f0" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">'5%'</font></font></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.dics.keepfilter =
</font></font></font><font color="#a020f0" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">'yes'</font></font></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.dics.fixedori =
</font></font></font><font color="#a020f0" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">'yes'</font></font></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">cfg.dics.realfilter =
</font></font></font><font color="#a020f0" class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">'yes'</font></font></font><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">;</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><font class=""><font face="lucidatypewriter, serif" class=""><font style="font-size:10pt" size="2" class="">source_K0012 = ft_sourceanalysis(cfg, freq_cmb{Subj_i});</font></font></font></p>
<p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
<p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
</div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank" class="">fieldtrip@donders.ru.nl</a><br class="">
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
<br class="">
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
</blockquote>
</div>
<br class="">
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>