Hi Allison,
Swap byte order is exactly what you want to do. It does not modify your
images, it only modifies the spm_vol structures in your SPM.mat file. If
you display images on your Linux box, then spm_vol will correctly
determine byte order. During analysis, SPM will save this spm_vol
information into SPM.mat and use the saved information when you query
results, extract data etc. Therefore, it will not detect that byte order
needs to be swapped when moving SPM.mat from big- to little-endian or
vice versa.
Volkmar
Am Donnerstag, den 10.01.2008, 15:27 -0500 schrieb Nugent, Allison C.
(NIH/NIMH) [E]:
> Hi - sorry for the delayed response. So, I downloaded the
> volumes toolbox, and it looks like it has a utility that will swap the
> byte order - but that's not what I want to do. The sun-created images
> are interpreted just fine by SPM2 on my linux box - I can display the
> raw images, t-images, and beta images just fine using the "display"
> function or the "check reg" function. The problem is that models that
> were previously estimated on solaris/sun can not be accessed using the
> "results" button. While I suppose one solution would be to re-estimate
> all my old studies, this would be a major pain in the neck. Is there
> perhaps a field in SPM.mat that I could change that would force SPM to
> interpret the images properly, as it does when I use
> spm_check_registration.m?
>
> Thanks for your help!
>
> Allison
>
> Allison Nugent
> MRI Physicist
> SNMAD/MIB/NIMH/NIH
> Office: (301)451-8863
> Mobile: (301)408-8560
> [log in to unmask]
>
>
> -----Original Message-----
> From: Volkmar Glauche [mailto:[log in to unmask]]
> Sent: Wednesday, January 02, 2008 12:38 PM
> To: Nugent, Allison C. (NIH/NIMH) [E]
> Cc: [log in to unmask]
> Subject: Re: [SPM] spm2 - endian problem?
>
> Dear Allen,
>
> this is not a bug, this is a feature... SPM saves a copy of the header
> information for each image in SPM.mat during estimation/contrast
> computation. This includes information about endianness of the image
> data. You will have to change this information. Some code to do this
> in the Volumes toolbox, available from the SPM extensions web page. (I
> wrote the SPM2 code a long time ago, but I think the endianness issue
> is dealt with also in this ancient code.)
>
> Volkmar
>
> Quoting Allison Nugent <[log in to unmask]>:
>
> > Hello,
> >
> > I'm in the process of converting from a solaris machine to a linux
> > machine, and I'm having some trouble with spm2. I have a few old
> analyses
> > that I've completed in spm2 on solaris. When I try to view results
> with my
> > linux machine, I'm given erroneous results, as if the spmT_####.img
> files
> > were being read in the incorrect endian. What's odd is that if I use
> the
> > "display" function, the T images are shown correctly, the problem only
> > appears when I try to use the "results" function. Is this a known bug
> that
> > there might be a patch for?
> >
> > Thanks!
> >
> > Allison
> >
--
Volkmar Glauche
Freiburg Brain Imaging
http://fbi.uniklinik-freiburg.de/
Phone +49(0)761 270-5331
Fax +49(0)761 270-5416
|