[vtkusers] Deleting / Hiding all the objects in a window

David Doria daviddoria+vtk at gmail.com
Wed Nov 18 14:52:57 EST 2009


On Wed, Oct 28, 2009 at 7:23 AM, Karthik Krishnan
<karthik.krishnan at kitware.com> wrote:
> On Wed, Oct 28, 2009 at 7:49 AM, Zampini Samuele
> <samuele.zampini at epfl.ch> wrote:
>> Dear all,
>>
>> I would like to delete (or hide) all the objects that I have in a windows before adding other objects.
>
> Either renderer->RemoveAlllViewProps() or
> Iterate thru the prop collection of the renderer in question
> (renderer->GetViewProps()) and set its visibility to 0


Karthik,

I tried to make a demo of this
http://www.vtk.org/Wiki/Hide_an_actor

but it segfaults when I try to set the visibility. Thoughts?

Also, how do you get the total number of props in the collection?

One last thing, hiding all the actors does work
(http://www.vtk.org/Wiki/Hide_all_actors). When I press 'q' to get out
of the Start() loop, why doesn't the screen turn red until after I
move the mouse? Shouldn't it update right away?

Thanks,

David



More information about the vtkusers mailing list