[FieldTrip] ft_prepare_mesh seems to change segmentation layers to alphabetical order
Schoffelen, J.M. (Jan Mathijs)
janmathijs.schoffelen at donders.ru.nl
Mon Apr 11 11:41:25 CEST 2022
Dear Martin,
I would assume that the order of the tissuelabel is what’s in the data, i.e. the hexahedral elements that get a value of ‘1’ in your data example will be the csf compartment. I would visualize the segmentation to verify this. Not sure whether ft_sourceplot is capable of this out of the box, but I would assume that the ’tissue’ field should be reshapeable into a 3D volume, and visualized along with the anatomical image.
Anyway, I think that the order of the conductivity values in the cfg should be the same as the order of the tissuelabel in the mesh. The low-level simbio code does not do an extra check on this. Perhaps the simbio folks can chime in here, because they know the relevant code better than I do.
I think that it might be worthwile to consider building in an extra sanity check at a higher level in the code, where the cfg into ft_prepare_headmodel also informs the code about which conductivity value is to be associated with a particular tissue compartment. @the simbio/duneuro folks: what do you think?
Best wishes,
Jan-Mathijs
On 7 Apr 2022, at 17:23, Martin Schaefer via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:
Dear mailinglist,
I noticed that the function ft_prepare_mesh seems to change the order of the segmentation layers to alphabetical, rather than keeping the order chosen during ft_volumesegment.
This seems like it could potentially lead to a to a mismatch with the conductivity values chosen during ft_prepare_headmodel, which uses the layer order from ft_prepare_mesh.
For example, I run
cfg = [];
cfg.output = {'gray','white','csf','skull','scalp'};
mri_segmented = ft_volumesegment(cfg, mri_resliced);
followed by
cfg = [];
cfg.shift = 0.3;
cfg.method = 'hexahedral';
mesh = ft_prepare_mesh(cfg,mri_segmented);
When I then look at mesh.tissuelabel the order has changed to: {'csf'} {'gray'} {'scalp'} {'skull'} {'white'}
And if I continue to run
cfg = [];
cfg.method = 'simbio';
cfg.conductivity = [0.33 0.14 1.79 0.01 0.43]; % {'gray' 'white' 'csf' 'skull' 'scalp'}
headmodel_eeg = ft_prepare_headmodel(cfg, mesh_fem);
headmodel_eeg.tissuelabel has the same order as the mesh: {'csf'} {'gray'} {'scalp'} {'skull'} {'white'}
And I assume this means the conductivity values are mismatched.
Can someone check this?
I use the fieldtrip version from 1st of April 2022.
Best regards,
Martin
------------
Martin Schaefer | PhD Student
https://www.perceptionlab.se/<https://urldefense.com/v3/__https://www.perceptionlab.se/__;!!HJOPV4FYYWzcc1jazlU!_TE0p8Xz9tdIcCr8l72JqwVCl3uAKwaDSygD2F7apugSLmWNxCfxUK6Rf96D7zbiUeVgxBff85XUa1ZXXtx9cZGot_hzlxFzGtARJQ$>
Department of Clinical Neuroscience (CNS), K8
Karolinska Institutet | 17 177 Stockholm | Nobels väg 9
martin.schaefer at ki.se<mailto:artin.arshamian at ki.se>
______________________________________
Karolinska Institutet – a Medical University
När du skickar e-post till Karolinska Institutet (KI) innebär detta att KI kommer att behandla dina personuppgifter. Här finns information om hur KI behandlar personuppgifter<https://urldefense.com/v3/__https://ki.se/medarbetare/integritetsskyddspolicy__;!!HJOPV4FYYWzcc1jazlU!_TE0p8Xz9tdIcCr8l72JqwVCl3uAKwaDSygD2F7apugSLmWNxCfxUK6Rf96D7zbiUeVgxBff85XUa1ZXXtx9cZGot_hzlxE0wLv9fw$>.
Sending email to Karolinska Institutet (KI) will result in KI processing your personal data. You can read more about KI’s processing of personal data here<https://urldefense.com/v3/__https://ki.se/en/staff/data-protection-policy__;!!HJOPV4FYYWzcc1jazlU!_TE0p8Xz9tdIcCr8l72JqwVCl3uAKwaDSygD2F7apugSLmWNxCfxUK6Rf96D7zbiUeVgxBff85XUa1ZXXtx9cZGot_hzlxFmi4H-Ww$>.
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!_TE0p8Xz9tdIcCr8l72JqwVCl3uAKwaDSygD2F7apugSLmWNxCfxUK6Rf96D7zbiUeVgxBff85XUa1ZXXtx9cZGot_hzlxElwrq3YA$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220411/8cdbd6d0/attachment-0001.htm>
More information about the fieldtrip
mailing list