Hi, I would like to display the ID numbers of my bodies. They are saved as a Point Data as follows from vtkUnstructuredGridWriter. Is there a way to display the IDs as texts using Paraview? I've been trying out different Filters for hours but am unsuccessful.
vtkSmartPointer<vtkFloatArray> spheresId = vtkSmartPointer<vtkFloatArray>::New(); spheresId->SetNumberOfComponents(1); spheresId->SetName("id"); vtkSmartPointer<vtkUnstructuredGrid> spheresUg = vtkSmartPointer<vtkUnstructuredGrid>::New(); FOR EVERY BODY: spheresUg->SetPoints(spheresPos); spheresUg->SetCells(VTK_VERTEX, spheresCells); spheresId->InsertNextValue(b->getId()); spheresUg->GetPointData()->AddArray(spheresId); END FOR vtkSmartPointer<vtkXMLUnstructuredGridWriter> writer = vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New(); string fn=fileName+"spheres."+lexical_cast<string>(scene->iter)+".vtu"; writer->SetFileName(fn.c_str()); writer->SetInput(spheresUg); writer->Write(); Yours faithfully, Boon _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview