[vtkusers] Converting a Structured Points File to an Unstructured Points/Grid File
teddy.kord at yahoo.co.uk
Fri May 7 14:16:12 EDT 2010
I have a file with a dataset of structured points. I'd like to convert this to a dataset of unstructured points and/or unstructured grid. How can I do this?
So far, this is what I have:
//get all data from the file
vtkSmartPointer< vtkStructuredPointsReader> reader = vtkSmartPointer< vtkStructuredPointsReader>:: New();
vtkStructuredPoints* structuredPoints = reader->GetOutput();
//get the number of points the file contains
vtkIdType numPoints = structuredPoints-> GetNumberOfPoints();
std::cout << "There are " << numPoints << " points." << std::endl;
vtkSmartPointer< vtkUnstructuredGrid> unstructuredGrid = vtkSmartPointer< vtkUnstructuredGrid>::New();
It's incomplete and I'm not sure how to proceed.
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers