Hi,<br>Try calling Update() on the vtkExtractPolyDataGeometry before gettings its output.<br><br>Regards,<br>Shash<br><br><div class="gmail_quote">On Mon, Jun 15, 2009 at 9:01 PM, diego martinez <span dir="ltr"><<a href="mailto:damartinez80@gmail.com">damartinez80@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> 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->InsertPoint(n,x,y,z);</div><div><div><span style="white-space: pre;">        </span>int iNo = this->pvtkPoints->GetNumberOfPoints();</div><div><span style="white-space: pre;">        </span>for (int i=0; i<iNo; i++) {</div>
<div><span style="white-space: pre;">        </span></div><div><span style="white-space: pre;">        </span>this->pvtkCellArray->InsertNextCell(1,&i);</div><div><span style="white-space: pre;">                        </span></div>
<div><span style="white-space: pre;">        </span>}</div><div><span style="white-space: pre;">        </span>this->pvtkPolyData->SetPoints(this->pvtkPoints);</div><div><span style="white-space: pre;">        </span>this->pvtkPolyData->SetPolys(this->pvtkCellArray);</div>
<div><span style="white-space: pre;">        </span>this->pvtkPolyData->GetPointData()->SetScalars(this->intensities1);</div><div> this->pvtkPolyDataMapper->SetInput(this->pvtkPolyData);</div>
<div><div><span style="white-space: pre;">        </span>this->pvtkActor->SetMapper(this->pvtkPolyDataMapper);</div><div><span style="white-space: pre;">        </span>this->pvtkActor->GetProperty()->SetRepresentationToPoints();</div>
<div><span style="white-space: pre;">        </span>this->Props->AddItem( this->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->pvtkEPDG->SetInput(this->pvtkPolyData);</div><div><span style="white-space: pre;">        </span>this->pvtkEPDG->SetImplicitFunction(this->pvtkPlanes_hull);</div>
<div><span style="white-space: pre;">        </span>this->pvtkEPDG->SetExtractInside(1);</div><div><span style="white-space: pre;">        </span>this->pvtkEPDG->Update();</div><div>
<span style="white-space: pre;">        </span>this->pvtkPolyData= this->pvtkEPDG->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<iNo; i++)</div><div><span style="white-space: pre;">                </span>{</div><div><span style="white-space: pre;">                        </span>this->pvtkPolyData->GetPoint(i,x);</div>
<div><span style="white-space: pre;">                        </span></div><div><span style="white-space: pre;">                        </span>fileHandle<<x[0]<<" "<<x[1]<<" "<<x[2]<<endl;</div>
<div><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" target="_blank">dmartinez@unomaha.edu</a><br><a href="mailto:damartinez80@gmail.com" target="_blank">damartinez80@gmail.com</a>(personal)<br>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>