SMIL 1.1.1
Loading...
Searching...
No Matches
example-applylookup.py
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# We can use a Smil Map
10# lookup = Map_UINT16_UINT16()
11# or directly a python dict
12lookup = dict()
13lookup[1] = 2
14lookup[5] = 3
15lookup[2] = 1
16
17sp.applyLookup(imLbl1, lookup, imLbl2)
18
19imLbl1.showLabel()
20imLbl2.showLabel()