Thanks for your response!!, <br>
<br>
I tried to load another file (smaller) and it's works.<br><br>Hugo.<br><br><br><div class="gmail_quote">2010/10/26 Sebastien Jourdain <span dir="ltr"><<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Hugo,<br>
<br>
I don't know much about C#, but just in case...<br>
It seems that you only pick the first actor. Are you sure that there<br>
is only one ?<br>
I guess, if you don't provide your renderer to the importer is because<br>
you have other actors into it ?<br>
Have you tried, at least to see if the file can be successfully loaded<br>
by VTK when the importer is fully set ?<br>
<br>
Seb<br>
<div><div></div><div class="h5"><br>
On Tue, Oct 26, 2010 at 9:18 AM, Hugo Valdebenito <<a href="mailto:hugo@maptek.cl">hugo@maptek.cl</a>> wrote:<br>
> Hi all,<br>
><br>
><br>
> I need to load a large data set, for example a VRML file (500MB), I'm using<br>
> the following code (C#), may not be the best way, with my data set it's not<br>
> work, not show anything :<br>
><br>
> // VRML Import<br>
> vtkVRMLImporter importer = vtkVRMLImporter.New();<br>
><br>
> OpenFileDialog dialog = new OpenFileDialog();<br>
> dialog.Filter =<br>
> "VRML files (*.wrl)|*.wrl|All files (*.*)|*.*";<br>
> dialog.InitialDirectory = "\\Desktop";<br>
><br>
> dialog.Title = "Select a text file";<br>
> dialog.Multiselect = false;<br>
> if (dialog.ShowDialog() != DialogResult.OK)<br>
> {<br>
> return;<br>
> }<br>
><br>
> importer.SetFileName(dialog.FileName);<br>
> importer.Read();<br>
> importer.Update();<br>
><br>
> //Convert to vtkDataSet<br>
> vtkDataSet pDataset;<br>
> vtkActorCollection actors = importer.GetRenderer().GetActors();<br>
> actors.InitTraversal();<br>
> pDataset = actors.GetNextActor().GetMapper().GetInput();<br>
><br>
> //Convert to vtkPolyData<br>
> vtkPolyData polyData = vtkPolyData.SafeDownCast ( pDataset );<br>
> polyData.Update();<br>
><br>
> // Mapper<br>
> vtkPolyDataMapper solidMapper = vtkPolyDataMapper.New();<br>
> solidMapper.SetInput ( polyData );<br>
> solidMapper.ScalarVisibilityOff();<br>
><br>
> // Actor<br>
> vtkActor solidActor = vtkActor.New();<br>
> solidActor.SetMapper ( solidMapper );<br>
><br>
> //Add the actors to the scene<br>
> _renderer.AddActor(solidActor);<br>
> _renderer.SetBackground(1, 1, 1); // Background color dark blue<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
</blockquote></div><br>