[vtkusers] How to use vtkDelaunay2D and visualize it?
Bo Shi
chinaren.vtk at gmail.com
Mon May 8 08:54:52 EDT 2006
Dear all,
Recently I want to triangulate the unorganized points and visualize
it, the source code is as follows:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
for (int n=0;n<numOfPoints;n++)
{
libraryFile.Read(p,24);
m_ppoints->InsertPoint(n,p[0],p[1],p[2]);
m_pPtsId[n] = n;
}
m_libraryPolydata->SetPoints(m_ppoints);
m_cellArray->InsertNextCell(numOfPoints, m_pPtsId);
m_libraryPolydata->SetVerts(m_cellArray);
m_pDelaunay2D->SetInput(m_libraryPolydata);
m_pEdges->SetInput(m_pDelaunay2D->GetOutput());
m_pTubeFilter->SetInput(m_pEdges->GetOutput());
m_pTubeFilter->SetRadius(0.0050);
libraryMapper->SetInput(m_pTubeFilter->GetOutput());
this->libraryActor->SetMapper(libraryMapper);
libraryActor->GetProperty()->SetColor(1.0,0.0,0.0);
this->ren->AddActor(this->libraryActor);
////////////////////////////////////////////////////////////////////////////////////////////////////////////
but when I compiled and executed the program I only found the black
screen,in other words, I didn't get the triangulated mesh.
who can tell me why? And give me some detailed source code about how to
use the vtkDelaunay2D. Thanks a lot!
BHS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060508/0a62422f/attachment.htm>
More information about the vtkusers
mailing list