SMIL  0.8
 All Classes Functions Variables Groups Pages
links.py

1 from smilPython import *
2 import time
3 
4 # Load an image
5 imIn= Image("http://cmm.ensmp.fr/~faessel/smil/images/DNA_small.png")
6 imThresh = Image(imIn)
7 imDist = Image(imIn)
8 
9 imIn.show()
10 imThresh.show()
11 imDist.showLabel()
12 
13 def displMax():
14  print("Distance max value: " + str(rangeVal(imDist)[1]))
15 
16 links = linkManager()
17 links.add(imIn, threshold, imIn, 255, imThresh)
18 links.add(imThresh, dist, imThresh, imDist)
19 links.add(imDist, displMax)
20 
21 for i in range(1, 10):
22  print("\nThreshold level: " + str(i*10))
23  links[0].args[1] = i*10
24  time.sleep(1)