Hi Yuval,
On Wed, Oct 6, 2010 at 1:39 PM, Yuval Harpaz <[log in to unmask]> wrote:
> I fitted a headshape to T1 tamplate MRI, creating a covariance matrix M1
> M1=[];
> S =[];
> S.sourcefid = meegfid;
> S.targetfid = mrifid;
> S.useheadshape = 1;
> S.template = 2;
> M1 = spm_eeg_inv_datareg(S);
>
> is there a way for me to use this matrix in order to transform the template
> MRI to the headshape coordinates and write it as nifti/ img/ brick?
Something like:
spm_get_space('single_subj_T1.nii',
spm_get_space('single_subj_T1.nii')*inv(M1))
should do it. You should probably run it on a copy of the template
image and not on the original. I hope that I didn't make a mistake
with the inv, but try and see.
Best,
Vladimir
|