Beispiel #1
0
 def run(self, ips, imgs, para = None):
     geom = ips.roi.to_geom().convex_hull
     ips.roi = ROI(geom2shp(geom_flatten(geom)))
Beispiel #2
0
 def run(self, ips, imgs, para = None):
     geom = ips.roi.to_geom().buffer(-para['r'])
     ips.roi = ROI(geom2shp(geom_flatten(geom)))
Beispiel #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))))
Beispiel #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))))
Beispiel #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)))