本文整理汇总了Python中vtk.qt4.QVTKRenderWindowInteractor.QVTKRenderWindowInteractor.setObjectName方法的典型用法代码示例。如果您正苦于以下问题:Python QVTKRenderWindowInteractor.setObjectName方法的具体用法?Python QVTKRenderWindowInteractor.setObjectName怎么用?Python QVTKRenderWindowInteractor.setObjectName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vtk.qt4.QVTKRenderWindowInteractor.QVTKRenderWindowInteractor
的用法示例。
在下文中一共展示了QVTKRenderWindowInteractor.setObjectName方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_MainWindow
# 需要导入模块: from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor [as 别名]
# 或者: from vtk.qt4.QVTKRenderWindowInteractor.QVTKRenderWindowInteractor import setObjectName [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow, renWinList):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(501, 596)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout = QtGui.QGridLayout(self.centralwidget)
self.gridLayout.setObjectName("gridLayout")
self.splitter = QtGui.QSplitter(self.centralwidget)
self.splitter.setOrientation(QtCore.Qt.Vertical)
self.splitter.setObjectName("splitter")
self.qvtkWidget_1 = QVTKRenderWindowInteractor(self.splitter, rw=renWinList[1])
self.qvtkWidget_1.setObjectName("qvtkWidget_1")
self.qvtkWidget_0 = QVTKRenderWindowInteractor(self.splitter, rw=renWinList[0])
self.qvtkWidget_0.setObjectName("qvtkWidget_0")
self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 501, 22))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.actionExit = QtGui.QAction(MainWindow)
self.actionExit.setObjectName("actionExit")
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
self.actionExit.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8))
self.actionExit.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8))
示例2: Ui_MainWindow
# 需要导入模块: from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor [as 别名]
# 或者: from vtk.qt4.QVTKRenderWindowInteractor.QVTKRenderWindowInteractor import setObjectName [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(800, 600)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.pushButton = QtGui.QPushButton(self.centralwidget)
self.pushButton.setGeometry(QtCore.QRect(10, 230, 121, 41))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/rc/Resource/Science.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.pushButton.setIcon(icon)
self.pushButton.setObjectName(_fromUtf8("pushButton"))
self.vtkWidget = QVTKRenderWindowInteractor(self.centralwidget)
self.vtkWidget.setGeometry(QtCore.QRect(200, 100, 521, 391))
self.vtkWidget.setObjectName(_fromUtf8("widget"))
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 23))
self.menubar.setObjectName(_fromUtf8("menubar"))
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(MainWindow)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
self.pushButton.setText(_translate("MainWindow", "PushButton", None))
示例3: Ui_MainWindow
# 需要导入模块: from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor [as 别名]
# 或者: from vtk.qt4.QVTKRenderWindowInteractor.QVTKRenderWindowInteractor import setObjectName [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow, renWin):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(400, 450)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.vtkWidget = QVTKRenderWindowInteractor(self.centralwidget, rw=renWin)
self.vtkWidget.setObjectName(_fromUtf8("vtkWidget"))
self.verticalLayout.addWidget(self.vtkWidget)
self.horizontalSlider = QtGui.QSlider(self.centralwidget)
self.horizontalSlider.setMinimum(0)
self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSlider.setObjectName(_fromUtf8("horizontalSlider"))
self.verticalLayout.addWidget(self.horizontalSlider)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.label = QtGui.QLabel(self.centralwidget)
self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label.setObjectName(_fromUtf8("label"))
self.horizontalLayout.addWidget(self.label)
self.comboBox = QtGui.QComboBox(self.centralwidget)
self.comboBox.setObjectName(_fromUtf8("comboBox"))
self.comboBox.addItem(_fromUtf8(""))
self.comboBox.addItem(_fromUtf8(""))
self.comboBox.addItem(_fromUtf8(""))
self.horizontalLayout.addWidget(self.comboBox)
self.verticalLayout.addLayout(self.horizontalLayout)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1100, 22))
self.menubar.setObjectName(_fromUtf8("menubar"))
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName(_fromUtf8("menuFile"))
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(MainWindow)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
MainWindow.setStatusBar(self.statusbar)
self.actionOpen = QtGui.QAction(MainWindow)
self.actionOpen.setObjectName(_fromUtf8("actionOpen"))
self.actionExit = QtGui.QAction(MainWindow)
self.actionExit.setObjectName(_fromUtf8("actionExit"))
self.menuFile.addAction(self.actionOpen)
self.menuFile.addAction(self.actionExit)
self.menubar.addAction(self.menuFile.menuAction())
MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Diffusion Embedding", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("MainWindow", "Transition style:", None, QtGui.QApplication.UnicodeUTF8))
self.comboBox.setItemText(0, QtGui.QApplication.translate("MainWindow", "Alternating Axes", None, QtGui.QApplication.UnicodeUTF8))
self.comboBox.setItemText(1, QtGui.QApplication.translate("MainWindow", "Diagonal", None, QtGui.QApplication.UnicodeUTF8))
self.comboBox.setItemText(2, QtGui.QApplication.translate("MainWindow", "Simple", None, QtGui.QApplication.UnicodeUTF8))
self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8))
self.actionOpen.setText(QtGui.QApplication.translate("MainWindow", "Open", None, QtGui.QApplication.UnicodeUTF8))
self.actionOpen.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+O", None, QtGui.QApplication.UnicodeUTF8))
self.actionExit.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8))
self.actionExit.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8))
示例4: Ui_TestbedWindow
# 需要导入模块: from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor [as 别名]
# 或者: from vtk.qt4.QVTKRenderWindowInteractor.QVTKRenderWindowInteractor import setObjectName [as 别名]
class Ui_TestbedWindow(object):
def setupUi(self, TestbedWindow):
TestbedWindow.setObjectName(_fromUtf8("TestbedWindow"))
TestbedWindow.resize(789, 590)
TestbedWindow.setWindowTitle(QtGui.QApplication.translate("TestbedWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
self.centralwidget = QtGui.QWidget(TestbedWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.renderView = QVTKRenderWindowInteractor(self.centralwidget)
self.renderView.setGeometry(QtCore.QRect(0, 0, 781, 541))
self.renderView.setObjectName(_fromUtf8("renderView"))
TestbedWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(TestbedWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 789, 27))
self.menubar.setObjectName(_fromUtf8("menubar"))
self.menuData = QtGui.QMenu(self.menubar)
self.menuData.setTitle(QtGui.QApplication.translate("TestbedWindow", "Data", None, QtGui.QApplication.UnicodeUTF8))
self.menuData.setObjectName(_fromUtf8("menuData"))
TestbedWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(TestbedWindow)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
TestbedWindow.setStatusBar(self.statusbar)
self.actionLoad = QtGui.QAction(TestbedWindow)
self.actionLoad.setCheckable(False)
self.actionLoad.setText(QtGui.QApplication.translate("TestbedWindow", "Load...", None, QtGui.QApplication.UnicodeUTF8))
self.actionLoad.setToolTip(QtGui.QApplication.translate("TestbedWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans Serif\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-style:italic;\">Load dataset</span></p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.actionLoad.setShortcut(QtGui.QApplication.translate("TestbedWindow", "F2", None, QtGui.QApplication.UnicodeUTF8))
self.actionLoad.setObjectName(_fromUtf8("actionLoad"))
self.menuData.addAction(self.actionLoad)
self.menubar.addAction(self.menuData.menuAction())
self.retranslateUi(TestbedWindow)
QtCore.QMetaObject.connectSlotsByName(TestbedWindow)
def retranslateUi(self, TestbedWindow):
pass
示例5: Ui_MainWindow
# 需要导入模块: from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor [as 别名]
# 或者: from vtk.qt4.QVTKRenderWindowInteractor.QVTKRenderWindowInteractor import setObjectName [as 别名]
class Ui_MainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
self.setupUi(self)
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(912, 640)
#centralWidget
self.centralWidget = QtGui.QWidget(MainWindow)
self.centralWidget.setObjectName(_fromUtf8("centralWidget"))
self.m_label = QtGui.QLabel(self.centralWidget)
self.m_label.setGeometry(QtCore.QRect(750, 70, 91, 17))
self.m_label.setObjectName(_fromUtf8("m_label"))
self.m_pushButton = QtGui.QPushButton(self.centralWidget)
self.m_pushButton.setGeometry(QtCore.QRect(740, 110, 99, 27))
self.m_pushButton.setObjectName(_fromUtf8("m_pushButton"))
#vtkWidget
self.m_widget = QVTKRenderWindowInteractor(self.centralWidget)
self.m_widget.setGeometry(QtCore.QRect(60, 60, 591, 501))
self.m_widget.setObjectName(_fromUtf8("m_widget"))
self.setvtkWidget()
MainWindow.setCentralWidget(self.centralWidget)
#menuBar
self.menuBar = QtGui.QMenuBar(MainWindow)
self.menuBar.setGeometry(QtCore.QRect(0, 0, 912, 25))
self.menuBar.setObjectName(_fromUtf8("menuBar"))
MainWindow.setMenuBar(self.menuBar)
#toolBar
self.mainToolBar = QtGui.QToolBar(MainWindow)
self.mainToolBar.setObjectName(_fromUtf8("mainToolBar"))
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.mainToolBar)
#statusBar
self.statusBar = QtGui.QStatusBar(MainWindow)
self.statusBar.setObjectName(_fromUtf8("statusBar"))
MainWindow.setStatusBar(self.statusBar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
self.m_label.setText(_translate("MainWindow", "Hello world", None))
self.m_pushButton.setText(_translate("MainWindow", "Say Hi!", None))
def setvtkWidget(self):
self.ren = vtk.vtkRenderer()
self.m_widget.GetRenderWindow().AddRenderer(self.ren)
self.iren = self.m_widget.GetRenderWindow().GetInteractor()
# The car model (includes a plate, two poles and four wheel)
# Plate of the car
# Create source
plate = vtk.vtkCubeSource()
plate.SetXLength(100)
plate.SetYLength(60)
plate.SetZLength(6)
plate.SetCenter(50, 0, -3)
# Create a mapper
plateMapper = vtk.vtkPolyDataMapper()
plateMapper.SetInputConnection(plate.GetOutputPort())
# Create a transform
plateTransform = vtk.vtkTransform()
# Create an actor
self.plateActor = vtk.vtkActor()
self.plateActor.SetMapper(plateMapper)
self.plateActor.SetUserTransform(plateTransform)
self.plateActor.GetProperty().SetColor(0.69, 0.77, 0.87)
self.ren.AddActor(self.plateActor)
# Two poles
# Left pole
# Create source
poleL = vtk.vtkCylinderSource()
poleL.SetRadius(1.0)
poleL.SetHeight(50.0)
poleL.SetCenter(10, 0, 0)
poleL.SetResolution(100.0)
# Create a mapper
poleLMapper = vtk.vtkPolyDataMapper()
poleLMapper.SetInputConnection(poleL.GetOutputPort())
# Create a transform
poleLTransform = vtk.vtkTransform()
poleLTransform.SetInput(plateTransform)
# Create an actor
poleLActor = vtk.vtkActor()
poleLActor.SetMapper(poleLMapper)
#.........这里部分代码省略.........
示例6: Ui_Form
# 需要导入模块: from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor [as 别名]
# 或者: from vtk.qt4.QVTKRenderWindowInteractor.QVTKRenderWindowInteractor import setObjectName [as 别名]
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName(_fromUtf8("Form"))
Form.resize(800, 600)
self.gridLayout = QtGui.QGridLayout(Form)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.verticalLayout_3 = QtGui.QVBoxLayout()
self.verticalLayout_3.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.label = QtGui.QLabel(Form)
self.label.setObjectName(_fromUtf8("label"))
self.verticalLayout.addWidget(self.label)
self.leftVtk = QVTKRenderWindowInteractor(Form)
self.leftVtk.setObjectName(_fromUtf8("leftVtk"))
self.verticalLayout.addWidget(self.leftVtk)
self.verticalLayout.setStretch(1, 1)
self.horizontalLayout.addLayout(self.verticalLayout)
self.verticalLayout_2 = QtGui.QVBoxLayout()
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.label_2 = QtGui.QLabel(Form)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.verticalLayout_2.addWidget(self.label_2)
self.rightVtk = QVTKRenderWindowInteractor(Form)
self.rightVtk.setObjectName(_fromUtf8("rightVtk"))
self.verticalLayout_2.addWidget(self.rightVtk)
self.verticalLayout_2.setStretch(1, 1)
self.horizontalLayout.addLayout(self.verticalLayout_2)
self.verticalLayout_3.addLayout(self.horizontalLayout)
self.tabWidget = QtGui.QTabWidget(Form)
self.tabWidget.setTabShape(QtGui.QTabWidget.Triangular)
self.tabWidget.setTabsClosable(False)
self.tabWidget.setMovable(False)
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.okienkowanieTab = QtGui.QWidget()
self.okienkowanieTab.setObjectName(_fromUtf8("okienkowanieTab"))
self.tabWidget.addTab(self.okienkowanieTab, _fromUtf8(""))
self.cannyTab = QtGui.QWidget()
self.cannyTab.setObjectName(_fromUtf8("cannyTab"))
self.tabWidget.addTab(self.cannyTab, _fromUtf8(""))
self.verticalLayout_3.addWidget(self.tabWidget)
self.loadImage = QtGui.QPushButton(Form)
self.loadImage.setObjectName(_fromUtf8("loadImage"))
self.verticalLayout_3.addWidget(self.loadImage)
self.verticalLayout_3.setStretch(0, 2)
self.verticalLayout_3.setStretch(1, 1)
self.gridLayout.addLayout(self.verticalLayout_3, 0, 0, 1, 1)
self.retranslateUi(Form)
self.tabWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
Form.setWindowTitle(_translate("Form", "Form", None))
self.label.setText(_translate("Form", "Oryginalny obraz", None))
self.label_2.setText(_translate("Form", "Przetworzony obraz", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.okienkowanieTab), _translate("Form", "Okienkowanie", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.cannyTab), _translate("Form", "Canny", None))
self.loadImage.setText(_translate("Form", "Wczytaj obraz", None))
示例7: Ui_Form
# 需要导入模块: from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor [as 别名]
# 或者: from vtk.qt4.QVTKRenderWindowInteractor.QVTKRenderWindowInteractor import setObjectName [as 别名]
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName(_fromUtf8("Form"))
Form.resize(647, 480)
self.horizontalLayout = QtGui.QHBoxLayout(Form)
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.gridLayout_2 = QtGui.QGridLayout()
self.gridLayout_2.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
self.gridLayout_2.setContentsMargins(0, -1, -1, 0)
self.gridLayout_2.setHorizontalSpacing(6)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setSpacing(6)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.label = QtGui.QLabel(Form)
self.label.setObjectName(_fromUtf8("label"))
self.verticalLayout.addWidget(self.label)
self.XYPlaneWidget = QVTKRenderWindowInteractor(Form)
self.XYPlaneWidget.setObjectName(_fromUtf8("XYPlaneWidget"))
self.verticalLayout.addWidget(self.XYPlaneWidget)
self.XYSlider = QtGui.QSlider(Form)
self.XYSlider.setOrientation(QtCore.Qt.Horizontal)
self.XYSlider.setObjectName(_fromUtf8("XYSlider"))
self.verticalLayout.addWidget(self.XYSlider)
self.verticalLayout.setStretch(1, 1)
self.gridLayout_2.addLayout(self.verticalLayout, 0, 0, 1, 1)
self.verticalLayout_2 = QtGui.QVBoxLayout()
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.label_3 = QtGui.QLabel(Form)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.verticalLayout_2.addWidget(self.label_3)
self.YZPlaneWidget = QVTKRenderWindowInteractor(Form)
self.YZPlaneWidget.setObjectName(_fromUtf8("YZPlaneWidget"))
self.verticalLayout_2.addWidget(self.YZPlaneWidget)
self.YZSlider = QtGui.QSlider(Form)
self.YZSlider.setOrientation(QtCore.Qt.Horizontal)
self.YZSlider.setObjectName(_fromUtf8("YZSlider"))
self.verticalLayout_2.addWidget(self.YZSlider)
self.verticalLayout_2.setStretch(1, 1)
self.gridLayout_2.addLayout(self.verticalLayout_2, 0, 1, 1, 1)
self.verticalLayout_3 = QtGui.QVBoxLayout()
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.label_2 = QtGui.QLabel(Form)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.verticalLayout_3.addWidget(self.label_2)
self.XZPlaneWidget = QVTKRenderWindowInteractor(Form)
self.XZPlaneWidget.setObjectName(_fromUtf8("XZPlaneWidget"))
self.verticalLayout_3.addWidget(self.XZPlaneWidget)
self.XZSlider = QtGui.QSlider(Form)
self.XZSlider.setOrientation(QtCore.Qt.Horizontal)
self.XZSlider.setObjectName(_fromUtf8("XZSlider"))
self.verticalLayout_3.addWidget(self.XZSlider)
self.verticalLayout_3.setStretch(1, 1)
self.gridLayout_2.addLayout(self.verticalLayout_3, 1, 0, 1, 1)
self.verticalLayout_5 = QtGui.QVBoxLayout()
self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
self.label_4 = QtGui.QLabel(Form)
self.label_4.setObjectName(_fromUtf8("label_4"))
self.verticalLayout_5.addWidget(self.label_4)
self.VolumeWidget = QVTKRenderWindowInteractor(Form)
self.VolumeWidget.setObjectName(_fromUtf8("VolumeWidget"))
self.verticalLayout_5.addWidget(self.VolumeWidget)
self.verticalLayout_5.setStretch(1, 1)
self.gridLayout_2.addLayout(self.verticalLayout_5, 1, 1, 1, 1)
self.horizontalLayout.addLayout(self.gridLayout_2)
self.gridLayout = QtGui.QGridLayout()
self.gridLayout.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.WindowWidthLabel = QtGui.QLabel(Form)
self.WindowWidthLabel.setObjectName(_fromUtf8("WindowWidthLabel"))
self.gridLayout.addWidget(self.WindowWidthLabel, 2, 0, 1, 1)
self.WindowWidthSlider = QtGui.QSlider(Form)
self.WindowWidthSlider.setOrientation(QtCore.Qt.Horizontal)
self.WindowWidthSlider.setObjectName(_fromUtf8("WindowWidthSlider"))
self.gridLayout.addWidget(self.WindowWidthSlider, 2, 1, 1, 1)
self.WindowControlLabel = QtGui.QLabel(Form)
self.WindowControlLabel.setFrameShape(QtGui.QFrame.NoFrame)
self.WindowControlLabel.setAlignment(QtCore.Qt.AlignCenter)
self.WindowControlLabel.setObjectName(_fromUtf8("WindowControlLabel"))
self.gridLayout.addWidget(self.WindowControlLabel, 0, 0, 1, 1)
self.WindowCenterLabel = QtGui.QLabel(Form)
self.WindowCenterLabel.setObjectName(_fromUtf8("WindowCenterLabel"))
self.gridLayout.addWidget(self.WindowCenterLabel, 1, 0, 1, 1)
self.WindowCenterSlider = QtGui.QSlider(Form)
self.WindowCenterSlider.setOrientation(QtCore.Qt.Horizontal)
self.WindowCenterSlider.setObjectName(_fromUtf8("WindowCenterSlider"))
self.gridLayout.addWidget(self.WindowCenterSlider, 1, 1, 1, 1)
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout.addItem(spacerItem, 3, 0, 1, 1)
self.horizontalLayout.addLayout(self.gridLayout)
self.horizontalLayout.setStretch(0, 3)
self.horizontalLayout.setStretch(1, 1)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
Form.setWindowTitle(_translate("Form", "DICOM Visualizer", None))
self.label.setText(_translate("Form", "XY slice", None))
self.label_3.setText(_translate("Form", "YZ slice", None))
#.........这里部分代码省略.........
示例8: Ui_MainWindow
# 需要导入模块: from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor [as 别名]
# 或者: from vtk.qt4.QVTKRenderWindowInteractor.QVTKRenderWindowInteractor import setObjectName [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(790, 571)
self.centralWidget = QtGui.QWidget(MainWindow)
self.centralWidget.setObjectName("centralWidget")
self.gridlayout = QtGui.QGridLayout(self.centralWidget)
self.gridlayout.setObjectName("gridlayout")
self.splitter_2 = QtGui.QSplitter(self.centralWidget)
self.splitter_2.setOrientation(QtCore.Qt.Horizontal)
self.splitter_2.setObjectName("splitter_2")
self.splitter = QtGui.QSplitter(self.splitter_2)
self.splitter.setOrientation(QtCore.Qt.Vertical)
self.splitter.setObjectName("splitter")
self.listWidget = QtGui.QListWidget(self.splitter)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth())
self.listWidget.setSizePolicy(sizePolicy)
self.listWidget.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
self.listWidget.setSelectionRectVisible(False)
self.listWidget.setObjectName("listWidget")
self.tabWidget = QtGui.QTabWidget(self.splitter)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(5)
sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
self.tabWidget.setSizePolicy(sizePolicy)
self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded)
self.tabWidget.setObjectName("tabWidget")
self.tab = QtGui.QWidget()
self.tab.setObjectName("tab")
self.hSlider_basisIndex = QtGui.QSlider(self.tab)
self.hSlider_basisIndex.setGeometry(QtCore.QRect(10, 160, 160, 22))
self.hSlider_basisIndex.setMaximum(10)
self.hSlider_basisIndex.setOrientation(QtCore.Qt.Horizontal)
self.hSlider_basisIndex.setObjectName("hSlider_basisIndex")
self.label_basisIndex = QtGui.QLabel(self.tab)
self.label_basisIndex.setGeometry(QtCore.QRect(10, 140, 161, 17))
self.label_basisIndex.setObjectName("label_basisIndex")
self.spinBox_basisIndex = QtGui.QSpinBox(self.tab)
self.spinBox_basisIndex.setGeometry(QtCore.QRect(180, 150, 63, 27))
self.spinBox_basisIndex.setReadOnly(True)
self.spinBox_basisIndex.setButtonSymbols(QtGui.QAbstractSpinBox.NoButtons)
self.spinBox_basisIndex.setObjectName("spinBox_basisIndex")
self.label_level = QtGui.QLabel(self.tab)
self.label_level.setGeometry(QtCore.QRect(10, 10, 171, 17))
self.label_level.setObjectName("label_level")
self.spinBox_level = QtGui.QSpinBox(self.tab)
self.spinBox_level.setGeometry(QtCore.QRect(180, 20, 63, 27))
self.spinBox_level.setReadOnly(True)
self.spinBox_level.setButtonSymbols(QtGui.QAbstractSpinBox.NoButtons)
self.spinBox_level.setObjectName("spinBox_level")
self.hSlider_level = QtGui.QSlider(self.tab)
self.hSlider_level.setGeometry(QtCore.QRect(10, 30, 160, 22))
self.hSlider_level.setOrientation(QtCore.Qt.Horizontal)
self.hSlider_level.setObjectName("hSlider_level")
self.label_cutoff = QtGui.QLabel(self.tab)
self.label_cutoff.setGeometry(QtCore.QRect(10, 64, 221, 17))
self.label_cutoff.setObjectName("label_cutoff")
self.lineEdit_cutoff = QtGui.QLineEdit(self.tab)
self.lineEdit_cutoff.setGeometry(QtCore.QRect(10, 84, 91, 22))
self.lineEdit_cutoff.setLayoutDirection(QtCore.Qt.RightToLeft)
self.lineEdit_cutoff.setObjectName("lineEdit_cutoff")
self.label_cutoff_minmax = QtGui.QLabel(self.tab)
self.label_cutoff_minmax.setGeometry(QtCore.QRect(110, 90, 121, 17))
font = QtGui.QFont()
font.setPointSize(11)
self.label_cutoff_minmax.setFont(font)
self.label_cutoff_minmax.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label_cutoff_minmax.setObjectName("label_cutoff_minmax")
self.line = QtGui.QFrame(self.tab)
self.line.setGeometry(QtCore.QRect(10, 110, 231, 16))
self.line.setFrameShape(QtGui.QFrame.HLine)
self.line.setFrameShadow(QtGui.QFrame.Sunken)
self.line.setObjectName("line")
self.label_basisCutoff_minmax = QtGui.QLabel(self.tab)
self.label_basisCutoff_minmax.setGeometry(QtCore.QRect(110, 221, 121, 17))
font = QtGui.QFont()
font.setPointSize(11)
self.label_basisCutoff_minmax.setFont(font)
self.label_basisCutoff_minmax.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label_basisCutoff_minmax.setObjectName("label_basisCutoff_minmax")
self.label_basisCutoff = QtGui.QLabel(self.tab)
self.label_basisCutoff.setGeometry(QtCore.QRect(10, 195, 221, 17))
self.label_basisCutoff.setObjectName("label_basisCutoff")
self.lineEdit_basisCutoff = QtGui.QLineEdit(self.tab)
self.lineEdit_basisCutoff.setGeometry(QtCore.QRect(10, 215, 91, 22))
self.lineEdit_basisCutoff.setLayoutDirection(QtCore.Qt.RightToLeft)
self.lineEdit_basisCutoff.setObjectName("lineEdit_basisCutoff")
self.tabWidget.addTab(self.tab, "")
self.tab_2 = QtGui.QWidget()
self.tab_2.setObjectName("tab_2")
self.tabWidget.addTab(self.tab_2, "")
self.vtkWidget = QVTKRenderWindowInteractor(self.splitter_2)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(10)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.vtkWidget.sizePolicy().hasHeightForWidth())
#.........这里部分代码省略.........
示例9: Ui_MainWindow
# 需要导入模块: from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor [as 别名]
# 或者: from vtk.qt4.QVTKRenderWindowInteractor.QVTKRenderWindowInteractor import setObjectName [as 别名]
class Ui_MainWindow(QtGui.QMainWindow):
""" The main window class"""
def __init__(self):
QtGui.QMainWindow.__init__(self)
# member variables definition
self.M1 = 0.0
self.M2 = 0.0
self.L1 = 0.0
self.L2 = 0.0
self.th1 = 0.0
self.th2 = 0.0
self.w1 = 0.0
self.w2 = 0.0
self.ts = 0.0
self.te = 0.0
self.dt = 0.0
# setup timer
self.timer = QtCore.QTimer(self)
self.timer.timeout.connect(self.timerCallback)
self.timer_count = 0
self.current_time = 0.0
# dimension of the vtk view
self.len_convert_factor = 100.0 # length convert factor 1m = 100 pixels
self.X_lim = 500.0
self.Y_lim = 300.0
# archive (history) of the results
self.archive = archive()
# Setup UI widgets
self.setupUi(self)
def setupUi(self, MainWindow):
# mainwindow
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(1203, 694)
# centralWidget
self.centralWidget = QtGui.QWidget(MainWindow)
self.centralWidget.setObjectName(_fromUtf8("centralWidget"))
MainWindow.setCentralWidget(self.centralWidget)
# left setting panel
# frame
self.settingFrame = QtGui.QFrame(self.centralWidget)
self.settingFrame.setGeometry(QtCore.QRect(10, 10, 301, 581))
self.settingFrame.setFrameShape(QtGui.QFrame.StyledPanel)
self.settingFrame.setFrameShadow(QtGui.QFrame.Raised)
self.settingFrame.setObjectName(_fromUtf8("settingFrame"))
# system parameter group
self.groupBox_system = QtGui.QGroupBox(self.settingFrame)
self.groupBox_system.setGeometry(QtCore.QRect(20, 20, 261, 121))
self.groupBox_system.setStyleSheet(_fromUtf8("QGroupBox{border: 1px solid rgb(192, 192, 192); border-radius:9px; font: bold}+ QGroupBox::title{subcontrol-origin: margin; left: 10px; padding: 0px 3px 0 3px}"))
self.groupBox_system.setObjectName(_fromUtf8("groupBox_system"))
self.label_M1 = QtGui.QLabel(self.groupBox_system)
self.label_M1.setGeometry(QtCore.QRect(10, 40, 21, 17))
self.label_M1.setObjectName(_fromUtf8("label_M1"))
self.label_M2 = QtGui.QLabel(self.groupBox_system)
self.label_M2.setGeometry(QtCore.QRect(140, 40, 21, 17))
self.label_M2.setObjectName(_fromUtf8("label_M2"))
self.label_L1 = QtGui.QLabel(self.groupBox_system)
self.label_L1.setGeometry(QtCore.QRect(10, 90, 21, 17))
self.label_L1.setObjectName(_fromUtf8("label_L1"))
self.label_L2 = QtGui.QLabel(self.groupBox_system)
self.label_L2.setGeometry(QtCore.QRect(140, 90, 21, 17))
self.label_L2.setObjectName(_fromUtf8("label_L2"))
self.lineEdit_M1 = QtGui.QLineEdit(self.groupBox_system)
self.lineEdit_M1.setGeometry(QtCore.QRect(40, 30, 71, 27))
self.lineEdit_M1.setObjectName(_fromUtf8("lineEdit_M1"))
self.lineEdit_M2 = QtGui.QLineEdit(self.groupBox_system)
self.lineEdit_M2.setGeometry(QtCore.QRect(170, 30, 71, 27))
self.lineEdit_M2.setObjectName(_fromUtf8("lineEdit_M2"))
self.lineEdit_L1 = QtGui.QLineEdit(self.groupBox_system)
self.lineEdit_L1.setGeometry(QtCore.QRect(40, 80, 71, 27))
self.lineEdit_L1.setObjectName(_fromUtf8("lineEdit_L1"))
self.lineEdit_L2 = QtGui.QLineEdit(self.groupBox_system)
self.lineEdit_L2.setGeometry(QtCore.QRect(170, 80, 71, 27))
self.lineEdit_L2.setObjectName(_fromUtf8("lineEdit_L2"))
# initial condition group
self.groupBox_init = QtGui.QGroupBox(self.settingFrame)
self.groupBox_init.setGeometry(QtCore.QRect(20, 170, 261, 121))
self.groupBox_init.setStyleSheet(_fromUtf8("QGroupBox{border: 1px solid rgb(192, 192, 192); border-radius:9px; font: bold}+ QGroupBox::title{subcontrol-origin: margin; left: 10px; padding: 0px 3px 0 3px}"))
self.groupBox_init.setObjectName(_fromUtf8("groupBox_init"))
self.label_th1 = QtGui.QLabel(self.groupBox_init)
self.label_th1.setGeometry(QtCore.QRect(10, 40, 31, 17))
self.label_th1.setObjectName(_fromUtf8("label_th1"))
self.label_th2 = QtGui.QLabel(self.groupBox_init)
self.label_th2.setGeometry(QtCore.QRect(140, 40, 31, 17))
self.label_th2.setObjectName(_fromUtf8("label_th2"))
self.label_w1 = QtGui.QLabel(self.groupBox_init)
self.label_w1.setGeometry(QtCore.QRect(10, 90, 21, 17))
#.........这里部分代码省略.........