[vtkusers] How to visualize thousands of polylines in the same render window

Dawei Wu daweiwu at usc.edu
Fri Apr 21 00:15:20 EDT 2006


Hi All,

I can visualize a single polyline with the below codes.
my question is how can I visualize thousands of polylines in the same render window. 
Do I need to use vtkUnstructuredGrid instead of vtkPolyLine? How?
Your help will be highly appreciated!
regards,
David

------------------------------------------------------------------------------------------------------------
vtkPoints *polyLinePoints=vtkPoints::New();

  polyLinePoints->SetNumberOfPoints(image_size);

  for(int point=0; point<image_size; point++)
  {
     polyLinePoints->InsertPoint(point, data[point][0], data[point][1], data[point][2]);
  }


vtkPolyLine *polyLine=vtkPolyLine::New();
  polyLine->GetPointIds()->SetNumberOfIds(image_size);

  for (int point2=0; point2<image_size; point2++)
  { 
     polyLine->GetPointIds()->SetId(point2,point2);
  }




More information about the vtkusers mailing list