<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">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">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>On 22 Oct 2015, at 16:55, Paolo Belardinelli <<a href="mailto:paolo.belardinelli@gmail.com">paolo.belardinelli@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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 class="HOEnZb"></span><br>
</div>
</div>
<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>
</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">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br></div></body></html>