[FieldTrip] deep sources when warping from template (MNI) to individual space (Schoffelen, J.M. (Jan Mathijs))

Kadis, Darren Darren.Kadis at cchmc.org
Fri Jan 25 17:53:59 CET 2019


Jan-Mathijs, thanks for the speedy response.

As suggested, I re-ran the sourcemodel comparison, keeping the individual headmodel in mm, but also explicitly specifying 'mm' when calling ft_prepare_sourcemodel (cfg.grid.unit = 'mm'; else assumes cm).  Unfortunately, I'm still seeing the 'deep bias' for the warped positions.  Units for the for the data object don’t seem to be the problem - the resulting source positions (.pos field) for the mm-defined vs cm-defined headmodel are identical, after accounting for order of magnitude difference, and rounding.

I'll keep digging, and welcome other suggestions.  For now, the 'SPM12 linear only' option seems to produce the most reasonable-looking positions in individual space (I believe Stephen Whitmarsh previously concluded the same - https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html).

Thanks, Darren

> -----Original Message-----
> From: fieldtrip <fieldtrip-bounces at science.ru.nl> On Behalf Of fieldtrip-
> request at science.ru.nl
> Sent: Friday, January 25, 2019 6:00 AM
> To: fieldtrip at science.ru.nl
> Subject: fieldtrip Digest, Vol 98, Issue 30
> 
> Send fieldtrip mailing list submissions to
> 	fieldtrip at science.ru.nl
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> or, via email, send a message with subject or body 'help' to
> 	fieldtrip-request at science.ru.nl
> 
> You can reach the person managing the list at
> 	fieldtrip-owner at science.ru.nl
> 
> When replying, please edit your Subject line so it is more specific than "Re:
> Contents of fieldtrip digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: can't find the ft_postfreesurferscript.sh
>       (Schoffelen, J.M. (Jan Mathijs))
>    2. Re: deep sources when warping from template (MNI) to
>       individual space (Schoffelen, J.M. (Jan Mathijs))
>    3. Re:  can't find the ft_postf  reesurferscript.sh (leizhang)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 25 Jan 2019 00:19:19 +0000
> From: "Schoffelen, J.M. (Jan Mathijs)" <jan.schoffelen at donders.ru.nl>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] can't find the ft_postfreesurferscript.sh
> Message-ID: <418E7C2D-700B-44F7-A10F-7D5771B24557 at donders.ru.nl>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi Zhang Lei,
> 
> Please check the completeness of your fieldtrip repository. The current
> version on github has the ft_postfreesurferscript.sh in the bin folder.
> 
> Best wishes,
> Jan-Mathijs
> 
> 
> J.M.Schoffelen, MD PhD
> Senior Researcher, VIDI-fellow - PI, language in interaction
> Telephone: +31-24-3614793
> Physical location: room 00.028
> Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands
> 
> 
> 
> On 24 Jan 2019, at 04:35, leizhang
> <leizhang at psych.ac.cn<mailto:leizhang at psych.ac.cn>> wrote:
> 
> Dear community,
> 
> My name is Zhang Lei and I am working in the institute of psychology, CAS.
> Currently I am analyzing an MEG data.
> 
> I'm doing the 'Creating a source model for source-reconstruction of MEG or
> EEG data' part according to the tutorial. After the freesurfer step,
> ft_postfreesurferscript.sh are used. However, I couldn't find the script in the
> fieldtrip/bin/, and I couldn't find it in other folder or on the web either. I
> wander where I can get this script to complete the step.
> 
> Thanks!
> Best,
> Zhang Lei
> 
> ________________________________
> Sent from YoMail<http://www.yomail.com/?utm_source=signature>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
> 
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190125/37
> 1ccd55/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 2
> Date: Fri, 25 Jan 2019 00:25:45 +0000
> From: "Schoffelen, J.M. (Jan Mathijs)" <jan.schoffelen at donders.ru.nl>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] deep sources when warping from template (MNI)
> 	to individual space
> Message-ID: <1333A06A-B511-4D34-A2E0-CD44B2AEA6DB at donders.ru.nl>
> Content-Type: text/plain; charset="utf-8"
> 
> Dear Darren,
> 
> That’s certainly a creative way to use the inverse warp for the creation of the
> subject specific grids :). I don’t know what might be going on, but recently we
> noticed that the warp might go wrong if the metric units of the data object
> are unexpected. I am not sure whether this is the case for you, but I noticed
> that the individual headmodels are explicitly converted into cm. Now, the
> warping parameters extracted from spm might be agnostic with respect to
> the units of the input, and probably are defined in ‘mm’. I know that we have
> been looking into this (i.e. the unit related issue) recently, but don’t know
> whether it has been resolved. Just as a diagnostic, could you keep the
> individual headmodel in mm and check what happens?
> 
> Best wishes,
> Jan-Mathijs
> 
> 
> 
> J.M.Schoffelen, MD PhD
> Senior Researcher, VIDI-fellow - PI, language in interaction
> Telephone: +31-24-3614793
> Physical location: room 00.028
> Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands
> 
> 
> 
> On 23 Jan 2019, at 19:47, Kadis, Darren
> <Darren.Kadis at cchmc.org<mailto:Darren.Kadis at cchmc.org>> wrote:
> 
> Dear FieldTrippers:
> 
> Wanted to follow-up on a discussion regarding poor normalization, and
> specifically, an inward bias, when warping template (MNI space) source
> positions to individual subject space.  This is a useful approach to
> normalization, facilitating group-level analyses and anatomical referencing,
> though meaningful inference is predicated on having accurate
> normalization/warps.  At least one relevant discussion thread, here:
> https://mailman.science.ru.nl/pipermail/fieldtrip/2015-April/009111.html,
> though I don’t see resolution.
> 
> In my lab, we’re consistently observing an ‘inward bias’ when warping
> template source positions to individual space (see attached).  Superficial
> sources seem to shift excessively deep, particularly at the dorsum.  Has
> anyone adjusted the normalization parameters or implemented alternate
> warping procedures to generate accurate transformations?  I will note that
> default normalization of individual MRI to template works well in both SPM8
> and SPM12 (confirmed with checkreg).
> 
> I believe ft_preparesourcemodel calls upon ft_volumenormalize and spm
> routines to generate the deformation field.  We’ve tried adjusted the
> warping regularization parameters in ft_volumenormalise both up and down
> by an order of magnitude, but did not see any real improvement.
> Suggestions?
> 
> Below, I’m sharing a short script used to visualize the relative performance of
> normalization with SPM8, SPM12 linear-only, and SPM12 nonlinear
> approaches, as implemented in FieldTrip.  I used 346 source positions,
> located approximately 3.6mm deep to the template brain surface (roughly
> corresponding to mid-sulcal depth across the cerebral mantle; attached).
> 
> 
> %% start
> 
> clear all; close all;
> 
> restoredefaultpath; addpath('PATH TO CURRENT FIELDTRIP DISTRO');
> ft_defaults;
> 
> vs_pos = []; % n×3, coords of interest, MNI space; see attached text, if
> interested in replicating
> 
> template_mri = ft_read_mri('PATH TO
> SPM12\spm12\canonical\avg152T1.nii');
> template_mri.coordsys = 'spm';  % ft_volumesegment needs coordsys of the
> template volume
> 
> cfg = [];
> cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12';
> cfg.spmmethod = 'new'; template_seg = ft_volumesegment(cfg,
> template_mri);
> 
> cfg = [];
> cfg.method = 'singleshell';
> template_headmodel = ft_prepare_headmodel(cfg, template_seg);
> 
> cfg = [];
> cfg.grid.pos = vs_pos;
> cfg.spmversion = 'spm12';
> cfg.spmmethod = 'new';
> cfg.headmodel = template_headmodel;
> template_grid = ft_prepare_sourcemodel(cfg);
> 
> 
> % evaluate dipole positions relative to modeled brain figure;
> ft_plot_vol(template_headmodel, 'facecolor', 'cortex', 'edgecolor', 'none');
> alpha 0.5; camlight; hold on; ft_plot_mesh(template_grid.pos);
> 
> % generate the individual headmodel; warp source positions from template
> to subject space
> T1 = 'PATH TO SUBJECT T1';     % high-quality 3D-T1, 1mm isotropic, here
> individual_mri = ft_read_mri(T1, 'dataformat', 'nifti_spm');
> individual_mri.coordsys =  'spm';
> 
> cfg = [];
> cfg.output = {'brain', 'skull', 'scalp'}; cfg.spmversion = 'spm12';
> cfg.spmmethod = 'new'; individual_segmented_mri = ft_volumesegment(cfg,
> individual_mri);
> 
> cfg = [];
> cfg.method = 'singleshell';
> individual_headmodel = ft_prepare_headmodel(cfg,
> individual_segmented_mri); individual_headmodel =
> ft_convert_units(individual_headmodel, 'cm');
> 
> cfg = [];
> cfg.grid.warpmni = 'yes';
> cfg.grid.template = template_grid;
> cfg.grid.nonlinear = 'yes';
> cfg.spmversion = 'spm8';
> cfg.mri = individual_mri;
> individual_grid_spm8 = ft_prepare_sourcemodel(cfg);
> 
> cfg = [];
> cfg.grid.warpmni = 'yes';
> cfg.grid.template = template_grid;
> cfg.grid.nonlinear = 'no';
> cfg.spmversion = 'spm12';
> cfg.spmmethod = 'new';
> cfg.mri = individual_mri;
> individual_grid_spm12_linear = ft_prepare_sourcemodel(cfg);
> 
> cfg = [];
> cfg.grid.warpmni = 'yes';
> cfg.grid.template = template_grid;
> cfg.grid.nonlinear = 'yes';
> cfg.spmversion = 'spm12';
> cfg.spmmethod = 'old';
> cfg.mri = individual_mri;
> individual_grid_spm12_nonlinear = ft_prepare_sourcemodel(cfg);
> 
> figure;
> subplot(2, 2, 1); ft_plot_vol(template_headmodel, 'facecolor', 'cortex',
> 'edgecolor', 'none'); alpha 0.25; camlight; hold on;
> ft_plot_mesh(template_grid.pos, 'vertexcolor', 'red'); title('template');
> subplot(2, 2, 2); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex',
> 'edgecolor', 'none'); alpha 0.25; camlight; hold on;
> ft_plot_mesh(individual_grid_spm8.pos); title('individual spm8 nonlinear');
> subplot(2, 2, 3); ft_plot_vol(individual_headmodel, 'facecolor', 'cortex',
> 'edgecolor', 'none'); alpha 0.25; camlight; hold on;
> ft_plot_mesh(individual_grid_spm12_linear.pos); title('individual spm12
> linear only'); subplot(2, 2, 4); ft_plot_vol(individual_headmodel, 'facecolor',
> 'cortex', 'edgecolor', 'none'); alpha 0.25; camlight; hold on;
> ft_plot_mesh(individual_grid_spm12_nonlinear.pos); title('individual spm12
> nonlinear');
> 
> %% end
> 
> In advance, thanks for your help.
> 
> Darren S. Kadis, PhD
> Assistant Professor
> Co-Director, MEG Core
> 
> Division of Neurology
> Pediatric Neuroimaging Research Consortium Cincinnati Children's Hospital
> Medical Center MLC 15008, 3333 Burnet Avenue Cincinnati, OH 45229-3026
> 
> Neurology and Neuroscience Graduate Program College of Medicine,
> Department of Pediatrics University of Cincinnati
> <compare_normalization.jpg><cortical_sources.txt>_____________________
> __________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190125/9b
> f75225/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 3
> Date: Fri, 25 Jan 2019 14:29:19 +0800
> From: "leizhang" <leizhang at psych.ac.cn>
> To: "=?utf-8?B?RmllbGRUcmlwIGRpc2N1c3Npb24gbGlzdA==?="
> 	<fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip]  can't find the ft_postf  reesurferscript.sh
> Message-ID: <emc_71a1b7df3ad64545b024030cbfec77de at pc.loc>
> Content-Type: text/plain; charset="utf-8"
> 
> Thanks a lot! I find it.
> 
> best,
> Zhang Lei
> 
> Sent from YoMail
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190125/20
> c25255/attachment-0001.html>
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
> 
> 
> ------------------------------
> 
> End of fieldtrip Digest, Vol 98, Issue 30
> *****************************************




More information about the fieldtrip mailing list