<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
I already use it but now I wonder if it is safe since in vtkAbstractData doc, it is described as:<br>&nbsp; "Implemented in <a class="el" href="file:///usr/local/doc/vtk-5.2/html/a00105.html#fc53f54f8b3f4bda2fa459f235a79fd7">vtkBitArray</a>, <a class="el" href="file:///usr/local/doc/vtk-5.2/html/a00273.html#66d0793dc0eea4b8026e281d5d532a16">vtkDataArrayTemplate&lt; T &gt;</a>, <a class="el" href="file:///usr/local/doc/vtk-5.2/html/a01306.html#98b9ab7ed328aa82f84c93960450d8ea">vtkStringArray</a>, and <a class="el" href="file:///usr/local/doc/vtk-5.2/html/a01480.html#062e1e5dc1902fb5fccca207bd023f1e">vtkVariantArray</a>."<br>Does i means that for vtkDoubleArray for instance, it may not be implemented and thus not more reliable than vtkPoints::GetPoint()?<br><br>&gt; Date: Fri, 11 Sep 2009 12:27:51 -0400<br>&gt; From: francois.bertel@kitware.com<br>&gt; To: vtkusers@vtk.org<br>&gt; Subject: Re: [vtkusers] vtkPoints array management<br>&gt; <br>&gt; For direct access to the raw pointer of the c array, use<br>&gt; points-&gt;GetVoidPointer(0)<br>&gt; <br>&gt; ref:<br>&gt; http://www.vtk.org/doc/nightly/html/classvtkPoints.html#6790380ebdd771dd29a9b69a254fb53e<br>&gt; <br>&gt; On Fri, Sep 11, 2009 at 12:15 PM, Fred Fred &lt;stan1313@hotmail.fr&gt; wrote:<br>&gt; &gt; Ok thank you for the tip but this involves a copy of the points, I would<br>&gt; &gt; have appreciated a way of traversing the list of points while avoiding<br>&gt; &gt; copies.<br>&gt; &gt;<br>&gt; &gt;&gt; Date: Fri, 11 Sep 2009 10:20:36 -0400<br>&gt; &gt;&gt; Subject: Re: [vtkusers] vtkPoints array management<br>&gt; &gt;&gt; From: bill.lorensen@gmail.com<br>&gt; &gt;&gt; To: stan1313@hotmail.fr<br>&gt; &gt;&gt; CC: vtkusers@vtk.org<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Avoid using GetPoint(id). It calls this-&gt;GetData-&gt;GetTuple(id). The<br>&gt; &gt;&gt; comments for GetTuple say it all...<br>&gt; &gt;&gt; // Description:<br>&gt; &gt;&gt; // Get the data tuple at ith location. Return it as a pointer to an array.<br>&gt; &gt;&gt; // Note: this method is not thread-safe, and the pointer is only valid<br>&gt; &gt;&gt; // as long as another method invocation to a vtk object is not performed.<br>&gt; &gt;&gt; virtual double *GetTuple(vtkIdType i) = 0;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Use<br>&gt; &gt;&gt; double pts0[3];<br>&gt; &gt;&gt; points-&gt;GetPoint(0, pts0);<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; double ptsn[3];<br>&gt; &gt;&gt; points-&gt;GetPoint(1, ptsn);<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Bill<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; On Fri, Sep 11, 2009 at 8:52 AM, Fred Fred &lt;stan1313@hotmail.fr&gt; wrote:<br>&gt; &gt;&gt; &gt; Look at this men:<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; &nbsp; vtkPoints *points = vtkPoints::New();<br>&gt; &gt;&gt; &gt; &nbsp; [...some point adding steps...]<br>&gt; &gt;&gt; &gt; &nbsp; int numPts = points-&gt;GetNumberOfPoints();<br>&gt; &gt;&gt; &gt; &nbsp; printf("numPts=%d\n", numPts);<br>&gt; &gt;&gt; &gt; &nbsp; double *pts0 = points-&gt;GetPoint(0);<br>&gt; &gt;&gt; &gt; &nbsp; double *ptsn = points-&gt;GetPoint(1);<br>&gt; &gt;&gt; &gt; &nbsp; printf("%p %p\n", pts0, ptsn);<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; which leads:<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; numPts=11<br>&gt; &gt;&gt; &gt; 0x19982c40 0x19982c40<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Whatever the possibility I Made some mistake anywhere, I can not<br>&gt; &gt;&gt; &gt; understand<br>&gt; &gt;&gt; &gt; how this is possible!<br>&gt; &gt;&gt; &gt; GetPoint(0) returns the same address as GetPoint(1) while there are 11<br>&gt; &gt;&gt; &gt; points in the array!!!<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; ________________________________<br>&gt; &gt;&gt; &gt; Messenger débarque dans Hotmail ! Essayez-le !<br>&gt; &gt;&gt; &gt; _______________________________________________<br>&gt; &gt;&gt; &gt; Powered by www.kitware.com<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Visit other Kitware open-source projects at<br>&gt; &gt;&gt; &gt; http://www.kitware.com/opensource/opensource.html<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>&gt; &gt;&gt; &gt; http://www.vtk.org/Wiki/VTK_FAQ<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>&gt; &gt;&gt; &gt; http://www.vtk.org/mailman/listinfo/vtkusers<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt; Vous cherchez l'intégrale des clips de Michael Jackson ? Bing ! Trouvez !<br>&gt; &gt; _______________________________________________<br>&gt; &gt; Powered by www.kitware.com<br>&gt; &gt;<br>&gt; &gt; Visit other Kitware open-source projects at<br>&gt; &gt; http://www.kitware.com/opensource/opensource.html<br>&gt; &gt;<br>&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>&gt; &gt; http://www.vtk.org/Wiki/VTK_FAQ<br>&gt; &gt;<br>&gt; &gt; Follow this link to subscribe/unsubscribe:<br>&gt; &gt; http://www.vtk.org/mailman/listinfo/vtkusers<br>&gt; &gt;<br>&gt; &gt;<br>&gt; <br>&gt; <br>&gt; <br>&gt; -- <br>&gt; François Bertel, PhD  | Kitware Inc. Suite 204<br>&gt; 1 (518) 371 3971 x113 | 28 Corporate Drive<br>&gt;                       | Clifton Park NY 12065, USA<br>&gt; _______________________________________________<br>&gt; Powered by www.kitware.com<br>&gt; <br>&gt; Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>&gt; <br>&gt; Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>&gt; <br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; http://www.vtk.org/mailman/listinfo/vtkusers<br><br /><hr />Gratuit : Hotmail plus rapide avec Internet Explorer 8 !  <a href='http://www.microsoft.com/france/windows/products/winfamily/ie/ie8/msn/default.aspx' target='_new'>Cliquez ici !</a></body>
</html>