当前位置: 首页>>代码示例>>Python>>正文


Python EMApp.show方法代码示例

本文整理汇总了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)
开发者ID:cpsemmens,项目名称:eman2,代码行数:31,代码来源:e2cmpxplor.py

示例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)
开发者ID:cpsemmens,项目名称:eman2,代码行数:24,代码来源:e2history.py

示例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)
开发者ID:cpsemmens,项目名称:eman2,代码行数:38,代码来源:e2simmxxplor.py

示例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()
开发者ID:CVL-dev,项目名称:StructuralBiology,代码行数:32,代码来源:emimage3d.py

示例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()
开发者ID:cpsemmens,项目名称:eman2,代码行数:33,代码来源:emimage3diso.py


注:本文中的emapplication.EMApp.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。