<div><div dir="auto">Hi Lindsey,</div></div><div dir="auto"><br></div><div dir="auto">What is "grid" bases on? Is this the individual mri or a standard mri?</div><div dir="auto">In any case, you can use ft_sourceinterpolate to interpolate to a standard MRI.</div><div dir="auto">Then, you can set the anatomy parameter in ft_spurceplot. Check the details of both functions for the relevant cfg settings.</div><div dir="auto"><br></div><div dir="auto">Hope this helps,</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Julian</div><div><br><div class="gmail_quote"><div dir="ltr">Tate, Lindsey R. <<a href="mailto:lindseyrtate@ou.edu">lindseyrtate@ou.edu</a>> schrieb am Mo. 9. Juli 2018 um 07:35:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div id="m_-8868759114215921136divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hello fieldtrip community,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I have a project with a lot of source analysis of EEG data. I'm using ft_sourceanalysis and ft_sourceplot. I would like to add standard (e.g., Colin 27) MRI slices to these images as an overlay (underlay?) for reference.
 Is there a way to do this? How do I align the MRI with my source space?</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Example code for ft_sourceanalysis and ft_sourceplot are provided below my signature in case you need the reference.<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thank you,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size:12pt" id="m_-8868759114215921136divtagdefaultwrapper"></span></p>
<div style="margin-top:0;margin-bottom:0">Lindsey Tate</div>
<div style="margin-top:0;margin-bottom:0">PhD Candidate</div>
<div style="margin-top:0;margin-bottom:0">University of Oklahoma</div>
<div style="margin-top:0;margin-bottom:0"><a href="mailto:lindseyrtate@ou.edu" target="_blank">lindseyrtate@ou.edu</a> </div>
<p></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">///</p>
<p style="margin-top:0;margin-bottom:0">%baseline period source analysis <br>
</p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size:12pt" id="m_-8868759114215921136divtagdefaultwrapper"></span></p>
<div style="margin-top:0;margin-bottom:0">cfg = [];</div>
<div style="margin-top:0;margin-bottom:0">cfg.elec = elec ; <br>
</div>
<div style="margin-top:0;margin-bottom:0">cfg.method = 'dics';</div>
<div style="margin-top:0;margin-bottom:0">cfg.frequency = 25 ; <br>
</div>
<div style="margin-top:0;margin-bottom:0">cfg.grid = grid; <br>
</div>
<div style="margin-top:0;margin-bottom:0">cfg.headmodel = headmodel; <br>
</div>
<div style="margin-top:0;margin-bottom:0">cfg.dics.projectnoise = 'yes';</div>
<div style="margin-top:0;margin-bottom:0">cfg.dics.lambda = 0;</div>
<div style="margin-top:0;margin-bottom:0">cfg.latency = -0.7490 ; <br>
</div>
<div style="margin-top:0;margin-bottom:0">[presource25] = ft_sourceanalysis(cfg, prefreq25) %from ft_freqanalysis</div>
<div style="margin-top:0;margin-bottom:0"><br>
</div>
<div style="margin-top:0;margin-bottom:0">%same is done for a post-stimulus period, called pmsource25; code omitted for brevity</div>
<div style="margin-top:0;margin-bottom:0"><br>
</div>
<div style="margin-top:0;margin-bottom:0">%difference between pre- and post-stimulus periods</div>
<div style="margin-top:0;margin-bottom:0">source25diff = pmsource25 ; <br>
</div>
<div style="margin-top:0;margin-bottom:0">source25diff.avg.pow = (pmsource25.avg.pow - presource25.avg.pow) ./ presource25.avg.pow;<br>
</div>
<div style="margin-top:0;margin-bottom:0"><br>
</div>
<div style="margin-top:0;margin-bottom:0">%interpolate the difference between pre- and post-stimulus periods<br>
</div>
<div style="margin-top:0;margin-bottom:0">cfg = []; <br>
</div>
<div style="margin-top:0;margin-bottom:0">cfg.downsample = 2; <br>
</div>
<div style="margin-top:0;margin-bottom:0">cfg.parameter = 'avg.pow';</div>
<div style="margin-top:0;margin-bottom:0">source25DiffInt = ft_sourceinterpolate(cfg, source25diff, grid);</div>
<div style="margin-top:0;margin-bottom:0"><br>
</div>
<div style="margin-top:0;margin-bottom:0">%plot</div>
<div style="margin-top:0;margin-bottom:0">cfg = [];</div>
<div style="margin-top:0;margin-bottom:0">cfg.method = 'slice';</div>
<div style="margin-top:0;margin-bottom:0">cfg.funparameter = 'avg.pow';</div>
<div style="margin-top:0;margin-bottom:0">cfg.maskparameter = cfg.funparameter; <br>
</div>
<div style="margin-top:0;margin-bottom:0">cfg.funcolorlim = [-1 2];</div>
<div style="margin-top:0;margin-bottom:0">cfg.opacitylim = [-5 1];</div>
<div style="margin-top:0;margin-bottom:0">cfg.opacitymap = 'rampup';</div>
<div style="margin-top:0;margin-bottom:0">ft_sourceplot(cfg, source25DiffInt); <br>
</div>
<p></p>
</div>
</div>

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a></blockquote></div></div>