Dear Ogze,
As Vladimir said, this is not straightforward. The activations are in
D.inv.inverse.J, which has the format [Nd Nr], where Nd is the number of
dipoles and Nr the number of temporal modes.
A small script is attached, that I use to get J in a more usable format,
[Nd pst], pst being time samples. If you want to plot this result, you
can use (for "normal" mesh, time sample 100):
g = gifti(fullfile(spm('dir'),'canonical','cortex_8196.surf.gii'));
figure, plot(g,struct('cdata',J{1}{1}(:,100)));
To insert your own solution, your have to use the temporal projector T.
Make a copy of your template MSP solution and replace J:
D.inv{end+1} = D.inv{end};
D.inv{end}.inverse.J = { yourJ * D.inv{end}.inverse.T }; % only one
condition!
I never tried that, but it should enable you to show the results both in
the render view and in the next steps ("Window" and "Image"). I am
assuming that you used the same mesh, and constrained the orientations
to the mesh normals, as SPM does. Note also that since MSP works on
reduced data all the time, and you probably not, T-projecting your
result may have unexpected results, so keep an eye on that.
Good luck,
Erick
On 2010-12-22 14:09, Ozge Batu wrote:
> I use SPM toolbox for EEG source reconstruction. I use 'multimodal
> face-evoked responses' data set and first calculate the MSP solution.
> Then, I read the forward model and the preprocessed data by using
> spm_eeg_load function and use them to compute my own source
> reconstruction solution. As a result I obtain a matrix with size (#of
> electrodes*#of time samples). Now I want to save this result back to
> the meeg object and view the solution in the 3D reconstruction window
> (mip, movie, render etc.). Is this possible? If it is I'd appreciate
> for your help. Thanks in advance.
|