[FieldTrip] EEG Source reconstruction: sourcespace and the volume conductor misaligned

Leopold Zizlsperger zizlsperger at gmail.com
Mon Sep 30 16:01:04 CEST 2013


Hey Steve,
thanks, you are great, I tried that again and it basically fixed my problem
(see picture).
For documentation and maybe others to profit from:
Going through the
http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate
tutorial I had problems building the volume conduction model which I solved
by going through the additional tutorial
http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg

But after the combination of the matrices and aligning them I got a
considerable sizing problem, see 2nd picture
[[[ mri_nom_ctf = ft_convert_units(mri_nom_ctf, 'cm');


T   = mri_nom_ctf.transform*inv(mri_nom_ctf.transformorig);
% go to the Subject01/bem directory
bnd  = ft_read_headshape('Subject01-oct-6-src.fif', 'format', 'mne_source');
sourcespace = ft_convert_units(bnd, 'cm');
sourcespace = ft_transform_geometry(T, sourcespace);
save sourcespace sourcespace;
save T T; %we will need the transformation matrix in the next step


...

figure;hold on;
ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5;
ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight]]]

So I included Steve's suggestion

vol = ft_convert_units(vol, 'cm')

and specified the location of the fiducials again

[[[ cfg = [];


cfg.method = 'interactive';
mri_nom_ctf = ft_volumerealign(cfg, mri_nom);


with the preauricular points this time in front of the auditory canals
and it worked out well.


Thanks all


Leo






On Mon, Sep 30, 2013 at 1:12 PM, Stephen Politzer-Ahles <
politzerahless at gmail.com> wrote:

> Hi Leo,
>
> If I am remembering correctly, I think the problem could still be related
> to ft_convert_units even if the volume conductor and head model look like
> they're similar in size. For example, in the images I sent out when I was
> having this problem earlier, the volume conductor and hte sourcespace are
> the same size but one is tilted more, and the solution was nevertheless
> related to ft_convert_units (I think). In my case, this was because the
> conversion had to happen at a different time than it does in the tutorial.
> (I had to insert ft_convert_units somewhere earlier in the pipeline than
> where it was happening in the tutorial.) I'm sorry I can't be more
> specific, but if it will help I could try to look through my old code and
> re-figure out what I changed at the time.
>
> Best,
> Steve
>
>
>
> Stephen Politzer-Ahles
> New York University, Abu Dhabi
> Neuroscience of Language Lab
> http://www.nyu.edu/projects/politzer-ahles/
>
>
>
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Mon, 30 Sep 2013 12:53:06 +0200
>> From: Leopold Zizlsperger <zizlsperger at gmail.com>
>> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
>> Subject: Re: [FieldTrip] EEG Source reconstruction: sourcespace and
>>
>>         the volume conductor misaligned
>> Message-ID:
>>         <CAAk5s=
>> WTe+T1PZO0jMb6KUvpHFyi-c0tFuG8Mc0m9um6vVdacA at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>
>> Hello
>> thanks for your answers, in combination with the tutorial they were a big
>> help.
>> I think I got closer but have a last issue:
>> @ Jan-Mathijs: I redid the headmodel and it looks better now as shown on
>> the screenshots attached, thanks
>> @ Lilla and Stephen: the scaling in general should not be the problem I
>> think, the sizes seem to match, thank you
>> While both the volume conduction and the headmodel are expressed in CTF
>> coordinates, see second screenshot vol vs sourcespace, they don't align
>> very well > first screenshot
>> Is there a way to align them manually? Or would it be legitimate to
>> "cheat"
>> with the fiducials of the sourcemodel ? By changing the preauricular
>> points
>> I think I could align them, but I am not sure if that would cuase problems
>> later on...
>> Thanks in advance
>> Leo
>>
>>
>> On Mon, Sep 30, 2013 at 12:43 PM, Leopold Zizlsperger <
>> zizlsperger at gmail.com
>> > wrote:
>>
>> > Hello
>> > thanks for your answers, in combination with the tutorial they were a
>> big
>> > help.
>> > I think I got closer but have a last issue:
>> > @ Jan-Mathijs: I redid the headmodel and it looks better now as shown on
>> > the screenshots attached, thanks
>> > @ Lilla and Stephen: the scaling in general should not be the problem I
>> > think, the sizes seem to match, thank you
>> > While both the volume conduction and the headmodel are expressed in CTF
>> > coordinates, see third screenshot vol vs sourcespace, they don't align
>> very
>> > well > first two screenshots
>> > Is there a way to align them manually? Or would it be legitimate to
>> > "cheat" with the fiducials of the sourcemodel ? By changing the
>> > preauricular points I think I could align them, but I am not sure if
>> that
>> > would cuase problems later on...
>> > Thanks in advance
>> > Leo
>> >
>> >
>> >
>> > On Mon, Sep 30, 2013 at 10:29 AM, jan-mathijs schoffelen <
>> > jan.schoffelen at donders.ru.nl> wrote:
>> >
>> >> Hi Leo,
>> >>
>> >> May I add to Lilla's comments that the reconstructed headmodel looks
>> >> quite bad to me. This suggests that the automatic anatomical
>> segmentation
>> >> did not work well. The most likely cause is that the coordinate system
>> >> which you specified for the anatomical image in the input was incorrect
>> >> (e.g. specifying 'spm', while it should have been 'ctf' or so), or
>> that the
>> >> transformation matrix mapping from voxels to head coordinates was not
>> >> correct.
>> >>
>> >> Best,
>> >> Jan-Mathijs
>> >>
>> >>
>> >> On Sep 30, 2013, at 9:53 AM, lilla.magyari at mpi.nl wrote:
>> >>
>> >> Hello Leo and Stephen,
>> >>
>> >> yes, it is unfortunate, that there is still a problem with the MNE
>> >> tutorial. I think the main problem is the integration of the pipeline
>> with
>> >> Freesurfer which requires a more careful look on the script.
>> >> I could not find the attached image from Leo. If the sourcespace and
>> the
>> >> volume conduction models are not well-aligned because one of them is
>> too
>> >> small compared to the other, then it will probably help if you convert
>> the
>> >> units.
>> >> In Fieldtrip, the handling of the units of the volume conduction model
>> has
>> >> changed, which means that they are not automatically converted to 'cm'
>> >> anymore.
>> >> Lilla
>> >>
>> >>
>> >> Hello Leo,
>> >>
>> >>
>> >> This looks like the same problem I was having a few months ago, and
>> there
>> >>
>> >> should be some messages on the list about it. I am not able to look at
>> my
>> >>
>> >> data and scripts right now, but if I remember correctly (you can check
>> the
>> >>
>> >> lists for more) the problem had to do with the transformation matrix,
>> and
>> >>
>> >> ft_convert_units. In my case, during the "volume conduction model"
>> step of
>> >>
>> >> the tutorial (the last step before you can plot the vol and sourcespace
>> >>
>> >> together), I had to add an extra
>> >>
>> >>
>> >> vol = ft_convert_units(vol, 'cm')
>> >>
>> >>
>> >> before ft_transform_geometry. I don't remember if this alone will solve
>> >>
>> >> the
>> >>
>> >> problem (unfortunately the the situation is kind of complicated right
>> now,
>> >>
>> >> there is also a different version of the minimum norms tutorial that is
>> >>
>> >> still in development--see the previous messages for links--and I think
>> my
>> >>
>> >> processing pipeline ended up being a mixture of the two to get things
>> >>
>> >> working. Which means that it's hard to track where exactly I solved the
>> >>
>> >> problem.)
>> >>
>> >>
>> >> Best,
>> >>
>> >> Steve
>> >>
>> >>
>> >>
>> >>
>> >> Message: 1
>> >>
>> >>  Date: Sat, 28 Sep 2013 15:25:32 +0200
>> >>
>> >> From: Zizlsperger Leopold <zizlsperger at gmail.com>
>> >>
>> >> To: <fieldtrip at science.ru.nl>
>> >>
>> >> Subject: [FieldTrip] EEG Source reconstruction: sourcespace and the
>> >>
>> >>        volume  conductor misaligned
>> >>
>> >> Message-ID: <06D14B0C-655A-4EF2-A69A-B735DBDBC504 at gmail.com>
>> >>
>> >> Content-Type: text/plain; charset="iso-8859-1"
>> >>
>> >>
>> >> Hi all,
>> >>
>> >> I am following the instructions in the "Source reconstruction of
>> >>
>> >> event-related fields using minimum-norm estimate" tutorial closely to
>> do
>> >>
>> >> a
>> >>
>> >> source-analysis of EEG data using the example MRI. As I am following
>> the
>> >>
>> >> tutorial almost unchanged I am not including the script here.
>> >>
>> >>
>> >> When I re-align the volume conduction model to the sourcespace they are
>> >>
>> >> not aligned very well, see screenshot attached. I remember a similar
>> >>
>> >> question in the mailing list a while ago but cannot find it...
>> >>
>> >>
>> >> Is there a way to interactively realign volume conduction model and
>> >>
>> >> sourcespace? Re-doing the fiducials did not change the aligment
>> >>
>> >> considerably. Also, my volume conduction model looks weird...
>> >>
>> >> I used ft_determine_coordsys on both the vol and the sourcespace, see
>> >>
>> >> screenshots attached, too.
>> >>
>> >> Would be nice if you could point me in the right direction.
>> >>
>> >> Thanks in advance.
>> >>
>> >> Leo
>> >>
>> >>
>> >> ----
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Dr. med. Leopold Zizlsperger
>> >>
>> >> Klinik f?r Neurologie
>> >>
>> >> Uniklinik RWTH Aachen
>> >>
>> >> Pauwelsstrasse 30
>> >>
>> >> 52074 Aachen
>> >>
>> >> Tel: +49 241 80 35465
>> >>
>> >> lzizlsperger at ukaachen.de
>> >>
>> >>
>> >> Leopold Zizlsperger, MD
>> >>
>> >> Department of Neurology
>> >>
>> >> RWTH Aachen University
>> >>
>> >> Pauwelsstrasse 30
>> >>
>> >> 52074 Aachen, Germany
>> >>
>> >> Tel: +49 241 80 35465
>> >>
>> >> lzizlsperger at ukaachen.de
>> >>
>> >>
>> >>
>> >> -------------- next part --------------
>> >>
>> >> An HTML attachment was scrubbed...
>> >>
>> >> URL: <
>> >>
>> >>
>> >>
>> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130928/aff715c6/attachment.html
>> >>
>> >>
>> >> -------------- next part --------------
>> >>
>> >> A non-text attachment was scrubbed...
>> >>
>> >> Name: align 2.png
>> >>
>> >> Type: image/png
>> >>
>> >> Size: 200601 bytes
>> >>
>> >> Desc: not available
>> >>
>> >> URL: <
>> >>
>> >>
>> >>
>> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130928/aff715c6/attachment.png
>> >>
>> >>
>> >> -------------- next part --------------
>> >>
>> >> A non-text attachment was scrubbed...
>> >>
>> >> Name: align.png
>> >>
>> >> Type: image/png
>> >>
>> >> Size: 208103 bytes
>> >>
>> >> Desc: not available
>> >>
>> >> URL: <
>> >>
>> >>
>> >>
>> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130928/aff715c6/attachment-0001.png
>> >>
>> >>
>> >> -------------- next part --------------
>> >>
>> >> A non-text attachment was scrubbed...
>> >>
>> >> Name: vol.png
>> >>
>> >> Type: image/png
>> >>
>> >> Size: 148045 bytes
>> >>
>> >> Desc: not available
>> >>
>> >> URL: <
>> >>
>> >>
>> >>
>> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130928/aff715c6/attachment-0002.png
>> >>
>> >>
>> >> -------------- next part --------------
>> >>
>> >> A non-text attachment was scrubbed...
>> >>
>> >> Name: sourcespace.png
>> >>
>> >> Type: image/png
>> >>
>> >> Size: 122200 bytes
>> >>
>> >> Desc: not available
>> >>
>> >> URL: <
>> >>
>> >>
>> >>
>> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130928/aff715c6/attachment-0003.png
>> >>
>> >>
>> >>
>> >> ------------------------------
>> >>
>> >>
>> >> _______________________________________________
>> >>
>> >> fieldtrip mailing list
>> >>
>> >> fieldtrip at donders.ru.nl
>> >>
>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> >>
>> >>
>> >> End of fieldtrip Digest, Vol 34, Issue 28
>> >>
>> >> *****************************************
>> >>
>> >>
>> >> _______________________________________________
>> >>
>> >> 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
>> >>
>> >>
>> >>     Jan-Mathijs Schoffelen, MD PhD
>> >>
>> >> Donders Institute for Brain, Cognition and Behaviour,
>> >> Centre for Cognitive Neuroimaging,
>> >> Radboud University Nijmegen, The Netherlands
>> >>
>> >> Max Planck Institute for Psycholinguistics,
>> >> Nijmegen, The Netherlands
>> >>
>> >> J.Schoffelen at donders.ru.nl
>> >> Telephone: +31-24-3614793
>> >>
>> >> http://www.hettaligebrein.nl
>> >>
>> >>
>> >> _______________________________________________
>> >> 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/20130930/a4a68f34/attachment.html
>> >
>>
>> -------------- next part --------------
>> A non-text attachment was scrubbed...
>> Name: source sourcespace mit vol.png
>> Type: image/png
>> Size: 307944 bytes
>> Desc: not available
>> URL: <
>> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130930/a4a68f34/attachment.png
>> >
>>
>> -------------- next part --------------
>> A non-text attachment was scrubbed...
>> Name: source sourcespace vs vol.png
>> Type: image/png
>> Size: 337423 bytes
>> Desc: not available
>> URL: <
>> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130930/a4a68f34/attachment-0001.png
>> >
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>> End of fieldtrip Digest, Vol 34, Issue 31
>> *****************************************
>>
>
>
> _______________________________________________
> 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/20130930/548690c0/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vol source aligned.jpg
Type: image/jpeg
Size: 211319 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130930/548690c0/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: small brain.jpg
Type: image/jpeg
Size: 296422 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130930/548690c0/attachment-0005.jpg>


More information about the fieldtrip mailing list