[vtkusers] 'Incorrect' Geometry on Conversion to Polydata
bill.lorensen at gmail.com
Sun May 16 17:26:31 EDT 2010
If you run GeometryFilter on Structured Points you will only get the
\ply is a polygon format. AFAIK is cannot represent the solid elements
that exist within Structured Points.
Maybe you can share your final goal.
On Sun, May 16, 2010 at 5:22 PM, Ted Kord <teddy.kord at googlemail.com> wrote:
> 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 =
> //create Structuredpoints
> vtkSmartPointer<vtkStructuredPoints> structuredPoints = reader->GetOutput();
> vtkSmartPointer<vtkGeometryFilter> geometryFilter =
> vtkPolyData* polydata = geometryFilter->GetOutput();
> std::cout << "Output has " << polydata->GetNumberOfPoints() << " points." <<
> vtkSmartPointer<vtkXMLPolyDataWriter> writer =
> return EXIT_SUCCESS;
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the VTK FAQ at:
> Follow this link to subscribe/unsubscribe:
More information about the vtkusers