diff --git a/func/Module_label_check.py b/func/Module_label_check.py index 06b62f5..f3cb556 100644 --- a/func/Module_label_check.py +++ b/func/Module_label_check.py @@ -89,6 +89,9 @@ class SettingWindow(QMainWindow): "Input_Peak": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_ORGBCG_TEXT / Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_INPUT_JPEAK_FILENAME + ConfigParams.ENDSWITH_TXT))), + "Input_Approximately_Align": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT / + Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_APPROXIMATELY_ALIGNINFO_FILENAME + + ConfigParams.ENDSWITH_CSV))), "Save": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_ORGBCG_TEXT / Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_SAVE_JPEAK_FILENAME + ConfigParams.ENDSWITH_TXT))) @@ -105,6 +108,9 @@ class SettingWindow(QMainWindow): "Input_Peak": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT / Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_INPUT_RPEAK_FILENAME + ConfigParams.ENDSWITH_TXT))), + "Input_Approximately_Align": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT / + Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_APPROXIMATELY_ALIGNINFO_FILENAME + + ConfigParams.ENDSWITH_CSV))), "Save": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT / Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_SAVE_RPEAK_FILENAME + ConfigParams.ENDSWITH_TXT))) @@ -118,6 +124,7 @@ class SettingWindow(QMainWindow): self.ui.spinBox_input_freq_signal.setValue(Config["InputConfig"]["Freq"]) self.ui.plainTextEdit_file_path_input_signal.setPlainText(Config["Path"]["Input_Signal"]) self.ui.plainTextEdit_file_path_input_peak.setPlainText(Config["Path"]["Input_Peak"]) + self.ui.plainTextEdit_file_path_input_approximately_align.setPlainText(Config["Path"]["Input_Approximately_Align"]) self.ui.plainTextEdit_file_path_save.setPlainText(Config["Path"]["Save"]) if Config["Mode"] == "BCG": self.ui.spinBox_bandPassOrder.setValue(Config["Filter"]["BCGBandPassOrder"]) @@ -135,6 +142,7 @@ class SettingWindow(QMainWindow): Config["InputConfig"]["Freq"] = self.ui.spinBox_input_freq_signal.value() Config["Path"]["Input_Signal"] = self.ui.plainTextEdit_file_path_input_signal.toPlainText() Config["Path"]["Input_Peak"] = self.ui.plainTextEdit_file_path_input_peak.toPlainText() + Config["Path"]["Input_Approximately_Align"] = self.ui.plainTextEdit_file_path_input_approximately_align.toPlainText() Config["Path"]["Save"] = self.ui.plainTextEdit_file_path_save.toPlainText() if Config["Mode"] == "BCG": Config["Filter"]["BCGBandPassOrder"] = self.ui.spinBox_bandPassOrder.value() @@ -354,6 +362,10 @@ class MainWindow_label_check(QMainWindow): self.ax1.plot(self.data.processed_data, label=Constants.LABEL_CHECK_PLOT_LABEL_SIGNAL, color=Constants.PLOT_COLOR_BLUE) + self.ax0.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--", + label="Start Line") + self.ax1.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--", + label="Start Line") self.ax0.legend(loc=Constants.PLOT_UPPER_RIGHT) self.ax1.legend(loc=Constants.PLOT_UPPER_RIGHT) self.canvas.draw() @@ -873,6 +885,7 @@ class Data: self.original_peak_y = None self.corrected_peak = None self.corrected_peak_y = None + self.approximately_align_pos = None def open_file(self): if (not Path(Config["Path"]["Input_Signal"]).exists()) or (not Path(Config["Path"]["Input_Peak"]).exists()): @@ -888,6 +901,24 @@ class Data: except Exception: return Result().failure(info=Constants.INPUT_FAILURE + Constants.LABEL_CHECK_FAILURE_REASON["Read_Data_Exception"]) + try: + df = read_csv(Config["Path"]["Input_Approximately_Align"]) + pos = df["pos"].values[-1] + ApplyFrequency = df["ApplyFrequency"].values[-1] + self.approximately_align_pos = int(pos * (Config["InputConfig"]["Freq"] / ApplyFrequency)) + if Config["Mode"] == "BCG": + if self.approximately_align_pos > 0: + self.approximately_align_pos = 0 + else: + self.approximately_align_pos = - self.approximately_align_pos + elif Config["Mode"] == "ECG": + if self.approximately_align_pos < 0: + self.approximately_align_pos = 0 + else: + raise ValueError("模式不存在") + except Exception: + self.approximately_align_pos = 0 + return Result().success(info=Constants.INPUT_FINISHED) def get_archive(self): diff --git a/func/Module_precisely_align.py b/func/Module_precisely_align.py index 01b7208..b0d2d6f 100644 --- a/func/Module_precisely_align.py +++ b/func/Module_precisely_align.py @@ -128,6 +128,9 @@ class SettingWindow(QMainWindow): "Input_Rpeak": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT / Path(str(self.sampID)) / Path(ConfigParams.PRECISELY_ALIGN_INPUT_RPEAK_FILENAME + ConfigParams.ENDSWITH_TXT))), + "Input_Approximately_Align": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT / + Path(str(self.sampID)) / Path(ConfigParams.PRECISELY_ALIGN_APPROXIMATELY_ALIGNINFO_FILENAME + + ConfigParams.ENDSWITH_CSV))), "Save_BCG_AlignInfo": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_ORGBCG_ALIGNED / Path(str(self.sampID)) / Path(ConfigParams.PRECISELY_ALIGN_SAVE_BCG_ALIGNINFO_FILENAME + ConfigParams.ENDSWITH_TXT))), @@ -203,6 +206,7 @@ class SettingWindow(QMainWindow): self.ui.plainTextEdit_file_path_input_Jpeak.setPlainText(Config["Path"]["Input_Jpeak"]) self.ui.plainTextEdit_file_path_input_ECG.setPlainText(Config["Path"]["Input_ECG"]) self.ui.plainTextEdit_file_path_input_Rpeak.setPlainText(Config["Path"]["Input_Rpeak"]) + self.ui.plainTextEdit_file_path_input_approximately_align.setPlainText(Config["Path"]["Input_Approximately_Align"]) self.ui.plainTextEdit_file_path_save_BCG_AlignInfo.setPlainText(Config["Path"]["Save_BCG_AlignInfo"]) self.ui.plainTextEdit_file_path_save_ECG_AlignInfo.setPlainText(Config["Path"]["Save_ECG_AlignInfo"]) self.ui.plainTextEdit_file_path_save_orgBcg.setPlainText(Config["Path"]["Save_orgBcg"]) @@ -219,6 +223,7 @@ class SettingWindow(QMainWindow): Config["Path"]["Input_Jpeak"] = self.ui.plainTextEdit_file_path_input_Jpeak.toPlainText() Config["Path"]["Input_ECG"] = self.ui.plainTextEdit_file_path_input_ECG.toPlainText() Config["Path"]["Input_Rpeak"] = self.ui.plainTextEdit_file_path_input_Rpeak.toPlainText() + Config["Path"]["Input_Approximately_Align"] = self.ui.plainTextEdit_file_path_input_approximately_align.toPlainText() Config["Path"]["Save_BCG_AlignInfo"] = self.ui.plainTextEdit_file_path_save_BCG_AlignInfo.toPlainText() Config["Path"]["Save_ECG_AlignInfo"] = self.ui.plainTextEdit_file_path_save_ECG_AlignInfo.toPlainText() Config["Path"]["Save_orgBcg"] = self.ui.plainTextEdit_file_path_save_orgBcg.toPlainText() @@ -485,6 +490,19 @@ class MainWindow_precisely_align(QMainWindow): self.ax1.stem(Rpeak, plot_element["RRIVs"], markerfmt="C0.", linefmt=Constants.PLOT_COLOR_ORANGE, label=Constants.PRECISELY_ALIGN_PLOT_LABEL_RRIV) + if self.data.BCG_early is True: + self.ax0.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--", + label="Start Line") + self.ax1.axvline(x=0, color=Constants.PLOT_COLOR_BLACK, linestyle="--", label="Start Line") + elif self.data.BCG_early is False: + self.ax0.axvline(x=0, color=Constants.PLOT_COLOR_BLACK, linestyle="--", label="Start Line") + self.ax1.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--", + label="Start Line") + else: + self.ax0.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--", label="Start Line") + self.ax1.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--", + label="Start Line") + self.ax0.legend(loc=Constants.PLOT_UPPER_RIGHT) self.ax1.legend(loc=Constants.PLOT_UPPER_RIGHT) self.canvas.draw() @@ -1139,7 +1157,7 @@ class MainWindow_precisely_align(QMainWindow): self.canvas.draw() self.ax4.autoscale(False) - PublicFunc.text_output(self.ui, Constants.LABEL_CHECK_RECOVER_SCALE, Constants.TIPS_TYPE_INFO) + PublicFunc.text_output(self.ui, Constants.PRECISELY_ALIGN_RECOVER_SCALE, Constants.TIPS_TYPE_INFO) def toggle_getRange(self, state): if state: @@ -1307,25 +1325,25 @@ class MainWindow_precisely_align(QMainWindow): if self.figToolbar.ax0_BCG_rectangle_front is None and self.is_left_button_pressed: self.figToolbar.ax0_BCG_rectangle_front = patches.Rectangle((0, 0), 1, 1, fill=True, - alpha=ConfigParams.LABEL_CHECK_LABEL_TRANSPARENCY, + alpha=ConfigParams.PRECISELY_ALIGN_LABEL_TRANSPARENCY, color=Constants.PLOT_COLOR_PINK) self.ax0.add_patch(self.figToolbar.ax0_BCG_rectangle_front) if self.figToolbar.ax0_BCG_rectangle_back is None and self.is_left_button_pressed: self.figToolbar.ax0_BCG_rectangle_back = patches.Rectangle((0, 0), 1, 1, fill=True, - alpha=ConfigParams.LABEL_CHECK_LABEL_TRANSPARENCY, + alpha=ConfigParams.PRECISELY_ALIGN_LABEL_TRANSPARENCY, color=Constants.PLOT_COLOR_PINK) self.ax0.add_patch(self.figToolbar.ax0_BCG_rectangle_back) if self.figToolbar.ax1_ECG_rectangle_front is None and self.is_left_button_pressed: self.figToolbar.ax1_ECG_rectangle_front = patches.Rectangle((0, 0), 1, 1, fill=True, - alpha=ConfigParams.LABEL_CHECK_LABEL_TRANSPARENCY, + alpha=ConfigParams.PRECISELY_ALIGN_LABEL_TRANSPARENCY, color=Constants.PLOT_COLOR_PINK) self.ax1.add_patch(self.figToolbar.ax1_ECG_rectangle_front) if self.figToolbar.ax1_ECG_rectangle_back is None and self.is_left_button_pressed: self.figToolbar.ax1_ECG_rectangle_back = patches.Rectangle((0, 0), 1, 1, fill=True, - alpha=ConfigParams.LABEL_CHECK_LABEL_TRANSPARENCY, + alpha=ConfigParams.PRECISELY_ALIGN_LABEL_TRANSPARENCY, color=Constants.PLOT_COLOR_PINK) self.ax1.add_patch(self.figToolbar.ax1_ECG_rectangle_back) @@ -1391,6 +1409,8 @@ class Data: self.raw_ECG = None self.Rpeak = None self.Rpeak_y = None + self.approximately_align_pos = None + self.BCG_early = None self.res_orgBcg = None self.res_BCG = None @@ -1446,6 +1466,21 @@ class Data: except Exception: return Result().failure(info=Constants.INPUT_FAILURE + Constants.PRECISELY_ALIGN_FAILURE_REASON["Read_Data_Exception"]) + try: + df = read_csv(Config["Path"]["Input_Approximately_Align"]) + pos = df["pos"].values[-1] + ApplyFrequency = df["ApplyFrequency"].values[-1] + self.approximately_align_pos = int(pos * (Config["InputConfig"]["ECGFreq"] / ApplyFrequency)) + if self.approximately_align_pos > 0: + self.BCG_early = False + elif self.approximately_align_pos < 0: + self.BCG_early = True + else: + self.approximately_align_pos = 0 + self.BCG_early = None + except Exception: + self.approximately_align_pos = 0 + return Result().success(info=Constants.INPUT_FINISHED) def data_process_for_calculate_correlation(self): diff --git a/func/utils/ConfigParams.py b/func/utils/ConfigParams.py index eeece1a..ba52657 100644 --- a/func/utils/ConfigParams.py +++ b/func/utils/ConfigParams.py @@ -142,6 +142,7 @@ class ConfigParams: LABEL_CHECK_INPUT_ECG_FILENAME: str = "ECG_Raw_" LABEL_CHECK_INPUT_RPEAK_FILENAME: str = "Rpeak_final" LABEL_CHECK_SAVE_RPEAK_FILENAME: str = "Rpeak_final_corrected" + LABEL_CHECK_APPROXIMATELY_ALIGNINFO_FILENAME: str = "Approximately_Align_Info" LABEL_CHECK_SAVE_CHUNK_SIZE: int = 100 LABEL_CHECK_LABEL_TRANSPARENCY: float = 0.2 LABEL_CHECK_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY: str = "Z" @@ -165,9 +166,11 @@ class ConfigParams: PRECISELY_ALIGN_SAVE_ECG_FILENAME: str = "ECG_Sync_" PRECISELY_ALIGN_SAVE_JPEAK_FILENAME: str = "JPeak_Sync" PRECISELY_ALIGN_SAVE_RPEAK_FILENAME: str = "Rpeak_Sync" + PRECISELY_ALIGN_APPROXIMATELY_ALIGNINFO_FILENAME: str = "Approximately_Align_Info" PRECISELY_ALIGN_ACTION_GET_RANGE_SHORTCUT_KEY: str = "Z" PRECISELY_ALIGN_SAVE_CHUNK_SIZE: int = 1000000 PRECISELY_ALIGN_SAVE_PEAK_CHUNK_SIZE: int = 100 + PRECISELY_ALIGN_LABEL_TRANSPARENCY: float = 0.2 # 冗余数据切割和标签映射 CUT_PSG_CONFIG_FILE_PATH: str = "./config/Config_cut_PSG.yaml" diff --git a/func/utils/Constants.py b/func/utils/Constants.py index e36b7fb..cf3186b 100644 --- a/func/utils/Constants.py +++ b/func/utils/Constants.py @@ -326,6 +326,7 @@ class Constants: PRECISELY_ALIGN_PLOT_LABEL_JPEAK: str = "peak_BCG" PRECISELY_ALIGN_PLOT_LABEL_SELECTED_POINT: str = "Selected Point" PRECISELY_ALIGN_NO_POINT_IN_THE_INTERVAL: str = "所选区间内无有效点" + PRECISELY_ALIGN_RECOVER_SCALE: str = "尺度恢复" PRECISELY_ALIGN_ACTION_GET_RANGE_NAME: str = f"设置范围({ConfigParams.PRECISELY_ALIGN_ACTION_GET_RANGE_SHORTCUT_KEY})" # 冗余数据切割和标签映射 diff --git a/ui/setting/label_check_input_setting.py b/ui/setting/label_check_input_setting.py index 177e24c..b45b7f1 100644 --- a/ui/setting/label_check_input_setting.py +++ b/ui/setting/label_check_input_setting.py @@ -24,7 +24,7 @@ class Ui_MainWindow_label_check_input_setting(object): def setupUi(self, MainWindow_label_check_input_setting): if not MainWindow_label_check_input_setting.objectName(): MainWindow_label_check_input_setting.setObjectName(u"MainWindow_label_check_input_setting") - MainWindow_label_check_input_setting.resize(540, 540) + MainWindow_label_check_input_setting.resize(540, 720) self.centralwidget = QWidget(MainWindow_label_check_input_setting) self.centralwidget.setObjectName(u"centralwidget") self.gridLayout = QGridLayout(self.centralwidget) @@ -142,6 +142,19 @@ class Ui_MainWindow_label_check_input_setting(object): self.verticalLayout_2.addWidget(self.groupBox_file_path_input_peak) + self.groupBox_file_path_input_approximately_align = QGroupBox(self.groupBox) + self.groupBox_file_path_input_approximately_align.setObjectName(u"groupBox_file_path_input_approximately_align") + self.verticalLayout_6 = QVBoxLayout(self.groupBox_file_path_input_approximately_align) + self.verticalLayout_6.setObjectName(u"verticalLayout_6") + self.plainTextEdit_file_path_input_approximately_align = QPlainTextEdit(self.groupBox_file_path_input_approximately_align) + self.plainTextEdit_file_path_input_approximately_align.setObjectName(u"plainTextEdit_file_path_input_approximately_align") + + self.verticalLayout_6.addWidget(self.plainTextEdit_file_path_input_approximately_align) + + self.verticalLayout_6.setStretch(0, 2) + + self.verticalLayout_2.addWidget(self.groupBox_file_path_input_approximately_align) + self.groupBox_file_path_save = QGroupBox(self.groupBox) self.groupBox_file_path_save.setObjectName(u"groupBox_file_path_save") self.verticalLayout_4 = QVBoxLayout(self.groupBox_file_path_save) @@ -157,6 +170,7 @@ class Ui_MainWindow_label_check_input_setting(object): self.verticalLayout_2.setStretch(0, 4) self.verticalLayout_2.setStretch(1, 2) self.verticalLayout_2.setStretch(2, 2) + self.verticalLayout_2.setStretch(3, 2) self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 4) @@ -191,6 +205,9 @@ class Ui_MainWindow_label_check_input_setting(object): self.groupBox_file_path_input_peak.setTitle(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u7b97\u6cd5\u5b9a\u4f4d\u7684\u5cf0\u503c\u8def\u5f84", None)) self.plainTextEdit_file_path_input_peak.setPlainText("") self.plainTextEdit_file_path_input_peak.setPlaceholderText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) + self.groupBox_file_path_input_approximately_align.setTitle(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u6570\u636e\u7c97\u540c\u6b65\u7ed3\u679c\u8def\u5f84", None)) + self.plainTextEdit_file_path_input_approximately_align.setPlainText("") + self.plainTextEdit_file_path_input_approximately_align.setPlaceholderText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) self.groupBox_file_path_save.setTitle(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u4eba\u5de5\u7ea0\u6b63\u540e\u7684\u5cf0\u503c\u4fdd\u5b58\u8def\u5f84", None)) self.plainTextEdit_file_path_save.setPlaceholderText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) self.pushButton_confirm.setText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u786e\u5b9a", None)) diff --git a/ui/setting/label_check_input_setting.ui b/ui/setting/label_check_input_setting.ui index c83943f..cbdf249 100644 --- a/ui/setting/label_check_input_setting.ui +++ b/ui/setting/label_check_input_setting.ui @@ -7,7 +7,7 @@ 0 0 540 - 540 + 720 @@ -37,7 +37,7 @@ 文件路径 - + @@ -203,6 +203,25 @@ + + + + 数据粗同步结果路径 + + + + + + + + + 文件路径 + + + + + + diff --git a/ui/setting/precisely_align_input_setting.py b/ui/setting/precisely_align_input_setting.py index 3c8ecf4..fa81c02 100644 --- a/ui/setting/precisely_align_input_setting.py +++ b/ui/setting/precisely_align_input_setting.py @@ -66,23 +66,6 @@ class Ui_MainWindow_precisely_align_input_setting(object): self.gridLayout_2.addWidget(self.groupBox_file_path_save_2, 6, 0, 1, 1) - self.groupBox_file_path_save_3 = QGroupBox(self.groupBox) - self.groupBox_file_path_save_3.setObjectName(u"groupBox_file_path_save_3") - self.verticalLayout_10 = QVBoxLayout(self.groupBox_file_path_save_3) - self.verticalLayout_10.setObjectName(u"verticalLayout_10") - self.plainTextEdit_file_path_save_Jpeak = QPlainTextEdit(self.groupBox_file_path_save_3) - self.plainTextEdit_file_path_save_Jpeak.setObjectName(u"plainTextEdit_file_path_save_Jpeak") - - self.verticalLayout_10.addWidget(self.plainTextEdit_file_path_save_Jpeak) - - self.plainTextEdit_file_path_save_Rpeak = QPlainTextEdit(self.groupBox_file_path_save_3) - self.plainTextEdit_file_path_save_Rpeak.setObjectName(u"plainTextEdit_file_path_save_Rpeak") - - self.verticalLayout_10.addWidget(self.plainTextEdit_file_path_save_Rpeak) - - - self.gridLayout_2.addWidget(self.groupBox_file_path_save_3, 6, 1, 1, 1) - self.groupBox_file_path_save = QGroupBox(self.groupBox) self.groupBox_file_path_save.setObjectName(u"groupBox_file_path_save") self.verticalLayout_4 = QVBoxLayout(self.groupBox_file_path_save) @@ -100,18 +83,61 @@ class Ui_MainWindow_precisely_align_input_setting(object): self.gridLayout_2.addWidget(self.groupBox_file_path_save, 5, 0, 1, 2) - self.groupBox_file_path_input_Rpeak = QGroupBox(self.groupBox) - self.groupBox_file_path_input_Rpeak.setObjectName(u"groupBox_file_path_input_Rpeak") - self.verticalLayout_7 = QVBoxLayout(self.groupBox_file_path_input_Rpeak) - self.verticalLayout_7.setObjectName(u"verticalLayout_7") - self.plainTextEdit_file_path_input_Rpeak = QPlainTextEdit(self.groupBox_file_path_input_Rpeak) - self.plainTextEdit_file_path_input_Rpeak.setObjectName(u"plainTextEdit_file_path_input_Rpeak") + self.groupBox_file_path_input_orgBcg = QGroupBox(self.groupBox) + self.groupBox_file_path_input_orgBcg.setObjectName(u"groupBox_file_path_input_orgBcg") + self.verticalLayout_8 = QVBoxLayout(self.groupBox_file_path_input_orgBcg) + self.verticalLayout_8.setObjectName(u"verticalLayout_8") + self.plainTextEdit_file_path_input_orgBcg = QPlainTextEdit(self.groupBox_file_path_input_orgBcg) + self.plainTextEdit_file_path_input_orgBcg.setObjectName(u"plainTextEdit_file_path_input_orgBcg") - self.verticalLayout_7.addWidget(self.plainTextEdit_file_path_input_Rpeak) + self.verticalLayout_8.addWidget(self.plainTextEdit_file_path_input_orgBcg) - self.verticalLayout_7.setStretch(0, 2) + self.verticalLayout_8.setStretch(0, 3) - self.gridLayout_2.addWidget(self.groupBox_file_path_input_Rpeak, 4, 0, 1, 2) + self.gridLayout_2.addWidget(self.groupBox_file_path_input_orgBcg, 0, 0, 1, 2) + + self.groupBox_file_path_save_3 = QGroupBox(self.groupBox) + self.groupBox_file_path_save_3.setObjectName(u"groupBox_file_path_save_3") + self.verticalLayout_10 = QVBoxLayout(self.groupBox_file_path_save_3) + self.verticalLayout_10.setObjectName(u"verticalLayout_10") + self.plainTextEdit_file_path_save_Jpeak = QPlainTextEdit(self.groupBox_file_path_save_3) + self.plainTextEdit_file_path_save_Jpeak.setObjectName(u"plainTextEdit_file_path_save_Jpeak") + + self.verticalLayout_10.addWidget(self.plainTextEdit_file_path_save_Jpeak) + + self.plainTextEdit_file_path_save_Rpeak = QPlainTextEdit(self.groupBox_file_path_save_3) + self.plainTextEdit_file_path_save_Rpeak.setObjectName(u"plainTextEdit_file_path_save_Rpeak") + + self.verticalLayout_10.addWidget(self.plainTextEdit_file_path_save_Rpeak) + + + self.gridLayout_2.addWidget(self.groupBox_file_path_save_3, 6, 1, 1, 1) + + self.groupBox_file_path_input_BCG = QGroupBox(self.groupBox) + self.groupBox_file_path_input_BCG.setObjectName(u"groupBox_file_path_input_BCG") + self.verticalLayout_5 = QVBoxLayout(self.groupBox_file_path_input_BCG) + self.verticalLayout_5.setObjectName(u"verticalLayout_5") + self.plainTextEdit_file_path_input_BCG = QPlainTextEdit(self.groupBox_file_path_input_BCG) + self.plainTextEdit_file_path_input_BCG.setObjectName(u"plainTextEdit_file_path_input_BCG") + + self.verticalLayout_5.addWidget(self.plainTextEdit_file_path_input_BCG) + + self.verticalLayout_5.setStretch(0, 3) + + self.gridLayout_2.addWidget(self.groupBox_file_path_input_BCG, 1, 0, 1, 1) + + self.groupBox_file_path_input_Jpeak = QGroupBox(self.groupBox) + self.groupBox_file_path_input_Jpeak.setObjectName(u"groupBox_file_path_input_Jpeak") + self.verticalLayout_3 = QVBoxLayout(self.groupBox_file_path_input_Jpeak) + self.verticalLayout_3.setObjectName(u"verticalLayout_3") + self.plainTextEdit_file_path_input_Jpeak = QPlainTextEdit(self.groupBox_file_path_input_Jpeak) + self.plainTextEdit_file_path_input_Jpeak.setObjectName(u"plainTextEdit_file_path_input_Jpeak") + + self.verticalLayout_3.addWidget(self.plainTextEdit_file_path_input_Jpeak) + + self.verticalLayout_3.setStretch(0, 2) + + self.gridLayout_2.addWidget(self.groupBox_file_path_input_Jpeak, 1, 1, 1, 1) self.groupBox_file_path_input_ECG = QGroupBox(self.groupBox) self.groupBox_file_path_input_ECG.setObjectName(u"groupBox_file_path_input_ECG") @@ -144,54 +170,39 @@ class Ui_MainWindow_precisely_align_input_setting(object): self.verticalLayout_6.setStretch(0, 2) self.verticalLayout_6.setStretch(1, 3) - self.gridLayout_2.addWidget(self.groupBox_file_path_input_ECG, 3, 0, 1, 2) + self.gridLayout_2.addWidget(self.groupBox_file_path_input_ECG, 3, 0, 1, 1) - self.groupBox_file_path_input_Jpeak = QGroupBox(self.groupBox) - self.groupBox_file_path_input_Jpeak.setObjectName(u"groupBox_file_path_input_Jpeak") - self.verticalLayout_3 = QVBoxLayout(self.groupBox_file_path_input_Jpeak) - self.verticalLayout_3.setObjectName(u"verticalLayout_3") - self.plainTextEdit_file_path_input_Jpeak = QPlainTextEdit(self.groupBox_file_path_input_Jpeak) - self.plainTextEdit_file_path_input_Jpeak.setObjectName(u"plainTextEdit_file_path_input_Jpeak") + self.groupBox_file_path_input_Rpeak = QGroupBox(self.groupBox) + self.groupBox_file_path_input_Rpeak.setObjectName(u"groupBox_file_path_input_Rpeak") + self.verticalLayout_7 = QVBoxLayout(self.groupBox_file_path_input_Rpeak) + self.verticalLayout_7.setObjectName(u"verticalLayout_7") + self.plainTextEdit_file_path_input_Rpeak = QPlainTextEdit(self.groupBox_file_path_input_Rpeak) + self.plainTextEdit_file_path_input_Rpeak.setObjectName(u"plainTextEdit_file_path_input_Rpeak") - self.verticalLayout_3.addWidget(self.plainTextEdit_file_path_input_Jpeak) + self.verticalLayout_7.addWidget(self.plainTextEdit_file_path_input_Rpeak) - self.verticalLayout_3.setStretch(0, 2) + self.verticalLayout_7.setStretch(0, 2) - self.gridLayout_2.addWidget(self.groupBox_file_path_input_Jpeak, 2, 0, 1, 2) + self.gridLayout_2.addWidget(self.groupBox_file_path_input_Rpeak, 3, 1, 1, 1) - self.groupBox_file_path_input_BCG = QGroupBox(self.groupBox) - self.groupBox_file_path_input_BCG.setObjectName(u"groupBox_file_path_input_BCG") - self.verticalLayout_5 = QVBoxLayout(self.groupBox_file_path_input_BCG) - self.verticalLayout_5.setObjectName(u"verticalLayout_5") - self.plainTextEdit_file_path_input_BCG = QPlainTextEdit(self.groupBox_file_path_input_BCG) - self.plainTextEdit_file_path_input_BCG.setObjectName(u"plainTextEdit_file_path_input_BCG") + self.groupBox_file_path_save_4 = QGroupBox(self.groupBox) + self.groupBox_file_path_save_4.setObjectName(u"groupBox_file_path_save_4") + self.verticalLayout_11 = QVBoxLayout(self.groupBox_file_path_save_4) + self.verticalLayout_11.setObjectName(u"verticalLayout_11") + self.plainTextEdit_file_path_input_approximately_align = QPlainTextEdit(self.groupBox_file_path_save_4) + self.plainTextEdit_file_path_input_approximately_align.setObjectName(u"plainTextEdit_file_path_input_approximately_align") - self.verticalLayout_5.addWidget(self.plainTextEdit_file_path_input_BCG) + self.verticalLayout_11.addWidget(self.plainTextEdit_file_path_input_approximately_align) - self.verticalLayout_5.setStretch(0, 3) - self.gridLayout_2.addWidget(self.groupBox_file_path_input_BCG, 1, 0, 1, 2) - - self.groupBox_file_path_input_orgBcg = QGroupBox(self.groupBox) - self.groupBox_file_path_input_orgBcg.setObjectName(u"groupBox_file_path_input_orgBcg") - self.verticalLayout_8 = QVBoxLayout(self.groupBox_file_path_input_orgBcg) - self.verticalLayout_8.setObjectName(u"verticalLayout_8") - self.plainTextEdit_file_path_input_orgBcg = QPlainTextEdit(self.groupBox_file_path_input_orgBcg) - self.plainTextEdit_file_path_input_orgBcg.setObjectName(u"plainTextEdit_file_path_input_orgBcg") - - self.verticalLayout_8.addWidget(self.plainTextEdit_file_path_input_orgBcg) - - self.verticalLayout_8.setStretch(0, 3) - - self.gridLayout_2.addWidget(self.groupBox_file_path_input_orgBcg, 0, 0, 1, 2) + self.gridLayout_2.addWidget(self.groupBox_file_path_save_4, 4, 0, 1, 2) self.gridLayout_2.setRowStretch(0, 3) self.gridLayout_2.setRowStretch(1, 3) - self.gridLayout_2.setRowStretch(2, 3) - self.gridLayout_2.setRowStretch(3, 4) - self.gridLayout_2.setRowStretch(4, 3) - self.gridLayout_2.setRowStretch(5, 6) - self.gridLayout_2.setRowStretch(6, 3) + self.gridLayout_2.setRowStretch(3, 3) + self.gridLayout_2.setRowStretch(4, 2) + self.gridLayout_2.setRowStretch(5, 4) + self.gridLayout_2.setRowStretch(6, 4) self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 4) @@ -219,28 +230,30 @@ class Ui_MainWindow_precisely_align_input_setting(object): self.plainTextEdit_file_path_save_orgBcg.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) self.plainTextEdit_file_path_save_BCG.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) self.plainTextEdit_file_path_save_ECG.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) - self.groupBox_file_path_save_3.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u5bf9\u9f50J\u5cf0\u548cR\u5cf0\u4fdd\u5b58\u8def\u5f84", None)) - self.plainTextEdit_file_path_save_Jpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) - self.plainTextEdit_file_path_save_Rpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) self.groupBox_file_path_save.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u5bf9\u9f50\u4fe1\u606f\u4fdd\u5b58\u8def\u5f84", None)) self.plainTextEdit_file_path_save_BCG_AlignInfo.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) self.plainTextEdit_file_path_save_ECG_AlignInfo.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) - self.groupBox_file_path_input_Rpeak.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4eba\u5de5\u7ea0\u6b63\u540e\u7684R\u5cf0\u8def\u5f84", None)) - self.plainTextEdit_file_path_input_Rpeak.setPlainText("") - self.plainTextEdit_file_path_input_Rpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) + self.groupBox_file_path_input_orgBcg.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u539f\u59cborgBcg\u8def\u5f84", None)) + self.plainTextEdit_file_path_input_orgBcg.setPlainText("") + self.plainTextEdit_file_path_input_orgBcg.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) + self.groupBox_file_path_save_3.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u5bf9\u9f50J\u5cf0\u548cR\u5cf0\u4fdd\u5b58\u8def\u5f84", None)) + self.plainTextEdit_file_path_save_Jpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) + self.plainTextEdit_file_path_save_Rpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) + self.groupBox_file_path_input_BCG.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u9884\u5904\u7406\u540e\u7684BCG\u8def\u5f84", None)) + self.plainTextEdit_file_path_input_BCG.setPlainText("") + self.plainTextEdit_file_path_input_BCG.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) + self.groupBox_file_path_input_Jpeak.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4eba\u5de5\u7ea0\u6b63\u540e\u7684J\u5cf0\u8def\u5f84", None)) + self.plainTextEdit_file_path_input_Jpeak.setPlainText("") + self.plainTextEdit_file_path_input_Jpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) self.groupBox_file_path_input_ECG.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u9884\u5904\u7406\u540e\u7684ECG\u8def\u5f84", None)) self.label_3.setText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None)) self.plainTextEdit_file_path_input_ECG.setPlainText("") self.plainTextEdit_file_path_input_ECG.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) - self.groupBox_file_path_input_Jpeak.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4eba\u5de5\u7ea0\u6b63\u540e\u7684J\u5cf0\u8def\u5f84", None)) - self.plainTextEdit_file_path_input_Jpeak.setPlainText("") - self.plainTextEdit_file_path_input_Jpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) - self.groupBox_file_path_input_BCG.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u9884\u5904\u7406\u540e\u7684BCG\u8def\u5f84", None)) - self.plainTextEdit_file_path_input_BCG.setPlainText("") - self.plainTextEdit_file_path_input_BCG.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) - self.groupBox_file_path_input_orgBcg.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u539f\u59cborgBcg\u8def\u5f84", None)) - self.plainTextEdit_file_path_input_orgBcg.setPlainText("") - self.plainTextEdit_file_path_input_orgBcg.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) + self.groupBox_file_path_input_Rpeak.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4eba\u5de5\u7ea0\u6b63\u540e\u7684R\u5cf0\u8def\u5f84", None)) + self.plainTextEdit_file_path_input_Rpeak.setPlainText("") + self.plainTextEdit_file_path_input_Rpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) + self.groupBox_file_path_save_4.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6570\u636e\u7c97\u540c\u6b65\u7ed3\u679c\u8def\u5f84", None)) + self.plainTextEdit_file_path_input_approximately_align.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) self.pushButton_confirm.setText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u786e\u5b9a", None)) # retranslateUi diff --git a/ui/setting/precisely_align_input_setting.ui b/ui/setting/precisely_align_input_setting.ui index efeb5eb..e638be6 100644 --- a/ui/setting/precisely_align_input_setting.ui +++ b/ui/setting/precisely_align_input_setting.ui @@ -37,7 +37,7 @@ 文件路径 - + @@ -68,29 +68,6 @@ - - - - 对齐J峰和R峰保存路径 - - - - - - 保存路径 - - - - - - - 保存路径 - - - - - - @@ -114,14 +91,14 @@ - - + + - 人工纠正后的R峰路径 + 原始orgBcg路径 - + - + @@ -133,7 +110,68 @@ - + + + + 对齐J峰和R峰保存路径 + + + + + + 保存路径 + + + + + + + 保存路径 + + + + + + + + + + 预处理后的BCG路径 + + + + + + + + + 文件路径 + + + + + + + + + + 人工纠正后的J峰路径 + + + + + + + + + 文件路径 + + + + + + + 预处理后的ECG路径 @@ -183,14 +221,14 @@ - - + + - 人工纠正后的J峰路径 + 人工纠正后的R峰路径 - + - + @@ -202,36 +240,14 @@ - - + + - 预处理后的BCG路径 + 数据粗同步结果路径 - + - - - - - - 文件路径 - - - - - - - - - - 原始orgBcg路径 - - - - - - - + 文件路径