[vtkusers] Question about vtkPolyData::GetNumberOfPoints()

ysa0829 ysa0829 at gmail.com
Fri Nov 25 03:21:33 EST 2011


I use a filter that Inherit vtkPolyDataAlgorithm,then I try to get the
output's number of points ,but It would be zero. It my example code:

/vtkCylinderSource *implantCylinderSource = vtkCylinderSource::New();

        implantCylinderSource->SetCenter(0,0,0);
	implantCylinderSource->SetRadius(2);
	implantCylinderSource->SetHeight(10);
	implantCylinderSource->SetResolution(36);
	implantCylinderSource->CappingOn();
	implantCylinderSource->Update();


vtkTriangleFilter * tri2 = vtkTriangleFilter::New();
tri2 ->SetInput(implantCylinderSource ->GetOutput());

int numberOfPoints = tri2->GetOutput()->GetNumberOfPoints();
/

I can see the result in my renderer,but the numberOfPoints is Zero. 

Is anyway to get numberofpoints ? ,or Get the Polydata's Points that I can
modify.

Thanks and regards,
Anne.


--
View this message in context: http://vtk.1045678.n5.nabble.com/Question-about-vtkPolyData-GetNumberOfPoints-tp5022177p5022177.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list