[vtkusers] Problem with conversion from VRML into VTK file

RimAY rim.ayari at gmail.com
Tue Nov 24 04:59:07 EST 2009


Dear All , 

I try to convert a vrml file into vtk file, my problem is that i got only a
part of the image in the vtk format.
this is the code i used:

target = vtkVRMLImporter()
target.SetFileName("WRL path")
target.Read()

actors = vtkActorCollection() 
actors = target.GetRenderer().GetActors()
actors.InitTraversal()

pDataset = actors.GetNextActor().GetMapper().GetInput()

geometryFilter = vtkGeometryFilter()
geometryFilter.SetInput(pDataset)

filter1 = vtkImageDataGeometryFilter()
filter1.SetInput(pDataset)
 
data = vtkPolyData()
data = geometryFilter.GetOutput()
data.Update()


writer = vtkXMLPolyDataWriter()
writer.SetFileName("vtk path")
writer.SetInput(data)
writer.Write()

print "fichier crée"

Any help will be very appreciated

Best Regards
-- 
View this message in context: http://old.nabble.com/Problem-with-conversion-from-VRML-into-VTK-file-tp26493224p26493224.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list