Dear VtkUsers,<div><br></div><div>I have a set of unstructured points (Point Cloud). I use a vtkPoint to save each point, and then I create a vtkCellArray. and Then I use a vtkPolydata as it can be seen of the following part of my code.</div>
<div><br></div><div>        pvtkPoints-&gt;InsertPoint(n,x,y,z);</div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>int iNo = this-&gt;pvtkPoints-&gt;GetNumberOfPoints();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for (int i=0; i&lt;iNo; i++) {</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;pvtkCellArray-&gt;InsertNextCell(1,&amp;i);</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;pvtkPolyData-&gt;SetPoints(this-&gt;pvtkPoints);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;pvtkPolyData-&gt;SetPolys(this-&gt;pvtkCellArray);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;pvtkPolyData-&gt;GetPointData()-&gt;SetScalars(this-&gt;intensities1);</div><div>        this-&gt;pvtkPolyDataMapper-&gt;SetInput(this-&gt;pvtkPolyData);</div>
<div><div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;pvtkActor-&gt;SetMapper(this-&gt;pvtkPolyDataMapper);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;pvtkActor-&gt;GetProperty()-&gt;SetRepresentationToPoints();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;Props-&gt;AddItem( this-&gt;pvtkActor);</div></div><div><br></div><div>This works fine when I create a mapper and actor and added to the render. I extract some planes with vtkExtractPolyDataGeometry(vtkEPDG)</div>
<div><br></div><div><div>        this-&gt;pvtkEPDG-&gt;SetInput(this-&gt;pvtkPolyData);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;pvtkEPDG-&gt;SetImplicitFunction(this-&gt;pvtkPlanes_hull);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;pvtkEPDG-&gt;SetExtractInside(1);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;pvtkEPDG-&gt;Update();</div><div>
<span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;pvtkPolyData= this-&gt;pvtkEPDG-&gt;GetOutput();</div></div><div><br></div><div>This works fine too, but when I want to extract the results and put this into a plain txt files, it wont do it. I would basically used the old vtkPolydata set of points</div>
<div><br></div><div><div>        for (int i=0; i&lt;iNo; i++)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>this-&gt;pvtkPolyData-&gt;GetPoint(i,x);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>fileHandle&lt;&lt;x[0]&lt;&lt;&quot; &quot;&lt;&lt;x[1]&lt;&lt;&quot; &quot;&lt;&lt;x[2]&lt;&lt;endl;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>}</div></div><div> </div><div><br></div><div>Does anyone know what would be the solution to this simple problem. I would really appreciate any suggestion.</div>
<div><br></div><div>thanks</div><div><br></div><br>-- <br>Diego Martinez<br>University of Nebraska at Lincoln<br>1110 S. 67st, PKI 108<br>Omaha, NE 68182<br>+1 - 402 - 575- 8881(Cell)<br>+1 - 402 - 554 - 3537(Lab)<br>+1 - 402 - 238 - 1908(SkypePC)<br>
<br><br><br><a href="mailto:dmartinez@unomaha.edu">dmartinez@unomaha.edu</a><br><a href="mailto:damartinez80@gmail.com">damartinez80@gmail.com</a>(personal)<br>
</div>