unclosed surfaces with BEM models

Gregor Volberg Gregor.Volberg at PSYCHOLOGIE.UNI-REGENSBURG.DE
Wed Aug 11 15:52:31 CEST 2010


Dear fieldtrippers,

I encounter a notorious error message about unclosed surfaces when computing forward BEM models from individual MR anatomies. In oder to rule out that the error arose during segmentation, I then used the example data from the tutorial "Create BEM headmodel for EEG". Running the code with 

cfg = [];
cfg.tissue         = [1 2 3];
cfg.numvertices    = [1000 2000 3000]
cfg.conductivity   = [1 1/80 1]
cfg.sourceunits    = 'cm'
cfg.mriunits       = 'mm'
cfg.method         = 'dipoli';
cfg.dipoli = '/home/vog20246/loctmp/m-lib/fieldtrip-20100810/external/dipoli';
vol = ft_prepare_bemmodel(cfg, mri); %where mri contains field .seg

does the triangulation and computes the BEM model up to the following error message:

(begin)
....
Bmat countdown: 5010 (pass 2)
Bmat countdown: 5000 (pass 2)


 Fatal error in dipoli:  interface /tmp/tp610e7212_00c2_4baa_a23e_3c28760eda25.tri is not a single closed surface
 (totsolangle= -2.0000 from vertex 1 of /tmp/tp7926a65d_2628_4e7d_9d88_44651dfa8674.tri )


Warning: an error ocurred while running dipoli 
> In dipoli at 90
  In ft_prepare_bemmodel at 112
Error using ==> fread
Invalid file identifier.  Use fopen to generate a valid file identifier.
Warning: File '/tmp/tpac730b26_4dd7_4599_814f_69b80a106b51.ama' not found. 
> In dipoli at 98
  In ft_prepare_bemmodel at 112
(end)

I then tried the same code with the standard_vol distributed with fieldtrip, and received the same error message, again after 1/6 of the second pass (2500 of 3000) was computed. Next I tried cfg.method = 'bemcp' instead of 'dipoli' and got a warning message "Matrix is singular, close to singular or badly scaled" and NaNs as output. According to recent postings in this group, this error occurs if the three compartements intersect at one or more points. 

So, something in my code seems to tell fieldtrip that the surfaces are intersecting or incomplete. Is there anything I am missing? Any hint would be greatly appreciated. I use Matlab 7.8.0 (R2009a) on Debian Linux 64 bit and just updated my fieldtrip version to 20100810.

Best regards, Gregor



-- 
Dr. rer. nat. Gregor Volberg <gregor.volberg at psychologie.uni-regensburg.de> ( mailto:gregor.volberg at psychologie.uni-regensburg.de )
University of Regensburg
Institute for Experimental Psychology
93040 Regensburg, Germany
Tel: +49 941 943 3862 
Fax: +49 941 943 3233
http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html
----------------------------------
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