[vtkusers] How to create a surface from a group of unorganized 2-D points?
abhishek
abhishek at meddiff.com
Fri Jul 26 04:22:39 EDT 2013
Hello user,
I want to create a surface from a group of unorganized 2-D points.
As seen in the attached figure, I am able to generate a surface but some
points(in red) are inside the surface.
surface.png <http://vtk.1045678.n5.nabble.com/file/n5722255/surface.png>
How can I create surface such that all points lie on the edge and not
inside?
This is what my code looks like:
// Add the grid points to a polydata object
vtkSmartPointer<vtkPolyData> polydata = vtkSmartPointer<vtkPolyData>::New();
polydata->SetPoints(orgPoints);
// create geometry.
vtkSmartPointer<vtkVertexGlyphFilter> glyphFilter =
vtkSmartPointer<vtkVertexGlyphFilter>::New();
glyphFilter->SetInputConnection(polydata->GetProducerPort());
glyphFilter->Update();
glyphFilter->GetOutput()->Print(cout);
//delunay
// Create the convex hull of the pointcloud
vtkSmartPointer<vtkDelaunay2D> delaunay = vtkSmartPointer< vtkDelaunay2D
>::New();
delaunay->SetInput(glyphFilter->GetOutput());
delaunay->SetTolerance(0.01);
delaunay->Update();
vtkSmartPointer<vtkDataSetSurfaceFilter> surfaceFilter =
vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
surfaceFilter->SetInputConnection(delaunay->GetOutputPort());
surfaceFilter->Update();
--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-create-a-surface-from-a-group-of-unorganized-2-D-points-tp5722255.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list