From 7b9ec0a4ac204d75e2da59d3ffe07068291ac08f Mon Sep 17 00:00:00 2001 From: Yorusora <2944763079@qq.com> Date: Sat, 11 Jan 2025 11:14:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD=EF=BC=9A?= =?UTF-8?q?=201=E3=80=81=E8=83=BD=E5=A4=9F=E5=90=8C=E6=97=B6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=89=93=E6=A0=87=E5=90=8E=E5=92=8C=E6=89=93=E6=A0=87?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E6=A0=87=E7=AD=BE=E8=B5=B7=E5=A7=8B=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E5=92=8C=E7=BB=88=E6=AD=A2=E4=BD=8D=E7=BD=AE=202?= =?UTF-8?q?=E3=80=81=E6=89=93=E6=A0=87=E5=89=8D=E5=90=8E=E7=9A=84=E7=BB=98?= =?UTF-8?q?=E5=9B=BE=E7=9A=84=E4=BF=A1=E5=8F=B7=E9=95=BF=E5=BA=A6=E9=83=BD?= =?UTF-8?q?=E5=B0=86=E4=BD=BF=E7=94=A8=E4=B9=8B=E5=89=8D=E7=9A=84=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=EF=BC=8C=E5=8D=B3=E6=89=93=E6=A0=87=E5=90=8E=E8=99=BD?= =?UTF-8?q?=E7=84=B6=E4=BC=9A=E5=90=8C=E6=97=B6=E6=98=BE=E7=A4=BA=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E7=AD=BE=E7=9A=84=E6=89=80=E5=9C=A8=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E4=BD=86=E4=B8=8D=E5=BD=B1=E5=93=8D=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E4=BF=A1=E5=8F=B7=E6=97=B6=E6=A8=AA=E5=9D=90=E6=A0=87?= =?UTF-8?q?=E7=9A=84=E8=8C=83=E5=9B=B4=203=E3=80=81=E5=BD=93=E6=89=93?= =?UTF-8?q?=E6=A0=87=E9=95=BF=E5=BA=A6=E5=B0=8F=E4=BA=8E10=E7=A7=92?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=B0=86=E4=BC=9A=E6=9C=89=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=204=E3=80=81=E6=A0=B9=E6=8D=AE=E6=89=8B?= =?UTF-8?q?=E5=86=8C=E7=BB=99=E5=87=BA=E7=9A=84=E7=BB=9F=E4=B8=80=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=BA=86=E5=87=A0=E4=B8=AA?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E5=A4=87=E6=B3=A8=E8=BE=93=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E6=8C=89=E9=92=AE=205=E3=80=81=E5=BD=93=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E7=BB=98=E5=88=B6=E5=B7=B2=E7=BB=8F=E8=A2=AB=E6=89=93=E6=A0=87?= =?UTF-8?q?=E8=BF=87=E7=9A=84=E4=BA=8B=E4=BB=B6=E6=97=B6=EF=BC=8C=E5=B7=A6?= =?UTF-8?q?=E8=BE=B9=E6=89=93=E6=A0=87=E6=93=8D=E4=BD=9C=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E5=B0=86=E4=BC=9A=E6=98=BE=E7=A4=BA=E6=89=93=E6=A0=87=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E7=9A=84=E5=8F=82=E6=95=B0=EF=BC=8C=E8=80=8C=E4=B8=8D?= =?UTF-8?q?=E6=98=AF=E6=89=93=E6=A0=87=E5=89=8D=E7=9A=84=E5=8E=9F=E5=A7=8B?= =?UTF-8?q?=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainWindow.py | 540 +++++++++++++++++------------ MainWindow.ui | 671 ++++++++++++++++++++++-------------- Main_Quality_Relabel_GUI.py | 196 +++++++++-- PSG_label_2_BCG_label.py | 2 - 4 files changed, 883 insertions(+), 526 deletions(-) diff --git a/MainWindow.py b/MainWindow.py index 117eab9..bf7fc03 100644 --- a/MainWindow.py +++ b/MainWindow.py @@ -255,132 +255,6 @@ class Ui_MainWindow(object): self.groupBox_4.setObjectName("groupBox_4") self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_4) self.gridLayout_2.setObjectName("gridLayout_2") - self.label_correctEnd = QtWidgets.QLabel(self.groupBox_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_correctEnd.sizePolicy().hasHeightForWidth()) - self.label_correctEnd.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(14) - self.label_correctEnd.setFont(font) - self.label_correctEnd.setObjectName("label_correctEnd") - self.gridLayout_2.addWidget(self.label_correctEnd, 8, 0, 1, 1) - self.lineEdit_correctEnd = QtWidgets.QLineEdit(self.groupBox_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.lineEdit_correctEnd.sizePolicy().hasHeightForWidth()) - self.lineEdit_correctEnd.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(14) - self.lineEdit_correctEnd.setFont(font) - self.lineEdit_correctEnd.setObjectName("lineEdit_correctEnd") - self.gridLayout_2.addWidget(self.lineEdit_correctEnd, 8, 2, 1, 3) - self.horizontalLayout_12 = QtWidgets.QHBoxLayout() - self.horizontalLayout_12.setObjectName("horizontalLayout_12") - self.label_score = QtWidgets.QLabel(self.groupBox_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_score.sizePolicy().hasHeightForWidth()) - self.label_score.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(14) - self.label_score.setFont(font) - self.label_score.setObjectName("label_score") - self.horizontalLayout_12.addWidget(self.label_score) - self.radioButton_1_class = QtWidgets.QRadioButton(self.groupBox_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.radioButton_1_class.sizePolicy().hasHeightForWidth()) - self.radioButton_1_class.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(14) - self.radioButton_1_class.setFont(font) - self.radioButton_1_class.setObjectName("radioButton_1_class") - self.horizontalLayout_12.addWidget(self.radioButton_1_class) - self.radioButton_2_class = QtWidgets.QRadioButton(self.groupBox_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.radioButton_2_class.sizePolicy().hasHeightForWidth()) - self.radioButton_2_class.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(14) - self.radioButton_2_class.setFont(font) - self.radioButton_2_class.setObjectName("radioButton_2_class") - self.horizontalLayout_12.addWidget(self.radioButton_2_class) - self.radioButton_3_class = QtWidgets.QRadioButton(self.groupBox_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.radioButton_3_class.sizePolicy().hasHeightForWidth()) - self.radioButton_3_class.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(14) - self.radioButton_3_class.setFont(font) - self.radioButton_3_class.setObjectName("radioButton_3_class") - self.horizontalLayout_12.addWidget(self.radioButton_3_class) - self.gridLayout_2.addLayout(self.horizontalLayout_12, 3, 0, 1, 5) - spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout_2.addItem(spacerItem3, 14, 1, 1, 1) - self.lineEdit_correctStart = QtWidgets.QLineEdit(self.groupBox_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.lineEdit_correctStart.sizePolicy().hasHeightForWidth()) - self.lineEdit_correctStart.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(14) - self.lineEdit_correctStart.setFont(font) - self.lineEdit_correctStart.setObjectName("lineEdit_correctStart") - self.gridLayout_2.addWidget(self.lineEdit_correctStart, 6, 2, 1, 3) - self.label_BCG_event = QtWidgets.QLabel(self.groupBox_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_BCG_event.sizePolicy().hasHeightForWidth()) - self.label_BCG_event.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(12) - font.setBold(False) - font.setWeight(50) - self.label_BCG_event.setFont(font) - self.label_BCG_event.setText("") - self.label_BCG_event.setAlignment(QtCore.Qt.AlignCenter) - self.label_BCG_event.setObjectName("label_BCG_event") - self.gridLayout_2.addWidget(self.label_BCG_event, 1, 0, 1, 5) - self.pushButton_quick_remark_input_waitingForTalk = QtWidgets.QPushButton(self.groupBox_4) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(14) - self.pushButton_quick_remark_input_waitingForTalk.setFont(font) - self.pushButton_quick_remark_input_waitingForTalk.setObjectName("pushButton_quick_remark_input_waitingForTalk") - self.gridLayout_2.addWidget(self.pushButton_quick_remark_input_waitingForTalk, 5, 2, 1, 3) - self.pushButton_right = QtWidgets.QPushButton(self.groupBox_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_right.sizePolicy().hasHeightForWidth()) - self.pushButton_right.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(14) - self.pushButton_right.setFont(font) - self.pushButton_right.setObjectName("pushButton_right") - self.gridLayout_2.addWidget(self.pushButton_right, 15, 0, 1, 1) - spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout_2.addItem(spacerItem4, 15, 1, 1, 1) self.label_remark = QtWidgets.QLabel(self.groupBox_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -393,13 +267,63 @@ class Ui_MainWindow(object): self.label_remark.setFont(font) self.label_remark.setObjectName("label_remark") self.gridLayout_2.addWidget(self.label_remark, 4, 0, 1, 1) - self.label_quick_remark_input = QtWidgets.QLabel(self.groupBox_4) + spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_2.addItem(spacerItem3, 19, 1, 1, 1) + self.checkBox_examineLabeled = QtWidgets.QCheckBox(self.groupBox_4) font = QtGui.QFont() font.setFamily("Times New Roman") font.setPointSize(14) - self.label_quick_remark_input.setFont(font) - self.label_quick_remark_input.setObjectName("label_quick_remark_input") - self.gridLayout_2.addWidget(self.label_quick_remark_input, 5, 0, 1, 1) + self.checkBox_examineLabeled.setFont(font) + self.checkBox_examineLabeled.setObjectName("checkBox_examineLabeled") + self.gridLayout_2.addWidget(self.checkBox_examineLabeled, 0, 0, 1, 4) + self.pushButton_right = QtWidgets.QPushButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_right.sizePolicy().hasHeightForWidth()) + self.pushButton_right.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(14) + self.pushButton_right.setFont(font) + self.pushButton_right.setObjectName("pushButton_right") + self.gridLayout_2.addWidget(self.pushButton_right, 20, 0, 1, 1) + self.lineEdit_correctStart = QtWidgets.QLineEdit(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.lineEdit_correctStart.sizePolicy().hasHeightForWidth()) + self.lineEdit_correctStart.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(14) + self.lineEdit_correctStart.setFont(font) + self.lineEdit_correctStart.setObjectName("lineEdit_correctStart") + self.gridLayout_2.addWidget(self.lineEdit_correctStart, 11, 2, 1, 3) + self.lineEdit_correctEnd = QtWidgets.QLineEdit(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.lineEdit_correctEnd.sizePolicy().hasHeightForWidth()) + self.lineEdit_correctEnd.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(14) + self.lineEdit_correctEnd.setFont(font) + self.lineEdit_correctEnd.setObjectName("lineEdit_correctEnd") + self.gridLayout_2.addWidget(self.lineEdit_correctEnd, 13, 2, 1, 3) + self.label_correctEnd = QtWidgets.QLabel(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_correctEnd.sizePolicy().hasHeightForWidth()) + self.label_correctEnd.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(14) + self.label_correctEnd.setFont(font) + self.label_correctEnd.setObjectName("label_correctEnd") + self.gridLayout_2.addWidget(self.label_correctEnd, 13, 0, 1, 1) self.horizontalLayout_radioButton = QtWidgets.QHBoxLayout() self.horizontalLayout_radioButton.setObjectName("horizontalLayout_radioButton") self.label_events = QtWidgets.QLabel(self.groupBox_4) @@ -463,6 +387,166 @@ class Ui_MainWindow(object): self.radioButton_HPY.setObjectName("radioButton_HPY") self.horizontalLayout_radioButton.addWidget(self.radioButton_HPY) self.gridLayout_2.addLayout(self.horizontalLayout_radioButton, 2, 0, 1, 5) + self.horizontalLayout_12 = QtWidgets.QHBoxLayout() + self.horizontalLayout_12.setObjectName("horizontalLayout_12") + self.label_score = QtWidgets.QLabel(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_score.sizePolicy().hasHeightForWidth()) + self.label_score.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(14) + self.label_score.setFont(font) + self.label_score.setObjectName("label_score") + self.horizontalLayout_12.addWidget(self.label_score) + self.radioButton_1_class = QtWidgets.QRadioButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.radioButton_1_class.sizePolicy().hasHeightForWidth()) + self.radioButton_1_class.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(14) + self.radioButton_1_class.setFont(font) + self.radioButton_1_class.setObjectName("radioButton_1_class") + self.horizontalLayout_12.addWidget(self.radioButton_1_class) + self.radioButton_2_class = QtWidgets.QRadioButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.radioButton_2_class.sizePolicy().hasHeightForWidth()) + self.radioButton_2_class.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(14) + self.radioButton_2_class.setFont(font) + self.radioButton_2_class.setObjectName("radioButton_2_class") + self.horizontalLayout_12.addWidget(self.radioButton_2_class) + self.radioButton_3_class = QtWidgets.QRadioButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.radioButton_3_class.sizePolicy().hasHeightForWidth()) + self.radioButton_3_class.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(14) + self.radioButton_3_class.setFont(font) + self.radioButton_3_class.setObjectName("radioButton_3_class") + self.horizontalLayout_12.addWidget(self.radioButton_3_class) + self.gridLayout_2.addLayout(self.horizontalLayout_12, 3, 0, 1, 5) + self.label_quick_remark_input = QtWidgets.QLabel(self.groupBox_4) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(14) + self.label_quick_remark_input.setFont(font) + self.label_quick_remark_input.setObjectName("label_quick_remark_input") + self.gridLayout_2.addWidget(self.label_quick_remark_input, 5, 0, 1, 1) + spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_2.addItem(spacerItem4, 20, 1, 1, 1) + self.pushButton_quick_remark_input_lowSignalNoiseRatio = QtWidgets.QPushButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_quick_remark_input_lowSignalNoiseRatio.sizePolicy().hasHeightForWidth()) + self.pushButton_quick_remark_input_lowSignalNoiseRatio.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(10) + self.pushButton_quick_remark_input_lowSignalNoiseRatio.setFont(font) + self.pushButton_quick_remark_input_lowSignalNoiseRatio.setObjectName("pushButton_quick_remark_input_lowSignalNoiseRatio") + self.gridLayout_2.addWidget(self.pushButton_quick_remark_input_lowSignalNoiseRatio, 7, 2, 1, 1) + self.pushButton_quick_remark_input_waitingForTalk = QtWidgets.QPushButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_quick_remark_input_waitingForTalk.sizePolicy().hasHeightForWidth()) + self.pushButton_quick_remark_input_waitingForTalk.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(10) + self.pushButton_quick_remark_input_waitingForTalk.setFont(font) + self.pushButton_quick_remark_input_waitingForTalk.setObjectName("pushButton_quick_remark_input_waitingForTalk") + self.gridLayout_2.addWidget(self.pushButton_quick_remark_input_waitingForTalk, 5, 2, 1, 1) + self.pushButton_confirmLabel = QtWidgets.QPushButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_confirmLabel.sizePolicy().hasHeightForWidth()) + self.pushButton_confirmLabel.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("黑体") + font.setPointSize(14) + self.pushButton_confirmLabel.setFont(font) + self.pushButton_confirmLabel.setObjectName("pushButton_confirmLabel") + self.gridLayout_2.addWidget(self.pushButton_confirmLabel, 19, 2, 2, 3) + self.pushButton_quick_remark_input_maybeDesaturation = QtWidgets.QPushButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_quick_remark_input_maybeDesaturation.sizePolicy().hasHeightForWidth()) + self.pushButton_quick_remark_input_maybeDesaturation.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(10) + self.pushButton_quick_remark_input_maybeDesaturation.setFont(font) + self.pushButton_quick_remark_input_maybeDesaturation.setObjectName("pushButton_quick_remark_input_maybeDesaturation") + self.gridLayout_2.addWidget(self.pushButton_quick_remark_input_maybeDesaturation, 5, 3, 1, 1) + self.pushButton_quick_remark_input_littleChange = QtWidgets.QPushButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_quick_remark_input_littleChange.sizePolicy().hasHeightForWidth()) + self.pushButton_quick_remark_input_littleChange.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(10) + self.pushButton_quick_remark_input_littleChange.setFont(font) + self.pushButton_quick_remark_input_littleChange.setObjectName("pushButton_quick_remark_input_littleChange") + self.gridLayout_2.addWidget(self.pushButton_quick_remark_input_littleChange, 6, 3, 1, 1) + self.label_correctStart = QtWidgets.QLabel(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_correctStart.sizePolicy().hasHeightForWidth()) + self.label_correctStart.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(14) + self.label_correctStart.setFont(font) + self.label_correctStart.setObjectName("label_correctStart") + self.gridLayout_2.addWidget(self.label_correctStart, 11, 0, 1, 1) + self.pushButton_left = QtWidgets.QPushButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_left.sizePolicy().hasHeightForWidth()) + self.pushButton_left.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(14) + self.pushButton_left.setFont(font) + self.pushButton_left.setObjectName("pushButton_left") + self.gridLayout_2.addWidget(self.pushButton_left, 19, 0, 1, 1) + self.label_BCG_event = QtWidgets.QLabel(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_BCG_event.sizePolicy().hasHeightForWidth()) + self.label_BCG_event.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(12) + font.setBold(False) + font.setWeight(50) + self.label_BCG_event.setFont(font) + self.label_BCG_event.setText("") + self.label_BCG_event.setAlignment(QtCore.Qt.AlignCenter) + self.label_BCG_event.setObjectName("label_BCG_event") + self.gridLayout_2.addWidget(self.label_BCG_event, 1, 0, 1, 5) self.lineEdit_remark = QtWidgets.QLineEdit(self.groupBox_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -475,49 +559,54 @@ class Ui_MainWindow(object): self.lineEdit_remark.setFont(font) self.lineEdit_remark.setObjectName("lineEdit_remark") self.gridLayout_2.addWidget(self.lineEdit_remark, 4, 2, 1, 3) - self.pushButton_left = QtWidgets.QPushButton(self.groupBox_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_left.sizePolicy().hasHeightForWidth()) - self.pushButton_left.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(14) - self.pushButton_left.setFont(font) - self.pushButton_left.setObjectName("pushButton_left") - self.gridLayout_2.addWidget(self.pushButton_left, 14, 0, 1, 1) - self.checkBox_examineLabeled = QtWidgets.QCheckBox(self.groupBox_4) - font = QtGui.QFont() - font.setFamily("Times New Roman") - font.setPointSize(14) - self.checkBox_examineLabeled.setFont(font) - self.checkBox_examineLabeled.setObjectName("checkBox_examineLabeled") - self.gridLayout_2.addWidget(self.checkBox_examineLabeled, 0, 0, 1, 4) - self.pushButton_confirmLabel = QtWidgets.QPushButton(self.groupBox_4) + self.pushButton_quick_remark_input_noNormalRespBetweenArtifact = QtWidgets.QPushButton(self.groupBox_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_confirmLabel.sizePolicy().hasHeightForWidth()) - self.pushButton_confirmLabel.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("黑体") - font.setPointSize(14) - self.pushButton_confirmLabel.setFont(font) - self.pushButton_confirmLabel.setObjectName("pushButton_confirmLabel") - self.gridLayout_2.addWidget(self.pushButton_confirmLabel, 14, 2, 2, 3) - self.label_correctStart = QtWidgets.QLabel(self.groupBox_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_correctStart.sizePolicy().hasHeightForWidth()) - self.label_correctStart.setSizePolicy(sizePolicy) + sizePolicy.setHeightForWidth(self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.sizePolicy().hasHeightForWidth()) + self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Times New Roman") - font.setPointSize(14) - self.label_correctStart.setFont(font) - self.label_correctStart.setObjectName("label_correctStart") - self.gridLayout_2.addWidget(self.label_correctStart, 6, 0, 1, 1) + font.setPointSize(10) + self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setFont(font) + self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setObjectName("pushButton_quick_remark_input_noNormalRespBetweenArtifact") + self.gridLayout_2.addWidget(self.pushButton_quick_remark_input_noNormalRespBetweenArtifact, 7, 0, 1, 1) + self.pushButton_quick_remark_input_changeOnMiddle = QtWidgets.QPushButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_quick_remark_input_changeOnMiddle.sizePolicy().hasHeightForWidth()) + self.pushButton_quick_remark_input_changeOnMiddle.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(10) + self.pushButton_quick_remark_input_changeOnMiddle.setFont(font) + self.pushButton_quick_remark_input_changeOnMiddle.setObjectName("pushButton_quick_remark_input_changeOnMiddle") + self.gridLayout_2.addWidget(self.pushButton_quick_remark_input_changeOnMiddle, 7, 3, 1, 1) + self.pushButton_quick_remark_input_durationNoEnough = QtWidgets.QPushButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_quick_remark_input_durationNoEnough.sizePolicy().hasHeightForWidth()) + self.pushButton_quick_remark_input_durationNoEnough.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(10) + self.pushButton_quick_remark_input_durationNoEnough.setFont(font) + self.pushButton_quick_remark_input_durationNoEnough.setObjectName("pushButton_quick_remark_input_durationNoEnough") + self.gridLayout_2.addWidget(self.pushButton_quick_remark_input_durationNoEnough, 6, 2, 1, 1) + self.pushButton_quick_remark_input_maybeWrongLabeled = QtWidgets.QPushButton(self.groupBox_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_quick_remark_input_maybeWrongLabeled.sizePolicy().hasHeightForWidth()) + self.pushButton_quick_remark_input_maybeWrongLabeled.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("Times New Roman") + font.setPointSize(10) + self.pushButton_quick_remark_input_maybeWrongLabeled.setFont(font) + self.pushButton_quick_remark_input_maybeWrongLabeled.setObjectName("pushButton_quick_remark_input_maybeWrongLabeled") + self.gridLayout_2.addWidget(self.pushButton_quick_remark_input_maybeWrongLabeled, 6, 0, 1, 1) self.verticalLayout_left.addWidget(self.groupBox_4) spacerItem5 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_left.addItem(spacerItem5) @@ -534,18 +623,6 @@ class Ui_MainWindow(object): self.groupBox_5.setObjectName("groupBox_5") self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox_5) self.gridLayout_3.setObjectName("gridLayout_3") - self.pushButton_next10s = QtWidgets.QPushButton(self.groupBox_5) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_next10s.sizePolicy().hasHeightForWidth()) - self.pushButton_next10s.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("黑体") - font.setPointSize(14) - self.pushButton_next10s.setFont(font) - self.pushButton_next10s.setObjectName("pushButton_next10s") - self.gridLayout_3.addWidget(self.pushButton_next10s, 1, 2, 1, 1) self.pushButton_previous10s = QtWidgets.QPushButton(self.groupBox_5) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) @@ -558,30 +635,22 @@ class Ui_MainWindow(object): self.pushButton_previous10s.setFont(font) self.pushButton_previous10s.setObjectName("pushButton_previous10s") self.gridLayout_3.addWidget(self.pushButton_previous10s, 1, 0, 1, 1) - self.pushButton_next30s = QtWidgets.QPushButton(self.groupBox_5) + self.pushButton_next10s = QtWidgets.QPushButton(self.groupBox_5) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_next30s.sizePolicy().hasHeightForWidth()) - self.pushButton_next30s.setSizePolicy(sizePolicy) + sizePolicy.setHeightForWidth(self.pushButton_next10s.sizePolicy().hasHeightForWidth()) + self.pushButton_next10s.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("黑体") font.setPointSize(14) - self.pushButton_next30s.setFont(font) - self.pushButton_next30s.setObjectName("pushButton_next30s") - self.gridLayout_3.addWidget(self.pushButton_next30s, 2, 2, 1, 1) - self.pushButton_next60s = QtWidgets.QPushButton(self.groupBox_5) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_next60s.sizePolicy().hasHeightForWidth()) - self.pushButton_next60s.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setFamily("黑体") - font.setPointSize(14) - self.pushButton_next60s.setFont(font) - self.pushButton_next60s.setObjectName("pushButton_next60s") - self.gridLayout_3.addWidget(self.pushButton_next60s, 3, 2, 1, 1) + self.pushButton_next10s.setFont(font) + self.pushButton_next10s.setObjectName("pushButton_next10s") + self.gridLayout_3.addWidget(self.pushButton_next10s, 1, 2, 1, 1) + spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_3.addItem(spacerItem6, 2, 1, 1, 1) + spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_3.addItem(spacerItem7, 3, 1, 1, 1) self.pushButton_previous60s = QtWidgets.QPushButton(self.groupBox_5) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) @@ -606,12 +675,6 @@ class Ui_MainWindow(object): self.pushButton_previous30s.setFont(font) self.pushButton_previous30s.setObjectName("pushButton_previous30s") self.gridLayout_3.addWidget(self.pushButton_previous30s, 2, 0, 1, 1) - spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout_3.addItem(spacerItem6, 1, 1, 1, 1) - spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout_3.addItem(spacerItem7, 2, 1, 1, 1) - spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout_3.addItem(spacerItem8, 3, 1, 1, 1) self.checkBox_examineBySecond = QtWidgets.QCheckBox(self.groupBox_5) font = QtGui.QFont() font.setFamily("黑体") @@ -619,6 +682,32 @@ class Ui_MainWindow(object): self.checkBox_examineBySecond.setFont(font) self.checkBox_examineBySecond.setObjectName("checkBox_examineBySecond") self.gridLayout_3.addWidget(self.checkBox_examineBySecond, 0, 0, 1, 2) + spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_3.addItem(spacerItem8, 1, 1, 1, 1) + self.pushButton_next30s = QtWidgets.QPushButton(self.groupBox_5) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_next30s.sizePolicy().hasHeightForWidth()) + self.pushButton_next30s.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("黑体") + font.setPointSize(14) + self.pushButton_next30s.setFont(font) + self.pushButton_next30s.setObjectName("pushButton_next30s") + self.gridLayout_3.addWidget(self.pushButton_next30s, 2, 2, 1, 1) + self.pushButton_next60s = QtWidgets.QPushButton(self.groupBox_5) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_next60s.sizePolicy().hasHeightForWidth()) + self.pushButton_next60s.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setFamily("黑体") + font.setPointSize(14) + self.pushButton_next60s.setFont(font) + self.pushButton_next60s.setObjectName("pushButton_next60s") + self.gridLayout_3.addWidget(self.pushButton_next60s, 3, 2, 1, 1) self.gridLayout_3.setColumnStretch(0, 2) self.gridLayout_3.setColumnStretch(1, 1) self.gridLayout_3.setColumnStretch(2, 2) @@ -723,20 +812,11 @@ class Ui_MainWindow(object): self.lineEdit_back_add_second.setText(_translate("MainWindow", "60")) self.lineEdit_back_add_second.setPlaceholderText(_translate("MainWindow", "信号显示事件后多少秒")) self.groupBox_4.setTitle(_translate("MainWindow", "打标操作")) - self.label_correctEnd.setText(_translate("MainWindow", "修正后终止时间(s)")) - self.label_score.setText(_translate("MainWindow", "标签类型")) - self.radioButton_1_class.setText(_translate("MainWindow", "一类(U)")) - self.radioButton_1_class.setShortcut(_translate("MainWindow", "U")) - self.radioButton_2_class.setText(_translate("MainWindow", "二类(I)")) - self.radioButton_2_class.setShortcut(_translate("MainWindow", "I")) - self.radioButton_3_class.setText(_translate("MainWindow", "删除(O)")) - self.radioButton_3_class.setShortcut(_translate("MainWindow", "O")) - self.pushButton_quick_remark_input_waitingForTalk.setText(_translate("MainWindow", "待讨论(J)")) - self.pushButton_quick_remark_input_waitingForTalk.setShortcut(_translate("MainWindow", "J")) + self.label_remark.setText(_translate("MainWindow", "备注")) + self.checkBox_examineLabeled.setText(_translate("MainWindow", "仅检查未确定打标参数的事件")) self.pushButton_right.setText(_translate("MainWindow", "下一个事件(D)")) self.pushButton_right.setShortcut(_translate("MainWindow", "D")) - self.label_remark.setText(_translate("MainWindow", "备注")) - self.label_quick_remark_input.setText(_translate("MainWindow", "快速备注输入")) + self.label_correctEnd.setText(_translate("MainWindow", "修正后终止时间(s)")) self.label_events.setText(_translate("MainWindow", "事件类型")) self.radioButton_OSA.setText(_translate("MainWindow", "OSA")) self.radioButton_OSA.setShortcut(_translate("MainWindow", "1")) @@ -746,19 +826,35 @@ class Ui_MainWindow(object): self.radioButton_MSA.setShortcut(_translate("MainWindow", "3")) self.radioButton_HPY.setText(_translate("MainWindow", "HPY")) self.radioButton_HPY.setShortcut(_translate("MainWindow", "4")) + self.label_score.setText(_translate("MainWindow", "标签类型")) + self.radioButton_1_class.setText(_translate("MainWindow", "一类(U)")) + self.radioButton_1_class.setShortcut(_translate("MainWindow", "U")) + self.radioButton_2_class.setText(_translate("MainWindow", "二类(I)")) + self.radioButton_2_class.setShortcut(_translate("MainWindow", "I")) + self.radioButton_3_class.setText(_translate("MainWindow", "删除(O)")) + self.radioButton_3_class.setShortcut(_translate("MainWindow", "O")) + self.label_quick_remark_input.setText(_translate("MainWindow", "快速备注输入")) + self.pushButton_quick_remark_input_lowSignalNoiseRatio.setText(_translate("MainWindow", "二类-信噪比低")) + self.pushButton_quick_remark_input_waitingForTalk.setText(_translate("MainWindow", "待讨论(J)")) + self.pushButton_quick_remark_input_waitingForTalk.setShortcut(_translate("MainWindow", "J")) + self.pushButton_confirmLabel.setText(_translate("MainWindow", "确定打标参数(S)")) + self.pushButton_quick_remark_input_maybeDesaturation.setText(_translate("MainWindow", "一类-形似潮式呼吸")) + self.pushButton_quick_remark_input_littleChange.setText(_translate("MainWindow", "二类-起伏变化不大")) + self.label_correctStart.setText(_translate("MainWindow", "修正后起始时间(s)")) self.pushButton_left.setText(_translate("MainWindow", "上一个事件(A)")) self.pushButton_left.setShortcut(_translate("MainWindow", "A")) - self.checkBox_examineLabeled.setText(_translate("MainWindow", "仅检查未确定打标参数的事件")) - self.pushButton_confirmLabel.setText(_translate("MainWindow", "确定打标参数(S)")) - self.label_correctStart.setText(_translate("MainWindow", "修正后起始时间(s)")) + self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setText(_translate("MainWindow", "二类-体动间无正常呼吸")) + self.pushButton_quick_remark_input_changeOnMiddle.setText(_translate("MainWindow", "二类-中间起伏")) + self.pushButton_quick_remark_input_durationNoEnough.setText(_translate("MainWindow", "二类-时长不足")) + self.pushButton_quick_remark_input_maybeWrongLabeled.setText(_translate("MainWindow", "二类-疑似医生误标")) self.groupBox_5.setTitle(_translate("MainWindow", "逐帧检查")) - self.pushButton_next10s.setText(_translate("MainWindow", "+10s")) self.pushButton_previous10s.setText(_translate("MainWindow", "-10s")) - self.pushButton_next30s.setText(_translate("MainWindow", "+30s")) - self.pushButton_next60s.setText(_translate("MainWindow", "+60s")) + self.pushButton_next10s.setText(_translate("MainWindow", "+10s")) self.pushButton_previous60s.setText(_translate("MainWindow", "-60s")) self.pushButton_previous30s.setText(_translate("MainWindow", "-30s")) self.checkBox_examineBySecond.setText(_translate("MainWindow", "启用逐帧检查模式")) + self.pushButton_next30s.setText(_translate("MainWindow", "+30s")) + self.pushButton_next60s.setText(_translate("MainWindow", "+60s")) self.groupBox_6.setTitle(_translate("MainWindow", "信息输出")) self.menu.setTitle(_translate("MainWindow", "打开")) self.action_selectPath.setText(_translate("MainWindow", "数据路径选择")) diff --git a/MainWindow.ui b/MainWindow.ui index 7642cb7..4fad548 100644 --- a/MainWindow.ui +++ b/MainWindow.ui @@ -437,8 +437,8 @@ 打标操作 - - + + 0 @@ -452,116 +452,11 @@ - 修正后终止时间(s) + 备注 - - - - - 0 - 0 - - - - - Times New Roman - 14 - - - - - - - - - - - 0 - 0 - - - - - Times New Roman - 14 - - - - 标签类型 - - - - - - - - 0 - 0 - - - - - Times New Roman - 14 - - - - 一类(U) - - - U - - - - - - - - 0 - 0 - - - - - Times New Roman - 14 - - - - 二类(I) - - - I - - - - - - - - 0 - 0 - - - - - Times New Roman - 14 - - - - 删除(O) - - - O - - - - - - + Qt::Horizontal @@ -574,48 +469,8 @@ - - - - - 0 - 0 - - - - - Times New Roman - 14 - - - - - - - - - 0 - 0 - - - - - Times New Roman - 12 - 50 - false - - - - - - - Qt::AlignCenter - - - - - + + Times New Roman @@ -623,14 +478,11 @@ - 待讨论(J) - - - J + 仅检查未确定打标参数的事件 - + @@ -652,21 +504,40 @@ - - - - Qt::Horizontal + + + + + 0 + 0 + - - - 40 - 20 - + + + Times New Roman + 14 + - + - - + + + + + 0 + 0 + + + + + Times New Roman + 14 + + + + + + 0 @@ -680,20 +551,7 @@ - 备注 - - - - - - - - Times New Roman - 14 - - - - 快速备注输入 + 修正后终止时间(s) @@ -808,10 +666,223 @@ - - + + + + + + + 0 + 0 + + + + + Times New Roman + 14 + + + + 标签类型 + + + + + + + + 0 + 0 + + + + + Times New Roman + 14 + + + + 一类(U) + + + U + + + + + + + + 0 + 0 + + + + + Times New Roman + 14 + + + + 二类(I) + + + I + + + + + + + + 0 + 0 + + + + + Times New Roman + 14 + + + + 删除(O) + + + O + + + + + + + + + + Times New Roman + 14 + + + + 快速备注输入 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + - + + 0 + 0 + + + + + Times New Roman + 10 + + + + 二类-信噪比低 + + + + + + + + 0 + 0 + + + + + Times New Roman + 10 + + + + 待讨论(J) + + + J + + + + + + + + 0 + 0 + + + + + 黑体 + 14 + + + + 确定打标参数(S) + + + + + + + + 0 + 0 + + + + + Times New Roman + 10 + + + + 一类-形似潮式呼吸 + + + + + + + + 0 + 0 + + + + + Times New Roman + 10 + + + + 二类-起伏变化不大 + + + + + + + 0 0 @@ -822,9 +893,12 @@ 14 + + 修正后起始时间(s) + - + @@ -846,21 +920,48 @@ - - + + + + + 0 + 0 + + + + + Times New Roman + 12 + 50 + false + + + + + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + Times New Roman 14 - - 仅检查未确定打标参数的事件 - - - + + 0 @@ -869,19 +970,19 @@ - 黑体 - 14 + Times New Roman + 10 - 确定打标参数(S) + 二类-体动间无正常呼吸 - - + + - + 0 0 @@ -889,11 +990,49 @@ Times New Roman - 14 + 10 - 修正后起始时间(s) + 二类-中间起伏 + + + + + + + + 0 + 0 + + + + + Times New Roman + 10 + + + + 二类-时长不足 + + + + + + + + 0 + 0 + + + + + Times New Roman + 10 + + + + 二类-疑似医生误标 @@ -931,25 +1070,6 @@ 逐帧检查 - - - - - 0 - 0 - - - - - 黑体 - 14 - - - - +10s - - - @@ -969,8 +1089,8 @@ - - + + 0 @@ -984,28 +1104,35 @@ - +30s + +10s - - - - - 0 - 0 - + + + + Qt::Horizontal - - - 黑体 - 14 - + + + 40 + 20 + - - +60s + + + + + + Qt::Horizontal - + + + 40 + 20 + + + @@ -1045,6 +1172,19 @@ + + + + + 黑体 + 14 + + + + 启用逐帧检查模式 + + + @@ -1058,34 +1198,14 @@ - - - - Qt::Horizontal + + + + + 0 + 0 + - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - 黑体 @@ -1093,7 +1213,26 @@ - 启用逐帧检查模式 + +30s + + + + + + + + 0 + 0 + + + + + 黑体 + 14 + + + + +60s diff --git a/Main_Quality_Relabel_GUI.py b/Main_Quality_Relabel_GUI.py index 0d14ba8..0f8760b 100644 --- a/Main_Quality_Relabel_GUI.py +++ b/Main_Quality_Relabel_GUI.py @@ -111,7 +111,29 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.pushButton_right.setEnabled(False) self.pushButton_confirmLabel.setEnabled(False) self.pushButton_quick_remark_input_waitingForTalk.setEnabled(False) - self.pushButton_quick_remark_input_waitingForTalk.clicked.connect(self.slot_btn_quick_remark_input_waitingForTalk) + self.pushButton_quick_remark_input_waitingForTalk.clicked.connect( + self.slot_btn_quick_remark_input_waitingForTalk) + self.pushButton_quick_remark_input_maybeDesaturation.setEnabled(False) + self.pushButton_quick_remark_input_maybeDesaturation.clicked.connect( + self.slot_btn_quick_remark_input_maybeDesaturation) + self.pushButton_quick_remark_input_maybeWrongLabeled.setEnabled(False) + self.pushButton_quick_remark_input_maybeWrongLabeled.clicked.connect( + self.slot_btn_quick_remark_input_maybeWrongLabeled) + self.pushButton_quick_remark_input_durationNoEnough.setEnabled(False) + self.pushButton_quick_remark_input_durationNoEnough.clicked.connect( + self.slot_btn_quick_remark_input_durationNoEnough) + self.pushButton_quick_remark_input_littleChange.setEnabled(False) + self.pushButton_quick_remark_input_littleChange.clicked.connect( + self.slot_btn_quick_remark_input_littleChange) + self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setEnabled(False) + self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.clicked.connect( + self.slot_btn_quick_remark_input_noNormalRespBetweenArtifact) + self.pushButton_quick_remark_input_lowSignalNoiseRatio.setEnabled(False) + self.pushButton_quick_remark_input_lowSignalNoiseRatio.clicked.connect( + self.slot_btn_quick_remark_input_lowSignalNoiseRatio) + self.pushButton_quick_remark_input_changeOnMiddle.setEnabled(False) + self.pushButton_quick_remark_input_changeOnMiddle.clicked.connect( + self.slot_btn_quick_remark_input_changeOnMiddle) self.checkBox_examineBySecond.setEnabled(False) self.checkBox_examineBySecond.clicked.connect(self.enable_checkBox_examineBySecond) self.lineEdit_start_bcg_index.setEnabled(False) @@ -246,6 +268,13 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.pushButton_confirmLabel.clicked.disconnect(self.slot_btn_run) self.pushButton_confirmLabel.clicked.connect(self.slot_btn_confirmLabel) self.pushButton_quick_remark_input_waitingForTalk.setEnabled(True) + self.pushButton_quick_remark_input_maybeDesaturation.setEnabled(True) + self.pushButton_quick_remark_input_maybeWrongLabeled.setEnabled(True) + self.pushButton_quick_remark_input_durationNoEnough.setEnabled(True) + self.pushButton_quick_remark_input_littleChange.setEnabled(True) + self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setEnabled(True) + self.pushButton_quick_remark_input_lowSignalNoiseRatio.setEnabled(True) + self.pushButton_quick_remark_input_changeOnMiddle.setEnabled(True) self.comboBox_sampID.setEnabled(False) self.lineEdit_start_bcg_index.setEnabled(False) self.lineEdit_frequency.setEnabled(False) @@ -384,6 +413,10 @@ class MainWindow(QMainWindow, Ui_MainWindow): # 确定打标参数按钮的槽函数 def slot_btn_confirmLabel(self): + if int(self.lineEdit_correctEnd.text()) - int(self.lineEdit_correctStart.text()) < 10: + self.msgBox.setText("当前标注的事件的持续时间小于10秒") + self.msgBox.setIcon(QMessageBox.Warning) + self.msgBox.exec() if self.checkBox_examineBySecond.isChecked() == True: if int(self.lineEdit_correctStart.text()) < int(self.lineEdit_correctEnd.text()): if self.radioButton_1_class.isChecked() == True: @@ -442,10 +475,38 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.msgBox.setIcon(QMessageBox.Critical) self.msgBox.exec() - # 快速备注输入中待讨论按钮的槽函数 + # 快速备注输入中按钮的槽函数 def slot_btn_quick_remark_input_waitingForTalk(self): self.lineEdit_remark.setText("待讨论") + def slot_btn_quick_remark_input_maybeDesaturation(self): + self.lineEdit_remark.setText("形似潮式呼吸") + self.radioButton_1_class.setChecked(True) + + def slot_btn_quick_remark_input_maybeWrongLabeled(self): + self.lineEdit_remark.setText("疑似医生误标") + self.radioButton_2_class.setChecked(True) + + def slot_btn_quick_remark_input_durationNoEnough(self): + self.lineEdit_remark.setText("时长不足") + self.radioButton_2_class.setChecked(True) + + def slot_btn_quick_remark_input_littleChange(self): + self.lineEdit_remark.setText("起伏变化不大") + self.radioButton_2_class.setChecked(True) + + def slot_btn_quick_remark_input_noNormalRespBetweenArtifact(self): + self.lineEdit_remark.setText("体动间无正常呼吸") + self.radioButton_2_class.setChecked(True) + + def slot_btn_quick_remark_input_lowSignalNoiseRatio(self): + self.lineEdit_remark.setText("信噪比低") + self.radioButton_2_class.setChecked(True) + + def slot_btn_quick_remark_input_changeOnMiddle(self): + self.lineEdit_remark.setText("中间起伏") + self.radioButton_2_class.setChecked(True) + # -10s的槽函数 def slot_btn_previous10s(self): self.figure.clear() @@ -454,7 +515,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.radioButton_OSA.setChecked(True) self.time_move_count = self.time_move_count - 10 self.show_new_event(self.plotEventIndex, front_add_second=self.front_add_second, - back_add_second=self.back_add_second, time_move_count = self.time_move_count) + back_add_second=self.back_add_second, time_move_count=self.time_move_count) # -30s的槽函数 def slot_btn_previous30s(self): @@ -464,7 +525,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.radioButton_OSA.setChecked(True) self.time_move_count = self.time_move_count - 30 self.show_new_event(self.plotEventIndex, front_add_second=self.front_add_second, - back_add_second=self.back_add_second, time_move_count = self.time_move_count) + back_add_second=self.back_add_second, time_move_count=self.time_move_count) # -60s的槽函数 def slot_btn_previous60s(self): @@ -474,7 +535,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.radioButton_OSA.setChecked(True) self.time_move_count = self.time_move_count - 60 self.show_new_event(self.plotEventIndex, front_add_second=self.front_add_second, - back_add_second=self.back_add_second, time_move_count = self.time_move_count) + back_add_second=self.back_add_second, time_move_count=self.time_move_count) # +10s的槽函数 def slot_btn_next10s(self): @@ -484,7 +545,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.radioButton_OSA.setChecked(True) self.time_move_count = self.time_move_count + 10 self.show_new_event(self.plotEventIndex, front_add_second=self.front_add_second, - back_add_second=self.back_add_second, time_move_count = self.time_move_count) + back_add_second=self.back_add_second, time_move_count=self.time_move_count) # +30s的槽函数 def slot_btn_next30s(self): @@ -494,7 +555,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.radioButton_OSA.setChecked(True) self.time_move_count = self.time_move_count + 30 self.show_new_event(self.plotEventIndex, front_add_second=self.front_add_second, - back_add_second=self.back_add_second, time_move_count = self.time_move_count) + back_add_second=self.back_add_second, time_move_count=self.time_move_count) # +30s的槽函数 def slot_btn_next60s(self): @@ -504,7 +565,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.radioButton_OSA.setChecked(True) self.time_move_count = self.time_move_count + 60 self.show_new_event(self.plotEventIndex, front_add_second=self.front_add_second, - back_add_second=self.back_add_second, time_move_count = self.time_move_count) + back_add_second=self.back_add_second, time_move_count=self.time_move_count) # +60s的槽函数 def enable_checkBox_examineLabeled(self): @@ -575,14 +636,24 @@ class MainWindow(QMainWindow, Ui_MainWindow): # 修改了事件类型单选框后执行的函数 def change_radioButton_events(self, index): - if self.pd.at[index, "Event type"] == "Obstructive apnea": - self.radioButton_OSA.setChecked(True) - elif self.pd.at[index, "Event type"] == "Central apnea": - self.radioButton_CSA.setChecked(True) - elif self.pd.at[index, "Event type"] == "Mixed apnea": - self.radioButton_MSA.setChecked(True) - elif self.pd.at[index, "Event type"] == "Hypopnea": - self.radioButton_HPY.setChecked(True) + if not (self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "isLabeled"] == -1): + if self.pd.at[index, "correct_EventsType"] == "Obstructive apnea": + self.radioButton_OSA.setChecked(True) + elif self.pd.at[index, "correct_EventsType"] == "Central apnea": + self.radioButton_CSA.setChecked(True) + elif self.pd.at[index, "correct_EventsType"] == "Mixed apnea": + self.radioButton_MSA.setChecked(True) + elif self.pd.at[index, "correct_EventsType"] == "Hypopnea": + self.radioButton_HPY.setChecked(True) + else: + if self.pd.at[index, "Event type"] == "Obstructive apnea": + self.radioButton_OSA.setChecked(True) + elif self.pd.at[index, "Event type"] == "Central apnea": + self.radioButton_CSA.setChecked(True) + elif self.pd.at[index, "Event type"] == "Mixed apnea": + self.radioButton_MSA.setChecked(True) + elif self.pd.at[index, "Event type"] == "Hypopnea": + self.radioButton_HPY.setChecked(True) # 点击开始打标按钮后的初始化变量函数 def init_variable(self): @@ -782,8 +853,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): f"bcg[index:{bcg_index} epoch:{one_bcg_data['Epoch']} event:{one_bcg_data['Event type']}] " f"ecg:[index:{bcg_index} epoch:{one_bcg_data['Epoch']} event:{one_bcg_data['Event type']}]") - self.lineEdit_correctStart.setText(str(self.bcg_SP)) - self.lineEdit_correctEnd.setText(str(self.bcg_EP)) + # 进行向两边延展 bcg_SP = bcg_SP - front_add_second @@ -797,36 +867,47 @@ class MainWindow(QMainWindow, Ui_MainWindow): plt.xticks([]) plt.yticks([]) + if not (self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "isLabeled"] == -1): + bcg_duration_new = self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_End"] - self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_Start"] + self.lineEdit_correctStart.setText(str(self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_Start"])) + self.lineEdit_correctEnd.setText(str(self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_End"])) + self.label_BCG_event.setText(f"sampNo:{self.sampNo} Index:{bcg_index + 1}/{len(self.bcg_event_label_filtered_df)} " + f"Epoch:{one_bcg_data['Epoch']} Duration:{bcg_duration}s New Duration:{bcg_duration_new}s") + else: + bcg_duration_new = -1 + self.lineEdit_correctStart.setText(str(self.bcg_SP)) + self.lineEdit_correctEnd.setText(str(self.bcg_EP)) + self.label_BCG_event.setText( + f"sampNo:{self.sampNo} Index:{bcg_index + 1}/{len(self.bcg_event_label_filtered_df)} " + f"Epoch:{one_bcg_data['Epoch']} Duration:{bcg_duration}s") + # 绘制 Flow1 self.ax0 = self.figure.add_subplot(gs[0]) - self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Flow T") + self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Flow T", bcg_duration_new=bcg_duration_new, show_mode="one") # 绘制 Flow2 self.ax1 = self.figure.add_subplot(gs[1], sharex=self.ax0) - self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Flow P") + self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Flow P", bcg_duration_new=bcg_duration_new, show_mode="one") self.ax2 = self.figure.add_subplot(gs[2], sharex=self.ax0) - self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Effort Tho") + self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Effort Tho", bcg_duration_new=bcg_duration_new, show_mode="one") self.ax3 = self.figure.add_subplot(gs[3], sharex=self.ax0) - self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Effort Abd") + self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Effort Abd", bcg_duration_new=bcg_duration_new, show_mode="one") self.ax4 = self.figure.add_subplot(gs[4], sharex=self.ax0) - self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="SpO2", event_code=[5]) + self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="SpO2", event_code=[5], bcg_duration_new=bcg_duration_new, show_mode="one") self.ax5 = self.figure.add_subplot(gs[5], sharex=self.ax0) self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="orgdata", event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4], - event_show_under=False) + event_show_under=False, bcg_duration_new=bcg_duration_new, show_mode="one") self.ax6 = self.figure.add_subplot(gs[6], sharex=self.ax0) self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="0.7lowpass_resp", event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4], event_show_under=False, - title=f"sampNo:{self.sampNo} Index:{bcg_index + 1}/{len(self.bcg_event_label_filtered_df)}") - - self.label_BCG_event.setText(f"sampNo:{self.sampNo} Index:{bcg_index + 1}/{len(self.bcg_event_label_filtered_df)} " - f"Epoch:{one_bcg_data['Epoch']} Duration:{bcg_duration}s") + title=f"sampNo:{self.sampNo} Index:{bcg_index + 1}/{len(self.bcg_event_label_filtered_df)}", bcg_duration_new=bcg_duration_new, show_mode="one") # figManager = plt.get_current_fig_manager() # figManager.window.showMaximized() @@ -834,7 +915,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.ax0.callbacks.connect('xlim_changed', lambda ax: self.on_xlim_change(ax)) def plt_channel(self, plt_, SP, EP, channel, event_code=[1, 2, 3, 4], event_show_under=False, - ax_top=True, ax_bottom=True, ax_left=True, ax_right=True, title=None): + ax_top=True, ax_bottom=True, ax_left=True, ax_right=True, title=None, bcg_duration_new=-1, show_mode=None): """ :param plt_: :param SP: 显示开始秒数 @@ -880,12 +961,54 @@ class MainWindow(QMainWindow, Ui_MainWindow): plt_.legend(fontsize=8, loc=1) if title is not None: plt_.title(title) + ax = plt.gca() ax.grid(True) ax.spines["top"].set_visible(ax_top) ax.spines["right"].set_visible(ax_right) ax.spines["bottom"].set_visible(ax_bottom) ax.spines["left"].set_visible(ax_left) + + # 绘制半透明矩形框 + if show_mode == "one": + if not(bcg_duration_new == -1): + if self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_EventsType"] == "Obstructive apnea": + ax.axvspan(self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_Start"], + self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_End"], color='red', + alpha=0.3) + elif self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_EventsType"] == "Central apnea": + ax.axvspan(self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_Start"], + self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_End"], color='blue', + alpha=0.3) + elif self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_EventsType"] == "Mixed apnea": + ax.axvspan(self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_Start"], + self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_End"], color='gray', + alpha=0.3) + elif self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_EventsType"] == "Hypopnea": + ax.axvspan(self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_Start"], + self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "correct_End"], color='pink', + alpha=0.3) + else: + if self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "Event type"] == "Obstructive apnea": + ax.axvspan(self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "Start"], + self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "End"], + color='red', + alpha=0.3) + elif self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "Event type"] == "Central apnea": + ax.axvspan(self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "Start"], + self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "End"], + color='blue', + alpha=0.3) + elif self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "Event type"] == "Mixed apnea": + ax.axvspan(self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "Start"], + self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "End"], + color='gray', + alpha=0.3) + elif self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "Event type"] == "Hypopnea": + ax.axvspan(self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "Start"], + self.pd.at[self.bcg_event_label_index_list[self.plotEventIndex], "End"], + color='pink', + alpha=0.3) # xticks = [[]] if xticks else [range(SP, EP, 5), [str(i) for i in range(0, (EP - SP), 5)]] # print(xticks) # plt_.xticks(*xticks) # 去掉x轴 @@ -930,31 +1053,31 @@ class MainWindow(QMainWindow, Ui_MainWindow): # 绘制 Flow1 self.ax0 = self.figure.add_subplot(gs[0]) - self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Flow T") + self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Flow T", show_mode="new") # 绘制 Flow2 self.ax1 = self.figure.add_subplot(gs[1], sharex=self.ax0) - self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Flow P") + self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Flow P", show_mode="new") self.ax2 = self.figure.add_subplot(gs[2], sharex=self.ax0) - self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Effort Tho") + self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Effort Tho", show_mode="new") self.ax3 = self.figure.add_subplot(gs[3], sharex=self.ax0) - self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Effort Abd") + self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="Effort Abd", show_mode="new") self.ax4 = self.figure.add_subplot(gs[4], sharex=self.ax0) - self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="SpO2", event_code=[5]) + self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="SpO2", event_code=[5], show_mode="new") self.ax5 = self.figure.add_subplot(gs[5], sharex=self.ax0) self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="orgdata", event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4], - event_show_under=False) + event_show_under=False, show_mode="new") self.ax6 = self.figure.add_subplot(gs[6], sharex=self.ax0) self.plt_channel(plt_=plt, SP=bcg_SP, EP=bcg_EP, channel="0.7lowpass_resp", event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4], event_show_under=False, - title=f"sampNo:{self.sampNo} Index:{bcg_index + 1}/{len(self.bcg_event_label_filtered_df)}") + title=f"sampNo:{self.sampNo} Index:{bcg_index + 1}/{len(self.bcg_event_label_filtered_df)}", show_mode="new") self.label_BCG_event.setText( f"sampNo:{self.sampNo} Index:{bcg_index + 1}/{len(self.bcg_event_label_filtered_df)} " @@ -965,6 +1088,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.canvas.draw() self.ax0.callbacks.connect('xlim_changed', lambda ax: self.on_xlim_change(ax)) + def pd_add_new_row(self, df, score: int, remark: str, correct_Start: int, correct_End: int, correct_EventsType: str, isLabeled: int): new_row = pd.Series(index=df.columns, data=np.nan) new_row["score"] = score diff --git a/PSG_label_2_BCG_label.py b/PSG_label_2_BCG_label.py index ebfc11c..bd6aa92 100644 --- a/PSG_label_2_BCG_label.py +++ b/PSG_label_2_BCG_label.py @@ -18,8 +18,6 @@ PSG_Data_Path = Path(os.path.join(dir_path, "PSG")) PSG_Label_Path = Path(os.path.join(dir_path, "PSG_label")) BCG_Data_Path = Path(os.path.join(dir_path, "BCG")) BCG_Label_Path = Path(os.path.join(dir_path, "BCG_label")) -# Artifact_Label_Path = Path(os.path.join(dir_path, "Artifact_label")) -# Artifact_Offset_Path = Path(os.path.join(dir_path, "Artifact_label", "20220421Artifact_offset_value.xlsx")) # 读取PSG标签 df_PSG_label = pd.read_csv(PSG_Label_Path / (f"export" + str(sampID) + ".csv"), encoding="gbk")