[FieldTrip] EEG electrode coordinate system transformation

Robert Oostenveld r.oostenveld at donders.ru.nl
Fri Oct 23 14:52:36 CEST 2015


Hi Paolo,

After pressing apply and closing the figure from electroderealign, the function returns the updated electrode structure. 

You are referring to cb_close, which is a subfunction that you would not see under normal situations. So I wonder whether you are running into an error (and that the function name is printed on screen). For me it works fine, both in 2014b and 2015b. But if you have an error in cb_close, the figure would not close properly and the updated electrode structure would not be returned. If you indeed have an error, please report it on http://bugzilla.fieldtriptoolbox.org/ and attach a small mat file with the elec structure in it. You should also report the operating system and the matlab version. 

best regards,
Robert

PS I will be traveling the next few days, so probably I won’t be able to respond to follow up emails for some time.



On 23 Oct 2015, at 11:34, Paolo Belardinelli <paolo.belardinelli at gmail.com> wrote:

> Dear Robert,
> thank you very much for your answer and support.
> We downloaded the ft_electroderealign from the github link you sent us.
> We ran the code lines that you inserted in your previous email.
> In the resulting interactive topoplot, we were able to rotate and realign the electrode configuration properly.
> 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.
> As a consequence, when visualizing the new layout, we are still plotting the old configuration.
> Are we missing a step in the interactive GUI or is the subfunction cb_close not working properly?
> 
> Best wishes,
> 
> Paolo
>  
> 
> 
> On Thu, Oct 22, 2015 at 9:47 PM, Robert Oostenveld <r.oostenveld at donders.ru.nl> wrote:
> 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,
> Robert
> 
> 
> 
> 
> 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
> 
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> 
> 
> -- 
> --
> Paolo Belardinelli, PhD
> Neurology Department
> University Hospital Tuebingen
> Eberhard Karls University Tuebingen
> Hoppe-Seyler Str. 3
> D-72076 Tuebingen
> Tel: +49 7071 / 29 80478
> 
> _______________________________________________
> 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/20151023/56ce4491/attachment.html>


More information about the fieldtrip mailing list