コード例 #1
0
ファイル: guiback.py プロジェクト: Erotemic/hotspotter
 def add_chip(back):
     # Action -> Add ROI
     gx = back.get_selected_gx()
     figtitle = 'Image View - Select ROI (click two points)'
     back.show_image(gx, figtitle=figtitle)
     roi = guitools.select_roi()
     if roi is None:
         print('[back*] roiselection failed. Not adding')
         return
     cx = back.hs.add_chip(gx, roi)  # NOQA
     back.populate_tables()
     # RCOS TODO: Autoselect should be an option
     #back.select_gx(gx, cx)
     back.select_gx(gx)
     print('')
コード例 #2
0
ファイル: guiback.py プロジェクト: SU-ECE-18-7/hotspotter
 def add_chip(back):
     # Action -> Add ROI
     gx = back.get_selected_gx()
     figtitle = 'Image View - Select ROI (click two points)'
     back.show_image(gx, figtitle=figtitle)
     roi = guitools.select_roi()
     if roi is None:
         print('[back*] roiselection failed. Not adding')
         return
     cx = back.hs.add_chip(gx, roi)  # NOQA
     back.populate_tables()
     # RCOS TODO: Autoselect should be an option
     #back.select_gx(gx, cx)
     back.select_gx(gx)
     print('')
コード例 #3
0
ファイル: guiback.py プロジェクト: Erotemic/hotspotter
 def reselect_roi(back, **kwargs):
     # Action -> Reselect ROI
     print(r'[\back] reselect_roi()')
     cx = back.get_selected_cx()
     if cx is None:
         back.user_info('Cannot reselect ROI. No chip selected')
         return
     gx = back.hs.tables.cx2_gx[cx]
     figtitle = 'Image View - ReSelect ROI (click two points)'
     back.show_image(gx, [cx], figtitle=figtitle, **kwargs)
     roi = guitools.select_roi()
     if roi is None:
         print('[back*] roiselection failed. Not adding')
         return
     back.hs.change_roi(cx, roi)
     back.populate_tables()
     back.select_gx(gx, cx, **kwargs)
     print(r'[/back] reselected ROI = %r' % roi)
     print('')
     pass
コード例 #4
0
ファイル: guiback.py プロジェクト: obaiga/hotspotter
 def reselect_roi(back, **kwargs):
     # Action -> Reselect ROI
     print(r'[\back] reselect_roi()')
     cx = back.get_selected_cx()
     if cx is None:
         back.user_info('Cannot reselect ROI. No chip selected')
         return
     gx = back.hs.tables.cx2_gx[cx]
     figtitle = 'Image View - ReSelect ROI (click two points)'
     back.show_image(gx, [cx], figtitle=figtitle, **kwargs)
     roi = guitools.select_roi()
     if roi is None:
         print('[back*] roiselection failed. Not adding')
         return
     back.hs.change_roi(cx, roi)
     back.populate_tables()
     back.select_gx(gx, cx, **kwargs)
     print(r'[/back] reselected ROI = %r' % roi)
     print('')
     pass