[Insight-developers] large files on visual studio x64

Luis Ibanez luis.ibanez at kitware.com
Mon Mar 7 18:06:17 EST 2011


Hi Maquette,


This problem has been fixed in ITKv4.

Please see Git commit :   91a21f9

from January 9th 2011.


(There were several large changes made in
previous commits that prepare for this fix).

---

Now,
When you configure ITK with CMake,
make sure that you turn ON the Advanced
option:

             ITK_USE_64BITS_IDS


You should be able to manage files with
sizes up to 2^64 bytes now.



     Thanks


         Luis


----------------------------------------------------------
On Sat, Mar 5, 2011 at 5:41 PM, maquette <maquette at lavabit.com> wrote:
> 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
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>


More information about the Insight-developers mailing list