def initialize(self): self.create_menu() self.create_widgets() self.src_img_manager.set_path(rp('./testimages/test1_src.png')) self.src_img_manager.load(rp('./testimages/test1_mask.png')) self.dst_img_manager.set_path(rp('./testimages/test1_target.png')) self.dst_img_manager.load() from pypoi.testimages.config import offset self.dst_img_manager.offset = offset[0] self.src_img_manager.draw()
def _load_example(): src_path = rp('./testimages/test%d_src.png' % example_id) dst_path = rp('./testimages/test%d_target.png' % example_id) mask_path = None try: from pypoi.testimages.config import offset self.dst_img_manager.offset = offset[example_id - 1] self.dst_img_manager.rotate = 0 mask_path = rp('./testimages/test%d_mask.png' % example_id) except IndexError: pass self.src_img_manager.open(src_path, mask_path=mask_path) self.dst_img_manager.open(dst_path)