<html><head><base href="x-msg://5/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 24, 2011, at 7:36 PM, Xiaopeng Yang wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">Hi Clint,<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">Actually I tried to use QVTKInteractor as follows:<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 10pt; font-family: DotumChe; ">imageViewer1_open->SetupInteractor(<span style="color: blue; ">this</span>->ui->qvtkWidget->GetRenderWindow()->GetInteractor());</span><span style="font-size: 10pt; font-family: DotumChe; "><o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">…<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "></span><span style="font-size: 10pt; font-family: DotumChe; color: blue; ">this</span><span style="font-size: 10pt; font-family: DotumChe; ">->ui->qvtkWidget->GetRenderWindow()->GetInteractor()->Start();</span></div></div></div></span></blockquote><div><br></div><div>Don't call Start() for a Qt application. Use QApplication::exec() in your main() instead.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "><o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">However, still the same problem occurred. Could you please let me know what mistakes I made?</span></div></div></div></span></blockquote><div><br></div><div>I'm not sure why your seed point selection isn't working.</div><div><br></div><div>Clint</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "><o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">Thank you,<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">Best regards,<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">Xiaopeng<o:p></o:p></span></div><div><div style="border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-top-style: solid; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding-top: 3pt; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; "><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space"> </span><a href="mailto:clinton@elemtech.com" style="color: blue; text-decoration: underline; ">clinton@elemtech.com</a><span class="Apple-converted-space"> </span>[mailto:clinton@elemtech.com]<span class="Apple-converted-space"> </span><br><b>Sent:</b><span class="Apple-converted-space"> </span>Saturday, June 25, 2011 10:04 AM<br><b>To:</b><span class="Apple-converted-space"> </span>Xiaopeng Yang; 'vtk';<span class="Apple-converted-space"> </span><a href="mailto:insight-users@itk.org" style="color: blue; text-decoration: underline; ">insight-users@itk.org</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [vtkusers] QT, VTK, and ITK combined program exit problem<o:p></o:p></span></div></div></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><o:p> </o:p></div><p class="MsoNormal" style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 12pt; "><span style="font-size: 12pt; font-family: 'Times New Roman', serif; ">If you are using Qt, the event loop should be handled by Qt, not VTK with the iren->start.<br>Also be sure to use the QVTKInteractor instead of the type from the factory method vtkRenderWindowInteractor::New.<br><br>Clint<o:p></o:p></span></p><div id="htc_header"><p class="MsoNormal" style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 12pt; "><span style="font-size: 12pt; font-family: 'Times New Roman', serif; ">----- Reply message -----<br>From: "Xiaopeng Yang" <<a href="mailto:yxp233@postech.ac.kr" style="color: blue; text-decoration: underline; ">yxp233@postech.ac.kr</a>><br>Date: Fri, Jun 24, 2011 6:42 pm<br>Subject: [vtkusers] QT, VTK, and ITK combined program exit problem<br>To: "&apos;vtk&apos;" <<a href="mailto:vtkusers@vtk.org" style="color: blue; text-decoration: underline; ">vtkusers@vtk.org</a>>, <<a href="mailto:insight-users@itk.org" style="color: blue; text-decoration: underline; ">insight-users@itk.org</a>><o:p></o:p></span></p></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">Hi All,<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">I found where the problem is: “iren->Start()”. “iren” is the vtkRenderWindowInteractor I defined in my program. If I delete this sentence “iren->Start()”, then I can close both GUI and console windows without warning message “QObject::killTimers: timers cannot be stopped from another thread”. Otherwise, the problem I described in the previous Email will occur.<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">However, for seed point selection, I need “iren->Start()”. Then what should I do to solve the problem?<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">Best,<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); ">Xiaopeng<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div><div style="border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-top-style: solid; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding-top: 3pt; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; "><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space"> </span><a href="mailto:vtkusers-bounces@vtk.org" style="color: blue; text-decoration: underline; ">vtkusers-bounces@vtk.org</a><span class="Apple-converted-space"> </span>[mailto:vtkusers-bounces@vtk.org]<span class="Apple-converted-space"> </span><b>On Behalf Of<span class="Apple-converted-space"> </span></b>Xiaopeng Yang<br><b>Sent:</b><span class="Apple-converted-space"> </span>Friday, June 24, 2011 4:07 PM<br><b>To:</b><span class="Apple-converted-space"> </span>'vtk';<span class="Apple-converted-space"> </span><a href="mailto:insight-users@itk.org" style="color: blue; text-decoration: underline; ">insight-users@itk.org</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>[vtkusers] QT, VTK, and ITK combined program exit problem<o:p></o:p></span></div></div></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><o:p> </o:p></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; ">Dear Users,<o:p></o:p></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><o:p> </o:p></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; ">I made a program based on QT, VTK, and ITK. When I run the program, there are GUI window and console window. When I click “exit” button in the GUI window, the GUI window exits but the console window doesn’t. When I click “exit” button in the console window, there is a message: QObject::killTimers: timers cannot be stopped from another thread. If someone already had a similar experience, please could you share your knowledge?<o:p></o:p></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><o:p> </o:p></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; ">Thank you very much.<o:p></o:p></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; "><o:p> </o:p></div><div style="margin-right: 0in; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; margin-top: 0in; margin-bottom: 0.0001pt; ">Best regards,<o:p></o:p></div></div>_______________________________________________<br>Powered by<span class="Apple-converted-space"> </span><a href="http://www.kitware.com" style="color: blue; text-decoration: underline; ">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<span class="Apple-converted-space"> </span><a href="http://www.kitware.com/opensource/opensource.html" style="color: blue; text-decoration: underline; ">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at:<span class="Apple-converted-space"> </span><a href="http://www.vtk.org/Wiki/VTK_FAQ" style="color: blue; text-decoration: underline; ">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" style="color: blue; text-decoration: underline; ">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></div></span></blockquote></div><br></body></html>