<div dir="ltr"><div dir="ltr"><div>Basically what Elvis said: you can store whatever you want in the callback.</div><div>For example, you can do this:</div><div><br></div><div> cb.actor = actor</div><div> cb.mapper = mapper</div><div><br></div><div>And then in the callback execute() method, you can do whatever you want with cb.mapper, i.e. you can give the mapper a new input.</div><div><br></div><div>Whether you really want to do this, though, depends on exactly what you are trying to achieve at each iteration. If you just want to adjust the position or orientation, then it's best to just do something similar to what the example does. Actually getting the output and using it as the next input is computationally expensive, whereas changing the position and orientation of an actor is cheap.</div><div><br></div><div>If you are hoping to get the output of the Render() and feed it back into the mapper, that is actually impossible. The Render() draws to the screen, so its output is a 2D bitmap, which isn't something you can feed back into the pipeline as a replacement of the original polydata.</div><div><br></div><div> David</div><div><br></div><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 20, 2018 at 2:07 PM Elvis Stansvik <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Den tis 20 nov. 2018 kl 21:49 skrev Andreas Pedroni <<a href="mailto:anpedroni@gmail.com" target="_blank">anpedroni@gmail.com</a>>:<br>
><br>
> Dear list<br>
><br>
> Is there a way to use a RepeatingTimer as in this example: <a href="https://www.vtk.org/Wiki/VTK/Examples/Python/Animation" rel="noreferrer" target="_blank">https://www.vtk.org/Wiki/VTK/Examples/Python/Animation</a> in which the loop for the animation (in the example the method execute()) can return output in each iteration that is used in the the next iteration? In other words, is there a way to use information that is calculated in one iteration for the next iteration? Sorry, I am not sure if the question is understandable.<br>
<br>
I think you have your answer right there in that example :) In each<br>
iteration, the self.timer_count field holds the output from the<br>
previous iteration.<br>
<br>
So yes, I think you can simply save the output from one iteration in a<br>
field of the callback class, and use that as input in the next<br>
iteration.<br>
<br>
Hope that makes sense.<br>
<br>
Cheers,<br>
Elvis<br>
<br>
><br>
> best<br>
> Andreas<br>
</blockquote></div></div></div>