strange segmentation w/ ft_volumesegment
jan-mathijs schoffelen
jan.schoffelen at DONDERS.RU.NL
Tue Sep 21 11:34:10 CEST 2010
Dear Matt,
From your figure it looks as if there is a coregistration problem
causing the segmentation (in SPM8) to return nonsense results. It is
important to note the following: the SPM segmentation routine relies
on matchin the anatomy of the single subject's MRI to a series of
templates. In order for this to work well, the anatomy should be
approximately coregistered with these templates. FieldTrip tries to
achieve this in ft_volumesegment. This seems to go wrong in your case.
Two things are problematic here: permuting and flipping mri.anatomy
without changing mri.transform is wrong, because the block of voxels
containing the anatomy does not correspond anymore to the voxel to
head coordinate system transformation as specified in mri.transform.
Next, the convention for anatomical MRIs in EEG/MEG is that the
coordinate system which defines 'headspace' is different from the SPM
convention. In other words, probably you should change cfg.coordinates
into 'ctf' before calling ft_volumesegment, because ft_volumerealign
will give you the transformation to headspace as defined by the
fiducials.
Best wishes,
Jan-Mathijs
On Sep 18, 2010, at 12:53 AM, Matt F. Panichello wrote:
> Hi there,
>
> I am trying to segment an anatomical MRI. Here's the script:
>
> mri = ft_read_mri('test.nii');
>
> %put the mri into the proper orientation
> cfg = [];
> mri.anatomy = permute(mri.anatomy,[1 3 2]);
> mri.anatomy = mri.anatomy(end:-1:1,:,end:-1:1);
>
> %segment the mri
> mri = ft_volumerealign(cfg,mri);
>
> cfg.template = '/spm8/templates/T1.nii';
> cfg.coordinates = 'spm';
> cfg.write = 'yes';
> cfg.name = 'test_segment';
> [segmentedmri] = ft_volumesegment(cfg, mri)
>
> %visualize the results
> cfg = [];
> test = segmentedmri;
> test.avg.pow = test.gray+test.white+test.csf;
> test.anatomy = mri.anatomy;
> cfg.funparameter = 'avg.pow';
> cfg.interactive = 'yes';
> ft_sourceplot(cfg,test);
>
>
> No errors are thrown, but when I visualize the results, the
> segmentation
> is clearly incorrect (attached) - it seems to be trying to follow the
> contour of the head instead of the brain. I've overlaid both
> test.nii and
> the template in MRIcron and they are aligned and in the same space; is
> there any other reason why segmentation may be failing? Thanks in
> advance!
>
> Matt
>
>
>
>
>
> The information in this e-mail is intended only for the person to
> whom it is
> addressed. If you believe this e-mail was sent to you in error and
> the e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to
> you in error
> but does not contain patient information, please contact the sender
> and properly
> dispose of the e-mail.
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users
> of the FieldTrip toolbox, to share experiences and to discuss new
> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html
> and http://www.ru.nl/neuroimaging/fieldtrip.
> <segmented.jpg>
Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3668063
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
More information about the fieldtrip
mailing list