> One more question: Is there a way to increase the blob size of an unit
> voxel on the rendered brain surface?
There's no easy way. The best I can think of is something like:
% Original code
XYZ = [46 19 25; 73 73 33]';
t = [1 1]';
mat = [ 2 0 0 -92; 0 2 0 -128; 0 0 2 -74; 0 0 0 1];
dim = [91 109 91];
% Replicate values
[i,j,k]=ndgrid(-5:5,-5:5,-5:5);
msk = find((i.^2+j.^2+k.^2) <=5*5);
i=i(msk); j=j(msk); k=k(msk);
l=length(i(:));
xyz = zeros(3,l*size(XYZ,2));
tt = zeros(l*size(XYZ,2),1);
for m=1:size(XYZ,2),
xyz(:,(1:l)+(m-1)*l) = [XYZ(1,m)+i(:)' ; XYZ(2,m)+j(:)' ; XYZ(3,m)+k(:)'];
tt((1:l)+(m-1)*l) = t(m);
end;
msk=find(any(xyz<1) | xyz(1,:)>dim(1) | xyz(2,:)>dim(2) | xyz(3,:)>dim(3));
xyz(:,msk) = [];
tt(msk) = [];
% Reconstruct structure and render it.
dat = struct('XYZ',xyz,'t',tt,'mat',mat,'dim',dim);
spm_render(dat);
> Or it is fixed in the way that one pixel on the rendered brain represent
> one unit voxel in the original data?
One "voxel" in the dat structure that is passed to spm_render.m is projected
on to the rendered volume. Bigger voxels project as bigger blobs, but the
accuracy that you can place them with is decreased.
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]
|