[Insight-users] 2GB VTK IO limit

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Oct 9 18:31:06 EDT 2008


On Thu, Oct 9, 2008 at 10:08 PM, Bradley Lowekamp
<blowekamp at mail.nih.gov> wrote:
> Hello,
> I am using gcc 4.0.1 on my intel mac. I can't seem to read or write large
> VTK files, that is files that are greater then 2GB. Is anyone out there
> doing this?
> It appears that iostreams, read and write methods fail with the size > 2GB.
> I am curious if this is a library problem with OSX or gcc.

Looking at the code I would think this is coming from piece such as:

itkVTKImageIO.cxx:
...
ByteSwapper<short>::SwapRangeFromSystemToBigEndian((short *)buffer,
static_cast<unsigned long>(this->GetImageSizeInComponents()) );
...

What is the size of an 'unsigned long' on macosx +gcc ? Anyway if VTK
support larger file, this piece of code (and other cast) should be
fixed.

-- 
Mathieu


More information about the Insight-users mailing list