Hi Lucas,

        We also had memory allocation problems using big data files. The
error you get is caused because in Windows 32 bits, you have a limitation on
the memory that can be allocated for an application. If Gimias has allocated
500 Mb, you should be able to allocate another image of 300 Mb because the
limit is around 2Gb. However, sometimes, when testing the memory limitation
on my machine, It was not clear to me where was the limit. 

        There's a way to increase this limit up to 3 Gb (or similar)
following the steps you can find in this web page:
https://sourceforge.net/apps/mediawiki/gimias/index.php?title=HowToBuildGimi
as_1_3_0_InWindows_Step_3. You can also find further information on the
page.

Best regards,
Xavi

-----Original Message-----
From: Lucas Klaus Beyer [mailto:[email protected]] 
Sent: miƩrcoles, 06 de abril de 2011 15:54
To: [email protected]
Subject: [Gimias-developers] Out of memory - how to solve?

Hello,

I am using the DICOM plugin to load data into Gimias which I want to process
using a custom plugin which calls ITK algorithms. Thus, I declare my input
data in the following way:

typedef itk::Image<float,3> ImageType;

This works fine for very small (useless) datasets of dimensions like
512x512x30 (30 slices.) When I want to use a bigger, more realistic dataset
like 512x512x300, someone throws an std::bad_alloc exception. VTKOutput
window shows:

ERROR: In
..\..\..\..\..\pdp-gimias\gimias-source\thirdParty\VTK-5.6.1\VTK\Imaging\vtk
ImageImport.cxx, line 438 vtkImageImport (0AB37C18): Calling
UpdateDataCallback:
d:\pdp-gimias\gimias-source\thirdparty\itk-3.20\insight\code\common\itkImpor
tImageContainer.txx:188:
Failed to allocate memory for image.

So the error happens when gimias converts its internal representation to the
ITK image type I defined above. (I also checked that by debugging) For
512*512*300 float Data, this should only become 300 MB of data and in case
the internal representation in Gimias uses shorts it should hold 150MB of
data. The Windows Task Manager tells me Gimias.exe uses about 500 MB memory,
my total memory usage is about 1.5 GB while I have 2 GB of RAM.

I tried running it in Release mode and even from outside of the IDE, it
still gets a bad_alloc. Do you have any other suggestions? Am I doing
something wrong?

I figured that in the worst case I could also run through the data
slice-by-slice or in chunks. Declaring the input data as

typedef itk::Image<float,2> ImageType;

obviously only ever gives me the first slice. So, is this possible? If yes,
how would I go about that?

----------------------------------------------------------------------------
--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming smartphone on the nation's
most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers


------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers

Reply via email to