> I'm doing VBM with SPM5 but I would like to reproduce the results with
> SPM99. However, the normalisation doesn't work with SPM99 since I
> initially set the origins with SPM5 and when SPM99 reads the images the
> origins are completely wrong
Hi Susana,
I can't run spm99 on my machine, so can't be sure of this, but I think
what you need to do is save the mat field from the volume information
(in the NIfTI headers in SPM5), in a .mat file for SPM2/99 to read.
So using SPM5, something like:
files = spm_select(inf, 'image');
for f = 1:size(files, 1);
file = deblank(files(f, :));
V = spm_vol(file);
mat = V.mat;
[pth fnm ext] = spm_fileparts(file);
matfile = fullfile(pth, [fnm '.mat']);
save(matfile, 'mat');
end
should do the trick... (restart Matlab and add SPM99 to the path
instead, after doing this with SPM5 in the path).
Best,
Ged.
P.S. Note that your SPM5 NIfTI images must be in .hdr/.img pairs,
rather than .nii single files; you can convert a bunch with something
like this (in SPM5 obviously):
files = spm_select(inf, 'image');
for f = 1:size(files, 1);
file = deblank(files(f, :));
V = spm_vol(file);
img = spm_read_vols(V);
[pth fnm ext] = spm_fileparts(file);
V.fname = fullfile(pth, [fnm '.img']);
spm_write_vol(V, img);
end
|