[Mne_analysis] regarding morphing in matlab

Eric Larson larson.eric.d at gmail.com
Tue Mar 29 21:51:47 EDT 2011
Search archives:

Hello all,

I have been using a nearest-neighbor mapping between subjects based on
the morphing maps, but now I am trying to implement the smoothing
operator in MATLAB as Matti suggested in an earlier email. However, I
have encountered a problem at step 2 ("On each row, insert ones to the
columns corresponding to the vertices adjacent to the vertex
corresponding to the row."): I am unsure how to determine which
vertices are adjacent to other vertices in the original
(~100,000-element) source space, which I think is where Matti is
suggesting the spreading operator needs to be applied.

I tried using mne_add_patch_info with a distance argument, but that
only seems to determine:

1) distances between elements in the decimated source space (thus why
it shows up as dist_limit=-0.01 for 10mm distance calculation when
using "mne_read_source_space(fname,true)" in MATLAB), and

2) the nearest vertex in the decimated source space for each vertex in
the original source space.

Is there some function I can use to determine which vertices in the
original, un-decimated source space are neighbors? Or am I missing
something about how to calculate the smoothing operator?

Eric

On Tue, Mar 15, 2011 at 5:17 PM,
<mne_analysis-request at nmr.mgh.harvard.edu> wrote:
> Here is the recipe we came up with Alex Gramfort during lunch to make
> the spreading operator matrix. The C code uses direct iteration
> instead of forming this matrix explicitly. By "valid neigboring
> vertex" I mean a vertex which is adjacent to the vertex of interest
> AND belongs to the source space OR has been defined during previous
> iterations of the spreading operator.
>
> This is what you need to do:
>
> 0. Initialize the spreading operator as an nvert x nvert identity
> matrix (S_0)
> 1. Create an nvert x nvert empty matrix (S)
> 2. On each row, insert ones to the columns corresponding to the
> vertices adjacent to the vertex corresponding to the row.
> 3. Zero columns corresponding to vertices that are not valid.
> 4. Divide each row by the number of non-zero entries on that row.
> 4. Compute the spreading operator corresponding to the k'th smoothstep
> as S_k = S*S_{k-1}
>
> I hope this helps.
>
> - Matti



More information about the Mne_analysis mailing list