[vtkusers] How to close an open vtk-Window by program-code
Bill Lorensen
bill.lorensen at gmail.com
Wed Jul 21 13:38:08 EDT 2010
How about: iren->TerminateApp();
TerminateApp() notifies the event loop to exit.
On Wed, Jul 21, 2010 at 12:22 PM, André Prins <a.h.prins at gmail.com> wrote:
> Dear David & Rainer,
>
> I have had success with calling Finalize() on the RenderWindow. What I
> usually do is wrap a RenderWindow and Interactor in a simple
> viewer-class, which can be constructed on the stack and which has a
> "close" method. In there I simply call window->Finalize(). However I
> just tried it on your CloseWindow example... It does close/remove the
> window, but the event-loop keeps running.
>
> Regards,
> Andre
>
> On Wed, Jul 21, 2010 at 12:17 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> SetRenderWindow(NULL) works for me.
>>
>> On Wed, Jul 21, 2010 at 12:13 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
>>> On Wed, Jul 21, 2010 at 12:08 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>>> Try
>>>> iren->SetRenderWindow(NULL);
>>>> rather than
>>>> iren->GetRenderWindow()->Delete();
>>>
>>> Once SetRenderWindow(NULL) is performed, it crashes as soon as the
>>> window is attempted to be updated.
>>>
>>> Rainer - did you ever get this to work?
>>>
>>> Alex - was that just a thought that you recommended or have you done
>>> this using Delete()?
>>>
>>> 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
>>
> _______________________________________________
> 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