Beispiel #1
0
 def onmouseclick(evt):
     if evt.inaxes == ax3:
         frameslice = getactiveframeslice()
         ntiles = int(np.ceil(np.sqrt(frameslice.stop-frameslice.start)))
         x = int(evt.xdata / fm)
         y = int(evt.ydata / fn)
         fi = y * ntiles + x
         if vid is not None and indices is not None:
             idx = indices[leaves[fi]]
             video.showmovie(vid,idx)
 def onmouseclick(evt):
     if evt.inaxes == ax3:
         lmin,lmax = getframelim(ax2)
         frameslice = getframeslice(lmin,lmax)
         ntiles = int(np.ceil(np.sqrt(frameslice.stop-frameslice.start)))
         x = int(evt.xdata / fm)
         y = int(evt.ydata / fn)
         fi = y * ntiles + x
         if vid is not None and indices is not None:
             idx = indices[leaves[fi]]
             video.showmovie(vid,idx)
 def onkeypress(evt):
     label = None
     if evt.key == "q":
         crossings.label.to_hdf(labelh5path, "label")
     if evt.key == "x":
         label = "invalid"
     if evt.key == "c":
         label = "valid"
     if evt.key == "z" and len(selector.ind) == 1:
         frameslice = crossings.iloc[selector.ind[0], :].slices
         video.showmovie(vid, frameslice.start, fps=frames_per_second, frameend=frameslice.stop)
     if label != None:
         crossings.label[selector.ind] = label
         updateplots()
Beispiel #4
0
 def onkeypress(evt):
     label = None
     if evt.key == 'q':
         crossings.label.to_hdf(labelh5path, 'label')
     if evt.key == 'x':
         label = 'invalid'
     if evt.key == 'c':
         label = 'valid'
     if evt.key == 'z' and len(selector.ind) == 1:
         frameslice = crossings.iloc[selector.ind[0], :].slices
         video.showmovie(vid,
                         frameslice.start,
                         fps=frames_per_second,
                         frameend=frameslice.stop)
     if label != None:
         crossings.label[selector.ind] = label
         updateplots()