本文整理汇总了Python中guiqwt.plot.ImageDialog.resize方法的典型用法代码示例。如果您正苦于以下问题:Python ImageDialog.resize方法的具体用法?Python ImageDialog.resize怎么用?Python ImageDialog.resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类guiqwt.plot.ImageDialog
的用法示例。
在下文中一共展示了ImageDialog.resize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test
# 需要导入模块: from guiqwt.plot import ImageDialog [as 别名]
# 或者: from guiqwt.plot.ImageDialog import resize [as 别名]
def test():
filename = osp.join(osp.dirname(__file__), "mr-brain.dcm")
image = make.image(filename=filename, title="DICOM img", colormap='gray')
win = ImageDialog(edit=False, toolbar=True, wintitle="DICOM I/O test",
options=dict(show_contrast=True))
plot = win.get_plot()
plot.add_item(image)
plot.select_item(image)
contrast = win.get_contrast_panel()
contrast.histogram.eliminate_outliers(54.)
win.resize(600, 700)
return win
示例2: plotImage
# 需要导入模块: from guiqwt.plot import ImageDialog [as 别名]
# 或者: from guiqwt.plot.ImageDialog import resize [as 别名]
def plotImage(x,y,z,wintitle="Contour Plot",options={"lock_aspect_ratio":False,"yreverse":False}):
options.update(dict(show_xsection=True, show_ysection=True))
"""Test"""
# -- Create QApplication
_app = guidata.qapplication()
# --
win = ImageDialog(edit=True, toolbar=True, wintitle=wintitle,
options=options)
win.resize(1500, 1000)
item = make.xyimage(x, y, z,interpolation="linear")
plot = win.get_plot()
plot.add_item(item)
win.plot_widget.xcsw_splitter.setSizes([400,600])
win.show()
return win
示例3: test
# 需要导入模块: from guiqwt.plot import ImageDialog [as 别名]
# 或者: from guiqwt.plot.ImageDialog import resize [as 别名]
def test():
"""Test"""
# -- Create QApplication
import guidata
_app = guidata.qapplication()
# --
filename = osp.join(osp.dirname(__file__), "brain.png")
image = make.image(filename=filename, title="Original", colormap='gray')
win = ImageDialog(edit=False, toolbar=True, wintitle="Contrast test",
options=dict(show_contrast=True))
plot = win.get_plot()
plot.add_item(image)
win.resize(600, 600)
win.show()
try:
plot.save_widget('contrast.png')
except IOError:
# Skipping this part of the test
# because user has no write permission on current directory
pass
win.exec_()
示例4: create_window
# 需要导入模块: from guiqwt.plot import ImageDialog [as 别名]
# 或者: from guiqwt.plot.ImageDialog import resize [as 别名]
def create_window():
win = ImageDialog(edit=False, toolbar=True, wintitle="Cross sections test",
options=dict(show_xsection=True, show_ysection=True,
show_itemlist=True))
win.resize(800, 600)
return win