Exemplo n.º 1
0
 def run(self, ips, imgs, para=None):
     geom = ips.roi.to_geom().convex_hull
     ips.roi = ROI(geom2shp(geom_flatten(geom)))
Exemplo n.º 2
0
 def run(self, ips, imgs, para=None):
     geom = ips.roi.to_geom().buffer(-para['r'])
     ips.roi = ROI(geom2shp(geom_flatten(geom)))
Exemplo n.º 3
0
 def run(self, ips, imgs, para=None):
     obj = mark2shp(
         self.app.manager('roi').get(name=para['name'])).to_geom()
     roi = geom_flatten(ips.roi.to_geom())
     ips.roi = ROI(geom2shp(geom_flatten(roi.intersection(obj))))
Exemplo n.º 4
0
 def run(self, ips, imgs, para=None):
     obj = mark2shp(
         self.app.manager('roi').get(name=para['name'])).to_geom()
     roi = geom_flatten(ips.roi.to_geom())
     ips.roi = ROI(geom2shp(geom_flatten(roi.symmetric_difference(obj))))
Exemplo n.º 5
0
 def run(self, ips, imgs, para=None):
     rect = Rectangle([0, 0, ips.shape[1], ips.shape[0]])
     geom = rect.to_geom().difference(geom_flatten(ips.roi.to_geom()))
     ips.roi = ROI(geom2shp(geom_flatten(geom)))