No subject


Wed Oct 7 22:37:18 EDT 2009


that your image is of pixel type "short" or
any other  type that uses two bytes per pixel.

Regardless of the changes that we could make
in IO, you won't be able to load such image
in a single piece in a 32-bits system.

You are therefore restricted to using streaming.


This would be considered a bug, if the size of
the image gets to be reported in a way that
prevents the streaming mechanism to work.

Could you try the streaming tests with this
image ?

Insight/Testing/Code/IO
     itkImageFileReaderStreamingTest2.cxx
     itkImageFileReaderStreamingTest.cxx
     itkImageFileWriterStreamingPastingCompressingTest1.cxx
     itkImageFileWriterStreamingTest1.cxx
     itkImageFileWriterStreamingTest2.cxx
     itkMetaImageStreamingIOTest.cxx
     itkMetaImageStreamingWriterIOTest.cxx

and please let us know what you find,


     Thanks


           Luis


-----------------------------------------------------
On Mon, Jan 18, 2010 at 11:58 AM, Julien Michel <julien.michel at c-s.fr> wrot=
e:
> Dear ITK users,
>
> ImageIOBase and ImageFileReader use std::streamoff (via the SizeType
> typedef) to manipulate the size of the image in bytes.
>
> On my linux, std::streamoff is defined as long long, which seems well
> enough. But on my Visual Studio (32 bits) std::streamoff is defined as lo=
ng,
> and it happens that I have an image (actually quite huge: 45519 x 27365) =
for
> which long is not enough. As a matter of consequences, the
> GetImageSizeInBytes() in ImageIOBase returns -1 803 712 426, instead of 2
> 491 254 870, which outpasses the long signed range (max value: 2 147 489
> 647).
>
> The memory allocation next line does not seem to appreciate being given a
> negative size ...
>
> So my question is : is there anything to do appart from changing the
> SizeType typedef to something wider ? Does it sounds like a bug to you ?
>
> Best regards,
>
> Julien
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Julien MICHEL - Ing=E9nieur d'=E9tudes - Traitement d'images
> CS Syst=E8mes d'Information - Division ESPACE
> D=E9partement Information G=E9ographique & Image
> T=E9l=E9phone : +33 561 17 64 27
> Email : julien.michel at c-s.fr
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> _____________________________________
> 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://www.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-users
>


More information about the Insight-users mailing list