[FieldTrip] ft_volumesegment question

Rojas, Don Don.Rojas at ucdenver.edu
Wed Aug 3 17:47:56 CEST 2011


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<http://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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110803/4abda9a7/attachment-0001.html>


More information about the fieldtrip mailing list