Hi All, <div><br>I want a pointer to point ID&#39;s from an instance of class vtkPoints. At present I simply assume that points are indexed from 0 to N, and this may not be good. Below illustrates what I&#39;m trying to do in general:<div>
<br>    vtkSmartPointer&lt;vtkPoints&gt; points = vtkSmartPointer&lt;vtkPoints&gt;::New();<br>    const float p[4][3] = { {1.0, 2.0, 3.0},<br>                                       {0.5, 1.0, .76},<br>                                       {0.3, 0.1,  .9}, };<br>
    // Create the topology of the point (a vertex)<br>     vtkSmartPointer&lt;vtkCellArray&gt; vertices  = vtkSmartPointer&lt;vtkCellArray&gt;::New();<br>     vtkIdType pid[1];<br>    <br>     for(int i = 0; i &lt; 3; ++i)<br>
     {<br>        pid[0] = points-&gt;InsertNextPoint(p[i]);<br>        vertices-&gt;InsertNextCell(1,pid);   <br>     }<br>    <br>    // Create a polydata object<br>    vtkSmartPointer&lt;vtkPolyData&gt; poly = vtkSmartPointer&lt;vtkPolyData&gt;::New();<br>
    poly-&gt;SetPoints(points);    poly-&gt;SetVerts(vertices);<br>    vtkSmartPointer&lt;vtkPoints&gt; pointss = poly-&gt;GetPoints();<br>    vtkIdType numPts = pointss-&gt;GetNumberOfPoints();<br>    double x[3]={0,0,0};<br>
    for (int i = 0; i&lt; numPts; ++i)<br>    {<br>         pointss-&gt;GetPoint(i, x);  //here is where I want to use a pointer to point ID&#39;s instead of &#39;int i&#39;<br>         std::cout&lt;&lt; &quot;Point: &quot; &lt;&lt; x[0] &lt;&lt; &quot; &quot; &lt;&lt; x[1] &lt;&lt; &quot; &quot;&lt;&lt; x[2] &lt;&lt; &quot;\n&quot;;<br>
    }<br>//end code snippet </div><div><br>Got an idea? </div><div><br>All the best,<br>Arvind</div></div>