<div dir="ltr"><div><div><div><div><div><div><div>Dear all, <br><br></div>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. <br>
</div>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:<br><br>terminate called after throwing an instance of 'std::bad_alloc'<br>
  what():  std::bad_alloc<br>Aborted (core dumped)<br><br></div>I understand that this is a memory management issue but I have no clue about its resolution. <br><br></div>Could you help me?<br><br></div>Best regards<br></div>
Elena<br><br></div>ps: I attached a copy of the script (as I said it's really simple)<br></div>