<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">You may use ctkVTKAbstractView (or copy-paste its rendering mechanism into your code). It has a scheduleRender() method that you call instead of directly calling
 Render(). The class makes sure that actual rendering does not happen more frequently than the DesiredUpdateRate set in the render window.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="http://www.commontk.org/docs/html/classctkVTKAbstractView.html">http://www.commontk.org/docs/html/classctkVTKAbstractView.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.h">https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.h</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Or, you may enable “vsync” in your GPU driver, which delays your rendering thread if it gets rendering request more frequently than the refresh rate of your monitor.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Andras<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> vtkusers <vtkusers-bounces@vtk.org>
<b>On Behalf Of </b>Ken Martin<br>
<b>Sent:</b> Thursday, May 3, 2018 8:40 AM<br>
<b>To:</b> Voigteri <eric.voigt@outlook.de><br>
<b>Cc:</b> vtk <vtkusers@vtk.org><br>
<b>Subject:</b> Re: [vtkusers] Updating color of actor without call renderWindow->Render()<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">If the events/actions that cause a color change can happen significantly faster than your render rate then you should break apart the two actions (changing the color and rendering). Have a queue of color changes that you push to and then
 on the next render pop all the ones that have accumulated. The rendering can be driven by a timer. That way you can have 500 Hz of color changes and a 30Hz render rate for example.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Thu, May 3, 2018 at 3:53 AM, Voigteri <<a href="mailto:eric.voigt@outlook.de" target="_blank">eric.voigt@outlook.de</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Hi all,<br>
<br>
I have a long list of actors and I periodically (very short time intervals)<br>
update the color of these actors with<br>
<br>
actors[i]->GetProperty()->SetColor(r,g,b);<br>
renderWindow->Render() <br>
<br>
after each color change. However, this redraws the entire scene, not just<br>
the actor I am updating and causes my application to become quite sluggish<br>
since the colors can be changed interactively by the user at a fast pace. <br>
<br>
Is there a better/more efficient way to do this? <br>
<br>
Kind regards, <br>
<br>
Eric<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Classo%40queensu.ca%7Ce69d08dd4b134242e85508d5b0f2f815%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636609479945648816&sdata=TBTF7TftjeVcy94Tidh4LkCA9pKnpRSL67iJOEzOOak%3D&reserved=0" target="_blank">
http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html</a><br>
_______________________________________________<br>
Powered by <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Ce69d08dd4b134242e85508d5b0f2f815%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636609479945648816&sdata=vCswGkTWQLI2il%2BPGzDBsShx15HceG1no4Eb1jxgn6s%3D&reserved=0" target="_blank">
www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Ce69d08dd4b134242e85508d5b0f2f815%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636609479945648816&sdata=DDH8gH5RDRSVicbITafZxNAsE9z%2BXxy4bCBWlhdHpdo%3D&reserved=0" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Ce69d08dd4b134242e85508d5b0f2f815%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636609479945648816&sdata=o456bM6S49LoP2kDI3DTt9bVwfHsCEw7J0f6e7B452Q%3D&reserved=0" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ce69d08dd4b134242e85508d5b0f2f815%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636609479945648816&sdata=CWc884%2FDwR8jWYgV7wvJZ33jriTBNKaVteQIoKYq3M4%3D&reserved=0" target="_blank">
http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ce69d08dd4b134242e85508d5b0f2f815%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636609479945648816&sdata=eLPbG8nzfFN4ue0HxCEAVbBVLG5h4RHbcdmB%2F9M1DP8%3D&reserved=0" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Ken Martin PhD<o:p></o:p></p>
<div>
<p class="MsoNormal">Distinguished Engineer<br>
<span style="font-size:9.5pt">Kitware Inc.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">101 East Weaver Street<br>
Carrboro, North Carolina<br>
27510 USA<o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this
 email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately
 and destroy the original message.  Thank you.</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>