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\vtkImageImport.cxx, line 438 vtkImageImport (0AB37C18): Calling UpdateDataCallback: d:\pdp-gimias\gimias-source\thirdparty\itk-3.20\insight\code\common\itkImportImageContainer.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
