<div dir="ltr"><div><div><div><div><div><div><div><div><div>Dear Robert,<br></div>thank you very much for your answer and support.<br></div>We downloaded the ft_electroderealign from the github link you sent us.<br></div>We ran the code lines that you inserted in your previous email.<br></div>In the resulting interactive topoplot, we were able to rotate and realign the electrode configuration properly.<br></div><div></div>However, for some reason, after pushing the 'apply' button, we are still not able to save the modified configuration and manually close the interactive window.<br></div>As a consequence, when visualizing the new layout, we are still plotting the old configuration.<br></div>Are we missing a step in the interactive GUI or is the <span class="">subfunction</span> <span class="">cb_close not working properly?<br><br></span></div><span class="">Best wishes,<br><br></span></div><span class="">Paolo<br></span><div><div><div><div> <br><div><div><div><br></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 22, 2015 at 9:47 PM, Robert Oostenveld <span dir="ltr"><<a href="mailto:r.oostenveld@donders.ru.nl" target="_blank">r.oostenveld@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"><div style="word-wrap:break-word">Hi Paolo,<div><br></div><div>You may want to use ft_electroderealign immediately following the reading in. The electrode realign function allows you to rotate and translate (i.e. shift) the electrodes. Getting the electrodes properly aligned with the axes of the coordinate system will make it easier to make the layout with ft_prepare_layout. </div><div><br></div><div>I have just made a small change to ft_electroderealign that makes it possible to use the function with only electrodes (and no MRI or head shape). You should get the latest fieldtrip version (later this evening on the FTP) or download <a href="https://github.com/fieldtrip/fieldtrip/blob/master/ft_electroderealign.m" target="_blank">https://github.com/fieldtrip/fieldtrip/blob/master/ft_electroderealign.m</a></div><div><br></div><div>You can then do</div><div><br></div><div>cfg = [];</div><div>cfg.elec = ft_read_sens(‘your localite file’)</div><div>cfg.method = ‘interactive’;</div><div>elec_realigned = ft_electroderealign(cfg)</div><div><br></div><div>cfg = [];</div><div>cfg.elec = elec_realigned;</div><div>layout = ft_prepare_layout(cfg);</div><div><br></div><div>best regards,</div><div>Robert</div><div><br></div><div><br></div><div><br></div><div><br><div><div><div class="h5"><div>On 22 Oct 2015, at 16:55, Paolo Belardinelli <<a href="mailto:paolo.belardinelli@gmail.com" target="_blank">paolo.belardinelli@gmail.com</a>> wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5">
<div>
<div dir="ltr">Dear all,<br>
<div class="gmail_quote"><br>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>we are recording EEG electrode positions using the LOCALITE TMS navigator acquisition software. We dispose over MRI data in DICOM format.<br>
</div>
The electrode positions are stored in the (LPS) coordinate system. Unity measures are mm.<br>
</div>
We load the electrode positions in Fieldtrip by means of ft_read_sens. We use the elec structure to prepare the layout with ft_prepare_layout. Attached are the obtained layout (localite_layout) and the layout obtained using standard electrode positions (standard_layout).<br>
</div>
Appearantly, besides an inversion of both X and Y axes, we have to deal with a Z offset we don't know how to exactly calculate ( a simple inversion of axes does not provide correct results, see attached inverted_localite_layout).<br>
</div>
Is there a way to address this issue in Fieldtrip or with some mathematical manipulation?<br>
<br>
</div>
Thank you in advance,<br>
<br>
</div>
Paolo <br clear="all">
<span></span><br>
</div>
</div>
<br clear="all">
<br>
-- <br>
<div>
<div dir="ltr">
<div>--<br>
Paolo Belardinelli, PhD<br>
Neurology Department<br>
University Hospital Tuebingen<br>
Eberhard Karls University Tuebingen<br>
Hoppe-Seyler Str. 3<br>
D-72076 Tuebingen<br>
Tel: <a value="+4970712985894">+49 7071 / 29 80478</a><br>
<br>
</div>
</div>
</div>
</div>
</div>
</div></div><span><standard_layout.jpg></span><span><inverted_localite_layout.jpg></span><span><localite_layout.jpg></span>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div><br></div></div><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></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>--<br>Paolo Belardinelli, PhD<br>Neurology Department<br>
University Hospital Tuebingen<br>
Eberhard Karls University Tuebingen<br>
Hoppe-Seyler Str. 3<br>
D-72076 Tuebingen<br>
Tel: <a value="+4970712985894">+49 7071 / 29 80478</a><br><br></div></div></div>
</div>