> Then are there any trick or program to overlay two contrasts
> onto rendering and MIP by different color?
Rendering onto a brain surface is easy and can be done by the <Render>
button, specifying the "New style" of rendering.
The following should give a few clues about how to do maximum intensity
projections with several contrasts.
_______________________________________________________
load MIP
d0 = size(mip96);
mip = repmat(rot90(mip96/max(mip96(:))),[1 1 3]);
c0 = [0 0 0 ; 0 0 1 ; 0 1 0 ; 0 1 1
1 0 0 ; 1 0 1 ; 1 1 0 ; 1 1 1] -0.5;
[SPM,VOL,xX,xCon,xSDM] = spm_getSPM;
Z = SPM.Z;
XYZ = SPM.XYZmm;
M = VOL.M;
c = (M(1:3,1:3)*c0')';
dim = [(max(c)-min(c)) size(mip96)];
r = rot90(spm_project(Z,round(XYZ),dim));
r = r/max(r(:));
[SPM,VOL,xX,xCon,xSDM] = spm_getSPM;
Z = SPM.Z;
XYZ = SPM.XYZmm;
M = VOL.M;
c = (M(1:3,1:3)*c0')';
dim = [(max(c)-min(c)) size(mip96)];
g = rot90(spm_project(Z,round(XYZ),dim));
g = g/max(g(:));
[SPM,VOL,xX,xCon,xSDM] = spm_getSPM;
Z = SPM.Z;
XYZ = SPM.XYZmm;
M = VOL.M;
c = (M(1:3,1:3)*c0')';
dim = [(max(c)-min(c)) size(mip96)];
b = rot90(spm_project(Z,round(XYZ),dim));
b = b/max(b(:));
mip = max(cat(3,r,g,b),mip);
figure;
image(mip);
axis image; axis off;
_______________________________________________________
Best regards,
-John
--
Dr John Ashburner.
Wellcome Department of Cognitive Neurology.
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
mail: [log in to unmask]
|