[vtkusers] delete renderer
G G
greenlander1986 at gmail.com
Thu Apr 14 15:49:59 EDT 2011
Hello,
I load data to QVTKWidget. It is ok, but data stays in memory when I load
new image.
When I reload new image my application crashed :(
I tried to delete like this
qVTK1->GetRenderWindow()->GetRenderers()->Delete(); // qVTK1 is QVTKWidget
Does somebody know, how to delete or remove last renderers in each new
loading I add renderer to renderwindow for example
vtkSmartPointer<vtkImageActor> actor =
vtkSmartPointer<vtkImageActor>::New();
actor->SetInput(output->GetOutput());
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
renderer->SetBackground(1,1,1);
renderer->AddActor(actor);
qVTK1->GetRenderWindow()->AddRenderer(renderer);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110414/4f2c6797/attachment.htm>
More information about the vtkusers
mailing list