本文整理汇总了Python中emapplication.EMApp.show方法的典型用法代码示例。如果您正苦于以下问题:Python EMApp.show方法的具体用法?Python EMApp.show怎么用?Python EMApp.show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类emapplication.EMApp
的用法示例。
在下文中一共展示了EMApp.show方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from emapplication import EMApp [as 别名]
# 或者: from emapplication.EMApp import show [as 别名]
def main():
progname = os.path.basename(sys.argv[0])
usage = """prog <projection file> <particles file>
Compare different similarity metrics for a given particle stack. Note that all particles and projections are
read into memory. Do not use it on large sets of particles !!!
"""
parser = EMArgumentParser(usage=usage,version=EMANVERSION)
parser.add_argument("--ppid", type=int, help="Set the PID of the parent process, used for cross platform PPID",default=-1)
(options, args) = parser.parse_args()
if len(args)<2 :
print "Error, please specify projection file and particles file"
sys.exit(1)
logid=E2init(sys.argv,options.ppid)
em_app = EMApp()
window = EM3DGLWidget() #TODO: see if this should be a subclass of EMSymViewerWidget instead
explorer = EMCmpExplorer(window)
window.set_model(explorer)
explorer.set_data(args[0],args[1])
em_app.show()
em_app.execute()
E2end(logid)
示例2: main
# 需要导入模块: from emapplication import EMApp [as 别名]
# 或者: from emapplication.EMApp import show [as 别名]
def main():
progname = os.path.basename(sys.argv[0])
usage = progname + """ [options]
A tool for displaying EMAN2 command history
"""
parser = EMArgumentParser(usage=usage)
parser.add_argument("--gui", "-g",default=False, action="store_true",help="Open history in an interface with a sortable table.")
parser.add_argument("--all", "-a",default=False, action="store_true",help="Show for all directories.")
parser.add_argument("--ppid", type=int, help="Set the PID of the parent process, used for cross platform PPID",default=-1)
parser.add_argument("--verbose", "-v", dest="verbose", action="store", metavar="n", type=int, default=0, help="verbose level [0-9], higner number means higher level of verboseness")
(options, args) = parser.parse_args()
if options.gui:
from emapplication import EMApp
app = EMApp()
hist = HistoryForm(app,os.getcwd())
app.show()
app.execute()
else: print_to_std_out(options.all)
示例3: main
# 需要导入模块: from emapplication import EMApp [as 别名]
# 或者: from emapplication.EMApp import show [as 别名]
def main():
progname = os.path.basename(sys.argv[0])
usage = """prog <simmx file> <projection file> <particles file>
This program allows you to look at per-particle classification based on a pre-computed similarity
matrix. If a particle seems to be mis-classified, you can use this program to help figure out
why. It will display a single asymmetric triangle on the unit sphere, with cylinders representing
the similarity value for the selected particle vs. each possible reference projection. Use the
normal middle-click on the asymmetric unit viewer for more options.
"""
parser = EMArgumentParser(usage=usage,version=EMANVERSION)
parser.add_argument("--ppid", type=int, help="Set the PID of the parent process, used for cross platform PPID",default=-1)
parser.add_argument("--verbose", "-v", dest="verbose", action="store", metavar="n", type=int, default=0, help="verbose level [0-9], higner number means higher level of verboseness")
(options, args) = parser.parse_args()
logid=E2init(sys.argv,options.ppid)
em_app = EMApp()
window = EMSymViewerWidget()
explorer = EMSimmxExplorer(window)
window.model = explorer
if len(args) > 0: explorer.set_simmx_file(args[0])
if len(args) > 1: explorer.set_projection_file(args[1])
if len(args) > 2: explorer.set_particle_file(args[2])
em_app.show()
em_app.execute()
E2end(logid)
示例4: perspective_clicked
# 需要导入模块: from emapplication import EMApp [as 别名]
# 或者: from emapplication.EMApp import show [as 别名]
def perspective_clicked(self):
self.target().set_perspective(True)
def ortho_clicked(self):
self.target().set_perspective(False)
class EMImage3DModule(EMImage3DWidget):
def __init__(self, parent=None, image=None,application=None,winid=None):
import warnings
warnings.warn("convert EMImage3DModule to EMImage3DWidget", DeprecationWarning)
EMImage3DWidget.__init__(self, parent, image, application, winid)
if __name__ == '__main__':
from emapplication import EMApp
import sys
em_app = EMApp()
window = EMImage3DWidget(application=em_app)
if len(sys.argv)==1 :
data = []
#for i in range(0,200):
e = test_image_3d(1,size=(64,64,64))
window.set_data(e)
else :
a=EMData(sys.argv[1])
window.set_data(a,sys.argv[1])
em_app.show()
em_app.execute()
示例5: on_threshold_slider
# 需要导入模块: from emapplication import EMApp [as 别名]
# 或者: from emapplication.EMApp import show [as 别名]
if ( i == current_color):
self.cbb.setCurrentIndex(a)
a += 1
def on_threshold_slider(self,val):
self.target().set_threshold(val)
self.bright.setValue(-val,True)
def set_thresholds(self,low,high,val):
self.thr.setRange(low,high)
self.thr.setValue(val, True)
self.bright.setValue(-val,True)
def set_sample(self,low,high,val):
self.smp.setRange(int(low),int(high))
self.smp.setValue(val, True)
def set_hist(self,hist,minden,maxden):
self.hist.set_data(hist,minden,maxden)
if __name__ == '__main__':
from emglobjects import EM3DGLWidget
from emapplication import EMApp
app = EMApp()
window = EM3DGLWidget()
iso_model = EMIsosurfaceModel(window, test_image_3d(1,size=(64,64,64)))
window.set_model(iso_model)
window.updateGL()
app.show()
app.execute()