[vtkusers] actorCollection=vtkRenderer->GetActors() not returning vtkImageActors?
David Cole
david.cole at kitware.com
Thu Aug 31 10:18:19 EDT 2006
vtkRenderer inherits from vtkViewport... Have you tried the vtkViewport
method RemoveAllViewProps?
One call, no looping. Should do what you're looking for. (I'm assuming
you're using VTK 5.0 or live CVS...?)
HTH,
David
Mark Gooding wrote:
> Hi all,
>
> I'm trying to remove all the actors from a scene, so I'm using
>
> vtkRenderer->GetActors()
>
> to return and actor collection. I step through this doing
>
> vtkRenderer->RemoveActor(actorCollection->GetLastActor());
>
> This removes all vtkActors that I added to the scene, but not the
> vtkImageActors. Is there a way that I can remove all vtkImageActors
> too? I can remove the image actors if I use a direct pointer to each
> one, i.e.
>
> vtkRenderer->RemoveActor(pointertoactor1)
>
> but I would like to be able just to cycle through whatever is left and
> remove it without eplicitly naming it. Any suggestions?
>
> Interestingly the GetVisibleActorCount() returns the total number of
> actors regardless of type. Seems slightly inconsisted that GetActors()
> only returns one type.
>
> Cheers,
>
> Mark
> _______________________________________________
> This is the private VTK discussion list. Please keep messages
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list