def OnSave(self, event=None): from Priithon.all import Mrc, U, Y fn = Y.FN(1) #, verbose=0) if not fn: return if fn[-4:] in [".mrc", ".dat"]: Mrc.save(self.m_imgArr, fn) elif fn[-5:] in [".fits"]: U.saveFits(self.m_imgArr, fn) else: U.saveImg8(self.m_imgArr, fn) Y.shellMessage("### section saved to '%s'\n" % fn)
def onSaveScr(self, evt=None): from Priithon.all import Y fn = Y.FN(save=1) #, verbose=0) if not fn: return # choose viewers if self.orthogonal_toggle.GetValue(): vstr = self.viewerch.GetStringSelection() vid = self.choice_viewers.index(vstr) else: vid = 0 v = self.viewers[vid] #refresh self.hist[0].setBraces(self.hist[0].leftBrace, self.hist[0].rightBrace) # save Y.vSaveRGBviewport(v, fn)