<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> "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< T ></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>> Date: Fri, 11 Sep 2009 12:27:51 -0400<br>> From: francois.bertel@kitware.com<br>> To: vtkusers@vtk.org<br>> Subject: Re: [vtkusers] vtkPoints array management<br>> <br>> For direct access to the raw pointer of the c array, use<br>> points->GetVoidPointer(0)<br>> <br>> ref:<br>> http://www.vtk.org/doc/nightly/html/classvtkPoints.html#6790380ebdd771dd29a9b69a254fb53e<br>> <br>> On Fri, Sep 11, 2009 at 12:15 PM, Fred Fred <stan1313@hotmail.fr> wrote:<br>> > Ok thank you for the tip but this involves a copy of the points, I would<br>> > have appreciated a way of traversing the list of points while avoiding<br>> > copies.<br>> ><br>> >> Date: Fri, 11 Sep 2009 10:20:36 -0400<br>> >> Subject: Re: [vtkusers] vtkPoints array management<br>> >> From: bill.lorensen@gmail.com<br>> >> To: stan1313@hotmail.fr<br>> >> CC: vtkusers@vtk.org<br>> >><br>> >> Avoid using GetPoint(id). It calls this->GetData->GetTuple(id). The<br>> >> comments for GetTuple say it all...<br>> >> // Description:<br>> >> // Get the data tuple at ith location. Return it as a pointer to an array.<br>> >> // Note: this method is not thread-safe, and the pointer is only valid<br>> >> // as long as another method invocation to a vtk object is not performed.<br>> >> virtual double *GetTuple(vtkIdType i) = 0;<br>> >><br>> >> Use<br>> >> double pts0[3];<br>> >> points->GetPoint(0, pts0);<br>> >><br>> >> double ptsn[3];<br>> >> points->GetPoint(1, ptsn);<br>> >><br>> >> Bill<br>> >><br>> >> On Fri, Sep 11, 2009 at 8:52 AM, Fred Fred <stan1313@hotmail.fr> wrote:<br>> >> > Look at this men:<br>> >> ><br>> >> > vtkPoints *points = vtkPoints::New();<br>> >> > [...some point adding steps...]<br>> >> > int numPts = points->GetNumberOfPoints();<br>> >> > printf("numPts=%d\n", numPts);<br>> >> > double *pts0 = points->GetPoint(0);<br>> >> > double *ptsn = points->GetPoint(1);<br>> >> > printf("%p %p\n", pts0, ptsn);<br>> >> ><br>> >> > which leads:<br>> >> ><br>> >> > numPts=11<br>> >> > 0x19982c40 0x19982c40<br>> >> ><br>> >> > Whatever the possibility I Made some mistake anywhere, I can not<br>> >> > understand<br>> >> > how this is possible!<br>> >> > GetPoint(0) returns the same address as GetPoint(1) while there are 11<br>> >> > points in the array!!!<br>> >> ><br>> >> ><br>> >> > ________________________________<br>> >> > Messenger débarque dans Hotmail ! Essayez-le !<br>> >> > _______________________________________________<br>> >> > Powered by www.kitware.com<br>> >> ><br>> >> > Visit other Kitware open-source projects at<br>> >> > http://www.kitware.com/opensource/opensource.html<br>> >> ><br>> >> > Please keep messages on-topic and check the VTK FAQ at:<br>> >> > http://www.vtk.org/Wiki/VTK_FAQ<br>> >> ><br>> >> > Follow this link to subscribe/unsubscribe:<br>> >> > http://www.vtk.org/mailman/listinfo/vtkusers<br>> >> ><br>> >> ><br>> ><br>> > ________________________________<br>> > Vous cherchez l'intégrale des clips de Michael Jackson ? Bing ! Trouvez !<br>> > _______________________________________________<br>> > Powered by www.kitware.com<br>> ><br>> > Visit other Kitware open-source projects at<br>> > http://www.kitware.com/opensource/opensource.html<br>> ><br>> > Please keep messages on-topic and check the VTK FAQ at:<br>> > http://www.vtk.org/Wiki/VTK_FAQ<br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > http://www.vtk.org/mailman/listinfo/vtkusers<br>> ><br>> ><br>> <br>> <br>> <br>> -- <br>> François Bertel, PhD | Kitware Inc. Suite 204<br>> 1 (518) 371 3971 x113 | 28 Corporate Drive<br>> | Clifton Park NY 12065, USA<br>> _______________________________________________<br>> Powered by www.kitware.com<br>> <br>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>> <br>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>> <br>> Follow this link to subscribe/unsubscribe:<br>> 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>