[FieldTrip] Poblem with options for ft_volumesegment

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Thu Jun 2 13:26:45 CEST 2011


Dear Michael,

Thanks for reporting this; we'll look into it.

Best,

JM

On Jun 2, 2011, at 1:18 PM, michael.wibral at web.de wrote:

> Dear FT'ers,
>
> Davide Rivolta posted a problem with ft_volumesegment a while ago.  
> We have meanwhile solved this problem.
>
> There is (FT from may 31st) a problem with the handling of the
>
> cfg.smooth
>
> option.
>
> It's default is 'no', according to the function HELP.
> However in line 434 of ft_volumesegment, this option is put into a  
> numerical array - this makes sense for a smoothing value. Also if no  
> specification is given at all, then a NaN is inserted into the  
> array. However if "no" is set explicitely then ft_getopt tries to  
> insert the string 'no' into the array which leads to an error. Below  
> is a script that is running and the error is once again detailed in  
> the commets.
> In my opinion this could be fixed by simply updating te function HELP.
>
> Michael
>
> %%Brain segmentation – MRI
>
>
> mri = ft_read_mri('NPD18_V2.mri');
>
> cfg = [];
>
> cfg.spmversion  = 'spm8';
>
> cfg.output      =  'tpm';
>
> cfg.template    = 'T1.nii';
>
> cfg.units       = 'mm';
>
> cfg.write       = 'no';
>
> cfg.coordsys    = 'ctf';
>
> cfg.downsample  = 2;
>
> cfg.smooth     = NaN; % works.  option 'no' as recommended (!) in  
> the function HELP throws an
>
>                                           % error because ft_getopt  
> on line 434 of ft_volumesegment
>
>                                           % tries to put a string of  
> length two into an array that is for numbers
>
>                                           % leaving out this option  
> also worked, but some
>
>                                           % people might try to use  
> this option
>
> segmentedmri    = ft_volumesegment(cfg, mri);
>
> save ('segmentedmri');
>
> _______________________________________________
> 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: 0031-24-3614793

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110602/097af019/attachment-0002.html>


More information about the fieldtrip mailing list