[vtkusers] 'Incorrect' Geometry on Conversion to Polydata
teddy.kord at googlemail.com
Sun May 16 17:22:33 EDT 2010
I converted a vtk StructuredData file to Polydata format. However, when I
load the result in Paraview, all I get is a red cube. Is there a filter I'm
supposed to use to get back my original image geometry?
What I actually want to do is obtain a .ply file from the .vtk file (by
saving the .vtp file as .ply). Is there a better way to do this?
The code I used to convert form vtk to polydata is:
int main(int, char *)
vtkSmartPointer<vtkStructuredPointsReader> reader =
vtkSmartPointer<vtkStructuredPoints> structuredPoints = reader->GetOutput();
vtkSmartPointer<vtkGeometryFilter> geometryFilter =
vtkPolyData* polydata = geometryFilter->GetOutput();
std::cout << "Output has " << polydata->GetNumberOfPoints() << "
vtkSmartPointer<vtkXMLPolyDataWriter> writer =
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers