[Mne_analysis] vertex numbers in source space files
Alexandre Gramfort
alexandre.gramfort at telecom-paristech.fr
Sat Aug 3 03:01:33 EDT 2013
hi Björn,
if you get:
isequal(find(sspace(1).inuse),sspace(1).vertno)
ans = 1
it's that vertno is indexed starting at 1 as find returns matlab indices.
HTH
Alex
On Fri, Aug 2, 2013 at 2:14 PM, Björn Herrmann <bherrmann at cbs.mpg.de> wrote:
> dear mne users,
>
> i am using the MNE toolbox to obtain source spaces. in particular, i have a question regarding the vertex numbers in matlab.
> i am reading the source space
>
> sspace = mne_read_source_spaces(['fsurf/' subj{s} '/bem/' subj{s} '-ico-5-src.fif']);
> sspace(1)
> ans =
> id: 101
> np: 136746
> ntri: 273488
> coord_frame: 5
> rr: [136746x3 double]
> nn: [136746x3 double]
> tris: [273488x3 int32]
> nuse: 10242
> inuse: [1x136746 int32]
> vertno: [1x10242 int32]
> nuse_tri: 20480
> use_tris: [20480x3 int32]
> nearest: []
> nearest_dist: []
> pinfo: []
> dist: []
> dist_limit: []
>
> and I calculated an inverse solution for the reduced number of vertices (n = 10242). before morphing this solution to the full 136746 vertices I do the following
>
> Vector = zeros(size(sspace(1).rr,1),1);
> Vector(sspace(1).vertno+1) = J;
>
> however, i am unsure whether it is "sspace(1).vertno" or "sspace(1).vertno+1". I had the feeling that the vertex numbers start at 0 and thus adding a 1 is correct. the vector sspace(1).inuse however points towards not adding the 1, since
>
> isequal(find(sspace(1).inuse),sspace(1).vertno)
> ans =
> 1
>
> could one of you help me regarding which one is right? i was favoring adding 1, because the morphed solution (136746 vertices) and the solution plotted for the reduced number of vertices (10242) looked more alike when i add 1 to sspace(1).vertno
>
> thanks in advance,
> björn
>
>
>
> ------
> Björn Herrmann
>
> Auditory Cognition Group
> Max Planck Institute for Human Cognitive and Brain Sciences
> Stephanstrasse 1a, 04103 Leipzig, Germany
>
> phone: ++49 (0)341 9940 2606
> email: bherrmann at cbs.mpg.de
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
More information about the Mne_analysis
mailing list