<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Stephan,<div><br></div><div>thanks for your quick reply.<br><div><br></div><div>If I change the cfg.elec definition in the call to the beamformer, the source projection follows the electrodes, i.e. when I use the misaligned electrodes, the source is in the visual cortex, and if I use the aligned electrodes, the source is left temporal.</div><div><br></div><div>If I leave the info for cfg.elec out, ft_sourceanalysis takes the electrode info from the lead field.</div><div><br></div><div>Am I maybe missing some step during the call to ft_prepare_leadfield? Maybe some rotation of the volume or something like this?</div><div><br></div><div>Thanks a lot once more.</div><div><br></div><div>Julian</div><div><br><div><div>Am 19.12.2013 um 16:35 schrieb <a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a>:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>hmm… in theory every thing should be fine as the lead field is calculated with aligned electrodes to bnd_s. However, try to change the electrode positions as well in dat4beam. Does this help?<div><br></div><div>best,</div><div><br></div><div>Stephan</div><div><br><div><div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div>________________________________________________________</div><div>Stephan Moratti, PhD<br><br></div><div>see also: <a href="http://web.me.com/smoratti/">http://web.me.com/smoratti/</a><br><br></div><div>Universidad Complutense de Madrid</div><div>Facultad de Psicología</div><div>Departamento de Psicología Básica I</div><div>Campus de Somosaguas</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain</div><div><br></div><div>and</div><div><br></div><div>Center for Biomedical Technology</div><div>Laboratory for Cognitive and Computational Neuroscience</div><div>Parque Científico y Tecnológico de la Universidad Politecnica de Madrid<br>Campus Montegancedo</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain<br><br><br>email: <a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a><br>Tel.:    +34 679219982</div></div></span>
</div>
<br><div><div>El 19/12/2013, a las 15:38, Julian Keil escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear all,<div><br></div><div>I have a problem of which I can't really find the source.</div><div><br></div><div>When I use the standard BEM-Model and the standard MRI together with our vendor-provided EEG electrode positions, I can nicely and reliably localize effects in source space (e.g. the visual N1, see attached source plot).</div><div><br></div><div>However, when I use an individual MRI (DICOM, imported via ft_read_mri, realigned interactively, resliced and segmented) to build a BEM-Model (Dipoli-Method), realign the electrodes to the new volume (using the interactive mode in ft_electroderealign) and subsequently build an individual lead field, the effect is shifted away from visual cortex and it appears as if the source and the MRI are misaligned.</div><div><br></div><div>The odd thing is, that if I leave the alignment step out, i.e. use the misaligned electrodes to build the lead field, the effect at least moves back to the visual cortex.</div><div><br></div><div>I hope the attached comparison between aligned and misaligned electrodes makes this a bit clearer.</div><div><br></div><div>Does anyone have an idea at which point this problem might occur?</div><div><br></div><div>Thanks a lot.</div><div><br></div><div>Julian</div><div></div></div><span><EEG_Vol_Alignment.pdf></span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div></div><span><N1_standard_brain.png></span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div><div><br></div><div>P.S.: Below are the basic steps I use:</div><div><br></div><div><div>%% 2.1. Build individual BEM-Model</div><div>% First Realign Volume. Set Nas LPA, RPA, and positive z-values</div><div><br></div><div>cfg=[];</div><div>cfg.method='interactive';</div><div>cfg.coordsys = 'ctf';</div><div><br></div><div>mri_r = ft_volumerealign(cfg,mri);</div><div><br></div><div>cfg=[];</div><div><br></div><div>mri_rs = ft_volumereslice(cfg,mri_r);</div><div><br></div><div>%% Segment the individual volume</div><div>cfg=[];</div><div>cfg.output={'brain' 'scalp' 'skull'};</div><div>cfg.brainsmooth = 5;</div><div>cfg.scalpsmooth = 5;</div><div>cfg.brainthreshold = .5;</div><div>cfg.scalpthreshold = .1;</div><div>mri_s = ft_volumesegment(cfg,mri_rs);</div><div><br></div><div>%% Create Headmodel</div><div>cfg=[];</div><div>cfg.interactive = 'no';</div><div>cfg.numvertices = 1000;</div><div><br></div><div>bnd_s = ft_prepare_mesh(cfg,mri_s);</div><div><br></div><div>cfg=[];</div><div>cfg.method='dipoli'; %</div><div>cfg.conductivity=[0.3300 0.0041 0.3300];</div><div><br></div><div>vol_s = ft_prepare_headmodel(cfg,bnd_s);</div><div><br></div><div>cfg = [];</div><div>cfg.mri            = mri_s;</div><div>grid               = ft_prepare_sourcemodel(cfg);</div><div><br></div><div>grid.inside = find(grid.brain==1)';</div><div>grid.outside = find(grid.brain==0)';</div><div>grid.pos = grid.pos*10; % Set right dimensions</div><div><br></div><div>%% Align Electrodes</div><div>cfg=[];</div><div>cfg.method='interactive';</div><div>cfg.elec=elec_128;</div><div>cfg.headshape=vol_s.bnd(1);</div><div><br></div><div>elec_new=ft_electroderealign(cfg);</div><div><br></div><div>%% 4. Make the Leadfield.</div><div>elec_new.type='eeg';</div><div> </div><div>cfg=[];</div><div>cfg.channel = 1:126;</div><div>cfg.elec=elec_new;</div><div>cfg.vol=vol_s;</div><div>cfg.grid=grid;</div><div><br></div><div>lf = ft_prepare_leadfield(cfg);</div><div><br></div><div>%% BEAMFORMER </div><div><br></div><div>cfg=[];</div><div>cfg.channel=1:126;</div><div>cfg.method='lcmv'; %Time-Domain-Beamformer</div><div>cfg.grid=lf;</div><div>cfg.vol=vol_s; </div><div>cfg.elec=elec_new; </div><div>cfg.reducerank  = 3; </div><div>cfg.keepfilter='yes'; </div><div><br></div><div>beamfilter = ft_sourceanalysis(cfg, dat4beam);</div><div><br></div><div>%% Keep the cfg, just add the filter.</div><div><br></div><div>cfg.grid.filter = beamfilter.avg.filter; % Now we'll use the filter defined above</div><div><br></div><div>lcmv_bl = ft_sourceanalysis(cfg, bl_dat);</div><div>lcmv_act = ft_sourceanalysis(cfg, act_dat);</div></div><div><br></div><br><br><div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; ">********************</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><b>Dr. Julian Keil</b></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><b><br></b></div>AG Multisensorische Integration<br>Psychiatrische Universitätsklinik<br>der Charité im St. Hedwig-Krankenhaus<br>Große Hamburger Straße 5-11, Raum E 307<br>10115 Berlin</div><div><br>Telefon: +49-30-2311-1879<br>Fax:        +49-30-2311-2209 </div><div><a href="http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration">http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration</a></div></span>
</div>
<br></div>_______________________________________________<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">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div><br></div></div></div>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br></div></div></body></html>