1import smilPython as sp
2
3im = sp.Image("cells.png")
4
5imDist = sp.Image(im)
6imMask = sp.Image(im)
7imMark = sp.Image(im)
8imGeoDist = sp.Image(im)
9
10
11
12nl = sp.HexSE()
13sp.distance(im, imDist, nl)
14sp.compare(imDist, "==", sp.maxVal(imDist), 0, im, imMark)
15
16
17sp.copy(im, imMask)
18sp.distanceGeodesic(imMark, imMask, imGeoDist, nl)
19
20imGeoDist.show()
21sp.maxVal(imGeoDist)