

def _inline(self, images):
    self.fv.assert_gui_thread()
    trim_px = self.settings.get('trim_px', 0)
    match_bg = self.settings.get('match_bg', False)
    merge = self.settings.get('merge', False)
    allow_expand = self.settings.get('allow_expand', True)
    expand_pad_deg = self.settings.get('expand_pad_deg', 0.01)
    annotate = self.settings.get('annotate_images', False)
    bg_ref = None
    if match_bg:
        bg_ref = self.bg_ref
    time_intr1 = time.time()
    iminfo = self.chinfo.get_image_info(self.img_mosaic.get('name'))
    iminfo.reason_modified = 'Added {0}'.format(','.join([im.get('name') for im in images]))
    loc = self.img_mosaic.mosaic_inline(images, bg_ref=bg_ref, trim_px=trim_px, merge=merge, allow_expand=allow_expand, expand_pad_deg=expand_pad_deg, suppress_callback=False)
    (xlo, ylo, xhi, yhi) = loc
    if (annotate and (not allow_expand)):
        (x, y) = (((xlo + xhi) // 2), ((ylo + yhi) // 2))
        self.canvas.add(self.dc.Text(x, y, imname, color='red'), redraw=False)
    time_intr2 = time.time()
    self.process_elapsed += (time_intr2 - time_intr1)

dataset/ETHPy150Open ejeschke/ginga/ginga/misc/plugins/Mosaic.py Mosaic._inline/original