[vtkusers] Question regarding vtkGeometryFilter
kiatchaib
kiatchaib at yahoo.ca
Tue Jun 9 16:08:48 EDT 2009
Hi,
I’m very new to VTK and having problem using vtkGeometryFilter. I have a set
of unorganized point cloud that I want to generate surface mesh. I searched
in vtkusers forum and found this thread that resembles my situation.
http://www.vtk.org/pipermail/vtkusers/2008-October/097629.html
So, I wrote the code following the solution in the thread (first generate
tetrahedral mesh using vtkDelaunay3D and then use vtkGeometryFilter to
extract only the surface).
My code:
vtkDelaunay3D* tetraMesh = vtkDelaunay3D::New();
vtkGeometryFilter* surfaceMesh = vtkGeometryFilter::New();
vtkPolyData* pcPolyData = vtkPolyData::New();
…
tetraMesh->SetInput(pcPolyData);// Find tetrahedral mesh
tetraMesh->SetTolerance(0.001);
tetraMesh->Update();
surfaceMesh->SetInput(tetraMesh->GetOutput());// Pass only surface mesh
surfaceMesh->Update();
…
But I got this error 'void vtkPolyDataAlgorithm::SetInput(vtkDataObject *)'
: cannot convert parameter 1 from 'vtkUnstructuredGrid *' to 'vtkDataObject
*' when complied the code. If I understand correctly, ‘vtkGeometryFilter’
accepts 'vtkUnstructuredGrid' and the output is ‘vtkPolyData’ type. Can
anyone give me an advice, what could be the cause of this error? I use VTK
5.4.0 and Microsoft Visual Studio .NET 2003. Thank you in advance for your
help.
Kiatchai
--
View this message in context: http://www.nabble.com/Question-regarding-vtkGeometryFilter-tp23948740p23948740.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list