[vtkusers] vtkPoints + InsertPoint
Rakesh Patil
rakeshthp at in.com
Fri Mar 12 07:32:36 EST 2010
Hi,Check thishttp://www.vtk.org/doc/nightly/html/classvtkPoints.html#ab7f990c73fb291737abe4203994ce2a2So i think that the id falls out of range and it cannot allocate memory..Further explaination on how the memory is allocated can be explained by senior people here...ThanksRegardsRakesh Patil Original message From:Bill Chivas< noo134 at googlemail.com >Date: 12 Mar 10 16:54:35Subject:Re: [vtkusers] vtkPoints + InsertPointTo: Rakesh Patil Maybe it has to do with the vtkPoints and how the memory is allocated? I also tried the SetNumberOfPoints(2147483647), but i get runtime error. 2010/3/12 Bill Chivas The range of integers (signed) is 2147483647 which is much bigger than my numbers (e.g. 60983688). That's why i can't understand the error... 2010/3/12 Rakesh PatilHi,According to me, InsertPoint()'s first parameter is of type vtkIdType which is in turn typedef of integer.. Being an integer variable, of 4 bytes, it has a limit of range... See thishttp://msdn.microsoft.com/enus/libr
ary/s3f49ktz%28VS.80%29.aspx 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..ThanksRegardsRakesh Patil Original message From:Bill Chivas< noo134 at googlemail.com >Date: 12 Mar 10 15:53:19Subject: [vtkusers] vtkPoints + InsertPoint To: vtkusers at vtk.org Hi all,i use vtkPoints *points = vtkPoints::New(); points>InsertPoint(60983688, x, y, z); points>InsertPoint(60984688, x, y, z); points>InsertPoint(60985688, x, y, z); points>InsertPoint(60986688, x, y, z); and so on (10 points)and i get the error: "ERROR: In c:\vtk\common\vtkDataArrayTemplate.txx, line 358vtkFloatArray (03A17E38): Unable to allocate 366022158 elements of size 4 bytes."I think it has to do with the fact i set as id a big number (NOT out of range, though). When i set small numbers as ids, i get no errors.Can anyone help?Thanks, Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100312/a7ba8011/attachment.htm>
More information about the vtkusers
mailing list