<div>Thank you for your replies.</div>
<div> </div>
<div>To everyone:</div>
<div>I did some tests and i think there is a bug.</div>
<div>Let&#39;s say i have the following:</div>
<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-&gt;InsertPoint(609836, x, y, z);</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">points-&gt;InsertPoint(609837, x, y, z);</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">points-&gt;InsertPoint(609839, x, y, z);</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">points-&gt;InsertPoint(609838, x, y, z);</font></font></font></div>
<div> </div>
<div>The points-&gt;GetNumberOfPoints() gives 609840.</div>
<div>So it supposes that the ids are starting from 0 and it returns (the max_id of all points plus 1) ?</div>
<div> </div><br><br></div>
<div class="gmail_quote">2010/3/12 Rakesh Patil <span dir="ltr">&lt;<a href="mailto:rakeshthp@in.com">rakeshthp@in.com</a>&gt;</span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi,<br><br>Check this<br><br><a href="http://www.vtk.org/doc/nightly/html/classvtkPoints.html#ab7f990c73fb291737abe4203994ce2a2" target="_blank">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><font color="#888888">Rakesh Patil<br>
</font>
<blockquote>
<div class="im"><br>---------- Original message ----------<br>From:Bill Chivas&lt; <a href="mailto:noo134@googlemail.com" target="_blank">noo134@googlemail.com</a> &gt;<br></div>
<div>
<div></div>
<div class="h5">Date: 12 Mar 10 16:54:35<br>Subject: Re: [vtkusers] vtkPoints + InsertPoint<br>To: Rakesh Patil <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">&lt;<a href="mailto:noo134@googlemail.com" target="_blank">noo134@googlemail.com</a>&gt;</span><br><font color="#000000"></font>
<blockquote style="BORDER-LEFT: rgb(204,204,204) 1px solid; 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&#39;s why i can&#39;t understand the error...<br><br></font></div>
<div class="gmail_quote"><font color="#000000">2010/3/12 Rakesh Patil <span dir="ltr">&lt;<a href="mailto:rakeshthp@in.com" target="_blank">rakeshthp@in.com</a>&gt;</span> </font>
<div>
<div></div>
<div><font color="#000000"><br><font color="#000000"></font></font>
<blockquote style="BORDER-LEFT: rgb(204,204,204) 1px solid; 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()&#39;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 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&lt; <a href="mailto:noo134@googlemail.com" target="_blank">noo134@googlemail.com</a> &gt;<br>
Date: 12 Mar 10 15:53:19<br>Subject: [vtkusers] vtkPoints + InsertPoint<br>To: <a 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-&gt;InsertPoint(60983688, x, y, z);</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">points-&gt;InsertPoint(60984688, x, y, z);</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">points-&gt;InsertPoint(60985688, x, y, z);</font></font></font></div>
<div><font color="#000000"><font color="#000000"><font color="#000000">points-&gt;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: &quot;ERROR: In c:\vtk\common\vtkDataArrayTemplate.txx, line 358<br>vtkFloatArray (03A17E38): Unable to allocate 366022158 elements of size 4 bytes.&quot;</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></div></div></blockquote></blockquote></div><br>