| With the new version of SPM99 I cant read big-endian *.img files on linux or
| PC.
|
| The same .img files work fine on my UltraSparc10 running solaris-7. The
| same files also opened fine in SPM99b on linux.
|
| Any ideas?
It works for us, at least for 16 bit images. What are the symptoms?
If you do:
V = spm_vol('imagename.img')
then what is returned. V.dim(4) should contain the datatype that SPM
thinks its using. The following should tell you if SPM thinks the
data is byte-swapped:
spm_type(V.dim(4),'swapped')
If it returns 1, then things seem fine so far. If not, then the sizof_hdr
field may contain a value other than 348. SPM recognises if the .hdr files
are byte-swapped by seeing if this field contains a value of 1543569408
(which is 348 byte-swapped).
If SPM99 is recognising the files as byte-swapped, then check which routines
are having problems. You can check a couple of them by:
plane = 20; % Plane number
[x,y] = ndgrid(1:V.dim(1),1:V.dim(2));
z = ones(size(x))*plane;
M = spm_matrix([0 0 20]);
img1 = spm_sample_vol(V,x,y,z,1);
img2 = spm_slice_vol(V,M,V.dim(1:2),1);
imagesc([img1' img2']); axis image xy
If the functions spm_sample_vol and spm_slice_vol are both working,
then you should see two images side by side. If not, then they have
problems.
All the best,
-John
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|