Hi SPMers,
because of this and other incompatibilities between MATLAB versions, I
would strongly recommend to use MATLAB 6.5.1 or MATLAB 7.1 for SPM5. Any
older and newer versions are untested and may exhibit random failures.
Volkmar
On Wed, 28 Feb 2007, Romain Valabregue wrote:
> Hello
>
> I get a bug in the subfunction decode_csa2 when converting siemens dicom
> files. This bug did not appear on windows neither on linux with previous
> matlab version (7.01 ) .
>
> After running it whith dbstep I realize that the problem comes from the use
> of fread with the 'char' type. for instance line 442, the line :
> t(i).name = fread(fp,64,'char')';
> lead to a jump in the file of 66 bits instead of 64 (as if there were two
> unreadable bits).
>
> I isolate the part of the file that lead to this misreading and send a bug
> repport to matlab.
>
> they redirect me to this other bug repport :
> http://www.mathworks.com/support/solutions/data/1-2782ZU.html?solution=1-2782ZU
>
> To resume: the implementation of fread function for the type 'char' changes
> so that it now reads character (in the native encoding) and before it was
> read as a byte.
> (So this bug may not appears for english people as they have a different
> character encoding (I use french) )
>
> So the advice of matlab was to use fread('UINT8') instead of 'CHAR' when
> reading for bits.
>
> Indeed if I change in the decode_csa2 the 'char' by 'uint8' the conversion
> was then ok.
>
> So for more stability of spm there should be a reread of the code to change
> call to fread('char') by fread('uint8') when this is used for reading bytes.
>
>
> Chears
>
> Romain
>
>
--
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 http://fbi.uniklinik-freiburg.de/
|