[Insight-developers] Re: Meta byte swapping problems for doubles
Stephen R. Aylward
aylward@unc.edu
Thu, 08 May 2003 12:31:19 -0400
Thanks for the help - you're right about the 64bit (of course). One of
the major flaws in ITK is that much of it is based on native types
(assumes a char is 8 bits, etc). I will try to fix both at the same time.
Thanks,
Stephen
Lorensen, William E (Research) wrote:
> Steven,
> I have fixed the byte swapping problems in the metaImage lib for 4 byte
> words. However, the 8 byte word is a bit more challenging. I suggest looking
> at the itkByteSwap code and use the same algorithm. I don't think you can
> use the shift/mask technique that is used for the 4 byte word since there is
> not an integer available on all platforms that is 64 bits long.
>
> I'd rather not do the API change myself.
>
> Bill
--
===============================================
Dr. Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://caddlab.rad.unc.edu
aylward@unc.edu
(919) 966-9695