[vtkusers] Remove polygonal props, leave volume intact
Dženan Zukić
dzenanz at gmail.com
Wed Mar 16 10:24:05 EDT 2011
Hi all,
I want to remove (and delete to free the memory) all polygonal actors, but
leaving the volume in the scene. This is my attempt:
void MainWindow::on_actionClear_polygonal_data_activated()
{
vtkPropCollection
*props=vis->GetRenderWindow()->GetRenderers()->GetFirstRenderer()->GetViewProps();
for (int i=props->GetNumberOfItems()-1; i>=0; i--)
if (!props[i].IsTypeOf("vtkVolume")) //vtkObjectBase both volume and
polyogonal
props->RemoveItem(i);
vis->GetRenderWindow()->Render();
}
However this also removes the volume. I have a feeling the problem is in
some small detail. Do you have any suggestions?
Regards,
Dženan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110316/e35cb97b/attachment.htm>
More information about the vtkusers
mailing list