[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in 5.3 read_binary template ?



Dear reader,

I came across something, that appears as a bug to me :
When reading in some material of our GE MR scanner, I need to have some
information about the imaging parameters that are set in the proprietary
file format. Using the (very useful) read_binary template I have defined
16- and 32bit ints, longs and floats, big endian. When running the
read_binary function with the template, I receive well defined ints, but
not longs and floats. Running the same program on an IRIX workstation
(IDL 5.4), the results are fine.

The resulting values should be the following
    Property                                  Value     Offset
Sizeof()      IDL 5.3
    Exam number for this image:     1246      0x890     2
1246
    Series Number for this image:   12          0x892
2                12
    Image Number:                        284        0x894
2                284
    Slice Thickness (mm):               8.00       0x8a4
4                2.33e-041
    Image matrix size - X:               512        0x8a8
2                512
    Image matrix size - Y:               512        0x8aa
2                512
    Display field of view - X (mm):  340.00   0x8ac     4
2.42e-041
    Display field of view - Y (if different): 272.00    0x8b0     4
2.42e-041
    Image dimension - X: 256.00                  0x8b4
4                2.41e-041
    Image dimension - Y: 192.00                  0x8b8
4                2.41e-041
    etc...

To me it seems that IDL does not do the endian swapping on the float
data type... Please share your thoughts :-)

M. Vogel