[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://www.itk.org/pipermail/insight-users/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://www.itk.org/pipermail/insight-users/attachments/20140513/949f42f0/attachment.cxx>


More information about the Insight-users mailing list