Dear all,<br><br>I am trying to do something very simple - I would like to display a structured mesh on the screen.<br>I have used the following code <br><br>vtkPoints *points = vtkPoints::New();<br> points->Allocate(dims[0]*dims[1]*dims[2]);<br>
for(i=0; i<dims[0]; i++){<br> for(j=0; j<dims[1]; j++){<br> for(k=0; k<dims[2]; k++){<br> test[0]=i; test[1]=j; test[2]=k;<br> points->InsertPoint(index,test);<br> index++;<br> }<br> }<br>
}<br> // Create the structured grid.<br> vtkStructuredGrid *sgrid = vtkStructuredGrid::New();<br> sgrid->SetDimensions(dims);<br> sgrid->SetPoints(points);<br> sgrid->Update();<br> vtkStructuredGridGeometryFilter *plane = vtkStructuredGridGeometryFilter::New();<br>
plane->SetInput(sgrid);<br> vtkPolyDataMapper *sgridMapper = vtkPolyDataMapper::New();<br> sgridMapper->SetInputConnection(plane->GetOutputPort());<br><br>This displays the points, not the lines to display the mesh - if i use the vtkOutLineFilter, then I can<br>
display the outline, but not all lines inside the object. Can some one please let me know what I need<br>to do display the mesh on the screen rather than just the points?<br><br>Thanks,<br>Rakesh<br>