[Insight-users] Image index limits

Oleksandr Dzyubak adzyubak at gmail.com
Wed Jan 13 10:37:25 EST 2010


Hi Robert,

I have substituted the Jan 12, 2010 ITK CVS 
itkAnalyzeImageIO.cxx  version with yours and
recompiled the ITK lib again.

Afterwards I repeated the tests using the Analyze75 format
with 1340x1300x720 (4.7 GB) images.

./JustReadWrite_Atwood_Jan13_2010 cubes.hdr cubes_hdr2hdr.hdr

Well, both cubes are in place with correct intensities. Cool!
Thanks for fixing this bug.

Hopefully it will appear in the CVS version soon.

Regards,

Alex


Robert.Atwood at diamond.ac.uk wrote:
>  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  
>
>
>
>   



More information about the Insight-users mailing list