[vtkusers] How to remove a texture from an actor

Mário Sandro Rocha msandro_rocha at hotmail.com
Tue Dec 16 07:11:02 EST 2014


Hi,

 

I have a
python/VTK application with many views, and a large number of actors in each
one of them.

In its
first version, all the data were loaded to the memory at once, during the
initialization of the program.

But as the
amount of data became too large, the program started to crash with the message:

“This
application has requested the Runtime to terminate in an unusual way.”

To solve
the problem, I decided to remove all the unnecessary actors from the scene, instead
of make them invisible.

Most of
these actors have textures and balloon widgets attached to them.

Thus, when
a simply use the command “ren.RemoveActor([actor name])”, the actors in fact disappears,
but some garbage still remain in the memory, and produce the same crash.

I think
that this happens because the balloon widget and texture attached to the actor must
be removed before removing the actor.

Currently,
my problem is that I cannot find a way to remove the textures from my actors.

I tried “RemoveAllTextures()”,
but it doesn’t work.

Could
someone help me with this issue?

 

Thanks in
advance.
Mário Sandro. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141216/76b985fe/attachment.html>


More information about the vtkusers mailing list