Hi Elli and FT users,<div><br><div>Apologies for this bug, I introduced it last week in attempting to fix something else (allowing 3 shells to work). I have already fixed this yesterday (reintroducing this line 25 with some extra 'if' clauses which hopefully will work for everyone), so it should already be on the SVN server as of this morning. <br>
<br></div><div>Thank you for reporting it!</div><div>Johanna</div><div><br><div class="gmail_quote">On 13 September 2011 22:04, Kanal Eliezer <span dir="ltr"><<a href="mailto:ekanal@cmu.edu">ekanal@cmu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello folks -<br>
<br>
I'm trying to localize some activity I recorded, and I'm having a problem with the scripts. Following the instructions in the beamformer tutorial [1], I have the following code, which results in the following error:<br>
<br>
~~~~~~~~~~~<br>
...<br>
mri = ft_read_mri('MR.1.3.12.2.1107.5.2.32.35216.20110517110054966038966');<br>
<br>
% segment the brain<br>
cfg = [];<br>
cfg.write = 'no';<br>
cfg.coordsys = 'DICOM';<br>
segmentedmri = ft_volumesegment(cfg, mri);<br>
<br>
% prepare head model<br>
vol = ft_prepare_singleshell([],segmentedmri);<br>
<br>
<br>
??? Reference to non-existent field 'seg'.<br>
<br>
Error in ==> prepare_mesh_segmentation at 63<br>
[mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3));<br>
<br>
Error in ==> ft_prepare_mesh at 124<br>
bnd = prepare_mesh_segmentation(cfg, mri);<br>
<br>
Error in ==> ft_prepare_singleshell at 89<br>
vol.bnd = ft_prepare_mesh(cfg, mri);<br>
<br>
Error in ==> dots_sourceLocalization at 41<br>
vol = ft_prepare_singleshell([],segmentedmri);<br>
~~~~~~~~~~~<br>
<br>
It looks like the source of this error is in a recently commented-out line (line 25) in the prepare_mesh_segmentation.m file (build 4120, off the svn):<br>
<br>
~~~~~~~~~~~<br>
...<br>
cfg = ft_checkconfig(cfg, 'forbidden', 'numcompartments');<br>
% if ~isfield(mri, 'tissue') && any(ismember(fieldnames(mri), {'gray' 'brain' 'scalp'})), cfg.tissue = 1; end<br>
if ~isfield(cfg, 'threshold'), cfg.threshold = 0; end<br>
...<br>
~~~~~~~~~~~<br>
<br>
The comment for that commit is "bugfix". Any ideas how to work around this problem? Thanks -<br>
<br>
Elli Kanal<br>
<br>
<br>
--------------------<br>
Eliezer Kanal, Ph.D.<br>
Postdoctoral Fellow<br>
Center for the Neural Basis of Cognition<br>
Carnegie Mellon University<br>
4400 Fifth Ave, Suite 110A<br>
Pittsburgh PA 15213<br>
P: <a href="tel:412-268-4115" value="+14122684115">412-268-4115</a><br>
F: <a href="tel:412-268-5060" value="+14122685060">412-268-5060</a><br>
<br>
<br>
<br>
[1] <a href="http://fieldtrip.fcdonders.nl/tutorial/beamformer#the_forward_model_and_lead_field_matrix" target="_blank">http://fieldtrip.fcdonders.nl/tutorial/beamformer#the_forward_model_and_lead_field_matrix</a><br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</blockquote></div><br></div></div>