from pytemca.stage.stage import RadishStage import msvcrt import time import os,sys stage = RadishStage("*", 8000, 8001, "http://10.128.26.122:8090") stage._set_pos_2d(0.0,0.0) while True: if msvcrt.kbhit(): print msvcrt.getch() else: print 'bar' time.sleep(0.5)
# up arrow stage.set_pos(x, y - delta) elif k == 80: # down arrow stage.set_pos(x, y + delta) elif k == 77: # right arrow stage.set_pos(x + delta, y) elif k == 75: # left arrow stage.set_pos(x - delta, y) return None return k return None stage = RadishStage("*", 8000, 8001, "http://10.128.26.51:8090") #stage = DummyRadishStage("*", 8000, 8001, "http://localhost:8090") # Open the DLL which runs all TEMCA graphs temcaGraph = TemcaGraph() temcaGraph.open(dummyCamera = False) showRawImage = False showPreviewImage = False if showRawImage or showPreviewImage: import numpy as np if showRawImage: imgRaw = temcaGraph.allocate_frame() if showPreviewImage: imgPreview = temcaGraph.allocate_preview_frame() # 8bpp and decimated