[Insight-developers] So... What platforms DON'T have stdint? (WAS
discussion of 64bit niftilib lossage)
Blezek, Daniel J (GE, Research)
blezek at crd.ge.com
Tue Jul 24 14:30:33 EDT 2007
Hi Kent,
kent williams wrote:
>
> Is it really the case that structure alignment is so undependable
> that it's necessary to read and write headers a field at a time?
This is a resounding yes. This assumption cost me 2 days worth of work
in April. Java has a nice class that memory maps a file and allows you
to read a short, char, float, etc at any byte offset. Makes reading
headers a snap with no extra IO overhead.
http://java.sun.com/javase/6/docs/api/java/nio/ByteBuffer.html
-dan
More information about the Insight-developers
mailing list