<div dir="ltr">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Hi Todd,</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Thanks for your advice. The problem is that I want to render the image in real-time. The solution suggested in the link you posted is no other than a repeating timer. Is there some way in Vtk to control the update rate?</div>

<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 2, 2018 at 6:31 PM, Todd <span dir="ltr"><<a href="mailto:nztoddler@yahoo.com" target="_blank">nztoddler@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Hi Hugh</div><div dir="auto"><br></div><div dir="auto">GUI elements are normally only updated on the main thread, so I suspect you need to synchronize your callback from the worker thread. I'm not familiar with Qt, but it seems to be documented. </div><div dir="auto"><a href="http://www.informit.com/articles/article.aspx?p=1405551&seqNum=3" target="_blank">http://www.informit.com/<wbr>articles/article.aspx?p=<wbr>1405551&seqNum=3</a></div><span class="HOEnZb"><font color="#888888"><div dir="auto"><br></div></font></span><div dir="auto"><span class="HOEnZb"><font color="#888888">Todd</font></span><div><div class="h5"><br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On 2 Apr 2018 10:00 p.m., lor fal <<a href="mailto:lorfalwit@gmail.com" target="_blank">lorfalwit@gmail.com</a>> wrote:<br type="attribution"><blockquote class="m_-2180165055365120599quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all:<div><br></div><div>I am using QVTKOpenGLWidget to bridge between Qt and Vtk. However, when I trying to call vtkRenderWindowInteractor::<wbr>Render in worker thread, it always report error like "makeCurrent() error", which seems something wrong while changing OpenGL context. I have googled my questions and found some suggestions but none of them could work.</div><div><br></div><div>Does anybody know exactly how to render images in worker thread?</div><div><br></div><div>Thanks in advance.<br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div>Best regards,<br>Hugh Lo</div></div></div>
</div></div>
</blockquote></div><br></div></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Best regards,<br>Hugh Lo</div></div></div>
</div>