[FieldTrip] Is there an error in my anatomical pipeline?

Eelke Spaak eelke.spaak at donders.ru.nl
Thu Apr 4 14:53:40 CEST 2013


Awesome, thanks a lot Jörn!

I didn't think to check the numbers, newbie mistake... :) Now all
that's left is to find an easy way to flip the image, but I imagine
that shouldn't be too hard. Or just label the axes, I guess.

On 4 April 2013 14:38, "Jörn M. Horschig" <jm.horschig at donders.ru.nl> wrote:
> Hi Eelke,
>
> the peak is on the left, don't be fooled by what you see. Trust the numbers
> :)
>
> The x-coordinate that is given back is in MNI coordinates and is negative.
> Since in MNI space, the x-axis goes to the right, this means that you are at
> the left side of the brain.
> See also this awesome appendix of an even greater tutorial:
> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended#appendixcomputation_of_virtual_meg_channels_in_source-space
> (scroll down til 'We will now determine the positions on which...') :)
>
> Greetings
> Jörn
>
>
> On 4/4/2013 2:18 PM, Eelke Spaak wrote:
>
> Dear FieldTrippers,
>
> I am trying to do source reconstruction, but am encountering two weird
> things in my pipeline related to anatomy. It could be that everything
> is OK, but I am worried I might have introduced a left/right flip
> somewhere.
>
> To read in my (dicom) MRI, I use:
>
> % read the mri
> fprintf('loading mri for subject %d...\n', subjects(k).id);
> mri = ft_read_mri(fetchDicomFilename(subjects(k).id));
>
> and then I mark the fiducials as follows:
>
> % align to fiducials in CTF coordsys
> cfg = [];
> cfg.coordsys = 'ctf';
> cfg.method = 'interactive';
> cfg.clim = [0 800];
> mri = ft_volumerealign(cfg, mri);
>
> In attachment ft_volumerealign.png I show the plot that comes up.
> Although the position of the different slices is not what I usually
> expect, this should all still be fine, right? The yellow crosshair is
> in the right fiducial location, as evidenced by the white blob below
> the ear (which is always on the right hand side during MRI
> acquisition).
>
> After marking r, l and n (and quitting with 'q') I do:
>
> % reslice to make everything right-side up
> mri = ft_volumereslice([], mri);
>
> In attachment ft_sourceplot-1.png I show output of
> ft_sourceplot([],mri) after this step. Note that the positions of the
> axial/coronal/sagittal slices are not what one would typically expect.
> Also note (and this is problem 1) that the right hand side of the
> anatomy is displayed on the right hand side in the bottom (axial)
> slice, but on the left hand side in the top right (coronal) slice.
> Initially I thought this was just a benign visualisation issue
> (analogous to
> http://fieldtrip.fcdonders.nl/faq/my_mri_is_upside_down_is_this_a_problem),
> but it might be a real problem after all, because of what I found
> next.
>
> After these steps, I proceed to do segmentation and I create a headmodel:
>
> cfg = [];
> cfg.coordsys = 'ctf';
> mri = ft_volumesegment(cfg, mri);
>
> % make single shell model
> cfg = [];
> cfg.method = 'singleshell';
> headmodel = ft_prepare_headmodel(cfg, mri);
>
> As outlined in the beamformingextended tutorial, I create a
> subject-specific source model which I inverse-warp to MNI:
>
> % load template sourcemodel (grid) in mni space
> template = load('~/ft-src/template/sourcemodel/standard_sourcemodel3d8mm');
>
> % warp the grid
> cfg = [];
> cfg.grid.warpmni = 'yes';
> cfg.grid.template = template.sourcemodel;
> cfg.grid.nonlinear = 'yes';
> cfg.mri = mri;
> sourcemodel = ft_prepare_sourcemodel(cfg);
>
> (See attachment grid-hdm-grad.png for a plot of all three geometrical
> objects superimposed. Looks fine to me.) Then I create a leadfield:
>
> cfg = [];
> cfg.grid = sourcemodel;
> cfg.vol = headmodel;
> cfg.channel = {'MEG'};
> cfg.grad = data.grad;
> leadfield  = ft_prepare_leadfield(cfg, data);
>
> The next step, which is the one which alerted me to the potential
> problem in the steps above, is to do an LCMV beamformer on a small
> time window of my ERF:
>
> % compute ERF covariance in small window
> cfg = [];
> cfg.covariance = 'yes';
> cfg.covariancewindow = [1.5 1.55];
> tl_right = ft_timelockanalysis(cfg, rightErf);
>
> % do beamforming
> cfg = [];
> cfg.method = 'lcmv';
> cfg.grid = leadfield;
> cfg.vol = headmodel;
> cfg.lcmv.lambda = '5%';
> cfg.lcmv.projectnoise = 'yes';
> cfg.lcmv.keepfilter = 'yes';
>
> sourceRight = ft_sourceanalysis(cfg, tl_right);
>
> % normalise with noise
> sourceRightNAI = sourceRight;
> sourceRightNAI.avg.pow = sourceRight.avg.pow ./ sourceRight.avg.noise;
>
> % copy over pos and dim from template
> sourceRight.pos = template.sourcemodel.pos;
> sourceRight.dim = template.sourcemodel.dim;
> sourceRightNAI.pos = template.sourcemodel.pos;
> sourceRightNAI.dim = template.sourcemodel.dim;
>
> % interpolate onto template brain
> cfg              = [];
> cfg.voxelcoord   = 'no';
> cfg.parameter    = 'avg.pow';
> cfg.interpmethod = 'nearest';
> cfg.coordsys     = 'mni';
> sourceRight_int= ft_sourceinterpolate(cfg, sourceRight, template_mri);
> sourceRightNAI_int= ft_sourceinterpolate(cfg, sourceRightNAI, template_mri);
>
> % plot
> cfg              = [];
> cfg.funparameter = 'avg.pow';
> cfg.method       = 'ortho';
> cfg.location     = 'max';
> cfg.coordsys = 'mni';
> ft_sourceplot(cfg, sourceRightNAI_int);
>
> The output of the above step is shown in ft_sourceplot-2.png. Note
> that there clearly is a maximum in the posterior right hemisphere. Now
> compare this to when I just plot the sensor-level ERF for the same
> time interval:
>
> c2=[];
> c2.layout='CTF275.lay';
> c2.xlim = [1.5 1.55];
> figure;ft_topoplotER(c2,rightErf);
>
> (See attachment ft_topoplotER.png.) The sensor-level ERF looks to me
> as if there should be a dipole in the left hemisphere. (That's problem
> 2.)
>
> Now of course I know that interpreting axial gradient data by eye is
> difficult, but this left-side increase is present in the majority of
> my subjects, yet the resulting LCMV maximum always ends up in the
> right hemisphere. Therefore my question: am I doing something wrong in
> my anatomical pipeline, causing a left-right flip? An indication that
> this might be the case is the weird display in ft_sourceplot after my
> ft_volumereslice step. Or is it really possible that for many
> subjects, a left-sided sensor topography ends up in the right
> hemisphere after beamforming? (My intuitions on this are not very
> strong.)
>
> Apologies for the lengthy e-mail. I thought it wise to provide all
> possible details :) Hopefully someone can help me!
>
> Best,
> Eelke
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>
> --
> Jörn M. Horschig
> PhD Student
> Donders Institute for Brain, Cognition and Behaviour
> Centre for Cognitive Neuroimaging
> Radboud University Nijmegen
> Neuronal Oscillations Group
> FieldTrip Development Team
>
> P.O. Box 9101
> NL-6500 HB Nijmegen
> The Netherlands
>
> Contact:
> E-Mail: jm.horschig at donders.ru.nl
> Tel:    +31-(0)24-36-68493
> Web: http://www.ru.nl/donders
>
> Visiting address:
> Trigon, room 2.30
> Kapittelweg 29
> NL-6525 EN Nijmegen
> The Netherlands
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list