<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> </DIV>
<DIV>I would like to catch this exception (explained previously)</DIV>
<DIV> </DIV>
<DIV>Thank you<BR><BR>--- En date de : <B>Ven 8.10.10, Jothy <I><jothybasu@gmail.com></I></B> a écrit :<BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>De: Jothy <jothybasu@gmail.com><BR>Objet: Re: [vtkusers] [VTK 5.6.1] Unable to allocate ....<BR>À: "Fireman Fireman" <vtkusersneedhelp@yahoo.fr><BR>Cc: "vtk vtk" <vtkusers@vtk.org><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><<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>></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> </DIV>
<DIV>How can I catch this exception to avoid the crash of my program <SPAN style="COLOR: rgb(0,0,0)" title=""> </SPAN></DIV>
<DIV><SPAN style="COLOR: rgb(0,0,0)" title=""></SPAN> </DIV>
<DIV><SPAN style="COLOR: rgb(0,0,0)" title="">I tried to do this but I could not cath 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> try</FONT></FONT></DIV><FONT size=2>
<DIV> {</DIV>
<DIV> dicomReader->Update();</DIV>
<DIV> }</DIV>
<DIV></DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2> catch</FONT></FONT><FONT size=2> (vtkstd::bad_alloc)
<DIV> {</DIV>
<DIV> //<SPAN style="COLOR: rgb(0,0,0)" title="">It doesn't pass through here</SPAN></DIV>
<DIV> }</DIV>
<DIV></DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2> catch</FONT></FONT><FONT size=2> (...)
<DIV> {</DIV>
<DIV> //<SPAN style="COLOR: rgb(0,0,0)" title="">It doesn't pass through here</SPAN></DIV></FONT><FONT size=2>
<DIV> }</DIV>
<DIV>//---------------------------------------------------------</DIV>
<DIV> </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>