From: Emilie S. <emi...@uc...> - 2010-04-11 13:42:54
|
Dear vmtk users, I'd like to convert a file from vtk legacy format to stl format. I tried to use the following command: vmtksurfacewriter -ifile my_input.vtk -ofile surface.stl The input file is a vtk 'unstructured grid'. When I run the above command, I get the following error: Creating vmtkSurfaceWriter instance. Automatic piping vmtksurfacewriter Parsing options vmtksurfacewriter SurfaceInputFileName = my_input.vtk OutputFileName = surface.stl Explicit piping vmtksurfacewriter Input vmtksurfacewriter members: Id = 0 Disabled = 0 Surface = None SurfaceInputFileName = my_input.vtk Format = GuessFormat = 1 CellData = 0 OutputFileName = surface.stl OutputFileName = surface.stl Reading VTK surface file. ERROR: In /home/esauvage/opensource/VTK/IO/vtkPolyDataReader.cxx, line 137 vtkPolyDataReader (0x89a9630): Cannot read dataset type: unstructured_grid Executing vmtksurfacewriter ... Writing STL surface file. ERROR: In /home/esauvage/opensource/VTK/IO/vtkSTLWriter.cxx, line 48 vtkSTLWriter (0x8bd5ba8): No data to write! Done executing vmtksurfacewriter. Output vmtksurfacewriter members: Id = 0 >From the first error message it looks like vmtksurfacewriter calls vtkPolyDataReader. I guess that means that I need to have my input file saved as vtk 'polydata'. Is this right? I also don't know what's the easiest way of converting UNSTRUCTURED_GRID->POLYDATA in vtk. Could someone be so kind and give me a hint? I'm sorry if the answer is obvious. I'm a vmtk beginner and googling didn't help much. Best regards, Emilie Sauvage |