> I have 19 slices of T2 map and fractional anisotropy (FA) map calculated
> off-line from T2 weighted images and diffusion tensor images, respectively.
> Those maps were saved as floating without header information (File size
> =65536 bytes for each map). I would like to analyze those maps using SPM2.
> I can easily convert raw images (16 bit integer, file size = 38912 bytes)
> to Analyze format using MRIcro. However, I cannot make Analyze format for
> those maps, T2 and FA. Could anyone help me ? I tried to use MRIcro, but no
> success.
A little script like the following may work. You will need to concatenate
all the slices into the same file (test.img).
V.fname = 'test.img';
V.dim = [128 128 19 spm_type('float')];
V.pinfo = [1 0 0]';
origin = (V.dim(1:3)+1)/2;
vox = [1 1 4];
off = -vox.*origin;
V.mat = diag([-1 1 1 1])*...
[vox(1) 0 0 off(1) ; 0 vox(2) 0 off(2) ; 0 0 vox(3) off(3) ; 0 0 0 1];
spm_create_vol(V,'noopen');
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
|