[FieldTrip] warping from MNI to individual subjects

Julian Keil julian.keil at gmail.com
Tue Apr 1 15:12:48 CEST 2014


Dear Meike,

I'm not sure if this relates to your problem, but I had - possibly similar - issues with the warped grid and the template being 90° rotated.
My problem was due to an error during the realignment of the MRI.
Did you check whether the realignment works and whether your different coordinate systems make sense?

Could you also maybe attach a picture of your exchanged axes? At least for me it's hard to image how this looks.

Best,

Julian


********************
Dr. Julian Keil

AG Multisensorische Integration
Psychiatrische Universitätsklinik
der Charité im St. Hedwig-Krankenhaus
Große Hamburger Straße 5-11, Raum E 307
10115 Berlin

Telefon: +49-30-2311-1879
Fax:        +49-30-2311-2209 
http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration

Am 01.04.2014 um 14:12 schrieb Meike Schweisfurth:

> Dear Fieldtrippers! 
> As newbie I have another question, now concerning the warping from MNI to individual subjects. 
> Using the below code (the first part almost entirely from http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space), I get first the template and then apply the grid to the individual subjects. 
> However, in later on analysis step it turned out that while the subjects where nicely similar positioned, the template position is entirely different, as it is was even axes were exchanged... 
> Does anybody know what could be the reason and how to change it? 
> Thanks for any suggestions! 
> Best, Meike 
> 
> 
> % NOTE: the path to the template file is user-specific 
> template = ft_read_mri('fieldtrip/fieldtrip-20140316/external/spm8/templates/T1.nii');
> template.coordsys = 'spm'; % so that FieldTrip knows how to interpret the coordinate system 
> 
> % segment the template brain and construct a volume conduction model (i.e. head model): this is needed 
> % for the inside/outside detection of voxels. 
> cfg          = []; 
> template_seg = ft_volumesegment(cfg, template); 
> 
> cfg          = []; 
> cfg.method   = 'singleshell'; 
> template_vol = ft_prepare_headmodel(cfg, template_seg); 
> template_vol = ft_convert_units(template_vol, 'cm'); % Convert the vol to cm, since the grid will also be expressed in cm 
> 
> % construct the dipole grid in the template brain coordinates 
> % the source units are in cm 
> % the negative inwardshift means an outward shift of the brain surface for inside/outside detection 
> cfg = []; 
> cfg.grid.xgrid  = -20:1:20; 
> cfg.grid.ygrid  = -20:1:20; 
> cfg.grid.zgrid  = -20:1:20; 
> cfg.grid.unit   = 'cm'; 
> cfg.grid.tight  = 'yes'; 
> cfg.inwardshift = -1.5; 
> cfg.vol        = template_vol; 
> template_grid  = ft_prepare_sourcemodel(cfg); 
> save('../analysis/MEG/source_analysis/MNI','template_grid','template_vol','template_seg','template') 
> % make a figure with the template head model and dipole grid 
> figure 
> hold on 
> ft_plot_vol(template_vol, 'facecolor', 'cortex', 'edgecolor', 'none');alpha 0.5; camlight; 
> ft_plot_mesh(template_grid.pos(template_grid.inside,:)); 
> else load('../analysis/MEG/source_analysis/MNI','template_grid','template_vol','template_seg','template')
> 
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
>      SUBJECTS={    'VP02'    'VP03'    'VP04'    'VP05'    'VP06' 'VP07'    'VP08'    'VP09'    'VP11'    'VP12'    'VP13' 'VP14'          'VP15'    'VP16'    'VP17'    'VP18'} 
> 
> for SUBJI=SUBJECTS 
>     SUBJ=SUBJI{1}; 
> % read the single subject anatomical MRI 
> load(['../analysis/MEG/source_analysis/',SUBJ,'/mri']);  %Has been processed to CFT coordinates before 
> load(['../analysis/MEG/source_analysis/',SUBJ,'/segmentedmri']); 
> 
> 
> cfg = []; 
> cfg.method = 'singleshell'; 
> vol = ft_prepare_headmodel(cfg, segmentedmri); 
> 
> % create the subject specific grid, using the template grid that has just been created 
> cfg = []; 
> cfg.grid.warpmni   = 'yes'; 
> cfg.grid.template  = template_grid; 
> cfg.grid.nonlinear = 'yes'; % use non-linear normalization 
> cfg.mri            = mri_ra; 
> grid               = ft_prepare_sourcemodel(cfg); 
> 
> % make a figure of the single subject headmodel, and grid positions 
> figure; 
> ft_plot_vol(vol, 'edgecolor', 'none'); alpha 0.4; %camlight 
> ft_plot_mesh(grid.pos(grid.inside,:)); 
> 
> save(['../analysis/MEG/source_analysis/',SUBJ,'/MNIgrid'],'grid','vol') 
> end 
> 
> _______________________________________________
> 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/20140401/7ed12bcd/attachment.html>


More information about the fieldtrip mailing list