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

Blezek, Daniel J (GE, Research) blezek at crd.ge.com
Tue Jul 24 10:16:11 EDT 2007


Hi Hans,
 
  Thanks for the prompt response!  You are right about the size of the
structure.  I just remembered that 64 bit machines may pack structures
differently than 32 bit machines, but my program reports than sizeof (
itk::dsr ) is 348 bytes.  Something strange is afoot at the CircleK.
 
  Don't know if this helps, but here is the hex dump from the correct
file and then incorrect (64-bit) header:
 
00000000: 5c01 0000 5348 4f52 5400 4e00 0000 0000  \...SHORT.N.....
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000020: 0040 0000 0000 7200 0400 0004 0003 0100  . at ....r.........
00000030: 0100 0100 0100 0100 0000 0000 0000 0000  ................
00000040: 0000 0000 0000 0400 1000 0000 0000 0000  ................
00000050: 0000 803f 0000 803f 0000 803f 0000 803f  ...?...?...?...?
00000060: 0000 803f 0000 803f 0000 803f 0000 0000  ...?...?...?....
00000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000080: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000090: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000c0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000f0: 0000 0000 0000 0000 0000 0000 0100 0000  ................
00000100: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000110: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000120: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000130: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000140: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000150: 0000 0000 0000 0000 0000 0000            ............

 
00000000: 5c01 0000 0000 0000 0000 0000 0000 0000  \...............
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000020: 0000 0000 0000 7200 0300 0004 0003 0100  ......r.........
00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000040: 0000 0000 0000 0400 1000 0000 0000 80bf  ................
00000050: 0000 803e 0000 803e 0000 803f 0000 0000  ...>...>...?....
00000060: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000070: 0000 803f 0000 0000 0000 0002 0000 0000  ...?............
00000080: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000090: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000c0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000f0: 0000 0000 0000 0000 0000 0000 0100 0100  ................
00000100: 0000 0080 0000 803f 0000 0000 0000 0080  .......?........
00000110: 0000 0080 0000 0000 0000 80be 0000 0080  ................
00000120: 0000 0000 0000 0080 0000 0080 0000 803e  ...............>
00000130: 0000 0080 0000 0080 0000 0000 0000 0000  ................
00000140: 0000 803f 0000 0000 0000 0000 0000 0000  ...?............
00000150: 0000 0000 0000 0000 6e69 3100 0000 0000  ........ni1.....

 
-dan


________________________________

	From: Hans Johnson [mailto:hans-johnson at uiowa.edu] 
	Sent: Tuesday, July 24, 2007 9:59 AM
	To: Blezek, Daniel J (GE, Research); ITK
	Subject: Re: [Insight-developers] Analyze writer header size
incorrect on 64-bit system
	
	
	Dan,
	
	I will not be able to look at it today, but the header is
defined in Insight/Utilities/itkExtHdrs/itkAnalyzeDbh.h.  It certainly
should be 348 bytes long.  The hdr is a struct that only contains:
	
	int
	char
	short int
	float
	
	types in a structure, and these types should have consistent
length on both 64 and 32 bit machines.
	
	The header is well documented regarding the information that is
supposed to reside at each byte location.
	
	I may be able to look at this on Thursday if it is not resolved
by then.
	
	Hans
	-- 
	Hans J. Johnson, Ph.D.
	Hans-johnson at uiowa.edu
	
	278 GH
	The University of Iowa
	Iowa City, IA 52241
	(319) 353 8587
	
	
	
________________________________

	From: "Blezek, Daniel J (GE, Research)" <blezek at crd.ge.com>
	Date: Tue, 24 Jul 2007 09:50:11 -0400
	To: <insight-developers at itk.org>
	Conversation: Analyze writer header size incorrect on 64-bit
system
	Subject: [Insight-developers] Analyze writer header size
incorrect on 64-bit system
	
	Hi all, 
	
	 I tried to write an Analyze file today on a 64 bit system.  The
header size was 352 bytes, not 348 as it should be.  Would someone
familiar with the code see where it might be writing an 8-byte value
rather than a 4-byte value?
	
	Thanks, 
	-dan 
	
	Daniel Blezek, PhD 
	GE Global Research 
	Computer Scientist 
	
	T 518 387 5481 
	F 518 387 6981 
	D *833-5481 
	E blezek at research.ge.com 
	www.research.ge.com <file://www.research.ge.com> 
	
	1 Research Circle 
	Niskayuna, NY 12309, USA 
	
	General Electric Company 
	
	
________________________________

	_______________________________________________
	Insight-developers mailing list
	Insight-developers at itk.org
	http://www.itk.org/mailman/listinfo/insight-developers
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20070724/5e89a240/attachment.htm


More information about the Insight-developers mailing list