[FIELDTRIP-DEV] a problem with ft_prepare_singleshell

jan-mathijs schoffelen jan.schoffelen at DONDERS.RU.NL
Fri Jul 16 17:04:23 CEST 2010


Dear Ali,

You may want to set a 'dbstop if error' to see what is missing in the
variables causing the error. My hunch is that the function does not
manage to accurately detect that you want to create your mesh on the
segmented mri. (hint: look for the variable basedonseg and see what is
required to put that to a value of 1)...

JM

On Jul 16, 2010, at 4:20 PM, Ali Bahramisharif wrote:

> Dear Jan-Mathijs
>
> Thanks for your reply. I am at revision 1420, which I think is the
> latest.
> This is the whole code that I use:
>
> mri = ft_read_mri('/berends_s/berends_s.mri');
> cfg = [];
> cfg.write        = 'no';
> cfg.coordinates  = 'ctf';
> cfg.template = '/spm8/templates/T1.nii';
> [segmentedmri] = ft_volumesegment(cfg, mri);
>
> segmentedmriF = segmentedmri;
> segmentedmriF.gray  = flipdim(flipdim(flipdim(segmentedmriF.gray,3),
> 2),1);
> segmentedmriF.white = flipdim(flipdim(flipdim(segmentedmriF.white,3),
> 2),1);
> segmentedmriF.csf   = flipdim(flipdim(flipdim(segmentedmriF.csf,3),
> 2),1);
>
> cfg = [];
> vol = ft_prepare_singleshell(cfg, segmentedmriF);
>
> What other information do you need?
>
> Best regards,
> Ali
>
>> Dear Ali,
>>
>> A bit more information may be useful here ;o)...
>> There was a bug fix involving this function recently, so you may want
>> to upgrade to the most recent version of fieldtrip and try again...
>> This could already solve it.
>>
>> Best,
>> Jan-Mathijs
>>
>> On Jul 16, 2010, at 3:29 PM, Ali Bahramisharif wrote:
>>
>>> Dear guys,
>>>
>>> I use the following code, which was working two months ago, but is
>>> not
>>> working now and produces the following error:
>>>
>>> cfg=[];
>>> vol = ft_prepare_singleshell(cfg, segmentedmri);
>>>
>>> ??? Error using ==> ft_prepare_mesh at 153
>>> unsupported cfg.method and/or input
>>>
>>> Error in ==> ft_prepare_singleshell at 86
>>> vol.bnd = ft_prepare_mesh(cfg, mri);
>>>
>>> Any suggestion on how to solve it?
>>>
>>> Best regards,
>>> Ali
>>>
>>> --
>>> Address:
>>>       HG02.517
>>>       Intelligent Systems
>>>       Radboud University Nijmegen
>>>       Heyendaalseweg 135
>>>       6525 AJ Nijmegen
>>>       The Netherlands
>>>
>>> http://www.cs.ru.nl/~ali
>>> Tel.:   +31 (0)24 36 52634
>>>
>>
>> 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-3668063
>>
>
>
> --
> Address:
>        HG02.517
>        Intelligent Systems
>        Radboud University Nijmegen
>        Heyendaalseweg 135
>        6525 AJ Nijmegen
>        The Netherlands
>
> http://www.cs.ru.nl/~ali
> Tel.:   +31 (0)24 36 52634
>

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-3668063

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.



More information about the fieldtrip mailing list