[vtkusers] How to manage a large VRML file

Hugo Valdebenito hugo at maptek.cl
Wed Oct 27 09:24:12 EDT 2010


Hi Sebastien,

Yes, I did try to load with paraView in my PC, with 250 MB is ok, but 500MB
the program crash in my computer. But my program with 250MB not works.

My question is, how to load a file with those sizes?. how to show the
progress for example?

Hugo


2010/10/27 Sebastien Jourdain <sebastien.jourdain at kitware.com>

> Hi Hugo,
>
> Did you try to load that big VRML inside ParaView. So you would know
> if VTK is able to handle your file...
> If so, then it must be in the way you wrote your code otherwise it
> will be a limitation in VTK. But once, I did load a 600MB VRML file
> with VTK and it was ok.
>
> Seb
>
> On Tue, Oct 26, 2010 at 8:12 PM, Hugo Valdebenito <hugo at maptek.cl> wrote:
> > Thanks for your response!!,
> >
> > I tried to load another file (smaller) and it's works.
> >
> > Hugo.
> >
> >
> > 2010/10/26 Sebastien Jourdain <sebastien.jourdain at kitware.com>
> >>
> >> Hi Hugo,
> >>
> >> I don't know much about C#, but just in case...
> >> It seems that you only pick the first actor. Are you sure that there
> >> is only one ?
> >> I guess, if you don't provide your renderer to the importer is because
> >> you have other actors into it ?
> >> Have you tried, at least to see if the file can be successfully loaded
> >> by VTK when the importer is fully set ?
> >>
> >> Seb
> >>
> >> On Tue, Oct 26, 2010 at 9:18 AM, Hugo Valdebenito <hugo at maptek.cl>
> wrote:
> >> > Hi all,
> >> >
> >> >
> >> > I need to load a large data set, for example a VRML file (500MB), I'm
> >> > using
> >> > the following code (C#), may not be the best way, with my data set
> it's
> >> > not
> >> > work, not show anything :
> >> >
> >> >             // VRML Import
> >> >            vtkVRMLImporter importer = vtkVRMLImporter.New();
> >> >
> >> >            OpenFileDialog dialog = new OpenFileDialog();
> >> >            dialog.Filter =
> >> >               "VRML files (*.wrl)|*.wrl|All files (*.*)|*.*";
> >> >            dialog.InitialDirectory = "\\Desktop";
> >> >
> >> >            dialog.Title = "Select a text file";
> >> >            dialog.Multiselect = false;
> >> >           if (dialog.ShowDialog() != DialogResult.OK)
> >> >           {
> >> >               return;
> >> >           }
> >> >
> >> >            importer.SetFileName(dialog.FileName);
> >> >            importer.Read();
> >> >            importer.Update();
> >> >
> >> >            //Convert to vtkDataSet
> >> >            vtkDataSet pDataset;
> >> >            vtkActorCollection actors =
> >> > importer.GetRenderer().GetActors();
> >> >            actors.InitTraversal();
> >> >            pDataset = actors.GetNextActor().GetMapper().GetInput();
> >> >
> >> >            //Convert to vtkPolyData
> >> >            vtkPolyData polyData = vtkPolyData.SafeDownCast ( pDataset
> );
> >> >            polyData.Update();
> >> >
> >> >            // Mapper
> >> >            vtkPolyDataMapper solidMapper = vtkPolyDataMapper.New();
> >> >            solidMapper.SetInput ( polyData );
> >> >            solidMapper.ScalarVisibilityOff();
> >> >
> >> >            // Actor
> >> >            vtkActor solidActor = vtkActor.New();
> >> >            solidActor.SetMapper ( solidMapper );
> >> >
> >> >            //Add the actors to the scene
> >> >            _renderer.AddActor(solidActor);
> >> >            _renderer.SetBackground(1, 1, 1); // Background color dark
> >> > blue
> >> >
> >> >
> >> > _______________________________________________
> >> > Powered by www.kitware.com
> >> >
> >> > Visit other Kitware open-source projects at
> >> > http://www.kitware.com/opensource/opensource.html
> >> >
> >> > Please keep messages on-topic and check the VTK FAQ at:
> >> > http://www.vtk.org/Wiki/VTK_FAQ
> >> >
> >> > Follow this link to subscribe/unsubscribe:
> >> > http://www.vtk.org/mailman/listinfo/vtkusers
> >> >
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101027/4ff8aeca/attachment.htm>


More information about the vtkusers mailing list