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

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Tue Feb 12 12:07:08 CET 2013


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

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

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


More information about the fieldtrip mailing list