Hi,
I have a three dimensional array of doubles in MATLAB that I'm trying
to write to Analyze format (both the .img and the .hdr).
I've been able to do this with UINT8 3D arrays with something like this:
spm_defaults;
Info.mat = [-XSpacing 0 0 0; 0 YSpacing 0 0; 0 0 ZSpacing 0; 0 0 0 1]
Info.fname = [outputPath fileName];
Info.dim = [XDim,YDim,ZDim,2];
Info.type = 2; % http://www.fil.ion.ucl.ac.uk/spm/software/spm99/#AzeFmt
spm_write_vol(Info,Volume)
However, no matter how I change Info.type, the output is still in
UINT8! (I've tried changing the 2 to 64). How might I go about
solving this problem?
Thanks!
Julian
|