do
help spm_matrix
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Robert C. Welsh, PhD
Research Investigator
Department of Radiology
University of Michigan
(734) - 764 - 2412 (fax)
[log in to unmask]
>>> Xinghua Lu <[log in to unmask]> 04/13/06 12:39 PM >>>
Robert Welsh wrote:
> try as a starting point:
>
> http://www.sph.umich.edu/~nichols/JohnsGems.html
>
>
Thanks Robert! Nice website. Looking at the code copied below, a new
question for me is how to set up my output V.mat. For example, if I
want re-sample the volume with voxel size 16x16x16 mm, how can I derive
the numbers in the matrix. A pointer to a reference will be gratefully
appreciated. Thanks in advance.
Best,
Xinghua
function reslice(PI,PO,dim,mat,hld)
% FORMAT reslice(PI,PO,dim,mat,hld)
% PI - input filename
% PO - output filename
% dim - 1x3 matrix of image dimensions
% mat - 4x4 affine transformation matrix mapping
% from vox to mm (for output image).
% To define M from vox and origin, then
% off = -vox.*origin;
% M = [vox(1) 0 0 off(1)
% 0 vox(2) 0 off(2)
% 0 0 vox(3) off(3)
% 0 0 0 1];
%
% hld - interpolation method.
%___________________________________________________________________________
% @(#)JohnsGems.html 1.42 John Ashburner 05/02/02
> Dear All,
>
> First timer of the mailing list. I posted something an hour ago but
not
> sure if I did it correctly. Here it is again.
>
> Does SPM2 or SPM5 have a routine to resample a volume? For example,
if
> my
> current voxel size is 3.25x3.25x3 mm and I would like resample them to
> 16x16x16 mm, which function should I call. Could not find a obvious
> function
> by looking at names. Thanks in advance.
>
> Best,
> Xinghua
>
>
>
> **********************************************************
> Electronic Mail is not secure, may not be read every day, and should
not be used for urgent or sensitive issues.
>
>
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
|