Back to the main page.

Bug 3041 - Error in find_innermost_boundary (line 44)

Status CLOSED FIXED
Reported 2016-01-12 21:02:00 +0100
Modified 2016-05-05 20:32:02 +0200
Product: FieldTrip
Component: forward
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Thomas Mastropasqua - 2016-01-12 21:02:10 +0100

Created attachment 766 Figure showing the error message Dear Fieldtrip developers, I've just downloaded the latest version of Fieldtrip-lite (20160111) in order to use it as an EEGLAB extension. I would like to remove dipoles that are fitted outside the brain volume and when I try to do that, I get an error in the function find_innermost_boundary, which is generated by a reference to non-existent field 'pos' (for more details, see figure Error.png in attachment). I read on the Fieldtrip site that the present error has already been fixed and I'm wondering what I'm doing wrong. Thank you for your help. All the best, Thomas


Jan-Mathijs Schoffelen - 2016-02-22 13:53:12 +0100

This is probably caused by your input variable 'headmodel' being old-fashioned, i.e. containing position information in a 'pnt' field, rather than a 'pos' field. The solution would be to ensure the up-to-date data representation with a call to ft_datatype_headmodel as the first code line in ft_sourcedepth. I don't know where the 'vol' variable was obtained, but if this one came shipped with eeglab (or is generated within eeglab) it may be useful to notify the developers of eeglab that the 'pnt' may need to be changed into 'pos'. On the fieldtrip end, I will update the templates stored in fieldtrip/template/headmodel.


Jan-Mathijs Schoffelen - 2016-02-22 13:59:54 +0100

I have updated ft_sourcedepth (as well as the template headmodels) in the current version of fieldtrip on github github.com/fieldtrip/fieldtrip


Thomas Mastropasqua - 2016-03-02 15:42:02 +0100

Created attachment 781 Figure showing the new error message


Thomas Mastropasqua - 2016-03-02 15:44:03 +0100

Dear Jan-Mathijs, Thank you for your reply. Unfortunately, the changes you made did not fix the problem. Now I'm getting a new error message (see below and the image in attachment). The EEGLAB developers told me that they are aware of the problem but they cannot solve it. Just to let you know. All the best, Thomas Index exceeds matrix dimensions. Error in ft_sourcedepth (line 79) [proj, dist(j)] = ptriproj(v1, v2, v3, dippos(i,:), 1); Error in eeg_dipselect (line 78) depth = ft_sourcedepth(posxyz, vol); Error in std_editset (line 234) indleft = eeg_dipselect(ALLEEG(idat), rv*100,'inbrain'); Error in pop_study (line 405) STUDY = std_editset(STUDY, ALLEEG, 'commands', { 'inbrain', 'on', 'dipselect' str2num(res{1})/100 'return' }); Error using inputgui (line 204) Error while evaluating UIControl Callback


Jan-Mathijs Schoffelen - 2016-03-02 16:02:40 +0100

npos should be size(dippos,1) rather than size(pos,1) I guess that you already saw that. It's fixed now.