[vtkusers] Actors Vs. Memory

Mark Beall mbeall2 at simmetrix.com
Sun Jul 23 13:41:19 EDT 2000


Regarding (1), there was (is?) a problem where vtk would allocate
a bunch of memory that often wasn't used for every vtkPolyData that
was constructed. This actually amounted to something on the
order of 10k per vtkPolyData. I would guess that this is what
you're seeing.
We gave a fix for this to Kitware a couple of months ago, I
think Will said it's been added into the nightly version (it was
after 3.1 was release), but I haven't checked to know for sure.

mark

>1) Could someone tell me why the first code fragment below takes dramatically
>less memory than the second? It doesn't seem like it can just be attributed
>to the extra mappers and actors. 
>
>2) Where should I look for information on how to render large
>datasets, particularly those where at any given time most of the data
>does not need to be displayed?
>				 Thanks,
>						J. Toman
>
>-----------------------------------------------
>ren = vtkRenderer()
>
>append = vtkAppendPolyData()
>
>for k in range(0, 20):
>   for i in range(0,20):
>      for j in range(0, 20):
>         cube = vtkCubeSource()
>         cube.SetCenter(2*i, 2*j, 2*k)
>         append.AddInput(cube.GetOutput())
>
>polymap = vtkPolyDataMapper()
>polymap.SetInput(append.GetOutput())
>actor = vtkLODActor()
>actor.SetMapper(polymap)
>ren.AddActor(actor)
>
>
>---------------------------------------------------
>ren = vtkRenderer()
>
>for k in range(0, 20):
>   for i in range(0,20):
>      for j in range(0, 20):
>         cube = vtkCubeSource()
>         cube.SetCenter(2*i, 2*j, 2*k)
>	 polymap = vtkPolyDataMapper()
>	 polymap.SetInput(cube.GetOutput())
>	 actor = vtkLODActor()
>	 actor.SetMapper(polymap)
>	 ren.AddActor(actor)




More information about the vtkusers mailing list