[ITK] [ITK-users] Output to DICOM: bad_alloc

elena bresciani elena.bresciani87 at gmail.com
Tue May 13 06:26:46 EDT 2014


Dear all,

I need help with a std::bad_alloc error; I wrote a simple program which
takes n input a .mha file and produces as output the same 3D image in .dcm
format.
While everything works well and as expected with relatively small datasets
(half of the desired resolution), at full resolution - 1700 x 960 x 2300 -
my program crashes and I get this error:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

I understand that this is a memory management issue but I have no clue
about its resolution.

Could you help me?

Best regards
Elena

ps: I attached a copy of the script (as I said it's really simple)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140513/949f42f0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WriteToDicom.cxx
Type: text/x-c++src
Size: 1300 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/community/attachments/20140513/949f42f0/attachment.cxx>
-------------- next part --------------
_____________________________________
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.php

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 Community mailing list