37 #include "vtkObjectFactory.h"
38 #include "vtkCellArray.h"
39 #include "vtkPolyData.h"
62 vtkSmartPointer< vtkPolyData >
68 std::stringstream str(iString);
79 points->SetNumberOfPoints(N);
83 for ( vtkIdType i = 0; i < N; i++ )
85 str >> pt[0] >> pt[1] >> pt[2];
86 points->SetPoint(i, pt);
88 oContour->SetPoints(points);
91 vtkIdType * ids =
new vtkIdType[N + 1];
93 for ( vtkIdType i = 0; i < N; i++ )
99 cells->InsertNextCell(N + 1, ids);
100 oContour->SetLines(cells);