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