[vtkusers] How to bring an object to the coordinate's origin
nuno.jf
nunofernandes7 at gmail.com
Fri Apr 1 10:52:49 EDT 2011
Thank you very much Wes!
I used vtkGeometryFilter and it worked. But now I have other problem (lol).
vtkUnstructuredGridReader *reader = vtkUnstructuredGridReader::New();
reader->SetFileName(argv[1]);
reader->Update();
vtkUnstructuredGrid * unstructured= vtkUnstructuredGrid::New();
unstructured = reader ->GetOutput();
unstructured ->Update();
//converter para polydata
vtkGeometryFilter *teste = vtkGeometryFilter::New();
teste->SetInput(unstructured);
teste->Update();
vtkPolyData * polydata= vtkPolyData::New();
polydata = teste->GetOutput ();
// Construct the surface and create isosurface.
vtkSmartPointer surf =
vtkSmartPointer::New();
surf->SetInput(polydata);
The problem is that when I run the problem I get the following error:
ERROR: In ..\..\src\IO\vtkUnstructuredGridReader.cxx, line 143
vtkUnstructuredGridReader (02C3ED90): Cannot read dataset type: polydata
ERROR: In ..\..\src\Imaging\vtkSurfaceReconstructionFilter.cxx, line 173
vtkSurfaceReconstructionFilter (02A78168): No points to reconstruct
I think vtkSurfaceReconstructionFilter is not reading any points from the
polydata. The problem is that if I make :
polydata -> SetPoints(teste->GetOutput());
I get the following compilation error:
cannot convert parameter 1 from 'vtkPolyData *' to 'vtkPoints *'
Nuno
--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-bring-an-object-to-the-coordinate-s-origin-tp4243261p4275696.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list