<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Akiki,<div><br></div><div>I am not a headmodel expert. </div><div>but looking at the output message, it seems your segementation did not go too well (see the "intersect" message). my intuition is then then the next temporary file *.ama is not created and ft_prepare_bemmodel then simply says ciao.</div><div><br></div><div>perhaps you want to check / redo the segmentation?</div><div><br></div><div>good luck,</div><div>nathan</div><div><br></div><div><div><div><br></div></div></div><div><div>On 09.02.2012, at 23:04, Akiko Ikkai wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<div><br></div><div>I'm trying to create a volume conduction model for my EEG study based on anatomical MRI, and having trouble with ft_prepare_bemmodel</div><div><br></div><div>when I run </div><div><div><font color="#330099">cfg                = [];</font></div>
<div><font color="#330099">cfg.tissue         = [7 4 1]; % value for brain, skull, and scalp</font></div><div><font color="#330099">cfg.conductivity   = [1 1/80 1]*.33; % after standard_BEM.zip data</font></div><div><font color="#330099">cfg.isolatedsource = true;</font></div>
<div><font color="#330099">cfg.method         = 'dipoli'; </font></div><div><font color="#330099">cfg.sourceunits = 'mm';</font></div><div><font color="#330099">cfg.mriunits = 'mm';</font></div><div>
<font color="#330099">vol = ft_prepare_bemmodel(cfg, seg4bem);</font></div></div><div><br></div><div>I get the following error message while ft_prepare_bemmodel is running: </div><div><br></div><div><font color="#330099">Fatal error in dipoli:  interface /private/tmp/tpd8a04422_e19e_4978_9b9b_56d1f2696492.tri and /private/tmp/tp313c9a32_1991_4df6_a404_8efc41b6302e.tri intersect </font></div>
<div><font color="#330099"> at vertex 1402 of /private/tmp/tpd8a04422_e19e_4978_9b9b_56d1f2696492.tri</font></div><div><font color="#330099"><br></font></div><div><font color="#330099">Warning: an error ocurred while running dipoli </font></div>
<div><font color="#330099">> In dipoli at 94</font></div><div><font color="#330099">  In ft_prepare_bemmodel at 112</font></div><div><font color="#330099">Error using ==> fread</font></div><div><font color="#330099">Invalid file identifier.  Use fopen to generate a valid file identifier.</font></div>
<div><font color="#330099">Warning: File '/private/tmp/tp0c0779e3_a657_4ca5_b9e1_845f41e9574a.ama' not</font></div><div><font color="#330099">found. </font></div><div><font color="#330099">> In dipoli at 102</font></div>
<div><font color="#330099">  In ft_prepare_bemmodel at 112</font></div><div><br></div><div><br></div><div>and the output vol is missing .mat, which causes an error during ft_sourceanalysis. </div>







<div><font color="#330099">>> vol</font></div><div><font color="#330099">vol = </font></div><div><font color="#330099">            cond: [0.3300 0.0041 0.3300]</font></div><div><font color="#330099">             bnd: [1x3 struct]</font></div>
<div><font color="#330099">          source: 3</font></div><div><font color="#330099">    skin_surface: 3</font></div><div><font color="#330099">            skin: 1</font></div><div><font color="#330099">            type: 'dipoli'</font></div>
<div><div><br></div><div>Does anyone know how to correct for "fatal error" so that ft_prepare_bemmodel creates the correct volume conduction model? I opened .tri file and removed line 1402, but got the same results.</div>
<div><br></div><div>Thanks in advance! Akiko  </div><div><br></div>-- <br><font><span style="font-family:arial,helvetica,sans-serif">Akiko Ikkai, Ph.D. <br>Postdoctoral Fellow<br style="font-family:arial,helvetica,sans-serif">
</span></font><font style="font-family:arial,helvetica,sans-serif" face="'PrimaSans BT,Verdana,sans-serif'" size="2">Department of 
Psychological and Brain Sciences<br>Johns Hopkins University<br>Ames 
Hall, 3400 N. Charles St.<br>Baltimore, MD 21218</font><br style="font-family:arial,helvetica,sans-serif"><br><br>
</div>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br></body></html>