[Insight-users] Image index limits

Robert.Atwood at diamond.ac.uk Robert.Atwood at diamond.ac.uk
Wed Jan 13 08:23:29 EST 2010


 Hi Alex et. al:
I developed a fix for the problem in itkAnalyzeImageIO.cxx , it seems to
work for me both with compressed and uncompressed .img files


I'm not sure if it strictly satisfies code style requirements for itk
but if anyone could help it satisfy these then perhaps it could be
implemented? 

The fixes:
1. Test the return value of gzread to ensure correct data amount is read
and no other error has occurred. Throws exception if the return value is
0 or -1.

2. Only read a chunk of size < (2^32 - 2 ) at a time (defined by a macro
.. ) . Loop through the chunks if the file is bigger than this.

I've tested this with small (10Mb) chunk size on compressed .img.gz and
uncompressed .img files of the 5Gb output (uncompressed) from Alex's
ImageFill_Cube and the results appear correct. 

I hope this helps!

Robert  



-- 

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.

Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 

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.

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

 







-------------- next part --------------
A non-text attachment was scrubbed...
Name: itkAnalyzeImageIO.cxx
Type: application/octet-stream
Size: 58700 bytes
Desc: itkAnalyzeImageIO.cxx
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100113/cf5f75ac/attachment-0001.obj>


More information about the Insight-users mailing list