[FieldTrip] reporting errors while calling ft_volumesegment with recent fieldtrip releases

sophie chen sophiechen33 at gmail.com
Tue Feb 12 15:42:48 CET 2013


Hi Jan-Mathijs

Thanks for you reply, I just figure out where the problem is coming from
(and you are totally right about the * cfg.name     = 'ctf' :-) *,
completely no sens what I wrote... )
So the problem I had (and I also had some problems while using
ft_prepare_headmodel) is coming from the ft_defaults.m, the one from
more recent release which is not working for me.... (I always run
ft_defaults before executing my programs)
So I used the one from the 20111024 release
Now, everything is working!

I also talk to another Fieldtrip user in our lab, and he couldn't run
the fieldtrip functions, unless 'adding fieldtrip directory in path
with subfolders'
which created conflicts with eeglab toolbox...
Is there actually a problem with the ft_defaults.m file itself or is
it coming from our Matlab version (2012b)? What should we use instead?

Thanks!
Cheers,

Sophie



Dear Sophie,

What happens if you don't specify cfg.name? It seems that you don't
need the output to be written to a file anyway (since you also specify
cfg.write = 'no');

Best,

Jan-Mathijs




On Feb 12, 2013, at 11:46 AM, sophie chen wrote:

>* Dear Fieldtripers*>* *>* I am having some errors when running recent fieldtrip releases while calling ft_volumesegment that I don't have with former  fieldtrip version, following what I get: *>* with fieldtrip fieldtrip-20111024 *>* *>*  cfg = [];*>* cfg.name     = 'ctf';*>* cfg.output= { 'tpm'  }; *>* segmentedmri = ft_volumesegment(cfg, mri);*>* *>* Warning: adding D:\SOPHIE\Software\fieldtrip-20111024\external\spm8 toolbox to your Matlab path *>* *>* the input is volume data with dimensions [256 256 256]*>* Converting the coordinate system from ctf to spm*>* performing the segmentation on the specified volume*>* segmentedmri = *>*           dim: [256 256 256]*>*     transform: [4x4 double]*>*      coordsys: 'ctf'*>*          unit: 'mm'*>*          gray: [256x256x256 double]*>*         white: [256x256x256 double]*>*           csf: [256x256x256 double]*>*           cfg: [1x1 struct]*>* *>* with fieldtrip 'fieldtrip-20121203' *>* *>* >> cfg = [];*>* cfg.name     = 'ctf';*>* cfg.write      = 'no';*>* cfg.output= {  'tpm'   }; *>* segmentedmri = ft_volumesegment(cfg, mri);*>* *>* Warning: FieldTrip is not yet on your MATLAB path, adding D:\\SOPHIE\\Software\\fieldtrip-20121203(1)\\fieldtrip-20121203 *>* > In ft_defaults at 60*>*   In ft_volumesegment at 130 *>* the input is volume data with dimensions [256 256 256]*>* Converting the coordinate system from ctf to spm*>* Rescaling NIFTI: slope = 0.00342945, intercept = 0*>* Smoothing by 0 & 8mm..*>* Coarse Affine Registration..*>* Fine Affine Registration..*>* Error using ft_write_mri (line 128)*>* unsupported data format*>* Error in ft_volumesegment (line 274)*>*   Va = ft_write_mri([cfg.name,'.img'], mri.anatomy, 'transform', mri.transform, 'spmversion', cfg.spmversion); *>* *>* *>* and 'fieldtrip-20130210'*>* *>* cfg = [];*>* cfg.name     = 'ctf';*>* cfg.write      = 'no';*>* cfg.output= {  'tpm'   }; *>* segmentedmri = ft_volumesegment(cfg, mri);*>* *>* the input is volume data with dimensions [256 256 256]*>* *>* Warning: adding D:\SOPHIE\Software\fieldtrip-20130210\fieldtrip-20130210\external\spm8 toolbox to your Matlab path *>* *>* Converting the coordinate system from ctf to spm*>* *>* Warning: adding D:\SOPHIE\Software\fieldtrip-20130210\fieldtrip-20130210\external\freesurfer toolbox to your Matlab path *>* *>* Rescaling NIFTI: slope = 0.00342945, intercept = 0*>* Smoothing by 0 & 8mm..*>* Coarse Affine Registration..*>* Fine Affine Registration..*>* Warning: could not open ctf.img *>* > In fileio\private\warning_once at 116*>*   In fileio\private\filetype_check_header at 54*>*   In ft_filetype at 338*>*   In ft_write_mri at 54*>*   In ft_volumesegment at 282 *>* Error using ft_write_mri (line 128)*>* unsupported data format*>* Error in ft_volumesegment (line 282)*>*   Va = ft_write_mri([cfg.name,'.img'], mri.anatomy, 'transform', mri.transform, 'spmversion', cfg.spmversion); *>* *>* Please help... :-)  it's not convenient to switch fieldtrip version while running scripts...*>* Thanks a lot!*>* *>* cheers*>* Sophie*>* _______________________________________________*>* fieldtrip mailing list*>* fieldtrip at donders.ru.nl <http://mailman.science.ru.nl/mailman/listinfo/fieldtrip>*>* http://mailman.science.ru.nl/mailman/listinfo/fieldtrip*
Jan-Mathijs Schoffelen, MD PhD

Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands

Max Planck Institute for Psycholinguistics,
Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
<http://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
Telephone: +31-24-3614793
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130212/9d98e1ca/attachment-0002.html>


More information about the fieldtrip mailing list