[FieldTrip] bug with localizing

Johanna Zumer johanna.zumer at donders.ru.nl
Wed Sep 14 08:50:49 CEST 2011


Hi Elli and FT users,

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.

Thank you for reporting it!
Johanna

On 13 September 2011 22:04, Kanal Eliezer <ekanal at cmu.edu> wrote:

> Hello folks -
>
> 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:
>
> ~~~~~~~~~~~
> ...
> mri = ft_read_mri('MR.1.3.12.2.1107.5.2.32.35216.20110517110054966038966');
>
> % segment the brain
> cfg             = [];
> cfg.write       = 'no';
> cfg.coordsys    = 'DICOM';
> segmentedmri    = ft_volumesegment(cfg, mri);
>
> % prepare head model
> vol = ft_prepare_singleshell([],segmentedmri);
>
>
> ??? Reference to non-existent field 'seg'.
>
> Error in ==> prepare_mesh_segmentation at 63
> [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2),
> 1:size(mri.seg,3));
>
> Error in ==> ft_prepare_mesh at 124
>  bnd = prepare_mesh_segmentation(cfg, mri);
>
> Error in ==> ft_prepare_singleshell at 89
>  vol.bnd = ft_prepare_mesh(cfg, mri);
>
> Error in ==> dots_sourceLocalization at 41
> vol = ft_prepare_singleshell([],segmentedmri);
> ~~~~~~~~~~~
>
> 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):
>
> ~~~~~~~~~~~
> ...
> cfg = ft_checkconfig(cfg, 'forbidden', 'numcompartments');
> % if ~isfield(mri, 'tissue') && any(ismember(fieldnames(mri), {'gray'
> 'brain' 'scalp'})), cfg.tissue = 1; end
> if ~isfield(cfg, 'threshold'), cfg.threshold = 0; end
> ...
> ~~~~~~~~~~~
>
> The comment for that commit is "bugfix". Any ideas how to work around this
> problem? Thanks -
>
> Elli Kanal
>
>
> --------------------
> Eliezer Kanal, Ph.D.
> Postdoctoral Fellow
> Center for the Neural Basis of Cognition
> Carnegie Mellon University
> 4400 Fifth Ave, Suite 110A
> Pittsburgh PA 15213
> P: 412-268-4115
> F: 412-268-5060
>
>
>
> [1]
> http://fieldtrip.fcdonders.nl/tutorial/beamformer#the_forward_model_and_lead_field_matrix
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110914/cadd33a6/attachment-0002.html>


More information about the fieldtrip mailing list