<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.5897" name=GENERATOR></HEAD>
<BODY
style="WORD-WRAP: break-word; webkit-nbsp-mode: space; webkit-line-break: after-white-space">
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=985361015-13012010>Hi Brad:<BR>Yes, I have done so. </SPAN></FONT></DIV>
<DIV><SPAN class=985361015-13012010></SPAN> </DIV>
<DIV><SPAN class=985361015-13012010>It's now bug # </SPAN>0010135</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=985361015-13012010><FONT face=Arial color=#0000ff
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=985361015-13012010></SPAN> </DIV>
<DIV><SPAN class=985361015-13012010><FONT face=Arial color=#0000ff
size=2>Robert</FONT></SPAN></DIV>
<DIV><SPAN class=985361015-13012010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><BR> </DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Bradley Lowekamp
[mailto:blowekamp@mail.nih.gov] <BR><B>Sent:</B> 13 January 2010
14:55<BR><B>To:</B> Atwood, Robert (DLSLtd,RAL,DIA)<BR><B>Cc:</B>
adzyubak@gmail.com; insight-users@itk.org;
luis.ibanez@kitware.com<BR><B>Subject:</B> Re: [Insight-users] Image index
limits<BR></FONT><BR></DIV>
<DIV></DIV>Nice work in tracking this down! I have done some similar 1GB reading
chunks in MetaImageIO as well due the Apple OSX not being able to read more then
2GB with one call.
<DIV><BR></DIV>
<DIV>It looks like there may be some more subtle problems with large file in the
ImageIO. There looks like there are some usages of type long, which is like
incorrect, and there number of pixel is type int in some places too. A close
review of the file with these issues in mind is needed.</DIV>
<DIV><BR></DIV>
<DIV>
<DIV>Can you please log it into the bug tracker. Follow the instruction in the
"Entering a bug" in the following document:</DIV>
<DIV><BR></DIV>
<DIV><A
href="http://www.itk.org/Wiki/ITK_Procedure_for_Contributing_Bug_Fixes">http://www.itk.org/Wiki/ITK_Procedure_for_Contributing_Bug_Fixes</A></DIV>
<DIV><BR></DIV>
<DIV>Thanks,</DIV>
<DIV>Brad</DIV></DIV>
<DIV>
<DIV><BR>
<DIV>
<DIV>On Jan 13, 2010, at 8:23 AM, <A
href="mailto:Robert.Atwood@diamond.ac.uk">Robert.Atwood@diamond.ac.uk</A>
wrote:</DIV><BR class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<DIV>Hi Alex et. al:<BR>I developed a fix for the problem in
itkAnalyzeImageIO.cxx , it seems to<BR>work for me both with compressed and
uncompressed .img files<BR><BR><BR>I'm not sure if it strictly satisfies code
style requirements for itk<BR>but if anyone could help it satisfy these then
perhaps it could be<BR>implemented? <BR><BR>The fixes:<BR>1. Test the return
value of gzread to ensure correct data amount is read<BR>and no other error
has occurred. Throws exception if the return value is<BR>0 or -1.<BR><BR>2.
Only read a chunk of size < (2^32 - 2 ) at a time (defined by a macro<BR>..
) . Loop through the chunks if the file is bigger than this.<BR><BR>I've
tested this with small (10Mb) chunk size on compressed .img.gz
and<BR>uncompressed .img files of the 5Gb output (uncompressed) from
Alex's<BR>ImageFill_Cube and the results appear correct. <BR><BR>I hope this
helps!<BR><BR>Robert <BR><BR><BR><BR>-- <BR><BR>This e-mail and any
attachments may contain confidential, copyright and or privileged material,
and are for the use of the intended addressee only. If you are not the
intended addressee or an authorised recipient of the addressee please notify
us of receipt by returning the e-mail and do not use, copy, retain, distribute
or disclose the information in or attached to the e-mail.<BR><BR>Any opinions
expressed within this e-mail are those of the individual and not necessarily
of Diamond Light Source Ltd. <BR><BR>Diamond Light Source Ltd. cannot
guarantee that this e-mail or any attachments are free from viruses and we
cannot accept liability for any damage which you may sustain as a result of
software viruses which may be transmitted in or with the
message.<BR><BR>Diamond Light Source Limited (company no. 4375679). Registered
in England and Wales with its registered office at Diamond House, Harwell
Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United
Kingdom<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><SPAN><itkAnalyzeImageIO.cxx></SPAN><SPAN><ATT00001..txt></SPAN></DIV></BLOCKQUOTE></DIV><BR>
<DIV><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; border-spacing: 0px 0px; khtml-text-decorations-in-effect: none; apple-text-size-adjust: auto; orphans: 2; widows: 2"><SPAN
class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; border-spacing: 0px 0px; khtml-text-decorations-in-effect: none; apple-text-size-adjust: auto; orphans: 2; widows: 2">
<P style="MARGIN: 0px"><FONT style="FONT: 12px Helvetica" face=Helvetica
size=3>========================================================</FONT></P>
<P style="MARGIN: 0px"><FONT style="FONT: 12px Helvetica" face=Helvetica
size=3>Bradley Lowekamp<SPAN class=Apple-converted-space> </SPAN><SPAN
class=Apple-converted-space> </SPAN></FONT></P>
<P style="MARGIN: 0px"><FONT class=Apple-style-span face=Arial><SPAN
class=Apple-style-span style="FONT-FAMILY: Arial"><SPAN class=Apple-style-span
style="FONT-FAMILY: Arial">Lockheed Martin </SPAN></SPAN></FONT><FONT
style="FONT: 12px Helvetica" face=Helvetica size=3>Contractor for</FONT></P>
<P style="MARGIN: 0px"><FONT style="FONT: 12px Helvetica" face=Helvetica
size=3>Office of High Performance Computing and Communications</FONT></P>
<P style="MARGIN: 0px"><FONT style="FONT: 12px Helvetica" face=Helvetica
size=3>National Library of Medicine<SPAN
class=Apple-converted-space> </SPAN></FONT></P>
<P style="MARGIN: 0px"><FONT style="FONT: 12px Helvetica" face=Helvetica
size=3><A
href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</A></FONT></P><BR
class=Apple-interchange-newline></SPAN></SPAN></DIV><BR></DIV></DIV></BODY>
<br><P align=justify> </P>
<P align=justify>-- </P>
<P align=justify>This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.<BR>Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. <BR>Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.<BR>Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom<BR> </P>
<br></HTML>