[FieldTrip] Sensors and headmodel not aligned

Anwar, Abdul Rauf aanwar at ukaachen.de
Sat Jun 1 13:23:17 CEST 2024


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);





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240601/018da65e/attachment.htm>


More information about the fieldtrip mailing list