<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<meta name=Generator content="Microsoft Word 10 (filtered)">
<title>Normal.dot</title>

<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:Arial;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailFormatvorlage17
        {font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=DE link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>Hi everybody,</span></font></p>

<p class=MsoNormal><font size=3 face=Arial>&nbsp;</font></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt'>I&#8217;m having problems using a timer and interaction but couldn&#8217;t
find a solution for my problem. </span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt'>During a simple rendering I use a timer to check the state of a
variable that determines some properties. If this variable is updated the
render window has to be updated too. Here is the code for the timer:</span></font></p>

<p class=MsoNormal><span lang=EN-GB>&nbsp;</span></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>vtkCallbackCommand *cbc = vtkCallbackCommand::<b><span
style='font-weight:bold'>New</span></b>();</span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>    cbc-&gt;<b><span style='font-weight:bold'>SetCallback</span></b>(myEventHandler);</span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;</span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>iren-&gt;<b><span style='font-weight:bold'>AddObserver</span></b>(vtkCommand::TimerEvent,cbc);       //
RenderwindowInteractor</span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>&#8230;</span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>iren-&gt;<b><span style='font-weight:bold'>CreateTimer</span></b>(VTKI_TIMER_FIRST);</span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=3 face="Courier New"><span
lang=EN-GB style='font-size:12.0pt;font-family:"Courier New"'>&nbsp;</span></font></p>

<p class=MsoNormal><span lang=EN-GB>&nbsp;</span></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt'>In my event handling function I call:</span></font></p>

<p class=MsoNormal><span lang=EN-GB>&nbsp;</span></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>iren-&gt;<b><span style='font-weight:bold'>CreateTimer</span></b>(VTKI_TIMER_UPDATE);</span></font></p>

<p class=MsoNormal><span lang=EN-GB>&nbsp;</span></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt'>to keep the timer running.</span></font></p>

<p class=MsoNormal><span lang=EN-GB>&nbsp;</span></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt'>When I run this application everything works fine and is updated
properly. But starting some simple interaction like rotating or scaling seems
to stop the timer. So I have to click into the window and do some interaction to
get the RenderWindow updated. As I noticed the timer-callback is called
correctly during the interaction but does nothing after it.</span></font></p>

<p class=MsoNormal><span lang=EN-GB>&nbsp;</span></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt'>Does anyone have an idea?</span></font></p>

<p class=MsoNormal><span lang=EN-GB>&nbsp;</span></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt'>Thank you,</span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt'>Tobias</span></font></p>

</div>

</body>

</html>