Hi,<br><br>Check this<br><br><a target=\"_blank\" href="http://www.vtk.org/doc/nightly/html/classvtkPoints.html#ab7f990c73fb291737abe4203994ce2a2">http://www.vtk.org/doc/nightly/html/classvtkPoints.html#ab7f990c73fb291737abe4203994ce2a2</a><br><br>So i think that the id falls out of range and it cannot allocate memory..<br><br>Further explaination on how the memory is allocated can be explained by senior people here...<br><br>Thanks<br><br>Regards<br>Rakesh Patil<br><blockquote><br>---------- Original message ----------<br>From:Bill Chivas< noo134@googlemail.com ><br>Date: 12 Mar 10 16:54:35<br>Subject: Re: [vtkusers] vtkPoints + InsertPoint<br>To: Rakesh Patil <rakeshthp@in.com><br><br><div>Maybe it has to do with the vtkPoints and how the memory is allocated?</div>
<div>I also tried the SetNumberOfPoints(2147483647), but i get runtime error.<br><br></div>
<div class="gmail_quote">2010/3/12 Bill Chivas <span dir="ltr"><<a target=\"_blank\" target="\"_blank\"" href="mailto:noo134@googlemail.com">noo134@googlemail.com</a>></span><br>
<font color="#000000"></font><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;" class="gmail_quote">
<div><font color="#000000">The range of integers (signed) is 2147483647 which is much bigger than my numbers (e.g. 60983688).</font></div>
<div><font color="#000000">That's why i can't understand the error...<br><br></font></div>
<div class="gmail_quote"><font color="#000000">2010/3/12 Rakesh Patil <span dir="ltr"><<a target=\"_blank\" href="mailto:rakeshthp@in.com" target="\"_blank\"">rakeshthp@in.com</a>></span>
</font><div>
<div></div>
<div class="h5"><font color="#000000"><br>
<font color="#000000"></font></font><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;" class="gmail_quote"><font color="#000000"><font color="#000000"><br>Hi,<br><br>According to me, InsertPoint()'s first parameter is of type vtkIdType which is in turn typedef of integer..<br>
<br>Being an integer variable, of 4 bytes, it has a limit of range... See this<br><br><a target=\"_blank\" href="http://msdn.microsoft.com/en-us/library/s3f49ktz%28VS.80%29.aspx" target="\"_blank\"">http://msdn.microsoft.com/en-us/library/s3f49ktz%28VS.80%29.aspx</a><br>
<br>Thus, i guess, it goes out of the range and it produces this error.. As you said, for small numbers it works fine, That should be the cause..<br><br>Thanks<br><br>Regards<br><font color="#888888">Rakesh Patil</font>
</font></font><div>
<div></div>
<div><font color="#000000"><font color="#000000"><br>
<font color="#000000"></font></font></font><blockquote><font color="#000000"><font color="#000000"><font color="#000000"><br>---------- Original message ----------<br>From:Bill Chivas< <a target=\"_blank\" href="mailto:noo134@googlemail.com" target="\"_blank\"">noo134@googlemail.com</a> ><br>Date: 12 Mar 10 15:53:19<br>Subject: [vtkusers] vtkPoints + InsertPoint<br>
To: <a target=\"_blank\" href="mailto:vtkusers@vtk.org" target="\"_blank\"">vtkusers@vtk.org</a><br><br>
</font></font></font><div><font color="#000000"><font color="#000000"><font color="#000000">Hi all,</font></font></font></div>
<div></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">i use </font></font></font></div>
<div></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">vtkPoints *points = vtkPoints::New();</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">points->InsertPoint(60983688, x, y, z);</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">points->InsertPoint(60984688, x, y, z);</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">points->InsertPoint(60985688, x, y, z);</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">points->InsertPoint(60986688, x, y, z);</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">and so on (10 points)</font></font></font></div>
<div></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">and i get the error: "ERROR: In c:\vtk\common\vtkDataArrayTemplate.txx, line 358<br>vtkFloatArray (03A17E38): Unable to allocate 366022158 elements of size 4 bytes."</font></font></font></div>
<div></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">I think it has to do with the fact i set as id a big number (NOT out of range, though).</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">When i set small numbers as ids, i get no errors.</font></font></font></div>
<div></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">Can anyone help?</font></font></font></div>
<div></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">Thanks,</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">Bill</font></font></font></div><font color="#000000"><font color="#000000"><font color="#000000"></font></font></font></blockquote></div></div><font color="#000000"><font color="#000000"></font></font></blockquote></div></div></div><font color="#000000"><br></font></blockquote></div><br>
</rakeshthp@in.com></blockquote>