1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
# This is a CamiTK python action
#
# Simple test of the interaction between python and the CamiTK application
# using action parameters.
#
# This is a simple test where a counter is incremented in the process() method.
# It demonstrates how a value computed in python can be saved in the action
# parameters between two calls to 'apply()' using an action parameter.
# The process() method increments the value of the parameter
# The user can also modify the value in the CamiTK GUI before clicking on 'Apply'
import camitk
def process(self:camitk.Action):
counter = self.getParameterValue("Counter")
counter += 1
self.setParameterValue("Counter", counter)
self.updateWidget()
|