[Insight-developers] large files on visual studio x64

maquette maquette at lavabit.com
Sat Mar 5 17:41:36 EST 2011


To the ITK 4 developers!

If I understand right you work on the problems wich show when processing 
large images > 4GiB onVS 20XX platform in 64 bit mode.
And the solution should be ready for ITK 4. right?
I finally got a branch of ITK 3.20 to work with those amounts in RAM ...
(see 
https://composight.svn.sourceforge.net/svnroot/composight/3rd/ITK/modified/InsightToolkit-3.20.0-1.0/ 
)

.. but now the next problem shows up:
e.g. large MetaIO Images and probably other Image types can not be 
written because STL seekp() is broken in
  VS2008 and VS2010 (offsets are cast to long which makes it impossible 
to write large FILES > 4GiB), see

http://connect.microsoft.com/VisualStudio/feedback/details/627639/std-fstream-use-32-bit-int-as-pos-type-even-on-x64-platform

that bug is very old, and still sold to the VS users

http://connect.microsoft.com/VisualStudio/feedback/details/286731/basic-filebuf-seekoff-impossible-to-seek-in-files-larger-than-2-gb
(MS STL does not use _fseeki64() internally )

So I checked in the ITK4 GIT  today, if you already found a workaround, 
but in
Utilities/metaImage.cxx
MetaImage::M_WriteElementsROI()
_fstream->seekp( seekoff, METAIO_STREAM::ios::beg )
is still used. I just wanted to point this out, as I did not find any 
complaits yet about broken MS STL filestreams on this list :)

greets, Benjamin



More information about the Insight-developers mailing list