<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1">Hello All,<br>
</font>My animation using Java, vtk 6.1, and repeating timer is not
respecting the timer duration. Whether I set it to 10 milliseconds
or 10,000, the animation rate is about 1 frame/sec. The relevant
code follows. I have taken steps to make sure that there appear to
be no memory leaks during the animation. RAM stays constant.
(However, a stop button which uses the stopAction() method followed
by an application close is not completely cleaning up the vtk
objects yet, as found through debug_leaks.) Any suggestions on the
repeating timer duration issue would be appreciated.<br>
Thanks,<br>
Jim<br>
<br>
......some other code, then:<br>
this.renderWindowInteractor.Initialize();<br>
this.renderWindowInteractor.AddObserver("TimerEvent", this,
"myCallBack");<br>
timerID = this.renderWindowInteractor.CreateRepeatingTimer(10000);<br>
System.out.println("timerID = 0" + timerID);<br>
this.renderWindowInteractor.Start();<br>
<br>
public void myCallBack() {<br>
if (visualizationLoop < 150) {<br>
visualizationBegin();<br>
}<br>
if (visualizationLoop == 150) {<br>
this.renderWindowInteractor.DestroyTimer(timerID);<br>
stopAction();<br>
}<br>
<br>
private void stopAction() {<br>
this.renderWindowInteractor.DestroyTimer(timerID);<br>
this.renderWindowPanel.GetRenderer().RemoveAllViewProps();<br>
// Proceed with vtk object cleanup, then start GC:<br>
vtkReferenceInformation info =
vtkObject.JAVA_OBJECT_MANAGER.gc(true);<br>
}<br>
</body>
</html>