1import smilPython as sp
2
3im = sp.Image("https://smil.cmm.minesparis.psl.eu/images/balls.png")
4imLbl1 = sp.Image(im, "UINT16")
5imLbl2 = sp.Image(imLbl1)
6
7sp.label(im, imLbl1)
8
9
10
11
12lookup = dict()
13lookup[1] = 2
14lookup[5] = 3
15lookup[2] = 1
16
17sp.applyLookup(imLbl1, lookup, imLbl2)
18
19imLbl1.showLabel()
20imLbl2.showLabel()