<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hello,</DIV>
<DIV><BR>The problem is not in my program.</DIV>
<DIV><BR>The Program crash only with large dataset ( for example 512*512 *1000) </DIV>
<DIV>&nbsp;</DIV>
<DIV>I would like to catch this exception (explained previously)</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you<BR><BR>--- En date de&nbsp;: <B>Ven 8.10.10, Jothy <I>&lt;jothybasu@gmail.com&gt;</I></B> a écrit&nbsp;:<BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>De: Jothy &lt;jothybasu@gmail.com&gt;<BR>Objet: Re: [vtkusers] [VTK 5.6.1] Unable to allocate ....<BR>À: "Fireman Fireman" &lt;vtkusersneedhelp@yahoo.fr&gt;<BR>Cc: "vtk vtk" &lt;vtkusers@vtk.org&gt;<BR>Date: Vendredi 8 octobre 2010, 11h34<BR><BR>
<DIV id=yiv1141943772>
<DIV dir=ltr>Could you post the entire function?<BR><BR>Jothy<BR><BR>
<DIV class=yiv1141943772gmail_quote>On Fri, Oct 8, 2010 at 12:19 PM, Fireman Fireman <SPAN dir=ltr>&lt;<A href="http://fr.mc248.mail.yahoo.com/mc/compose?to=vtkusersneedhelp@yahoo.fr" rel=nofollow target=_blank ymailto="mailto:vtkusersneedhelp@yahoo.fr">vtkusersneedhelp@yahoo.fr</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class=yiv1141943772gmail_quote>
<TABLE border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>Hi, <BR><BR>I'm using the last VTK 5.6.1. <BR><BR>I'm using a vtkDICOMImageReader to read DICOm images. I have got this error <BR><BR>\vtk\common\vtkDataArrayTemplate.txx, line 140 <BR>vtkShortArray (0931BF08): Unable to allocate 129499136 elements of size 2 <BR>bytes. <BR><BR>What's the problem? </DIV>
<DIV>&nbsp;</DIV>
<DIV>How can I catch this exception to&nbsp; avoid the crash of my program&nbsp;<SPAN style="COLOR: rgb(0,0,0)" title="">&nbsp;</SPAN></DIV>
<DIV><SPAN style="COLOR: rgb(0,0,0)" title=""></SPAN>&nbsp;</DIV>
<DIV><SPAN style="COLOR: rgb(0,0,0)" title="">I tried to do this but I could not&nbsp;cath &nbsp;the exception :<BR><FONT size=2></FONT></SPAN></DIV>
<DIV><SPAN style="COLOR: rgb(0,0,0)" title=""><FONT size=2>//-----------------------------------------------</FONT></SPAN></DIV>
<DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp; try</FONT></FONT></DIV><FONT size=2>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dicomReader-&gt;Update();</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</DIV>
<DIV></DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch</FONT></FONT><FONT size=2> (vtkstd::bad_alloc) 
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //<SPAN style="COLOR: rgb(0,0,0)" title="">It doesn't pass through here</SPAN></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</DIV>
<DIV></DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch</FONT></FONT><FONT size=2> (...) 
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//<SPAN style="COLOR: rgb(0,0,0)" title="">It doesn't pass through here</SPAN></DIV></FONT><FONT size=2>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>//---------------------------------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you in davance </DIV></FONT></TD></TR></TBODY></TABLE><BR><BR>_______________________________________________<BR>Powered by <A href="http://www.kitware.com/" rel=nofollow target=_blank>www.kitware.com</A><BR><BR>Visit other Kitware open-source projects at <A href="http://www.kitware.com/opensource/opensource.html" rel=nofollow target=_blank>http://www.kitware.com/opensource/opensource.html</A><BR><BR>Please keep messages on-topic and check the VTK FAQ at: <A href="http://www.vtk.org/Wiki/VTK_FAQ" rel=nofollow target=_blank>http://www.vtk.org/Wiki/VTK_FAQ</A><BR><BR>Follow this link to subscribe/unsubscribe:<BR><A href="http://www.vtk.org/mailman/listinfo/vtkusers" rel=nofollow target=_blank>http://www.vtk.org/mailman/listinfo/vtkusers</A><BR><BR></BLOCKQUOTE></DIV><BR><BR clear=all><BR>-- <BR>
<DIV dir=ltr>Research Scholar<BR>Dept. of Medical Physics<BR>Clatterbridge Centre for Oncology<BR>UK<BR></DIV><BR></DIV></DIV></BLOCKQUOTE></td></tr></table><br>