Hello,<br>I load data to QVTKWidget. It is ok, but data stays in memory when I load new image. <br><br>When I reload new image my application crashed :(<br>I tried to delete like this<br>qVTK1->GetRenderWindow()->GetRenderers()->Delete(); // qVTK1 is QVTKWidget<br>
<br>Does somebody know, how to delete or remove last renderers in each new loading I add renderer to renderwindow for example<br><br> vtkSmartPointer<vtkImageActor> actor = vtkSmartPointer<vtkImageActor>::New();<br>
actor->SetInput(output->GetOutput());<br><br> vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();<br> renderer->SetBackground(1,1,1);<br> renderer->AddActor(actor);<br>
<br> qVTK1->GetRenderWindow()->AddRenderer(renderer);<br><br>