[vtkusers] help!!!
liuzhiqiang_cnu
liuzhiqiang_cnu at 163.com
Wed Aug 25 04:41:24 EDT 2004
Hello,vtkusers:
I have many points got with a laser scanner.I want to reconstruct a surface by them.
I did that by using vtkDelaunay3D, but I see that the surface is not smoothing.So I use vtkSmoothPolyDataFilter to smooth it.Indeed, few changes happened and the surface is not smoothing still.
who can tell me the reasons or how to realize that I desired?
Any help are welcomed and thank you very much!!
for(i=0;i<L;i++)
{
points->InsertPoint(i,points_coord[i][0],points_coord[i][1],points_coord[i][2]);
}
vtkPolyData *profile=vtkPolyData::New();
profile->SetPoints(points);
vtkDelaunay3D *delpts = vtkDelaunay3D::New();
delpts->SetInput(profile); //data: my points
delpts->SetTolerance(0.1);
delpts->SetAlpha(0.02);
vtkGeometryFilter *gf=vtkGeometryFilter::New();
gf->SetInput(delpts->GetOutput());
vtkReverseSense *reverse = vtkReverseSense::New();
reverse->SetInput(gf->GetOutput());
reverse->ReverseCellsOn();
reverse->ReverseNormalsOn();
reverse->Update();
vtkDecimatePro *deci=vtkDecimatePro::New();
deci->SetInput(reverse->GetOutput());
deci->SetTargetReduction(0.1);
deci->PreserveTopologyOn();
vtkSmoothPolyDataFilter *mooth=vtkSmoothPolyDataFilter::New();
mooth->SetInput(deci->GetOutput());
//mooth->SetConvergence(0.000001);
mooth->SetNumberOfIterations(100);
vtkPolyDataNormals *normals=vtkPolyDataNormals::New();
normals->SetInput(mooth->GetOutput());
normals->FlipNormalsOn();
vtkPolyDataMapper *cloudMapper = vtkPolyDataMapper::New();
cloudMapper->SetInput(normals->GetOutput());
-------------------------------------------------------------------------------------
周杰伦在"第一现场"与你面对面 http://smspop.163.com/special/jay200408/index2.html
More information about the vtkusers
mailing list