> I have a very simple transform question. I have an affine normalized T1
> image from which I have extracted a brain surface. I would like to
> transform this image to its original space. So essentially I have the
> following:
> - *_sn3d.mat file
> - a set of vertices
I haven't tested it, but the following may do the trick:
p = load(spm_get(1,'*_sn3d.mat'));
FV = load(spm_get(1,'surf_*.mat','Select surface data'));
V = spm_vol(spm_get(1,'*.img','Select un-normalised image'));
Mat = V.mat\p.MF*p.Affine*inv(p.MG);
FV.vertices = (Mat(1:3,:)*[FV.vertices' ; ones(1,size(FV.vertices,1))])';
Best regards,
-John
--
Dr John Ashburner.
Functional Imaging Lab., 12 Queen Square, London WC1N 3BG, UK.
tel: +44 (0)20 78337491 or +44 (0)20 78373611 x4381
fax: +44 (0)20 78131420 http://www.fil.ion.ucl.ac.uk/~john
|