(pg)
| 44 | return PolygonRoi([[out, inn]]) |
| 45 | |
| 46 | def s2r_polygons(pg): |
| 47 | from .polygonroi import PolygonRoi |
| 48 | body = [] |
| 49 | for p in pg: |
| 50 | if p.exterior == None: continue |
| 51 | out = list(p.exterior.coords) |
| 52 | inn = [list(i.coords) for i in list(p.interiors)] |
| 53 | body.append([out, inn]) |
| 54 | if len(body)==0:return None |
| 55 | return PolygonRoi(body) |
| 56 | |
| 57 | def roi2shape(roi): |
| 58 | from .lineroi import LineRoi |
no test coverage detected