[Insight-developers] Analyze writer header size incorrect on 64-bit system

kent williams norman-k-williams at uiowa.edu
Tue Jul 24 11:42:07 EDT 2007


Actually, the Œbug¹ is that the NIfTI library knows that it can write
Analyze 7.5 files if it¹s asked to. The CanWriteFile just calls
nifti_is_complete_filename, which is prefectly happy with the Œ.hdr¹ file
extension.


I¹m attaching a little program I ground out that should tell you if
structure alignment or data type size are causing the problem.

It dumps out the relevant offsets and sizes of all the header fields, both
for the Analyze and NIfTI headers.

If I run the following on OSX:

g++ -o analyseHeaderLayout analyseHeaderLayout.cxx
g++ -m64 -o analyseHeaderLayout64 analyseHeaderLayout.cxx
./analyseHeaderLayout > 32Bit_Output
./analyseHeaderLayout64 > 64Bit_Output
diff 32Bit_Output 64Bit_Output

I get these results:

5c5
<     sizeof(long) = 4
---
>     sizeof(long) = 8

Which is what you want to see ‹ the only difference between compiling 32 and
64 bit is the size of a long.



On 7/24/07 10:03 AM, "Hans Johnson" <hans-johnson at uiowa.edu> wrote:

> Dan,
> 
> AH HA!  The ni1 at the end of the 64bit header indicates that the 64 bit
> version is being written by the nifti library!  This could be a bug in the
> ³CanWrite² function of the nifti filter.
> 
> Hans


-------------- next part --------------
A non-text attachment was scrubbed...
Name: analyseHeaderLayout.cxx
Type: application/octet-stream
Size: 9230 bytes
Desc: not available
Url : http://www.itk.org/mailman/private/insight-developers/attachments/20070724/6c4d1eac/analyseHeaderLayout.obj


More information about the Insight-developers mailing list