[FieldTrip] non-existent mat in BEM headmodel

Lilla.Magyari at mpi.nl Lilla.Magyari at mpi.nl
Fri Apr 12 14:54:16 CEST 2013


hi Ricardo,

The dipoli method works on Mac and Linux. I guess it should work also on
Ubuntu, but I do not know if ever anyone tested it. It seems to me from
the error message that the problem is that the code does not return the
right path for the file with the binary code of this method. The path is
important, because different executable file is called depending on the
operation system. The operation system is identified by the mexext matlab
command in the script of ft_headmodel_dipoli. What do you get when you
type in mexext in your matlab command line?

Lilla

> Hi,
>
> I had to re-install ubuntu in order to provide more space for the analysis
> (since I was having the problem with the temporary files, which might have
> been too large for my ubuntu partition).
> But now the problem I have with the "ft_prepare_headmodel" is even weirder
> than before. The program now is complaining that there is no dipoli for my
> system:
>
>
> cfg        = [];
> cfg.method ='dipoli';
> vol        = ft_prepare_headmodel(cfg, segmentedmri);
>
>
>
> ??? Error using ==> ft_headmodel_dipoli at 138
> there is no dipoli executable for your platform
>
> Error in ==> ft_prepare_headmodel at 226
>       vol
> ft_headmodel_dipoli(geometry,'conductivity',cfg.conductivity,'isolatedsource',cfg.isolatedsource);
>
>
> I am running this script in a 2010b matlab version, installed in ubuntu
> 12.04. It should be working fine, right?
>
> Thanks in advance,
> Ricardo
>
>
> On 28 March 2013 14:39, Ricardo Moura <ricardoojm at gmail.com> wrote:
>
>> Hi Jörn,
>> thank you very much for your response!
>> I checked the segmentation and everything seems to be ok (as far as I
>> can
>> say... No error messages were shown during the processing and I checked
>> the
>> generated objects and plots).
>>
>> But I had a strange error while preparing the head model. Somehow the
>> command cannot find the dipoli files, even thought they are really where
>> they should be. And the second message
>> ("/tmp/tp2619f3f3_574d_478a_bfbb_01193b4f8e0c.ama'") I really have no
>> clue
>> of what it means.
>>
>> And I am running this command on a ubuntu 12.04 32-bit.
>>
>> Do you have any idea of how I can solve it?
>>
>> Thanks once again,Best,
>> Ricardo
>>
>> using the executable
>> "/usr/local/MATLAB/R2012a/toolbox/fieldtrip-20130314/external/dipoli/dipoli"
>> /tmp/tpd4e382c9_74a1_402d_be1a_6d2c82e749cc.sh: 3:
>> /tmp/tpd4e382c9_74a1_402d_be1a_6d2c82e749cc.sh:
>> /usr/local/MATLAB/R2012a/toolbox/fieldtrip-20130314/external/dipoli/dipoli:
>> not found
>> Warning: an error ocurred while running dipoli
>> > In ft_headmodel_dipoli at 201
>>   In ft_prepare_headmodel at 226
>>
>> Error using fread
>> Invalid file identifier.  Use fopen to generate a valid file identifier.
>> Warning: File '/tmp/tp2619f3f3_574d_478a_bfbb_01193b4f8e0c.ama' not
>> found.
>> > In ft_headmodel_dipoli at 209
>>   In ft_prepare_headmodel at 226
>>
>>
>> On 27 March 2013 13:10, Ricardo Moura <ricardoojm at gmail.com> wrote:
>>
>>> Dear all
>>> I am creating a BEM model for eeg, following the appropriate tutorial,
>>> but I have a problem when preparing the headmodel. The output I have
>>> from
>>> the ft_prepare_headmodel command does not contain the "mat", and so,
>>> when I
>>> try to generate the leadfield, it returns an error message due to non
>>> existent "mat". I saw that other users had similar problem, but I
>>> haven't
>>> found a solution though. So, what is wrong with my script?
>>>
>>> Thanks a lot in advance!
>>> Best,
>>> Ricardo
>>>
>>>
>>>
>>>
>>> load standard_mri.mat
>>> mri_orig=mri;
>>> disp(mri)
>>>
>>> % Segmenting the data
>>> cfg = [];
>>> cfg.output= {'scalp','skull','brain'};
>>> segmentedmri  = ft_volumesegment(cfg, mri_orig);
>>> disp(segmentedmri)
>>> save segmentedmri segmentedmri
>>>
>>> % MESH
>>> cfg=[];
>>> cfg.tissue={'brain','skull','scalp'};
>>> cfg.numvertices = [3000 2000 1000];
>>> bnd=ft_prepare_mesh(cfg,segmentedmri);
>>> disp(bnd(1))
>>>
>>> % Head Model = variavel vol
>>> cfg        = [];
>>> cfg.method ='bem_dipoli'; %dipoli singlesphere
>>> vol        = ft_prepare_headmodel(cfg, segmentedmri);
>>>
>>>
>>> >> disp(vol)
>>>              bnd: [1x3 struct]
>>>             cond: [0.3300 0.0041 0.3300]
>>>     skin_surface: 1
>>>           source: 3
>>>             type: 'dipoli'
>>>             unit: 'mm'
>>>              cfg: [1x1 struct]
>>>
>>>
>>>
>>>
>>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip





More information about the fieldtrip mailing list