[FieldTrip] Sensors and headmodel not aligned

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Wed Jun 5 09:39:04 CEST 2024


Hi Abdul,

What do you mean with ‘ctf is the coordinate system of the sensors’?

For EEG data the ‘ctf’ convention is not a given, because it depends on how the electrodes have been digitized. I would first check the coordinate system’s definition for the EEG electrodes.

Good luck,
Jan-Mathijs



On 1 Jun 2024, at 13:23, Anwar, Abdul Rauf via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Hi
I am trying to create a headmodel using template MRI and eeg recordings. Given is the piece of code that I have used. Issue is that in the final plot the headmodel and the sensor positions are not properly aligned. Can someone please tell me what part I am missing here ?  ‘ctf’ is the coordinate system of the sensors.
Thanks

ft_defaults
mri = ft_read_mri('C:\ToolBoxes\fieldtrip-20240110\template\anatomy\single_subj_T1.nii');
[mri_new] = ft_convert_coordsys(mri, 'ctf');
cfg           = [];
cfg.output    = 'brain';
segmentedmri  = ft_volumesegment(cfg, mri_new);
cfg = [];
cfg.method='singleshell';
headmodel = ft_prepare_headmodel(cfg, segmentedmri);
headmodel = ft_convert_units(headmodel, 'cm');
sens = ft_read_sens('D:\Data_USB_13052024\Preprocessed_72230\Cleanline_0.1HP_Referenced_PrunedICA_Epoched.set', 'senstype', 'eeg');
sens = ft_convert_units(sens, 'cm');
figure
ft_plot_sens(sens, 'style', '*b');
hold on
ft_plot_headmodel(headmodel);





_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cc2871e640c124d11f61508dc8532931d%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638531699460249320%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=RjqEo4reGzSy4KKlfANuO4mehR9613gu7cvCOI4e9X0%3D&reserved=0>
https://doi.org/10.1371/journal.pcbi.1002202<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cc2871e640c124d11f61508dc8532931d%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638531699460249320%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=ey%2BSkZY5%2BbjiMRfLo2FX8LW%2B6L48EfFoHc9C2b%2B2SsA%3D&reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240605/003836af/attachment.htm>


More information about the fieldtrip mailing list