class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(681, 463) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("brain_icon2.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.graphicsView = ImageView(self.centralwidget) self.graphicsView.setMinimumSize(QtCore.QSize(450, 0)) self.graphicsView.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.horizontalLayout.addWidget(self.graphicsView) self.verticalLayout_2 = QtGui.QVBoxLayout() self.verticalLayout_2.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.btnLeft = QtGui.QPushButton(self.centralwidget) self.btnLeft.setObjectName(_fromUtf8("btnLeft")) self.horizontalLayout_2.addWidget(self.btnLeft) self.btnRight = QtGui.QPushButton(self.centralwidget) self.btnRight.setObjectName(_fromUtf8("btnRight")) self.horizontalLayout_2.addWidget(self.btnRight) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.listInfo = QtGui.QListWidget(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.listInfo.sizePolicy().hasHeightForWidth()) self.listInfo.setSizePolicy(sizePolicy) self.listInfo.setObjectName(_fromUtf8("listInfo")) self.verticalLayout_2.addWidget(self.listInfo) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.btnXtra = QtGui.QPushButton(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.btnXtra.sizePolicy().hasHeightForWidth()) self.btnXtra.setSizePolicy(sizePolicy) self.btnXtra.setObjectName(_fromUtf8("btnXtra")) self.horizontalLayout_3.addWidget(self.btnXtra) self.verticalLayout_2.addLayout(self.horizontalLayout_3) self.horizontalLayout.addLayout(self.verticalLayout_2) self.verticalLayout.addLayout(self.horizontalLayout) self.hSlider = QtGui.QSlider(self.centralwidget) self.hSlider.setOrientation(QtCore.Qt.Horizontal) self.hSlider.setObjectName(_fromUtf8("hSlider")) self.verticalLayout.addWidget(self.hSlider) MainWindow.setCentralWidget(self.centralwidget) self.menuBar = QtGui.QMenuBar(MainWindow) self.menuBar.setGeometry(QtCore.QRect(0, 0, 681, 21)) self.menuBar.setObjectName(_fromUtf8("menuBar")) self.menuFile = QtGui.QMenu(self.menuBar) self.menuFile.setObjectName(_fromUtf8("menuFile")) MainWindow.setMenuBar(self.menuBar) self.actionSelecionar_Pasta = QtGui.QAction(MainWindow) self.actionSelecionar_Pasta.setObjectName(_fromUtf8("actionSelecionar_Pasta")) self.menuFile.addAction(self.actionSelecionar_Pasta) self.menuBar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) self.btnLeft.setText(_translate("MainWindow", "<", None)) self.btnRight.setText(_translate("MainWindow", ">", None)) self.btnXtra.setText(_translate("MainWindow", "Outras funções", None)) self.menuFile.setTitle(_translate("MainWindow", "File", None)) self.actionSelecionar_Pasta.setText(_translate("MainWindow", "Selecionar Pasta", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1216, 857) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.frame = QtWidgets.QFrame(self.centralwidget) self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.gridLayout_20 = QtWidgets.QGridLayout(self.frame) self.gridLayout_20.setObjectName("gridLayout_20") self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") self.frame_13 = QtWidgets.QFrame(self.frame) self.frame_13.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_13.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_13.setObjectName("frame_13") self.gridLayout_18 = QtWidgets.QGridLayout(self.frame_13) self.gridLayout_18.setObjectName("gridLayout_18") self.verticalLayout_7 = QtWidgets.QVBoxLayout() self.verticalLayout_7.setObjectName("verticalLayout_7") self.frame_2 = QtWidgets.QFrame(self.frame_13) self.frame_2.setMaximumSize(QtCore.QSize(16777215, 200)) self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_2.setObjectName("frame_2") self.gridLayout_2 = QtWidgets.QGridLayout(self.frame_2) self.gridLayout_2.setContentsMargins(-1, 1, -1, 1) self.gridLayout_2.setObjectName("gridLayout_2") self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.verticalLayout_8 = QtWidgets.QVBoxLayout() self.verticalLayout_8.setObjectName("verticalLayout_8") self.label_7 = QtWidgets.QLabel(self.frame_2) self.label_7.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_7.setFont(font) self.label_7.setAlignment(QtCore.Qt.AlignCenter) self.label_7.setObjectName("label_7") self.verticalLayout_8.addWidget(self.label_7) self.originalImage = QtWidgets.QLabel(self.frame_2) self.originalImage.setMaximumSize(QtCore.QSize(150, 16777215)) self.originalImage.setPixmap(QtGui.QPixmap("test.jpg")) self.originalImage.setScaledContents(True) self.originalImage.setObjectName("originalImage") self.verticalLayout_8.addWidget(self.originalImage) self.horizontalLayout_4.addLayout(self.verticalLayout_8) self.verticalLayout_9 = QtWidgets.QVBoxLayout() self.verticalLayout_9.setObjectName("verticalLayout_9") self.label_8 = QtWidgets.QLabel(self.frame_2) self.label_8.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_8.setFont(font) self.label_8.setAlignment(QtCore.Qt.AlignCenter) self.label_8.setObjectName("label_8") self.verticalLayout_9.addWidget(self.label_8) self.grayScaleImage = ImageView(self.frame_2) self.grayScaleImage.setMaximumSize(QtCore.QSize(150, 16777215)) self.grayScaleImage.setObjectName("grayScaleImage") self.verticalLayout_9.addWidget(self.grayScaleImage) self.horizontalLayout_4.addLayout(self.verticalLayout_9) self.verticalLayout_13 = QtWidgets.QVBoxLayout() self.verticalLayout_13.setObjectName("verticalLayout_13") self.label_9 = QtWidgets.QLabel(self.frame_2) self.label_9.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_9.setFont(font) self.label_9.setAlignment(QtCore.Qt.AlignCenter) self.label_9.setObjectName("label_9") self.verticalLayout_13.addWidget(self.label_9) self.originalHistogram = PlotWidget(self.frame_2) self.originalHistogram.setObjectName("originalHistogram") self.verticalLayout_13.addWidget(self.originalHistogram) self.horizontalLayout_4.addLayout(self.verticalLayout_13) self.gridLayout_2.addLayout(self.horizontalLayout_4, 0, 0, 1, 1) self.verticalLayout_7.addWidget(self.frame_2) self.frame_16 = QtWidgets.QFrame(self.frame_13) self.frame_16.setMaximumSize(QtCore.QSize(16777215, 25)) self.frame_16.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_16.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_16.setObjectName("frame_16") self.gridLayout_15 = QtWidgets.QGridLayout(self.frame_16) self.gridLayout_15.setContentsMargins(-1, 1, -1, 1) self.gridLayout_15.setObjectName("gridLayout_15") self.label_11 = QtWidgets.QLabel(self.frame_16) self.label_11.setMaximumSize(QtCore.QSize(16777215, 20)) font = QtGui.QFont() font.setPointSize(12) self.label_11.setFont(font) self.label_11.setAlignment(QtCore.Qt.AlignCenter) self.label_11.setObjectName("label_11") self.gridLayout_15.addWidget(self.label_11, 0, 0, 1, 1) self.verticalLayout_7.addWidget(self.frame_16) self.frame_14 = QtWidgets.QFrame(self.frame_13) self.frame_14.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_14.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_14.setObjectName("frame_14") self.gridLayout_13 = QtWidgets.QGridLayout(self.frame_14) self.gridLayout_13.setContentsMargins(-1, 1, -1, 1) self.gridLayout_13.setObjectName("gridLayout_13") self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.verticalLayout_10 = QtWidgets.QVBoxLayout() self.verticalLayout_10.setObjectName("verticalLayout_10") self.redChannel = ImageView(self.frame_14) self.redChannel.setObjectName("redChannel") self.verticalLayout_10.addWidget(self.redChannel) self.horizontalLayout_5.addLayout(self.verticalLayout_10) self.verticalLayout_11 = QtWidgets.QVBoxLayout() self.verticalLayout_11.setObjectName("verticalLayout_11") self.greenChannel = ImageView(self.frame_14) self.greenChannel.setObjectName("greenChannel") self.verticalLayout_11.addWidget(self.greenChannel) self.horizontalLayout_5.addLayout(self.verticalLayout_11) self.verticalLayout_12 = QtWidgets.QVBoxLayout() self.verticalLayout_12.setObjectName("verticalLayout_12") self.blueChannel = ImageView(self.frame_14) self.blueChannel.setObjectName("blueChannel") self.verticalLayout_12.addWidget(self.blueChannel) self.horizontalLayout_5.addLayout(self.verticalLayout_12) self.gridLayout_13.addLayout(self.horizontalLayout_5, 0, 0, 1, 1) self.verticalLayout_7.addWidget(self.frame_14) self.frame_15 = QtWidgets.QFrame(self.frame_13) self.frame_15.setMinimumSize(QtCore.QSize(0, 0)) self.frame_15.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_15.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_15.setObjectName("frame_15") self.gridLayout_14 = QtWidgets.QGridLayout(self.frame_15) self.gridLayout_14.setContentsMargins(-1, 1, -1, 1) self.gridLayout_14.setObjectName("gridLayout_14") self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.verticalLayout_15 = QtWidgets.QVBoxLayout() self.verticalLayout_15.setObjectName("verticalLayout_15") self.label_12 = QtWidgets.QLabel(self.frame_15) self.label_12.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_12.setFont(font) self.label_12.setAlignment(QtCore.Qt.AlignCenter) self.label_12.setObjectName("label_12") self.verticalLayout_15.addWidget(self.label_12) self.imageOne = ImageView(self.frame_15) self.imageOne.setObjectName("imageOne") self.verticalLayout_15.addWidget(self.imageOne) self.horizontalLayout_6.addLayout(self.verticalLayout_15) self.verticalLayout_16 = QtWidgets.QVBoxLayout() self.verticalLayout_16.setObjectName("verticalLayout_16") self.label_13 = QtWidgets.QLabel(self.frame_15) self.label_13.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_13.setFont(font) self.label_13.setAlignment(QtCore.Qt.AlignCenter) self.label_13.setObjectName("label_13") self.verticalLayout_16.addWidget(self.label_13) self.imageTwo = ImageView(self.frame_15) self.imageTwo.setObjectName("imageTwo") self.verticalLayout_16.addWidget(self.imageTwo) self.horizontalLayout_6.addLayout(self.verticalLayout_16) self.verticalLayout_14 = QtWidgets.QVBoxLayout() self.verticalLayout_14.setObjectName("verticalLayout_14") self.label_10 = QtWidgets.QLabel(self.frame_15) self.label_10.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_10.setFont(font) self.label_10.setAlignment(QtCore.Qt.AlignCenter) self.label_10.setObjectName("label_10") self.verticalLayout_14.addWidget(self.label_10) self.mixedImage = ImageView(self.frame_15) self.mixedImage.setObjectName("mixedImage") self.verticalLayout_14.addWidget(self.mixedImage) self.horizontalLayout_6.addLayout(self.verticalLayout_14) self.gridLayout_14.addLayout(self.horizontalLayout_6, 0, 0, 1, 1) self.verticalLayout_7.addWidget(self.frame_15) self.frame_17 = QtWidgets.QFrame(self.frame_13) self.frame_17.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_17.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_17.setObjectName("frame_17") self.gridLayout_16 = QtWidgets.QGridLayout(self.frame_17) self.gridLayout_16.setContentsMargins(-1, 1, -1, 1) self.gridLayout_16.setObjectName("gridLayout_16") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.frame_18 = QtWidgets.QFrame(self.frame_17) self.frame_18.setMinimumSize(QtCore.QSize(0, 0)) self.frame_18.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_18.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_18.setObjectName("frame_18") self.gridLayout_17 = QtWidgets.QGridLayout(self.frame_18) self.gridLayout_17.setObjectName("gridLayout_17") self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.label_14 = QtWidgets.QLabel(self.frame_18) self.label_14.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_14.setFont(font) self.label_14.setAlignment(QtCore.Qt.AlignCenter) self.label_14.setObjectName("label_14") self.verticalLayout_2.addWidget(self.label_14) self.localThresholdImage = ImageView(self.frame_18) self.localThresholdImage.setMinimumSize(QtCore.QSize(0, 125)) self.localThresholdImage.setObjectName("localThresholdImage") self.verticalLayout_2.addWidget(self.localThresholdImage) self.gridLayout_17.addLayout(self.verticalLayout_2, 0, 0, 1, 1) self.horizontalLayout.addWidget(self.frame_18) self.localThreshSlider = QtWidgets.QSlider(self.frame_17) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Ignored) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.localThreshSlider.sizePolicy().hasHeightForWidth()) self.localThreshSlider.setSizePolicy(sizePolicy) self.localThreshSlider.setOrientation(QtCore.Qt.Vertical) self.localThreshSlider.setObjectName("localThreshSlider") self.horizontalLayout.addWidget(self.localThreshSlider) self.frame_19 = QtWidgets.QFrame(self.frame_17) self.frame_19.setMinimumSize(QtCore.QSize(0, 0)) self.frame_19.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_19.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_19.setObjectName("frame_19") self.gridLayout_3 = QtWidgets.QGridLayout(self.frame_19) self.gridLayout_3.setObjectName("gridLayout_3") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName("verticalLayout") self.label_15 = QtWidgets.QLabel(self.frame_19) self.label_15.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_15.setFont(font) self.label_15.setAlignment(QtCore.Qt.AlignCenter) self.label_15.setObjectName("label_15") self.verticalLayout.addWidget(self.label_15) self.globalThesholdImage = ImageView(self.frame_19) self.globalThesholdImage.setMinimumSize(QtCore.QSize(0, 125)) self.globalThesholdImage.setObjectName("globalThesholdImage") self.verticalLayout.addWidget(self.globalThesholdImage) self.gridLayout_3.addLayout(self.verticalLayout, 0, 0, 1, 1) self.horizontalLayout.addWidget(self.frame_19) self.globalThreshSlider = QtWidgets.QSlider(self.frame_17) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Ignored) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.globalThreshSlider.sizePolicy().hasHeightForWidth()) self.globalThreshSlider.setSizePolicy(sizePolicy) self.globalThreshSlider.setOrientation(QtCore.Qt.Vertical) self.globalThreshSlider.setObjectName("globalThreshSlider") self.horizontalLayout.addWidget(self.globalThreshSlider) self.gridLayout_16.addLayout(self.horizontalLayout, 0, 0, 1, 1) self.verticalLayout_7.addWidget(self.frame_17) self.gridLayout_18.addLayout(self.verticalLayout_7, 0, 0, 1, 1) self.horizontalLayout_8.addWidget(self.frame_13) self.frame_12 = QtWidgets.QFrame(self.frame) self.frame_12.setMinimumSize(QtCore.QSize(600, 0)) self.frame_12.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.frame_12.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_12.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_12.setObjectName("frame_12") self.gridLayout_19 = QtWidgets.QGridLayout(self.frame_12) self.gridLayout_19.setObjectName("gridLayout_19") self.verticalLayout_17 = QtWidgets.QVBoxLayout() self.verticalLayout_17.setObjectName("verticalLayout_17") self.frame_3 = QtWidgets.QFrame(self.frame_12) self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_3.setObjectName("frame_3") self.gridLayout_12 = QtWidgets.QGridLayout(self.frame_3) self.gridLayout_12.setContentsMargins(-1, 1, -1, 1) self.gridLayout_12.setObjectName("gridLayout_12") self.horizontalLayout_7 = QtWidgets.QHBoxLayout() self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.frame_4 = QtWidgets.QFrame(self.frame_3) self.frame_4.setMinimumSize(QtCore.QSize(0, 0)) self.frame_4.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_4.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_4.setObjectName("frame_4") self.gridLayout_5 = QtWidgets.QGridLayout(self.frame_4) self.gridLayout_5.setContentsMargins(-1, 1, -1, 1) self.gridLayout_5.setObjectName("gridLayout_5") self.label = QtWidgets.QLabel(self.frame_4) self.label.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label.setFont(font) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.gridLayout_5.addWidget(self.label, 0, 0, 1, 2) self.noiseOptions = QtWidgets.QComboBox(self.frame_4) self.noiseOptions.setObjectName("noiseOptions") self.noiseOptions.addItem("") self.noiseOptions.addItem("") self.noiseOptions.addItem("") self.gridLayout_5.addWidget(self.noiseOptions, 2, 0, 1, 1) self.noiseImage = ImageView(self.frame_4) self.noiseImage.setMinimumSize(QtCore.QSize(0, 0)) self.noiseImage.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.noiseImage.setObjectName("noiseImage") self.gridLayout_5.addWidget(self.noiseImage, 1, 0, 1, 2) self.noiseSlider = QtWidgets.QSlider(self.frame_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.noiseSlider.sizePolicy().hasHeightForWidth()) self.noiseSlider.setSizePolicy(sizePolicy) self.noiseSlider.setOrientation(QtCore.Qt.Horizontal) self.noiseSlider.setObjectName("noiseSlider") self.gridLayout_5.addWidget(self.noiseSlider, 2, 1, 1, 1) self.horizontalLayout_7.addWidget(self.frame_4) self.frame_5 = QtWidgets.QFrame(self.frame_3) self.frame_5.setMinimumSize(QtCore.QSize(0, 0)) self.frame_5.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_5.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_5.setObjectName("frame_5") self.gridLayout_4 = QtWidgets.QGridLayout(self.frame_5) self.gridLayout_4.setContentsMargins(-1, 1, -1, 1) self.gridLayout_4.setObjectName("gridLayout_4") self.filteredImage = ImageView(self.frame_5) self.filteredImage.setMinimumSize(QtCore.QSize(0, 0)) self.filteredImage.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.filteredImage.setObjectName("filteredImage") self.gridLayout_4.addWidget(self.filteredImage, 1, 0, 1, 1) self.filtersOptions = QtWidgets.QComboBox(self.frame_5) self.filtersOptions.setObjectName("filtersOptions") self.filtersOptions.addItem("") self.filtersOptions.addItem("") self.filtersOptions.addItem("") self.gridLayout_4.addWidget(self.filtersOptions, 2, 0, 1, 1) self.label_2 = QtWidgets.QLabel(self.frame_5) self.label_2.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_2.setFont(font) self.label_2.setAlignment(QtCore.Qt.AlignCenter) self.label_2.setObjectName("label_2") self.gridLayout_4.addWidget(self.label_2, 0, 0, 1, 1) self.horizontalLayout_7.addWidget(self.frame_5) self.gridLayout_12.addLayout(self.horizontalLayout_7, 0, 0, 1, 1) self.verticalLayout_17.addWidget(self.frame_3) self.frame_6 = QtWidgets.QFrame(self.frame_12) self.frame_6.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_6.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_6.setObjectName("frame_6") self.gridLayout_6 = QtWidgets.QGridLayout(self.frame_6) self.gridLayout_6.setContentsMargins(-1, 1, -1, 1) self.gridLayout_6.setObjectName("gridLayout_6") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.frame_7 = QtWidgets.QFrame(self.frame_6) self.frame_7.setMinimumSize(QtCore.QSize(0, 0)) self.frame_7.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_7.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_7.setObjectName("frame_7") self.gridLayout_7 = QtWidgets.QGridLayout(self.frame_7) self.gridLayout_7.setContentsMargins(-1, 1, -1, 1) self.gridLayout_7.setObjectName("gridLayout_7") self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.label_3 = QtWidgets.QLabel(self.frame_7) self.label_3.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_3.setFont(font) self.label_3.setAlignment(QtCore.Qt.AlignCenter) self.label_3.setObjectName("label_3") self.verticalLayout_3.addWidget(self.label_3) self.edgeDetectionImage = ImageView(self.frame_7) self.edgeDetectionImage.setObjectName("edgeDetectionImage") self.verticalLayout_3.addWidget(self.edgeDetectionImage) self.edgeDetectionOptions = QtWidgets.QComboBox(self.frame_7) self.edgeDetectionOptions.setObjectName("edgeDetectionOptions") self.edgeDetectionOptions.addItem("") self.edgeDetectionOptions.addItem("") self.edgeDetectionOptions.addItem("") self.verticalLayout_3.addWidget(self.edgeDetectionOptions) self.gridLayout_7.addLayout(self.verticalLayout_3, 0, 0, 1, 1) self.horizontalLayout_2.addWidget(self.frame_7) self.frame_8 = QtWidgets.QFrame(self.frame_6) self.frame_8.setMinimumSize(QtCore.QSize(0, 0)) self.frame_8.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_8.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_8.setObjectName("frame_8") self.gridLayout_8 = QtWidgets.QGridLayout(self.frame_8) self.gridLayout_8.setContentsMargins(-1, 1, -1, 1) self.gridLayout_8.setObjectName("gridLayout_8") self.verticalLayout_4 = QtWidgets.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.label_4 = QtWidgets.QLabel(self.frame_8) self.label_4.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_4.setFont(font) self.label_4.setAlignment(QtCore.Qt.AlignCenter) self.label_4.setObjectName("label_4") self.verticalLayout_4.addWidget(self.label_4) self.freqeuncyFilteredImage = ImageView(self.frame_8) self.freqeuncyFilteredImage.setObjectName("freqeuncyFilteredImage") self.verticalLayout_4.addWidget(self.freqeuncyFilteredImage) self.frequancyFiltersOptions = QtWidgets.QComboBox(self.frame_8) self.frequancyFiltersOptions.setObjectName("frequancyFiltersOptions") self.frequancyFiltersOptions.addItem("") self.frequancyFiltersOptions.addItem("") self.verticalLayout_4.addWidget(self.frequancyFiltersOptions) self.gridLayout_8.addLayout(self.verticalLayout_4, 0, 0, 1, 1) self.horizontalLayout_2.addWidget(self.frame_8) self.gridLayout_6.addLayout(self.horizontalLayout_2, 0, 0, 1, 1) self.verticalLayout_17.addWidget(self.frame_6) self.frame_9 = QtWidgets.QFrame(self.frame_12) self.frame_9.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.frame_9.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_9.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_9.setObjectName("frame_9") self.gridLayout_9 = QtWidgets.QGridLayout(self.frame_9) self.gridLayout_9.setContentsMargins(-1, 1, -1, 1) self.gridLayout_9.setObjectName("gridLayout_9") self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.frame_10 = QtWidgets.QFrame(self.frame_9) self.frame_10.setMinimumSize(QtCore.QSize(0, 0)) self.frame_10.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_10.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_10.setObjectName("frame_10") self.gridLayout_10 = QtWidgets.QGridLayout(self.frame_10) self.gridLayout_10.setContentsMargins(-1, 1, -1, 1) self.gridLayout_10.setObjectName("gridLayout_10") self.verticalLayout_5 = QtWidgets.QVBoxLayout() self.verticalLayout_5.setObjectName("verticalLayout_5") self.label_5 = QtWidgets.QLabel(self.frame_10) self.label_5.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_5.setFont(font) self.label_5.setAlignment(QtCore.Qt.AlignCenter) self.label_5.setObjectName("label_5") self.verticalLayout_5.addWidget(self.label_5) self.equalizedImage = ImageView(self.frame_10) self.equalizedImage.setObjectName("equalizedImage") self.verticalLayout_5.addWidget(self.equalizedImage) self.gridLayout_10.addLayout(self.verticalLayout_5, 0, 0, 1, 1) self.horizontalLayout_3.addWidget(self.frame_10) self.frame_11 = QtWidgets.QFrame(self.frame_9) self.frame_11.setMinimumSize(QtCore.QSize(0, 0)) self.frame_11.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_11.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_11.setObjectName("frame_11") self.gridLayout_11 = QtWidgets.QGridLayout(self.frame_11) self.gridLayout_11.setContentsMargins(-1, 1, -1, 1) self.gridLayout_11.setObjectName("gridLayout_11") self.verticalLayout_6 = QtWidgets.QVBoxLayout() self.verticalLayout_6.setObjectName("verticalLayout_6") self.label_6 = QtWidgets.QLabel(self.frame_11) self.label_6.setMaximumSize(QtCore.QSize(16777215, 25)) font = QtGui.QFont() font.setPointSize(12) self.label_6.setFont(font) self.label_6.setAlignment(QtCore.Qt.AlignCenter) self.label_6.setObjectName("label_6") self.verticalLayout_6.addWidget(self.label_6) self.normalizedImage = ImageView(self.frame_11) self.normalizedImage.setObjectName("normalizedImage") self.verticalLayout_6.addWidget(self.normalizedImage) self.gridLayout_11.addLayout(self.verticalLayout_6, 0, 0, 1, 1) self.horizontalLayout_3.addWidget(self.frame_11) self.gridLayout_9.addLayout(self.horizontalLayout_3, 0, 0, 1, 1) self.verticalLayout_17.addWidget(self.frame_9) self.gridLayout_19.addLayout(self.verticalLayout_17, 0, 0, 1, 1) self.horizontalLayout_8.addWidget(self.frame_12) self.gridLayout_20.addLayout(self.horizontalLayout_8, 0, 0, 1, 1) self.gridLayout.addWidget(self.frame, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1216, 26)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.label_7.setText(_translate("MainWindow", "Original Image")) self.label_8.setText(_translate("MainWindow", "Gray Scale Image")) self.label_9.setText(_translate("MainWindow", "Histogram")) self.label_11.setText(_translate("MainWindow", "Channels")) self.label_12.setText(_translate("MainWindow", "Image 1")) self.label_13.setText(_translate("MainWindow", "Image 2")) self.label_10.setText(_translate("MainWindow", "Mixed Image")) self.label_14.setText(_translate("MainWindow", "Local Threshold")) self.label_15.setText(_translate("MainWindow", "Global Threshold")) self.label.setText(_translate("MainWindow", "Noisy Image")) self.noiseOptions.setItemText(0, _translate("MainWindow", "Uniform")) self.noiseOptions.setItemText(1, _translate("MainWindow", "Guassian")) self.noiseOptions.setItemText(2, _translate("MainWindow", "Salt & Pepper")) self.filtersOptions.setItemText(0, _translate("MainWindow", "Average")) self.filtersOptions.setItemText(1, _translate("MainWindow", "Guassian")) self.filtersOptions.setItemText(2, _translate("MainWindow", "Median")) self.label_2.setText(_translate("MainWindow", "Filtered Image")) self.label_3.setText(_translate("MainWindow", "Image Edges")) self.edgeDetectionOptions.setItemText(0, _translate("MainWindow", "Sobel")) self.edgeDetectionOptions.setItemText(1, _translate("MainWindow", "Roberts")) self.edgeDetectionOptions.setItemText(2, _translate("MainWindow", "Prewitt")) self.label_4.setText(_translate("MainWindow", "Frequancy Filters")) self.frequancyFiltersOptions.setItemText(0, _translate("MainWindow", "LPF")) self.frequancyFiltersOptions.setItemText(1, _translate("MainWindow", "HPF")) self.label_5.setText(_translate("MainWindow", "Equalized Image")) self.label_6.setText(_translate("MainWindow", "Normalized Image"))
class Ui_MainWindow(object): def __init__(self): self._timer = QtCore.QTimer() self._number_of_clicked = 0 def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1101, 876) pg.setConfigOption('background', 'w') self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout_3.setObjectName("verticalLayout_3") self.formLayout = QtWidgets.QFormLayout() self.formLayout.setObjectName("formLayout") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setObjectName("label") self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label) self.comboBox_neighbourRule = QtWidgets.QComboBox(self.centralwidget) self.comboBox_neighbourRule.setObjectName("comboBox_2") self.comboBox_neighbourRule.addItem("") self.comboBox_neighbourRule.addItem("") self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.comboBox_neighbourRule) self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setObjectName("label_3") self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_3) self.comboBox_borderRule = QtWidgets.QComboBox(self.centralwidget) self.comboBox_borderRule.setObjectName("comboBox") self.comboBox_borderRule.addItem("") self.comboBox_borderRule.addItem("") self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.comboBox_borderRule) self.label_2 = QtWidgets.QLabel(self.centralwidget) self.label_2.setObjectName("label_2") self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_2) self.lineEdit_spaceSize = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_spaceSize.setObjectName("lineEdit") self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.lineEdit_spaceSize) self.label_4 = QtWidgets.QLabel(self.centralwidget) self.label_4.setObjectName("label_4") self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label_4) self.lineEdit_randomGrain = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_randomGrain.setObjectName("lineEdit_2") self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.lineEdit_randomGrain) self.pushButton_4 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_4.setObjectName("pushButton_4") self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.pushButton_4) self.lineEdit_3 = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_3.setObjectName("lineEdit_3") self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.lineEdit_3) self.pushButton_5 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_5.setObjectName("pushButton_5") self.formLayout.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.pushButton_5) self.radioButton = QtWidgets.QRadioButton(self.centralwidget) self.radioButton.setObjectName("radioButton") self.formLayout.setWidget(10, QtWidgets.QFormLayout.LabelRole, self.radioButton) self.verticalLayout_3.addLayout(self.formLayout) self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.verticalLayout.addItem(spacerItem) # Animation and displaying widget self.graphicsView = ImageView(self.centralwidget) self.graphicsView.setMinimumSize(QtCore.QSize(0, 500)) self.graphicsView.setObjectName("graphicsView") self.graphicsView.ui.histogram.hide() self.graphicsView.ui.roiBtn.hide() self.graphicsView.ui.menuBtn.hide() self.graphicsView.show() self.verticalLayout.addWidget(self.graphicsView) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.verticalLayout.addItem(spacerItem1) self.verticalLayout_3.addLayout(self.verticalLayout) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.pushButton_init = QtWidgets.QPushButton(self.centralwidget) self.pushButton_init.setObjectName("pushButton_init") self.pushButton_init.clicked.connect(self.init_ca_algo) self.verticalLayout_2.addWidget(self.pushButton_init) # Push button START/STOP self.pushButton_startStop = QtWidgets.QPushButton(self.centralwidget) self.pushButton_startStop.setObjectName("pushButton_3") self.pushButton_startStop.clicked.connect(self._init_image_timer) self.verticalLayout_2.addWidget(self.pushButton_startStop) self.pushButton_oneStep = QtWidgets.QPushButton(self.centralwidget) self.pushButton_oneStep.setObjectName("pushButton") self.pushButton_oneStep.clicked.connect(self._one_step) self.verticalLayout_2.addWidget(self.pushButton_oneStep) self.pushButton_clearSpace = QtWidgets.QPushButton(self.centralwidget) self.pushButton_clearSpace.setObjectName("pushButton_2") self.pushButton_clearSpace.clicked.connect(self._clear_space) self.verticalLayout_2.addWidget(self.pushButton_clearSpace) self.verticalLayout_3.addLayout(self.verticalLayout_2) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1101, 26)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.label.setText(_translate("MainWindow", "Neighbours rule")) self.comboBox_neighbourRule.setItemText( 0, _translate("MainWindow", "VONNEUMANN")) self.comboBox_neighbourRule.setItemText( 1, _translate("MainWindow", "MOORE")) self.label_3.setText(_translate("MainWindow", "Border rule")) self.comboBox_borderRule.setItemText( 0, _translate("MainWindow", "ABSORBING")) self.comboBox_borderRule.setItemText( 1, _translate("MainWindow", "SNAKELIKE")) self.label_2.setText(_translate("MainWindow", "Space size")) self.lineEdit_spaceSize.setText(_translate("MainWindow", "50")) self.label_4.setText(_translate("MainWindow", "Number of grains")) self.lineEdit_randomGrain.setText(_translate("MainWindow", "10")) self.pushButton_4.setText(_translate("MainWindow", "Import csv")) self.pushButton_5.setText(_translate("MainWindow", "Export csv")) self.radioButton.setText(_translate("MainWindow", "Extended mode")) self.pushButton_startStop.setText( _translate("MainWindow", "Start/Stop")) self.pushButton_oneStep.setText(_translate("MainWindow", "Step")) self.pushButton_clearSpace.setText( _translate("MainWindow", "Clear space")) self.pushButton_init.setText(_translate("MainWindow", "Init space")) def init_ca_algo(self): self._ca_algo = CellularAutomata( int(self.lineEdit_randomGrain.text()), int(self.lineEdit_spaceSize.text()), int(self.lineEdit_spaceSize.text()), str(self.comboBox_borderRule.currentText()), str(self.comboBox_neighbourRule.currentText())) self._ca_algo.add_random() self.generatePgColormap() self.graphicsView.setImage(self._ca_algo.space) def _init_image_timer(self): self._number_of_clicked += 1 if self._number_of_clicked % 2: self._timer.timeout.connect(self._update_func) self._timer.start(50) else: self._timer.stop() def _update_func(self): if self._ca_algo.cell_empty in self._ca_algo.space: self._ca_algo.one_step() self.graphicsView.setImage(self._ca_algo.space) def _clear_space(self): self._timer.stop() self._ca_algo.space = self._ca_algo.space_clear self.graphicsView.clear() def _one_step(self): self._timer.stop() self._ca_algo.one_step() self.graphicsView.setImage(self._ca_algo.space) def generatePgColormap(self): self.pos = np.linspace(0.0, 1.0, 2 + int(self.lineEdit_randomGrain.text())) self.cmap = pg.ColorMap(pos=self.pos, color=self._ca_algo.color_id) self.graphicsView.setColorMap(self.cmap)
class Ui_starlightCapture(object): def setupUi(self, starlightCapture): starlightCapture.setObjectName(_fromUtf8("starlightCapture")) starlightCapture.resize(964, 623) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("icon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) starlightCapture.setWindowIcon(icon) self.gridLayout = QtGui.QGridLayout(starlightCapture) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.verticalLayout_2 = QtGui.QVBoxLayout() self.verticalLayout_2.setSpacing(5) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.autolevelsBox = QtGui.QCheckBox(starlightCapture) self.autolevelsBox.setChecked(True) self.autolevelsBox.setObjectName(_fromUtf8("autolevelsBox")) self.verticalLayout_2.addWidget(self.autolevelsBox) self.eqHistBox = QtGui.QCheckBox(starlightCapture) self.eqHistBox.setObjectName(_fromUtf8("eqHistBox")) self.verticalLayout_2.addWidget(self.eqHistBox) self.horizFlipCheckBox = QtGui.QCheckBox(starlightCapture) self.horizFlipCheckBox.setObjectName(_fromUtf8("horizFlipCheckBox")) self.verticalLayout_2.addWidget(self.horizFlipCheckBox) self.vertFlipCheckBox = QtGui.QCheckBox(starlightCapture) self.vertFlipCheckBox.setObjectName(_fromUtf8("vertFlipCheckBox")) self.verticalLayout_2.addWidget(self.vertFlipCheckBox) self.crossLinesCheckBox = QtGui.QCheckBox(starlightCapture) self.crossLinesCheckBox.setEnabled(True) self.crossLinesCheckBox.setChecked(False) self.crossLinesCheckBox.setObjectName(_fromUtf8("crossLinesCheckBox")) self.verticalLayout_2.addWidget(self.crossLinesCheckBox) self.crossLinesMaxCheckBox = QtGui.QCheckBox(starlightCapture) self.crossLinesMaxCheckBox.setObjectName( _fromUtf8("crossLinesMaxCheckBox")) self.verticalLayout_2.addWidget(self.crossLinesMaxCheckBox) self.setCrossLinesToMaxButton = QtGui.QPushButton(starlightCapture) self.setCrossLinesToMaxButton.setObjectName( _fromUtf8("setCrossLinesToMaxButton")) self.verticalLayout_2.addWidget(self.setCrossLinesToMaxButton) self.verticalLayout.addLayout(self.verticalLayout_2) self.gridLayout_2 = QtGui.QGridLayout() self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.lcdAmplitude = QtGui.QLCDNumber(starlightCapture) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lcdAmplitude.sizePolicy().hasHeightForWidth()) self.lcdAmplitude.setSizePolicy(sizePolicy) self.lcdAmplitude.setMinimumSize(QtCore.QSize(0, 50)) self.lcdAmplitude.setObjectName(_fromUtf8("lcdAmplitude")) self.gridLayout_2.addWidget(self.lcdAmplitude, 0, 1, 1, 1) self.label_7 = QtGui.QLabel(starlightCapture) font = QtGui.QFont() font.setPointSize(12) self.label_7.setFont(font) self.label_7.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_7.setObjectName(_fromUtf8("label_7")) self.gridLayout_2.addWidget(self.label_7, 0, 0, 1, 1) self.lcdFwhm = QtGui.QLCDNumber(starlightCapture) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lcdFwhm.sizePolicy().hasHeightForWidth()) self.lcdFwhm.setSizePolicy(sizePolicy) self.lcdFwhm.setMinimumSize(QtCore.QSize(0, 50)) self.lcdFwhm.setProperty("value", 0.0) self.lcdFwhm.setObjectName(_fromUtf8("lcdFwhm")) self.gridLayout_2.addWidget(self.lcdFwhm, 1, 1, 1, 1) self.label_8 = QtGui.QLabel(starlightCapture) font = QtGui.QFont() font.setPointSize(12) self.label_8.setFont(font) self.label_8.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_8.setObjectName(_fromUtf8("label_8")) self.gridLayout_2.addWidget(self.label_8, 1, 0, 1, 1) self.verticalLayout.addLayout(self.gridLayout_2) self.satIndicator = QtGui.QLabel(starlightCapture) font = QtGui.QFont() font.setPointSize(26) self.satIndicator.setFont(font) self.satIndicator.setAlignment(QtCore.Qt.AlignCenter) self.satIndicator.setObjectName(_fromUtf8("satIndicator")) self.verticalLayout.addWidget(self.satIndicator) spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout.addItem(spacerItem) self.formLayout = QtGui.QFormLayout() self.formLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize) self.formLayout.setFieldGrowthPolicy( QtGui.QFormLayout.FieldsStayAtSizeHint) self.formLayout.setSpacing(5) self.formLayout.setObjectName(_fromUtf8("formLayout")) self.label_2 = QtGui.QLabel(starlightCapture) self.label_2.setObjectName(_fromUtf8("label_2")) self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_2) self.cameraID = QtGui.QSpinBox(starlightCapture) self.cameraID.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.cameraID.setObjectName(_fromUtf8("cameraID")) self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.cameraID) self.label_4 = QtGui.QLabel(starlightCapture) self.label_4.setObjectName(_fromUtf8("label_4")) self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_4) self.modelName = QtGui.QLineEdit(starlightCapture) self.modelName.setEnabled(False) self.modelName.setObjectName(_fromUtf8("modelName")) self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.modelName) self.label = QtGui.QLabel(starlightCapture) self.label.setObjectName(_fromUtf8("label")) self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.label) self.exposureTime = QtGui.QDoubleSpinBox(starlightCapture) self.exposureTime.setDecimals(3) self.exposureTime.setMinimum(0.001) self.exposureTime.setMaximum(3600.0) self.exposureTime.setSingleStep(0.1) self.exposureTime.setProperty("value", 0.01) self.exposureTime.setObjectName(_fromUtf8("exposureTime")) self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.exposureTime) self.label_5 = QtGui.QLabel(starlightCapture) self.label_5.setObjectName(_fromUtf8("label_5")) self.formLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.label_5) self.ilAcq = QtGui.QCheckBox(starlightCapture) self.ilAcq.setEnabled(False) self.ilAcq.setText(_fromUtf8("")) self.ilAcq.setObjectName(_fromUtf8("ilAcq")) self.formLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.ilAcq) self.label_6 = QtGui.QLabel(starlightCapture) self.label_6.setObjectName(_fromUtf8("label_6")) self.formLayout.setWidget(5, QtGui.QFormLayout.LabelRole, self.label_6) self.ilDoubleExpo = QtGui.QCheckBox(starlightCapture) self.ilDoubleExpo.setEnabled(False) self.ilDoubleExpo.setText(_fromUtf8("")) self.ilDoubleExpo.setObjectName(_fromUtf8("ilDoubleExpo")) self.formLayout.setWidget(5, QtGui.QFormLayout.FieldRole, self.ilDoubleExpo) spacerItem1 = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Maximum) self.formLayout.setItem(3, QtGui.QFormLayout.FieldRole, spacerItem1) self.verticalLayout.addLayout(self.formLayout) spacerItem2 = QtGui.QSpacerItem(20, 1, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Maximum) self.verticalLayout.addItem(spacerItem2) self.verticalLayout_3 = QtGui.QVBoxLayout() self.verticalLayout_3.setSpacing(0) self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.label_3 = QtGui.QLabel(starlightCapture) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_3.sizePolicy().hasHeightForWidth()) self.label_3.setSizePolicy(sizePolicy) self.label_3.setObjectName(_fromUtf8("label_3")) self.verticalLayout_3.addWidget(self.label_3) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setSizeConstraint(QtGui.QLayout.SetFixedSize) self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.selectFileLineEdit = QtGui.QLineEdit(starlightCapture) self.selectFileLineEdit.setObjectName(_fromUtf8("selectFileLineEdit")) self.horizontalLayout_3.addWidget(self.selectFileLineEdit) self.selectFileBut = QtGui.QPushButton(starlightCapture) self.selectFileBut.setMinimumSize(QtCore.QSize(60, 0)) self.selectFileBut.setMaximumSize(QtCore.QSize(50, 16777215)) self.selectFileBut.setObjectName(_fromUtf8("selectFileBut")) self.horizontalLayout_3.addWidget(self.selectFileBut) self.verticalLayout_3.addLayout(self.horizontalLayout_3) self.verticalLayout.addLayout(self.verticalLayout_3) self.captureBox = QtGui.QCheckBox(starlightCapture) self.captureBox.setObjectName(_fromUtf8("captureBox")) self.verticalLayout.addWidget(self.captureBox) spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout.addItem(spacerItem3) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.startBut = QtGui.QPushButton(starlightCapture) self.startBut.setObjectName(_fromUtf8("startBut")) self.horizontalLayout_2.addWidget(self.startBut) self.stopBut = QtGui.QPushButton(starlightCapture) self.stopBut.setObjectName(_fromUtf8("stopBut")) self.horizontalLayout_2.addWidget(self.stopBut) self.verticalLayout.addLayout(self.horizontalLayout_2) self.progressBar = QtGui.QProgressBar(starlightCapture) self.progressBar.setEnabled(True) self.progressBar.setMinimumSize(QtCore.QSize(0, 15)) self.progressBar.setMaximumSize(QtCore.QSize(16777215, 15)) self.progressBar.setStyleSheet(_fromUtf8("")) self.progressBar.setProperty("value", 0) self.progressBar.setTextVisible(True) self.progressBar.setInvertedAppearance(False) self.progressBar.setObjectName(_fromUtf8("progressBar")) self.verticalLayout.addWidget(self.progressBar) self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1) self.image = ImageView(starlightCapture) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(1) sizePolicy.setHeightForWidth( self.image.sizePolicy().hasHeightForWidth()) self.image.setSizePolicy(sizePolicy) self.image.setMinimumSize(QtCore.QSize(600, 450)) self.image.setObjectName(_fromUtf8("image")) self.gridLayout.addWidget(self.image, 0, 2, 1, 1) self.retranslateUi(starlightCapture) QtCore.QMetaObject.connectSlotsByName(starlightCapture) def retranslateUi(self, starlightCapture): starlightCapture.setWindowTitle( _translate("starlightCapture", "Starlight Capture", None)) self.autolevelsBox.setText( _translate("starlightCapture", "Auto-levels", None)) self.eqHistBox.setText( _translate("starlightCapture", "Equalize histogram", None)) self.horizFlipCheckBox.setText( _translate("starlightCapture", "Horizontal flipping", None)) self.vertFlipCheckBox.setText( _translate("starlightCapture", "Vertical flipping", None)) self.crossLinesCheckBox.setText( _translate("starlightCapture", "Cross lines (manual marker)", None)) self.crossLinesMaxCheckBox.setText( _translate("starlightCapture", "Cross lines (auto center of mass)", None)) self.setCrossLinesToMaxButton.setText( _translate("starlightCapture", "Set marker to center of mass", None)) self.label_7.setText(_translate("starlightCapture", "MAX - MIN", None)) self.label_8.setText(_translate("starlightCapture", "FWHM", None)) self.satIndicator.setText( _translate("starlightCapture", "SATURATING", None)) self.label_2.setText( _translate("starlightCapture", "Camera ID number:", None)) self.label_4.setText( _translate("starlightCapture", "Camera model:", None)) self.label.setText( _translate("starlightCapture", "Exposure time (s):", None)) self.label_5.setText( _translate("starlightCapture", "InterLacing acq.:", None)) self.label_6.setText( _translate("starlightCapture", "IL corr double expo:", None)) self.label_3.setText( _translate("starlightCapture", "Saving directory:", None)) self.selectFileBut.setText( _translate("starlightCapture", "Select", None)) self.captureBox.setText(_translate("starlightCapture", "Capture", None)) self.startBut.setText(_translate("starlightCapture", "Start", None)) self.stopBut.setText(_translate("starlightCapture", "Stop", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1057, 890) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.frame = QtWidgets.QFrame(self.centralwidget) self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.horizontalLayout_9 = QtWidgets.QHBoxLayout(self.frame) self.horizontalLayout_9.setObjectName("horizontalLayout_9") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.label_4 = QtWidgets.QLabel(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_4.sizePolicy().hasHeightForWidth()) self.label_4.setSizePolicy(sizePolicy) self.label_4.setMaximumSize(QtCore.QSize(16777215, 27)) font = QtGui.QFont() font.setFamily("URW Bookman [urw]") font.setPointSize(16) font.setBold(True) font.setWeight(75) self.label_4.setFont(font) self.label_4.setTextFormat(QtCore.Qt.AutoText) self.label_4.setAlignment(QtCore.Qt.AlignCenter) self.label_4.setObjectName("label_4") self.verticalLayout.addWidget(self.label_4) self.img1_view = ImageView(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.img1_view.sizePolicy().hasHeightForWidth()) self.img1_view.setSizePolicy(sizePolicy) self.img1_view.setMinimumSize(QtCore.QSize(0, 0)) self.img1_view.setObjectName("img1_view") self.verticalLayout.addWidget(self.img1_view) self.horizontalLayout_9.addLayout(self.verticalLayout) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.comboBox = QtWidgets.QComboBox(self.frame) self.comboBox.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.comboBox.sizePolicy().hasHeightForWidth()) self.comboBox.setSizePolicy(sizePolicy) self.comboBox.setMaximumSize(QtCore.QSize(16777215, 51)) font = QtGui.QFont() font.setFamily("Ubuntu") font.setPointSize(12) self.comboBox.setFont(font) self.comboBox.setObjectName("comboBox") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.verticalLayout_2.addWidget(self.comboBox) self.img1_comp = ImageView(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.img1_comp.sizePolicy().hasHeightForWidth()) self.img1_comp.setSizePolicy(sizePolicy) self.img1_comp.setMinimumSize(QtCore.QSize(0, 0)) self.img1_comp.setObjectName("img1_comp") self.verticalLayout_2.addWidget(self.img1_comp) self.horizontalLayout_9.addLayout(self.verticalLayout_2) self.gridLayout.addWidget(self.frame, 0, 0, 1, 1) self.frame_4 = QtWidgets.QFrame(self.centralwidget) self.frame_4.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_4.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_4.setObjectName("frame_4") self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.frame_4) self.verticalLayout_5.setObjectName("verticalLayout_5") self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.label_6 = QtWidgets.QLabel(self.frame_4) font = QtGui.QFont() font.setFamily("URW Bookman [urw]") font.setPointSize(16) self.label_6.setFont(font) self.label_6.setObjectName("label_6") self.horizontalLayout_4.addWidget(self.label_6) self.comboBox_3 = QtWidgets.QComboBox(self.frame_4) self.comboBox_3.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.comboBox_3.sizePolicy().hasHeightForWidth()) self.comboBox_3.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.comboBox_3.setFont(font) self.comboBox_3.setObjectName("comboBox_3") self.comboBox_3.addItem("") self.comboBox_3.addItem("") self.horizontalLayout_4.addWidget(self.comboBox_3) self.verticalLayout_5.addLayout(self.horizontalLayout_4) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.label_7 = QtWidgets.QLabel(self.frame_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_7.sizePolicy().hasHeightForWidth()) self.label_7.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("URW Bookman [urw]") font.setPointSize(12) self.label_7.setFont(font) self.label_7.setObjectName("label_7") self.horizontalLayout_5.addWidget(self.label_7) self.comboBox_4 = QtWidgets.QComboBox(self.frame_4) self.comboBox_4.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.comboBox_4.sizePolicy().hasHeightForWidth()) self.comboBox_4.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.comboBox_4.setFont(font) self.comboBox_4.setObjectName("comboBox_4") self.comboBox_4.addItem("") self.comboBox_4.addItem("") self.horizontalLayout_5.addWidget(self.comboBox_4) spacerItem = QtWidgets.QSpacerItem(50, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem) self.horizontalSlider = QtWidgets.QSlider(self.frame_4) self.horizontalSlider.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.horizontalSlider.sizePolicy().hasHeightForWidth()) self.horizontalSlider.setSizePolicy(sizePolicy) self.horizontalSlider.setMaximum(100) self.horizontalSlider.setProperty("value", 100) self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider.setObjectName("horizontalSlider") self.horizontalLayout_5.addWidget(self.horizontalSlider) self.verticalLayout_5.addLayout(self.horizontalLayout_5) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") spacerItem1 = QtWidgets.QSpacerItem(334, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem1) self.label_10 = QtWidgets.QLabel(self.frame_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_10.sizePolicy().hasHeightForWidth()) self.label_10.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("URW Bookman [urw]") font.setPointSize(16) self.label_10.setFont(font) self.label_10.setAlignment(QtCore.Qt.AlignCenter) self.label_10.setObjectName("label_10") self.horizontalLayout_2.addWidget(self.label_10) self.verticalLayout_5.addLayout(self.horizontalLayout_2) self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") spacerItem2 = QtWidgets.QSpacerItem(120, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_8.addItem(spacerItem2) self.comboBox_5 = QtWidgets.QComboBox(self.frame_4) self.comboBox_5.setEnabled(False) self.comboBox_5.setObjectName("comboBox_5") self.comboBox_5.addItem("") self.comboBox_5.addItem("") self.comboBox_5.addItem("") self.comboBox_5.addItem("") self.comboBox_5.addItem("") self.comboBox_5.addItem("") self.horizontalLayout_8.addWidget(self.comboBox_5) self.verticalLayout_5.addLayout(self.horizontalLayout_8) self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.label_8 = QtWidgets.QLabel(self.frame_4) font = QtGui.QFont() font.setFamily("URW Bookman [urw]") font.setPointSize(12) self.label_8.setFont(font) self.label_8.setObjectName("label_8") self.horizontalLayout_6.addWidget(self.label_8) self.comboBox_6 = QtWidgets.QComboBox(self.frame_4) self.comboBox_6.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.comboBox_6.sizePolicy().hasHeightForWidth()) self.comboBox_6.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.comboBox_6.setFont(font) self.comboBox_6.setObjectName("comboBox_6") self.comboBox_6.addItem("") self.comboBox_6.addItem("") self.horizontalLayout_6.addWidget(self.comboBox_6) spacerItem3 = QtWidgets.QSpacerItem(50, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem3) self.horizontalSlider_2 = QtWidgets.QSlider(self.frame_4) self.horizontalSlider_2.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.horizontalSlider_2.sizePolicy().hasHeightForWidth()) self.horizontalSlider_2.setSizePolicy(sizePolicy) self.horizontalSlider_2.setMaximum(100) self.horizontalSlider_2.setProperty("value", 100) self.horizontalSlider_2.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_2.setObjectName("horizontalSlider_2") self.horizontalLayout_6.addWidget(self.horizontalSlider_2) self.verticalLayout_5.addLayout(self.horizontalLayout_6) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") spacerItem4 = QtWidgets.QSpacerItem(334, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem4) self.label_11 = QtWidgets.QLabel(self.frame_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_11.sizePolicy().hasHeightForWidth()) self.label_11.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("URW Bookman [urw]") font.setPointSize(16) self.label_11.setFont(font) self.label_11.setAlignment(QtCore.Qt.AlignCenter) self.label_11.setObjectName("label_11") self.horizontalLayout_3.addWidget(self.label_11) self.verticalLayout_5.addLayout(self.horizontalLayout_3) self.horizontalLayout_7 = QtWidgets.QHBoxLayout() self.horizontalLayout_7.setObjectName("horizontalLayout_7") spacerItem5 = QtWidgets.QSpacerItem(120, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_7.addItem(spacerItem5) self.comboBox_7 = QtWidgets.QComboBox(self.frame_4) self.comboBox_7.setEnabled(False) self.comboBox_7.setObjectName("comboBox_7") self.comboBox_7.addItem("") self.comboBox_7.addItem("") self.comboBox_7.addItem("") self.comboBox_7.addItem("") self.comboBox_7.addItem("") self.comboBox_7.addItem("") self.horizontalLayout_7.addWidget(self.comboBox_7) self.verticalLayout_5.addLayout(self.horizontalLayout_7) self.gridLayout.addWidget(self.frame_4, 0, 1, 1, 1) self.frame_2 = QtWidgets.QFrame(self.centralwidget) self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_2.setObjectName("frame_2") self.horizontalLayout_10 = QtWidgets.QHBoxLayout(self.frame_2) self.horizontalLayout_10.setObjectName("horizontalLayout_10") self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.label_3 = QtWidgets.QLabel(self.frame_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_3.sizePolicy().hasHeightForWidth()) self.label_3.setSizePolicy(sizePolicy) self.label_3.setMaximumSize(QtCore.QSize(16777215, 27)) font = QtGui.QFont() font.setFamily("URW Bookman [urw]") font.setPointSize(16) font.setBold(True) font.setWeight(75) self.label_3.setFont(font) self.label_3.setTextFormat(QtCore.Qt.AutoText) self.label_3.setAlignment(QtCore.Qt.AlignCenter) self.label_3.setObjectName("label_3") self.verticalLayout_3.addWidget(self.label_3) self.img2_view = ImageView(self.frame_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.img2_view.sizePolicy().hasHeightForWidth()) self.img2_view.setSizePolicy(sizePolicy) self.img2_view.setMinimumSize(QtCore.QSize(0, 0)) self.img2_view.setObjectName("img2_view") self.verticalLayout_3.addWidget(self.img2_view) self.horizontalLayout_10.addLayout(self.verticalLayout_3) self.verticalLayout_4 = QtWidgets.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.comboBox_2 = QtWidgets.QComboBox(self.frame_2) self.comboBox_2.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.comboBox_2.sizePolicy().hasHeightForWidth()) self.comboBox_2.setSizePolicy(sizePolicy) self.comboBox_2.setSizeIncrement(QtCore.QSize(0, 20)) font = QtGui.QFont() font.setFamily("Ubuntu") font.setPointSize(12) self.comboBox_2.setFont(font) self.comboBox_2.setObjectName("comboBox_2") self.comboBox_2.addItem("") self.comboBox_2.addItem("") self.comboBox_2.addItem("") self.comboBox_2.addItem("") self.verticalLayout_4.addWidget(self.comboBox_2) self.img2_comp = ImageView(self.frame_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.img2_comp.sizePolicy().hasHeightForWidth()) self.img2_comp.setSizePolicy(sizePolicy) self.img2_comp.setMinimumSize(QtCore.QSize(0, 0)) self.img2_comp.setObjectName("img2_comp") self.verticalLayout_4.addWidget(self.img2_comp) self.horizontalLayout_10.addLayout(self.verticalLayout_4) self.gridLayout.addWidget(self.frame_2, 1, 0, 1, 1) self.frame_3 = QtWidgets.QFrame(self.centralwidget) self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_3.setObjectName("frame_3") self.horizontalLayout = QtWidgets.QHBoxLayout(self.frame_3) self.horizontalLayout.setObjectName("horizontalLayout") self.verticalLayout_11 = QtWidgets.QVBoxLayout() self.verticalLayout_11.setObjectName("verticalLayout_11") self.label_5 = QtWidgets.QLabel(self.frame_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_5.sizePolicy().hasHeightForWidth()) self.label_5.setSizePolicy(sizePolicy) self.label_5.setMaximumSize(QtCore.QSize(16777215, 27)) font = QtGui.QFont() font.setFamily("URW Bookman [urw]") font.setPointSize(16) font.setBold(True) font.setWeight(75) self.label_5.setFont(font) self.label_5.setTextFormat(QtCore.Qt.AutoText) self.label_5.setAlignment(QtCore.Qt.AlignCenter) self.label_5.setObjectName("label_5") self.verticalLayout_11.addWidget(self.label_5) self.output1 = ImageView(self.frame_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.output1.sizePolicy().hasHeightForWidth()) self.output1.setSizePolicy(sizePolicy) self.output1.setMinimumSize(QtCore.QSize(0, 0)) self.output1.setObjectName("output1") self.verticalLayout_11.addWidget(self.output1) self.horizontalLayout.addLayout(self.verticalLayout_11) self.verticalLayout_10 = QtWidgets.QVBoxLayout() self.verticalLayout_10.setObjectName("verticalLayout_10") self.label_9 = QtWidgets.QLabel(self.frame_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_9.sizePolicy().hasHeightForWidth()) self.label_9.setSizePolicy(sizePolicy) self.label_9.setMaximumSize(QtCore.QSize(16777215, 27)) font = QtGui.QFont() font.setFamily("URW Bookman [urw]") font.setPointSize(16) font.setBold(True) font.setWeight(75) self.label_9.setFont(font) self.label_9.setTextFormat(QtCore.Qt.AutoText) self.label_9.setAlignment(QtCore.Qt.AlignCenter) self.label_9.setObjectName("label_9") self.verticalLayout_10.addWidget(self.label_9) self.output2 = ImageView(self.frame_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.output2.sizePolicy().hasHeightForWidth()) self.output2.setSizePolicy(sizePolicy) self.output2.setMinimumSize(QtCore.QSize(0, 0)) self.output2.setObjectName("output2") self.verticalLayout_10.addWidget(self.output2) self.horizontalLayout.addLayout(self.verticalLayout_10) self.gridLayout.addWidget(self.frame_3, 1, 1, 1, 1) self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.pushButton.setEnabled(False) font = QtGui.QFont() font.setFamily("URW Bookman [urw]") font.setPointSize(14) self.pushButton.setFont(font) self.pushButton.setObjectName("pushButton") self.gridLayout.addWidget(self.pushButton, 2, 0, 1, 2) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1057, 22)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionOpen = QtWidgets.QAction(MainWindow) self.actionOpen.setObjectName("actionOpen") self.menuFile.addAction(self.actionOpen) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.label_4.setText(_translate("MainWindow", "Image 1")) self.comboBox.setItemText(0, _translate("MainWindow", "Mag")) self.comboBox.setItemText(1, _translate("MainWindow", "Phase")) self.comboBox.setItemText(2, _translate("MainWindow", "Real")) self.comboBox.setItemText(3, _translate("MainWindow", "Imag")) self.label_6.setText(_translate("MainWindow", "Mixer output to:")) self.comboBox_3.setItemText(0, _translate("MainWindow", "Output 1")) self.comboBox_3.setItemText(1, _translate("MainWindow", "Output 2")) self.label_7.setText(_translate("MainWindow", "Component 1:")) self.comboBox_4.setItemText(0, _translate("MainWindow", "Img 1")) self.comboBox_4.setItemText(1, _translate("MainWindow", "Img 2")) self.label_10.setText(_translate("MainWindow", "100%")) self.comboBox_5.setItemText(0, _translate("MainWindow", "Mag")) self.comboBox_5.setItemText(1, _translate("MainWindow", "Phase")) self.comboBox_5.setItemText(2, _translate("MainWindow", "Real")) self.comboBox_5.setItemText(3, _translate("MainWindow", "Imag")) self.comboBox_5.setItemText(4, _translate("MainWindow", "uniMag")) self.comboBox_5.setItemText(5, _translate("MainWindow", "uniPhase")) self.label_8.setText(_translate("MainWindow", "Component 2:")) self.comboBox_6.setItemText(0, _translate("MainWindow", "Img 1")) self.comboBox_6.setItemText(1, _translate("MainWindow", "Img 2")) self.label_11.setText(_translate("MainWindow", "100%")) self.comboBox_7.setItemText(0, _translate("MainWindow", "Mag")) self.comboBox_7.setItemText(1, _translate("MainWindow", "Phase")) self.comboBox_7.setItemText(2, _translate("MainWindow", "Real")) self.comboBox_7.setItemText(3, _translate("MainWindow", "Imag")) self.comboBox_7.setItemText(4, _translate("MainWindow", "uniMag")) self.comboBox_7.setItemText(5, _translate("MainWindow", "uniPhase")) self.label_3.setText(_translate("MainWindow", "Image 2")) self.comboBox_2.setItemText(0, _translate("MainWindow", "Mag")) self.comboBox_2.setItemText(1, _translate("MainWindow", "Phase")) self.comboBox_2.setItemText(2, _translate("MainWindow", "Real")) self.comboBox_2.setItemText(3, _translate("MainWindow", "Imag")) self.label_5.setText(_translate("MainWindow", "Output 1")) self.label_9.setText(_translate("MainWindow", "Output 2")) self.pushButton.setText(_translate("MainWindow", "Reset")) self.menuFile.setTitle(_translate("MainWindow", "File")) self.actionOpen.setText(_translate("MainWindow", "Open"))
class Ui_ItemViewer(object): def setupUi(self, ItemViewer): ItemViewer.setObjectName(_fromUtf8("ItemViewer")) ItemViewer.resize(716, 471) self.verticalLayout_2 = QtGui.QVBoxLayout(ItemViewer) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.backButton = QtGui.QToolButton(ItemViewer) self.backButton.setText(_fromUtf8("")) self.backButton.setObjectName(_fromUtf8("backButton")) self.horizontalLayout_2.addWidget(self.backButton) self.playButton = QtGui.QToolButton(ItemViewer) self.playButton.setText(_fromUtf8("")) self.playButton.setObjectName(_fromUtf8("playButton")) self.horizontalLayout_2.addWidget(self.playButton) self.forwardButton = QtGui.QToolButton(ItemViewer) self.forwardButton.setText(_fromUtf8("")) self.forwardButton.setObjectName(_fromUtf8("forwardButton")) self.horizontalLayout_2.addWidget(self.forwardButton) self.orderGroupBox = QtGui.QGroupBox(ItemViewer) self.orderGroupBox.setTitle(_fromUtf8("")) self.orderGroupBox.setFlat(True) self.orderGroupBox.setObjectName(_fromUtf8("orderGroupBox")) self.horizontalLayout = QtGui.QHBoxLayout(self.orderGroupBox) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.originalRadioButton = QtGui.QRadioButton(self.orderGroupBox) self.originalRadioButton.setObjectName( _fromUtf8("originalRadioButton")) self.horizontalLayout.addWidget(self.originalRadioButton) self.sortedRadioButton = QtGui.QRadioButton(self.orderGroupBox) self.sortedRadioButton.setChecked(True) self.sortedRadioButton.setObjectName(_fromUtf8("sortedRadioButton")) self.horizontalLayout.addWidget(self.sortedRadioButton) self.randomRadioButton = QtGui.QRadioButton(self.orderGroupBox) self.randomRadioButton.setObjectName(_fromUtf8("randomRadioButton")) self.horizontalLayout.addWidget(self.randomRadioButton) self.horizontalLayout_2.addWidget(self.orderGroupBox) spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem) self.label = QtGui.QLabel(ItemViewer) self.label.setObjectName(_fromUtf8("label")) self.horizontalLayout_2.addWidget(self.label) self.rowSpinBox = ItemSpinBox(ItemViewer) self.rowSpinBox.setMaximum(9999999) self.rowSpinBox.setObjectName(_fromUtf8("rowSpinBox")) self.horizontalLayout_2.addWidget(self.rowSpinBox) self.flagCheckBox = QtGui.QCheckBox(ItemViewer) self.flagCheckBox.setObjectName(_fromUtf8("flagCheckBox")) self.horizontalLayout_2.addWidget(self.flagCheckBox) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.splitter = QtGui.QSplitter(ItemViewer) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.splitter.sizePolicy().hasHeightForWidth()) self.splitter.setSizePolicy(sizePolicy) self.splitter.setOrientation(QtCore.Qt.Horizontal) self.splitter.setObjectName(_fromUtf8("splitter")) self.tableView = QtGui.QTableView(self.splitter) self.tableView.setShowGrid(False) self.tableView.setObjectName(_fromUtf8("tableView")) self.tableView.horizontalHeader().setVisible(False) self.tableView.verticalHeader().setVisible(False) self.scrollArea = QtGui.QScrollArea(self.splitter) self.scrollArea.setWidgetResizable(True) self.scrollArea.setObjectName(_fromUtf8("scrollArea")) self.scrollAreaWidgetContents = QtGui.QWidget() self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 357, 384)) self.scrollAreaWidgetContents.setObjectName( _fromUtf8("scrollAreaWidgetContents")) self.verticalLayout = QtGui.QVBoxLayout(self.scrollAreaWidgetContents) self.verticalLayout.setMargin(0) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.imageView = ImageView(self.scrollAreaWidgetContents) self.imageView.setMinimumSize(QtCore.QSize(200, 200)) self.imageView.setObjectName(_fromUtf8("imageView")) self.verticalLayout.addWidget(self.imageView) self.scrollArea.setWidget(self.scrollAreaWidgetContents) self.verticalLayout_2.addWidget(self.splitter) self.retranslateUi(ItemViewer) QtCore.QMetaObject.connectSlotsByName(ItemViewer) def retranslateUi(self, ItemViewer): ItemViewer.setWindowTitle(_translate("ItemViewer", "Item Viewer", None)) self.backButton.setToolTip(_translate("ItemViewer", "Previous", None)) self.backButton.setShortcut(_translate("ItemViewer", "Meta+P", None)) self.playButton.setToolTip(_translate("ItemViewer", "Play", None)) self.forwardButton.setToolTip(_translate("ItemViewer", "Next", None)) self.forwardButton.setShortcut(_translate("ItemViewer", "Meta+N", None)) self.originalRadioButton.setToolTip( _translate("ItemViewer", "As found in file", None)) self.originalRadioButton.setText( _translate("ItemViewer", "File Order", None)) self.sortedRadioButton.setToolTip( _translate("ItemViewer", "Match current sort order", None)) self.sortedRadioButton.setText(_translate("ItemViewer", "Sorted", None)) self.randomRadioButton.setToolTip( _translate("ItemViewer", "Random order", None)) self.randomRadioButton.setText(_translate("ItemViewer", "Random", None)) self.label.setText(_translate("ItemViewer", "File Row:", None)) self.rowSpinBox.setToolTip( _translate("ItemViewer", "Row Number (Original)", None)) self.flagCheckBox.setText(_translate("ItemViewer", "Flag", None)) self.flagCheckBox.setShortcut(_translate("ItemViewer", "Meta+M", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1950, 1260) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout_7.setObjectName("verticalLayout_7") self.horizontalLayout_20 = QtWidgets.QHBoxLayout() self.horizontalLayout_20.setObjectName("horizontalLayout_20") self.label_20 = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_20.setFont(font) self.label_20.setObjectName("label_20") self.horizontalLayout_20.addWidget(self.label_20) self.labelVideoName = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.labelVideoName.setFont(font) self.labelVideoName.setText("") self.labelVideoName.setObjectName("labelVideoName") self.horizontalLayout_20.addWidget(self.labelVideoName) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_20.addItem(spacerItem) self.verticalLayout_7.addLayout(self.horizontalLayout_20) self.checkBoxEncirclePartiles = QtWidgets.QCheckBox(self.centralwidget) font = QtGui.QFont() font.setPointSize(12) font.setBold(True) font.setWeight(75) self.checkBoxEncirclePartiles.setFont(font) self.checkBoxEncirclePartiles.setCheckable(True) self.checkBoxEncirclePartiles.setChecked(True) self.checkBoxEncirclePartiles.setObjectName("checkBoxEncirclePartiles") self.verticalLayout_7.addWidget(self.checkBoxEncirclePartiles) self.horizontalLayout_10 = QtWidgets.QHBoxLayout() self.horizontalLayout_10.setObjectName("horizontalLayout_10") self.label_12 = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_12.setFont(font) self.label_12.setObjectName("label_12") self.horizontalLayout_10.addWidget(self.label_12) self.spinBoxFrameIndex = QtWidgets.QSpinBox(self.centralwidget) self.spinBoxFrameIndex.setObjectName("spinBoxFrameIndex") self.horizontalLayout_10.addWidget(self.spinBoxFrameIndex) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_10.addItem(spacerItem1) self.verticalLayout_7.addLayout(self.horizontalLayout_10) self.horizontalSliderFrameIndex = QtWidgets.QSlider(self.centralwidget) self.horizontalSliderFrameIndex.setMaximum(9999) self.horizontalSliderFrameIndex.setPageStep(100) self.horizontalSliderFrameIndex.setOrientation(QtCore.Qt.Horizontal) self.horizontalSliderFrameIndex.setObjectName( "horizontalSliderFrameIndex") self.verticalLayout_7.addWidget(self.horizontalSliderFrameIndex) self.image_item = ImageView(self.centralwidget) self.image_item.setMinimumSize(QtCore.QSize(1280, 960)) self.image_item.setObjectName("image_item") self.verticalLayout_7.addWidget(self.image_item) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1950, 30)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") self.menuTracks = QtWidgets.QMenu(self.menubar) self.menuTracks.setObjectName("menuTracks") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.dockWidgetParams = QtWidgets.QDockWidget(MainWindow) self.dockWidgetParams.setMinimumSize(QtCore.QSize(325, 1207)) self.dockWidgetParams.setObjectName("dockWidgetParams") self.dockWidgetContents = QtWidgets.QWidget() self.dockWidgetContents.setObjectName("dockWidgetContents") self.verticalLayout_9 = QtWidgets.QVBoxLayout(self.dockWidgetContents) self.verticalLayout_9.setObjectName("verticalLayout_9") self.horizontalLayout_19 = QtWidgets.QHBoxLayout() self.horizontalLayout_19.setObjectName("horizontalLayout_19") self.pushButtonLiveUpdate = QtWidgets.QPushButton( self.dockWidgetContents) font = QtGui.QFont() font.setPointSize(13) font.setBold(True) font.setWeight(75) self.pushButtonLiveUpdate.setFont(font) self.pushButtonLiveUpdate.setCheckable(True) self.pushButtonLiveUpdate.setChecked(True) self.pushButtonLiveUpdate.setObjectName("pushButtonLiveUpdate") self.horizontalLayout_19.addWidget(self.pushButtonLiveUpdate) self.pushButtonUpdateNow = QtWidgets.QPushButton( self.dockWidgetContents) self.pushButtonUpdateNow.setObjectName("pushButtonUpdateNow") self.horizontalLayout_19.addWidget(self.pushButtonUpdateNow) self.verticalLayout_9.addLayout(self.horizontalLayout_19) self.groupBox = QtWidgets.QGroupBox(self.dockWidgetContents) self.groupBox.setObjectName("groupBox") self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.groupBox) self.verticalLayout_5.setObjectName("verticalLayout_5") self.label_5 = QtWidgets.QLabel(self.groupBox) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_5.setFont(font) self.label_5.setObjectName("label_5") self.verticalLayout_5.addWidget(self.label_5) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.label = QtWidgets.QLabel(self.groupBox) self.label.setObjectName("label") self.verticalLayout_2.addWidget(self.label) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.horizontalSliderDiameter = QtWidgets.QSlider(self.groupBox) self.horizontalSliderDiameter.setMinimum(1) self.horizontalSliderDiameter.setMaximum(99) self.horizontalSliderDiameter.setSingleStep(2) self.horizontalSliderDiameter.setProperty("value", 11) self.horizontalSliderDiameter.setOrientation(QtCore.Qt.Horizontal) self.horizontalSliderDiameter.setObjectName("horizontalSliderDiameter") self.horizontalLayout.addWidget(self.horizontalSliderDiameter) self.spinBoxDiameter = QtWidgets.QSpinBox(self.groupBox) self.spinBoxDiameter.setMinimum(1) self.spinBoxDiameter.setMaximum(999) self.spinBoxDiameter.setSingleStep(2) self.spinBoxDiameter.setProperty("value", 11) self.spinBoxDiameter.setObjectName("spinBoxDiameter") self.horizontalLayout.addWidget(self.spinBoxDiameter) self.verticalLayout_2.addLayout(self.horizontalLayout) self.verticalLayout_5.addLayout(self.verticalLayout_2) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.label_2 = QtWidgets.QLabel(self.groupBox) self.label_2.setObjectName("label_2") self.verticalLayout_3.addWidget(self.label_2) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.horizontalSliderMinmass = QtWidgets.QSlider(self.groupBox) self.horizontalSliderMinmass.setMaximum(5000) self.horizontalSliderMinmass.setSingleStep(50) self.horizontalSliderMinmass.setPageStep(100) self.horizontalSliderMinmass.setProperty("value", 100) self.horizontalSliderMinmass.setOrientation(QtCore.Qt.Horizontal) self.horizontalSliderMinmass.setTickPosition( QtWidgets.QSlider.TicksAbove) self.horizontalSliderMinmass.setTickInterval(500) self.horizontalSliderMinmass.setObjectName("horizontalSliderMinmass") self.horizontalLayout_2.addWidget(self.horizontalSliderMinmass) self.spinBoxMinmass = QtWidgets.QSpinBox(self.groupBox) self.spinBoxMinmass.setMaximum(99999) self.spinBoxMinmass.setSingleStep(50) self.spinBoxMinmass.setProperty("value", 100) self.spinBoxMinmass.setObjectName("spinBoxMinmass") self.horizontalLayout_2.addWidget(self.spinBoxMinmass) self.verticalLayout_3.addLayout(self.horizontalLayout_2) self.verticalLayout_5.addLayout(self.verticalLayout_3) self.verticalLayout_4 = QtWidgets.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.label_3 = QtWidgets.QLabel(self.groupBox) self.label_3.setObjectName("label_3") self.verticalLayout_4.addWidget(self.label_3) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.horizontalSliderMaxmass = QtWidgets.QSlider(self.groupBox) self.horizontalSliderMaxmass.setMaximum(5000) self.horizontalSliderMaxmass.setSingleStep(50) self.horizontalSliderMaxmass.setPageStep(100) self.horizontalSliderMaxmass.setProperty("value", 500) self.horizontalSliderMaxmass.setOrientation(QtCore.Qt.Horizontal) self.horizontalSliderMaxmass.setTickPosition( QtWidgets.QSlider.TicksAbove) self.horizontalSliderMaxmass.setTickInterval(500) self.horizontalSliderMaxmass.setObjectName("horizontalSliderMaxmass") self.horizontalLayout_3.addWidget(self.horizontalSliderMaxmass) self.spinBoxMaxmass = QtWidgets.QSpinBox(self.groupBox) self.spinBoxMaxmass.setMaximum(99999) self.spinBoxMaxmass.setSingleStep(50) self.spinBoxMaxmass.setProperty("value", 500) self.spinBoxMaxmass.setObjectName("spinBoxMaxmass") self.horizontalLayout_3.addWidget(self.spinBoxMaxmass) self.verticalLayout_4.addLayout(self.horizontalLayout_3) self.verticalLayout_5.addLayout(self.verticalLayout_4) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.label_4 = QtWidgets.QLabel(self.groupBox) self.label_4.setObjectName("label_4") self.horizontalLayout_4.addWidget(self.label_4) self.doubleSpinBoxMaxsize = QtWidgets.QDoubleSpinBox(self.groupBox) self.doubleSpinBoxMaxsize.setMinimum(-1.0) self.doubleSpinBoxMaxsize.setMaximum(999.99) self.doubleSpinBoxMaxsize.setSingleStep(0.05) self.doubleSpinBoxMaxsize.setProperty("value", 2.5) self.doubleSpinBoxMaxsize.setObjectName("doubleSpinBoxMaxsize") self.horizontalLayout_4.addWidget(self.doubleSpinBoxMaxsize) spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem2) self.verticalLayout_5.addLayout(self.horizontalLayout_4) self.line = QtWidgets.QFrame(self.groupBox) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.line.setFont(font) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_5.addWidget(self.line) self.label_6 = QtWidgets.QLabel(self.groupBox) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_6.setFont(font) self.label_6.setObjectName("label_6") self.verticalLayout_5.addWidget(self.label_6) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.label_7 = QtWidgets.QLabel(self.groupBox) self.label_7.setObjectName("label_7") self.horizontalLayout_5.addWidget(self.label_7) self.spinBoxLinkerSearchRange = QtWidgets.QSpinBox(self.groupBox) self.spinBoxLinkerSearchRange.setMinimum(0) self.spinBoxLinkerSearchRange.setMaximum(999) self.spinBoxLinkerSearchRange.setProperty("value", 10) self.spinBoxLinkerSearchRange.setObjectName("spinBoxLinkerSearchRange") self.horizontalLayout_5.addWidget(self.spinBoxLinkerSearchRange) self.verticalLayout_5.addLayout(self.horizontalLayout_5) self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.label_8 = QtWidgets.QLabel(self.groupBox) self.label_8.setObjectName("label_8") self.horizontalLayout_6.addWidget(self.label_8) self.spinBoxLinkerMemory = QtWidgets.QSpinBox(self.groupBox) self.spinBoxLinkerMemory.setMaximum(999) self.spinBoxLinkerMemory.setProperty("value", 8) self.spinBoxLinkerMemory.setObjectName("spinBoxLinkerMemory") self.horizontalLayout_6.addWidget(self.spinBoxLinkerMemory) self.verticalLayout_5.addLayout(self.horizontalLayout_6) self.verticalLayout_9.addWidget(self.groupBox) self.groupBox_2 = QtWidgets.QGroupBox(self.dockWidgetContents) self.groupBox_2.setObjectName("groupBox_2") self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox_2) self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout_7 = QtWidgets.QHBoxLayout() self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.checkBoxGamma = QtWidgets.QCheckBox(self.groupBox_2) self.checkBoxGamma.setObjectName("checkBoxGamma") self.horizontalLayout_7.addWidget(self.checkBoxGamma) self.doubleSpinBoxGamma = QtWidgets.QDoubleSpinBox(self.groupBox_2) self.doubleSpinBoxGamma.setSingleStep(0.05) self.doubleSpinBoxGamma.setProperty("value", 1.0) self.doubleSpinBoxGamma.setObjectName("doubleSpinBoxGamma") self.horizontalLayout_7.addWidget(self.doubleSpinBoxGamma) self.verticalLayout.addLayout(self.horizontalLayout_7) self.line_2 = QtWidgets.QFrame(self.groupBox_2) self.line_2.setFrameShape(QtWidgets.QFrame.HLine) self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_2.setObjectName("line_2") self.verticalLayout.addWidget(self.line_2) self.checkBoxCLAHE = QtWidgets.QCheckBox(self.groupBox_2) self.checkBoxCLAHE.setChecked(False) self.checkBoxCLAHE.setObjectName("checkBoxCLAHE") self.verticalLayout.addWidget(self.checkBoxCLAHE) self.horizontalLayout_9 = QtWidgets.QHBoxLayout() self.horizontalLayout_9.setObjectName("horizontalLayout_9") self.label_9 = QtWidgets.QLabel(self.groupBox_2) self.label_9.setObjectName("label_9") self.horizontalLayout_9.addWidget(self.label_9) self.doubleSpinBoxCLAHEClipLimit = QtWidgets.QDoubleSpinBox( self.groupBox_2) self.doubleSpinBoxCLAHEClipLimit.setProperty("value", 2.0) self.doubleSpinBoxCLAHEClipLimit.setObjectName( "doubleSpinBoxCLAHEClipLimit") self.horizontalLayout_9.addWidget(self.doubleSpinBoxCLAHEClipLimit) self.verticalLayout.addLayout(self.horizontalLayout_9) self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") self.label_10 = QtWidgets.QLabel(self.groupBox_2) self.label_10.setObjectName("label_10") self.horizontalLayout_8.addWidget(self.label_10) self.spinBoxGridSizeX = QtWidgets.QSpinBox(self.groupBox_2) self.spinBoxGridSizeX.setProperty("value", 8) self.spinBoxGridSizeX.setObjectName("spinBoxGridSizeX") self.horizontalLayout_8.addWidget(self.spinBoxGridSizeX) self.label_11 = QtWidgets.QLabel(self.groupBox_2) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_11.setFont(font) self.label_11.setObjectName("label_11") self.horizontalLayout_8.addWidget(self.label_11) self.spinBoxGridSizeY = QtWidgets.QSpinBox(self.groupBox_2) self.spinBoxGridSizeY.setProperty("value", 8) self.spinBoxGridSizeY.setObjectName("spinBoxGridSizeY") self.horizontalLayout_8.addWidget(self.spinBoxGridSizeY) self.verticalLayout.addLayout(self.horizontalLayout_8) self.line_4 = QtWidgets.QFrame(self.groupBox_2) self.line_4.setFrameShape(QtWidgets.QFrame.HLine) self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_4.setObjectName("line_4") self.verticalLayout.addWidget(self.line_4) self.pushButtonRecreateMask = QtWidgets.QPushButton(self.groupBox_2) self.pushButtonRecreateMask.setObjectName("pushButtonRecreateMask") self.verticalLayout.addWidget(self.pushButtonRecreateMask) self.horizontalLayout_13 = QtWidgets.QHBoxLayout() self.horizontalLayout_13.setObjectName("horizontalLayout_13") self.label_15 = QtWidgets.QLabel(self.groupBox_2) self.label_15.setObjectName("label_15") self.horizontalLayout_13.addWidget(self.label_15) self.doubleSpinBoxCirclesParam1 = QtWidgets.QDoubleSpinBox( self.groupBox_2) self.doubleSpinBoxCirclesParam1.setDecimals(4) self.doubleSpinBoxCirclesParam1.setMaximum(999.99) self.doubleSpinBoxCirclesParam1.setSingleStep(0.0005) self.doubleSpinBoxCirclesParam1.setProperty("value", 1.2) self.doubleSpinBoxCirclesParam1.setObjectName( "doubleSpinBoxCirclesParam1") self.horizontalLayout_13.addWidget(self.doubleSpinBoxCirclesParam1) self.verticalLayout.addLayout(self.horizontalLayout_13) self.horizontalLayout_14 = QtWidgets.QHBoxLayout() self.horizontalLayout_14.setObjectName("horizontalLayout_14") self.label_16 = QtWidgets.QLabel(self.groupBox_2) self.label_16.setObjectName("label_16") self.horizontalLayout_14.addWidget(self.label_16) self.spinBoxCirclesParam2 = QtWidgets.QSpinBox(self.groupBox_2) self.spinBoxCirclesParam2.setMinimum(1) self.spinBoxCirclesParam2.setMaximum(9999) self.spinBoxCirclesParam2.setSingleStep(10) self.spinBoxCirclesParam2.setProperty("value", 100) self.spinBoxCirclesParam2.setObjectName("spinBoxCirclesParam2") self.horizontalLayout_14.addWidget(self.spinBoxCirclesParam2) self.verticalLayout.addLayout(self.horizontalLayout_14) self.horizontalLayout_15 = QtWidgets.QHBoxLayout() self.horizontalLayout_15.setObjectName("horizontalLayout_15") self.label_17 = QtWidgets.QLabel(self.groupBox_2) self.label_17.setObjectName("label_17") self.horizontalLayout_15.addWidget(self.label_17) self.spinBoxMaskMinRadius = QtWidgets.QSpinBox(self.groupBox_2) self.spinBoxMaskMinRadius.setMinimum(1) self.spinBoxMaskMinRadius.setMaximum(9999) self.spinBoxMaskMinRadius.setSingleStep(10) self.spinBoxMaskMinRadius.setProperty("value", 350) self.spinBoxMaskMinRadius.setObjectName("spinBoxMaskMinRadius") self.horizontalLayout_15.addWidget(self.spinBoxMaskMinRadius) self.verticalLayout.addLayout(self.horizontalLayout_15) self.horizontalLayout_16 = QtWidgets.QHBoxLayout() self.horizontalLayout_16.setObjectName("horizontalLayout_16") self.label_18 = QtWidgets.QLabel(self.groupBox_2) self.label_18.setObjectName("label_18") self.horizontalLayout_16.addWidget(self.label_18) self.spinBoxMaskMaxRadius = QtWidgets.QSpinBox(self.groupBox_2) self.spinBoxMaskMaxRadius.setMinimum(1) self.spinBoxMaskMaxRadius.setMaximum(9999) self.spinBoxMaskMaxRadius.setSingleStep(10) self.spinBoxMaskMaxRadius.setProperty("value", 450) self.spinBoxMaskMaxRadius.setObjectName("spinBoxMaskMaxRadius") self.horizontalLayout_16.addWidget(self.spinBoxMaskMaxRadius) self.verticalLayout.addLayout(self.horizontalLayout_16) self.pushButton_save_params = QtWidgets.QPushButton(self.groupBox_2) self.pushButton_save_params.setObjectName("pushButton_save_params") self.verticalLayout.addWidget(self.pushButton_save_params) self.verticalLayout_9.addWidget(self.groupBox_2) self.groupBox_3 = QtWidgets.QGroupBox(self.dockWidgetContents) self.groupBox_3.setObjectName("groupBox_3") self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.groupBox_3) self.verticalLayout_8.setObjectName("verticalLayout_8") self.checkBoxUseNeuralNetworkModel = QtWidgets.QCheckBox( self.groupBox_3) self.checkBoxUseNeuralNetworkModel.setObjectName( "checkBoxUseNeuralNetworkModel") self.verticalLayout_8.addWidget(self.checkBoxUseNeuralNetworkModel) self.label_19 = QtWidgets.QLabel(self.groupBox_3) self.label_19.setObjectName("label_19") self.verticalLayout_8.addWidget(self.label_19) self.horizontalLayout_18 = QtWidgets.QHBoxLayout() self.horizontalLayout_18.setObjectName("horizontalLayout_18") self.lineEditNeuralNetworkModelPath = QtWidgets.QLineEdit( self.groupBox_3) self.lineEditNeuralNetworkModelPath.setObjectName( "lineEditNeuralNetworkModelPath") self.horizontalLayout_18.addWidget(self.lineEditNeuralNetworkModelPath) self.pushButtonChooseNeuralNetworkModel = QtWidgets.QPushButton( self.groupBox_3) self.pushButtonChooseNeuralNetworkModel.setMaximumSize( QtCore.QSize(40, 16777215)) self.pushButtonChooseNeuralNetworkModel.setObjectName( "pushButtonChooseNeuralNetworkModel") self.horizontalLayout_18.addWidget( self.pushButtonChooseNeuralNetworkModel) self.verticalLayout_8.addLayout(self.horizontalLayout_18) self.verticalLayout_9.addWidget(self.groupBox_3) self.label_21 = QtWidgets.QLabel(self.dockWidgetContents) self.label_21.setObjectName("label_21") self.verticalLayout_9.addWidget(self.label_21) self.lineEditCurrentItemName = QtWidgets.QLineEdit( self.dockWidgetContents) self.lineEditCurrentItemName.setObjectName("lineEditCurrentItemName") self.verticalLayout_9.addWidget(self.lineEditCurrentItemName) self.horizontalLayout_17 = QtWidgets.QHBoxLayout() self.horizontalLayout_17.setObjectName("horizontalLayout_17") self.pushButtonProcessNow = QtWidgets.QPushButton( self.dockWidgetContents) self.pushButtonProcessNow.setObjectName("pushButtonProcessNow") self.horizontalLayout_17.addWidget(self.pushButtonProcessNow) self.pushButtonAddToBatch = QtWidgets.QPushButton( self.dockWidgetContents) self.pushButtonAddToBatch.setObjectName("pushButtonAddToBatch") self.horizontalLayout_17.addWidget(self.pushButtonAddToBatch) self.verticalLayout_9.addLayout(self.horizontalLayout_17) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_9.addItem(spacerItem3) self.dockWidgetParams.setWidget(self.dockWidgetContents) MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.dockWidgetParams) self.dockWidgetBatch = QtWidgets.QDockWidget(MainWindow) self.dockWidgetBatch.setMinimumSize(QtCore.QSize(325, 169)) self.dockWidgetBatch.setObjectName("dockWidgetBatch") self.dockWidgetContents_2 = QtWidgets.QWidget() self.dockWidgetContents_2.setObjectName("dockWidgetContents_2") self.verticalLayout_6 = QtWidgets.QVBoxLayout( self.dockWidgetContents_2) self.verticalLayout_6.setObjectName("verticalLayout_6") self.listWidgetBatch = QtWidgets.QListWidget(self.dockWidgetContents_2) self.listWidgetBatch.setObjectName("listWidgetBatch") self.verticalLayout_6.addWidget(self.listWidgetBatch) self.dockWidgetBatch.setWidget(self.dockWidgetContents_2) MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.dockWidgetBatch) self.actionOpen_Video = QtWidgets.QAction(MainWindow) self.actionOpen_Video.setObjectName("actionOpen_Video") self.actionExport_Annotated_Video = QtWidgets.QAction(MainWindow) self.actionExport_Annotated_Video.setObjectName( "actionExport_Annotated_Video") self.actionOpen_Batch = QtWidgets.QAction(MainWindow) self.actionOpen_Batch.setObjectName("actionOpen_Batch") self.actionSave_Batch = QtWidgets.QAction(MainWindow) self.actionSave_Batch.setObjectName("actionSave_Batch") self.actionLoad_Parameters = QtWidgets.QAction(MainWindow) self.actionLoad_Parameters.setObjectName("actionLoad_Parameters") self.actionSave_Parameters = QtWidgets.QAction(MainWindow) self.actionSave_Parameters.setObjectName("actionSave_Parameters") self.actionExport_Training_Dataset = QtWidgets.QAction(MainWindow) self.actionExport_Training_Dataset.setObjectName( "actionExport_Training_Dataset") self.actionView_Statistics = QtWidgets.QAction(MainWindow) self.actionView_Statistics.setObjectName("actionView_Statistics") self.menuFile.addAction(self.actionOpen_Video) self.menuFile.addAction(self.actionExport_Annotated_Video) self.menuFile.addSeparator() self.menuFile.addAction(self.actionOpen_Batch) self.menuFile.addAction(self.actionSave_Batch) self.menuFile.addSeparator() self.menuFile.addAction(self.actionLoad_Parameters) self.menuFile.addAction(self.actionSave_Parameters) self.menuTracks.addAction(self.actionView_Statistics) self.menuTracks.addSeparator() self.menuTracks.addAction(self.actionExport_Training_Dataset) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuTracks.menuAction()) self.retranslateUi(MainWindow) self.horizontalSliderDiameter.valueChanged['int'].connect( self.spinBoxDiameter.setValue) self.spinBoxDiameter.valueChanged['int'].connect( self.horizontalSliderDiameter.setValue) self.horizontalSliderMinmass.valueChanged['int'].connect( self.spinBoxMinmass.setValue) self.spinBoxMinmass.valueChanged['int'].connect( self.horizontalSliderMinmass.setValue) self.horizontalSliderMaxmass.valueChanged['int'].connect( self.spinBoxMaxmass.setValue) self.spinBoxMaxmass.valueChanged['int'].connect( self.horizontalSliderMaxmass.setValue) self.horizontalSliderFrameIndex.valueChanged['int'].connect( self.spinBoxFrameIndex.setValue) self.spinBoxFrameIndex.valueChanged['int'].connect( self.horizontalSliderFrameIndex.setValue) self.doubleSpinBoxCirclesParam1.valueChanged['double'].connect( self.pushButtonRecreateMask.click) self.spinBoxCirclesParam2.valueChanged['int'].connect( self.pushButtonRecreateMask.click) self.spinBoxMaskMinRadius.valueChanged['int'].connect( self.pushButtonRecreateMask.click) self.spinBoxMaskMaxRadius.valueChanged['int'].connect( self.pushButtonRecreateMask.click) QtCore.QMetaObject.connectSlotsByName(MainWindow) MainWindow.setTabOrder(self.pushButtonLiveUpdate, self.pushButtonUpdateNow) MainWindow.setTabOrder(self.pushButtonUpdateNow, self.horizontalSliderDiameter) MainWindow.setTabOrder(self.horizontalSliderDiameter, self.spinBoxDiameter) MainWindow.setTabOrder(self.spinBoxDiameter, self.horizontalSliderMinmass) MainWindow.setTabOrder(self.horizontalSliderMinmass, self.spinBoxMinmass) MainWindow.setTabOrder(self.spinBoxMinmass, self.horizontalSliderMaxmass) MainWindow.setTabOrder(self.horizontalSliderMaxmass, self.spinBoxMaxmass) MainWindow.setTabOrder(self.spinBoxMaxmass, self.doubleSpinBoxMaxsize) MainWindow.setTabOrder(self.doubleSpinBoxMaxsize, self.spinBoxLinkerSearchRange) MainWindow.setTabOrder(self.spinBoxLinkerSearchRange, self.spinBoxLinkerMemory) MainWindow.setTabOrder(self.spinBoxLinkerMemory, self.checkBoxGamma) MainWindow.setTabOrder(self.checkBoxGamma, self.doubleSpinBoxGamma) MainWindow.setTabOrder(self.doubleSpinBoxGamma, self.checkBoxCLAHE) MainWindow.setTabOrder(self.checkBoxCLAHE, self.doubleSpinBoxCLAHEClipLimit) MainWindow.setTabOrder(self.doubleSpinBoxCLAHEClipLimit, self.spinBoxGridSizeX) MainWindow.setTabOrder(self.spinBoxGridSizeX, self.spinBoxGridSizeY) MainWindow.setTabOrder(self.spinBoxGridSizeY, self.doubleSpinBoxCirclesParam1) MainWindow.setTabOrder(self.doubleSpinBoxCirclesParam1, self.spinBoxCirclesParam2) MainWindow.setTabOrder(self.spinBoxCirclesParam2, self.spinBoxMaskMinRadius) MainWindow.setTabOrder(self.spinBoxMaskMinRadius, self.spinBoxMaskMaxRadius) MainWindow.setTabOrder(self.spinBoxMaskMaxRadius, self.checkBoxUseNeuralNetworkModel) MainWindow.setTabOrder(self.checkBoxUseNeuralNetworkModel, self.lineEditNeuralNetworkModelPath) MainWindow.setTabOrder(self.lineEditNeuralNetworkModelPath, self.pushButtonChooseNeuralNetworkModel) MainWindow.setTabOrder(self.pushButtonChooseNeuralNetworkModel, self.lineEditCurrentItemName) MainWindow.setTabOrder(self.lineEditCurrentItemName, self.pushButtonProcessNow) MainWindow.setTabOrder(self.pushButtonProcessNow, self.pushButtonAddToBatch) MainWindow.setTabOrder(self.pushButtonAddToBatch, self.checkBoxEncirclePartiles) MainWindow.setTabOrder(self.checkBoxEncirclePartiles, self.image_item) MainWindow.setTabOrder(self.image_item, self.listWidgetBatch) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.label_20.setText(_translate("MainWindow", "Video Name:")) self.checkBoxEncirclePartiles.setText( _translate("MainWindow", "Encircle particles")) self.label_12.setText(_translate("MainWindow", "Frame index:")) self.menuFile.setTitle(_translate("MainWindow", "Fi&le")) self.menuTracks.setTitle(_translate("MainWindow", "Trac&ks")) self.dockWidgetParams.setWindowTitle( _translate("MainWindow", "&Parameters")) self.pushButtonLiveUpdate.setText( _translate("MainWindow", "Live update")) self.pushButtonUpdateNow.setText(_translate("MainWindow", "Update now")) self.groupBox.setTitle(_translate("MainWindow", "Tracker")) self.label_5.setText(_translate("MainWindow", "Particles")) self.label.setText(_translate("MainWindow", "diameter")) self.label_2.setText(_translate("MainWindow", "minmass")) self.label_3.setText(_translate("MainWindow", "maxmass")) self.label_4.setText(_translate("MainWindow", "maxsize: ")) self.label_6.setText(_translate("MainWindow", "Linker")) self.label_7.setToolTip( _translate( "MainWindow", "the maximum distance features can move between frames")) self.label_7.setText(_translate("MainWindow", "Search range")) self.label_8.setToolTip( _translate( "MainWindow", "the maximum distance features can move between frames")) self.label_8.setText(_translate("MainWindow", "memory")) self.groupBox_2.setTitle(_translate("MainWindow", "Adjust video")) self.checkBoxGamma.setText(_translate("MainWindow", "Adjust Gamma")) self.checkBoxCLAHE.setText(_translate("MainWindow", "CLAHE")) self.label_9.setText(_translate("MainWindow", "clip limit")) self.label_10.setText(_translate("MainWindow", "grid size")) self.label_11.setText(_translate("MainWindow", "X")) self.pushButtonRecreateMask.setText( _translate("MainWindow", "Create Mask")) self.label_15.setText(_translate("MainWindow", "Param 1")) self.label_16.setText(_translate("MainWindow", "Param 2")) self.label_17.setText(_translate("MainWindow", "min radius")) self.label_18.setText(_translate("MainWindow", "max radius")) self.pushButton_save_params.setText( _translate("MainWindow", "Save params")) self.groupBox_3.setTitle( _translate("MainWindow", "Neural Network Model")) self.checkBoxUseNeuralNetworkModel.setText( _translate("MainWindow", "Use model")) self.label_19.setText(_translate("MainWindow", "Select model file")) self.pushButtonChooseNeuralNetworkModel.setText( _translate("MainWindow", "...")) self.label_21.setText(_translate("MainWindow", "Enter name:")) self.pushButtonProcessNow.setText( _translate("MainWindow", "Process Now")) self.pushButtonAddToBatch.setText( _translate("MainWindow", "Add to batch")) self.dockWidgetBatch.setWindowTitle(_translate("MainWindow", "Batch")) self.actionOpen_Video.setText(_translate("MainWindow", "&Open Video")) self.actionExport_Annotated_Video.setText( _translate("MainWindow", "&Export Annotated Video")) self.actionOpen_Batch.setText(_translate("MainWindow", "Open &Batch")) self.actionSave_Batch.setText(_translate("MainWindow", "&Save Batch")) self.actionLoad_Parameters.setText( _translate("MainWindow", "&Load Parameters")) self.actionSave_Parameters.setText( _translate("MainWindow", "Save &Parameters")) self.actionExport_Training_Dataset.setText( _translate("MainWindow", "&Export Training Dataset")) self.actionView_Statistics.setText( _translate("MainWindow", "&View Statistics"))
class Ui_MainWindow(object): def __init__(self): self._timer = QtCore.QTimer() self._number_of_clicked = 0 self.worker = Pool(1) self.result_space = None def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1101, 700) pg.setConfigOption('background', 'w') self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout_3.setObjectName("verticalLayout_3") self.formLayout = QtWidgets.QFormLayout() self.formLayout.setObjectName("formLayout") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setObjectName("label") self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label) self.comboBox_neighbourRule = QtWidgets.QComboBox(self.centralwidget) self.comboBox_neighbourRule.setObjectName("comboBox_2") self.comboBox_neighbourRule.addItem("") self.comboBox_neighbourRule.addItem("") self.comboBox_neighbourRule.addItem("") self.comboBox_neighbourRule.addItem("") self.comboBox_neighbourRule.addItem("") self.comboBox_neighbourRule.addItem("") self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.comboBox_neighbourRule) self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setObjectName("label_3") self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_3) self.comboBox_borderRule = QtWidgets.QComboBox(self.centralwidget) self.comboBox_borderRule.setObjectName("comboBox") self.comboBox_borderRule.addItem("") self.comboBox_borderRule.addItem("") self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.comboBox_borderRule) self.label_2 = QtWidgets.QLabel(self.centralwidget) self.label_2.setObjectName("label_2") self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_2) self.lineEdit_spaceSize = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_spaceSize.setObjectName("lineEdit") self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.lineEdit_spaceSize) self.label_4 = QtWidgets.QLabel(self.centralwidget) self.label_4.setObjectName("label_4") self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label_4) self.lineEdit_randomGrain = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_randomGrain.setObjectName("lineEdit_2") self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.lineEdit_randomGrain) self.pushButton_4 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_4.setObjectName("pushButton_4") self.pushButton_4.clicked.connect(self.openFileNameDialog) self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.pushButton_4) self.lineEdit_3 = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_3.setObjectName("lineEdit_3") self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.lineEdit_3) self.pushButton_5 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_5.clicked.connect(self.openSaveDialog) self.pushButton_5.setObjectName("pushButton_5") self.formLayout.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.pushButton_5) self.radioButton = QtWidgets.QRadioButton(self.centralwidget) self.radioButton.setObjectName("radioButton") self.formLayout.setWidget(10, QtWidgets.QFormLayout.LabelRole, self.radioButton) self.verticalLayout_3.addLayout(self.formLayout) self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.verticalLayout.addItem(spacerItem) # Animation and displaying widget self.graphicsView = ImageView(self.centralwidget) self.graphicsView.setMinimumSize(QtCore.QSize(0, 200)) self.graphicsView.setObjectName("graphicsView") self.graphicsView.ui.histogram.hide() self.graphicsView.ui.roiBtn.hide() self.graphicsView.ui.menuBtn.hide() self.graphicsView.show() self.verticalLayout.addWidget(self.graphicsView) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.verticalLayout.addItem(spacerItem1) self.verticalLayout_3.addLayout(self.verticalLayout) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.pushButton_init = QtWidgets.QPushButton(self.centralwidget) self.pushButton_init.setObjectName("pushButton_init") self.pushButton_init.clicked.connect(self.init_ca_algo) self.verticalLayout_2.addWidget(self.pushButton_init) # Push button START/STOP self.pushButton_startStop = QtWidgets.QPushButton(self.centralwidget) self.pushButton_startStop.setObjectName("pushButton_3") self.pushButton_startStop.clicked.connect(self._init_image_timer) self.verticalLayout_2.addWidget(self.pushButton_startStop) self.pushButton_oneStep = QtWidgets.QPushButton(self.centralwidget) self.pushButton_oneStep.setObjectName("pushButton") self.pushButton_oneStep.clicked.connect(self._one_step) self.verticalLayout_2.addWidget(self.pushButton_oneStep) self.pushButton_clearSpace = QtWidgets.QPushButton(self.centralwidget) self.pushButton_clearSpace.setObjectName("pushButton_2") self.pushButton_clearSpace.clicked.connect(self._clear_space) self.verticalLayout_2.addWidget(self.pushButton_clearSpace) self.verticalLayout_3.addLayout(self.verticalLayout_2) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1101, 26)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) # fix self.init_ca_algo() self._clear_space() def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.label.setText(_translate("MainWindow", "Neighbours rule")) self.comboBox_neighbourRule.setItemText( 0, _translate("MainWindow", "VONNEUMANN")) self.comboBox_neighbourRule.setItemText( 1, _translate("MainWindow", "MOORE")) self.comboBox_neighbourRule.setItemText( 2, _translate("MainWindow", "HEXAGONAL_LEFT")) self.comboBox_neighbourRule.setItemText( 3, _translate("MainWindow", "HEXAGONAL_RIGHT")) self.comboBox_neighbourRule.setItemText( 4, _translate("MainWindow", "PENTAGONAL_LEFT")) self.comboBox_neighbourRule.setItemText( 5, _translate("MainWindow", "PENTAGONAL_RIGHT")) self.label_3.setText(_translate("MainWindow", "Border rule")) self.comboBox_borderRule.setItemText( 0, _translate("MainWindow", "ABSORBING")) self.comboBox_borderRule.setItemText( 1, _translate("MainWindow", "SNAKELIKE")) self.label_2.setText(_translate("MainWindow", "Space size")) self.lineEdit_spaceSize.setText(_translate("MainWindow", "50")) self.label_4.setText(_translate("MainWindow", "Number of grains")) self.lineEdit_randomGrain.setText(_translate("MainWindow", "10")) self.pushButton_4.setText(_translate("MainWindow", "Import csv")) self.pushButton_5.setText(_translate("MainWindow", "Export csv")) self.radioButton.setText(_translate("MainWindow", "Extended mode")) self.pushButton_startStop.setText( _translate("MainWindow", "Start/Stop")) self.pushButton_oneStep.setText(_translate("MainWindow", "Step")) self.pushButton_clearSpace.setText( _translate("MainWindow", "Clear space")) self.pushButton_init.setText(_translate("MainWindow", "Init space")) def init_ca_algo(self): self.result_space = None self._ca_algo = CellularAutomata( int(self.lineEdit_randomGrain.text()), int(self.lineEdit_spaceSize.text()), int(self.lineEdit_spaceSize.text()), str(self.comboBox_borderRule.currentText()), str(self.comboBox_neighbourRule.currentText())) self._ca_algo.add_random() self.generatePgColormap() self.display_image() def _init_image_timer(self): self._number_of_clicked += 1 if self._number_of_clicked % 2: self._timer.timeout.connect(self._update_func) self._timer.start(50) else: self._timer.stop() def _update_func(self): if self.result_space is None: self.result_space = self.worker.apply_async(self._ca_algo.one_step) return if self.result_space.ready(): self._ca_algo.space = self.result_space.get() self.display_image() self.result_space = self.worker.apply_async(self._ca_algo.one_step) def _clear_space(self): self.result_space = None self._timer.stop() self._ca_algo.space = self._ca_algo.space_clear self.graphicsView.clear() def _one_step(self): self._timer.stop() self._ca_algo.one_step() self.display_image() def display_image(self): self.graphicsView.setImage( self._ca_algo.space.T, levels=(0.0, self._ca_algo.number_of_reserved_ids + float(self.lineEdit_randomGrain.text()))) def generatePgColormap(self): self.pos = np.linspace( 0.0, 1.0, self._ca_algo.number_of_reserved_ids + int(self.lineEdit_randomGrain.text())) self.cmap = pg.ColorMap(pos=self.pos, color=self._ca_algo.color_id) self.graphicsView.setColorMap(self.cmap) def openSaveDialog(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog fileName, _ = QFileDialog.getSaveFileName(self.centralwidget, "Save to CSV file", "", "CSV Files (*.csv)", options=options) if fileName: pd.DataFrame(self._ca_algo.space).to_csv(fileName) def openFileNameDialog(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog fileName, _ = QFileDialog.getOpenFileName(self.centralwidget, "Open CSV file", "", "CSV Files (*.csv)", options=options) if fileName: self._ca_algo.space = pd.read_csv(fileName, index_col=0).astype(int).values self.graphicsView.setImage(self._ca_algo.space.T)
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1237, 838) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setMinimumSize(QtCore.QSize(1237, 811)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(46, 52, 54)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(69, 78, 81)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(57, 65, 67)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(23, 26, 27)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(30, 34, 36)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(46, 52, 54)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(23, 26, 27)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(46, 52, 54)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(69, 78, 81)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(57, 65, 67)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(23, 26, 27)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(30, 34, 36)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(46, 52, 54)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(23, 26, 27)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush) brush = QtGui.QBrush(QtGui.QColor(23, 26, 27)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(46, 52, 54)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(69, 78, 81)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(57, 65, 67)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(23, 26, 27)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(30, 34, 36)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(23, 26, 27)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(23, 26, 27)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(46, 52, 54)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(46, 52, 54)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(46, 52, 54)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush) MainWindow.setPalette(palette) font = QtGui.QFont() font.setFamily("Sarai") font.setPointSize(16) MainWindow.setFont(font) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("Icons/icons8-mixer-logo-512.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon.addPixmap(QtGui.QPixmap("Icons/icons8-mixer-logo-512.png"), QtGui.QIcon.Normal, QtGui.QIcon.On) MainWindow.setWindowIcon(icon) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName("verticalLayout") self.frame = QtWidgets.QFrame(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth()) self.frame.setSizePolicy(sizePolicy) self.frame.setFrameShape(QtWidgets.QFrame.Box) self.frame.setFrameShadow(QtWidgets.QFrame.Sunken) self.frame.setObjectName("frame") self.gridLayout = QtWidgets.QGridLayout(self.frame) self.gridLayout.setObjectName("gridLayout") self.gridLayout_5 = QtWidgets.QGridLayout() self.gridLayout_5.setSizeConstraint(QtWidgets.QLayout.SetMinAndMaxSize) self.gridLayout_5.setObjectName("gridLayout_5") self.img2Load = QtWidgets.QPushButton(self.frame) self.img2Load.setText("") icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap("Icons/icons8-file-256.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.img2Load.setIcon(icon1) self.img2Load.setIconSize(QtCore.QSize(20, 20)) self.img2Load.setFlat(True) self.img2Load.setProperty("image", 2) self.img2Load.setObjectName("img2Load") self.gridLayout_5.addWidget(self.img2Load, 2, 1, 1, 1) self.imageOneOrigin = ImageView(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.imageOneOrigin.sizePolicy().hasHeightForWidth()) self.imageOneOrigin.setSizePolicy(sizePolicy) self.imageOneOrigin.setMinimumSize(QtCore.QSize(0, 0)) self.imageOneOrigin.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.imageOneOrigin.setSizeIncrement(QtCore.QSize(0, 0)) self.imageOneOrigin.setObjectName("imageOneOrigin") self.gridLayout_5.addWidget(self.imageOneOrigin, 1, 0, 1, 1) self.imageOneMods = ImageView(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.imageOneMods.sizePolicy().hasHeightForWidth()) self.imageOneMods.setSizePolicy(sizePolicy) self.imageOneMods.setMinimumSize(QtCore.QSize(0, 0)) self.imageOneMods.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.imageOneMods.setSizeIncrement(QtCore.QSize(0, 0)) self.imageOneMods.setObjectName("imageOneMods") self.gridLayout_5.addWidget(self.imageOneMods, 1, 2, 1, 1) self.label_2 = QtWidgets.QLabel(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth()) self.label_2.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Sarai") font.setPointSize(20) font.setBold(False) font.setItalic(False) font.setWeight(50) self.label_2.setFont(font) self.label_2.setFrameShape(QtWidgets.QFrame.Box) self.label_2.setFrameShadow(QtWidgets.QFrame.Sunken) self.label_2.setObjectName("label_2") self.gridLayout_5.addWidget(self.label_2, 2, 0, 1, 1) self.image2Cmbx = QtWidgets.QComboBox(self.frame) font = QtGui.QFont() font.setFamily("Sarai") self.image2Cmbx.setFont(font) self.image2Cmbx.setProperty("image", 2) self.image2Cmbx.setObjectName("image2Cmbx") self.image2Cmbx.addItem("") self.image2Cmbx.addItem("") self.image2Cmbx.addItem("") self.image2Cmbx.addItem("") self.gridLayout_5.addWidget(self.image2Cmbx, 2, 2, 1, 1) self.image1Cmbx = QtWidgets.QComboBox(self.frame) font = QtGui.QFont() font.setFamily("Sarai") self.image1Cmbx.setFont(font) self.image1Cmbx.setProperty("image", 1) self.image1Cmbx.setObjectName("image1Cmbx") self.image1Cmbx.addItem("") self.image1Cmbx.addItem("") self.image1Cmbx.addItem("") self.image1Cmbx.addItem("") self.gridLayout_5.addWidget(self.image1Cmbx, 0, 2, 1, 1) spacerItem = QtWidgets.QSpacerItem(13, 201, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_5.addItem(spacerItem, 1, 1, 1, 1) self.label = QtWidgets.QLabel(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) self.label.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Sarai") font.setPointSize(20) self.label.setFont(font) self.label.setMouseTracking(True) self.label.setFrameShape(QtWidgets.QFrame.Box) self.label.setFrameShadow(QtWidgets.QFrame.Sunken) self.label.setTextFormat(QtCore.Qt.RichText) self.label.setObjectName("label") self.gridLayout_5.addWidget(self.label, 0, 0, 1, 1) self.img1Load = QtWidgets.QPushButton(self.frame) self.img1Load.setText("") self.img1Load.setIcon(icon1) self.img1Load.setIconSize(QtCore.QSize(20, 20)) self.img1Load.setFlat(True) self.img1Load.setProperty("image", 1) self.img1Load.setObjectName("img1Load") self.gridLayout_5.addWidget(self.img1Load, 0, 1, 1, 1) self.imageTwoOrigin = ImageView(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.imageTwoOrigin.sizePolicy().hasHeightForWidth()) self.imageTwoOrigin.setSizePolicy(sizePolicy) self.imageTwoOrigin.setMinimumSize(QtCore.QSize(0, 0)) self.imageTwoOrigin.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.imageTwoOrigin.setSizeIncrement(QtCore.QSize(0, 0)) self.imageTwoOrigin.setObjectName("imageTwoOrigin") self.gridLayout_5.addWidget(self.imageTwoOrigin, 3, 0, 1, 1) spacerItem1 = QtWidgets.QSpacerItem(13, 200, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_5.addItem(spacerItem1, 3, 1, 1, 1) self.imageTwoMods = ImageView(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.imageTwoMods.sizePolicy().hasHeightForWidth()) self.imageTwoMods.setSizePolicy(sizePolicy) self.imageTwoMods.setMinimumSize(QtCore.QSize(0, 0)) self.imageTwoMods.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.imageTwoMods.setSizeIncrement(QtCore.QSize(0, 0)) self.imageTwoMods.setObjectName("imageTwoMods") self.gridLayout_5.addWidget(self.imageTwoMods, 3, 2, 1, 1) self.gridLayout.addLayout(self.gridLayout_5, 0, 0, 1, 1) self.line_2 = QtWidgets.QFrame(self.frame) self.line_2.setFrameShape(QtWidgets.QFrame.VLine) self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_2.setObjectName("line_2") self.gridLayout.addWidget(self.line_2, 0, 1, 1, 1) self.gridLayout_2 = QtWidgets.QGridLayout() self.gridLayout_2.setObjectName("gridLayout_2") self.gridLayout_3 = QtWidgets.QGridLayout() self.gridLayout_3.setObjectName("gridLayout_3") self.slider1 = QtWidgets.QSlider(self.frame) self.slider1.setMinimum(0) self.slider1.setMaximum(10) self.slider1.setPageStep(1) self.slider1.setProperty("value", 9) self.slider1.setSliderPosition(9) self.slider1.setOrientation(QtCore.Qt.Horizontal) self.slider1.setObjectName("slider1") self.gridLayout_3.addWidget(self.slider1, 0, 2, 1, 1) self.mixerCmbx1 = QtWidgets.QComboBox(self.frame) font = QtGui.QFont() font.setFamily("Sarai") self.mixerCmbx1.setFont(font) self.mixerCmbx1.setObjectName("mixerCmbx1") self.mixerCmbx1.addItem("") self.mixerCmbx1.addItem("") self.gridLayout_3.addWidget(self.mixerCmbx1, 0, 1, 1, 1) self.label_4 = QtWidgets.QLabel(self.frame) font = QtGui.QFont() font.setFamily("Sarai") self.label_4.setFont(font) self.label_4.setFrameShape(QtWidgets.QFrame.Box) self.label_4.setFrameShadow(QtWidgets.QFrame.Sunken) self.label_4.setObjectName("label_4") self.gridLayout_3.addWidget(self.label_4, 0, 0, 1, 1) self.component1 = QtWidgets.QComboBox(self.frame) font = QtGui.QFont() font.setFamily("Sarai") self.component1.setFont(font) self.component1.setObjectName("component1") self.component1.addItem("") self.component1.addItem("") self.component1.addItem("") self.gridLayout_3.addWidget(self.component1, 1, 2, 1, 1) self.gridLayout_2.addLayout(self.gridLayout_3, 1, 1, 1, 1) self.mixerOutput = QtWidgets.QComboBox(self.frame) font = QtGui.QFont() font.setFamily("Sarai") self.mixerOutput.setFont(font) self.mixerOutput.setObjectName("mixerOutput") self.mixerOutput.addItem("") self.mixerOutput.addItem("") self.gridLayout_2.addWidget(self.mixerOutput, 0, 1, 1, 1) self.label_3 = QtWidgets.QLabel(self.frame) font = QtGui.QFont() font.setFamily("Sarai") self.label_3.setFont(font) self.label_3.setFrameShape(QtWidgets.QFrame.Box) self.label_3.setFrameShadow(QtWidgets.QFrame.Sunken) self.label_3.setObjectName("label_3") self.gridLayout_2.addWidget(self.label_3, 0, 0, 1, 1) self.gridLayout_4 = QtWidgets.QGridLayout() self.gridLayout_4.setObjectName("gridLayout_4") self.label_8 = QtWidgets.QLabel(self.frame) font = QtGui.QFont() font.setFamily("Sarai") self.label_8.setFont(font) self.label_8.setFrameShape(QtWidgets.QFrame.Box) self.label_8.setFrameShadow(QtWidgets.QFrame.Sunken) self.label_8.setObjectName("label_8") self.gridLayout_4.addWidget(self.label_8, 0, 0, 1, 1) self.mixerCmbx2 = QtWidgets.QComboBox(self.frame) font = QtGui.QFont() font.setFamily("Sarai") self.mixerCmbx2.setFont(font) self.mixerCmbx2.setObjectName("mixerCmbx2") self.mixerCmbx2.addItem("") self.mixerCmbx2.addItem("") self.gridLayout_4.addWidget(self.mixerCmbx2, 0, 1, 1, 1) self.slider2 = QtWidgets.QSlider(self.frame) self.slider2.setMinimum(0) self.slider2.setMaximum(10) self.slider2.setPageStep(1) self.slider2.setProperty("value", 9) self.slider2.setSliderPosition(9) self.slider2.setOrientation(QtCore.Qt.Horizontal) self.slider2.setObjectName("slider2") self.gridLayout_4.addWidget(self.slider2, 0, 2, 1, 1) self.component2 = QtWidgets.QComboBox(self.frame) font = QtGui.QFont() font.setFamily("Sarai") self.component2.setFont(font) self.component2.setObjectName("component2") self.component2.addItem("") self.component2.addItem("") self.component2.addItem("") self.gridLayout_4.addWidget(self.component2, 1, 2, 1, 1) self.gridLayout_2.addLayout(self.gridLayout_4, 2, 1, 1, 1) spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_2.addItem(spacerItem2, 1, 0, 1, 1) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_2.addItem(spacerItem3, 2, 0, 1, 1) self.gridLayout.addLayout(self.gridLayout_2, 0, 2, 1, 1) self.verticalLayout.addWidget(self.frame) self.line = QtWidgets.QFrame(self.centralwidget) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout.addWidget(self.line) self.frame1 = QtWidgets.QFrame(self.centralwidget) self.frame1.setFrameShape(QtWidgets.QFrame.Box) self.frame1.setFrameShadow(QtWidgets.QFrame.Sunken) self.frame1.setObjectName("frame1") self.gridLayout_6 = QtWidgets.QGridLayout(self.frame1) self.gridLayout_6.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize) self.gridLayout_6.setObjectName("gridLayout_6") self.label_6 = QtWidgets.QLabel(self.frame1) self.label_6.setMaximumSize(QtCore.QSize(16777215, 20)) font = QtGui.QFont() font.setFamily("Sarai") font.setPointSize(20) self.label_6.setFont(font) self.label_6.setFrameShape(QtWidgets.QFrame.NoFrame) self.label_6.setFrameShadow(QtWidgets.QFrame.Plain) self.label_6.setAlignment(QtCore.Qt.AlignCenter) self.label_6.setObjectName("label_6") self.gridLayout_6.addWidget(self.label_6, 0, 1, 1, 1) self.label_5 = QtWidgets.QLabel(self.frame1) self.label_5.setMaximumSize(QtCore.QSize(16777215, 20)) font = QtGui.QFont() font.setFamily("Sarai") font.setPointSize(20) self.label_5.setFont(font) self.label_5.setFrameShape(QtWidgets.QFrame.NoFrame) self.label_5.setFrameShadow(QtWidgets.QFrame.Plain) self.label_5.setAlignment(QtCore.Qt.AlignCenter) self.label_5.setObjectName("label_5") self.gridLayout_6.addWidget(self.label_5, 0, 0, 1, 1) self.output2 = ImageView(self.frame1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.output2.sizePolicy().hasHeightForWidth()) self.output2.setSizePolicy(sizePolicy) self.output2.setMinimumSize(QtCore.QSize(0, 0)) self.output2.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.output2.setObjectName("output2") self.gridLayout_6.addWidget(self.output2, 1, 1, 1, 1) self.output1 = ImageView(self.frame1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.output1.sizePolicy().hasHeightForWidth()) self.output1.setSizePolicy(sizePolicy) self.output1.setMinimumSize(QtCore.QSize(0, 0)) self.output1.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.output1.setObjectName("output1") self.gridLayout_6.addWidget(self.output1, 1, 0, 1, 1) self.verticalLayout.addWidget(self.frame1) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) self.component2.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "PhaseMonster")) self.label_2.setText(_translate("MainWindow", "Image 2 ")) self.image2Cmbx.setItemText(0, _translate("MainWindow", "Magnitude")) self.image2Cmbx.setItemText(1, _translate("MainWindow", "Phase")) self.image2Cmbx.setItemText(2, _translate("MainWindow", "Real Component")) self.image2Cmbx.setItemText(3, _translate("MainWindow", "Imaginary Component")) self.image1Cmbx.setItemText(0, _translate("MainWindow", "Magnitude")) self.image1Cmbx.setItemText(1, _translate("MainWindow", "Phase")) self.image1Cmbx.setItemText(2, _translate("MainWindow", "Real Component")) self.image1Cmbx.setItemText(3, _translate("MainWindow", "Imaginary Component")) self.label.setText(_translate("MainWindow", "Image 1")) self.mixerCmbx1.setItemText(0, _translate("MainWindow", "Image 1")) self.mixerCmbx1.setItemText(1, _translate("MainWindow", "Image 2 ")) self.label_4.setText(_translate("MainWindow", "Component 1")) self.component1.setItemText(0, _translate("MainWindow", "Magnitude")) self.component1.setItemText(1, _translate("MainWindow", "Real Component")) self.component1.setItemText(2, _translate("MainWindow", "Uniform Magnitude")) self.mixerOutput.setItemText(0, _translate("MainWindow", "Output 1")) self.mixerOutput.setItemText(1, _translate("MainWindow", "Output 2")) self.label_3.setText(_translate("MainWindow", "Mixer Output")) self.label_8.setText(_translate("MainWindow", "Component 2")) self.mixerCmbx2.setItemText(0, _translate("MainWindow", "Image 1")) self.mixerCmbx2.setItemText(1, _translate("MainWindow", "Image 2 ")) self.component2.setItemText(0, _translate("MainWindow", "Phase")) self.component2.setItemText(1, _translate("MainWindow", "Imaginary Component")) self.component2.setItemText(2, _translate("MainWindow", "Uniform Phase ")) self.label_6.setText(_translate("MainWindow", "Output 2")) self.label_5.setText(_translate("MainWindow", "Output 1"))
class Ui_MainWindow(QtWidgets.QMainWindow): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1075, 755) font = QtGui.QFont() font.setFamily("Georgia") MainWindow.setFont(font) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.gridLayout_2 = QtWidgets.QGridLayout() self.gridLayout_2.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize) self.gridLayout_2.setObjectName("gridLayout_2") self.label = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label.sizePolicy().hasHeightForWidth()) self.label.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Rockwell Nova Cond") font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1) self.comboBox = QtWidgets.QComboBox(self.centralwidget) self.comboBox.setObjectName("comboBox") self.gridLayout_2.addWidget(self.comboBox, 0, 1, 1, 1) self.widget = ImageView(self.centralwidget) self.widget.setMinimumSize(QtCore.QSize(200, 200)) self.widget.setObjectName("widget") self.gridLayout_2.addWidget(self.widget, 1, 0, 1, 1) self.widget_2 = ImageView(self.centralwidget) self.widget_2.setObjectName("widget_2") self.gridLayout_2.addWidget(self.widget_2, 1, 1, 1, 1) self.gridLayout.addLayout(self.gridLayout_2, 0, 0, 1, 1) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 1, 0, 1, 1) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem1, 2, 1, 1, 1) self.gridLayout_5 = QtWidgets.QGridLayout() self.gridLayout_5.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) self.gridLayout_5.setObjectName("gridLayout_5") self.widget_6 = ImageView(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.widget_6.sizePolicy().hasHeightForWidth()) self.widget_6.setSizePolicy(sizePolicy) self.widget_6.setMinimumSize(QtCore.QSize(200, 200)) self.widget_6.setObjectName("widget_6") self.gridLayout_5.addWidget(self.widget_6, 1, 1, 1, 1) self.label_6 = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_6.sizePolicy().hasHeightForWidth()) self.label_6.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Franklin Gothic Medium") font.setPointSize(12) font.setBold(True) font.setWeight(75) self.label_6.setFont(font) self.label_6.setAlignment(QtCore.Qt.AlignCenter) self.label_6.setObjectName("label_6") self.gridLayout_5.addWidget(self.label_6, 0, 1, 1, 1) self.widget_5 = ImageView(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.widget_5.sizePolicy().hasHeightForWidth()) self.widget_5.setSizePolicy(sizePolicy) self.widget_5.setMinimumSize(QtCore.QSize(200, 200)) self.widget_5.setObjectName("widget_5") self.gridLayout_5.addWidget(self.widget_5, 1, 0, 1, 1) self.label_4 = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_4.sizePolicy().hasHeightForWidth()) self.label_4.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Franklin Gothic Medium") font.setPointSize(12) font.setBold(True) font.setWeight(75) font.setStrikeOut(False) self.label_4.setFont(font) self.label_4.setAlignment(QtCore.Qt.AlignCenter) self.label_4.setObjectName("label_4") self.gridLayout_5.addWidget(self.label_4, 0, 0, 1, 1) self.gridLayout.addLayout(self.gridLayout_5, 2, 2, 1, 1) self.gridLayout_3 = QtWidgets.QGridLayout() self.gridLayout_3.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) self.gridLayout_3.setObjectName("gridLayout_3") self.gridLayout_10 = QtWidgets.QGridLayout() self.gridLayout_10.setContentsMargins(-1, -1, 10, -1) self.gridLayout_10.setObjectName("gridLayout_10") self.label_5 = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_5.sizePolicy().hasHeightForWidth()) self.label_5.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Rockwell Nova Cond") font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_5.setFont(font) self.label_5.setObjectName("label_5") self.gridLayout_10.addWidget(self.label_5, 0, 0, 1, 1) self.comboBox_5 = QtWidgets.QComboBox(self.centralwidget) self.comboBox_5.setObjectName("comboBox_5") self.gridLayout_10.addWidget(self.comboBox_5, 1, 2, 1, 3) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.radioButton_3 = QtWidgets.QRadioButton(self.centralwidget) self.radioButton_3.setObjectName("radioButton_3") self.buttonGroup_2 = QtWidgets.QButtonGroup(MainWindow) self.buttonGroup_2.setObjectName("buttonGroup_2") self.buttonGroup_2.addButton(self.radioButton_3) self.horizontalLayout_3.addWidget(self.radioButton_3) self.radioButton_4 = QtWidgets.QRadioButton(self.centralwidget) self.radioButton_4.setChecked(True) self.radioButton_4.setObjectName("radioButton_4") self.buttonGroup_2.addButton(self.radioButton_4) self.horizontalLayout_3.addWidget(self.radioButton_4) self.gridLayout_10.addLayout(self.horizontalLayout_3, 1, 0, 1, 2) self.horizontalSlider_2 = QtWidgets.QSlider(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.horizontalSlider_2.sizePolicy().hasHeightForWidth()) self.horizontalSlider_2.setSizePolicy(sizePolicy) self.horizontalSlider_2.setStyleSheet( "background-color: rgb(214, 57, 29);") self.horizontalSlider_2.setMaximum(100) self.horizontalSlider_2.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_2.setTickPosition(QtWidgets.QSlider.TicksAbove) self.horizontalSlider_2.setObjectName("horizontalSlider_2") self.gridLayout_10.addWidget(self.horizontalSlider_2, 0, 1, 1, 3) self.label_9 = QtWidgets.QLabel(self.centralwidget) self.label_9.setObjectName("label_9") self.gridLayout_10.addWidget(self.label_9, 0, 4, 1, 1) self.gridLayout_3.addLayout(self.gridLayout_10, 2, 0, 1, 1) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.label_3 = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_3.sizePolicy().hasHeightForWidth()) self.label_3.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Franklin Gothic Medium") font.setPointSize(13) font.setBold(True) font.setWeight(75) self.label_3.setFont(font) self.label_3.setStyleSheet("") self.label_3.setObjectName("label_3") self.horizontalLayout.addWidget(self.label_3) self.comboBox_3 = QtWidgets.QComboBox(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.comboBox_3.sizePolicy().hasHeightForWidth()) self.comboBox_3.setSizePolicy(sizePolicy) self.comboBox_3.setObjectName("comboBox_3") self.horizontalLayout.addWidget(self.comboBox_3) self.gridLayout_3.addLayout(self.horizontalLayout, 0, 0, 1, 1) self.gridLayout_11 = QtWidgets.QGridLayout() self.gridLayout_11.setContentsMargins(-1, -1, 10, -1) self.gridLayout_11.setObjectName("gridLayout_11") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.radioButton_2 = QtWidgets.QRadioButton(self.centralwidget) self.radioButton_2.setChecked(True) self.radioButton_2.setAutoExclusive(True) self.radioButton_2.setObjectName("radioButton_2") self.buttonGroup = QtWidgets.QButtonGroup(MainWindow) self.buttonGroup.setObjectName("buttonGroup") self.buttonGroup.addButton(self.radioButton_2) self.horizontalLayout_2.addWidget(self.radioButton_2) self.radioButton = QtWidgets.QRadioButton(self.centralwidget) self.radioButton.setAutoExclusive(True) self.radioButton.setObjectName("radioButton") self.buttonGroup.addButton(self.radioButton) self.horizontalLayout_2.addWidget(self.radioButton) self.gridLayout_11.addLayout(self.horizontalLayout_2, 1, 0, 1, 2) self.label_8 = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_8.sizePolicy().hasHeightForWidth()) self.label_8.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Rockwell Nova Cond") font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_8.setFont(font) self.label_8.setObjectName("label_8") self.gridLayout_11.addWidget(self.label_8, 0, 0, 1, 1) self.comboBox_6 = QtWidgets.QComboBox(self.centralwidget) self.comboBox_6.setObjectName("comboBox_6") self.gridLayout_11.addWidget(self.comboBox_6, 1, 2, 1, 3) self.horizontalSlider_3 = QtWidgets.QSlider(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.horizontalSlider_3.sizePolicy().hasHeightForWidth()) self.horizontalSlider_3.setSizePolicy(sizePolicy) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(214, 57, 29)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 170, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(255, 127, 63)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(127, 42, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(170, 56, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(214, 57, 29)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(214, 57, 29)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(255, 170, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(214, 57, 29)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 170, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(255, 127, 63)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(127, 42, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(170, 56, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(214, 57, 29)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(214, 57, 29)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(255, 170, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush) brush = QtGui.QBrush(QtGui.QColor(127, 42, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(214, 57, 29)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(255, 170, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(255, 127, 63)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(127, 42, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(170, 56, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(127, 42, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(127, 42, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(214, 57, 29)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(214, 57, 29)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(255, 85, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush) self.horizontalSlider_3.setPalette(palette) font = QtGui.QFont() font.setPointSize(28) font.setBold(True) font.setWeight(75) font.setStyleStrategy(QtGui.QFont.PreferAntialias) self.horizontalSlider_3.setFont(font) self.horizontalSlider_3.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor)) self.horizontalSlider_3.setStyleSheet( "background-color: rgb(214, 57, 29);") self.horizontalSlider_3.setMaximum(100) self.horizontalSlider_3.setTracking(True) self.horizontalSlider_3.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_3.setInvertedAppearance(False) self.horizontalSlider_3.setTickPosition(QtWidgets.QSlider.TicksAbove) self.horizontalSlider_3.setObjectName("horizontalSlider_3") self.gridLayout_11.addWidget(self.horizontalSlider_3, 0, 1, 1, 3) self.label_7 = QtWidgets.QLabel(self.centralwidget) self.label_7.setObjectName("label_7") self.gridLayout_11.addWidget(self.label_7, 0, 4, 1, 1) self.gridLayout_3.addLayout(self.gridLayout_11, 1, 0, 1, 1) self.gridLayout.addLayout(self.gridLayout_3, 0, 2, 1, 1) self.gridLayout_4 = QtWidgets.QGridLayout() self.gridLayout_4.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize) self.gridLayout_4.setObjectName("gridLayout_4") self.label_2 = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_2.sizePolicy().hasHeightForWidth()) self.label_2.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Rockwell Nova Cond") font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setAlignment(QtCore.Qt.AlignCenter) self.label_2.setObjectName("label_2") self.gridLayout_4.addWidget(self.label_2, 0, 0, 1, 1) self.comboBox_2 = QtWidgets.QComboBox(self.centralwidget) self.comboBox_2.setObjectName("comboBox_2") self.gridLayout_4.addWidget(self.comboBox_2, 0, 1, 1, 1) self.widget_3 = ImageView(self.centralwidget) self.widget_3.setMinimumSize(QtCore.QSize(200, 200)) self.widget_3.setObjectName("widget_3") self.gridLayout_4.addWidget(self.widget_3, 1, 0, 1, 1) self.widget_4 = ImageView(self.centralwidget) self.widget_4.setMinimumSize(QtCore.QSize(200, 200)) self.widget_4.setObjectName("widget_4") self.gridLayout_4.addWidget(self.widget_4, 1, 1, 1, 1) self.gridLayout.addLayout(self.gridLayout_4, 2, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.FileMenubar = QtWidgets.QMenuBar(MainWindow) self.FileMenubar.setGeometry(QtCore.QRect(0, 0, 1075, 25)) self.FileMenubar.setObjectName("FileMenubar") self.menuOpen = QtWidgets.QMenu(self.FileMenubar) self.menuOpen.setObjectName("menuOpen") MainWindow.setMenuBar(self.FileMenubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionOpen = QtWidgets.QAction(MainWindow) self.actionOpen.setObjectName("actionOpen") self.actionLoad_Image_2 = QtWidgets.QAction(MainWindow) self.actionLoad_Image_2.setObjectName("actionLoad_Image_2") self.menuOpen.addAction(self.actionOpen) self.menuOpen.addAction(self.actionLoad_Image_2) self.FileMenubar.addAction(self.menuOpen.menuAction()) self.retranslateUi(MainWindow) self.horizontalSlider_2.valueChanged['int'].connect( self.label_9.setNum) self.horizontalSlider_3.valueChanged['int'].connect( self.label_7.setNum) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "Images Mixer")) MainWindow.setWindowIcon(QtGui.QIcon('results/user-interface.png')) self.label.setText(_translate("MainWindow", "Image 1")) self.label_6.setText( _translate( "MainWindow", "<html><head/><body><p><span style=\" color:#d6391d;\">Output 2</span></p></body></html>" )) self.label_4.setText( _translate( "MainWindow", "<html><head/><body><p><span style=\" color:#d6391d;\">Output 1</span></p></body></html>" )) self.label_5.setText(_translate("MainWindow", "Component 2")) self.radioButton_3.setText(_translate("MainWindow", "Image 1")) self.radioButton_4.setText(_translate("MainWindow", "Image 2")) self.label_9.setText(_translate("MainWindow", "%")) self.label_3.setText( _translate( "MainWindow", "<html><head/><body><p><span style=\" color:#d6391d;\">Mixer Output to:</span></p></body></html>" )) self.radioButton_2.setText(_translate("MainWindow", "Image 1")) self.radioButton.setText(_translate("MainWindow", "Image 2")) self.label_8.setText(_translate("MainWindow", "Component 1")) self.label_7.setText(_translate("MainWindow", "%")) self.label_2.setText(_translate("MainWindow", "Image 2")) self.menuOpen.setTitle(_translate("MainWindow", "File")) self.actionOpen.setText(_translate("MainWindow", "Load Image 1")) self.actionOpen.setShortcut(_translate("MainWindow", "Ctrl+1")) self.actionLoad_Image_2.setText( _translate("MainWindow", "Load Image 2")) self.actionLoad_Image_2.setShortcut(_translate("MainWindow", "Ctrl+2"))
class Ui_Form(object): def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(1300, 742) Form.setMaximumSize(QtCore.QSize(6500000, 6500000)) self.gridLayout_4 = QtGui.QGridLayout(Form) self.gridLayout_4.setMargin(0) self.gridLayout_4.setSpacing(0) self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) self.tabWidget = QtGui.QTabWidget(Form) self.tabWidget.setEnabled(True) self.tabWidget.setStatusTip(_fromUtf8("")) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.tMain = QtGui.QWidget() self.tMain.setObjectName(_fromUtf8("tMain")) self.gridLayout_5 = QtGui.QGridLayout(self.tMain) self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5")) self.frame = QtGui.QFrame(self.tMain) self.frame.setMinimumSize(QtCore.QSize(600, 320)) self.frame.setMaximumSize(QtCore.QSize(600, 380)) self.frame.setFrameShape(QtGui.QFrame.StyledPanel) self.frame.setFrameShadow(QtGui.QFrame.Raised) self.frame.setObjectName(_fromUtf8("frame")) self.label_region_defined = QtGui.QLabel(self.frame) self.label_region_defined.setGeometry(QtCore.QRect(330, 30, 261, 61)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) self.label_region_defined.setPalette(palette) font = QtGui.QFont() font.setPointSize(18) font.setBold(True) font.setWeight(75) self.label_region_defined.setFont(font) self.label_region_defined.setLineWidth(3) self.label_region_defined.setTextFormat(QtCore.Qt.AutoText) self.label_region_defined.setAlignment(QtCore.Qt.AlignCenter) self.label_region_defined.setWordWrap(True) self.label_region_defined.setObjectName( _fromUtf8("label_region_defined")) self.label_properties = QtGui.QLabel(self.frame) self.label_properties.setGeometry(QtCore.QRect(320, 170, 281, 111)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_properties.setFont(font) self.label_properties.setLineWidth(3) self.label_properties.setTextFormat(QtCore.Qt.PlainText) self.label_properties.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.label_properties.setObjectName(_fromUtf8("label_properties")) self.groupProtocol = QtGui.QGroupBox(self.frame) self.groupProtocol.setGeometry(QtCore.QRect(10, 170, 281, 51)) self.groupProtocol.setObjectName(_fromUtf8("groupProtocol")) self.pLoadExperiment = QtGui.QPushButton(self.groupProtocol) self.pLoadExperiment.setGeometry(QtCore.QRect(10, 20, 261, 28)) font = QtGui.QFont() font.setPointSize(14) self.pLoadExperiment.setFont(font) self.pLoadExperiment.setObjectName(_fromUtf8("pLoadExperiment")) self.lExperimentFrame = QtGui.QLabel(self.groupProtocol) self.lExperimentFrame.setGeometry(QtCore.QRect(10, 60, 91, 25)) font = QtGui.QFont() font.setPointSize(14) self.lExperimentFrame.setFont(font) self.lExperimentFrame.setText(_fromUtf8("")) self.lExperimentFrame.setAlignment(QtCore.Qt.AlignCenter) self.lExperimentFrame.setObjectName(_fromUtf8("lExperimentFrame")) self.lExperimentFrame_2 = QtGui.QLabel(self.groupProtocol) self.lExperimentFrame_2.setGeometry(QtCore.QRect(190, 60, 71, 25)) font = QtGui.QFont() font.setPointSize(14) self.lExperimentFrame_2.setFont(font) self.lExperimentFrame_2.setText(_fromUtf8("")) self.lExperimentFrame_2.setAlignment(QtCore.Qt.AlignCenter) self.lExperimentFrame_2.setObjectName(_fromUtf8("lExperimentFrame_2")) self.spinFrameNumber = QtGui.QSpinBox(self.groupProtocol) self.spinFrameNumber.setEnabled(True) self.spinFrameNumber.setGeometry(QtCore.QRect(110, 60, 71, 25)) font = QtGui.QFont() font.setPointSize(12) self.spinFrameNumber.setFont(font) self.spinFrameNumber.setObjectName(_fromUtf8("spinFrameNumber")) self.pStart = QtGui.QPushButton(self.frame) self.pStart.setGeometry(QtCore.QRect(10, 0, 281, 51)) font = QtGui.QFont() font.setPointSize(16) font.setBold(True) font.setWeight(75) self.pStart.setFont(font) self.pStart.setCheckable(True) self.pStart.setAutoDefault(False) self.pStart.setDefault(False) self.pStart.setFlat(False) self.pStart.setObjectName(_fromUtf8("pStart")) self.lcdNumber = QtGui.QLCDNumber(self.frame) self.lcdNumber.setGeometry(QtCore.QRect(10, 110, 281, 51)) self.lcdNumber.setObjectName(_fromUtf8("lcdNumber")) self.label_status = QtGui.QLabel(self.frame) self.label_status.setGeometry(QtCore.QRect(330, 100, 261, 31)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) self.label_status.setPalette(palette) font = QtGui.QFont() font.setPointSize(18) font.setBold(True) font.setWeight(75) self.label_status.setFont(font) self.label_status.setLineWidth(3) self.label_status.setTextFormat(QtCore.Qt.PlainText) self.label_status.setAlignment(QtCore.Qt.AlignCenter) self.label_status.setWordWrap(True) self.label_status.setObjectName(_fromUtf8("label_status")) self.edit_full_name = QtGui.QLineEdit(self.frame) self.edit_full_name.setGeometry(QtCore.QRect(330, 0, 131, 22)) self.edit_full_name.setText(_fromUtf8("")) self.edit_full_name.setObjectName(_fromUtf8("edit_full_name")) self.dateEdit = QtGui.QDateEdit(self.frame) self.dateEdit.setGeometry(QtCore.QRect(480, 0, 110, 22)) self.dateEdit.setObjectName(_fromUtf8("dateEdit")) self.layoutWidget = QtGui.QWidget(self.frame) self.layoutWidget.setGeometry(QtCore.QRect(10, 290, 581, 33)) self.layoutWidget.setObjectName(_fromUtf8("layoutWidget")) self.horizontalLayout_4 = QtGui.QHBoxLayout(self.layoutWidget) self.horizontalLayout_4.setMargin(0) self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.pManual = QtGui.QPushButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(14) self.pManual.setFont(font) self.pManual.setObjectName(_fromUtf8("pManual")) self.horizontalLayout_4.addWidget(self.pManual) self.pResetRegion = QtGui.QPushButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(14) self.pResetRegion.setFont(font) self.pResetRegion.setObjectName(_fromUtf8("pResetRegion")) self.horizontalLayout_4.addWidget(self.pResetRegion) self.layoutWidget1 = QtGui.QWidget(self.frame) self.layoutWidget1.setGeometry(QtCore.QRect(10, 60, 281, 51)) self.layoutWidget1.setObjectName(_fromUtf8("layoutWidget1")) self.horizontalLayout_5 = QtGui.QHBoxLayout(self.layoutWidget1) self.horizontalLayout_5.setMargin(0) self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5")) self.pRecord = QtGui.QPushButton(self.layoutWidget1) self.pRecord.setMinimumSize(QtCore.QSize(0, 40)) self.pRecord.setMaximumSize(QtCore.QSize(16777215, 40)) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) font.setWeight(75) self.pRecord.setFont(font) self.pRecord.setStatusTip(_fromUtf8("")) self.pRecord.setText(_fromUtf8("")) self.pRecord.setCheckable(True) self.pRecord.setChecked(False) self.pRecord.setObjectName(_fromUtf8("pRecord")) self.horizontalLayout_5.addWidget(self.pRecord) self.pSaveState = QtGui.QPushButton(self.layoutWidget1) self.pSaveState.setMinimumSize(QtCore.QSize(0, 40)) self.pSaveState.setMaximumSize(QtCore.QSize(16777215, 40)) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) font.setWeight(75) self.pSaveState.setFont(font) self.pSaveState.setStatusTip(_fromUtf8("")) self.pSaveState.setText(_fromUtf8("")) self.pSaveState.setCheckable(False) self.pSaveState.setChecked(False) self.pSaveState.setObjectName(_fromUtf8("pSaveState")) self.horizontalLayout_5.addWidget(self.pSaveState) self.gridLayout_5.addWidget(self.frame, 0, 0, 1, 1) self.verticalLayout_2 = QtGui.QVBoxLayout() self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.groupBoxMonitoring = QtGui.QGroupBox(self.tMain) font = QtGui.QFont() font.setPointSize(11) self.groupBoxMonitoring.setFont(font) self.groupBoxMonitoring.setObjectName(_fromUtf8("groupBoxMonitoring")) self.gridLayout_3 = QtGui.QGridLayout(self.groupBoxMonitoring) self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) self.verticalLayout_3 = QtGui.QVBoxLayout() self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.graph_monitoring_plots = PlotWidget(self.groupBoxMonitoring) self.graph_monitoring_plots.setObjectName( _fromUtf8("graph_monitoring_plots")) self.verticalLayout_3.addWidget(self.graph_monitoring_plots) self.gridLayout_3.addLayout(self.verticalLayout_3, 0, 2, 1, 1) self._2 = QtGui.QVBoxLayout() self._2.setSpacing(0) self._2.setSizeConstraint(QtGui.QLayout.SetMaximumSize) self._2.setObjectName(_fromUtf8("_2")) spacerItem = QtGui.QSpacerItem(20, 15, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) self._2.addItem(spacerItem) self.pStartMonitoring = QtGui.QPushButton(self.groupBoxMonitoring) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pStartMonitoring.sizePolicy().hasHeightForWidth()) self.pStartMonitoring.setSizePolicy(sizePolicy) self.pStartMonitoring.setMinimumSize(QtCore.QSize(0, 30)) self.pStartMonitoring.setMaximumSize(QtCore.QSize(120, 16777215)) font = QtGui.QFont() font.setPointSize(15) font.setBold(True) font.setWeight(75) self.pStartMonitoring.setFont(font) self.pStartMonitoring.setCheckable(False) self.pStartMonitoring.setObjectName(_fromUtf8("pStartMonitoring")) self._2.addWidget(self.pStartMonitoring) spacerItem1 = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) self._2.addItem(spacerItem1) self.pStopMonitoring = QtGui.QPushButton(self.groupBoxMonitoring) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pStopMonitoring.sizePolicy().hasHeightForWidth()) self.pStopMonitoring.setSizePolicy(sizePolicy) self.pStopMonitoring.setMinimumSize(QtCore.QSize(0, 30)) self.pStopMonitoring.setMaximumSize(QtCore.QSize(120, 16777215)) font = QtGui.QFont() font.setPointSize(15) font.setBold(True) font.setWeight(75) self.pStopMonitoring.setFont(font) self.pStopMonitoring.setObjectName(_fromUtf8("pStopMonitoring")) self._2.addWidget(self.pStopMonitoring) spacerItem2 = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) self._2.addItem(spacerItem2) self.pResetMonitoring = QtGui.QPushButton(self.groupBoxMonitoring) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pResetMonitoring.sizePolicy().hasHeightForWidth()) self.pResetMonitoring.setSizePolicy(sizePolicy) self.pResetMonitoring.setMinimumSize(QtCore.QSize(0, 30)) self.pResetMonitoring.setMaximumSize(QtCore.QSize(120, 16777215)) font = QtGui.QFont() font.setPointSize(15) font.setBold(True) font.setWeight(75) self.pResetMonitoring.setFont(font) self.pResetMonitoring.setObjectName(_fromUtf8("pResetMonitoring")) self._2.addWidget(self.pResetMonitoring) spacerItem3 = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) self._2.addItem(spacerItem3) self.label_8 = QtGui.QLabel(self.groupBoxMonitoring) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_8.sizePolicy().hasHeightForWidth()) self.label_8.setSizePolicy(sizePolicy) self.label_8.setMaximumSize(QtCore.QSize(120, 30)) font = QtGui.QFont() font.setPointSize(12) self.label_8.setFont(font) self.label_8.setObjectName(_fromUtf8("label_8")) self._2.addWidget(self.label_8) self.edit_alarm660 = QtGui.QLineEdit(self.groupBoxMonitoring) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.edit_alarm660.sizePolicy().hasHeightForWidth()) self.edit_alarm660.setSizePolicy(sizePolicy) self.edit_alarm660.setMaximumSize(QtCore.QSize(120, 16777215)) font = QtGui.QFont() font.setPointSize(14) self.edit_alarm660.setFont(font) self.edit_alarm660.setText(_fromUtf8("")) self.edit_alarm660.setPlaceholderText(_fromUtf8("")) self.edit_alarm660.setObjectName(_fromUtf8("edit_alarm660")) self._2.addWidget(self.edit_alarm660) spacerItem4 = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) self._2.addItem(spacerItem4) self.label_15 = QtGui.QLabel(self.groupBoxMonitoring) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_15.sizePolicy().hasHeightForWidth()) self.label_15.setSizePolicy(sizePolicy) self.label_15.setMaximumSize(QtCore.QSize(120, 30)) font = QtGui.QFont() font.setPointSize(12) self.label_15.setFont(font) self.label_15.setObjectName(_fromUtf8("label_15")) self._2.addWidget(self.label_15) self.edit_alarm400 = QtGui.QLineEdit(self.groupBoxMonitoring) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.edit_alarm400.sizePolicy().hasHeightForWidth()) self.edit_alarm400.setSizePolicy(sizePolicy) self.edit_alarm400.setMaximumSize(QtCore.QSize(120, 16777215)) font = QtGui.QFont() font.setPointSize(14) self.edit_alarm400.setFont(font) self.edit_alarm400.setText(_fromUtf8("")) self.edit_alarm400.setPlaceholderText(_fromUtf8("")) self.edit_alarm400.setObjectName(_fromUtf8("edit_alarm400")) self._2.addWidget(self.edit_alarm400) self.gridLayout_3.addLayout(self._2, 0, 0, 1, 1) spacerItem5 = QtGui.QSpacerItem(5, 20, QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) self.gridLayout_3.addItem(spacerItem5, 0, 1, 1, 1) self.verticalLayout_2.addWidget(self.groupBoxMonitoring) self.horizontalLayout_8 = QtGui.QHBoxLayout() self.horizontalLayout_8.setSpacing(0) self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8")) self.combo_selected_image = QtGui.QComboBox(self.tMain) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.combo_selected_image.sizePolicy().hasHeightForWidth()) self.combo_selected_image.setSizePolicy(sizePolicy) self.combo_selected_image.setMinimumSize(QtCore.QSize(150, 0)) self.combo_selected_image.setMaximumSize(QtCore.QSize(150, 25)) font = QtGui.QFont() font.setPointSize(11) self.combo_selected_image.setFont(font) self.combo_selected_image.setFrame(True) self.combo_selected_image.setObjectName( _fromUtf8("combo_selected_image")) self.horizontalLayout_8.addWidget(self.combo_selected_image) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) spacerItem6 = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem6) self.lValue = QtGui.QLabel(self.tMain) self.lValue.setMinimumSize(QtCore.QSize(250, 0)) self.lValue.setMaximumSize(QtCore.QSize(250, 16777215)) font = QtGui.QFont() font.setPointSize(13) self.lValue.setFont(font) self.lValue.setText(_fromUtf8("")) self.lValue.setObjectName(_fromUtf8("lValue")) self.horizontalLayout.addWidget(self.lValue) self.horizontalLayout_8.addLayout(self.horizontalLayout) self.verticalLayout_2.addLayout(self.horizontalLayout_8) self.gridLayout_5.addLayout(self.verticalLayout_2, 0, 1, 1, 1) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.groupBoxSuperposition = QtGui.QGroupBox(self.tMain) self.groupBoxSuperposition.setMinimumSize(QtCore.QSize(0, 0)) font = QtGui.QFont() font.setPointSize(11) self.groupBoxSuperposition.setFont(font) self.groupBoxSuperposition.setObjectName( _fromUtf8("groupBoxSuperposition")) self.gridLayout_2 = QtGui.QGridLayout(self.groupBoxSuperposition) self.gridLayout_2.setMargin(0) self.gridLayout_2.setSpacing(0) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.graph_image_superposition = ImageView(self.groupBoxSuperposition) self.graph_image_superposition.setMinimumSize(QtCore.QSize(0, 0)) self.graph_image_superposition.setObjectName( _fromUtf8("graph_image_superposition")) self.gridLayout_2.addWidget(self.graph_image_superposition, 0, 0, 1, 1) self.horizontalLayout_3.addWidget(self.groupBoxSuperposition) self.groupBox = QtGui.QGroupBox(self.tMain) font = QtGui.QFont() font.setPointSize(11) self.groupBox.setFont(font) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.gridLayout = QtGui.QGridLayout(self.groupBox) self.gridLayout.setMargin(0) self.gridLayout.setSpacing(0) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.graph_image = ImageView(self.groupBox) self.graph_image.setMinimumSize(QtCore.QSize(0, 0)) self.graph_image.setObjectName(_fromUtf8("graph_image")) self.gridLayout.addWidget(self.graph_image, 0, 0, 1, 1) self.horizontalLayout_3.addWidget(self.groupBox) self.gridLayout_5.addLayout(self.horizontalLayout_3, 1, 0, 1, 2) self.tabWidget.addTab(self.tMain, _fromUtf8("")) self.tSettings = QtGui.QWidget() self.tSettings.setObjectName(_fromUtf8("tSettings")) self.groupBoxProtocol = QtGui.QGroupBox(self.tSettings) self.groupBoxProtocol.setGeometry(QtCore.QRect(20, 10, 501, 141)) self.groupBoxProtocol.setObjectName(_fromUtf8("groupBoxProtocol")) self.label_2 = QtGui.QLabel(self.groupBoxProtocol) self.label_2.setGeometry(QtCore.QRect(31, 31, 183, 16)) self.label_2.setObjectName(_fromUtf8("label_2")) self.eLoggingFolder = QtGui.QLineEdit(self.groupBoxProtocol) self.eLoggingFolder.setGeometry(QtCore.QRect(220, 28, 133, 20)) self.eLoggingFolder.setObjectName(_fromUtf8("eLoggingFolder")) self.label_3 = QtGui.QLabel(self.groupBoxProtocol) self.label_3.setGeometry(QtCore.QRect(31, 70, 157, 16)) self.label_3.setObjectName(_fromUtf8("label_3")) self.sTimer = QtGui.QSpinBox(self.groupBoxProtocol) self.sTimer.setGeometry(QtCore.QRect(210, 68, 51, 20)) self.sTimer.setMaximum(10000) self.sTimer.setProperty("value", 2) self.sTimer.setObjectName(_fromUtf8("sTimer")) self.label_4 = QtGui.QLabel(self.groupBoxProtocol) self.label_4.setGeometry(QtCore.QRect(270, 70, 16, 16)) self.label_4.setObjectName(_fromUtf8("label_4")) self.pSaveResults = QtGui.QPushButton(self.groupBoxProtocol) self.pSaveResults.setGeometry(QtCore.QRect(370, 28, 75, 23)) self.pSaveResults.setObjectName(_fromUtf8("pSaveResults")) self.cFullProtocolSave = QtGui.QCheckBox(self.groupBoxProtocol) self.cFullProtocolSave.setGeometry(QtCore.QRect(30, 110, 221, 17)) self.cFullProtocolSave.setChecked(False) self.cFullProtocolSave.setObjectName(_fromUtf8("cFullProtocolSave")) self.pCalibration = QtGui.QPushButton(self.tSettings) self.pCalibration.setEnabled(True) self.pCalibration.setGeometry(QtCore.QRect(530, 10, 271, 71)) font = QtGui.QFont() font.setPointSize(13) font.setBold(True) font.setWeight(75) self.pCalibration.setFont(font) self.pCalibration.setObjectName(_fromUtf8("pCalibration")) self.groupBoxRezime = QtGui.QGroupBox(self.tSettings) self.groupBoxRezime.setEnabled(True) self.groupBoxRezime.setGeometry(QtCore.QRect(20, 160, 851, 341)) self.groupBoxRezime.setObjectName(_fromUtf8("groupBoxRezime")) self.label_5 = QtGui.QLabel(self.groupBoxRezime) self.label_5.setGeometry(QtCore.QRect(20, 30, 251, 16)) self.label_5.setObjectName(_fromUtf8("label_5")) self.label_6 = QtGui.QLabel(self.groupBoxRezime) self.label_6.setGeometry(QtCore.QRect(20, 70, 261, 16)) self.label_6.setObjectName(_fromUtf8("label_6")) self.label_7 = QtGui.QLabel(self.groupBoxRezime) self.label_7.setGeometry(QtCore.QRect(20, 110, 231, 16)) self.label_7.setObjectName(_fromUtf8("label_7")) self.e400Exposition = QtGui.QLineEdit(self.groupBoxRezime) self.e400Exposition.setGeometry(QtCore.QRect(310, 30, 113, 25)) self.e400Exposition.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.e400Exposition.setObjectName(_fromUtf8("e400Exposition")) self.e660Exposition = QtGui.QLineEdit(self.groupBoxRezime) self.e660Exposition.setGeometry(QtCore.QRect(310, 70, 113, 25)) self.e660Exposition.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.e660Exposition.setObjectName(_fromUtf8("e660Exposition")) self.e740Exposition = QtGui.QLineEdit(self.groupBoxRezime) self.e740Exposition.setGeometry(QtCore.QRect(310, 110, 113, 25)) self.e740Exposition.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.e740Exposition.setObjectName(_fromUtf8("e740Exposition")) self.eCameraExposition = QtGui.QLineEdit(self.groupBoxRezime) self.eCameraExposition.setEnabled(False) self.eCameraExposition.setGeometry(QtCore.QRect(310, 190, 113, 25)) self.eCameraExposition.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.eCameraExposition.setObjectName(_fromUtf8("eCameraExposition")) self.label_9 = QtGui.QLabel(self.groupBoxRezime) self.label_9.setGeometry(QtCore.QRect(20, 190, 221, 16)) self.label_9.setObjectName(_fromUtf8("label_9")) self.label_10 = QtGui.QLabel(self.groupBoxRezime) self.label_10.setGeometry(QtCore.QRect(20, 150, 221, 16)) self.label_10.setObjectName(_fromUtf8("label_10")) self.ePeriod = QtGui.QLineEdit(self.groupBoxRezime) self.ePeriod.setEnabled(False) self.ePeriod.setGeometry(QtCore.QRect(310, 150, 113, 22)) self.ePeriod.setStatusTip(_fromUtf8("")) self.ePeriod.setWhatsThis(_fromUtf8("")) self.ePeriod.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.ePeriod.setPlaceholderText(_fromUtf8("")) self.ePeriod.setObjectName(_fromUtf8("ePeriod")) self.label_11 = QtGui.QLabel(self.groupBoxRezime) self.label_11.setGeometry(QtCore.QRect(20, 230, 221, 16)) self.label_11.setObjectName(_fromUtf8("label_11")) self.eCameraGain = QtGui.QLineEdit(self.groupBoxRezime) self.eCameraGain.setGeometry(QtCore.QRect(310, 230, 71, 24)) self.eCameraGain.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.eCameraGain.setObjectName(_fromUtf8("eCameraGain")) self.label_12 = QtGui.QLabel(self.groupBoxRezime) self.label_12.setGeometry(QtCore.QRect(390, 234, 221, 16)) self.label_12.setObjectName(_fromUtf8("label_12")) self.cNoneNormilize = QtGui.QCheckBox(self.groupBoxRezime) self.cNoneNormilize.setGeometry(QtCore.QRect(440, 230, 261, 20)) self.cNoneNormilize.setChecked(True) self.cNoneNormilize.setObjectName(_fromUtf8("cNoneNormilize")) self.pBlueSingle = QtGui.QPushButton(self.groupBoxRezime) self.pBlueSingle.setGeometry(QtCore.QRect(440, 30, 261, 25)) self.pBlueSingle.setObjectName(_fromUtf8("pBlueSingle")) self.pRedSingle = QtGui.QPushButton(self.groupBoxRezime) self.pRedSingle.setGeometry(QtCore.QRect(440, 70, 261, 25)) self.pRedSingle.setObjectName(_fromUtf8("pRedSingle")) self.pIRSingle = QtGui.QPushButton(self.groupBoxRezime) self.pIRSingle.setGeometry(QtCore.QRect(440, 110, 261, 25)) self.pIRSingle.setObjectName(_fromUtf8("pIRSingle")) self.pNoneSingle = QtGui.QPushButton(self.groupBoxRezime) self.pNoneSingle.setGeometry(QtCore.QRect(440, 190, 261, 25)) self.pNoneSingle.setObjectName(_fromUtf8("pNoneSingle")) self.label_13 = QtGui.QLabel(self.groupBoxRezime) self.label_13.setGeometry(QtCore.QRect(20, 270, 221, 16)) self.label_13.setObjectName(_fromUtf8("label_13")) self.cCameraBit = QtGui.QComboBox(self.groupBoxRezime) self.cCameraBit.setGeometry(QtCore.QRect(310, 270, 73, 25)) self.cCameraBit.setObjectName(_fromUtf8("cCameraBit")) self.cCameraBit.addItem(_fromUtf8("")) self.cCameraBit.addItem(_fromUtf8("")) self.label_14 = QtGui.QLabel(self.groupBoxRezime) self.label_14.setGeometry(QtCore.QRect(20, 315, 221, 16)) self.label_14.setObjectName(_fromUtf8("label_14")) self.cCameraBinning = QtGui.QComboBox(self.groupBoxRezime) self.cCameraBinning.setEnabled(True) self.cCameraBinning.setGeometry(QtCore.QRect(311, 310, 181, 25)) self.cCameraBinning.setObjectName(_fromUtf8("cCameraBinning")) self.groupBoxLedSources = QtGui.QGroupBox(self.groupBoxRezime) self.groupBoxLedSources.setGeometry(QtCore.QRect(720, 20, 101, 151)) self.groupBoxLedSources.setObjectName(_fromUtf8("groupBoxLedSources")) self.widget_led740 = QLed(self.groupBoxLedSources) self.widget_led740.setGeometry(QtCore.QRect(30, 100, 41, 31)) self.widget_led740.setObjectName(_fromUtf8("widget_led740")) self.widget_led400 = QLed(self.groupBoxLedSources) self.widget_led400.setGeometry(QtCore.QRect(30, 20, 41, 31)) self.widget_led400.setObjectName(_fromUtf8("widget_led400")) self.widget_led660 = QLed(self.groupBoxLedSources) self.widget_led660.setGeometry(QtCore.QRect(30, 60, 41, 31)) self.widget_led660.setObjectName(_fromUtf8("widget_led660")) self.pLiveMode = QtGui.QPushButton(self.tSettings) self.pLiveMode.setGeometry(QtCore.QRect(530, 90, 271, 71)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.pLiveMode.setFont(font) self.pLiveMode.setObjectName(_fromUtf8("pLiveMode")) self.groupWatch = QtGui.QGroupBox(self.tSettings) self.groupWatch.setGeometry(QtCore.QRect(20, 620, 851, 91)) self.groupWatch.setObjectName(_fromUtf8("groupWatch")) self.rShadowingNone = QtGui.QRadioButton(self.groupWatch) self.rShadowingNone.setGeometry(QtCore.QRect(10, 30, 95, 20)) self.rShadowingNone.setChecked(False) self.rShadowingNone.setObjectName(_fromUtf8("rShadowingNone")) self.rShadowingGlare = QtGui.QRadioButton(self.groupWatch) self.rShadowingGlare.setGeometry(QtCore.QRect(10, 60, 321, 20)) self.rShadowingGlare.setChecked(True) self.rShadowingGlare.setObjectName(_fromUtf8("rShadowingGlare")) self.groupBeep = QtGui.QGroupBox(self.tSettings) self.groupBeep.setGeometry(QtCore.QRect(20, 510, 291, 91)) self.groupBeep.setObjectName(_fromUtf8("groupBeep")) self.label_16 = QtGui.QLabel(self.groupBeep) self.label_16.setGeometry(QtCore.QRect(250, 22, 121, 16)) self.label_16.setObjectName(_fromUtf8("label_16")) self.label_17 = QtGui.QLabel(self.groupBeep) self.label_17.setGeometry(QtCore.QRect(11, 22, 157, 16)) self.label_17.setObjectName(_fromUtf8("label_17")) self.sTimerBeep = QtGui.QSpinBox(self.groupBeep) self.sTimerBeep.setGeometry(QtCore.QRect(190, 20, 51, 20)) self.sTimerBeep.setMinimum(1) self.sTimerBeep.setMaximum(10000) self.sTimerBeep.setProperty("value", 60) self.sTimerBeep.setObjectName(_fromUtf8("sTimerBeep")) self.cResetBeepTimer = QtGui.QCheckBox(self.groupBeep) self.cResetBeepTimer.setGeometry(QtCore.QRect(10, 50, 371, 17)) self.cResetBeepTimer.setChecked(True) self.cResetBeepTimer.setObjectName(_fromUtf8("cResetBeepTimer")) self.groupInterface = QtGui.QGroupBox(self.tSettings) self.groupInterface.setGeometry(QtCore.QRect(350, 510, 291, 91)) self.groupInterface.setObjectName(_fromUtf8("groupInterface")) self.cAutoLevel = QtGui.QCheckBox(self.groupInterface) self.cAutoLevel.setGeometry(QtCore.QRect(10, 20, 371, 17)) self.cAutoLevel.setChecked(False) self.cAutoLevel.setObjectName(_fromUtf8("cAutoLevel")) self.tabWidget.addTab(self.tSettings, _fromUtf8("")) self.gridLayout_4.addWidget(self.tabWidget, 0, 0, 1, 1) self.retranslateUi(Form) self.tabWidget.setCurrentIndex(0) self.cCameraBit.setCurrentIndex(1) self.cCameraBinning.setCurrentIndex(-1) QtCore.QMetaObject.connectSlotsByName(Form) def retranslateUi(self, Form): Form.setWindowTitle(_translate("Form", "Флуорометр", None)) self.label_region_defined.setText( _translate("Form", "Область свечения не определена", None)) self.label_properties.setText( _translate( "Form", "________________________________________________________", None)) self.groupProtocol.setTitle( _translate("Form", "Работа с протоколами", None)) self.pLoadExperiment.setText( _translate("Form", "Загрузка протокола", None)) self.pStart.setText(_translate("Form", "СТАРТ", None)) self.label_status.setText(_translate("Form", ".", None)) self.edit_full_name.setPlaceholderText( _translate("Form", "Фамилия Имя Отчество", None)) self.pManual.setText(_translate("Form", "Ручной ввод областей", None)) self.pResetRegion.setText(_translate("Form", "Сброс областей", None)) self.pRecord.setToolTip(_translate("Form", "Протоколирование", None)) self.pSaveState.setToolTip( _translate("Form", "Сохранить текущие кадры", None)) self.groupBoxMonitoring.setTitle( _translate("Form", "Мониторинг ФДТ", None)) self.pStartMonitoring.setText(_translate("Form", "Старт", None)) self.pStopMonitoring.setText(_translate("Form", "Стоп", None)) self.pResetMonitoring.setText(_translate("Form", "Сброс", None)) self.label_8.setText(_translate("Form", "Порог 660 нм", None)) self.label_15.setText(_translate("Form", "Порог 400 нм", None)) self.groupBoxSuperposition.setTitle( _translate("Form", "Наложенное изображение", None)) self.groupBox.setTitle( _translate("Form", "Флуоресцентное изображение", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tMain), _translate("Form", "Основное", None)) self.groupBoxProtocol.setTitle( _translate("Form", "Параметры протоколирования", None)) self.label_2.setText( _translate("Form", "Папка для сохранения результатов", None)) self.eLoggingFolder.setText(_translate("Form", "Результат", None)) self.label_3.setText( _translate("Form", "Сохранять состояние каждые ", None)) self.label_4.setText(_translate("Form", "c", None)) self.pSaveResults.setText(_translate("Form", "...", None)) self.cFullProtocolSave.setText( _translate("Form", "Сохранять полный протокол?", None)) self.pCalibration.setText( _translate("Form", "Калибровка\n" " размера кадра", None)) self.groupBoxRezime.setTitle( _translate("Form", "Режим работы регистрации изображений", None)) self.label_5.setText( _translate("Form", "Время свечения диода 400 нм (синий), c", None)) self.label_6.setText( _translate("Form", "Время свечения диода 660 нм (красный), c", None)) self.label_7.setText( _translate("Form", "Время свечения диода 740 нм (ИК), c", None)) self.e400Exposition.setToolTip(_translate("Form", ">= 0.001 c", None)) self.e400Exposition.setText(_translate("Form", "0.3", None)) self.e660Exposition.setToolTip(_translate("Form", ">= 0.001 c", None)) self.e660Exposition.setText(_translate("Form", "0.3", None)) self.e740Exposition.setToolTip(_translate("Form", ">= 0.001 c", None)) self.e740Exposition.setText(_translate("Form", "0.001", None)) self.eCameraExposition.setToolTip( _translate( "Form", "Должен быть >= 0.07 c и меньше, чем период переключения диодов", None)) self.eCameraExposition.setText(_translate("Form", "0.3", None)) self.label_9.setText(_translate("Form", "Экспозиция камеры, c", None)) self.label_10.setText( _translate("Form", "Период переключения диодов, c", None)) self.ePeriod.setToolTip( _translate( "Form", "Должен быть >= 0.1 c и больше, чем экспозиция камеры ", None)) self.ePeriod.setText(_translate("Form", "0.35", "Не ниже 0.1")) self.label_11.setText(_translate("Form", "Усиление камеры", None)) self.eCameraGain.setToolTip(_translate("Form", "от 15 до 41 дБ", None)) self.eCameraGain.setText(_translate("Form", "15", None)) self.label_12.setText(_translate("Form", "дБ", None)) self.cNoneNormilize.setText( _translate("Form", "Вычитать \"темновой\" кадр", None)) self.pBlueSingle.setText( _translate("Form", "Получить одиночный кадр с ист. 400 нм", None)) self.pRedSingle.setText( _translate("Form", "Получить одиночный кадр с ист. 660 нм", None)) self.pIRSingle.setText( _translate("Form", "Получить одиночный кадр с ист. 740 нм", None)) self.pNoneSingle.setText( _translate("Form", "Получить одиночный \"темновой\" кадр", None)) self.label_13.setText(_translate("Form", "Битность изображения", None)) self.cCameraBit.setItemText(0, _translate("Form", "8 бит", None)) self.cCameraBit.setItemText(1, _translate("Form", "12 бит", None)) self.label_14.setText(_translate("Form", "Биннинг изображения", None)) self.groupBoxLedSources.setTitle( _translate("Form", "Вкл. источник", None)) self.pLiveMode.setText( _translate("Form", "Включить режим \n" "LiveMode", None)) self.groupWatch.setTitle( _translate( "Form", "Слежение за положением флуоресцентной области при мониторинге", None)) self.rShadowingNone.setText(_translate("Form", "Отключено", None)) self.rShadowingGlare.setText( _translate("Form", "По области свечения терапевтического лазера", None)) self.groupBeep.setTitle( _translate("Form", "Звуковой сигнал во время процедуры ФДТ", None)) self.label_16.setText(_translate("Form", "c", None)) self.label_17.setText( _translate("Form", "Проигрывать сигнал каждые", None)) self.cResetBeepTimer.setText( _translate("Form", "Сбрасывать таймер при выключении лазера", None)) self.groupInterface.setTitle( _translate("Form", "Настройки интерфейса", None)) self.cAutoLevel.setText( _translate("Form", "Автоматический уровень изображений", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tSettings), _translate("Form", "Параметры", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("ImageMixer") MainWindow.resize(1035, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout_4 = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout_4.setObjectName("gridLayout_4") self.gridLayout_3 = QtWidgets.QGridLayout() self.gridLayout_3.setObjectName("gridLayout_3") self.image2 = ImageView(self.centralwidget) self.image2.setMinimumSize(QtCore.QSize(200, 200)) self.image2.setObjectName("image2") self.gridLayout_3.addWidget(self.image2, 3, 0, 1, 1) self.image1 = ImageView(self.centralwidget) self.image1.setMinimumSize(QtCore.QSize(200, 200)) self.image1.setObjectName("image1") self.gridLayout_3.addWidget(self.image1, 1, 0, 1, 1) self.Openimage1 = QtWidgets.QPushButton(self.centralwidget) font = QtGui.QFont() font.setFamily("Trebuchet MS") font.setPointSize(9) font.setBold(True) font.setWeight(75) self.Openimage1.setFont(font) self.Openimage1.setObjectName("Openimage1") self.gridLayout_3.addWidget(self.Openimage1, 0, 0, 1, 1) self.Openimage2 = QtWidgets.QPushButton(self.centralwidget) font = QtGui.QFont() font.setFamily("Trebuchet MS") font.setPointSize(9) font.setBold(True) font.setWeight(75) self.Openimage2.setFont(font) self.Openimage2.setObjectName("Openimage2") self.gridLayout_3.addWidget(self.Openimage2, 2, 0, 1, 1) self.image2Edited = ImageView(self.centralwidget) self.image2Edited.setMinimumSize(QtCore.QSize(200, 200)) self.image2Edited.setObjectName("image2Edited") self.gridLayout_3.addWidget(self.image2Edited, 3, 1, 1, 1) self.Image1Edited = ImageView(self.centralwidget) self.Image1Edited.setMinimumSize(QtCore.QSize(200, 200)) self.Image1Edited.setObjectName("Image1Edited") self.gridLayout_3.addWidget(self.Image1Edited, 1, 1, 1, 1) self.comboBox = QtWidgets.QComboBox(self.centralwidget) self.comboBox.setObjectName("comboBox") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.gridLayout_3.addWidget(self.comboBox, 0, 1, 1, 1) self.comboBox_2 = QtWidgets.QComboBox(self.centralwidget) self.comboBox_2.setObjectName("comboBox_2") self.comboBox_2.addItem("") self.comboBox_2.addItem("") self.comboBox_2.addItem("") self.comboBox_2.addItem("") self.comboBox_2.addItem("") self.gridLayout_3.addWidget(self.comboBox_2, 2, 1, 1, 1) self.gridLayout_4.addLayout(self.gridLayout_3, 0, 0, 4, 1) self.gridLayout_2 = QtWidgets.QGridLayout() self.gridLayout_2.setObjectName("gridLayout_2") self.Output2 = ImageView(self.centralwidget) self.Output2.setMinimumSize(QtCore.QSize(200, 200)) self.Output2.setObjectName("Output2") self.gridLayout_2.addWidget(self.Output2, 2, 1, 1, 1) self.Output1 = ImageView(self.centralwidget) self.Output1.setMinimumSize(QtCore.QSize(200, 200)) self.Output1.setObjectName("Output1") self.gridLayout_2.addWidget(self.Output1, 2, 0, 1, 1) self.outpu1Label = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setFamily("Trebuchet MS") font.setPointSize(9) font.setBold(True) font.setItalic(False) font.setWeight(75) self.outpu1Label.setFont(font) self.outpu1Label.setFrameShape(QtWidgets.QFrame.WinPanel) self.outpu1Label.setFrameShadow(QtWidgets.QFrame.Raised) self.outpu1Label.setObjectName("outpu1Label") self.gridLayout_2.addWidget(self.outpu1Label, 1, 0, 1, 1) self.Output2Label = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setFamily("Trebuchet MS") font.setPointSize(9) font.setBold(True) font.setWeight(75) self.Output2Label.setFont(font) self.Output2Label.setFrameShape(QtWidgets.QFrame.WinPanel) self.Output2Label.setFrameShadow(QtWidgets.QFrame.Raised) self.Output2Label.setObjectName("Output2Label") self.gridLayout_2.addWidget(self.Output2Label, 1, 1, 1, 1) self.gridLayout_4.addLayout(self.gridLayout_2, 1, 1, 1, 1) self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.slider1 = QtWidgets.QSlider(self.centralwidget) self.slider1.setMaximum(100) self.slider1.setSingleStep(10) self.slider1.setProperty("value", 0) self.slider1.setOrientation(QtCore.Qt.Horizontal) self.slider1.setObjectName("slider1") self.gridLayout.addWidget(self.slider1, 1, 2, 1, 1) self.label_2 = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(9) self.label_2.setFont(font) self.label_2.setFrameShape(QtWidgets.QFrame.NoFrame) self.label_2.setFrameShadow(QtWidgets.QFrame.Plain) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) self.component2Label = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(9) self.component2Label.setFont(font) self.component2Label.setFrameShape(QtWidgets.QFrame.NoFrame) self.component2Label.setObjectName("component2Label") self.gridLayout.addWidget(self.component2Label, 5, 0, 1, 1) self.S2Label = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setFamily("Orbitron") font.setPointSize(10) font.setBold(True) font.setWeight(75) self.S2Label.setFont(font) self.S2Label.setObjectName("S2Label") self.gridLayout.addWidget(self.S2Label, 5, 3, 1, 1) self.S1Label = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setFamily("Orbitron") font.setPointSize(10) font.setBold(True) font.setWeight(75) self.S1Label.setFont(font) self.S1Label.setObjectName("S1Label") self.gridLayout.addWidget(self.S1Label, 1, 3, 1, 1) self.slider2 = QtWidgets.QSlider(self.centralwidget) self.slider2.setMaximum(100) self.slider2.setSingleStep(10) self.slider2.setProperty("value", 0) self.slider2.setOrientation(QtCore.Qt.Horizontal) self.slider2.setObjectName("slider2") self.gridLayout.addWidget(self.slider2, 5, 2, 1, 1) self.label = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(11) font.setBold(False) font.setUnderline(False) font.setWeight(50) font.setKerning(False) self.label.setFont(font) self.label.setFrameShape(QtWidgets.QFrame.NoFrame) self.label.setTextFormat(QtCore.Qt.PlainText) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 2) self.output_ch = QtWidgets.QComboBox(self.centralwidget) self.output_ch.setObjectName("output_ch") self.output_ch.addItem("") self.output_ch.addItem("") # self.output_ch.addItem("") self.gridLayout.addWidget(self.output_ch, 0, 2, 1, 1) self.comboBox_6 = QtWidgets.QComboBox(self.centralwidget) self.comboBox_6.setObjectName("comboBox_6") self.comboBox_6.addItem("") self.comboBox_6.addItem("") self.comboBox_6.addItem("") self.comboBox_6.addItem("") # self.comboBox_6.addItem("") # self.comboBox_6.addItem("") # self.comboBox_6.addItem("") self.gridLayout.addWidget(self.comboBox_6, 2, 2, 1, 1) self.comboBox_7 = QtWidgets.QComboBox(self.centralwidget) self.comboBox_7.setObjectName("comboBox_7") self.comboBox_7.addItem("") self.comboBox_7.addItem("") self.comboBox_7.addItem("") self.comboBox_7.addItem("") # self.comboBox_7.addItem("") # self.comboBox_7.addItem("") # self.comboBox_7.addItem("") self.gridLayout.addWidget(self.comboBox_7, 6, 2, 1, 1) # ######################################################### self.combo_select_img1 = QtWidgets.QComboBox(self.centralwidget) self.combo_select_img1.setEnabled(True) self.combo_select_img1.setMinimumSize(QtCore.QSize(0, 30)) self.combo_select_img1.setAcceptDrops(False) self.combo_select_img1.setIconSize(QtCore.QSize(20, 20)) self.combo_select_img1.setObjectName("combo_select_img1") self.combo_select_img1.addItem("") self.combo_select_img1.addItem("") self.gridLayout.addWidget(self.combo_select_img1, 1, 1, 1, 1) self.combo_select_img2 = QtWidgets.QComboBox(self.centralwidget) self.combo_select_img2.setEnabled(True) self.combo_select_img2.setMinimumSize(QtCore.QSize(0, 30)) self.combo_select_img2.setAcceptDrops(False) self.combo_select_img2.setIconSize(QtCore.QSize(20, 20)) self.combo_select_img2.setObjectName("combo_select_img2") self.combo_select_img2.addItem("") self.combo_select_img2.addItem("") self.gridLayout.addWidget(self.combo_select_img2, 5, 1, 1, 1) # ######################################################### self.gridLayout_4.addLayout(self.gridLayout, 0, 1, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1235, 21)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionFTReal1 = QtWidgets.QAction(MainWindow) self.actionFTReal1.setObjectName("actionFTReal1") self.actionFTReal2 = QtWidgets.QAction(MainWindow) self.actionFTReal2.setObjectName("actionFTReal2") self.actionFTImag1 = QtWidgets.QAction(MainWindow) self.actionFTImag1.setObjectName("actionFTImag1") self.actionFTImag2 = QtWidgets.QAction(MainWindow) self.actionFTImag2.setObjectName("actionFTImag2") self.actionFTMag1 = QtWidgets.QAction(MainWindow) self.actionFTMag1.setObjectName("actionFTMag1") self.actionFTMag2 = QtWidgets.QAction(MainWindow) self.actionFTMag2.setObjectName("actionFTMag2") self.actionFTPhase1 = QtWidgets.QAction(MainWindow) self.actionFTPhase1.setObjectName("actionFTPhase1") self.actionFTPhase2 = QtWidgets.QAction(MainWindow) self.actionFTPhase2.setObjectName("actionFTPhase2") self.actionimage1C1 = QtWidgets.QAction(MainWindow) self.actionimage1C1.setObjectName("actionimage1C1") self.actionimageC2 = QtWidgets.QAction(MainWindow) self.actionimageC2.setObjectName("actionimageC2") self.actionimage2C1 = QtWidgets.QAction(MainWindow) self.actionimage2C1.setObjectName("actionimage2C1") self.actionimage2C2 = QtWidgets.QAction(MainWindow) self.actionimage2C2.setObjectName("actionimage2C2") self.actionimage1C2 = QtWidgets.QAction(MainWindow) self.actionimage1C2.setObjectName("actionimage1C2") self.actionoutput1 = QtWidgets.QAction(MainWindow) self.actionoutput1.setObjectName("actionoutput1") self.actionoutput2 = QtWidgets.QAction(MainWindow) self.actionoutput2.setObjectName("actionoutput2") self.actionc1Mag = QtWidgets.QAction(MainWindow) self.actionc1Mag.setObjectName("actionc1Mag") self.actionc1Phase = QtWidgets.QAction(MainWindow) self.actionc1Phase.setObjectName("actionc1Phase") self.actionc1Real = QtWidgets.QAction(MainWindow) self.actionc1Real.setObjectName("actionc1Real") self.actionc1UnitMag = QtWidgets.QAction(MainWindow) self.actionc1UnitMag.setObjectName("actionc1UnitMag") self.actionc1UnitPhase = QtWidgets.QAction(MainWindow) self.actionc1UnitPhase.setObjectName("actionc1UnitPhase") self.actionc2Mag = QtWidgets.QAction(MainWindow) self.actionc2Mag.setObjectName("actionc2Mag") self.actionc2Phase = QtWidgets.QAction(MainWindow) self.actionc2Phase.setObjectName("actionc2Phase") self.actionc2Real = QtWidgets.QAction(MainWindow) self.actionc2Real.setObjectName("actionc2Real") self.actionc2Imag = QtWidgets.QAction(MainWindow) self.actionc2Imag.setObjectName("actionc2Imag") self.actionc2UnitMag = QtWidgets.QAction(MainWindow) self.actionc2UnitMag.setObjectName("actionc2UnitMag") self.actionc2UnitPhase = QtWidgets.QAction(MainWindow) self.actionc2UnitPhase.setObjectName("actionc2UnitPhase") self.actionc1Imag = QtWidgets.QAction(MainWindow) self.actionc1Imag.setObjectName("actionc1Imag") self.retranslateUi(MainWindow) self.slider1.valueChanged['int'].connect(self.S1Label.setNum) self.slider2.valueChanged['int'].connect(self.S2Label.setNum) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "ImageMixer")) self.Openimage1.setText(_translate("MainWindow", "Open image1")) self.Openimage2.setText(_translate("MainWindow", "Open image2")) self.comboBox.setItemText(0, _translate("MainWindow", "Components")) self.comboBox.setItemText(1, _translate("MainWindow", "FT Magnitude")) self.comboBox.setItemText(2, _translate("MainWindow", "FT Phase")) self.comboBox.setItemText(3, _translate("MainWindow", "FT Real")) self.comboBox.setItemText(4, _translate("MainWindow", "FT Imaginary")) self.comboBox_2.setItemText(0, _translate("MainWindow", "Components")) self.comboBox_2.setItemText(1, _translate("MainWindow", "FT Magnitude")) self.comboBox_2.setItemText(2, _translate("MainWindow", "FT Phase")) self.comboBox_2.setItemText(3, _translate("MainWindow", "FT Real")) self.comboBox_2.setItemText(4, _translate("MainWindow", "FT Imaginary")) self.outpu1Label.setText(_translate("MainWindow", "OutPut1")) self.Output2Label.setText(_translate("MainWindow", "OutPut2")) self.label_2.setText(_translate("MainWindow", " Component1")) self.component2Label.setText(_translate("MainWindow", " Component2")) self.S2Label.setText(_translate("MainWindow", "0%")) self.S1Label.setText(_translate("MainWindow", "0" + "%")) self.label.setText( _translate("MainWindow", " Mixer Output to:")) self.output_ch.setItemText(0, _translate("MainWindow", "Output1")) self.output_ch.setItemText(1, _translate("MainWindow", "Output 2")) # self.output_ch.setItemText(2, _translate("MainWindow", "Output 2")) # ################################################### self.comboBox_6.setItemText(0, _translate("MainWindow", "Components")) self.comboBox_6.setItemText(1, _translate("MainWindow", "phase")) self.comboBox_6.setItemText(2, _translate("MainWindow", "imaginary")) self.comboBox_6.setItemText(3, _translate("MainWindow", "uniform phase")) self.comboBox_7.setItemText(0, _translate("MainWindow", "Components")) self.comboBox_7.setItemText(1, _translate("MainWindow", "magnitude")) self.comboBox_7.setItemText(2, _translate("MainWindow", "real")) self.comboBox_7.setItemText( 3, _translate("MainWindow", "uniform magnitude")) # ################################################### # self.comboBox_6.setItemText(0, _translate("MainWindow", "Components")) # self.comboBox_6.setItemText(1, _translate("MainWindow", "magnitude")) # self.comboBox_6.setItemText(2, _translate("MainWindow", "phase")) # self.comboBox_6.setItemText(3, _translate("MainWindow", "real")) # self.comboBox_6.setItemText(4, _translate("MainWindow", "imaginary")) # self.comboBox_6.setItemText(5, _translate("MainWindow", "uniform magnitude")) # self.comboBox_6.setItemText(6, _translate("MainWindow", "uniform phase")) # self.comboBox_7.setItemText(0, _translate("MainWindow", "Components")) # self.comboBox_7.setItemText(1, _translate("MainWindow", "magnitude")) # self.comboBox_7.setItemText(2, _translate("MainWindow", "phase")) # self.comboBox_7.setItemText(3, _translate("MainWindow", "real")) # self.comboBox_7.setItemText(4, _translate("MainWindow", "imaginary")) # self.comboBox_7.setItemText(5, _translate("MainWindow", "uniform magnitude")) # self.comboBox_7.setItemText(6, _translate("MainWindow", "uniform phase")) # ################################################### self.combo_select_img1.setItemText(0, _translate("MainWindow", "Image1")) self.combo_select_img1.setItemText(1, _translate("MainWindow", "Image2")) self.combo_select_img2.setItemText(0, _translate("MainWindow", "Image1")) self.combo_select_img2.setItemText(1, _translate("MainWindow", "Image2")) # ################################################### # self.radioButton.setText(_translate("MainWindow", "Image1")) # self.radioButton_2.setText(_translate("MainWindow", "Image2")) # self.radioButton_3.setText(_translate("MainWindow", "Image1")) # self.radioButton_4.setText(_translate("MainWindow", "Image2")) self.actionFTReal1.setText(_translate("MainWindow", "FTReal1")) self.actionFTReal2.setText(_translate("MainWindow", "FTReal2")) self.actionFTImag1.setText(_translate("MainWindow", "FTImag1")) self.actionFTImag2.setText(_translate("MainWindow", "FTImag2")) self.actionFTMag1.setText(_translate("MainWindow", "FTMag1")) self.actionFTMag2.setText(_translate("MainWindow", "FTMag2")) self.actionFTPhase1.setText(_translate("MainWindow", "FTPhase1")) self.actionFTPhase2.setText(_translate("MainWindow", "FTPhase2")) self.actionimage1C1.setText(_translate("MainWindow", "image1C1")) self.actionimageC2.setText(_translate("MainWindow", "image1C2")) self.actionimage2C1.setText(_translate("MainWindow", "image2C1")) self.actionimage2C2.setText(_translate("MainWindow", "image2C2")) self.actionimage1C2.setText(_translate("MainWindow", "image1C2")) self.actionoutput1.setText(_translate("MainWindow", "output1")) self.actionoutput2.setText(_translate("MainWindow", "output2")) self.actionc1Mag.setText(_translate("MainWindow", "c1Mag")) self.actionc1Phase.setText(_translate("MainWindow", "c1Phase")) self.actionc1Real.setText(_translate("MainWindow", "c1Real")) self.actionc1UnitMag.setText(_translate("MainWindow", "c1UnitMag")) self.actionc1UnitPhase.setText(_translate("MainWindow", "c1UnitPhase")) self.actionc2Mag.setText(_translate("MainWindow", "c2Mag")) self.actionc2Phase.setText(_translate("MainWindow", "c2Phase")) self.actionc2Real.setText(_translate("MainWindow", "c2Real")) self.actionc2Imag.setText(_translate("MainWindow", "c2Imag")) self.actionc2UnitMag.setText(_translate("MainWindow", "c2UnitMag")) self.actionc2UnitPhase.setText(_translate("MainWindow", "c2UnitPhase")) self.actionc1Imag.setText(_translate("MainWindow", "c1Imag"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1102, 703) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("更纱黑体 UI SC") font.setPointSize(10) MainWindow.setFont(font) MainWindow.setDocumentMode(False) self.centralwidget = QtWidgets.QWidget(MainWindow) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.centralwidget.sizePolicy().hasHeightForWidth()) self.centralwidget.setSizePolicy(sizePolicy) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout_7 = QtWidgets.QHBoxLayout() self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setObjectName("label_3") self.horizontalLayout_7.addWidget(self.label_3) self.lineEdit = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit.setMinimumSize(QtCore.QSize(0, 0)) self.lineEdit.setReadOnly(True) self.lineEdit.setObjectName("lineEdit") self.horizontalLayout_7.addWidget(self.lineEdit) self.browse_tif_button = QtWidgets.QPushButton(self.centralwidget) self.browse_tif_button.setObjectName("browse_tif_button") self.horizontalLayout_7.addWidget(self.browse_tif_button) self.browse_folder_button = QtWidgets.QPushButton(self.centralwidget) self.browse_folder_button.setObjectName("browse_folder_button") self.horizontalLayout_7.addWidget(self.browse_folder_button) self.verticalLayout.addLayout(self.horizontalLayout_7) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.groupBox = QtWidgets.QGroupBox(self.centralwidget) self.groupBox.setMinimumSize(QtCore.QSize(0, 120)) self.groupBox.setObjectName("groupBox") self.horizontalLayout_9 = QtWidgets.QHBoxLayout(self.groupBox) self.horizontalLayout_9.setSizeConstraint( QtWidgets.QLayout.SetMinimumSize) self.horizontalLayout_9.setObjectName("horizontalLayout_9") self.gridLayout_4 = QtWidgets.QGridLayout() self.gridLayout_4.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize) self.gridLayout_4.setObjectName("gridLayout_4") self.label_6 = QtWidgets.QLabel(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_6.sizePolicy().hasHeightForWidth()) self.label_6.setSizePolicy(sizePolicy) self.label_6.setMinimumSize(QtCore.QSize(0, 14)) self.label_6.setObjectName("label_6") self.gridLayout_4.addWidget(self.label_6, 0, 0, 1, 1) self.mag_spin_box = QtWidgets.QDoubleSpinBox(self.groupBox) self.mag_spin_box.setMinimumSize(QtCore.QSize(0, 14)) self.mag_spin_box.setMinimum(2.0) self.mag_spin_box.setMaximum(20.0) self.mag_spin_box.setSingleStep(0.5) self.mag_spin_box.setProperty("value", 4.0) self.mag_spin_box.setObjectName("mag_spin_box") self.gridLayout_4.addWidget(self.mag_spin_box, 0, 1, 1, 1) self.label_7 = QtWidgets.QLabel(self.groupBox) self.label_7.setMinimumSize(QtCore.QSize(0, 14)) self.label_7.setObjectName("label_7") self.gridLayout_4.addWidget(self.label_7, 1, 0, 1, 1) self.rad_spin_box = QtWidgets.QDoubleSpinBox(self.groupBox) self.rad_spin_box.setMinimumSize(QtCore.QSize(0, 14)) self.rad_spin_box.setMinimum(0.1) self.rad_spin_box.setMaximum(20.0) self.rad_spin_box.setSingleStep(0.1) self.rad_spin_box.setProperty("value", 0.4) self.rad_spin_box.setObjectName("rad_spin_box") self.gridLayout_4.addWidget(self.rad_spin_box, 1, 1, 1, 1) self.label_9 = QtWidgets.QLabel(self.groupBox) self.label_9.setMinimumSize(QtCore.QSize(0, 14)) self.label_9.setObjectName("label_9") self.gridLayout_4.addWidget(self.label_9, 2, 0, 1, 1) self.axes_spin_box = QtWidgets.QSpinBox(self.groupBox) self.axes_spin_box.setMinimumSize(QtCore.QSize(0, 14)) self.axes_spin_box.setMinimum(2) self.axes_spin_box.setMaximum(12) self.axes_spin_box.setProperty("value", 6) self.axes_spin_box.setObjectName("axes_spin_box") self.gridLayout_4.addWidget(self.axes_spin_box, 2, 1, 1, 1) self.label_10 = QtWidgets.QLabel(self.groupBox) self.label_10.setMinimumSize(QtCore.QSize(0, 14)) self.label_10.setObjectName("label_10") self.gridLayout_4.addWidget(self.label_10, 3, 0, 1, 1) self.n_frame_spin_box = QtWidgets.QSpinBox(self.groupBox) self.n_frame_spin_box.setMinimumSize(QtCore.QSize(0, 14)) self.n_frame_spin_box.setMinimum(1) self.n_frame_spin_box.setMaximum(10000) self.n_frame_spin_box.setProperty("value", 1) self.n_frame_spin_box.setObjectName("n_frame_spin_box") self.gridLayout_4.addWidget(self.n_frame_spin_box, 3, 1, 1, 1) self.horizontalLayout_9.addLayout(self.gridLayout_4) spacerItem = QtWidgets.QSpacerItem(13, 21, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_9.addItem(spacerItem) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.dc_checkbox = QtWidgets.QCheckBox(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.dc_checkbox.sizePolicy().hasHeightForWidth()) self.dc_checkbox.setSizePolicy(sizePolicy) self.dc_checkbox.setObjectName("dc_checkbox") self.verticalLayout_3.addWidget(self.dc_checkbox) self.iw_checkbox = QtWidgets.QCheckBox(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.iw_checkbox.sizePolicy().hasHeightForWidth()) self.iw_checkbox.setSizePolicy(sizePolicy) self.iw_checkbox.setChecked(True) self.iw_checkbox.setObjectName("iw_checkbox") self.verticalLayout_3.addWidget(self.iw_checkbox) self.gw_checkbox = QtWidgets.QCheckBox(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.gw_checkbox.sizePolicy().hasHeightForWidth()) self.gw_checkbox.setSizePolicy(sizePolicy) self.gw_checkbox.setObjectName("gw_checkbox") self.verticalLayout_3.addWidget(self.gw_checkbox) self.horizontalLayout_9.addLayout(self.verticalLayout_3) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_9.addItem(spacerItem1) self.horizontalLayout.addWidget(self.groupBox) self.groupBox1 = QtWidgets.QGroupBox(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.groupBox1.sizePolicy().hasHeightForWidth()) self.groupBox1.setSizePolicy(sizePolicy) self.groupBox1.setMinimumSize(QtCore.QSize(0, 80)) self.groupBox1.setObjectName("groupBox1") self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox1) self.gridLayout_3.setObjectName("gridLayout_3") self.trac_order_spin_box = QtWidgets.QSpinBox(self.groupBox1) self.trac_order_spin_box.setMinimum(2) self.trac_order_spin_box.setMaximum(4) self.trac_order_spin_box.setObjectName("trac_order_spin_box") self.gridLayout_3.addWidget(self.trac_order_spin_box, 0, 3, 1, 1) self.label_13 = QtWidgets.QLabel(self.groupBox1) self.label_13.setObjectName("label_13") self.gridLayout_3.addWidget(self.label_13, 0, 2, 1, 1) self.label_14 = QtWidgets.QLabel(self.groupBox1) self.label_14.setObjectName("label_14") self.gridLayout_3.addWidget(self.label_14, 1, 2, 1, 1) spacerItem2 = QtWidgets.QSpacerItem(71, 17, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_3.addItem(spacerItem2, 0, 1, 1, 1) self.tra_radio_button = QtWidgets.QRadioButton(self.groupBox1) self.tra_radio_button.setObjectName("tra_radio_button") self.gridLayout_3.addWidget(self.tra_radio_button, 0, 0, 1, 1) self.trac_delay_spin_box = QtWidgets.QSpinBox(self.groupBox1) self.trac_delay_spin_box.setMinimum(0) self.trac_delay_spin_box.setMaximum(100) self.trac_delay_spin_box.setProperty("value", 1) self.trac_delay_spin_box.setObjectName("trac_delay_spin_box") self.gridLayout_3.addWidget(self.trac_delay_spin_box, 1, 3, 1, 1) self.trac_radio_button = QtWidgets.QRadioButton(self.groupBox1) self.trac_radio_button.setCheckable(True) self.trac_radio_button.setChecked(True) self.trac_radio_button.setObjectName("trac_radio_button") self.gridLayout_3.addWidget(self.trac_radio_button, 1, 0, 1, 1) spacerItem3 = QtWidgets.QSpacerItem(31, 17, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_3.addItem(spacerItem3, 0, 4, 1, 1) self.horizontalLayout.addWidget(self.groupBox1) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.pyqtimv = ImageView(self.centralwidget) self.pyqtimv.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pyqtimv.sizePolicy().hasHeightForWidth()) self.pyqtimv.setSizePolicy(sizePolicy) self.pyqtimv.setMinimumSize(QtCore.QSize(256, 256)) self.pyqtimv.setObjectName("pyqtimv") self.horizontalLayout_4.addWidget(self.pyqtimv) self.pyqtimv_2 = ImageView(self.centralwidget) self.pyqtimv_2.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pyqtimv_2.sizePolicy().hasHeightForWidth()) self.pyqtimv_2.setSizePolicy(sizePolicy) self.pyqtimv_2.setMinimumSize(QtCore.QSize(256, 256)) self.pyqtimv_2.setObjectName("pyqtimv_2") self.horizontalLayout_4.addWidget(self.pyqtimv_2) self.verticalLayout.addLayout(self.horizontalLayout_4) self.progressBar = QtWidgets.QProgressBar(self.centralwidget) self.progressBar.setEnabled(False) self.progressBar.setMinimumSize(QtCore.QSize(0, 24)) self.progressBar.setMaximumSize(QtCore.QSize(16777215, 24)) self.progressBar.setProperty("value", 0) self.progressBar.setTextVisible(False) self.progressBar.setOrientation(QtCore.Qt.Horizontal) self.progressBar.setInvertedAppearance(False) self.progressBar.setTextDirection(QtWidgets.QProgressBar.TopToBottom) self.progressBar.setObjectName("progressBar") self.verticalLayout.addWidget(self.progressBar) self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_8.addItem(spacerItem4) self.reset_button = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.reset_button.sizePolicy().hasHeightForWidth()) self.reset_button.setSizePolicy(sizePolicy) self.reset_button.setMaximumSize(QtCore.QSize(100, 16777215)) self.reset_button.setBaseSize(QtCore.QSize(0, 0)) self.reset_button.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu) self.reset_button.setObjectName("reset_button") self.horizontalLayout_8.addWidget(self.reset_button) self.start_button = QtWidgets.QPushButton(self.centralwidget) self.start_button.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.start_button.sizePolicy().hasHeightForWidth()) self.start_button.setSizePolicy(sizePolicy) self.start_button.setMaximumSize(QtCore.QSize(100, 16777215)) self.start_button.setBaseSize(QtCore.QSize(0, 0)) self.start_button.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu) self.start_button.setObjectName("start_button") self.horizontalLayout_8.addWidget(self.start_button) self.save_button = QtWidgets.QPushButton(self.centralwidget) self.save_button.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.save_button.sizePolicy().hasHeightForWidth()) self.save_button.setSizePolicy(sizePolicy) self.save_button.setMaximumSize(QtCore.QSize(100, 16777215)) self.save_button.setBaseSize(QtCore.QSize(0, 0)) self.save_button.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu) self.save_button.setLayoutDirection(QtCore.Qt.LeftToRight) self.save_button.setObjectName("save_button") self.horizontalLayout_8.addWidget(self.save_button) self.verticalLayout.addLayout(self.horizontalLayout_8) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) self.tra_radio_button.clicked['bool'].connect( self.trac_order_spin_box.setDisabled) self.trac_radio_button.clicked['bool'].connect( self.trac_delay_spin_box.setEnabled) self.trac_radio_button.clicked['bool'].connect( self.trac_order_spin_box.setEnabled) self.tra_radio_button.clicked['bool'].connect( self.trac_delay_spin_box.setDisabled) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "SRRF_cupy")) self.label_3.setText(_translate("MainWindow", "File")) self.browse_tif_button.setText(_translate("MainWindow", "Open TIF")) self.browse_folder_button.setText( _translate("MainWindow", "Open Folder")) self.groupBox.setTitle(_translate("MainWindow", "Spacial Analysis")) self.label_6.setText( _translate("MainWindow", "Radiality Magnification")) self.label_7.setText(_translate("MainWindow", "Ring radius(px)")) self.label_9.setText(_translate("MainWindow", "Axes in Ring")) self.label_10.setText(_translate("MainWindow", "Sum up every n frames")) self.dc_checkbox.setText( _translate("MainWindow", "Do Drift-Correction(slow, for high density)")) self.iw_checkbox.setText( _translate("MainWindow", "Do Intensity Weighting")) self.gw_checkbox.setText( _translate("MainWindow", "Do Gradient Weighting(for low density)")) self.groupBox1.setTitle(_translate("MainWindow", "Temporal Analysis")) self.label_13.setText(_translate("MainWindow", "TRAC Order")) self.label_14.setText(_translate("MainWindow", "TRAC Delay")) self.tra_radio_button.setText( _translate("MainWindow", "Temporal Radiality Average(TRA)")) self.trac_radio_button.setText( _translate("MainWindow", "Temporal Radiality Auto-Correlations(TRAC)")) self.reset_button.setText(_translate("MainWindow", "Reset")) self.start_button.setText(_translate("MainWindow", "Start")) self.save_button.setText(_translate("MainWindow", "Save"))
class Ui_MainWindow(object): def __init__(self): self.timer = QtCore.QTimer() self.gbc_is_on = False self.dph_is_on = False self.sbs_is_on = False self.number_of_clicked = 0 self.number_of_clicked_gbc = 0 self.number_of_clicked_dph = 0 self.number_of_clicked_sbs = 0 self.worker = Pool(1) self.result_space = None self.deleted_ids = list() def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1000, 700) MainWindow.setMaximumSize(QtCore.QSize(1000, 700)) setConfigOption('background', 'w') self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName("horizontalLayout") self.formLayout_settings = QtWidgets.QFormLayout() self.formLayout_settings.setObjectName("formLayout_settings") self.label_neighbours_rule = QtWidgets.QLabel(self.centralwidget) self.label_neighbours_rule.setObjectName("label_neighbours_rule") self.formLayout_settings.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_neighbours_rule) self.comboBox_neighbours_rule = QtWidgets.QComboBox(self.centralwidget) self.comboBox_neighbours_rule.setObjectName("comboBox_neighbours_rule") self.comboBox_neighbours_rule.addItem("") self.comboBox_neighbours_rule.addItem("") self.comboBox_neighbours_rule.addItem("") self.comboBox_neighbours_rule.addItem("") self.comboBox_neighbours_rule.addItem("") self.comboBox_neighbours_rule.addItem("") self.formLayout_settings.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.comboBox_neighbours_rule) self.label_border_condition = QtWidgets.QLabel(self.centralwidget) self.label_border_condition.setObjectName("label_border_condition") self.formLayout_settings.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_border_condition) self.comboBox_border_condition = QtWidgets.QComboBox(self.centralwidget) self.comboBox_border_condition.setObjectName("comboBox_border_condition") self.comboBox_border_condition.addItem("") self.comboBox_border_condition.addItem("") self.formLayout_settings.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.comboBox_border_condition) self.label_size_of_space = QtWidgets.QLabel(self.centralwidget) self.label_size_of_space.setObjectName("label_size_of_space") self.formLayout_settings.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_size_of_space) self.lineEdit_size_of_space = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_size_of_space.setObjectName("lineEdit_size_of_space") self.formLayout_settings.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.lineEdit_size_of_space) self.label_number_of_grains = QtWidgets.QLabel(self.centralwidget) self.label_number_of_grains.setObjectName("label_number_of_grains") self.formLayout_settings.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_number_of_grains) self.lineEdit_number_of_grains = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_number_of_grains.setObjectName("lineEdit_number_of_grains") self.formLayout_settings.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.lineEdit_number_of_grains) self.label_inclusions_number = QtWidgets.QLabel(self.centralwidget) self.label_inclusions_number.setObjectName("label_inclusions_number") self.formLayout_settings.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_inclusions_number) self.lineEdit_inclusions_number = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_inclusions_number.setObjectName("lineEdit_inclusions_number") self.formLayout_settings.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.lineEdit_inclusions_number) self.label_min_radius = QtWidgets.QLabel(self.centralwidget) self.label_min_radius.setObjectName("label_min_radius") self.formLayout_settings.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_min_radius) self.lineEdit_min_radius = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_min_radius.setObjectName("lineEdit_min_radius") self.formLayout_settings.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.lineEdit_min_radius) self.label_max_radius = QtWidgets.QLabel(self.centralwidget) self.label_max_radius.setObjectName("label_max_radius") self.formLayout_settings.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label_max_radius) self.lineEdit_max_radius = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_max_radius.setObjectName("lineEdit_max_radius") self.formLayout_settings.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.lineEdit_max_radius) self.pushButton_gbc_feature = QtWidgets.QPushButton(self.centralwidget) self.pushButton_gbc_feature.setObjectName("radioButton_gbc_feature") self.pushButton_gbc_feature.setStyleSheet("background-color: red") self.pushButton_gbc_feature.clicked.connect(self.controller_gbc_init) self.formLayout_settings.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.pushButton_gbc_feature) self.pushButton_delete_grains = QtWidgets.QPushButton(self.centralwidget) self.pushButton_delete_grains.setObjectName("pushButton_delete_grains") self.pushButton_delete_grains.clicked.connect(self.view_delete_grains) self.formLayout_settings.setWidget(10, QtWidgets.QFormLayout.LabelRole, self.pushButton_delete_grains) self.pushButton_keep_selected = QtWidgets.QPushButton(self.centralwidget) self.pushButton_keep_selected.setObjectName("pushButton_keep_selected") self.pushButton_keep_selected.clicked.connect(self.view_keep_selected) self.formLayout_settings.setWidget(11, QtWidgets.QFormLayout.LabelRole, self.pushButton_keep_selected) self.comboBox_list_of_grains = QtWidgets.QComboBox(self.centralwidget) self.comboBox_list_of_grains.setObjectName("comboBox_list_of_grains") self.formLayout_settings.setWidget(10, QtWidgets.QFormLayout.FieldRole, self.comboBox_list_of_grains) self.pushButton_import_from_csv = QtWidgets.QPushButton(self.centralwidget) self.pushButton_import_from_csv.setObjectName("pushButton_import_from_csv") self.pushButton_import_from_csv.clicked.connect(self.io_open_file_name_dialog) self.formLayout_settings.setWidget(12, QtWidgets.QFormLayout.LabelRole, self.pushButton_import_from_csv) self.pushButton_export_to_csv = QtWidgets.QPushButton(self.centralwidget) self.pushButton_export_to_csv.setObjectName("pushButton_export_to_csv") self.pushButton_export_to_csv.clicked.connect(self.io_open_save_dialog) self.formLayout_settings.setWidget(13, QtWidgets.QFormLayout.LabelRole, self.pushButton_export_to_csv) self.pushButton_export_to_png = QtWidgets.QPushButton(self.centralwidget) self.pushButton_export_to_png.setObjectName("pushButton_export_to_png") self.pushButton_export_to_png.clicked.connect(self.io_open_save_dialog_image) self.formLayout_settings.setWidget(14, QtWidgets.QFormLayout.LabelRole, self.pushButton_export_to_png) self.line_horizontal = QtWidgets.QFrame(self.centralwidget) self.line_horizontal.setFrameShape(QtWidgets.QFrame.HLine) self.line_horizontal.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_horizontal.setObjectName("line") self.formLayout_settings.setWidget(15, QtWidgets.QFormLayout.SpanningRole, self.line_horizontal) self.pushButton_init_space = QtWidgets.QPushButton(self.centralwidget) self.pushButton_init_space.setMaximumSize(QtCore.QSize(16777215, 40)) self.pushButton_init_space.setObjectName("pushButton_init_space") self.pushButton_init_space.clicked.connect(self.controller_init_ca_algo) self.formLayout_settings.setWidget(17, QtWidgets.QFormLayout.FieldRole, self.pushButton_init_space) self.pushButton_start_stop = QtWidgets.QPushButton(self.centralwidget) self.pushButton_start_stop.setObjectName("pushButton_start_stop") self.pushButton_start_stop.clicked.connect(self.controller_init_image_timer) self.formLayout_settings.setWidget(18, QtWidgets.QFormLayout.FieldRole, self.pushButton_start_stop) self.pushButton_step = QtWidgets.QPushButton(self.centralwidget) self.pushButton_step.setObjectName("pushButton_step") self.pushButton_step.clicked.connect(self.controller_one_step) self.formLayout_settings.setWidget(19, QtWidgets.QFormLayout.FieldRole, self.pushButton_step) self.pushButton_clear_space = QtWidgets.QPushButton(self.centralwidget) self.pushButton_clear_space.setObjectName("pushButton_clear_space") self.pushButton_clear_space.clicked.connect(self.view_clear_space) self.formLayout_settings.setWidget(20, QtWidgets.QFormLayout.FieldRole, self.pushButton_clear_space) self.pushButton_draw_boundaries = QtWidgets.QPushButton(self.centralwidget) self.pushButton_draw_boundaries.setObjectName("pushButton_draw_boundaries") self.pushButton_draw_boundaries.clicked.connect(self.view_draw_boundaries) self.formLayout_settings.setWidget(21, QtWidgets.QFormLayout.FieldRole, self.pushButton_draw_boundaries) self.pushButton_dual_phase = QtWidgets.QPushButton(self.centralwidget) self.pushButton_dual_phase.setObjectName("pushButton_dual_phase") self.pushButton_dual_phase.clicked.connect(self.controller_init_dual_phase) self.formLayout_settings.setWidget(17, QtWidgets.QFormLayout.LabelRole, self.pushButton_dual_phase) self.pushButton_dual_phase_init = QtWidgets.QPushButton(self.centralwidget) self.pushButton_dual_phase_init.setObjectName("pushButton_dual_phase") self.pushButton_dual_phase_init.clicked.connect(self.controller_dual_phase_add_random) self.formLayout_settings.setWidget(18, QtWidgets.QFormLayout.LabelRole, self.pushButton_dual_phase_init) self.pushButton_substructures = QtWidgets.QPushButton(self.centralwidget) self.pushButton_substructures.setObjectName("pushButton_dual_phase") self.pushButton_substructures.clicked.connect(self.controller_init_substructures) self.formLayout_settings.setWidget(19, QtWidgets.QFormLayout.LabelRole, self.pushButton_substructures) self.label = QtWidgets.QLabel(self.centralwidget) self.label.setText("") self.label.setObjectName("label") self.formLayout_settings.setWidget(9, QtWidgets.QFormLayout.LabelRole, self.label) self.label_probability = QtWidgets.QLabel(self.centralwidget) self.label_probability.setObjectName("label_probability") self.formLayout_settings.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.label_probability) self.lineEdit_prob_threshold = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_prob_threshold.setObjectName("lineEdit_prob_threshold") self.formLayout_settings.setWidget(8, QtWidgets.QFormLayout.FieldRole, self.lineEdit_prob_threshold) self.horizontalLayout.addLayout(self.formLayout_settings) self.line_vertical = QtWidgets.QFrame(self.centralwidget) self.line_vertical.setFrameShape(QtWidgets.QFrame.VLine) self.line_vertical.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_vertical.setObjectName("line_2") self.horizontalLayout.addWidget(self.line_vertical) self.graphicsView = ImageView(self.centralwidget) self.graphicsView.setMinimumSize(QtCore.QSize(501, 501)) self.graphicsView.setMaximumSize(QtCore.QSize(501, 501)) self.graphicsView.setObjectName("graphicsView") self.graphicsView.ui.histogram.hide() self.graphicsView.ui.roiBtn.hide() self.graphicsView.ui.menuBtn.hide() self.graphicsView.show() self.horizontalLayout.addWidget(self.graphicsView) # Other stuff MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1000, 26)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) self.controller_init_ca_algo() # self._clear_space() def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.label_neighbours_rule.setText(_translate("MainWindow", "Neighbours rule")) self.comboBox_neighbours_rule.setItemText(0, _translate("MainWindow", "VONNEUMANN")) self.comboBox_neighbours_rule.setItemText(1, _translate("MainWindow", "MOORE")) self.comboBox_neighbours_rule.setItemText(2, _translate("MainWindow", "HEXAGONAL_LEFT")) self.comboBox_neighbours_rule.setItemText(3, _translate("MainWindow", "HEXAGONAL_RIGHT")) self.comboBox_neighbours_rule.setItemText(4, _translate("MainWindow", "PENTAGONAL_LEFT")) self.comboBox_neighbours_rule.setItemText(5, _translate("MainWindow", "PENTAGONAL_RIGHT")) self.label_border_condition.setText(_translate("MainWindow", "Border rule")) self.comboBox_border_condition.setItemText(0, _translate("MainWindow", "ABSORBING")) self.comboBox_border_condition.setItemText(1, _translate("MainWindow", "SNAKELIKE")) self.label_size_of_space.setText(_translate("MainWindow", "Size of space")) self.lineEdit_size_of_space.setText(_translate("MainWindow", "100")) self.label_number_of_grains.setText(_translate("MainWindow", "Number of grains")) self.lineEdit_number_of_grains.setText(_translate("MainWindow", "120")) self.label_inclusions_number.setText(_translate("MainWindow", "Number of incl.")) self.lineEdit_inclusions_number.setText(_translate("MainWindow", "0")) self.label_min_radius.setText(_translate("MainWindow", "Min radius")) self.lineEdit_min_radius.setText(_translate("MainWindow", "1")) self.label_max_radius.setText(_translate("MainWindow", "Max radius")) self.lineEdit_max_radius.setText(_translate("MainWindow", "6")) self.pushButton_gbc_feature.setText(_translate("MainWindow", "GBC feature")) self.pushButton_delete_grains.setText(_translate("MainWindow", "Delete grains")) self.pushButton_keep_selected.setText(_translate("MainWindow", "Keep selected")) self.pushButton_import_from_csv.setText(_translate("MainWindow", "Import csv")) self.pushButton_export_to_csv.setText(_translate("MainWindow", "Export csv")) self.pushButton_export_to_png.setText(_translate("MainWindow", "Export png")) self.pushButton_init_space.setText(_translate("MainWindow", "Init space")) self.pushButton_start_stop.setText(_translate("MainWindow", "Start/Stop")) self.pushButton_step.setText(_translate("MainWindow", "Step")) self.pushButton_clear_space.setText(_translate("MainWindow", "Clear space")) self.pushButton_draw_boundaries.setText(_translate("MainWindow", "Draw bound.")) self.pushButton_dual_phase.setText(_translate("MainWindow", "Dual phase")) self.pushButton_dual_phase_init.setText(_translate("MainWindow", "Dual init")) self.pushButton_substructures.setText(_translate("MainWindow", "Substructures")) self.label_probability.setText(_translate("MainWindow", "Probability")) self.lineEdit_prob_threshold.setText(_translate("MainWindow", "60")) def view_generate_pg_colormap(self): self.pos = np.linspace(0.0, 1.0, self._ca_algo.number_of_reserved_ids+int(self.lineEdit_number_of_grains.text())) self.cmap = ColorMap(pos=self.pos, color=self._ca_algo.color_id) self.graphicsView.setColorMap(self.cmap) def view_display_image(self): self.graphicsView.setImage(self._ca_algo.space.T, levels=(0.0, self._ca_algo.number_of_reserved_ids+float(self.lineEdit_number_of_grains.text()))) def view_generate_set_of_ids(self): self.comboBox_list_of_grains.clear() for item in self._ca_algo.list_of_id: self.comboBox_list_of_grains.addItem(str(item)) self.comboBox_list_of_grains.setEnabled(False) self.pushButton_delete_grains.setEnabled(False) self.pushButton_keep_selected.setEnabled(False) def view_delete_grains(self): id_to_delete = int(self.comboBox_list_of_grains.currentText()) if id_to_delete in self._ca_algo.space: self._ca_algo.space[self._ca_algo.space == id_to_delete] = 0 self.result_space = None self.deleted_ids.append(id_to_delete) self.view_display_image() else: return def view_keep_selected(self): id_to_keep = int(self.comboBox_list_of_grains.currentText()) if id_to_keep in self._ca_algo.space: self._ca_algo.space[self._ca_algo.space != id_to_keep] = 0 self.result_space = None self.view_display_image() else: return def view_draw_boundaries(self): for x in range(self._ca_algo.space_width): for y in range(self._ca_algo.space_width): cell = self._ca_algo.space[x, y] if x < self._ca_algo.space_width-1: cell_neigh_1 = self._ca_algo.space[x+1, y] else: cell_neigh_1 = cell if y < self._ca_algo.space_width-1: cell_neigh_2 = self._ca_algo.space[x, y+1] else: cell_neigh_2 = cell if cell > self._ca_algo.cell_inclusion and (cell != cell_neigh_1 or cell != cell_neigh_2): self._ca_algo.space[x, y] = self._ca_algo.cell_inclusion self.result_space = self._ca_algo.space self.view_display_image() grain_boundaries = np.count_nonzero(self._ca_algo.space == 1) grain_size = len(self._ca_algo.list_of_id) grain_aver = (self._ca_algo.space_width * self._ca_algo.space_width) / grain_size msg = QMessageBox() msg.setWindowTitle('Result') msg.setText('Total length of the boundaries: ' + str(grain_boundaries) + '\n' + 'Average size of a grain: ' + str(int(grain_aver))) msg.exec_() def view_clear_space(self): self.result_space = None self.timer.stop() self._ca_algo.space = self._ca_algo.space_clear self.graphicsView.clear() def controller_init_ca_algo(self): self._ca_algo = None self.deleted_ids = list() if not self.gbc_is_on: self.result_space = None self._ca_algo = CellularAutomata(int(self.lineEdit_number_of_grains.text()), int(self.lineEdit_inclusions_number.text()), int(self.lineEdit_min_radius.text()), int(self.lineEdit_max_radius.text()), int(self.lineEdit_size_of_space.text()), int(self.lineEdit_size_of_space.text()), str(self.comboBox_border_condition.currentText()), str(self.comboBox_neighbours_rule.currentText())) self._ca_algo.add_random() self._ca_algo.add_inclusions() self.view_generate_pg_colormap() self.view_generate_set_of_ids() self.view_display_image() else: self.result_space = None self._ca_algo = CellularAutomataGBC(int(self.lineEdit_number_of_grains.text()), int(self.lineEdit_inclusions_number.text()), int(self.lineEdit_min_radius.text()), int(self.lineEdit_max_radius.text()), int(self.lineEdit_size_of_space.text()), int(self.lineEdit_size_of_space.text()), str(self.comboBox_border_condition.currentText()), int(self.lineEdit_prob_threshold.text())) self._ca_algo.add_random() self._ca_algo.add_inclusions() self.view_generate_pg_colormap() self.view_generate_set_of_ids() self.view_display_image() def controller_init_image_timer(self): self.number_of_clicked += 1 if self.number_of_clicked % 2: self.pushButton_start_stop.setStyleSheet("background-color: green") self.timer.timeout.connect(self.controller_update_func) self.timer.start(50) else: self.pushButton_start_stop.setStyleSheet("background-color: none") self.timer.stop() def controller_update_func(self): if self._ca_algo.cell_empty in self._ca_algo.space: if self.result_space is None: self.result_space = self.worker.apply_async(self._ca_algo.one_step) return if self.result_space.ready(): self._ca_algo.space = self.result_space.get() self.view_display_image() self.result_space = self.worker.apply_async(self._ca_algo.one_step) else: self.comboBox_list_of_grains.setEnabled(True) self.pushButton_delete_grains.setEnabled(True) self.pushButton_keep_selected.setEnabled(True) def controller_one_step(self): self.timer.stop() self.controller_update_func() def controller_gbc_init(self): self.number_of_clicked_gbc += 1 if self.number_of_clicked_gbc % 2: self.gbc_is_on = True self.pushButton_gbc_feature.setStyleSheet("background-color: green") self.comboBox_neighbours_rule.setCurrentText('MOORE') self.comboBox_neighbours_rule.setEnabled(False) else: self.gbc_is_on = False self.pushButton_gbc_feature.setStyleSheet("background-color: red") self.comboBox_neighbours_rule.setEnabled(True) def controller_init_substructures(self): self.number_of_clicked_sbs += 1 if self.number_of_clicked_sbs % 2: self.pushButton_substructures.setStyleSheet("background-color: green") self.sbs_is_on = True else: self.pushButton_substructures.setStyleSheet("background-color: none") self.sbs_is_on = False self.substr_kept_ids = self._ca_algo.list_of_id for one_id in self.deleted_ids: self.substr_kept_ids.remove(one_id) for one_id in self.substr_kept_ids: self._ca_algo.grain_model[one_id] = self._ca_algo.phase_nonzero self._ca_algo.color_id[one_id] = self._ca_algo.color_id[2] self.result_space = None self.view_display_image() def controller_init_dual_phase(self): self.number_of_clicked_dph += 1 if self.number_of_clicked_dph % 2: self.pushButton_dual_phase.setStyleSheet("background-color: green") self.dph_is_on = True else: self.pushButton_dual_phase.setStyleSheet("background-color: none") self.dph_is_on = False kept_ids = self._ca_algo.list_of_id for one_id in self.deleted_ids: kept_ids.remove(one_id) for one_id in kept_ids: self._ca_algo.space[self._ca_algo.space == one_id] = 2 self.result_space = None self.view_display_image() def controller_dual_phase_add_random(self): if self.sbs_is_on and not self.dph_is_on: self._ca_algo.add_random_dual_phase(self.substr_kept_ids) else: self._ca_algo.add_random_dual_phase() self.result_space = None self.view_display_image() def controller_substructures_add_random(self): self._ca_algo.add_random_dual_phase(self.substr_kept_ids) self.result_space = None self.view_display_image() def io_open_save_dialog(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog fileName, _ = QFileDialog.getSaveFileName(self.centralwidget, "Save to CSV file", "", "CSV Files (*.csv)", options=options) if fileName: pd.DataFrame(self._ca_algo.space).to_csv(fileName) def io_open_file_name_dialog(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog fileName, _ = QFileDialog.getOpenFileName(self.centralwidget, "Open CSV file", "", "CSV Files (*.csv)", options=options) if fileName: self._ca_algo.space = pd.read_csv(fileName, index_col=0).astype(int).values self.view_display_image() def io_open_save_dialog_image(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog fileName, _ = QFileDialog.getSaveFileName(self.centralwidget, "Save to PNG file", "", "PNG Files (*.png)", options=options) if fileName: self.graphicsView.export(fileName)
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(849, 648) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout_17 = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout_17.setObjectName("gridLayout_17") self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.verticalLayout_9 = QtWidgets.QVBoxLayout() self.verticalLayout_9.setObjectName("verticalLayout_9") self.frame_12 = QtWidgets.QFrame(self.centralwidget) self.frame_12.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_12.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_12.setObjectName("frame_12") self.gridLayout_13 = QtWidgets.QGridLayout(self.frame_12) self.gridLayout_13.setObjectName("gridLayout_13") self.verticalLayout_7 = QtWidgets.QVBoxLayout() self.verticalLayout_7.setObjectName("verticalLayout_7") self.frame_2 = QtWidgets.QFrame(self.frame_12) self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_2.setObjectName("frame_2") self.gridLayout_2 = QtWidgets.QGridLayout(self.frame_2) self.gridLayout_2.setObjectName("gridLayout_2") self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.label = QtWidgets.QLabel(self.frame_2) self.label.setMaximumSize(QtCore.QSize(90, 31)) font = QtGui.QFont() font.setFamily("MV Boli") font.setPointSize(18) font.setBold(False) font.setItalic(False) font.setWeight(50) self.label.setFont(font) self.label.setObjectName("label") self.horizontalLayout_3.addWidget(self.label) spacerItem = QtWidgets.QSpacerItem(88, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem) self.showcomp1 = QtWidgets.QComboBox(self.frame_2) self.showcomp1.setMinimumSize(QtCore.QSize(181, 21)) self.showcomp1.setMaximumSize(QtCore.QSize(200, 21)) self.showcomp1.setObjectName("showcomp1") self.showcomp1.addItem("") self.showcomp1.addItem("") self.showcomp1.addItem("") self.showcomp1.addItem("") self.showcomp1.addItem("") self.horizontalLayout_3.addWidget(self.showcomp1) self.gridLayout_2.addLayout(self.horizontalLayout_3, 0, 0, 1, 1) self.verticalLayout_7.addWidget(self.frame_2) self.frame = QtWidgets.QFrame(self.frame_12) self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.gridLayout = QtWidgets.QGridLayout(self.frame) self.gridLayout.setObjectName("gridLayout") self.widImg1 = ImageView(self.frame) self.widImg1.setMinimumSize(QtCore.QSize(168, 171)) self.widImg1.setObjectName("widImg1") self.widImg1.ui.histogram.hide() self.widImg1.ui.roiBtn.hide() self.widImg1.ui.menuBtn.hide() self.widImg1.ui.roiPlot.hide() self.widImg1.getView().setAspectLocked(False) self.widImg1.view.setAspectLocked(False) self.gridLayout.addWidget(self.widImg1, 0, 0, 1, 1) self.widcomp1 = ImageView(self.frame) self.widcomp1.setMinimumSize(QtCore.QSize(167, 171)) self.widcomp1.setObjectName("widcomp1") self.widcomp1.ui.histogram.hide() self.widcomp1.ui.roiBtn.hide() self.widcomp1.ui.menuBtn.hide() self.widcomp1.ui.roiPlot.hide() self.widcomp1.getView().setAspectLocked(False) self.widcomp1.view.setAspectLocked(False) self.gridLayout.addWidget(self.widcomp1, 0, 1, 1, 1) self.verticalLayout_7.addWidget(self.frame) self.gridLayout_13.addLayout(self.verticalLayout_7, 0, 0, 1, 1) self.verticalLayout_9.addWidget(self.frame_12) self.frame_13 = QtWidgets.QFrame(self.centralwidget) self.frame_13.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_13.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_13.setObjectName("frame_13") self.gridLayout_14 = QtWidgets.QGridLayout(self.frame_13) self.gridLayout_14.setObjectName("gridLayout_14") self.verticalLayout_8 = QtWidgets.QVBoxLayout() self.verticalLayout_8.setObjectName("verticalLayout_8") self.frame_14 = QtWidgets.QFrame(self.frame_13) self.frame_14.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_14.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_14.setObjectName("frame_14") self.gridLayout_15 = QtWidgets.QGridLayout(self.frame_14) self.gridLayout_15.setObjectName("gridLayout_15") self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.label_2 = QtWidgets.QLabel(self.frame_14) self.label_2.setMaximumSize(QtCore.QSize(90, 31)) font = QtGui.QFont() font.setFamily("MV Boli") font.setPointSize(18) font.setBold(False) font.setItalic(False) font.setWeight(50) self.label_2.setFont(font) self.label_2.setObjectName("label_2") self.horizontalLayout_4.addWidget(self.label_2) spacerItem1 = QtWidgets.QSpacerItem(88, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem1) self.showcomp2 = QtWidgets.QComboBox(self.frame_14) self.showcomp2.setMinimumSize(QtCore.QSize(181, 21)) self.showcomp2.setMaximumSize(QtCore.QSize(200, 21)) self.showcomp2.setObjectName("showcomp2") self.showcomp2.addItem("") self.showcomp2.addItem("") self.showcomp2.addItem("") self.showcomp2.addItem("") self.showcomp2.addItem("") self.horizontalLayout_4.addWidget(self.showcomp2) self.gridLayout_15.addLayout(self.horizontalLayout_4, 0, 0, 1, 1) self.verticalLayout_8.addWidget(self.frame_14) self.frame_15 = QtWidgets.QFrame(self.frame_13) self.frame_15.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_15.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_15.setObjectName("frame_15") self.gridLayout_16 = QtWidgets.QGridLayout(self.frame_15) self.gridLayout_16.setObjectName("gridLayout_16") self.widImg2 = ImageView(self.frame_15) self.widImg2.setMinimumSize(QtCore.QSize(168, 171)) self.widImg2.setObjectName("widImg2") self.widImg2.ui.histogram.hide() self.widImg2.ui.roiBtn.hide() self.widImg2.ui.menuBtn.hide() self.widImg2.ui.roiPlot.hide() self.widImg2.getView().setAspectLocked(False) self.widImg2.view.setAspectLocked(False) self.gridLayout_16.addWidget(self.widImg2, 0, 0, 1, 1) self.widcomp2 = ImageView(self.frame_15) self.widcomp2.setMinimumSize(QtCore.QSize(167, 171)) self.widcomp2.setObjectName("widcomp2") self.widcomp2.ui.histogram.hide() self.widcomp2.ui.roiBtn.hide() self.widcomp2.ui.menuBtn.hide() self.widcomp2.ui.roiPlot.hide() self.widcomp2.getView().setAspectLocked(False) self.widcomp2.view.setAspectLocked(False) self.gridLayout_16.addWidget(self.widcomp2, 0, 1, 1, 1) self.verticalLayout_8.addWidget(self.frame_15) self.gridLayout_14.addLayout(self.verticalLayout_8, 0, 0, 1, 1) self.verticalLayout_9.addWidget(self.frame_13) self.horizontalLayout_5.addLayout(self.verticalLayout_9) self.verticalLayout_6 = QtWidgets.QVBoxLayout() self.verticalLayout_6.setObjectName("verticalLayout_6") self.frame_11 = QtWidgets.QFrame(self.centralwidget) self.frame_11.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_11.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_11.setObjectName("frame_11") self.gridLayout_12 = QtWidgets.QGridLayout(self.frame_11) self.gridLayout_12.setObjectName("gridLayout_12") self.gridLayout_11 = QtWidgets.QGridLayout() self.gridLayout_11.setObjectName("gridLayout_11") spacerItem2 = QtWidgets.QSpacerItem(228, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_11.addItem(spacerItem2, 1, 1, 1, 1) self.verticalLayout_5 = QtWidgets.QVBoxLayout() self.verticalLayout_5.setObjectName("verticalLayout_5") self.frame_7 = QtWidgets.QFrame(self.frame_11) self.frame_7.setMinimumSize(QtCore.QSize(0, 130)) self.frame_7.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_7.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_7.setObjectName("frame_7") self.gridLayout_7 = QtWidgets.QGridLayout(self.frame_7) self.gridLayout_7.setObjectName("gridLayout_7") self.slider1 = QtWidgets.QSlider(self.frame_7) self.slider1.setOrientation(QtCore.Qt.Horizontal) self.slider1.setObjectName("slider1") self.slider1.setMaximumSize(QtCore.QSize(150, 22)) self.gridLayout_7.addWidget(self.slider1, 0, 1, 1, 1) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.chooseimg1 = QtWidgets.QComboBox(self.frame_7) self.chooseimg1.setMinimumSize(QtCore.QSize(116, 20)) self.chooseimg1.setObjectName("chooseimg1") self.chooseimg1.addItem("") self.chooseimg1.addItem("") self.verticalLayout_3.addWidget(self.chooseimg1) self.choosecomp1 = QtWidgets.QComboBox(self.frame_7) self.choosecomp1.setMinimumSize(QtCore.QSize(116, 20)) self.choosecomp1.setObjectName("choosecomp1") self.choosecomp1.addItem("") self.choosecomp1.addItem("") self.choosecomp1.addItem("") self.choosecomp1.addItem("") self.choosecomp1.addItem("") self.choosecomp1.addItem("") self.choosecomp1.addItem("") self.choosecomp1.setMaximumSize(QtCore.QSize(150, 20)) self.verticalLayout_3.addWidget(self.choosecomp1) self.gridLayout_7.addLayout(self.verticalLayout_3, 0, 0, 1, 1) self.verticalLayout_5.addWidget(self.frame_7) self.frame_6 = QtWidgets.QFrame(self.frame_11) self.frame_6.setMinimumSize(QtCore.QSize(0, 130)) self.frame_6.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_6.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_6.setObjectName("frame_6") self.gridLayout_6 = QtWidgets.QGridLayout(self.frame_6) self.gridLayout_6.setObjectName("gridLayout_6") self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.chooseimg2 = QtWidgets.QComboBox(self.frame_6) self.chooseimg2.setMinimumSize(QtCore.QSize(116, 20)) self.chooseimg2.setObjectName("chooseimg2") self.chooseimg2.addItem("") self.chooseimg2.addItem("") self.verticalLayout_2.addWidget(self.chooseimg2) self.choosecomp2 = QtWidgets.QComboBox(self.frame_6) self.choosecomp2.setMinimumSize(QtCore.QSize(116, 20)) self.choosecomp2.setObjectName("choosecomp2") self.choosecomp2.addItem("") self.choosecomp2.setMaximumSize(QtCore.QSize(150, 20)) self.verticalLayout_2.addWidget(self.choosecomp2) self.gridLayout_6.addLayout(self.verticalLayout_2, 0, 0, 1, 1) self.slider2 = QtWidgets.QSlider(self.frame_6) self.slider2.setOrientation(QtCore.Qt.Horizontal) self.slider2.setObjectName("slider2") self.slider2.setMaximumSize(QtCore.QSize(150, 22)) self.gridLayout_6.addWidget(self.slider2, 0, 1, 1, 1) self.verticalLayout_5.addWidget(self.frame_6) self.gridLayout_11.addLayout(self.verticalLayout_5, 2, 1, 1, 2) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_11.addItem(spacerItem3, 0, 1, 1, 1) self.verticalLayout_4 = QtWidgets.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.frame_8 = QtWidgets.QFrame(self.frame_11) self.frame_8.setMinimumSize(QtCore.QSize(0, 0)) self.frame_8.setMaximumSize(QtCore.QSize(16777215, 50)) self.frame_8.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_8.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_8.setObjectName("frame_8") self.gridLayout_8 = QtWidgets.QGridLayout(self.frame_8) self.gridLayout_8.setObjectName("gridLayout_8") self.label_3 = QtWidgets.QLabel(self.frame_8) font = QtGui.QFont() font.setFamily("MV Boli") font.setPointSize(18) self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.gridLayout_8.addWidget(self.label_3, 0, 0, 1, 1) self.verticalLayout_4.addWidget(self.frame_8) self.frame_9 = QtWidgets.QFrame(self.frame_11) self.frame_9.setMinimumSize(QtCore.QSize(0, 60)) self.frame_9.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_9.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_9.setObjectName("frame_9") self.gridLayout_9 = QtWidgets.QGridLayout(self.frame_9) self.gridLayout_9.setObjectName("gridLayout_9") self.label_4 = QtWidgets.QLabel(self.frame_9) self.label_4.setMinimumSize(QtCore.QSize(0, 30)) font = QtGui.QFont() font.setFamily("Papyrus") font.setPointSize(10) self.label_4.setFont(font) self.label_4.setObjectName("label_4") self.gridLayout_9.addWidget(self.label_4, 0, 0, 1, 1) self.verticalLayout_4.addWidget(self.frame_9) self.frame_10 = QtWidgets.QFrame(self.frame_11) self.frame_10.setMinimumSize(QtCore.QSize(0, 110)) self.frame_10.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_10.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_10.setObjectName("frame_10") self.gridLayout_10 = QtWidgets.QGridLayout(self.frame_10) self.gridLayout_10.setObjectName("gridLayout_10") self.label_7 = QtWidgets.QLabel(self.frame_10) self.label_7.setMinimumSize(QtCore.QSize(0, 60)) font = QtGui.QFont() font.setFamily("Papyrus") font.setPointSize(10) self.label_7.setFont(font) self.label_7.setObjectName("label_7") self.gridLayout_10.addWidget(self.label_7, 0, 0, 1, 1) self.verticalLayout_4.addWidget(self.frame_10) self.gridLayout_11.addLayout(self.verticalLayout_4, 0, 0, 3, 1) self.gridLayout_12.addLayout(self.gridLayout_11, 0, 0, 1, 1) self.verticalLayout_6.addWidget(self.frame_11) self.frame_5 = QtWidgets.QFrame(self.centralwidget) self.frame_5.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_5.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_5.setObjectName("frame_5") self.gridLayout_5 = QtWidgets.QGridLayout(self.frame_5) self.gridLayout_5.setObjectName("gridLayout_5") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.frame_4 = QtWidgets.QFrame(self.frame_5) self.frame_4.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_4.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_4.setObjectName("frame_4") self.gridLayout_4 = QtWidgets.QGridLayout(self.frame_4) self.gridLayout_4.setObjectName("gridLayout_4") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.label_5 = QtWidgets.QLabel(self.frame_4) self.label_5.setMinimumSize(QtCore.QSize(49, 20)) self.label_5.setMaximumSize(QtCore.QSize(50, 20)) font = QtGui.QFont() font.setPointSize(10) self.label_5.setFont(font) self.label_5.setObjectName("label_5") self.horizontalLayout_2.addWidget(self.label_5) spacerItem4 = QtWidgets.QSpacerItem(110, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem4) self.label_6 = QtWidgets.QLabel(self.frame_4) self.label_6.setMaximumSize(QtCore.QSize(52, 20)) font = QtGui.QFont() font.setPointSize(10) self.label_6.setFont(font) self.label_6.setObjectName("label_6") self.horizontalLayout_2.addWidget(self.label_6) spacerItem5 = QtWidgets.QSpacerItem(2, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem5) self.chooseOut = QtWidgets.QComboBox(self.frame_4) self.chooseOut.setMinimumSize(QtCore.QSize(100, 20)) self.chooseOut.setObjectName("chooseOut") self.chooseOut.addItem("") self.chooseOut.addItem("") self.horizontalLayout_2.addWidget(self.chooseOut) self.gridLayout_4.addLayout(self.horizontalLayout_2, 0, 0, 1, 1) self.verticalLayout.addWidget(self.frame_4) self.frame_3 = QtWidgets.QFrame(self.frame_5) self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_3.setObjectName("frame_3") self.gridLayout_3 = QtWidgets.QGridLayout(self.frame_3) self.gridLayout_3.setObjectName("gridLayout_3") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.widgOut = ImageView(self.frame_3) self.widgOut.setMinimumSize(QtCore.QSize(162, 159)) self.widgOut.setObjectName("widgOut") self.widgOut.ui.histogram.hide() self.widgOut.ui.roiBtn.hide() self.widgOut.ui.menuBtn.hide() self.widgOut.ui.roiPlot.hide() self.widgOut.getView().setAspectLocked(False) self.widgOut.view.setAspectLocked(False) self.horizontalLayout.addWidget(self.widgOut) self.widgOut2 = ImageView(self.frame_3) self.widgOut2.setMinimumSize(QtCore.QSize(161, 159)) self.widgOut2.setObjectName("widgOut2") self.widgOut2.ui.histogram.hide() self.widgOut2.ui.roiBtn.hide() self.widgOut2.ui.menuBtn.hide() self.widgOut2.ui.roiPlot.hide() self.widgOut2.getView().setAspectLocked(False) self.widgOut2.view.setAspectLocked(False) self.horizontalLayout.addWidget(self.widgOut2) self.gridLayout_3.addLayout(self.horizontalLayout, 0, 0, 1, 1) self.verticalLayout.addWidget(self.frame_3) self.gridLayout_5.addLayout(self.verticalLayout, 0, 0, 1, 1) self.verticalLayout_6.addWidget(self.frame_5) self.horizontalLayout_5.addLayout(self.verticalLayout_6) self.gridLayout_17.addLayout(self.horizontalLayout_5, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 849, 21)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.upload = QtWidgets.QAction(MainWindow) self.upload.setObjectName("upload") self.actionUpload_image_2 = QtWidgets.QAction(MainWindow) self.actionUpload_image_2.setObjectName("actionUpload_image_2") self.menuFile.addAction(self.upload) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) self.showcomp1.setCurrentIndex(0) self.showcomp2.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.label.setText(_translate("MainWindow", "Image 1")) self.showcomp1.setItemText(0, _translate("MainWindow", "Select Component")) self.showcomp1.setItemText(1, _translate("MainWindow", "Magnitude")) self.showcomp1.setItemText(2, _translate("MainWindow", "Phase")) self.showcomp1.setItemText(3, _translate("MainWindow", "Real")) self.showcomp1.setItemText(4, _translate("MainWindow", "Imaginary")) self.label_2.setText(_translate("MainWindow", "Image 2")) self.showcomp2.setItemText(0, _translate("MainWindow", "Select Component")) self.showcomp2.setItemText(1, _translate("MainWindow", "Magnitude")) self.showcomp2.setItemText(2, _translate("MainWindow", "Phase")) self.showcomp2.setItemText(3, _translate("MainWindow", "Real")) self.showcomp2.setItemText(4, _translate("MainWindow", "Imaginary")) self.chooseimg1.setItemText(0, _translate("MainWindow", "Image 1")) self.chooseimg1.setItemText(1, _translate("MainWindow", "Image 2")) self.choosecomp1.setItemText(0, _translate("MainWindow", "Select")) self.choosecomp1.setItemText(1, _translate("MainWindow", "Magnitude")) self.choosecomp1.setItemText(2, _translate("MainWindow", "Phase")) self.choosecomp1.setItemText(3, _translate("MainWindow", "Real")) self.choosecomp1.setItemText(4, _translate("MainWindow", "Imaginary")) self.choosecomp1.setItemText(5, _translate("MainWindow", "Uniform Magnitude")) self.choosecomp1.setItemText(6, _translate("MainWindow", "Uniform Phase")) self.choosecomp2.setItemText(0, _translate("MainWindow", "Select Component 1")) self.chooseimg2.setItemText(0, _translate("MainWindow", "Image 1")) self.chooseimg2.setItemText(1, _translate("MainWindow", "Image 2")) self.label_3.setText(_translate("MainWindow", "Mixer")) self.label_4.setText(_translate("MainWindow", "Component 1")) self.label_7.setText(_translate("MainWindow", "Component 2")) self.label_5.setText(_translate("MainWindow", "Output 1")) self.label_6.setText(_translate("MainWindow", "Output 2")) self.chooseOut.setItemText(0, _translate("MainWindow", "Output 1")) self.chooseOut.setItemText(1, _translate("MainWindow", "Output 2")) self.menuFile.setTitle(_translate("MainWindow", "File")) self.upload.setText(_translate("MainWindow", "Upload ")) self.actionUpload_image_2.setText(_translate("MainWindow", "Upload image 2"))
class Ui_MainWindow(object): def __init__(self): self.timer = QtCore.QTimer() self.number_of_clicked = 0 self.worker = Pool(1) self.result_space = None def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1000, 700) MainWindow.setMaximumSize(QtCore.QSize(1000, 700)) setConfigOption('background', 'w') self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName("horizontalLayout") self.formLayout_settings = QtWidgets.QFormLayout() self.formLayout_settings.setObjectName("formLayout_settings") self.label_neighbours_rule = QtWidgets.QLabel(self.centralwidget) self.label_neighbours_rule.setObjectName("label_neighbours_rule") self.formLayout_settings.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_neighbours_rule) self.comboBox_neighbours_rule = QtWidgets.QComboBox(self.centralwidget) self.comboBox_neighbours_rule.setObjectName("comboBox_neighbours_rule") self.comboBox_neighbours_rule.addItem("") self.comboBox_neighbours_rule.addItem("") self.comboBox_neighbours_rule.addItem("") self.comboBox_neighbours_rule.addItem("") self.comboBox_neighbours_rule.addItem("") self.comboBox_neighbours_rule.addItem("") self.formLayout_settings.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.comboBox_neighbours_rule) self.label_border_condition = QtWidgets.QLabel(self.centralwidget) self.label_border_condition.setObjectName("label_border_condition") self.formLayout_settings.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_border_condition) self.comboBox_border_condition = QtWidgets.QComboBox( self.centralwidget) self.comboBox_border_condition.setObjectName( "comboBox_border_condition") self.comboBox_border_condition.addItem("") self.comboBox_border_condition.addItem("") self.formLayout_settings.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.comboBox_border_condition) self.label_size_of_space = QtWidgets.QLabel(self.centralwidget) self.label_size_of_space.setObjectName("label_size_of_space") self.formLayout_settings.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_size_of_space) self.lineEdit_size_of_space = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_size_of_space.setObjectName("lineEdit_size_of_space") self.formLayout_settings.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.lineEdit_size_of_space) self.label_number_of_grains = QtWidgets.QLabel(self.centralwidget) self.label_number_of_grains.setObjectName("label_number_of_grains") self.formLayout_settings.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_number_of_grains) self.lineEdit_number_of_grains = QtWidgets.QLineEdit( self.centralwidget) self.lineEdit_number_of_grains.setObjectName( "lineEdit_number_of_grains") self.formLayout_settings.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.lineEdit_number_of_grains) self.label_inclusions_number = QtWidgets.QLabel(self.centralwidget) self.label_inclusions_number.setObjectName("label_inclusions_number") self.formLayout_settings.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_inclusions_number) self.lineEdit_inclusions_number = QtWidgets.QLineEdit( self.centralwidget) self.lineEdit_inclusions_number.setObjectName( "lineEdit_inclusions_number") self.formLayout_settings.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.lineEdit_inclusions_number) self.label_min_radius = QtWidgets.QLabel(self.centralwidget) self.label_min_radius.setObjectName("label_min_radius") self.formLayout_settings.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_min_radius) self.lineEdit_min_radius = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_min_radius.setObjectName("lineEdit_min_radius") self.formLayout_settings.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.lineEdit_min_radius) self.label_max_radius = QtWidgets.QLabel(self.centralwidget) self.label_max_radius.setObjectName("label_max_radius") self.formLayout_settings.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label_max_radius) self.lineEdit_max_radius = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_max_radius.setObjectName("lineEdit_max_radius") self.formLayout_settings.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.lineEdit_max_radius) self.pushButton_import_from_csv = QtWidgets.QPushButton( self.centralwidget) self.pushButton_import_from_csv.setObjectName( "pushButton_import_from_csv") self.pushButton_import_from_csv.clicked.connect( self.io_open_file_name_dialog) self.formLayout_settings.setWidget(12, QtWidgets.QFormLayout.LabelRole, self.pushButton_import_from_csv) self.pushButton_export_to_csv = QtWidgets.QPushButton( self.centralwidget) self.pushButton_export_to_csv.setObjectName("pushButton_export_to_csv") self.pushButton_export_to_csv.clicked.connect(self.io_open_save_dialog) self.formLayout_settings.setWidget(13, QtWidgets.QFormLayout.LabelRole, self.pushButton_export_to_csv) self.pushButton_export_to_png = QtWidgets.QPushButton( self.centralwidget) self.pushButton_export_to_png.setObjectName("pushButton_export_to_png") self.pushButton_export_to_png.clicked.connect( self.io_open_save_dialog_image) self.formLayout_settings.setWidget(14, QtWidgets.QFormLayout.LabelRole, self.pushButton_export_to_png) self.line_horizontal = QtWidgets.QFrame(self.centralwidget) self.line_horizontal.setFrameShape(QtWidgets.QFrame.HLine) self.line_horizontal.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_horizontal.setObjectName("line") self.formLayout_settings.setWidget(15, QtWidgets.QFormLayout.SpanningRole, self.line_horizontal) self.pushButton_init_space = QtWidgets.QPushButton(self.centralwidget) self.pushButton_init_space.setMaximumSize(QtCore.QSize(16777215, 40)) self.pushButton_init_space.setObjectName("pushButton_init_space") self.pushButton_init_space.clicked.connect( self.controller_init_ca_algo) self.formLayout_settings.setWidget(17, QtWidgets.QFormLayout.FieldRole, self.pushButton_init_space) self.pushButton_start_stop = QtWidgets.QPushButton(self.centralwidget) self.pushButton_start_stop.setObjectName("pushButton_start_stop") self.pushButton_start_stop.clicked.connect( self.controller_init_image_timer) self.formLayout_settings.setWidget(18, QtWidgets.QFormLayout.FieldRole, self.pushButton_start_stop) self.pushButton_step = QtWidgets.QPushButton(self.centralwidget) self.pushButton_step.setObjectName("pushButton_step") self.pushButton_step.clicked.connect(self.controller_one_step) self.formLayout_settings.setWidget(19, QtWidgets.QFormLayout.FieldRole, self.pushButton_step) self.pushButton_clear_space = QtWidgets.QPushButton(self.centralwidget) self.pushButton_clear_space.setObjectName("pushButton_clear_space") self.pushButton_clear_space.clicked.connect(self.view_clear_space) self.formLayout_settings.setWidget(20, QtWidgets.QFormLayout.FieldRole, self.pushButton_clear_space) self.label = QtWidgets.QLabel(self.centralwidget) self.label.setText("") self.label.setObjectName("label") self.formLayout_settings.setWidget(9, QtWidgets.QFormLayout.LabelRole, self.label) self.label_probability = QtWidgets.QLabel(self.centralwidget) self.label_probability.setObjectName("label_probability") self.formLayout_settings.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.label_probability) self.lineEdit_prob_threshold = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_prob_threshold.setObjectName("lineEdit_prob_threshold") self.formLayout_settings.setWidget(8, QtWidgets.QFormLayout.FieldRole, self.lineEdit_prob_threshold) self.horizontalLayout.addLayout(self.formLayout_settings) self.line_vertical = QtWidgets.QFrame(self.centralwidget) self.line_vertical.setFrameShape(QtWidgets.QFrame.VLine) self.line_vertical.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_vertical.setObjectName("line_2") self.horizontalLayout.addWidget(self.line_vertical) self.graphicsView = ImageView(self.centralwidget) self.graphicsView.setMinimumSize(QtCore.QSize(501, 501)) self.graphicsView.setMaximumSize(QtCore.QSize(501, 501)) self.graphicsView.setObjectName("graphicsView") self.graphicsView.ui.histogram.hide() self.graphicsView.ui.roiBtn.hide() self.graphicsView.ui.menuBtn.hide() self.graphicsView.show() self.horizontalLayout.addWidget(self.graphicsView) # Other stuff MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1000, 26)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) self.controller_init_ca_algo() def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.label_neighbours_rule.setText( _translate("MainWindow", "Neighbours rule")) self.comboBox_neighbours_rule.setItemText( 0, _translate("MainWindow", "VONNEUMANN")) self.comboBox_neighbours_rule.setItemText( 1, _translate("MainWindow", "MOORE")) self.comboBox_neighbours_rule.setItemText( 2, _translate("MainWindow", "HEXAGONAL_LEFT")) self.comboBox_neighbours_rule.setItemText( 3, _translate("MainWindow", "HEXAGONAL_RIGHT")) self.comboBox_neighbours_rule.setItemText( 4, _translate("MainWindow", "PENTAGONAL_LEFT")) self.comboBox_neighbours_rule.setItemText( 5, _translate("MainWindow", "PENTAGONAL_RIGHT")) self.label_border_condition.setText( _translate("MainWindow", "Border rule")) self.comboBox_border_condition.setItemText( 0, _translate("MainWindow", "ABSORBING")) self.comboBox_border_condition.setItemText( 1, _translate("MainWindow", "SNAKELIKE")) self.label_size_of_space.setText( _translate("MainWindow", "Size of space")) self.lineEdit_size_of_space.setText(_translate("MainWindow", "100")) self.label_number_of_grains.setText( _translate("MainWindow", "Number of grains")) self.lineEdit_number_of_grains.setText(_translate("MainWindow", "120")) self.label_inclusions_number.setText( _translate("MainWindow", "Number of incl.")) self.lineEdit_inclusions_number.setText(_translate("MainWindow", "0")) self.label_min_radius.setText(_translate("MainWindow", "Min radius")) self.lineEdit_min_radius.setText(_translate("MainWindow", "1")) self.label_max_radius.setText(_translate("MainWindow", "Max radius")) self.lineEdit_max_radius.setText(_translate("MainWindow", "6")) self.pushButton_import_from_csv.setText( _translate("MainWindow", "Import csv")) self.pushButton_export_to_csv.setText( _translate("MainWindow", "Export csv")) self.pushButton_export_to_png.setText( _translate("MainWindow", "Export png")) self.pushButton_init_space.setText( _translate("MainWindow", "Init space")) self.pushButton_start_stop.setText( _translate("MainWindow", "Start/Stop")) self.pushButton_step.setText(_translate("MainWindow", "Step")) self.pushButton_clear_space.setText( _translate("MainWindow", "Clear space")) self.label_probability.setText(_translate("MainWindow", "Probability")) self.lineEdit_prob_threshold.setText(_translate("MainWindow", "60")) def view_generate_pg_colormap(self): self.pos = np.linspace( 0.0, 1.0, self._ca_algo.number_of_reserved_ids + int(self.lineEdit_number_of_grains.text())) self.cmap = ColorMap(pos=self.pos, color=self._ca_algo.color_id) self.graphicsView.setColorMap(self.cmap) def view_display_image(self): self.graphicsView.setImage( self._ca_algo.space.T, levels=(0.0, self._ca_algo.number_of_reserved_ids + float(self.lineEdit_number_of_grains.text()))) def view_clear_space(self): self.result_space = None self.timer.stop() self._ca_algo.space = self._ca_algo.space_clear self.graphicsView.clear() def controller_init_ca_algo(self): self._ca_algo = None self.result_space = None self._ca_algo = CellularAutomata( int(self.lineEdit_number_of_grains.text()), int(self.lineEdit_inclusions_number.text()), int(self.lineEdit_min_radius.text()), int(self.lineEdit_max_radius.text()), int(self.lineEdit_size_of_space.text()), int(self.lineEdit_size_of_space.text()), str(self.comboBox_border_condition.currentText()), str(self.comboBox_neighbours_rule.currentText())) self._ca_algo.add_random() self._ca_algo.add_inclusions() self.view_generate_pg_colormap() self.view_display_image() def controller_init_image_timer(self): self.number_of_clicked += 1 if self.number_of_clicked % 2: self.pushButton_start_stop.setStyleSheet("background-color: green") self.timer.timeout.connect(self.controller_update_func) self.timer.start(50) else: self.pushButton_start_stop.setStyleSheet("background-color: none") self.timer.stop() def controller_update_func(self): if self.result_space is None: self.result_space = self.worker.apply_async(self._ca_algo.one_step) return if self.result_space.ready(): self._ca_algo.space = self.result_space.get() self.view_display_image() self.result_space = self.worker.apply_async(self._ca_algo.one_step) def controller_one_step(self): self.timer.stop() self.controller_update_func() def io_open_save_dialog(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog fileName, _ = QFileDialog.getSaveFileName(self.centralwidget, "Save to CSV file", "", "CSV Files (*.csv)", options=options) if fileName: pd.DataFrame(self._ca_algo.space).to_csv(fileName) def io_open_file_name_dialog(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog fileName, _ = QFileDialog.getOpenFileName(self.centralwidget, "Open CSV file", "", "CSV Files (*.csv)", options=options) if fileName: self._ca_algo.space = pd.read_csv(fileName, index_col=0).astype(int).values self.view_display_image() def io_open_save_dialog_image(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog fileName, _ = QFileDialog.getSaveFileName(self.centralwidget, "Save to PNG file", "", "PNG Files (*.png)", options=options) if fileName: self.graphicsView.export(fileName)
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1134, 846) MainWindow.setMinimumSize(QtCore.QSize(1000, 800)) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout_40 = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout_40.setObjectName("gridLayout_40") self.gridLayout_39 = QtWidgets.QGridLayout() self.gridLayout_39.setObjectName("gridLayout_39") self.gridLayout_38 = QtWidgets.QGridLayout() self.gridLayout_38.setObjectName("gridLayout_38") self.groupBox = QtWidgets.QGroupBox(self.centralwidget) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.groupBox.setFont(font) self.groupBox.setTitle("") self.groupBox.setFlat(False) self.groupBox.setObjectName("groupBox") self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox) self.gridLayout_3.setObjectName("gridLayout_3") self.gridLayout_10 = QtWidgets.QGridLayout() self.gridLayout_10.setObjectName("gridLayout_10") self.groupBox_3 = QtWidgets.QGroupBox(self.groupBox) self.groupBox_3.setObjectName("groupBox_3") self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_3) self.gridLayout_2.setObjectName("gridLayout_2") self.img1_original = ImageView(self.groupBox_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.img1_original.sizePolicy().hasHeightForWidth()) self.img1_original.setSizePolicy(sizePolicy) self.img1_original.setMinimumSize(QtCore.QSize(0, 0)) self.img1_original.setObjectName("img1_original") self.gridLayout_2.addWidget(self.img1_original, 0, 0, 1, 1) self.gridLayout_10.addWidget(self.groupBox_3, 0, 0, 1, 1) self.groupBox_2 = QtWidgets.QGroupBox(self.groupBox) self.groupBox_2.setObjectName("groupBox_2") self.gridLayout = QtWidgets.QGridLayout(self.groupBox_2) self.gridLayout.setObjectName("gridLayout") self.img1_updated = ImageView(self.groupBox_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.img1_updated.sizePolicy().hasHeightForWidth()) self.img1_updated.setSizePolicy(sizePolicy) self.img1_updated.setMinimumSize(QtCore.QSize(0, 0)) self.img1_updated.setObjectName("img1_updated") self.gridLayout.addWidget(self.img1_updated, 0, 0, 1, 1) self.gridLayout_10.addWidget(self.groupBox_2, 0, 1, 1, 1) self.gridLayout_3.addLayout(self.gridLayout_10, 2, 0, 1, 1) self.gridLayout_16 = QtWidgets.QGridLayout() self.gridLayout_16.setSizeConstraint( QtWidgets.QLayout.SetDefaultConstraint) self.gridLayout_16.setObjectName("gridLayout_16") self.label_img1 = QtWidgets.QLabel(self.groupBox) font = QtGui.QFont() font.setPointSize(14) self.label_img1.setFont(font) self.label_img1.setStyleSheet("") self.label_img1.setFrameShape(QtWidgets.QFrame.NoFrame) self.label_img1.setFrameShadow(QtWidgets.QFrame.Raised) self.label_img1.setObjectName("label_img1") self.gridLayout_16.addWidget(self.label_img1, 0, 0, 1, 1) self.combo_input1 = QtWidgets.QComboBox(self.groupBox) self.combo_input1.setEnabled(False) self.combo_input1.setMinimumSize(QtCore.QSize(200, 30)) self.combo_input1.setAcceptDrops(False) self.combo_input1.setIconSize(QtCore.QSize(20, 20)) self.combo_input1.setObjectName("combo_input1") self.combo_input1.addItem("") self.combo_input1.addItem("") self.combo_input1.addItem("") self.combo_input1.addItem("") self.combo_input1.addItem("") self.gridLayout_16.addWidget(self.combo_input1, 0, 1, 1, 1) self.gridLayout_3.addLayout(self.gridLayout_16, 0, 0, 1, 1) self.line = QtWidgets.QFrame(self.groupBox) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.gridLayout_3.addWidget(self.line, 1, 0, 1, 1) self.gridLayout_38.addWidget(self.groupBox, 0, 0, 1, 1) self.groupBox_4 = QtWidgets.QGroupBox(self.centralwidget) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.groupBox_4.setFont(font) self.groupBox_4.setTitle("") self.groupBox_4.setFlat(False) self.groupBox_4.setObjectName("groupBox_4") self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox_4) self.gridLayout_4.setObjectName("gridLayout_4") self.line_2 = QtWidgets.QFrame(self.groupBox_4) self.line_2.setFrameShape(QtWidgets.QFrame.HLine) self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_2.setObjectName("line_2") self.gridLayout_4.addWidget(self.line_2, 1, 0, 1, 1) self.gridLayout_14 = QtWidgets.QGridLayout() self.gridLayout_14.setObjectName("gridLayout_14") self.groupBox_5 = QtWidgets.QGroupBox(self.groupBox_4) self.groupBox_5.setObjectName("groupBox_5") self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_5) self.gridLayout_5.setObjectName("gridLayout_5") self.img2_original = ImageView(self.groupBox_5) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.img2_original.sizePolicy().hasHeightForWidth()) self.img2_original.setSizePolicy(sizePolicy) self.img2_original.setMinimumSize(QtCore.QSize(0, 0)) self.img2_original.setObjectName("img2_original") self.gridLayout_5.addWidget(self.img2_original, 0, 0, 1, 1) self.gridLayout_14.addWidget(self.groupBox_5, 0, 0, 1, 1) self.groupBox_6 = QtWidgets.QGroupBox(self.groupBox_4) self.groupBox_6.setObjectName("groupBox_6") self.gridLayout_6 = QtWidgets.QGridLayout(self.groupBox_6) self.gridLayout_6.setObjectName("gridLayout_6") self.img2_updated = ImageView(self.groupBox_6) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.img2_updated.sizePolicy().hasHeightForWidth()) self.img2_updated.setSizePolicy(sizePolicy) self.img2_updated.setMinimumSize(QtCore.QSize(0, 0)) self.img2_updated.setObjectName("img2_updated") self.gridLayout_6.addWidget(self.img2_updated, 0, 0, 1, 1) self.gridLayout_14.addWidget(self.groupBox_6, 0, 1, 1, 1) self.gridLayout_4.addLayout(self.gridLayout_14, 2, 0, 1, 1) self.gridLayout_19 = QtWidgets.QGridLayout() self.gridLayout_19.setSizeConstraint( QtWidgets.QLayout.SetDefaultConstraint) self.gridLayout_19.setObjectName("gridLayout_19") self.label_img2 = QtWidgets.QLabel(self.groupBox_4) font = QtGui.QFont() font.setPointSize(14) self.label_img2.setFont(font) self.label_img2.setStyleSheet("") self.label_img2.setFrameShape(QtWidgets.QFrame.NoFrame) self.label_img2.setFrameShadow(QtWidgets.QFrame.Raised) self.label_img2.setObjectName("label_img2") self.gridLayout_19.addWidget(self.label_img2, 0, 0, 1, 1) self.combo_input2 = QtWidgets.QComboBox(self.groupBox_4) self.combo_input2.setEnabled(False) self.combo_input2.setMinimumSize(QtCore.QSize(200, 30)) self.combo_input2.setAcceptDrops(False) self.combo_input2.setIconSize(QtCore.QSize(20, 20)) self.combo_input2.setObjectName("combo_input2") self.combo_input2.addItem("") self.combo_input2.addItem("") self.combo_input2.addItem("") self.combo_input2.addItem("") self.combo_input2.addItem("") self.gridLayout_19.addWidget(self.combo_input2, 0, 1, 1, 1) self.gridLayout_4.addLayout(self.gridLayout_19, 0, 0, 1, 1) self.gridLayout_38.addWidget(self.groupBox_4, 1, 0, 1, 1) self.gridLayout_39.addLayout(self.gridLayout_38, 0, 0, 1, 1) self.gridLayout_9 = QtWidgets.QGridLayout() self.gridLayout_9.setObjectName("gridLayout_9") self.groupBox_7 = QtWidgets.QGroupBox(self.centralwidget) self.groupBox_7.setTitle("") self.groupBox_7.setObjectName("groupBox_7") self.gridLayout_20 = QtWidgets.QGridLayout(self.groupBox_7) self.gridLayout_20.setObjectName("gridLayout_20") self.gridLayout_21 = QtWidgets.QGridLayout() self.gridLayout_21.setObjectName("gridLayout_21") self.label = QtWidgets.QLabel(self.groupBox_7) font = QtGui.QFont() font.setPointSize(16) self.label.setFont(font) self.label.setObjectName("label") self.gridLayout_21.addWidget(self.label, 0, 0, 1, 1) self.combo_output = QtWidgets.QComboBox(self.groupBox_7) self.combo_output.setEnabled(False) self.combo_output.setMinimumSize(QtCore.QSize(30, 30)) self.combo_output.setAcceptDrops(False) self.combo_output.setIconSize(QtCore.QSize(20, 20)) self.combo_output.setObjectName("combo_output") self.combo_output.addItem("") self.combo_output.addItem("") self.gridLayout_21.addWidget(self.combo_output, 0, 1, 1, 1) self.gridLayout_20.addLayout(self.gridLayout_21, 0, 0, 1, 1) self.line_3 = QtWidgets.QFrame(self.groupBox_7) self.line_3.setFrameShape(QtWidgets.QFrame.HLine) self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_3.setObjectName("line_3") self.gridLayout_20.addWidget(self.line_3, 1, 0, 1, 1) self.gridLayout_22 = QtWidgets.QGridLayout() self.gridLayout_22.setObjectName("gridLayout_22") self.gridLayout_23 = QtWidgets.QGridLayout() self.gridLayout_23.setObjectName("gridLayout_23") spacerItem = QtWidgets.QSpacerItem( 20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.MinimumExpanding) self.gridLayout_23.addItem(spacerItem, 0, 0, 1, 1) self.label_comp1 = QtWidgets.QLabel(self.groupBox_7) font = QtGui.QFont() font.setPointSize(12) self.label_comp1.setFont(font) self.label_comp1.setObjectName("label_comp1") self.gridLayout_23.addWidget(self.label_comp1, 1, 0, 1, 1) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_23.addItem(spacerItem1, 2, 0, 1, 1) self.gridLayout_22.addLayout(self.gridLayout_23, 0, 0, 1, 1) self.gridLayout_32 = QtWidgets.QGridLayout() self.gridLayout_32.setObjectName("gridLayout_32") self.gridLayout_33 = QtWidgets.QGridLayout() self.gridLayout_33.setObjectName("gridLayout_33") self.gridLayout_34 = QtWidgets.QGridLayout() self.gridLayout_34.setObjectName("gridLayout_34") spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_34.addItem(spacerItem2, 0, 0, 1, 1) self.combo_select_img1 = QtWidgets.QComboBox(self.groupBox_7) self.combo_select_img1.setEnabled(False) self.combo_select_img1.setMinimumSize(QtCore.QSize(0, 30)) self.combo_select_img1.setAcceptDrops(False) self.combo_select_img1.setIconSize(QtCore.QSize(20, 20)) self.combo_select_img1.setObjectName("combo_select_img1") self.combo_select_img1.addItem("") self.combo_select_img1.addItem("") self.gridLayout_34.addWidget(self.combo_select_img1, 1, 0, 1, 1) self.gridLayout_33.addLayout(self.gridLayout_34, 0, 0, 1, 1) self.gridLayout_35 = QtWidgets.QGridLayout() self.gridLayout_35.setObjectName("gridLayout_35") self.gridLayout_36 = QtWidgets.QGridLayout() self.gridLayout_36.setObjectName("gridLayout_36") spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_36.addItem(spacerItem3, 0, 0, 1, 1) self.gridLayout_37 = QtWidgets.QGridLayout() self.gridLayout_37.setObjectName("gridLayout_37") self.label_6 = QtWidgets.QLabel(self.groupBox_7) self.label_6.setObjectName("label_6") self.gridLayout_37.addWidget(self.label_6, 0, 0, 1, 1) spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_37.addItem(spacerItem4, 0, 1, 1, 1) self.label_7 = QtWidgets.QLabel(self.groupBox_7) self.label_7.setObjectName("label_7") self.gridLayout_37.addWidget(self.label_7, 0, 2, 1, 1) self.gridLayout_36.addLayout(self.gridLayout_37, 1, 0, 1, 1) self.slider_comp1 = QtWidgets.QSlider(self.groupBox_7) self.slider_comp1.setEnabled(False) self.slider_comp1.setMaximum(100) self.slider_comp1.setSingleStep(10) self.slider_comp1.setOrientation(QtCore.Qt.Horizontal) self.slider_comp1.setTickPosition(QtWidgets.QSlider.TicksAbove) self.slider_comp1.setObjectName("slider_comp1") self.gridLayout_36.addWidget(self.slider_comp1, 3, 0, 1, 1) self.gridLayout_35.addLayout(self.gridLayout_36, 0, 0, 1, 1) self.gridLayout_33.addLayout(self.gridLayout_35, 0, 1, 1, 1) self.gridLayout_32.addLayout(self.gridLayout_33, 0, 0, 1, 1) self.combo_select_mode1 = QtWidgets.QComboBox(self.groupBox_7) self.combo_select_mode1.setEnabled(False) self.combo_select_mode1.setMinimumSize(QtCore.QSize(0, 30)) self.combo_select_mode1.setAcceptDrops(False) self.combo_select_mode1.setIconSize(QtCore.QSize(20, 20)) self.combo_select_mode1.setObjectName("combo_select_mode1") self.combo_select_mode1.addItem("") self.combo_select_mode1.addItem("") self.combo_select_mode1.addItem("") self.combo_select_mode1.addItem("") self.combo_select_mode1.addItem("") self.combo_select_mode1.addItem("") self.combo_select_mode1.addItem("") self.gridLayout_32.addWidget(self.combo_select_mode1, 1, 0, 1, 1) self.gridLayout_22.addLayout(self.gridLayout_32, 0, 1, 1, 1) self.gridLayout_20.addLayout(self.gridLayout_22, 2, 0, 1, 1) self.gridLayout_24 = QtWidgets.QGridLayout() self.gridLayout_24.setObjectName("gridLayout_24") self.gridLayout_25 = QtWidgets.QGridLayout() self.gridLayout_25.setObjectName("gridLayout_25") spacerItem5 = QtWidgets.QSpacerItem( 20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.MinimumExpanding) self.gridLayout_25.addItem(spacerItem5, 0, 0, 1, 1) self.label_comp2 = QtWidgets.QLabel(self.groupBox_7) font = QtGui.QFont() font.setPointSize(12) self.label_comp2.setFont(font) self.label_comp2.setObjectName("label_comp2") self.gridLayout_25.addWidget(self.label_comp2, 1, 0, 1, 1) spacerItem6 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_25.addItem(spacerItem6, 2, 0, 1, 1) self.gridLayout_24.addLayout(self.gridLayout_25, 0, 0, 1, 1) self.gridLayout_26 = QtWidgets.QGridLayout() self.gridLayout_26.setObjectName("gridLayout_26") self.gridLayout_27 = QtWidgets.QGridLayout() self.gridLayout_27.setObjectName("gridLayout_27") self.gridLayout_28 = QtWidgets.QGridLayout() self.gridLayout_28.setObjectName("gridLayout_28") spacerItem7 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_28.addItem(spacerItem7, 0, 0, 1, 1) self.combo_select_img2 = QtWidgets.QComboBox(self.groupBox_7) self.combo_select_img2.setEnabled(False) self.combo_select_img2.setMinimumSize(QtCore.QSize(0, 30)) self.combo_select_img2.setAcceptDrops(False) self.combo_select_img2.setIconSize(QtCore.QSize(20, 20)) self.combo_select_img2.setObjectName("combo_select_img2") self.combo_select_img2.addItem("") self.combo_select_img2.addItem("") self.gridLayout_28.addWidget(self.combo_select_img2, 1, 0, 1, 1) self.gridLayout_27.addLayout(self.gridLayout_28, 0, 0, 1, 1) self.gridLayout_29 = QtWidgets.QGridLayout() self.gridLayout_29.setObjectName("gridLayout_29") self.gridLayout_30 = QtWidgets.QGridLayout() self.gridLayout_30.setObjectName("gridLayout_30") spacerItem8 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_30.addItem(spacerItem8, 0, 0, 1, 1) self.gridLayout_31 = QtWidgets.QGridLayout() self.gridLayout_31.setObjectName("gridLayout_31") self.label_8 = QtWidgets.QLabel(self.groupBox_7) self.label_8.setObjectName("label_8") self.gridLayout_31.addWidget(self.label_8, 0, 0, 1, 1) spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_31.addItem(spacerItem9, 0, 1, 1, 1) self.label_9 = QtWidgets.QLabel(self.groupBox_7) self.label_9.setObjectName("label_9") self.gridLayout_31.addWidget(self.label_9, 0, 2, 1, 1) self.gridLayout_30.addLayout(self.gridLayout_31, 1, 0, 1, 1) self.slider_comp2 = QtWidgets.QSlider(self.groupBox_7) self.slider_comp2.setEnabled(False) self.slider_comp2.setMaximum(100) self.slider_comp2.setSingleStep(10) self.slider_comp2.setOrientation(QtCore.Qt.Horizontal) self.slider_comp2.setTickPosition(QtWidgets.QSlider.TicksAbove) self.slider_comp2.setObjectName("slider_comp2") self.gridLayout_30.addWidget(self.slider_comp2, 2, 0, 1, 1) self.gridLayout_29.addLayout(self.gridLayout_30, 0, 0, 1, 1) self.gridLayout_27.addLayout(self.gridLayout_29, 0, 1, 1, 1) self.gridLayout_26.addLayout(self.gridLayout_27, 0, 0, 1, 1) self.combo_select_mode2 = QtWidgets.QComboBox(self.groupBox_7) self.combo_select_mode2.setEnabled(False) self.combo_select_mode2.setMinimumSize(QtCore.QSize(0, 30)) self.combo_select_mode2.setAcceptDrops(False) self.combo_select_mode2.setIconSize(QtCore.QSize(20, 20)) self.combo_select_mode2.setObjectName("combo_select_mode2") self.combo_select_mode2.addItem("") self.combo_select_mode2.addItem("") self.combo_select_mode2.addItem("") self.combo_select_mode2.addItem("") self.combo_select_mode2.addItem("") self.combo_select_mode2.addItem("") self.combo_select_mode2.addItem("") self.gridLayout_26.addWidget(self.combo_select_mode2, 1, 0, 1, 1) self.gridLayout_24.addLayout(self.gridLayout_26, 0, 1, 1, 1) self.gridLayout_20.addLayout(self.gridLayout_24, 4, 0, 1, 1) spacerItem10 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_20.addItem(spacerItem10, 3, 0, 1, 1) self.gridLayout_9.addWidget(self.groupBox_7, 0, 0, 1, 1) self.groupBox_10 = QtWidgets.QGroupBox(self.centralwidget) self.groupBox_10.setTitle("") self.groupBox_10.setObjectName("groupBox_10") self.gridLayout_11 = QtWidgets.QGridLayout(self.groupBox_10) self.gridLayout_11.setObjectName("gridLayout_11") self.gridLayout_12 = QtWidgets.QGridLayout() self.gridLayout_12.setObjectName("gridLayout_12") self.gridLayout_13 = QtWidgets.QGridLayout() self.gridLayout_13.setObjectName("gridLayout_13") self.label_output1 = QtWidgets.QLabel(self.groupBox_10) font = QtGui.QFont() font.setPointSize(14) self.label_output1.setFont(font) self.label_output1.setFrameShape(QtWidgets.QFrame.NoFrame) self.label_output1.setAlignment(QtCore.Qt.AlignCenter) self.label_output1.setObjectName("label_output1") self.gridLayout_13.addWidget(self.label_output1, 0, 0, 1, 1) self.groupBox_8 = QtWidgets.QGroupBox(self.groupBox_10) self.groupBox_8.setTitle("") self.groupBox_8.setObjectName("groupBox_8") self.gridLayout_7 = QtWidgets.QGridLayout(self.groupBox_8) self.gridLayout_7.setObjectName("gridLayout_7") self.gridLayout_17 = QtWidgets.QGridLayout() self.gridLayout_17.setObjectName("gridLayout_17") self.output_img1 = ImageView(self.groupBox_8) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.output_img1.sizePolicy().hasHeightForWidth()) self.output_img1.setSizePolicy(sizePolicy) self.output_img1.setMinimumSize(QtCore.QSize(0, 0)) self.output_img1.setObjectName("output_img1") self.gridLayout_17.addWidget(self.output_img1, 0, 0, 1, 1) self.gridLayout_7.addLayout(self.gridLayout_17, 0, 0, 1, 1) self.gridLayout_13.addWidget(self.groupBox_8, 1, 0, 1, 1) self.gridLayout_12.addLayout(self.gridLayout_13, 0, 0, 1, 1) self.gridLayout_15 = QtWidgets.QGridLayout() self.gridLayout_15.setObjectName("gridLayout_15") self.label_output2 = QtWidgets.QLabel(self.groupBox_10) font = QtGui.QFont() font.setPointSize(14) self.label_output2.setFont(font) self.label_output2.setFrameShape(QtWidgets.QFrame.NoFrame) self.label_output2.setAlignment(QtCore.Qt.AlignCenter) self.label_output2.setObjectName("label_output2") self.gridLayout_15.addWidget(self.label_output2, 0, 0, 1, 1) self.groupBox_9 = QtWidgets.QGroupBox(self.groupBox_10) self.groupBox_9.setTitle("") self.groupBox_9.setObjectName("groupBox_9") self.gridLayout_8 = QtWidgets.QGridLayout(self.groupBox_9) self.gridLayout_8.setObjectName("gridLayout_8") self.gridLayout_18 = QtWidgets.QGridLayout() self.gridLayout_18.setObjectName("gridLayout_18") self.output_img2 = ImageView(self.groupBox_9) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.output_img2.sizePolicy().hasHeightForWidth()) self.output_img2.setSizePolicy(sizePolicy) self.output_img2.setMinimumSize(QtCore.QSize(0, 0)) self.output_img2.setObjectName("output_img2") self.gridLayout_18.addWidget(self.output_img2, 0, 0, 1, 1) self.gridLayout_8.addLayout(self.gridLayout_18, 0, 0, 1, 1) self.gridLayout_15.addWidget(self.groupBox_9, 1, 0, 1, 1) self.gridLayout_12.addLayout(self.gridLayout_15, 0, 2, 1, 1) spacerItem11 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_12.addItem(spacerItem11, 0, 1, 1, 1) self.gridLayout_11.addLayout(self.gridLayout_12, 1, 0, 1, 1) spacerItem12 = QtWidgets.QSpacerItem(500, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.gridLayout_11.addItem(spacerItem12, 0, 0, 1, 1) self.gridLayout_9.addWidget(self.groupBox_10, 1, 0, 1, 1) self.gridLayout_39.addLayout(self.gridLayout_9, 0, 1, 1, 1) self.gridLayout_40.addLayout(self.gridLayout_39, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1134, 26)) self.menubar.setObjectName("menubar") self.menuLoad = QtWidgets.QMenu(self.menubar) self.menuLoad.setObjectName("menuLoad") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionImage1 = QtWidgets.QAction(MainWindow) self.actionImage1.setObjectName("actionImage1") self.actionImage2 = QtWidgets.QAction(MainWindow) self.actionImage2.setObjectName("actionImage2") self.menuLoad.addAction(self.actionImage1) self.menuLoad.addAction(self.actionImage2) self.menubar.addAction(self.menuLoad.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.groupBox_3.setTitle(_translate("MainWindow", "Original Image")) self.groupBox_2.setTitle(_translate("MainWindow", "Updated Image")) self.label_img1.setText(_translate("MainWindow", "Image 1")) self.combo_input1.setItemText( 0, _translate("MainWindow", "Choose FT Component")) self.combo_input1.setItemText(1, _translate("MainWindow", "Magnitude")) self.combo_input1.setItemText(2, _translate("MainWindow", "Phase")) self.combo_input1.setItemText(3, _translate("MainWindow", "Real")) self.combo_input1.setItemText(4, _translate("MainWindow", "Imaginary")) self.groupBox_5.setTitle(_translate("MainWindow", "Original Image")) self.groupBox_6.setTitle(_translate("MainWindow", "Updated Image")) self.label_img2.setText(_translate("MainWindow", "Image 2")) self.combo_input2.setItemText( 0, _translate("MainWindow", "Choose FT Component")) self.combo_input2.setItemText(1, _translate("MainWindow", "Magnitude")) self.combo_input2.setItemText(2, _translate("MainWindow", "Phase")) self.combo_input2.setItemText(3, _translate("MainWindow", "Real")) self.combo_input2.setItemText(4, _translate("MainWindow", "Imaginary")) self.label.setText(_translate("MainWindow", "Mixer Output to:")) self.combo_output.setItemText(0, _translate("MainWindow", "Output1")) self.combo_output.setItemText(1, _translate("MainWindow", "Output2")) self.label_comp1.setText(_translate("MainWindow", "Component 1:")) self.combo_select_img1.setItemText(0, _translate("MainWindow", "Image1")) self.combo_select_img1.setItemText(1, _translate("MainWindow", "Image2")) self.label_6.setText(_translate("MainWindow", "0%")) self.label_7.setText(_translate("MainWindow", "100%")) self.combo_select_mode1.setItemText( 0, _translate("MainWindow", "Choose Component")) self.combo_select_mode1.setItemText( 1, _translate("MainWindow", "Magnitude")) self.combo_select_mode1.setItemText(2, _translate("MainWindow", "Phase")) self.combo_select_mode1.setItemText(3, _translate("MainWindow", "Real")) self.combo_select_mode1.setItemText( 4, _translate("MainWindow", "Imaginary")) self.combo_select_mode1.setItemText( 5, _translate("MainWindow", "Uniform Magnitude")) self.combo_select_mode1.setItemText( 6, _translate("MainWindow", "Uniform Phase")) self.label_comp2.setText(_translate("MainWindow", "Component 2:")) self.combo_select_img2.setItemText(0, _translate("MainWindow", "Image1")) self.combo_select_img2.setItemText(1, _translate("MainWindow", "Image2")) self.label_8.setText(_translate("MainWindow", "0%")) self.label_9.setText(_translate("MainWindow", "100%")) self.combo_select_mode2.setItemText( 0, _translate("MainWindow", "Choose Component")) self.combo_select_mode2.setItemText( 1, _translate("MainWindow", "Magnitude")) self.combo_select_mode2.setItemText(2, _translate("MainWindow", "Phase")) self.combo_select_mode2.setItemText(3, _translate("MainWindow", "Real")) self.combo_select_mode2.setItemText( 4, _translate("MainWindow", "Imaginary")) self.combo_select_mode2.setItemText( 5, _translate("MainWindow", "Uniform Magnitude")) self.combo_select_mode2.setItemText( 6, _translate("MainWindow", "Uniform Phase")) self.label_output1.setText(_translate("MainWindow", "Output 1")) self.label_output2.setText(_translate("MainWindow", "Output 2")) self.menuLoad.setTitle(_translate("MainWindow", "Load")) self.actionImage1.setText(_translate("MainWindow", "Image1")) self.actionImage2.setText(_translate("MainWindow", "Image2"))