<font size="2"><font face="verdana,sans-serif"><div>Hi all,</div><div><br></div><div>I want to remove (and delete to free the memory) all polygonal actors, but leaving the volume in the scene. This is my attempt:</div><div>

<br></div><div><div>void MainWindow::on_actionClear_polygonal_data_activated()</div><div>{</div><div>    vtkPropCollection *props=vis-&gt;GetRenderWindow()-&gt;GetRenderers()-&gt;GetFirstRenderer()-&gt;GetViewProps();</div>

<div>    for (int i=props-&gt;GetNumberOfItems()-1; i&gt;=0; i--)</div><div>        if (!props[i].IsTypeOf(&quot;vtkVolume&quot;)) //vtkObjectBase both volume and polyogonal</div><div>            props-&gt;RemoveItem(i);</div>

<div>    vis-&gt;GetRenderWindow()-&gt;Render();</div><div>}</div></div><div><br></div><div>However this also removes the volume. I have a feeling the problem is in some small detail. Do you have any suggestions?</div><div>

<br></div><div>Regards,</div><div>Dženan</div></font></font>