[FieldTrip] Fwd: EEG electrode coordinate system transformation

Robert Oostenveld r.oostenveld at donders.ru.nl
Thu Oct 22 21:47:51 CEST 2015

Hi Paolo,

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. 

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 https://github.com/fieldtrip/fieldtrip/blob/master/ft_electroderealign.m

You can then do

cfg = [];
cfg.elec = ft_read_sens(‘your localite file’)
cfg.method = ‘interactive’;
elec_realigned = ft_electroderealign(cfg)

cfg = [];
cfg.elec = elec_realigned;
layout = ft_prepare_layout(cfg);

best regards,

On 22 Oct 2015, at 16:55, Paolo Belardinelli <paolo.belardinelli at gmail.com> wrote:

> Dear all,
> we are recording EEG electrode positions using the LOCALITE TMS navigator acquisition software. We dispose over MRI data in DICOM format.
> The electrode positions are stored in the (LPS) coordinate system. Unity measures are mm.
> 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).
> 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).
> Is there a way to address this issue in Fieldtrip or with some mathematical manipulation?
> Thank you in advance,
> Paolo 
> -- 
> --
> Paolo Belardinelli, PhD
> Neurology Department
> University Hospital Tuebingen
> Eberhard Karls University Tuebingen
> Hoppe-Seyler Str. 3
> D-72076 Tuebingen
> Tel: +49 7071 / 29 80478
> <standard_layout.jpg><inverted_localite_layout.jpg><localite_layout.jpg>_______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151022/45f17213/attachment-0002.html>

More information about the fieldtrip mailing list