[vtkusers] CreateRepeatingTimer Loop with memory

Elvis Stansvik elvis.stansvik at orexplore.com
Tue Nov 20 16:06:42 EST 2018


Den tis 20 nov. 2018 kl 21:49 skrev Andreas Pedroni <anpedroni at gmail.com>:
>
> Dear list
>
> Is there a way to use a RepeatingTimer as in this example: https://www.vtk.org/Wiki/VTK/Examples/Python/Animation 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.

I think you have your answer right there in that example :) In each
iteration, the self.timer_count field holds the output from the
previous iteration.

So yes, I think you can simply save the output from one iteration in a
field of the callback class, and use that as input in the next
iteration.

Hope that makes sense.

Cheers,
Elvis

>
> best
> Andreas
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers


More information about the vtkusers mailing list