[FieldTrip] ft_volumesegment question

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Sat Aug 6 21:08:02 CEST 2011


Dear Don,

You're absolutely right. The correct tranfsormation matrix written to the file should be the mri.transform, not the original.transform.
I'll fix this as soon as possible.

Thanks for the debugging.

Best wishes,

Jan-Mathijs


On Aug 3, 2011, at 5:47 PM, Rojas, Don wrote:

> Dear Fieldtrippers,
> 
> I use FieldTrip and SPM8 together quite frequently. I noticed recently that the segmentation output (gray, white and csf tpm) of ft_volumesegment (c1, c2, c3) does not align properly to the input mri scan. This is not the case when doing the same segmentation in SPM8. I'm using the 20110725 version of Fieldtrip and have mad certain that it and not the one in spm8 is used. My cfg and command is as follows:
> 
> cfg.output      = {'brain' 'skull' 'scalp','tpm'};
> cfg.spmversion  = 'spm8';
> cfg.name        = 'test';
> cfg.write       = 'yes';
> cfg.coordsys    = 'spm';
> seg             = ft_volumesegment(cfg,mri);
> 
> Looking at the code for ft_volumesegment, it appears that a permutation of the mri dimensions (swapping 2 and 3) is done on line 279:
> 
> [mri,permutevec,flipflags] = align_ijk2xyz(mri);
> 
> The mri.transform field is changed accordingly. However, the original.transform is put into the headers for the c1, c2 and c3 output (line 399). I think that this is not correct because the segmentation output has the permuted dimensions, not the dimensions of the original mri. So, the correct transform should be the mri.transform after align_ijk2xyz I think. Or maybe this is intentional behavior and I'm missing something.  It can easily be checked, however, using Check Reg, in SPM8, that the output tpm do not align correctly with the original mri. If I manually write the mri.transform (from align_ijk2xyz) to the tpm output, however, they do align correctly.
> 
> Best,
> 
> Don
> 
> -----------------------
> Don Rojas, Ph.D.
> Associate Professor of Psychiatry
> U. of Colorado Denver Anschutz Medical Campus
> Director, UCD Magnetoencephalography Lab
> 13001 E. 17th Pl F546
> Aurora, CO 80045
> 303-724-4994
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

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: +31-24-3614793

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110806/684c380a/attachment.html>


More information about the fieldtrip mailing list