[FieldTrip] MEG source-model warp query
Dr N.E. Adams
nea26 at cam.ac.uk
Thu Apr 2 13:48:15 CEST 2020
Dear community experts
I hope you're all doing well! I am new to fieldtrip and I'm struggling
to see how to get a sourcemodel that I can match directly to an atlas.
I'm working with MEG data. In short, currently:
a) I generate a template grid
b) I constrain that grid by vertices found within an AAL atlas
c) I use this constrained template grid to create a sourcemodel for each
individual's MEG-coregistered MRI using 'warpmni' in the config.
However, no warp process appears to affect the result - only a standard
geometric transformation using an affine (translation and rotation), so
I believe I'm either doing something wrong or missing a vital step.
Debugging through ft_prepare_sourcemodel I find, from this line:...
sourcemodel.pos = ft_warp_apply(inv(normalise.initial),
ft_warp_apply(normalise.params, mnigrid.pos, 'sn2individual'));
... that it first normalises (which I assume actually *is* a warp) the
individual's mri (variable = normalise), transforms the template grid
(variable = mnigrid) by the normed mri affine (note: doesn't use this to
warp the grid, just transforms it), and then transforms that result by
the non-normed mri.
1) I'm curious, why does it do this in two stages? i.e. why not just
transform the template grid straight to the mri affine? What is the use
of the normalised mri affine in the intermediary step, as it doesn't use
the warp itself, just the affine?
2) The sourcemodel needs to be in the individual's native shape in order
to do the source-reconstruction correctly. By changing my template
construction method, I can create a grid that has complete coverage of
the individual's brain (and is unrelated to the atlas). However, the
atlas is in a standard shape so I can't match such source vertices to it
unless I can either:
- warp the standard shape atlas to the individual's brain or
- make a version of the sourcemodel where it's vertices have been
warped to the atlas shape, so that when I have used the original
sourcemodel to source-reconstruct my data, I can use the warped
sourcemodel to know where each vertex is in the atlas.
I have considered that this might be what ft_source_interpolate is for,
but I've not managed to understand what it's doing, or even understand
if I'm giving it the right information. For instance, using:...
interp = ft_sourceinterpolate(cfg, atlas, sourcemodel);
... produces a structure that looks a lot like the atlas, and contains
what appears to be nonsense! :) When what I'd like to see from it is the
sourcemodel grid warped to the shape of the atlas. - How would I get
this?
I have attached some of my relevant code in the .txt file for you to
peruse.
Thanks
Tallie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sourcemodel to atlas - fieldtrip query.txt
Type: text/x-c++
Size: 6069 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200402/56d50e67/attachment.bin>
More information about the fieldtrip
mailing list