[vtkusers] How to close an open vtk-Window by program-code

Bill Lorensen bill.lorensen at gmail.com
Wed Jul 21 12:08:53 EDT 2010


Try
 iren->SetRenderWindow(NULL);
rather than
iren->GetRenderWindow()->Delete();


Looking at the code for  vtkRenderWindowInteractor::SetRenderWindow()
it looks like deleting the render window is tricky.

Bill

On Wed, Jul 21, 2010 at 11:07 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Mon, Jun 14, 2010 at 10:38 PM, Alex Malyushytskyy
> <alexmalvtk at gmail.com> wrote:
>> I guess under closing you mean delete,
>>  so calling ->Delete() on the pointer?
>>
>> Alex
>
>
> I tried to make an example that would close the window with a keypress
> by deleting the pointer. This doesn't seem to work:
>
> http://www.vtk.org/Wiki/VTK/Examples/Broken/CloseWindow
>
> Thanks,
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list