<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi all vtk users,</DIV>
<DIV>I have a VRML file and i want to convert it into VTK files. I found a code but i have some problems with it :</DIV>
<DIV> </DIV>
<DIV>vtkVRMLImporter *imp1 = vtkVRMLImporter::New();<BR>imp1->SetFileName("C:/vrmlFile");<BR>imp1->Read();<BR>imp1->Update();<BR> <BR>vtkDataSet *pDataset1;<BR>vtkActorCollection *actors1 = imp1->GetRenderer()->GetActors();<BR>actors1->InitTraversal();<BR>pDataset1 = actors1->GetNextActor()->GetMapper()->GetInput();<BR> <BR>vtkGeometryFilter *geometryFilter1 = vtkGeometryFilter::New();<BR>geometryFilter1->SetInput(pDataset1);<BR> <BR>vtkPolyData *polyData1 = vtkPolyData::New();<BR>polyData1 = geometryFilter1->GetOutput();<BR>polyData1->Update();<BR> <BR>vtkDataSetWriter *writer1 = vtkDataSetWriter::New();<BR>writer1->SetInput(polyData1);<BR>writer1->SetFileName(OutputFile);<BR>writer1->SetFileTypeToASCII();<BR> <BR>ostream *vtkFile1 = writer1->OpenVTKFile();<BR>writer1->WriteHeader(vtkFile);<BR>writer1->WritePointData(vtkFile,
pDataset1);<BR>writer1->CloseVTKFile(vtkFile);</DIV>
<DIV> </DIV>
<DIV>Can you tell me if that code makes the conversion from VRML to VTK format?</DIV>
<DIV>If yes, can you specify me the extensions to add for "OutputFile" and "vtkFile"?</DIV>
<DIV> </DIV>
<DIV>Thank you sooooo much for your help.</DIV></td></tr></table><br>