Or - check the SPM extensions page, there is a solution for this problem
(and many others as well) in the Volumes toolbox.
On Thu, 6 Apr 2006, Glenn Stebbins wrote:
> Hi Katia,
> We use the following to get around a similar problem:
> Around line 20 of spm_get_data.m, just after
>
> try
> v = cat(2,V{:});
> end
>
> add the following:
>
> else
> V2 = spm_vol(V(1).fname);
> if spm_type(V2.dim(4), 'swapped') ~ = spm_type(V(1).dim(4), 'swapped')
> V = spm_update_vol(V);
> end
>
>
> The above snippet refers to spm_update_vol.m which you can create as follows:
>
> function [V] = spm_update_vol(V)
> % changes the swap info to fix byte ordering problem
> % Yuanyuan Jia 11/05
>
> V2 = spm_vol(V(1).fname);
>
> if spm_type(V2.dim(4), 'swapped') ~=spm_type(V91).dim(4), 'swapped')
> [V.dim] = deal(V2.dim);
> end
>
> Hope this helps. We have found it to be useful when we transfer data from
> Linux to Mac OSX.
> -Skip
>
>
> On Apr 6, 2006, at 6:21 PM, Katia DAUCHOT wrote:
>
> > Hello,
> >
> > can anybody please help with the following problem:
> >
> > I've generated SPM2 data (pre-processing, model generation and
> > estimation, contrasts etc) using
> > SPM2 under Matlab6.5, PC Linux. Everything worked out fine.
> >
> > Then I transferred the result directories to my PowerBook G4 (osX, Tiger)
> > on which I installed
> > Matlab7.1 and the recent SPM2 with the updates.
> >
> > All the transferred *img files look OK, i.e. I can look at them using the
> > "display" function, and both
> > the header and the intensity values are identical on either platform ( PC
> > or Mac).
> >
> > However, when I compute "results" (hit "results", select a contrast, and
> > go through the whole
> > procedure of choosing a threshold, the extent etc), the outcome is
> > correct on the PC but wrong on
> > the Mac. The resulting file shows numerous disperesed separate voxels,
> > among the majority
> > "empty" ones (see the attached file).
> > The whole thing looks much like a format problem (typically appeared
> > years ago, when we passed
> > from Solaris Unix to PC and vice-versa: e.g. reading double float files
> > as if they were simple float,
> > or the big/little endian error). However, as I said, with "display" all
> > files look OK and identical on
> > either platform.
> >
> > Here's some additional information on all this:
> >
> > 1. SPM doesn't show any error msg when this happens.
> > 2. Voxels in the volupme don't seem to have any value attributed (when
> > clicked upon, no value
> > appears).
> > 2. The problem is the same, whatever SPM.mat file, contrast or threshold
> > chosen, within my set of
> > data.
> > 3. It is not specific to one particular Mac or PC machine. The data being
> > transferred to a different
> > PC, with SPM2 running under Matlab6.5, the problem disappeared. The data
> > transferred to a
> > different Mac (recent GM running SPM2 under Matlab7.1) the same pb
> > re-appeared.
> > 4. As I said, all the *img files look identical and present no visible
> > pbs, on either platform (Mac, PC
> > Windows or PC Linux).
> >
> > As we used SPM2 in all cases (we even tried to homogenize the versions,
> > between the platforms as
> > well as using the latest updates), we suspected that the pb be related to
> > the Matlab-version. I tried
> > then to re-install Matlab6.5 on my Mac. However this requires XDarwin.
> > And XDarwin seems to be
> > poorly compatible with Mac osX Tiger.
> > Trying to install it we couldn't make it work, nor any version of Matlab
> > with it.( At the end, had to
> > re-install X11 and Matlab7.1 from scratch.) And there seemed to be a
> > conflict between the
> > different X servers (X11 and XDarwin). I hear other people had problems
> > installing XDarwin under
> > Tiger, too.
> >
> > We're running out of ideas...
> >
> > Can someone please help?
> >
> > Thanks so much in advance
> >
> > Katia Dauchot
> >
> >
> Glenn T. Stebbins, Ph.D.
> Associate Professor of Neurological Sciences
> Tel: 312-563-3854
> Fax: 312-563-4009
> email: [log in to unmask]
>
>
>
--
Volkmar Glauche
-
Department of Neurology [log in to unmask]
Universitaetsklinikum Freiburg Phone 49(0)761-270-5331
Breisacher Str. 64 Fax 49(0)761-270-5416
79106 Freiburg
|