vtkUnstructuredGridToPolyDataFilter is an abstract class without a concrete implementation, so you can&#39;t actually use it in a program.  Try vtkGeometryFilter.<div><br></div><div>- Wes<br><br><div class="gmail_quote">On Fri, Apr 1, 2011 at 10:22 AM, nuno.jf <span dir="ltr">&lt;<a href="mailto:nunofernandes7@gmail.com">nunofernandes7@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi David,<br>
(For now) I am using Paraview to delete the points that I don&#39;t want. After<br>
removing all these points, I save the file using Paraview as a legacy vtk<br>
file. As output I get an Unstructured Grid vtk file.<br>
I successfuly tested the example you had suggested me<br>
(<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx#Surface_reconstruction" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx#Surface_reconstruction</a>) reading a<br>
structured VTK file, by changing some lines in the code.<br>
The problem is that I want to use this code to read an unstructured grid vtk<br>
file, so I added/changed the following in order to convert from unstructured<br>
grid to polydata:<br>
<br>
#include<br>
#include<br>
#include<br>
<br>
// read unstructured grid<br>
   vtkUnstructuredGridReader *reader = vtkUnstructuredGridReader::New();<br>
   reader-&gt;SetFileName(argv[1]);<br>
   reader-&gt;Update();<br>
// create object<br>
   vtkUnstructuredGrid * unstructured= vtkUnstructuredGrid::New();<br>
   unstructured = reader -&gt;GetOutput();<br>
   unstructured -&gt;Update();<br>
<br>
//convert to polydata<br>
   vtkUnstructuredGridToPolyDataFilter *teste =<br>
vtkUnstructuredGridToPolyDataFilter::New();<br>
   teste-&gt;SetInput(unstructured);<br>
   teste-&gt;Update();<br>
<br>
Then, I get the following error:<br>
<br>
 &quot;error C2440: &#39;initializing&#39; : cannot convert from &#39;vtkAlgorithm *&#39; to<br>
&#39;vtkUnstructuredGridToPolyDataFilter *&#39; &quot;<br>
<br>
What am I doing wrong here?<br>
Any help would be greatly appreciated.<br>
Best regards<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/How-to-bring-an-object-to-the-coordinate-s-origin-tp4243261p4275614.html" target="_blank">http://vtk.1045678.n5.nabble.com/How-to-bring-an-object-to-the-coordinate-s-origin-tp4243261p4275614.html</a><br>


</font><div><div></div><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>Technical Leader<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4920<br>
</div>