def OnMAquireOnePic(self, event): import numpy as np self.scope.frameWrangler.stop() ds2 = np.atleast_3d(self.scope.frameWrangler.currentFrame.reshape(self.scope.cam.GetPicWidth(),self.scope.cam.GetPicHeight()).copy()) #metadata handling mdh = MetaDataHandler.NestedClassMDHandler() mdh.setEntry('StartTime', time.time()) mdh.setEntry('AcquisitionType', 'SingleImage') #loop over all providers of metadata for mdgen in MetaDataHandler.provideStartMetadata: mdgen(mdh) im = dsviewer.ImageStack(data = ds2, mdh = mdh, titleStub='Unsaved Image') if not im.mode == 'graph': im.mode = 'lite' #print im.mode dvf = dsviewer.DSViewFrame(im, mode= im.mode, size=(500, 500)) dvf.SetSize((500,500)) dvf.Show() self.snapNum += 1 self.scope.frameWrangler.Prepare(True) self.scope.frameWrangler.start()
def OnFileOpenStack(self, event): #self.dv = dsviewer.DSViewFrame(self) #self.dv.Show() im = dsviewer.ImageStack(haveGUI=True) dvf = dsviewer.DSViewFrame(im, parent=self, size=(500, 500)) dvf.SetSize((500,500)) dvf.Show() event.Skip()
def showCalImages(self): import numpy as np import time ds2 = self.dt.refImages #metadata handling mdh = MetaDataHandler.NestedClassMDHandler() mdh.setEntry('StartTime', time.time()) mdh.setEntry('AcquisitionType', 'Stack') #loop over all providers of metadata for mdgen in MetaDataHandler.provideStartMetadata: mdgen(mdh) mdh.setEntry('CalibrationPositions', self.dt.calPositions) im = dsviewer.ImageStack(data=ds2, mdh=mdh, titleStub='Unsaved Image') if not im.mode == 'graph': im.mode = 'lite' #print im.mode dvf = dsviewer.DSViewFrame(im, mode=im.mode, size=(500, 500)) dvf.SetSize((500, 500)) dvf.Show()