1、完成了<ECG的R峰算法定位>的重构

2、创建好了<人工纠正>和<体动标注>的界面绘制
This commit is contained in:
Yorusora
2025-04-28 16:18:59 +08:00
parent f928fa4d9c
commit 2a13ceac39
27 changed files with 5552 additions and 312 deletions

View File

@ -59,7 +59,6 @@ class SettingWindow(QMainWindow):
def __read_config__(self): def __read_config__(self):
if not Path(ConfigParams.DETECT_JPEAK_CONFIG_FILE_PATH).exists(): if not Path(ConfigParams.DETECT_JPEAK_CONFIG_FILE_PATH).exists():
with open(ConfigParams.DETECT_JPEAK_CONFIG_FILE_PATH, "w") as f: with open(ConfigParams.DETECT_JPEAK_CONFIG_FILE_PATH, "w") as f:
dump(ConfigParams.DETECT_JPEAK_CONFIG_NEW_CONTENT, f) dump(ConfigParams.DETECT_JPEAK_CONFIG_NEW_CONTENT, f)
@ -246,13 +245,13 @@ class MainWindow_detect_Jpeak(QMainWindow):
if sender == self.ui.pushButton_view: if sender == self.ui.pushButton_view:
self.line_data, = self.ax0.plot(self.data.processed_data, self.line_data, = self.ax0.plot(self.data.processed_data,
color=Constants.PLOT_COLOR_BLUE, color=Constants.PLOT_COLOR_BLUE,
label=Constants.DETECT_J_PEAK_PLOT_LABEL_BCG) label=Constants.DETECT_JPEAK_PLOT_LABEL_BCG)
self.point_peak, = self.ax0.plot(self.data.peak, self.data.processed_data[self.data.peak], self.point_peak, = self.ax0.plot(self.data.peak, self.data.processed_data[self.data.peak],
'r.', 'r.',
label=Constants.DETECT_J_PEAK_PLOT_LABEL_J_PEAKS) label=Constants.DETECT_JPEAK_PLOT_LABEL_J_PEAKS)
self.line_interval, = self.ax0.plot(self.data.interval, self.line_interval, = self.ax0.plot(self.data.interval,
color=Constants.PLOT_COLOR_ORANGE, color=Constants.PLOT_COLOR_ORANGE,
label=Constants.DETECT_J_PEAK_PLOT_LABEL_INTERVAL) label=Constants.DETECT_JPEAK_PLOT_LABEL_INTERVAL)
self.ax0.legend(loc=Constants.PLOT_UPPER_RIGHT) self.ax0.legend(loc=Constants.PLOT_UPPER_RIGHT)
status = True status = True
info = Constants.DRAWING_FINISHED info = Constants.DRAWING_FINISHED
@ -293,6 +292,41 @@ class MainWindow_detect_Jpeak(QMainWindow):
if widget.objectName() in ButtonState["Default"].keys(): if widget.objectName() in ButtonState["Default"].keys():
widget.setEnabled(ButtonState["Default"][widget.objectName()]) widget.setEnabled(ButtonState["Default"][widget.objectName()])
def __update_config__(self):
Config["Filter"]["BandPassLow"] = self.ui.doubleSpinBox_bandPassLow.value()
Config["Filter"]["BandPassHigh"] = self.ui.doubleSpinBox_bandPassHigh.value()
Config["PeaksValue"] = self.ui.spinBox_peaksValue.value()
Config["AmpValue"] = self.ui.doubleSpinBox_ampValue.value()
Config["IntervalLow"] = self.ui.spinBox_intervalLow.value()
Config["IntervalHigh"] = self.ui.spinBox_intervalHigh.value()
Config["UseCPU"] = self.ui.checkBox_useCPU.isChecked()
Config["DetectMethod"] = self.ui.comboBox_model.currentText()
def finish_operation(self):
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.OPERATION_FINISHED))
self.progressbar.setValue(100)
QApplication.processEvents()
self.__enableAllButton__()
def add_progressbar(self):
self.progressbar = QProgressBar()
self.progressbar.setRange(0, 100)
self.progressbar.setValue(0)
self.progressbar.setStyleSheet(Constants.PROGRESSBAR_STYLE)
self.ui.statusbar.addPermanentWidget(self.progressbar)
def statusbar_show_msg(self, msg):
self.ui.statusbar.showMessage(msg)
def statusbar_clear_msg(self):
self.ui.statusbar.clearMessage()
def __slot_btn_input__(self): def __slot_btn_input__(self):
self.__disableAllButton__() self.__disableAllButton__()
@ -310,7 +344,7 @@ class MainWindow_detect_Jpeak(QMainWindow):
# 清空模型列表 # 清空模型列表
self.ui.comboBox_model.clear() self.ui.comboBox_model.clear()
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.LOADING_MODEL)) self.statusbar_show_msg(PublicFunc.format_status_msg("(1/2)" + Constants.DETECT_JPEAK_LOADING_MODEL))
self.progressbar.setValue(0) self.progressbar.setValue(0)
QApplication.processEvents() QApplication.processEvents()
@ -318,15 +352,15 @@ class MainWindow_detect_Jpeak(QMainWindow):
self.model = Model() self.model = Model()
status, info = self.model.seek_model() status, info = self.model.seek_model()
if not status: if not status:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(1/2)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation() self.finish_operation()
return return
else: else:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(1/2)" + info, Constants.TIPS_TYPE_INFO)
self.update_ui_comboBox_model(self.model.model_list) self.update_ui_comboBox_model(self.model.model_list)
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.INPUTTING_DATA)) self.statusbar_show_msg(PublicFunc.format_status_msg("(2/2)" + Constants.INPUTTING_DATA))
self.progressbar.setValue(10) self.progressbar.setValue(10)
QApplication.processEvents() QApplication.processEvents()
@ -334,12 +368,12 @@ class MainWindow_detect_Jpeak(QMainWindow):
self.data = Data() self.data = Data()
status, info = self.data.open_file() status, info = self.data.open_file()
if not status: if not status:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(2/2)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation() self.finish_operation()
return return
else: else:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(2/2)" + info, Constants.TIPS_TYPE_INFO)
MainWindow_detect_Jpeak.__reset__() MainWindow_detect_Jpeak.__reset__()
self.finish_operation() self.finish_operation()
@ -348,21 +382,21 @@ class MainWindow_detect_Jpeak(QMainWindow):
self.__disableAllButton__() self.__disableAllButton__()
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.DETECT_JPEAK_PROCESSING_DATA)) self.statusbar_show_msg(PublicFunc.format_status_msg("(1/3)" + Constants.DETECT_JPEAK_PROCESSING_DATA))
self.progressbar.setValue(0) self.progressbar.setValue(0)
QApplication.processEvents() QApplication.processEvents()
# 数据预处理 # 数据预处理
status, info = self.data.preprocess() status, info = self.data.preprocess()
if not status: if not status:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(1/3)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation() self.finish_operation()
return return
else: else:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(1/3)" + info, Constants.TIPS_TYPE_INFO)
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.DETECT_JPEAK_PREDICTING_PEAK)) self.statusbar_show_msg(PublicFunc.format_status_msg("(2/3)" + Constants.DETECT_JPEAK_PREDICTING_PEAK))
self.progressbar.setValue(10) self.progressbar.setValue(10)
QApplication.processEvents() QApplication.processEvents()
@ -370,33 +404,33 @@ class MainWindow_detect_Jpeak(QMainWindow):
self.model.selected_model = Config["DetectMethod"] self.model.selected_model = Config["DetectMethod"]
status, info = self.data.predict_Jpeak(self.model) status, info = self.data.predict_Jpeak(self.model)
if not status: if not status:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(2/3)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation() self.finish_operation()
return return
else: else:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(2/3)" + info, Constants.TIPS_TYPE_INFO)
PublicFunc.text_output(self.ui, Constants.DETECT_J_PEAK_DATA_LENGTH_POINTS + str(len(self.data.data)), PublicFunc.text_output(self.ui, Constants.DETECT_JPEAK_DATA_LENGTH_POINTS + str(len(self.data.raw_data)),
Constants.TIPS_TYPE_INFO) Constants.TIPS_TYPE_INFO)
PublicFunc.text_output(self.ui, Constants.DETECT_J_PEAK_DURATION_MIN + PublicFunc.text_output(self.ui, Constants.DETECT_JPEAK_DURATION_MIN +
str((len(self.data.data) / Config["InputConfig"]["Freq"] / 60)), str((len(self.data.raw_data) / Config["InputConfig"]["Freq"] / 60)),
Constants.TIPS_TYPE_INFO) Constants.TIPS_TYPE_INFO)
PublicFunc.text_output(self.ui, Constants.DETECT_J_PEAK_JPEAK_AMOUNT + str(len(self.data.peak)), PublicFunc.text_output(self.ui, Constants.DETECT_JPEAK_PEAK_AMOUNT + str(len(self.data.peak)),
Constants.TIPS_TYPE_INFO) Constants.TIPS_TYPE_INFO)
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.DRAWING_DATA)) self.statusbar_show_msg(PublicFunc.format_status_msg("(3/3)" + Constants.DRAWING_DATA))
self.progressbar.setValue(70) self.progressbar.setValue(70)
QApplication.processEvents() QApplication.processEvents()
# 绘图 # 绘图
status, info = self.__plot__() status, info = self.__plot__()
if not status: if not status:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(3/3)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation() self.finish_operation()
return return
else: else:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(3/3)" + info, Constants.TIPS_TYPE_INFO)
ButtonState["Current"]["pushButton_save"] = True ButtonState["Current"]["pushButton_save"] = True
self.finish_operation() self.finish_operation()
@ -410,14 +444,14 @@ class MainWindow_detect_Jpeak(QMainWindow):
if reply == QMessageBox.Yes: if reply == QMessageBox.Yes:
self.__disableAllButton__() self.__disableAllButton__()
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.SAVING_DATA)) self.statusbar_show_msg(PublicFunc.format_status_msg("(1/1)" + Constants.SAVING_DATA))
self.progressbar.setValue(0) self.progressbar.setValue(0)
QApplication.processEvents() QApplication.processEvents()
# 保存 # 保存
# status, info = self.data.save() # status, info = self.data.save()
total_rows = len(DataFrame(self.data.peak.reshape(-1))) total_rows = len(DataFrame(self.data.peak.reshape(-1)))
chunk_size = ConfigParams.PREPROCESS_SAVE_CHUNK_SIZE chunk_size = ConfigParams.DETECT_JPEAK_SAVE_CHUNK_SIZE
with open(Config["Path"]["Save"], 'w') as f: with open(Config["Path"]["Save"], 'w') as f:
for start in range(0, total_rows, chunk_size): for start in range(0, total_rows, chunk_size):
end = min(start + chunk_size, total_rows) end = min(start + chunk_size, total_rows)
@ -428,56 +462,21 @@ class MainWindow_detect_Jpeak(QMainWindow):
QApplication.processEvents() QApplication.processEvents()
if not status: if not status:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(1/1)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation() self.finish_operation()
return return
else: else:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(1/1)" + info, Constants.TIPS_TYPE_INFO)
PublicFunc.msgbox_output(self, info, Constants.TIPS_TYPE_INFO) PublicFunc.msgbox_output(self, info, Constants.TIPS_TYPE_INFO)
self.finish_operation() self.finish_operation()
def __update_config__(self):
Config["Filter"]["BandPassLow"] = self.ui.doubleSpinBox_bandPassLow.value()
Config["Filter"]["BandPassHigh"] = self.ui.doubleSpinBox_bandPassHigh.value()
Config["PeaksValue"] = self.ui.spinBox_peaksValue.value()
Config["AmpValue"] = self.ui.doubleSpinBox_ampValue.value()
Config["IntervalLow"] = self.ui.spinBox_intervalLow.value()
Config["IntervalHigh"] = self.ui.spinBox_intervalHigh.value()
Config["UseCPU"] = self.ui.checkBox_useCPU.isChecked()
Config["DetectMethod"] = self.ui.comboBox_model.currentText()
def update_ui_comboBox_model(self, model_list): def update_ui_comboBox_model(self, model_list):
self.ui.comboBox_model.clear() self.ui.comboBox_model.clear()
self.ui.comboBox_model.addItems(model_list) self.ui.comboBox_model.addItems(model_list)
def finish_operation(self):
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.OPERATION_FINISHED))
self.progressbar.setValue(100)
QApplication.processEvents()
self.__enableAllButton__()
def add_progressbar(self):
self.progressbar = QProgressBar()
self.progressbar.setRange(0, 100)
self.progressbar.setValue(0)
self.progressbar.setStyleSheet(Constants.PROGRESSBAR_STYLE)
self.ui.statusBar.addPermanentWidget(self.progressbar)
def statusbar_show_msg(self, msg):
self.ui.statusBar.showMessage(msg)
def statusbar_clear_msg(self):
self.ui.statusBar.clearMessage()
class Data: class Data:
@ -486,7 +485,7 @@ class Data:
self.file_path_input = Config["Path"]["Input"] self.file_path_input = Config["Path"]["Input"]
self.file_path_save = Config["Path"]["Save"] self.file_path_save = Config["Path"]["Save"]
self.data = None self.raw_data = None
self.processed_data = None self.processed_data = None
self.peak = None self.peak = None
self.interval = None self.interval = None
@ -497,21 +496,21 @@ class Data:
return False, Constants.INPUT_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Data_Path_Not_Exist"] return False, Constants.INPUT_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Data_Path_Not_Exist"]
try: try:
self.data = read_csv(self.file_path_input, self.raw_data = read_csv(self.file_path_input,
encoding=ConfigParams.UTF8_ENCODING, encoding=ConfigParams.UTF8_ENCODING,
header=None).to_numpy().reshape(-1) header=None).to_numpy().reshape(-1)
except Exception: except Exception:
return False, Constants.INPUT_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Read_File_Exception"] return False, Constants.INPUT_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Read_Data_Exception"]
return True, Constants.INPUT_FINISHED return True, Constants.INPUT_FINISHED
def preprocess(self): def preprocess(self):
if self.data is None: if self.raw_data is None:
return False, Constants.DETECT_JPEAK_PROCESS_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Raw_Data_Not_Exist"] return False, Constants.DETECT_JPEAK_PROCESS_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Raw_Data_Not_Exist"]
try: try:
self.processed_data = preprocess(self.data, self.processed_data = preprocess(self.raw_data,
Config["InputConfig"]["Freq"], Config["InputConfig"]["Freq"],
Config["Filter"]["BandPassLow"], Config["Filter"]["BandPassLow"],
Config["Filter"]["BandPassHigh"], Config["Filter"]["BandPassHigh"],
@ -555,7 +554,7 @@ class Data:
# float_format='%.4f') # float_format='%.4f')
chunk.to_csv(self.file_path_save, mode='a', index=False, header=False) chunk.to_csv(self.file_path_save, mode='a', index=False, header=False)
except Exception: except Exception:
return False, Constants.SAVING_FAILURE + Constants.PREPROCESS_FAILURE_REASON["Save_Exception"] return False, Constants.SAVING_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Save_Exception"]
return True, Constants.SAVING_FINISHED return True, Constants.SAVING_FINISHED
@ -572,13 +571,13 @@ class Model:
def seek_model(self): def seek_model(self):
if not Path(Config["ModelFolderPath"]).exists(): if not Path(Config["ModelFolderPath"]).exists():
return False, Constants.LOAD_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Model_Path_Not_Exist"] return False, Constants.DETECT_JPEAK_LOAD_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Model_Path_Not_Exist"]
try: try:
self.model_list = [file.name for file in Path(Config["ModelFolderPath"]).iterdir() if file.is_file()] self.model_list = [file.name for file in Path(Config["ModelFolderPath"]).iterdir() if file.is_file()]
if len(self.model_list) == 0: if len(self.model_list) == 0:
return False, Constants.DETECT_JPEAK_FAILURE_REASON["Model_File_Not_Exist"] return False, Constants.DETECT_JPEAK_FAILURE_REASON["Model_File_Not_Exist"]
except Exception: except Exception:
return False, Constants.LOAD_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Read_Model_Exception"] return False, Constants.DETECT_JPEAK_LOAD_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Read_Model_Exception"]
return True, Constants.LOAD_FINISHED return True, Constants.DETECT_JPEAK_LOAD_FINISHED

550
func/Module_detect_Rpeak.py Normal file
View File

@ -0,0 +1,550 @@
from gc import collect
from pathlib import Path
import matplotlib.pyplot as plt
from PySide6.QtWidgets import QMessageBox, QMainWindow, QWidget, QPushButton, QProgressBar, QApplication
from matplotlib import gridspec
from matplotlib.backends.backend_qt import NavigationToolbar2QT
from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg
from overrides import overrides
from pandas import read_csv, DataFrame
from yaml import dump, load, FullLoader
from func.utils.PublicFunc import PublicFunc
from func.utils.Constants import Constants, ConfigParams
from func.utils.detect_Rpeak import preprocess, Rpeak_Detection, get_method
from ui.MainWindow.MainWindow_detect_Rpeak import Ui_MainWindow_detect_Rpeak
from ui.setting.detect_Rpeak_input_setting import Ui_MainWindow_detect_Rpeak_input_setting
Config = {
}
ButtonState = {
"Default": {
"pushButton_input_setting": True,
"pushButton_input": True,
"pushButton_view": False,
"pushButton_save": False
},
"Current": {
"pushButton_input_setting": True,
"pushButton_input": True,
"pushButton_view": False,
"pushButton_save": False
}
}
class SettingWindow(QMainWindow):
def __init__(self, root_path, sampID):
super(SettingWindow, self).__init__()
self.ui = Ui_MainWindow_detect_Rpeak_input_setting()
self.ui.setupUi(self)
self.root_path = root_path
self.sampID = sampID
self.config = None
self.__read_config__()
self.ui.spinBox_input_freq.valueChanged.connect(self.__update_ui__)
self.ui.pushButton_confirm.clicked.connect(self.__write_config__)
self.ui.pushButton_cancel.clicked.connect(self.__rollback_config__)
self.ui.pushButton_cancel.clicked.connect(self.close)
def __read_config__(self):
if not Path(ConfigParams.DETECT_RPEAK_CONFIG_FILE_PATH).exists():
with open(ConfigParams.DETECT_RPEAK_CONFIG_FILE_PATH, "w") as f:
dump(ConfigParams.DETECT_RPEAK_CONFIG_NEW_CONTENT, f)
with open(ConfigParams.DETECT_RPEAK_CONFIG_FILE_PATH, "r") as f:
file_config = load(f.read(), Loader=FullLoader)
Config.update(file_config)
self.config = file_config
Config.update({
"Path": {
"Input": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT /
Path(str(self.sampID)) / Path(ConfigParams.DETECT_RPEAK_INPUT_ECG_FILENAME +
str(Config["InputConfig"]["Freq"]) +
ConfigParams.ENDSWITH_TXT))),
"Save": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT /
Path(str(self.sampID)) / Path(ConfigParams.DETECT_RPEAK_SAVE_FILENAME +
ConfigParams.ENDSWITH_TXT)))
}
})
# 数据回显
self.ui.spinBox_input_freq.setValue(Config["InputConfig"]["Freq"])
self.ui.plainTextEdit_file_path_input.setPlainText(Config["Path"]["Input"])
self.ui.plainTextEdit_file_path_save.setPlainText(Config["Path"]["Save"])
def __write_config__(self):
# 从界面写入配置
Config["InputConfig"]["Freq"] = self.ui.spinBox_input_freq.value()
Config["Path"]["Input"] = self.ui.plainTextEdit_file_path_input.toPlainText()
Config["Path"]["Save"] = self.ui.plainTextEdit_file_path_save.toPlainText()
# 保存配置到文件
self.config["InputConfig"]["Freq"] = self.ui.spinBox_input_freq.value()
with open(ConfigParams.DETECT_RPEAK_CONFIG_FILE_PATH, "w") as f:
dump(self.config, f)
self.close()
def __rollback_config__(self):
self.__read_config__()
def __update_ui__(self):
self.ui.plainTextEdit_file_path_input.setPlainText(
str((Path(self.root_path) /
ConfigParams.PUBLIC_PATH_PSG_TEXT /
Path(str(self.sampID)) /
Path(ConfigParams.DETECT_RPEAK_INPUT_ECG_FILENAME +
str(self.ui.spinBox_input_freq.value()) +
ConfigParams.ENDSWITH_TXT))))
class MainWindow_detect_Rpeak(QMainWindow):
def __init__(self):
super(MainWindow_detect_Rpeak, self).__init__()
self.ui = Ui_MainWindow_detect_Rpeak()
self.ui.setupUi(self)
self.root_path = None
self.sampID = None
self.data = None
self.setting = None
# 初始化进度条
self.progressbar = None
self.add_progressbar()
#初始化画框
self.fig = None
self.canvas = None
self.figToolbar = None
self.gs = None
self.ax0 = None
self.ax1 = None
self.line_data = None
self.point_peak = None
self.line_interval = None
self.point_RRIV = None
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@overrides
def show(self, root_path, sampID):
super().show()
self.root_path = root_path
self.sampID = sampID
self.setting = SettingWindow(root_path, sampID)
# 初始化画框
self.fig = plt.figure(figsize=(12, 9), dpi=100)
self.canvas = FigureCanvasQTAgg(self.fig)
self.figToolbar = NavigationToolbar2QT(self.canvas)
for action in self.figToolbar.actions():
if action.text() == "Subplots" or action.text() == "Customize":
self.figToolbar.removeAction(action)
self.ui.verticalLayout_canvas.addWidget(self.canvas)
self.ui.verticalLayout_canvas.addWidget(self.figToolbar)
self.gs = gridspec.GridSpec(2, 1, height_ratios=[1, 1])
self.fig.subplots_adjust(top=0.98, bottom=0.05, right=0.98, left=0.1, hspace=0, wspace=0)
self.ax0 = self.fig.add_subplot(self.gs[0])
self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER)
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
self.ax1 = self.fig.add_subplot(self.gs[1], sharex=self.ax0)
self.ax1.grid(True)
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER)
self.__resetAllButton__()
self.ui.doubleSpinBox_bandPassLow.setValue(Config["Filter"]["BandPassLow"])
self.ui.doubleSpinBox_bandPassHigh.setValue(Config["Filter"]["BandPassHigh"])
self.ui.spinBox_peaksValue.setValue(Config["PeaksValue"])
self.ui.pushButton_input.clicked.connect(self.__slot_btn_input__)
self.ui.pushButton_input_setting.clicked.connect(self.setting.show)
self.ui.pushButton_view.clicked.connect(self.__slot_btn_view__)
self.ui.pushButton_save.clicked.connect(self.__slot_btn_save__)
self.ui.doubleSpinBox_bandPassLow.editingFinished.connect(self.__update_config__)
self.ui.doubleSpinBox_bandPassHigh.editingFinished.connect(self.__update_config__)
self.ui.spinBox_peaksValue.editingFinished.connect(self.__update_config__)
self.ui.comboBox_method.currentTextChanged.connect(self.__update_config__)
@overrides
def closeEvent(self, event):
self.__disableAllButton__()
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.SHUTTING_DOWN))
QApplication.processEvents()
# 清空画框
if self.line_data and self.point_peak:
del self.line_data
del self.point_peak
del self.line_interval
self.canvas.draw()
# 释放资源
del self.data
self.fig.clf()
plt.close(self.fig)
self.deleteLater()
collect()
self.canvas = None
event.accept()
@staticmethod
def __reset__():
ButtonState["Current"].update(ButtonState["Default"].copy())
ButtonState["Current"]["pushButton_view"] = True
def __plot__(self):
# 清空画框
if self.line_data and self.point_peak and self.line_interval and self.point_RRIV:
try:
self.line_data.remove()
self.point_peak.remove()
self.line_interval.remove()
self.point_RRIV.remove()
except ValueError:
pass
sender = self.sender()
if sender == self.ui.pushButton_view:
self.point_RRIV, = self.ax0.plot(self.data.peak[2:], self.data.RRIV,
'r.',
label=Constants.DETECT_RPEAK_PLOT_LABEL_RRIV)
self.line_data, = self.ax1.plot(self.data.processed_data,
color=Constants.PLOT_COLOR_BLUE,
label=Constants.DETECT_RPEAK_PLOT_LABEL_ECG)
self.point_peak, = self.ax1.plot(self.data.peak, self.data.processed_data[self.data.peak],
'r*',
label=Constants.DETECT_RPEAK_PLOT_LABEL_R_PEAKS)
self.line_interval, = self.ax1.plot(self.data.interval,
color=Constants.PLOT_COLOR_GREEN,
label=Constants.DETECT_RPEAK_PLOT_LABEL_INTERVAL)
self.ax0.legend(loc=Constants.PLOT_UPPER_RIGHT)
self.ax1.legend(loc=Constants.PLOT_UPPER_RIGHT)
status = True
info = Constants.DRAWING_FINISHED
else:
status = False
info = Constants.DRAWING_FAILURE
self.canvas.draw()
return status, info
def __disableAllButton__(self):
# 禁用所有按钮
all_widgets = self.centralWidget().findChildren(QWidget)
# 迭代所有部件,查找按钮并禁用它们
for widget in all_widgets:
if isinstance(widget, QPushButton):
if widget.objectName() in ButtonState["Current"].keys():
widget.setEnabled(False)
def __enableAllButton__(self):
# 启用按钮
all_widgets = self.centralWidget().findChildren(QWidget)
# 迭代所有部件,查找按钮并启用它们
for widget in all_widgets:
if isinstance(widget, QPushButton):
if widget.objectName() in ButtonState["Current"].keys():
widget.setEnabled(ButtonState["Current"][widget.objectName()])
def __resetAllButton__(self):
# 启用按钮
all_widgets = self.centralWidget().findChildren(QWidget)
# 迭代所有部件,查找按钮并启用它们
for widget in all_widgets:
if isinstance(widget, QPushButton):
if widget.objectName() in ButtonState["Default"].keys():
widget.setEnabled(ButtonState["Default"][widget.objectName()])
def __update_config__(self):
Config["Filter"]["BandPassLow"] = self.ui.doubleSpinBox_bandPassLow.value()
Config["Filter"]["BandPassHigh"] = self.ui.doubleSpinBox_bandPassHigh.value()
Config["PeaksValue"] = self.ui.spinBox_peaksValue.value()
Config["DetectMethod"] = self.ui.comboBox_method.currentText()
def finish_operation(self):
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.OPERATION_FINISHED))
self.progressbar.setValue(100)
QApplication.processEvents()
self.__enableAllButton__()
def add_progressbar(self):
self.progressbar = QProgressBar()
self.progressbar.setRange(0, 100)
self.progressbar.setValue(0)
self.progressbar.setStyleSheet(Constants.PROGRESSBAR_STYLE)
self.ui.statusbar.addPermanentWidget(self.progressbar)
def statusbar_show_msg(self, msg):
self.ui.statusbar.showMessage(msg)
def statusbar_clear_msg(self):
self.ui.statusbar.clearMessage()
def __slot_btn_input__(self):
self.__disableAllButton__()
# 清空画框
if self.line_data and self.point_peak and self.line_interval:
try:
self.line_data.remove()
self.point_peak.remove()
self.line_interval.remove()
except ValueError:
pass
self.canvas.draw()
# 清空方法列表
self.ui.comboBox_method.clear()
self.statusbar_show_msg(PublicFunc.format_status_msg("(1/2)" + Constants.DETECT_RPEAK_LOADING_METHOD))
self.progressbar.setValue(0)
QApplication.processEvents()
# 寻找方法
method_list = get_method()
if len(method_list) == 0 or method_list is None:
status = False
info = Constants.DETECT_RPEAK_LOAD_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Method_Not_Exist"]
else:
status = True
info = Constants.DETECT_RPEAK_LOAD_FINISHED
if not status:
PublicFunc.text_output(self.ui, "(1/2)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, "(1/2)" + info, Constants.TIPS_TYPE_INFO)
self.update_ui_comboBox_method(method_list)
self.statusbar_show_msg(PublicFunc.format_status_msg("(2/2)" + Constants.INPUTTING_DATA))
self.progressbar.setValue(10)
QApplication.processEvents()
# 导入数据
self.data = Data()
status, info = self.data.open_file()
if not status:
PublicFunc.text_output(self.ui, "(2/2)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, "(2/2)" + info, Constants.TIPS_TYPE_INFO)
MainWindow_detect_Rpeak.__reset__()
self.finish_operation()
def __slot_btn_view__(self):
self.__disableAllButton__()
self.statusbar_show_msg(PublicFunc.format_status_msg("(1/3)" + Constants.DETECT_RPEAK_PROCESSING_DATA))
self.progressbar.setValue(0)
QApplication.processEvents()
# 数据预处理
status, info = self.data.preprocess()
if not status:
PublicFunc.text_output(self.ui, "(1/3)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, "(1/3)" + info, Constants.TIPS_TYPE_INFO)
self.statusbar_show_msg(PublicFunc.format_status_msg("(2/3)" + Constants.DETECT_RPEAK_PREDICTING_PEAK))
self.progressbar.setValue(10)
QApplication.processEvents()
# 预测峰值
status, info = self.data.predict_Rpeak()
if not status:
PublicFunc.text_output(self.ui, "(2/3)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, "(2/3)" + info, Constants.TIPS_TYPE_INFO)
PublicFunc.text_output(self.ui, Constants.DETECT_RPEAK_DATA_LENGTH_POINTS + str(len(self.data.raw_data)),
Constants.TIPS_TYPE_INFO)
PublicFunc.text_output(self.ui, Constants.DETECT_RPEAK_DURATION_MIN +
str((len(self.data.raw_data) / Config["InputConfig"]["Freq"] / 60)),
Constants.TIPS_TYPE_INFO)
PublicFunc.text_output(self.ui, Constants.DETECT_RPEAK_PEAK_AMOUNT + str(len(self.data.peak)),
Constants.TIPS_TYPE_INFO)
self.statusbar_show_msg(PublicFunc.format_status_msg("(3/3)" + Constants.DRAWING_DATA))
self.progressbar.setValue(70)
QApplication.processEvents()
# 绘图
status, info = self.__plot__()
if not status:
PublicFunc.text_output(self.ui, "(3/3)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, "(3/3)" + info, Constants.TIPS_TYPE_INFO)
ButtonState["Current"]["pushButton_save"] = True
self.finish_operation()
def __slot_btn_save__(self):
reply = QMessageBox.question(self, Constants.QUESTION_TITLE,
Constants.QUESTION_CONTENT + Config["Path"]["Save"],
QMessageBox.Yes | QMessageBox.No,
QMessageBox.Yes)
if reply == QMessageBox.Yes:
self.__disableAllButton__()
self.statusbar_show_msg(PublicFunc.format_status_msg("(1/1)" + Constants.SAVING_DATA))
self.progressbar.setValue(0)
QApplication.processEvents()
# 保存
# status, info = self.data.save()
total_rows = len(DataFrame(self.data.peak.reshape(-1)))
chunk_size = ConfigParams.DETECT_RPEAK_SAVE_CHUNK_SIZE
with open(Config["Path"]["Save"], 'w') as f:
for start in range(0, total_rows, chunk_size):
end = min(start + chunk_size, total_rows)
chunk = DataFrame(self.data.peak.reshape(-1)).iloc[start:end]
status, info = self.data.save(chunk)
progress = int((end / total_rows) * 100)
self.progressbar.setValue(progress)
QApplication.processEvents()
if not status:
PublicFunc.text_output(self.ui, "(1/1)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, "(1/1)" + info, Constants.TIPS_TYPE_INFO)
PublicFunc.msgbox_output(self, info, Constants.TIPS_TYPE_INFO)
self.finish_operation()
def update_ui_comboBox_method(self, method_list):
self.ui.comboBox_method.clear()
self.ui.comboBox_method.addItems(method_list)
class Data:
def __init__(self):
self.file_path_input = Config["Path"]["Input"]
self.file_path_save = Config["Path"]["Save"]
self.raw_data = None
self.processed_data = None
self.peak = None
self.interval = None
self.RRIV = None
def open_file(self):
if not Path(Config["Path"]["Input"]).exists():
return False, Constants.INPUT_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Data_Path_Not_Exist"]
try:
self.raw_data = read_csv(self.file_path_input,
encoding=ConfigParams.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
except Exception:
return False, Constants.INPUT_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Read_Data_Exception"]
return True, Constants.INPUT_FINISHED
def preprocess(self):
if self.raw_data is None:
return False, Constants.DETECT_RPEAK_PROCESS_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Raw_Data_Not_Exist"]
try:
self.processed_data = preprocess(self.raw_data,
Config["InputConfig"]["Freq"],
Config["Filter"]["BandPassLow"],
Config["Filter"]["BandPassHigh"])
except Exception:
return False, Constants.DETECT_RPEAK_PROCESS_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Filter_Exception"]
return True, Constants.DETECT_RPEAK_PROCESS_FINISHED
def predict_Rpeak(self):
if self.processed_data is None:
return False, Constants.DETECT_RPEAK_PREDICT_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Processed_Data_Not_Exist"]
try:
self.peak, self.interval, self.RRIV = Rpeak_Detection(self.processed_data,
Config["InputConfig"]["Freq"],
Config["PeaksValue"],
Config["DetectMethod"])
except Exception:
return False, Constants.DETECT_RPEAK_PREDICT_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Predict_Exception"]
return True, Constants.DETECT_RPEAK_PREDICT_FINISHED
def save(self, chunk):
if self.peak is None:
return False, Constants.SAVING_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Peak_Not_Exist"]
try:
# DataFrame(self.processed_data.reshape(-1)).to_csv(self.file_path_save,
# index=False,
# header=False,
# float_format='%.4f')
chunk.to_csv(self.file_path_save, mode='a', index=False, header=False)
except Exception:
return False, Constants.SAVING_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Save_Exception"]
return True, Constants.SAVING_FINISHED

View File

@ -9,6 +9,7 @@ from ui.MainWindow.MainWindow_menu import Ui_Signal_Label
from func.Module_preprocess import MainWindow_preprocess from func.Module_preprocess import MainWindow_preprocess
from func.Module_detect_Jpeak import MainWindow_detect_Jpeak from func.Module_detect_Jpeak import MainWindow_detect_Jpeak
from func.Module_detect_Rpeak import MainWindow_detect_Rpeak
from func.utils.Constants import Constants, ConfigParams from func.utils.Constants import Constants, ConfigParams
@ -44,6 +45,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.ui.pushButton_preprocess_BCG.clicked.connect(self.__slot_btn_preprocess__) self.ui.pushButton_preprocess_BCG.clicked.connect(self.__slot_btn_preprocess__)
self.ui.pushButton_preprocess_ECG.clicked.connect(self.__slot_btn_preprocess__) self.ui.pushButton_preprocess_ECG.clicked.connect(self.__slot_btn_preprocess__)
self.ui.pushButton_detect_Jpeak.clicked.connect(self.__slot_btn_detect_Jpeak__) self.ui.pushButton_detect_Jpeak.clicked.connect(self.__slot_btn_detect_Jpeak__)
self.ui.pushButton_detect_Rpeak.clicked.connect(self.__slot_btn_detect_Rpeak__)
@staticmethod @staticmethod
def __read_config__(): def __read_config__():
@ -98,6 +100,13 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
sampID = int(self.ui.comboBox_sampID.currentText()) sampID = int(self.ui.comboBox_sampID.currentText())
self.detect_Jpeak.show(root_path, sampID) self.detect_Jpeak.show(root_path, sampID)
def __slot_btn_detect_Rpeak__(self):
self.detect_Rpeak = MainWindow_detect_Rpeak()
root_path = self.ui.plainTextEdit_root_path.toPlainText()
sampID = int(self.ui.comboBox_sampID.currentText())
self.detect_Rpeak.show(root_path, sampID)
def seek_sampID(self, path): def seek_sampID(self, path):
if not Path(path).exists(): if not Path(path).exists():

View File

@ -322,109 +322,6 @@ class MainWindow_preprocess(QMainWindow):
if widget.objectName() in ButtonState["Default"].keys(): if widget.objectName() in ButtonState["Default"].keys():
widget.setEnabled(ButtonState["Default"][widget.objectName()]) widget.setEnabled(ButtonState["Default"][widget.objectName()])
def __slot_btn_input__(self):
self.__disableAllButton__()
# 清空画框
if self.line_raw_data and self.line_processed_data:
try:
self.line_raw_data.remove()
self.line_processed_data.remove()
except ValueError:
pass
self.canvas.draw()
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.INPUTTING_DATA))
self.progressbar.setValue(0)
QApplication.processEvents()
# 导入数据
self.data = Data()
status, info = self.data.open_file()
if not status:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
MainWindow_preprocess.__reset__()
self.finish_operation()
def __slot_btn_view__(self):
self.__disableAllButton__()
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.PREPROCESS_PROCESSING_DATA))
self.progressbar.setValue(0)
QApplication.processEvents()
# 数据预处理
status, info = self.data.preprocess()
if not status:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.DRAWING_DATA))
self.progressbar.setValue(50)
QApplication.processEvents()
# 绘图
status, info = self.__plot__()
if not status:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
ButtonState["Current"]["pushButton_save"] = True
self.finish_operation()
def __slot_btn_save__(self):
reply = QMessageBox.question(self, Constants.QUESTION_TITLE,
Constants.QUESTION_CONTENT + Config["Path"]["Save"],
QMessageBox.Yes | QMessageBox.No,
QMessageBox.Yes)
if reply == QMessageBox.Yes:
self.__disableAllButton__()
self.statusbar_show_msg(PublicFunc.format_status_msg(Constants.SAVING_DATA))
self.progressbar.setValue(0)
QApplication.processEvents()
# 保存
# status, info = self.data.save()
total_rows = len(DataFrame(self.data.processed_data.reshape(-1)))
chunk_size = ConfigParams.PREPROCESS_SAVE_CHUNK_SIZE
with open(Config["Path"]["Save"], 'w') as f:
for start in range(0, total_rows, chunk_size):
end = min(start + chunk_size, total_rows)
chunk = DataFrame(self.data.processed_data.reshape(-1)).iloc[start:end]
status, info = self.data.save(chunk)
progress = int((end / total_rows) * 100)
self.progressbar.setValue(progress)
QApplication.processEvents()
if not status:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
PublicFunc.msgbox_output(self, info, Constants.TIPS_TYPE_INFO)
self.finish_operation()
def __update_config__(self): def __update_config__(self):
if self.mode == "BCG": if self.mode == "BCG":
@ -450,15 +347,118 @@ class MainWindow_preprocess(QMainWindow):
self.progressbar.setRange(0, 100) self.progressbar.setRange(0, 100)
self.progressbar.setValue(0) self.progressbar.setValue(0)
self.progressbar.setStyleSheet(Constants.PROGRESSBAR_STYLE) self.progressbar.setStyleSheet(Constants.PROGRESSBAR_STYLE)
self.ui.statusBar.addPermanentWidget(self.progressbar) self.ui.statusbar.addPermanentWidget(self.progressbar)
def statusbar_show_msg(self, msg): def statusbar_show_msg(self, msg):
self.ui.statusBar.showMessage(msg) self.ui.statusbar.showMessage(msg)
def statusbar_clear_msg(self): def statusbar_clear_msg(self):
self.ui.statusBar.clearMessage() self.ui.statusbar.clearMessage()
def __slot_btn_input__(self):
self.__disableAllButton__()
# 清空画框
if self.line_raw_data and self.line_processed_data:
try:
self.line_raw_data.remove()
self.line_processed_data.remove()
except ValueError:
pass
self.canvas.draw()
self.statusbar_show_msg(PublicFunc.format_status_msg("(1/1)" + Constants.INPUTTING_DATA))
self.progressbar.setValue(0)
QApplication.processEvents()
# 导入数据
self.data = Data()
status, info = self.data.open_file()
if not status:
PublicFunc.text_output(self.ui, "(1/1)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, "(1/1)" + info, Constants.TIPS_TYPE_INFO)
MainWindow_preprocess.__reset__()
self.finish_operation()
def __slot_btn_view__(self):
self.__disableAllButton__()
self.statusbar_show_msg(PublicFunc.format_status_msg("(1/2)" + Constants.PREPROCESS_PROCESSING_DATA))
self.progressbar.setValue(0)
QApplication.processEvents()
# 数据预处理
status, info = self.data.preprocess()
if not status:
PublicFunc.text_output(self.ui, "(1/2)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, "(1/2)" + info, Constants.TIPS_TYPE_INFO)
self.statusbar_show_msg(PublicFunc.format_status_msg("(2/2)" + Constants.DRAWING_DATA))
self.progressbar.setValue(50)
QApplication.processEvents()
# 绘图
status, info = self.__plot__()
if not status:
PublicFunc.text_output(self.ui, "(2/2)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, "(2/2)" + info, Constants.TIPS_TYPE_INFO)
ButtonState["Current"]["pushButton_save"] = True
self.finish_operation()
def __slot_btn_save__(self):
reply = QMessageBox.question(self, Constants.QUESTION_TITLE,
Constants.QUESTION_CONTENT + Config["Path"]["Save"],
QMessageBox.Yes | QMessageBox.No,
QMessageBox.Yes)
if reply == QMessageBox.Yes:
self.__disableAllButton__()
self.statusbar_show_msg(PublicFunc.format_status_msg("(1/1)" + Constants.SAVING_DATA))
self.progressbar.setValue(0)
QApplication.processEvents()
# 保存
# status, info = self.data.save()
total_rows = len(DataFrame(self.data.processed_data.reshape(-1)))
chunk_size = ConfigParams.PREPROCESS_SAVE_CHUNK_SIZE
with open(Config["Path"]["Save"], 'w') as f:
for start in range(0, total_rows, chunk_size):
end = min(start + chunk_size, total_rows)
chunk = DataFrame(self.data.processed_data.reshape(-1)).iloc[start:end]
status, info = self.data.save(chunk)
progress = int((end / total_rows) * 100)
self.progressbar.setValue(progress)
QApplication.processEvents()
if not status:
PublicFunc.text_output(self.ui, "(1/1)" + info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
self.finish_operation()
return
else:
PublicFunc.text_output(self.ui, "(1/1)" + info, Constants.TIPS_TYPE_INFO)
PublicFunc.msgbox_output(self, info, Constants.TIPS_TYPE_INFO)
self.finish_operation()
class Data: class Data:

View File

@ -18,6 +18,8 @@ class ConfigParams:
} }
} }
UTF8_ENCODING: str = "utf-8" UTF8_ENCODING: str = "utf-8"
# 目前用到这个编码的地方:
# <BCG的质量评估打标>里的保存和读取csv文件的地方注意的是读取原始数据时依然使用UTF-8
GBK_ENCODING: str = "gbk" GBK_ENCODING: str = "gbk"
ENDSWITH_TXT: str = ".txt" ENDSWITH_TXT: str = ".txt"
ENDSWITH_CSV: str = ".csv" ENDSWITH_CSV: str = ".csv"
@ -71,28 +73,41 @@ class ConfigParams:
DETECT_JPEAK_SAVE_FILENAME: str = "JPeak_revise" DETECT_JPEAK_SAVE_FILENAME: str = "JPeak_revise"
DETECT_JPEAK_SAVE_CHUNK_SIZE: int = 100 DETECT_JPEAK_SAVE_CHUNK_SIZE: int = 100
# ECG的R峰算法定位
DETECT_RPEAK_CONFIG_FILE_PATH: str = "./config/Config_detect_Rpeak.yaml"
DETECT_RPEAK_CONFIG_NEW_CONTENT = {
"InputConfig": {
"Freq": 1000
},
"Filter": {
"BandPassLow": 2,
"BandPassHigh": 15
},
"PeaksValue": 200,
"DetectMethod": ""
}
DETECT_RPEAK_INPUT_ECG_FILENAME: str = "ECG_filter_"
DETECT_RPEAK_SAVE_FILENAME: str = "final_Rpeak"
DETECT_RPEAK_SAVE_CHUNK_SIZE: int = 100
# 人工纠正
# 体动标注
# TODO弃用 # TODO弃用
# 通用 # 通用
# 目前用到这个编码的地方: # 目前用到这个编码的地方:
# <BCG的质量评估打标>里的保存和读取csv文件的地方注意的是读取原始数据时依然使用UTF-8 # <BCG的质量评估打标>里的保存和读取csv文件的地方注意的是读取原始数据时依然使用UTF-8
VALIDATOR_INTEGER = QIntValidator(-2**31, 2**31 - 1) VALIDATOR_INTEGER = QIntValidator(-2**31, 2**31 - 1)
VALIDATOR_DOUBLE = QDoubleValidator(-1e100, 1e100, 10) VALIDATOR_DOUBLE = QDoubleValidator(-1e100, 1e100, 10)
FONT: str = "Microsoft YaHei UI" FONT: str = "Microsoft YaHei UI"
# 菜单界面 # 菜单界面
MATPLOTLIB_PLOT_PRECISION_PARAM: int = 10000 MATPLOTLIB_PLOT_PRECISION_PARAM: int = 10000
# 数据粗同步 # 数据粗同步
APPROXIMATELY_ALIGN_INPUT_ORGBCG_FILENAME: str = "orgBcg_Raw_" APPROXIMATELY_ALIGN_INPUT_ORGBCG_FILENAME: str = "orgBcg_Raw_"
APPROXIMATELY_ALIGN_INPUT_PSG_FILENAME: str = "A" APPROXIMATELY_ALIGN_INPUT_PSG_FILENAME: str = "A"
@ -108,67 +123,6 @@ class ConfigParams:
APPROXIMATELY_ALIGN_BUTTERHIGHPASSFREQ_DEFAULT: float = 0.70 APPROXIMATELY_ALIGN_BUTTERHIGHPASSFREQ_DEFAULT: float = 0.70
APPROXIMATELY_ALIGN_APPLYFREQ_DEFAULT: float = 5 APPROXIMATELY_ALIGN_APPLYFREQ_DEFAULT: float = 5
# 预处理
# PREPROCESS_INPUT_BCG_FILENAME: str = "orgBcg_Raw_"
# PREPROCESS_INPUT_ECG_FILENAME: str = "ECG I_"
# PREPROCESS_SAVE_BCG_FILENAME: str = "DSbcg_sig_"
# PREPROCESS_SAVE_ECG_FILENAME: str = "ECG_filter_"
# PREPROCESS_INPUT_BCG_DEFAULT_FS: int = 1000
# PREPROCESS_INPUT_BCG_SAVE_DEFAULT_FS: int = 1000
# PREPROCESS_INPUT_ECG_DEFAULT_FS: int = 1000
# PREPROCESS_INPUT_ECG_SAVE_DEFAULT_FS: int = 1000
#
# PREPROCESS_BANDPASS_LOW_DEFAULT: int = 2
# PREPROCESS_BANDPASS_HIGH_DEFAULT: int = 10
# PREPROCESS_FILTER_ORDER_DEFAULT: int = 4
#
# PREPROCESS_FILTER_BCG: str = "bandpass"
# PREPROCESS_FILTER_ECG: str = "bandpass"
# ECG的R峰算法定位
DETECT_R_PEAK_INPUT_ECG_FILENAME: str = "ECG_filter_"
DETECT_R_PEAK_SAVE_RPEAK_FILENAME: str = "final_Rpeak"
DETECT_R_PEAK_INPUT_ECG_DEFAULT_FS: int = 1000
DETECT_R_PEAK_PEAKS_VALUE_DEFAULT: int = 200
DETECT_R_PEAK_BANDPASS_LOW_DEFAULT: int = 2
DETECT_R_PEAK_BANDPASS_HIGH_DEFAULT: int = 15
DETECT_R_PEAK_DETECT_METHOD_PT: str = "pt"
DETECT_R_PEAK_DETECT_METHOD_TA: str = "ta"
DETECT_R_PEAK_DETECT_METHOD_WT: str = "Wt"
DETECT_R_PEAK_DETECT_METHOD_HAMILTON: str = "Hamilton"
DETECT_R_PEAK_DETECT_METHOD_ENGZEE: str = "Engzee"
# BCG的J峰算法定位
DETECT_J_PEAK_INPUT_BCG_FILENAME: str = "DSbcg_sig_"
DETECT_J_PEAK_SAVE_JPEAK_FILENAME: str = "JPeak_revise"
DETECT_J_PEAK_INPUT_BCG_DEFAULT_FS: int = 1000
DETECT_J_PEAK_BANDPASS_LOW_DEFAULT: int = 2
DETECT_J_PEAK_BANDPASS_HIGH_DEFAULT: int = 10
DETECT_J_PEAK_PEAKS_VALUE_DEFAULT: int = 100
DETECT_J_PEAK_AMP_VALUE_DEFAULT: int = 5
DETECT_J_PEAK_INTERVAL_LOW_DEFAULT: int = 50
DETECT_J_PEAK_INTERVAL_HIGH_DEFAULT: int = 140
DETECT_J_PEAK_UNET_MODEL1_PKL_PATH: str = "./func/result/Fivelayer_Unet/1.pkl"
DETECT_J_PEAK_UNET_MODEL2_PKL_PATH: str = "./func/result/Fivelayer_Unet/2.pkl"
DETECT_J_PEAK_LSTMUNET_MODEL1_PKL_PATH: str = "./func/result/Fivelayer_Lstm_Unet/1.pkl"
DETECT_J_PEAK_LSTMUNET_MODEL2_PKL_PATH: str = "./func/result/Fivelayer_Lstm_Unet/2.pkl"
DETECT_J_PEAK_UNET_MODEL1_NAME: str = "Fivelayer_Unet_1"
DETECT_J_PEAK_UNET_MODEL2_NAME: str = "Fivelayer_Unet_2"
DETECT_J_PEAK_LSTMUNET_MODEL1_NAME: str = "Fivelayer_Lstm_Unet_1"
DETECT_J_PEAK_LSTMUNET_MODEL2_NAME: str = "Fivelayer_Lstm_Unet_2"
# 人工纠正 # 人工纠正
LABEL_CHECK_INPUT_BCG_FILENAME: str = "DSbcg_sig_" LABEL_CHECK_INPUT_BCG_FILENAME: str = "DSbcg_sig_"
LABEL_CHECK_INPUT_JPEAK_FILENAME: str = "JPeak_revise" LABEL_CHECK_INPUT_JPEAK_FILENAME: str = "JPeak_revise"

View File

@ -15,10 +15,6 @@ class Constants:
INPUT_FINISHED: str = "导入完成" INPUT_FINISHED: str = "导入完成"
INPUT_FAILURE: str = "导入失败" INPUT_FAILURE: str = "导入失败"
LOADING_MODEL: str = "正在读取模型"
LOAD_FINISHED: str = "读取完成"
LOAD_FAILURE: str = "读取失败"
DRAWING_DATA: str = "正在绘制图形" DRAWING_DATA: str = "正在绘制图形"
DRAWING_FINISHED: str = "绘制完成" DRAWING_FINISHED: str = "绘制完成"
DRAWING_FAILURE: str = "绘制失败" DRAWING_FAILURE: str = "绘制失败"
@ -31,7 +27,7 @@ class Constants:
OPERATION_FAILURE: str = "操作失败" OPERATION_FAILURE: str = "操作失败"
UNKNOWN_ERROR: str = "未知错误" UNKNOWN_ERROR: str = "未知错误"
SHUTTING_DOWN: str = "正在关闭窗口" SHUTTING_DOWN: str = "正在释放内存资源"
QUESTION_TITLE: str = "警告:确认操作" QUESTION_TITLE: str = "警告:确认操作"
QUESTION_CONTENT: str = "你确定要保存结果到" QUESTION_CONTENT: str = "你确定要保存结果到"
@ -89,6 +85,10 @@ class Constants:
PREPROCESS_OUTPUT_INPUT_AMP_OFFSET: int = 1850 PREPROCESS_OUTPUT_INPUT_AMP_OFFSET: int = 1850
# BCG的J峰算法定位 # BCG的J峰算法定位
DETECT_JPEAK_LOADING_MODEL: str = "正在读取模型"
DETECT_JPEAK_LOAD_FINISHED: str = "读取完成"
DETECT_JPEAK_LOAD_FAILURE: str = "读取失败"
DETECT_JPEAK_PROCESSING_DATA: str = "正在处理数据" DETECT_JPEAK_PROCESSING_DATA: str = "正在处理数据"
DETECT_JPEAK_PROCESS_FINISHED: str = "处理完成" DETECT_JPEAK_PROCESS_FINISHED: str = "处理完成"
DETECT_JPEAK_PROCESS_FAILURE: str = "处理失败" DETECT_JPEAK_PROCESS_FAILURE: str = "处理失败"
@ -103,7 +103,7 @@ class Constants:
"Model_Path_Not_Exist": "(模型路径不存在)", "Model_Path_Not_Exist": "(模型路径不存在)",
"Model_File_Not_Exist": "(模型文件不存在)", "Model_File_Not_Exist": "(模型文件不存在)",
"Read_Model_Exception": "(读取模型异常)", "Read_Model_Exception": "(读取模型异常)",
"Predict_Exception": "模型预测异常)", "Predict_Exception": "峰值预测异常)",
"Raw_Data_Not_Exist": "(原始数据不存在)", "Raw_Data_Not_Exist": "(原始数据不存在)",
"Filter_Exception": "(滤波器异常)", "Filter_Exception": "(滤波器异常)",
"Processed_Data_Not_Exist": "(处理后数据不存在)", "Processed_Data_Not_Exist": "(处理后数据不存在)",
@ -111,12 +111,50 @@ class Constants:
"Save_Exception": "(保存异常)" "Save_Exception": "(保存异常)"
} }
DETECT_J_PEAK_DATA_LENGTH_POINTS: str = "数据长度(点数):" DETECT_JPEAK_DATA_LENGTH_POINTS: str = "数据长度(点数):"
DETECT_J_PEAK_DURATION_MIN: str = "数据时长(分钟):" DETECT_JPEAK_DURATION_MIN: str = "数据时长(分钟):"
DETECT_J_PEAK_JPEAK_AMOUNT: str = "J峰个数" DETECT_JPEAK_PEAK_AMOUNT: str = "J峰个数"
DETECT_J_PEAK_PLOT_LABEL_BCG: str = "BCG_Processed" DETECT_JPEAK_PLOT_LABEL_BCG: str = "BCG_Processed"
DETECT_J_PEAK_PLOT_LABEL_J_PEAKS: str = "J_Peaks" DETECT_JPEAK_PLOT_LABEL_J_PEAKS: str = "J_Peaks"
DETECT_J_PEAK_PLOT_LABEL_INTERVAL: str = "Interval" DETECT_JPEAK_PLOT_LABEL_INTERVAL: str = "Interval"
# ECG的R峰算法定位
DETECT_RPEAK_LOADING_METHOD: str = "正在读取方法"
DETECT_RPEAK_LOAD_FINISHED: str = "读取完成"
DETECT_RPEAK_LOAD_FAILURE: str = "读取失败"
DETECT_RPEAK_PROCESSING_DATA: str = "正在处理数据"
DETECT_RPEAK_PROCESS_FINISHED: str = "处理完成"
DETECT_RPEAK_PROCESS_FAILURE: str = "处理失败"
DETECT_RPEAK_PREDICTING_PEAK: str = "正在预测峰值"
DETECT_RPEAK_PREDICT_FINISHED: str = "预测完成"
DETECT_RPEAK_PREDICT_FAILURE: str = "预测失败"
DETECT_RPEAK_FAILURE_REASON = {
"Data_Path_Not_Exist": "(数据路径不存在)",
"Read_Data_Exception": "(读取数据异常)",
"Method_Not_Exist": "(检测方法不存在)",
"Read_Method_Exception": "(读取方法异常)",
"Predict_Exception": "(峰值预测异常)",
"Raw_Data_Not_Exist": "(原始数据不存在)",
"Filter_Exception": "(滤波器异常)",
"Processed_Data_Not_Exist": "(处理后数据不存在)",
"Peak_Not_Exist": "(预测的峰值不存在)",
"Save_Exception": "(保存异常)"
}
DETECT_RPEAK_DATA_LENGTH_POINTS: str = "数据长度(点数):"
DETECT_RPEAK_DURATION_MIN: str = "数据时长(分钟):"
DETECT_RPEAK_PEAK_AMOUNT: str = "R峰个数"
DETECT_RPEAK_PLOT_LABEL_RRIV: str = "RRIV"
DETECT_RPEAK_PLOT_LABEL_ECG: str = "ECG"
DETECT_RPEAK_PLOT_LABEL_R_PEAKS: str = "R_Peaks"
DETECT_RPEAK_PLOT_LABEL_INTERVAL: str = "Interval"
# 人工纠正
# 体动标注
# TODO弃用 # TODO弃用
@ -124,7 +162,6 @@ class Constants:
FOLDER_DIR_NOT_EXIST_THEN_CREATE: str = "检测到保存路径所指向的文件夹不存在,已创建相应文件夹" FOLDER_DIR_NOT_EXIST_THEN_CREATE: str = "检测到保存路径所指向的文件夹不存在,已创建相应文件夹"
# 菜单界面 # 菜单界面
MAINWINDOW_ROOT_PATH_NOT_EXIST: str = "根目录路径输入错误" MAINWINDOW_ROOT_PATH_NOT_EXIST: str = "根目录路径输入错误"
MAINWINDOW_MSGBOX_TITLE: str = "消息" MAINWINDOW_MSGBOX_TITLE: str = "消息"
@ -132,7 +169,6 @@ class Constants:
MAINWINDOW_BACK_TO_MENU: str = "返回主菜单" MAINWINDOW_BACK_TO_MENU: str = "返回主菜单"
MAINWINDOW_QUESTION_BACK_TO_MENU: str = "确定要返回主菜单吗" MAINWINDOW_QUESTION_BACK_TO_MENU: str = "确定要返回主菜单吗"
# 数据粗同步 # 数据粗同步
APPROXIMATELY_ALIGN_FILES_NOT_FOUND: str = f"无法找到{ConfigParams.APPROXIMATELY_ALIGN_INPUT_ORGBCG_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.APPROXIMATELY_ALIGN_INPUT_PSG_FILENAME}{ConfigParams.ENDSWITH_EDF},无法执行<数据粗同步>" APPROXIMATELY_ALIGN_FILES_NOT_FOUND: str = f"无法找到{ConfigParams.APPROXIMATELY_ALIGN_INPUT_ORGBCG_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.APPROXIMATELY_ALIGN_INPUT_PSG_FILENAME}{ConfigParams.ENDSWITH_EDF},无法执行<数据粗同步>"
APPROXIMATELY_ALIGN_FILES_FOUND: str = f"找到{ConfigParams.APPROXIMATELY_ALIGN_INPUT_ORGBCG_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.APPROXIMATELY_ALIGN_INPUT_PSG_FILENAME}{ConfigParams.ENDSWITH_EDF}" APPROXIMATELY_ALIGN_FILES_FOUND: str = f"找到{ConfigParams.APPROXIMATELY_ALIGN_INPUT_ORGBCG_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.APPROXIMATELY_ALIGN_INPUT_PSG_FILENAME}{ConfigParams.ENDSWITH_EDF}"
@ -140,21 +176,6 @@ class Constants:
APPROXIMATELY_ALIGN_RUNNING: str = "开始执行任务<数据粗同步>" APPROXIMATELY_ALIGN_RUNNING: str = "开始执行任务<数据粗同步>"
APPROXIMATELY_RECORD_NOT_FOUND: str = "没有保存记录" APPROXIMATELY_RECORD_NOT_FOUND: str = "没有保存记录"
# ECG的R峰算法定位
DETECT_R_PEAK_FILES_NOT_FOUND: str = f"无法找到{ConfigParams.DETECT_R_PEAK_INPUT_ECG_FILENAME}{ConfigParams.ENDSWITH_TXT},无法执行<R峰提取>"
DETECT_R_PEAK_FILES_FOUND: str = f"找到{ConfigParams.DETECT_R_PEAK_INPUT_ECG_FILENAME}{ConfigParams.ENDSWITH_TXT}"
DETECT_R_PEAK_RUNNING: str = "开始执行任务<ECG的R峰算法定位>"
DETECT_R_PEAK_PLOT_LABEL_RRIV: str = "RRIV"
DETECT_R_PEAK_PLOT_LABEL_ECG: str = "ECG"
DETECT_R_PEAK_PLOT_LABEL_R_PEAKS: str = "R_peaks"
DETECT_R_PEAK_PLOT_LABEL_INTERVAL: str = "Interval"
DETECT_R_PEAK_DATA_LENGTH_POINTS: str = "数据长度(点数):"
DETECT_R_PEAK_DURATION_MIN: str = "数据时长(分钟):"
DETECT_R_PEAK_RPEAK_AMOUNT: str = "R峰个数"
# 人工纠正 # 人工纠正
LABEL_CHECK_FILES_BCG_NOT_FOUND: str = f"无法找到{ConfigParams.LABEL_CHECK_INPUT_BCG_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.LABEL_CHECK_INPUT_JPEAK_FILENAME}{ConfigParams.ENDSWITH_TXT},无法执行<BCG的J峰人工纠正>" LABEL_CHECK_FILES_BCG_NOT_FOUND: str = f"无法找到{ConfigParams.LABEL_CHECK_INPUT_BCG_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.LABEL_CHECK_INPUT_JPEAK_FILENAME}{ConfigParams.ENDSWITH_TXT},无法执行<BCG的J峰人工纠正>"
LABEL_CHECK_FILES_BCG_FOUND: str = f"找到{ConfigParams.LABEL_CHECK_INPUT_BCG_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.LABEL_CHECK_INPUT_JPEAK_FILENAME}{ConfigParams.ENDSWITH_TXT}" LABEL_CHECK_FILES_BCG_FOUND: str = f"找到{ConfigParams.LABEL_CHECK_INPUT_BCG_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.LABEL_CHECK_INPUT_JPEAK_FILENAME}{ConfigParams.ENDSWITH_TXT}"

View File

@ -29,31 +29,38 @@ def find_TPeak(data,peaks,th=50):
return_peak.append(argmax(data[min_win:max_win])+min_win) return_peak.append(argmax(data[min_win:max_win])+min_win)
return array(return_peak) return array(return_peak)
def Rpeak_Detection(raw_ecg,fs,low_cut,high_cut,th1,detector_method): def preprocess(raw_ecg, fs, low_cut, high_cut):
detectors = Detectors(sampling_frequency=fs)
method_dic = {'pt': detectors.pan_tompkins_detector,
'ta': detectors.two_average_detector,
"Engzee": detectors.engzee_detector,
"Wt": detectors.swt_detector,
"Christov": detectors.christov_detector,
"Hamilton": detectors.hamilton_detector
}
detectormethods = method_dic[detector_method]
# raw_ecg = raw_ecg[200*sample_rate:]
preprocessing = BCG_Operation(sample_rate=fs) # 对ECG做了降采样处理 preprocessing = BCG_Operation(sample_rate=fs) # 对ECG做了降采样处理
raw_ecg = preprocessing.Butterworth(raw_ecg, "bandpass", low_cut=low_cut, high_cut=high_cut, order=3) * 4 raw_ecg = preprocessing.Butterworth(raw_ecg, "bandpass", low_cut=low_cut, high_cut=high_cut, order=3) * 4
#######################限制幅值处理############################################ return raw_ecg
# for i in range(len(raw_ecg)):
# if raw_ecg[i] > 300 or raw_ecg[i] < -300:
# raw_ecg[i] = 0
##############################################################################
R_peak = array(detectormethods(raw_ecg)) - 100 # 界面会通过这个函数获取方法列表此函数的返回值务必和Rpeak_Detection()中的方法名称对应否则程序或许直接崩溃
# R_peak = np.array(detectors.pan_tompkins_detector(raw_ecg))-100 def get_method():
return ["pt", "ta", "Engzee", "Wt", "Christov", "Hamilton"]
R_peak = find_TPeak(raw_ecg, R_peak, th=int(th1 * fs / 1000)) def Rpeak_Detection(ecg,fs,th1,detector_method):
R_peak = refinement(raw_ecg, R_peak) detectors = Detectors(sampling_frequency=fs)
if detector_method == "pt":
detectormethods = detectors.pan_tompkins_detector
elif detector_method == "ta":
detectormethods = detectors.two_average_detector
elif detector_method == "Engzee":
detectormethods = detectors.engzee_detector
elif detector_method == "Wt":
detectormethods = detectors.swt_detector
elif detector_method == "Christov":
detectormethods = detectors.christov_detector
elif detector_method == "Hamilton":
detectormethods = detectors.hamilton_detector
else:
raise Exception
R_peak = array(detectormethods(ecg)) - 100
R_peak = find_TPeak(ecg, R_peak, th=int(th1 * fs / 1000))
R_peak = refinement(ecg, R_peak)
RR_Interval = full(len(R_peak) - 1, nan) RR_Interval = full(len(R_peak) - 1, nan)
@ -64,7 +71,7 @@ def Rpeak_Detection(raw_ecg,fs,low_cut,high_cut,th1,detector_method):
for i in range(len(RR_Interval) - 1): for i in range(len(RR_Interval) - 1):
RRIV[i] = RR_Interval[i + 1] - RR_Interval[i] RRIV[i] = RR_Interval[i + 1] - RR_Interval[i]
Interval = full(len(raw_ecg), nan) Interval = full(len(ecg), nan)
for i in range(len(R_peak) - 1): for i in range(len(R_peak) - 1):
Interval[R_peak[i]: R_peak[i + 1]] = R_peak[i + 1] - R_peak[i] Interval[R_peak[i]: R_peak[i + 1]] = R_peak[i + 1] - R_peak[i]

View File

@ -0,0 +1,706 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'MainWindow_artifact_label.ui'
##
## Created by: Qt User Interface Compiler version 6.8.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QAbstractSpinBox, QApplication, QGridLayout, QGroupBox,
QHBoxLayout, QHeaderView, QLabel, QLineEdit,
QMainWindow, QPushButton, QRadioButton, QSizePolicy,
QSpacerItem, QSpinBox, QStatusBar, QTableWidget,
QTableWidgetItem, QVBoxLayout, QWidget)
class Ui_MainWindow_artifact_label(object):
def setupUi(self, MainWindow_artifact_label):
if not MainWindow_artifact_label.objectName():
MainWindow_artifact_label.setObjectName(u"MainWindow_artifact_label")
MainWindow_artifact_label.resize(1920, 1080)
self.centralwidget = QWidget(MainWindow_artifact_label)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.groupBox_canvas = QGroupBox(self.centralwidget)
self.groupBox_canvas.setObjectName(u"groupBox_canvas")
font = QFont()
font.setPointSize(10)
self.groupBox_canvas.setFont(font)
self.verticalLayout = QVBoxLayout(self.groupBox_canvas)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout_canvas = QVBoxLayout()
self.verticalLayout_canvas.setObjectName(u"verticalLayout_canvas")
self.verticalLayout.addLayout(self.verticalLayout_canvas)
self.gridLayout.addWidget(self.groupBox_canvas, 0, 1, 1, 1)
self.groupBox_left = QGroupBox(self.centralwidget)
self.groupBox_left.setObjectName(u"groupBox_left")
self.groupBox_left.setFont(font)
self.verticalLayout_2 = QVBoxLayout(self.groupBox_left)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.pushButton_input_setting = QPushButton(self.groupBox_left)
self.pushButton_input_setting.setObjectName(u"pushButton_input_setting")
sizePolicy = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_input_setting.sizePolicy().hasHeightForWidth())
self.pushButton_input_setting.setSizePolicy(sizePolicy)
font1 = QFont()
font1.setPointSize(12)
self.pushButton_input_setting.setFont(font1)
self.horizontalLayout.addWidget(self.pushButton_input_setting)
self.pushButton_input = QPushButton(self.groupBox_left)
self.pushButton_input.setObjectName(u"pushButton_input")
sizePolicy.setHeightForWidth(self.pushButton_input.sizePolicy().hasHeightForWidth())
self.pushButton_input.setSizePolicy(sizePolicy)
self.pushButton_input.setFont(font1)
self.horizontalLayout.addWidget(self.pushButton_input)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer)
self.groupBox = QGroupBox(self.groupBox_left)
self.groupBox.setObjectName(u"groupBox")
self.gridLayout_2 = QGridLayout(self.groupBox)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.label_3 = QLabel(self.groupBox)
self.label_3.setObjectName(u"label_3")
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Minimum)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy1)
self.label_3.setFont(font1)
self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1)
self.label_4 = QLabel(self.groupBox)
self.label_4.setObjectName(u"label_4")
sizePolicy1.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
self.label_4.setSizePolicy(sizePolicy1)
self.label_4.setFont(font1)
self.gridLayout_2.addWidget(self.label_4, 3, 0, 1, 1)
self.label = QLabel(self.groupBox)
self.label.setObjectName(u"label")
sizePolicy1.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy1)
self.label.setFont(font1)
self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1)
self.label_5 = QLabel(self.groupBox)
self.label_5.setObjectName(u"label_5")
sizePolicy1.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
self.label_5.setSizePolicy(sizePolicy1)
self.label_5.setFont(font1)
self.gridLayout_2.addWidget(self.label_5, 4, 0, 1, 1)
self.label_2 = QLabel(self.groupBox)
self.label_2.setObjectName(u"label_2")
sizePolicy1.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
self.label_2.setSizePolicy(sizePolicy1)
self.label_2.setFont(font1)
self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1)
self.lineEdit_start_time = QLineEdit(self.groupBox)
self.lineEdit_start_time.setObjectName(u"lineEdit_start_time")
sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(0)
sizePolicy2.setHeightForWidth(self.lineEdit_start_time.sizePolicy().hasHeightForWidth())
self.lineEdit_start_time.setSizePolicy(sizePolicy2)
self.gridLayout_2.addWidget(self.lineEdit_start_time, 2, 1, 1, 1)
self.lineEdit_end_time = QLineEdit(self.groupBox)
self.lineEdit_end_time.setObjectName(u"lineEdit_end_time")
sizePolicy2.setHeightForWidth(self.lineEdit_end_time.sizePolicy().hasHeightForWidth())
self.lineEdit_end_time.setSizePolicy(sizePolicy2)
self.gridLayout_2.addWidget(self.lineEdit_end_time, 3, 1, 1, 1)
self.lineEdit_energy_percent_orgBcg = QLineEdit(self.groupBox)
self.lineEdit_energy_percent_orgBcg.setObjectName(u"lineEdit_energy_percent_orgBcg")
self.lineEdit_energy_percent_orgBcg.setEnabled(False)
sizePolicy2.setHeightForWidth(self.lineEdit_energy_percent_orgBcg.sizePolicy().hasHeightForWidth())
self.lineEdit_energy_percent_orgBcg.setSizePolicy(sizePolicy2)
self.gridLayout_2.addWidget(self.lineEdit_energy_percent_orgBcg, 0, 1, 1, 1)
self.lineEdit_energy_percent_BCG = QLineEdit(self.groupBox)
self.lineEdit_energy_percent_BCG.setObjectName(u"lineEdit_energy_percent_BCG")
self.lineEdit_energy_percent_BCG.setEnabled(False)
sizePolicy2.setHeightForWidth(self.lineEdit_energy_percent_BCG.sizePolicy().hasHeightForWidth())
self.lineEdit_energy_percent_BCG.setSizePolicy(sizePolicy2)
self.gridLayout_2.addWidget(self.lineEdit_energy_percent_BCG, 1, 1, 1, 1)
self.lineEdit_duration = QLineEdit(self.groupBox)
self.lineEdit_duration.setObjectName(u"lineEdit_duration")
self.lineEdit_duration.setEnabled(False)
sizePolicy2.setHeightForWidth(self.lineEdit_duration.sizePolicy().hasHeightForWidth())
self.lineEdit_duration.setSizePolicy(sizePolicy2)
self.gridLayout_2.addWidget(self.lineEdit_duration, 4, 1, 1, 1)
self.verticalLayout_2.addWidget(self.groupBox)
self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer_2)
self.groupBox_2 = QGroupBox(self.groupBox_left)
self.groupBox_2.setObjectName(u"groupBox_2")
self.verticalLayout_3 = QVBoxLayout(self.groupBox_2)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.pushButton_prev_move = QPushButton(self.groupBox_2)
self.pushButton_prev_move.setObjectName(u"pushButton_prev_move")
sizePolicy.setHeightForWidth(self.pushButton_prev_move.sizePolicy().hasHeightForWidth())
self.pushButton_prev_move.setSizePolicy(sizePolicy)
self.pushButton_prev_move.setFont(font1)
self.horizontalLayout_2.addWidget(self.pushButton_prev_move)
self.pushButton_pause = QPushButton(self.groupBox_2)
self.pushButton_pause.setObjectName(u"pushButton_pause")
sizePolicy.setHeightForWidth(self.pushButton_pause.sizePolicy().hasHeightForWidth())
self.pushButton_pause.setSizePolicy(sizePolicy)
self.pushButton_pause.setFont(font1)
self.horizontalLayout_2.addWidget(self.pushButton_pause)
self.pushButton_next_move = QPushButton(self.groupBox_2)
self.pushButton_next_move.setObjectName(u"pushButton_next_move")
sizePolicy.setHeightForWidth(self.pushButton_next_move.sizePolicy().hasHeightForWidth())
self.pushButton_next_move.setSizePolicy(sizePolicy)
self.pushButton_next_move.setFont(font1)
self.horizontalLayout_2.addWidget(self.pushButton_next_move)
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
self.verticalSpacer_4 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_3.addItem(self.verticalSpacer_4)
self.groupBox_3 = QGroupBox(self.groupBox_2)
self.groupBox_3.setObjectName(u"groupBox_3")
self.verticalLayout_4 = QVBoxLayout(self.groupBox_3)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.gridLayout_3 = QGridLayout()
self.gridLayout_3.setObjectName(u"gridLayout_3")
self.label_moveLength_preset_1 = QLabel(self.groupBox_3)
self.label_moveLength_preset_1.setObjectName(u"label_moveLength_preset_1")
self.label_moveLength_preset_1.setFont(font1)
self.label_moveLength_preset_1.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveLength_preset_1, 1, 1, 1, 1)
self.label_maxRange_preset_1 = QLabel(self.groupBox_3)
self.label_maxRange_preset_1.setObjectName(u"label_maxRange_preset_1")
self.label_maxRange_preset_1.setFont(font1)
self.label_maxRange_preset_1.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_maxRange_preset_1, 1, 2, 1, 1)
self.radioButton_move_preset_1 = QRadioButton(self.groupBox_3)
self.radioButton_move_preset_1.setObjectName(u"radioButton_move_preset_1")
self.radioButton_move_preset_1.setFont(font1)
self.radioButton_move_preset_1.setChecked(True)
self.gridLayout_3.addWidget(self.radioButton_move_preset_1, 1, 0, 1, 1)
self.label_moveSpeed_preset_3 = QLabel(self.groupBox_3)
self.label_moveSpeed_preset_3.setObjectName(u"label_moveSpeed_preset_3")
self.label_moveSpeed_preset_3.setFont(font1)
self.label_moveSpeed_preset_3.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveSpeed_preset_3, 3, 3, 1, 1)
self.spinBox_moveLength = QSpinBox(self.groupBox_3)
self.spinBox_moveLength.setObjectName(u"spinBox_moveLength")
self.spinBox_moveLength.setFont(font1)
self.spinBox_moveLength.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.gridLayout_3.addWidget(self.spinBox_moveLength, 4, 1, 1, 1)
self.radioButton_move_preset_2 = QRadioButton(self.groupBox_3)
self.radioButton_move_preset_2.setObjectName(u"radioButton_move_preset_2")
self.radioButton_move_preset_2.setFont(font1)
self.gridLayout_3.addWidget(self.radioButton_move_preset_2, 2, 0, 1, 1)
self.label_maxRange_preset_3 = QLabel(self.groupBox_3)
self.label_maxRange_preset_3.setObjectName(u"label_maxRange_preset_3")
self.label_maxRange_preset_3.setFont(font1)
self.label_maxRange_preset_3.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_maxRange_preset_3, 3, 2, 1, 1)
self.label_maxRange_preset_2 = QLabel(self.groupBox_3)
self.label_maxRange_preset_2.setObjectName(u"label_maxRange_preset_2")
self.label_maxRange_preset_2.setFont(font1)
self.label_maxRange_preset_2.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_maxRange_preset_2, 2, 2, 1, 1)
self.radioButton_move_preset_3 = QRadioButton(self.groupBox_3)
self.radioButton_move_preset_3.setObjectName(u"radioButton_move_preset_3")
self.radioButton_move_preset_3.setFont(font1)
self.gridLayout_3.addWidget(self.radioButton_move_preset_3, 3, 0, 1, 1)
self.label_moveLength_preset_3 = QLabel(self.groupBox_3)
self.label_moveLength_preset_3.setObjectName(u"label_moveLength_preset_3")
self.label_moveLength_preset_3.setFont(font1)
self.label_moveLength_preset_3.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveLength_preset_3, 3, 1, 1, 1)
self.spinBox_maxRange = QSpinBox(self.groupBox_3)
self.spinBox_maxRange.setObjectName(u"spinBox_maxRange")
self.spinBox_maxRange.setFont(font1)
self.spinBox_maxRange.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.gridLayout_3.addWidget(self.spinBox_maxRange, 4, 2, 1, 1)
self.label_moveSpeed_preset_2 = QLabel(self.groupBox_3)
self.label_moveSpeed_preset_2.setObjectName(u"label_moveSpeed_preset_2")
self.label_moveSpeed_preset_2.setFont(font1)
self.label_moveSpeed_preset_2.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveSpeed_preset_2, 2, 3, 1, 1)
self.spinBox_moveSpeed = QSpinBox(self.groupBox_3)
self.spinBox_moveSpeed.setObjectName(u"spinBox_moveSpeed")
self.spinBox_moveSpeed.setFont(font1)
self.spinBox_moveSpeed.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.gridLayout_3.addWidget(self.spinBox_moveSpeed, 4, 3, 1, 1)
self.label_moveLength_preset_2 = QLabel(self.groupBox_3)
self.label_moveLength_preset_2.setObjectName(u"label_moveLength_preset_2")
self.label_moveLength_preset_2.setFont(font1)
self.label_moveLength_preset_2.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveLength_preset_2, 2, 1, 1, 1)
self.radioButton_move_custom = QRadioButton(self.groupBox_3)
self.radioButton_move_custom.setObjectName(u"radioButton_move_custom")
self.radioButton_move_custom.setFont(font1)
self.gridLayout_3.addWidget(self.radioButton_move_custom, 4, 0, 1, 1)
self.label_moveSpeed_preset_1 = QLabel(self.groupBox_3)
self.label_moveSpeed_preset_1.setObjectName(u"label_moveSpeed_preset_1")
self.label_moveSpeed_preset_1.setFont(font1)
self.label_moveSpeed_preset_1.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveSpeed_preset_1, 1, 3, 1, 1)
self.label_7 = QLabel(self.groupBox_3)
self.label_7.setObjectName(u"label_7")
sizePolicy3 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Maximum)
sizePolicy3.setHorizontalStretch(0)
sizePolicy3.setVerticalStretch(0)
sizePolicy3.setHeightForWidth(self.label_7.sizePolicy().hasHeightForWidth())
self.label_7.setSizePolicy(sizePolicy3)
self.label_7.setFont(font1)
self.label_7.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_7, 0, 1, 1, 1)
self.label_6 = QLabel(self.groupBox_3)
self.label_6.setObjectName(u"label_6")
sizePolicy3.setHeightForWidth(self.label_6.sizePolicy().hasHeightForWidth())
self.label_6.setSizePolicy(sizePolicy3)
self.label_6.setFont(font1)
self.label_6.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_6, 0, 2, 1, 1)
self.label_8 = QLabel(self.groupBox_3)
self.label_8.setObjectName(u"label_8")
sizePolicy3.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth())
self.label_8.setSizePolicy(sizePolicy3)
self.label_8.setFont(font1)
self.label_8.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_8, 0, 3, 1, 1)
self.gridLayout_3.setRowStretch(0, 1)
self.gridLayout_3.setRowStretch(1, 1)
self.gridLayout_3.setRowStretch(2, 1)
self.gridLayout_3.setRowStretch(3, 1)
self.gridLayout_3.setRowStretch(4, 1)
self.gridLayout_3.setColumnStretch(0, 1)
self.gridLayout_3.setColumnStretch(1, 1)
self.gridLayout_3.setColumnStretch(2, 1)
self.gridLayout_3.setColumnStretch(3, 1)
self.verticalLayout_4.addLayout(self.gridLayout_3)
self.verticalLayout_4.setStretch(0, 4)
self.verticalLayout_3.addWidget(self.groupBox_3)
self.verticalLayout_3.setStretch(0, 2)
self.verticalLayout_3.setStretch(1, 1)
self.verticalLayout_3.setStretch(2, 8)
self.verticalLayout_2.addWidget(self.groupBox_2)
self.verticalSpacer_3 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer_3)
self.pushButton = QPushButton(self.groupBox_left)
self.pushButton.setObjectName(u"pushButton")
sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth())
self.pushButton.setSizePolicy(sizePolicy)
self.pushButton.setFont(font1)
self.verticalLayout_2.addWidget(self.pushButton)
self.verticalLayout_2.setStretch(0, 1)
self.verticalLayout_2.setStretch(1, 1)
self.verticalLayout_2.setStretch(2, 3)
self.verticalLayout_2.setStretch(3, 1)
self.verticalLayout_2.setStretch(4, 6)
self.verticalLayout_2.setStretch(5, 1)
self.verticalLayout_2.setStretch(6, 1)
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
self.groupBox_right = QGroupBox(self.centralwidget)
self.groupBox_right.setObjectName(u"groupBox_right")
self.groupBox_right.setFont(font)
self.gridLayout_4 = QGridLayout(self.groupBox_right)
self.gridLayout_4.setObjectName(u"gridLayout_4")
self.spinBox_duration_type_3 = QSpinBox(self.groupBox_right)
self.spinBox_duration_type_3.setObjectName(u"spinBox_duration_type_3")
self.spinBox_duration_type_3.setFont(font1)
self.spinBox_duration_type_3.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_duration_type_3.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_duration_type_3, 5, 2, 1, 1)
self.spinBox_duration_type_4 = QSpinBox(self.groupBox_right)
self.spinBox_duration_type_4.setObjectName(u"spinBox_duration_type_4")
self.spinBox_duration_type_4.setFont(font1)
self.spinBox_duration_type_4.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_duration_type_4.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_duration_type_4, 7, 2, 1, 1)
self.verticalSpacer_5 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_4.addItem(self.verticalSpacer_5, 10, 0, 1, 3)
self.spinBox_duration_type_2 = QSpinBox(self.groupBox_right)
self.spinBox_duration_type_2.setObjectName(u"spinBox_duration_type_2")
self.spinBox_duration_type_2.setFont(font1)
self.spinBox_duration_type_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_duration_type_2.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_duration_type_2, 3, 2, 1, 1)
self.pushButton_type_1 = QPushButton(self.groupBox_right)
self.pushButton_type_1.setObjectName(u"pushButton_type_1")
sizePolicy4 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
sizePolicy4.setHorizontalStretch(0)
sizePolicy4.setVerticalStretch(0)
sizePolicy4.setHeightForWidth(self.pushButton_type_1.sizePolicy().hasHeightForWidth())
self.pushButton_type_1.setSizePolicy(sizePolicy4)
font2 = QFont()
font2.setPointSize(20)
self.pushButton_type_1.setFont(font2)
self.gridLayout_4.addWidget(self.pushButton_type_1, 0, 0, 1, 1)
self.tableWidget_type_1 = QTableWidget(self.groupBox_right)
if (self.tableWidget_type_1.columnCount() < 3):
self.tableWidget_type_1.setColumnCount(3)
self.tableWidget_type_1.setObjectName(u"tableWidget_type_1")
self.tableWidget_type_1.setFont(font)
self.tableWidget_type_1.setColumnCount(3)
self.tableWidget_type_1.horizontalHeader().setMinimumSectionSize(42)
self.tableWidget_type_1.horizontalHeader().setDefaultSectionSize(70)
self.gridLayout_4.addWidget(self.tableWidget_type_1, 0, 1, 1, 2)
self.spinBox_amount_type_3 = QSpinBox(self.groupBox_right)
self.spinBox_amount_type_3.setObjectName(u"spinBox_amount_type_3")
self.spinBox_amount_type_3.setFont(font1)
self.spinBox_amount_type_3.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_amount_type_3.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_amount_type_3, 5, 1, 1, 1)
self.spinBox_duration_type_5 = QSpinBox(self.groupBox_right)
self.spinBox_duration_type_5.setObjectName(u"spinBox_duration_type_5")
self.spinBox_duration_type_5.setFont(font1)
self.spinBox_duration_type_5.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_duration_type_5.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_duration_type_5, 9, 2, 1, 1)
self.spinBox_amount_type_1 = QSpinBox(self.groupBox_right)
self.spinBox_amount_type_1.setObjectName(u"spinBox_amount_type_1")
self.spinBox_amount_type_1.setFont(font1)
self.spinBox_amount_type_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_amount_type_1.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_amount_type_1, 1, 1, 1, 1)
self.tableWidget_type_3 = QTableWidget(self.groupBox_right)
if (self.tableWidget_type_3.columnCount() < 3):
self.tableWidget_type_3.setColumnCount(3)
self.tableWidget_type_3.setObjectName(u"tableWidget_type_3")
self.tableWidget_type_3.setFont(font)
self.tableWidget_type_3.setColumnCount(3)
self.tableWidget_type_3.horizontalHeader().setMinimumSectionSize(42)
self.tableWidget_type_3.horizontalHeader().setDefaultSectionSize(70)
self.gridLayout_4.addWidget(self.tableWidget_type_3, 4, 1, 1, 2)
self.tableWidget_type_5 = QTableWidget(self.groupBox_right)
if (self.tableWidget_type_5.columnCount() < 3):
self.tableWidget_type_5.setColumnCount(3)
self.tableWidget_type_5.setObjectName(u"tableWidget_type_5")
self.tableWidget_type_5.setFont(font)
self.tableWidget_type_5.setColumnCount(3)
self.tableWidget_type_5.horizontalHeader().setMinimumSectionSize(42)
self.tableWidget_type_5.horizontalHeader().setDefaultSectionSize(70)
self.gridLayout_4.addWidget(self.tableWidget_type_5, 8, 1, 1, 2)
self.tableWidget_type_2 = QTableWidget(self.groupBox_right)
if (self.tableWidget_type_2.columnCount() < 3):
self.tableWidget_type_2.setColumnCount(3)
self.tableWidget_type_2.setObjectName(u"tableWidget_type_2")
self.tableWidget_type_2.setFont(font)
self.tableWidget_type_2.setColumnCount(3)
self.tableWidget_type_2.horizontalHeader().setMinimumSectionSize(42)
self.tableWidget_type_2.horizontalHeader().setDefaultSectionSize(70)
self.gridLayout_4.addWidget(self.tableWidget_type_2, 2, 1, 1, 2)
self.label_13 = QLabel(self.groupBox_right)
self.label_13.setObjectName(u"label_13")
self.label_13.setFont(font1)
self.gridLayout_4.addWidget(self.label_13, 9, 0, 1, 1)
self.label_9 = QLabel(self.groupBox_right)
self.label_9.setObjectName(u"label_9")
self.label_9.setFont(font1)
self.gridLayout_4.addWidget(self.label_9, 1, 0, 1, 1)
self.spinBox_amount_type_2 = QSpinBox(self.groupBox_right)
self.spinBox_amount_type_2.setObjectName(u"spinBox_amount_type_2")
self.spinBox_amount_type_2.setFont(font1)
self.spinBox_amount_type_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_amount_type_2.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_amount_type_2, 3, 1, 1, 1)
self.pushButton_type_4 = QPushButton(self.groupBox_right)
self.pushButton_type_4.setObjectName(u"pushButton_type_4")
sizePolicy4.setHeightForWidth(self.pushButton_type_4.sizePolicy().hasHeightForWidth())
self.pushButton_type_4.setSizePolicy(sizePolicy4)
self.pushButton_type_4.setFont(font2)
self.gridLayout_4.addWidget(self.pushButton_type_4, 6, 0, 1, 1)
self.spinBox_amount_type_4 = QSpinBox(self.groupBox_right)
self.spinBox_amount_type_4.setObjectName(u"spinBox_amount_type_4")
self.spinBox_amount_type_4.setFont(font1)
self.spinBox_amount_type_4.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_amount_type_4.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_amount_type_4, 7, 1, 1, 1)
self.label_12 = QLabel(self.groupBox_right)
self.label_12.setObjectName(u"label_12")
self.label_12.setFont(font1)
self.gridLayout_4.addWidget(self.label_12, 7, 0, 1, 1)
self.spinBox_duration_type_1 = QSpinBox(self.groupBox_right)
self.spinBox_duration_type_1.setObjectName(u"spinBox_duration_type_1")
self.spinBox_duration_type_1.setFont(font1)
self.spinBox_duration_type_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_duration_type_1.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_duration_type_1, 1, 2, 1, 1)
self.spinBox_amount_type_5 = QSpinBox(self.groupBox_right)
self.spinBox_amount_type_5.setObjectName(u"spinBox_amount_type_5")
self.spinBox_amount_type_5.setFont(font1)
self.spinBox_amount_type_5.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_amount_type_5.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_amount_type_5, 9, 1, 1, 1)
self.label_10 = QLabel(self.groupBox_right)
self.label_10.setObjectName(u"label_10")
self.label_10.setFont(font1)
self.gridLayout_4.addWidget(self.label_10, 3, 0, 1, 1)
self.label_11 = QLabel(self.groupBox_right)
self.label_11.setObjectName(u"label_11")
self.label_11.setFont(font1)
self.gridLayout_4.addWidget(self.label_11, 5, 0, 1, 1)
self.pushButton_type_3 = QPushButton(self.groupBox_right)
self.pushButton_type_3.setObjectName(u"pushButton_type_3")
sizePolicy4.setHeightForWidth(self.pushButton_type_3.sizePolicy().hasHeightForWidth())
self.pushButton_type_3.setSizePolicy(sizePolicy4)
self.pushButton_type_3.setFont(font2)
self.gridLayout_4.addWidget(self.pushButton_type_3, 4, 0, 1, 1)
self.pushButton_type_2 = QPushButton(self.groupBox_right)
self.pushButton_type_2.setObjectName(u"pushButton_type_2")
sizePolicy4.setHeightForWidth(self.pushButton_type_2.sizePolicy().hasHeightForWidth())
self.pushButton_type_2.setSizePolicy(sizePolicy4)
self.pushButton_type_2.setFont(font2)
self.gridLayout_4.addWidget(self.pushButton_type_2, 2, 0, 1, 1)
self.tableWidget_type_4 = QTableWidget(self.groupBox_right)
if (self.tableWidget_type_4.columnCount() < 3):
self.tableWidget_type_4.setColumnCount(3)
self.tableWidget_type_4.setObjectName(u"tableWidget_type_4")
self.tableWidget_type_4.setFont(font)
self.tableWidget_type_4.setColumnCount(3)
self.tableWidget_type_4.horizontalHeader().setMinimumSectionSize(42)
self.tableWidget_type_4.horizontalHeader().setDefaultSectionSize(70)
self.gridLayout_4.addWidget(self.tableWidget_type_4, 6, 1, 1, 2)
self.pushButton_type_5 = QPushButton(self.groupBox_right)
self.pushButton_type_5.setObjectName(u"pushButton_type_5")
sizePolicy4.setHeightForWidth(self.pushButton_type_5.sizePolicy().hasHeightForWidth())
self.pushButton_type_5.setSizePolicy(sizePolicy4)
self.pushButton_type_5.setFont(font2)
self.gridLayout_4.addWidget(self.pushButton_type_5, 8, 0, 1, 1)
self.pushButton_delete = QPushButton(self.groupBox_right)
self.pushButton_delete.setObjectName(u"pushButton_delete")
sizePolicy4.setHeightForWidth(self.pushButton_delete.sizePolicy().hasHeightForWidth())
self.pushButton_delete.setSizePolicy(sizePolicy4)
self.pushButton_delete.setFont(font1)
self.gridLayout_4.addWidget(self.pushButton_delete, 11, 0, 1, 3)
self.gridLayout_4.setRowStretch(0, 3)
self.gridLayout_4.setRowStretch(1, 1)
self.gridLayout_4.setRowStretch(2, 3)
self.gridLayout_4.setRowStretch(3, 1)
self.gridLayout_4.setRowStretch(4, 3)
self.gridLayout_4.setRowStretch(5, 1)
self.gridLayout_4.setRowStretch(6, 3)
self.gridLayout_4.setRowStretch(7, 1)
self.gridLayout_4.setRowStretch(8, 3)
self.gridLayout_4.setRowStretch(9, 1)
self.gridLayout_4.setRowStretch(10, 1)
self.gridLayout_4.setRowStretch(11, 1)
self.gridLayout.addWidget(self.groupBox_right, 0, 2, 1, 1)
self.gridLayout.setColumnStretch(0, 2)
self.gridLayout.setColumnStretch(1, 6)
self.gridLayout.setColumnStretch(2, 2)
MainWindow_artifact_label.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_artifact_label)
self.statusbar.setObjectName(u"statusbar")
MainWindow_artifact_label.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_artifact_label)
QMetaObject.connectSlotsByName(MainWindow_artifact_label)
# setupUi
def retranslateUi(self, MainWindow_artifact_label):
MainWindow_artifact_label.setWindowTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u4f53\u52a8\u6807\u6ce8", None))
self.groupBox_canvas.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u7ed8\u56fe\u533a", None))
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u4f53\u52a8\u6807\u6ce8", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_input.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u5f00\u59cb\u5bfc\u5165", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u6807\u6ce8\u53c2\u6570", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u8d77\u59cb\u65f6\u95f4(ms)", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u7ec8\u6b62\u65f6\u95f4(ms)", None))
self.label.setText(QCoreApplication.translate("MainWindow_artifact_label", u"orgBcg 20Hz\u4ee5\u4e0a\u80fd\u91cf\u5360\u6bd4", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u4f53\u52a8\u65f6\u957f(ms)", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_artifact_label", u"BCG 20Hz\u4ee5\u4e0a\u80fd\u91cf\u5360\u6bd4", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u81ea\u52a8\u64ad\u653e", None))
self.pushButton_prev_move.setText(QCoreApplication.translate("MainWindow_artifact_label", u"< <(A)", None))
self.pushButton_pause.setText(QCoreApplication.translate("MainWindow_artifact_label", u"| |(S)", None))
self.pushButton_next_move.setText(QCoreApplication.translate("MainWindow_artifact_label", u"> >(D)", None))
self.groupBox_3.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u8bbe\u7f6e", None))
self.label_moveLength_preset_1.setText(QCoreApplication.translate("MainWindow_artifact_label", u"10000", None))
self.label_maxRange_preset_1.setText(QCoreApplication.translate("MainWindow_artifact_label", u"40000", None))
self.radioButton_move_preset_1.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u9884\u8bbe1", None))
self.label_moveSpeed_preset_3.setText(QCoreApplication.translate("MainWindow_artifact_label", u"500", None))
self.radioButton_move_preset_2.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u9884\u8bbe2", None))
self.label_maxRange_preset_3.setText(QCoreApplication.translate("MainWindow_artifact_label", u"100000", None))
self.label_maxRange_preset_2.setText(QCoreApplication.translate("MainWindow_artifact_label", u"80000", None))
self.radioButton_move_preset_3.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u9884\u8bbe3", None))
self.label_moveLength_preset_3.setText(QCoreApplication.translate("MainWindow_artifact_label", u"25000", None))
self.label_moveSpeed_preset_2.setText(QCoreApplication.translate("MainWindow_artifact_label", u"500", None))
self.label_moveLength_preset_2.setText(QCoreApplication.translate("MainWindow_artifact_label", u"20000", None))
self.radioButton_move_custom.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u81ea\u5b9a\u4e49", None))
self.label_moveSpeed_preset_1.setText(QCoreApplication.translate("MainWindow_artifact_label", u"500", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u79fb\u52a8\u8ddd\u79bb", None))
self.label_6.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u6700\u5927\u8303\u56f4", None))
self.label_8.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u79fb\u52a8\u95f4\u9694(ms)", None))
self.pushButton.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u5bfc\u51fa\u6807\u7b7e", None))
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u6807\u6ce8\u64cd\u4f5c\u548c\u4fe1\u606f", None))
self.pushButton_type_1.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u5267\u70c8\u4f53\u52a8", None))
self.label_13.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u4e2a\u6570&\u7d2f\u8ba1\u65f6\u957f(ms)", None))
self.label_9.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u4e2a\u6570&\u7d2f\u8ba1\u65f6\u957f(ms)", None))
self.pushButton_type_4.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u7591\u4f3c\u9f3e\u58f0", None))
self.label_12.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u4e2a\u6570&\u7d2f\u8ba1\u65f6\u957f(ms)", None))
self.label_10.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u4e2a\u6570&\u7d2f\u8ba1\u65f6\u957f(ms)", None))
self.label_11.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u4e2a\u6570&\u7d2f\u8ba1\u65f6\u957f(ms)", None))
self.pushButton_type_3.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u5e38\u89c4\u4f53\u52a8", None))
self.pushButton_type_2.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u8109\u51b2\u4f53\u52a8", None))
self.pushButton_type_5.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u79bb\u5e8a", None))
self.pushButton_delete.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u5220\u9664\u6807\u7b7e", None))
# retranslateUi

File diff suppressed because it is too large Load Diff

View File

@ -51,6 +51,9 @@ class Ui_MainWindow_detect_Jpeak(object):
self.gridLayout.setObjectName(u"gridLayout") self.gridLayout.setObjectName(u"gridLayout")
self.groupBox_canvas = QGroupBox(self.centralwidget) self.groupBox_canvas = QGroupBox(self.centralwidget)
self.groupBox_canvas.setObjectName(u"groupBox_canvas") self.groupBox_canvas.setObjectName(u"groupBox_canvas")
font2 = QFont()
font2.setPointSize(10)
self.groupBox_canvas.setFont(font2)
self.verticalLayout_7 = QVBoxLayout(self.groupBox_canvas) self.verticalLayout_7 = QVBoxLayout(self.groupBox_canvas)
self.verticalLayout_7.setObjectName(u"verticalLayout_7") self.verticalLayout_7.setObjectName(u"verticalLayout_7")
self.verticalLayout_canvas = QVBoxLayout() self.verticalLayout_canvas = QVBoxLayout()
@ -63,8 +66,6 @@ class Ui_MainWindow_detect_Jpeak(object):
self.groupBox_left = QGroupBox(self.centralwidget) self.groupBox_left = QGroupBox(self.centralwidget)
self.groupBox_left.setObjectName(u"groupBox_left") self.groupBox_left.setObjectName(u"groupBox_left")
font2 = QFont()
font2.setPointSize(10)
self.groupBox_left.setFont(font2) self.groupBox_left.setFont(font2)
self.verticalLayout = QVBoxLayout(self.groupBox_left) self.verticalLayout = QVBoxLayout(self.groupBox_left)
self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setObjectName(u"verticalLayout")
@ -287,9 +288,9 @@ class Ui_MainWindow_detect_Jpeak(object):
self.gridLayout.setColumnStretch(0, 2) self.gridLayout.setColumnStretch(0, 2)
self.gridLayout.setColumnStretch(1, 8) self.gridLayout.setColumnStretch(1, 8)
MainWindow_detect_Jpeak.setCentralWidget(self.centralwidget) MainWindow_detect_Jpeak.setCentralWidget(self.centralwidget)
self.statusBar = QStatusBar(MainWindow_detect_Jpeak) self.statusbar = QStatusBar(MainWindow_detect_Jpeak)
self.statusBar.setObjectName(u"statusBar") self.statusbar.setObjectName(u"statusbar")
MainWindow_detect_Jpeak.setStatusBar(self.statusBar) MainWindow_detect_Jpeak.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_detect_Jpeak) self.retranslateUi(MainWindow_detect_Jpeak)

View File

@ -31,6 +31,11 @@
<layout class="QGridLayout" name="gridLayout" columnstretch="2,8"> <layout class="QGridLayout" name="gridLayout" columnstretch="2,8">
<item row="0" column="1"> <item row="0" column="1">
<widget class="QGroupBox" name="groupBox_canvas"> <widget class="QGroupBox" name="groupBox_canvas">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title"> <property name="title">
<string>绘图区</string> <string>绘图区</string>
</property> </property>
@ -402,7 +407,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QStatusBar" name="statusBar"/> <widget class="QStatusBar" name="statusbar"/>
<action name="action_selectPath"> <action name="action_selectPath">
<property name="text"> <property name="text">
<string>数据路径选择</string> <string>数据路径选择</string>

View File

@ -0,0 +1,238 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'MainWindow_detect_Rpeak.ui'
##
## Created by: Qt User Interface Compiler version 6.8.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QComboBox, QDoubleSpinBox, QGridLayout,
QGroupBox, QHBoxLayout, QLabel, QMainWindow,
QPushButton, QSizePolicy, QSpacerItem, QSpinBox,
QStatusBar, QTextBrowser, QVBoxLayout, QWidget)
class Ui_MainWindow_detect_Rpeak(object):
def setupUi(self, MainWindow_detect_Rpeak):
if not MainWindow_detect_Rpeak.objectName():
MainWindow_detect_Rpeak.setObjectName(u"MainWindow_detect_Rpeak")
MainWindow_detect_Rpeak.resize(1920, 1080)
self.centralwidget = QWidget(MainWindow_detect_Rpeak)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.groupBox_left = QGroupBox(self.centralwidget)
self.groupBox_left.setObjectName(u"groupBox_left")
font = QFont()
font.setPointSize(10)
self.groupBox_left.setFont(font)
self.verticalLayout = QVBoxLayout(self.groupBox_left)
self.verticalLayout.setObjectName(u"verticalLayout")
self.horizontalLayout_4 = QHBoxLayout()
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
self.pushButton_input_setting = QPushButton(self.groupBox_left)
self.pushButton_input_setting.setObjectName(u"pushButton_input_setting")
sizePolicy = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_input_setting.sizePolicy().hasHeightForWidth())
self.pushButton_input_setting.setSizePolicy(sizePolicy)
font1 = QFont()
font1.setPointSize(12)
self.pushButton_input_setting.setFont(font1)
self.horizontalLayout_4.addWidget(self.pushButton_input_setting)
self.pushButton_input = QPushButton(self.groupBox_left)
self.pushButton_input.setObjectName(u"pushButton_input")
sizePolicy.setHeightForWidth(self.pushButton_input.sizePolicy().hasHeightForWidth())
self.pushButton_input.setSizePolicy(sizePolicy)
self.pushButton_input.setFont(font1)
self.horizontalLayout_4.addWidget(self.pushButton_input)
self.verticalLayout.addLayout(self.horizontalLayout_4)
self.groupBox_args = QGroupBox(self.groupBox_left)
self.groupBox_args.setObjectName(u"groupBox_args")
self.verticalLayout_5 = QVBoxLayout(self.groupBox_args)
self.verticalLayout_5.setObjectName(u"verticalLayout_5")
self.groupBox_2 = QGroupBox(self.groupBox_args)
self.groupBox_2.setObjectName(u"groupBox_2")
self.horizontalLayout_5 = QHBoxLayout(self.groupBox_2)
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
self.label = QLabel(self.groupBox_2)
self.label.setObjectName(u"label")
self.label.setFont(font1)
self.horizontalLayout_5.addWidget(self.label)
self.doubleSpinBox_bandPassLow = QDoubleSpinBox(self.groupBox_2)
self.doubleSpinBox_bandPassLow.setObjectName(u"doubleSpinBox_bandPassLow")
self.doubleSpinBox_bandPassLow.setFont(font1)
self.doubleSpinBox_bandPassLow.setMaximum(100.000000000000000)
self.horizontalLayout_5.addWidget(self.doubleSpinBox_bandPassLow)
self.label_5 = QLabel(self.groupBox_2)
self.label_5.setObjectName(u"label_5")
self.label_5.setFont(font1)
self.label_5.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.horizontalLayout_5.addWidget(self.label_5)
self.doubleSpinBox_bandPassHigh = QDoubleSpinBox(self.groupBox_2)
self.doubleSpinBox_bandPassHigh.setObjectName(u"doubleSpinBox_bandPassHigh")
self.doubleSpinBox_bandPassHigh.setFont(font1)
self.doubleSpinBox_bandPassHigh.setMaximum(100.000000000000000)
self.horizontalLayout_5.addWidget(self.doubleSpinBox_bandPassHigh)
self.verticalLayout_5.addWidget(self.groupBox_2)
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.label_2 = QLabel(self.groupBox_args)
self.label_2.setObjectName(u"label_2")
self.label_2.setFont(font1)
self.label_2.setAlignment(Qt.AlignmentFlag.AlignLeading|Qt.AlignmentFlag.AlignLeft|Qt.AlignmentFlag.AlignVCenter)
self.horizontalLayout.addWidget(self.label_2)
self.spinBox_peaksValue = QSpinBox(self.groupBox_args)
self.spinBox_peaksValue.setObjectName(u"spinBox_peaksValue")
self.spinBox_peaksValue.setFont(font1)
self.spinBox_peaksValue.setMinimum(1)
self.spinBox_peaksValue.setMaximum(10000)
self.horizontalLayout.addWidget(self.spinBox_peaksValue)
self.horizontalLayout.setStretch(0, 1)
self.horizontalLayout.setStretch(1, 1)
self.verticalLayout_5.addLayout(self.horizontalLayout)
self.groupBox_3 = QGroupBox(self.groupBox_args)
self.groupBox_3.setObjectName(u"groupBox_3")
self.verticalLayout_2 = QVBoxLayout(self.groupBox_3)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.label_7 = QLabel(self.groupBox_3)
self.label_7.setObjectName(u"label_7")
self.label_7.setFont(font1)
self.label_7.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.verticalLayout_2.addWidget(self.label_7)
self.comboBox_method = QComboBox(self.groupBox_3)
self.comboBox_method.setObjectName(u"comboBox_method")
self.comboBox_method.setFont(font1)
self.verticalLayout_2.addWidget(self.comboBox_method)
self.verticalLayout_5.addWidget(self.groupBox_3)
self.verticalLayout_5.setStretch(0, 1)
self.verticalLayout_5.setStretch(1, 1)
self.verticalLayout_5.setStretch(2, 3)
self.verticalLayout.addWidget(self.groupBox_args)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout.addItem(self.verticalSpacer)
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.pushButton_view = QPushButton(self.groupBox_left)
self.pushButton_view.setObjectName(u"pushButton_view")
sizePolicy.setHeightForWidth(self.pushButton_view.sizePolicy().hasHeightForWidth())
self.pushButton_view.setSizePolicy(sizePolicy)
self.pushButton_view.setFont(font1)
self.horizontalLayout_3.addWidget(self.pushButton_view)
self.pushButton_save = QPushButton(self.groupBox_left)
self.pushButton_save.setObjectName(u"pushButton_save")
sizePolicy.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth())
self.pushButton_save.setSizePolicy(sizePolicy)
self.pushButton_save.setFont(font1)
self.horizontalLayout_3.addWidget(self.pushButton_save)
self.verticalLayout.addLayout(self.horizontalLayout_3)
self.groupBox = QGroupBox(self.groupBox_left)
self.groupBox.setObjectName(u"groupBox")
self.verticalLayout_6 = QVBoxLayout(self.groupBox)
self.verticalLayout_6.setObjectName(u"verticalLayout_6")
self.textBrowser_info = QTextBrowser(self.groupBox)
self.textBrowser_info.setObjectName(u"textBrowser_info")
self.verticalLayout_6.addWidget(self.textBrowser_info)
self.verticalLayout.addWidget(self.groupBox)
self.verticalLayout.setStretch(0, 1)
self.verticalLayout.setStretch(1, 4)
self.verticalLayout.setStretch(2, 4)
self.verticalLayout.setStretch(3, 1)
self.verticalLayout.setStretch(4, 5)
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
self.groupBox_canvas = QGroupBox(self.centralwidget)
self.groupBox_canvas.setObjectName(u"groupBox_canvas")
self.groupBox_canvas.setFont(font)
self.verticalLayout_7 = QVBoxLayout(self.groupBox_canvas)
self.verticalLayout_7.setObjectName(u"verticalLayout_7")
self.verticalLayout_canvas = QVBoxLayout()
self.verticalLayout_canvas.setObjectName(u"verticalLayout_canvas")
self.verticalLayout_7.addLayout(self.verticalLayout_canvas)
self.gridLayout.addWidget(self.groupBox_canvas, 0, 1, 1, 1)
self.gridLayout.setColumnStretch(0, 2)
self.gridLayout.setColumnStretch(1, 8)
MainWindow_detect_Rpeak.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_detect_Rpeak)
self.statusbar.setObjectName(u"statusbar")
MainWindow_detect_Rpeak.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_detect_Rpeak)
QMetaObject.connectSlotsByName(MainWindow_detect_Rpeak)
# setupUi
def retranslateUi(self, MainWindow_detect_Rpeak):
MainWindow_detect_Rpeak.setWindowTitle(QCoreApplication.translate("MainWindow_detect_Rpeak", u"ECG\u7684R\u5cf0\u7b97\u6cd5\u5b9a\u4f4d", None))
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u9884\u5904\u7406", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_input.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u5f00\u59cb\u5bfc\u5165", None))
self.groupBox_args.setTitle(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u53c2\u6570\u8f93\u5165", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_detect_Rpeak", u"ECG\u7684\u5e26\u901a\u6ee4\u6ce2", None))
self.label.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u622a\u6b62\u9891\u7387(Hz)\uff1a", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"~", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u5bfb\u5cf0\u9608\u503c(\u4e2a)", None))
self.groupBox_3.setTitle(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u65b9\u6cd5\u8bbe\u7f6e", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u68c0\u6d4b\u65b9\u6cd5\u9009\u62e9", None))
self.pushButton_view.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u67e5\u770b\u7ed3\u679c", None))
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u4fdd\u5b58\u7ed3\u679c", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u65e5\u5fd7", None))
self.groupBox_canvas.setTitle(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u7ed8\u56fe\u533a", None))
# retranslateUi

View File

@ -0,0 +1,296 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow_detect_Rpeak</class>
<widget class="QMainWindow" name="MainWindow_detect_Rpeak">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1920</width>
<height>1080</height>
</rect>
</property>
<property name="windowTitle">
<string>ECG的R峰算法定位</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout" columnstretch="2,8">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_left">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>预处理</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,4,4,1,5">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="pushButton_input_setting">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>导入设置</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_input">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>开始导入</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_args">
<property name="title">
<string>参数输入</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="1,1,3">
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>ECG的带通滤波</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>截止频率(Hz)</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="doubleSpinBox_bandPassLow">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="maximum">
<double>100.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>~</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="doubleSpinBox_bandPassHigh">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="maximum">
<double>100.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1">
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>寻峰阈值(个)</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_peaksValue">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>方法设置</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label_7">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>检测方法选择</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_method">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="pushButton_view">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>查看结果</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_save">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>保存结果</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>日志</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QTextBrowser" name="textBrowser_info"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_canvas">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>绘图区</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QVBoxLayout" name="verticalLayout_canvas"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,493 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'MainWindow_label_check.ui'
##
## Created by: Qt User Interface Compiler version 6.8.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QAbstractSpinBox, QApplication, QCheckBox, QDoubleSpinBox,
QGridLayout, QGroupBox, QHBoxLayout, QHeaderView,
QLabel, QMainWindow, QPushButton, QRadioButton,
QSizePolicy, QSpacerItem, QSpinBox, QStatusBar,
QTableWidget, QTableWidgetItem, QVBoxLayout, QWidget)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
if not MainWindow.objectName():
MainWindow.setObjectName(u"MainWindow")
MainWindow.resize(1920, 1080)
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.groupBox_canvas = QGroupBox(self.centralwidget)
self.groupBox_canvas.setObjectName(u"groupBox_canvas")
font = QFont()
font.setPointSize(10)
self.groupBox_canvas.setFont(font)
self.verticalLayout = QVBoxLayout(self.groupBox_canvas)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout_canvas = QVBoxLayout()
self.verticalLayout_canvas.setObjectName(u"verticalLayout_canvas")
self.verticalLayout.addLayout(self.verticalLayout_canvas)
self.gridLayout.addWidget(self.groupBox_canvas, 0, 1, 1, 1)
self.groupBox_left = QGroupBox(self.centralwidget)
self.groupBox_left.setObjectName(u"groupBox_left")
self.groupBox_left.setFont(font)
self.verticalLayout_2 = QVBoxLayout(self.groupBox_left)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.pushButton_input_setting = QPushButton(self.groupBox_left)
self.pushButton_input_setting.setObjectName(u"pushButton_input_setting")
sizePolicy = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_input_setting.sizePolicy().hasHeightForWidth())
self.pushButton_input_setting.setSizePolicy(sizePolicy)
font1 = QFont()
font1.setPointSize(12)
self.pushButton_input_setting.setFont(font1)
self.horizontalLayout.addWidget(self.pushButton_input_setting)
self.pushButton_input = QPushButton(self.groupBox_left)
self.pushButton_input.setObjectName(u"pushButton_input")
sizePolicy.setHeightForWidth(self.pushButton_input.sizePolicy().hasHeightForWidth())
self.pushButton_input.setSizePolicy(sizePolicy)
self.pushButton_input.setFont(font1)
self.horizontalLayout.addWidget(self.pushButton_input)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer)
self.groupBox = QGroupBox(self.groupBox_left)
self.groupBox.setObjectName(u"groupBox")
self.gridLayout_2 = QGridLayout(self.groupBox)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.label_4 = QLabel(self.groupBox)
self.label_4.setObjectName(u"label_4")
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
self.label_4.setSizePolicy(sizePolicy1)
self.label_4.setFont(font1)
self.gridLayout_2.addWidget(self.label_4, 0, 0, 1, 1)
self.doubleSpinBox_findpeaks_min_interval = QDoubleSpinBox(self.groupBox)
self.doubleSpinBox_findpeaks_min_interval.setObjectName(u"doubleSpinBox_findpeaks_min_interval")
self.doubleSpinBox_findpeaks_min_interval.setFont(font1)
self.doubleSpinBox_findpeaks_min_interval.setMaximum(10000.000000000000000)
self.gridLayout_2.addWidget(self.doubleSpinBox_findpeaks_min_interval, 0, 1, 1, 1)
self.label_3 = QLabel(self.groupBox)
self.label_3.setObjectName(u"label_3")
sizePolicy1.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy1)
self.label_3.setFont(font1)
self.gridLayout_2.addWidget(self.label_3, 1, 0, 1, 1)
self.doubleSpinBox_findpeaks_min_height = QDoubleSpinBox(self.groupBox)
self.doubleSpinBox_findpeaks_min_height.setObjectName(u"doubleSpinBox_findpeaks_min_height")
self.doubleSpinBox_findpeaks_min_height.setFont(font1)
self.doubleSpinBox_findpeaks_min_height.setMaximum(10000.000000000000000)
self.gridLayout_2.addWidget(self.doubleSpinBox_findpeaks_min_height, 1, 1, 1, 1)
self.verticalLayout_2.addWidget(self.groupBox)
self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer_2)
self.groupBox_2 = QGroupBox(self.groupBox_left)
self.groupBox_2.setObjectName(u"groupBox_2")
self.verticalLayout_3 = QVBoxLayout(self.groupBox_2)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.pushButton_prev_move = QPushButton(self.groupBox_2)
self.pushButton_prev_move.setObjectName(u"pushButton_prev_move")
sizePolicy.setHeightForWidth(self.pushButton_prev_move.sizePolicy().hasHeightForWidth())
self.pushButton_prev_move.setSizePolicy(sizePolicy)
self.pushButton_prev_move.setFont(font1)
self.horizontalLayout_2.addWidget(self.pushButton_prev_move)
self.pushButton_pause = QPushButton(self.groupBox_2)
self.pushButton_pause.setObjectName(u"pushButton_pause")
sizePolicy.setHeightForWidth(self.pushButton_pause.sizePolicy().hasHeightForWidth())
self.pushButton_pause.setSizePolicy(sizePolicy)
self.pushButton_pause.setFont(font1)
self.horizontalLayout_2.addWidget(self.pushButton_pause)
self.pushButton_next_move = QPushButton(self.groupBox_2)
self.pushButton_next_move.setObjectName(u"pushButton_next_move")
sizePolicy.setHeightForWidth(self.pushButton_next_move.sizePolicy().hasHeightForWidth())
self.pushButton_next_move.setSizePolicy(sizePolicy)
self.pushButton_next_move.setFont(font1)
self.horizontalLayout_2.addWidget(self.pushButton_next_move)
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
self.verticalSpacer_4 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_3.addItem(self.verticalSpacer_4)
self.groupBox_3 = QGroupBox(self.groupBox_2)
self.groupBox_3.setObjectName(u"groupBox_3")
self.verticalLayout_4 = QVBoxLayout(self.groupBox_3)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.gridLayout_3 = QGridLayout()
self.gridLayout_3.setObjectName(u"gridLayout_3")
self.label_moveLength_preset_1 = QLabel(self.groupBox_3)
self.label_moveLength_preset_1.setObjectName(u"label_moveLength_preset_1")
self.label_moveLength_preset_1.setFont(font1)
self.label_moveLength_preset_1.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveLength_preset_1, 1, 1, 1, 1)
self.label_maxRange_preset_1 = QLabel(self.groupBox_3)
self.label_maxRange_preset_1.setObjectName(u"label_maxRange_preset_1")
self.label_maxRange_preset_1.setFont(font1)
self.label_maxRange_preset_1.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_maxRange_preset_1, 1, 2, 1, 1)
self.radioButton_move_preset_1 = QRadioButton(self.groupBox_3)
self.radioButton_move_preset_1.setObjectName(u"radioButton_move_preset_1")
self.radioButton_move_preset_1.setFont(font1)
self.radioButton_move_preset_1.setChecked(True)
self.gridLayout_3.addWidget(self.radioButton_move_preset_1, 1, 0, 1, 1)
self.label_moveSpeed_preset_3 = QLabel(self.groupBox_3)
self.label_moveSpeed_preset_3.setObjectName(u"label_moveSpeed_preset_3")
self.label_moveSpeed_preset_3.setFont(font1)
self.label_moveSpeed_preset_3.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveSpeed_preset_3, 3, 3, 1, 1)
self.spinBox_moveLength = QSpinBox(self.groupBox_3)
self.spinBox_moveLength.setObjectName(u"spinBox_moveLength")
self.spinBox_moveLength.setFont(font1)
self.spinBox_moveLength.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.gridLayout_3.addWidget(self.spinBox_moveLength, 4, 1, 1, 1)
self.radioButton_move_preset_2 = QRadioButton(self.groupBox_3)
self.radioButton_move_preset_2.setObjectName(u"radioButton_move_preset_2")
self.radioButton_move_preset_2.setFont(font1)
self.gridLayout_3.addWidget(self.radioButton_move_preset_2, 2, 0, 1, 1)
self.label_maxRange_preset_3 = QLabel(self.groupBox_3)
self.label_maxRange_preset_3.setObjectName(u"label_maxRange_preset_3")
self.label_maxRange_preset_3.setFont(font1)
self.label_maxRange_preset_3.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_maxRange_preset_3, 3, 2, 1, 1)
self.label_maxRange_preset_2 = QLabel(self.groupBox_3)
self.label_maxRange_preset_2.setObjectName(u"label_maxRange_preset_2")
self.label_maxRange_preset_2.setFont(font1)
self.label_maxRange_preset_2.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_maxRange_preset_2, 2, 2, 1, 1)
self.radioButton_move_preset_3 = QRadioButton(self.groupBox_3)
self.radioButton_move_preset_3.setObjectName(u"radioButton_move_preset_3")
self.radioButton_move_preset_3.setFont(font1)
self.gridLayout_3.addWidget(self.radioButton_move_preset_3, 3, 0, 1, 1)
self.label_moveLength_preset_3 = QLabel(self.groupBox_3)
self.label_moveLength_preset_3.setObjectName(u"label_moveLength_preset_3")
self.label_moveLength_preset_3.setFont(font1)
self.label_moveLength_preset_3.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveLength_preset_3, 3, 1, 1, 1)
self.spinBox_maxRange = QSpinBox(self.groupBox_3)
self.spinBox_maxRange.setObjectName(u"spinBox_maxRange")
self.spinBox_maxRange.setFont(font1)
self.spinBox_maxRange.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.gridLayout_3.addWidget(self.spinBox_maxRange, 4, 2, 1, 1)
self.label_moveSpeed_preset_2 = QLabel(self.groupBox_3)
self.label_moveSpeed_preset_2.setObjectName(u"label_moveSpeed_preset_2")
self.label_moveSpeed_preset_2.setFont(font1)
self.label_moveSpeed_preset_2.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveSpeed_preset_2, 2, 3, 1, 1)
self.spinBox_moveSpeed = QSpinBox(self.groupBox_3)
self.spinBox_moveSpeed.setObjectName(u"spinBox_moveSpeed")
self.spinBox_moveSpeed.setFont(font1)
self.spinBox_moveSpeed.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.gridLayout_3.addWidget(self.spinBox_moveSpeed, 4, 3, 1, 1)
self.label_moveLength_preset_2 = QLabel(self.groupBox_3)
self.label_moveLength_preset_2.setObjectName(u"label_moveLength_preset_2")
self.label_moveLength_preset_2.setFont(font1)
self.label_moveLength_preset_2.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveLength_preset_2, 2, 1, 1, 1)
self.radioButton_move_custom = QRadioButton(self.groupBox_3)
self.radioButton_move_custom.setObjectName(u"radioButton_move_custom")
self.radioButton_move_custom.setFont(font1)
self.gridLayout_3.addWidget(self.radioButton_move_custom, 4, 0, 1, 1)
self.label_moveSpeed_preset_1 = QLabel(self.groupBox_3)
self.label_moveSpeed_preset_1.setObjectName(u"label_moveSpeed_preset_1")
self.label_moveSpeed_preset_1.setFont(font1)
self.label_moveSpeed_preset_1.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_moveSpeed_preset_1, 1, 3, 1, 1)
self.label_7 = QLabel(self.groupBox_3)
self.label_7.setObjectName(u"label_7")
sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Maximum)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(0)
sizePolicy2.setHeightForWidth(self.label_7.sizePolicy().hasHeightForWidth())
self.label_7.setSizePolicy(sizePolicy2)
self.label_7.setFont(font1)
self.label_7.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_7, 0, 1, 1, 1)
self.label_6 = QLabel(self.groupBox_3)
self.label_6.setObjectName(u"label_6")
sizePolicy2.setHeightForWidth(self.label_6.sizePolicy().hasHeightForWidth())
self.label_6.setSizePolicy(sizePolicy2)
self.label_6.setFont(font1)
self.label_6.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_6, 0, 2, 1, 1)
self.label_8 = QLabel(self.groupBox_3)
self.label_8.setObjectName(u"label_8")
sizePolicy2.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth())
self.label_8.setSizePolicy(sizePolicy2)
self.label_8.setFont(font1)
self.label_8.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_8, 0, 3, 1, 1)
self.gridLayout_3.setRowStretch(0, 1)
self.gridLayout_3.setRowStretch(1, 1)
self.gridLayout_3.setRowStretch(2, 1)
self.gridLayout_3.setRowStretch(3, 1)
self.gridLayout_3.setRowStretch(4, 1)
self.gridLayout_3.setColumnStretch(0, 1)
self.gridLayout_3.setColumnStretch(1, 1)
self.gridLayout_3.setColumnStretch(2, 1)
self.gridLayout_3.setColumnStretch(3, 1)
self.verticalLayout_4.addLayout(self.gridLayout_3)
self.verticalLayout_4.setStretch(0, 4)
self.verticalLayout_3.addWidget(self.groupBox_3)
self.verticalLayout_3.setStretch(0, 2)
self.verticalLayout_3.setStretch(1, 1)
self.verticalLayout_3.setStretch(2, 8)
self.verticalLayout_2.addWidget(self.groupBox_2)
self.verticalSpacer_3 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer_3)
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.checkBox = QCheckBox(self.groupBox_left)
self.checkBox.setObjectName(u"checkBox")
self.checkBox.setFont(font1)
self.horizontalLayout_3.addWidget(self.checkBox)
self.pushButton = QPushButton(self.groupBox_left)
self.pushButton.setObjectName(u"pushButton")
sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth())
self.pushButton.setSizePolicy(sizePolicy)
self.pushButton.setFont(font1)
self.horizontalLayout_3.addWidget(self.pushButton)
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
self.verticalLayout_2.setStretch(0, 1)
self.verticalLayout_2.setStretch(1, 1)
self.verticalLayout_2.setStretch(2, 1)
self.verticalLayout_2.setStretch(3, 1)
self.verticalLayout_2.setStretch(4, 6)
self.verticalLayout_2.setStretch(5, 1)
self.verticalLayout_2.setStretch(6, 1)
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
self.groupBox_right = QGroupBox(self.centralwidget)
self.groupBox_right.setObjectName(u"groupBox_right")
self.groupBox_right.setFont(font)
self.gridLayout_4 = QGridLayout(self.groupBox_right)
self.gridLayout_4.setObjectName(u"gridLayout_4")
self.label_9 = QLabel(self.groupBox_right)
self.label_9.setObjectName(u"label_9")
self.label_9.setFont(font1)
self.gridLayout_4.addWidget(self.label_9, 0, 0, 1, 1)
self.spinBox_data_length = QSpinBox(self.groupBox_right)
self.spinBox_data_length.setObjectName(u"spinBox_data_length")
self.spinBox_data_length.setEnabled(False)
self.spinBox_data_length.setFont(font1)
self.spinBox_data_length.setReadOnly(False)
self.spinBox_data_length.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_data_length.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_data_length, 0, 1, 1, 1)
self.label_11 = QLabel(self.groupBox_right)
self.label_11.setObjectName(u"label_11")
self.label_11.setFont(font1)
self.label_11.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_4.addWidget(self.label_11, 2, 0, 1, 1)
self.label_12 = QLabel(self.groupBox_right)
self.label_12.setObjectName(u"label_12")
self.label_12.setFont(font1)
self.label_12.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_4.addWidget(self.label_12, 2, 1, 1, 1)
self.spinBox_peak_length_original = QSpinBox(self.groupBox_right)
self.spinBox_peak_length_original.setObjectName(u"spinBox_peak_length_original")
self.spinBox_peak_length_original.setEnabled(False)
self.spinBox_peak_length_original.setFont(font1)
self.spinBox_peak_length_original.setReadOnly(False)
self.spinBox_peak_length_original.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_peak_length_original.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_peak_length_original, 3, 0, 1, 1)
self.spinBox_peak_length_corrected = QSpinBox(self.groupBox_right)
self.spinBox_peak_length_corrected.setObjectName(u"spinBox_peak_length_corrected")
self.spinBox_peak_length_corrected.setEnabled(False)
self.spinBox_peak_length_corrected.setFont(font1)
self.spinBox_peak_length_corrected.setReadOnly(False)
self.spinBox_peak_length_corrected.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_peak_length_corrected.setMaximum(1000000000)
self.gridLayout_4.addWidget(self.spinBox_peak_length_corrected, 3, 1, 1, 1)
self.tableWidget_peak_original = QTableWidget(self.groupBox_right)
self.tableWidget_peak_original.setObjectName(u"tableWidget_peak_original")
self.tableWidget_peak_original.setFont(font1)
self.gridLayout_4.addWidget(self.tableWidget_peak_original, 4, 0, 1, 1)
self.tableWidget_peak_corrected = QTableWidget(self.groupBox_right)
self.tableWidget_peak_corrected.setObjectName(u"tableWidget_peak_corrected")
self.tableWidget_peak_corrected.setFont(font1)
self.gridLayout_4.addWidget(self.tableWidget_peak_corrected, 4, 1, 1, 1)
self.verticalSpacer_5 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_4.addItem(self.verticalSpacer_5, 1, 0, 1, 2)
self.gridLayout_4.setRowStretch(0, 1)
self.gridLayout_4.setRowStretch(1, 1)
self.gridLayout_4.setRowStretch(2, 1)
self.gridLayout_4.setRowStretch(3, 1)
self.gridLayout_4.setRowStretch(4, 20)
self.gridLayout.addWidget(self.groupBox_right, 0, 2, 1, 1)
self.gridLayout.setColumnStretch(0, 2)
self.gridLayout.setColumnStretch(1, 6)
self.gridLayout.setColumnStretch(2, 2)
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow)
self.statusbar.setObjectName(u"statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QMetaObject.connectSlotsByName(MainWindow)
# setupUi
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"\u4eba\u5de5\u7ea0\u6b63", None))
self.groupBox_canvas.setTitle(QCoreApplication.translate("MainWindow", u"\u7ed8\u56fe\u533a", None))
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow", u"\u4eba\u5de5\u7ea0\u6b63", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_input.setText(QCoreApplication.translate("MainWindow", u"\u5f00\u59cb\u5bfc\u5165", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow", u"\u5bfb\u5cf0\u53c2\u6570\u8bbe\u7f6e", None))
self.label_4.setText(QCoreApplication.translate("MainWindow", u"\u6700\u5c0f\u95f4\u9694", None))
self.label_3.setText(QCoreApplication.translate("MainWindow", u"\u6700\u5c0f\u9ad8\u5ea6", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow", u"\u81ea\u52a8\u64ad\u653e", None))
self.pushButton_prev_move.setText(QCoreApplication.translate("MainWindow", u"< <(A)", None))
self.pushButton_pause.setText(QCoreApplication.translate("MainWindow", u"| |(S)", None))
self.pushButton_next_move.setText(QCoreApplication.translate("MainWindow", u"> >(D)", None))
self.groupBox_3.setTitle(QCoreApplication.translate("MainWindow", u"\u8bbe\u7f6e", None))
self.label_moveLength_preset_1.setText(QCoreApplication.translate("MainWindow", u"10000", None))
self.label_maxRange_preset_1.setText(QCoreApplication.translate("MainWindow", u"40000", None))
self.radioButton_move_preset_1.setText(QCoreApplication.translate("MainWindow", u"\u9884\u8bbe1", None))
self.label_moveSpeed_preset_3.setText(QCoreApplication.translate("MainWindow", u"500", None))
self.radioButton_move_preset_2.setText(QCoreApplication.translate("MainWindow", u"\u9884\u8bbe2", None))
self.label_maxRange_preset_3.setText(QCoreApplication.translate("MainWindow", u"100000", None))
self.label_maxRange_preset_2.setText(QCoreApplication.translate("MainWindow", u"80000", None))
self.radioButton_move_preset_3.setText(QCoreApplication.translate("MainWindow", u"\u9884\u8bbe3", None))
self.label_moveLength_preset_3.setText(QCoreApplication.translate("MainWindow", u"25000", None))
self.label_moveSpeed_preset_2.setText(QCoreApplication.translate("MainWindow", u"500", None))
self.label_moveLength_preset_2.setText(QCoreApplication.translate("MainWindow", u"20000", None))
self.radioButton_move_custom.setText(QCoreApplication.translate("MainWindow", u"\u81ea\u5b9a\u4e49", None))
self.label_moveSpeed_preset_1.setText(QCoreApplication.translate("MainWindow", u"500", None))
self.label_7.setText(QCoreApplication.translate("MainWindow", u"\u79fb\u52a8\u8ddd\u79bb", None))
self.label_6.setText(QCoreApplication.translate("MainWindow", u"\u6700\u5927\u8303\u56f4", None))
self.label_8.setText(QCoreApplication.translate("MainWindow", u"\u79fb\u52a8\u95f4\u9694(ms)", None))
self.checkBox.setText(QCoreApplication.translate("MainWindow", u"\u7ed8\u5236\u53c2\u8003\u7ebf", None))
self.pushButton.setText(QCoreApplication.translate("MainWindow", u"\u5bfc\u51fa\u6807\u7b7e", None))
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow", u"\u5cf0\u503c\u5750\u6807\u548c\u4fe1\u606f", None))
self.label_9.setText(QCoreApplication.translate("MainWindow", u"\u6570\u636e\u957f\u5ea6(\u70b9\u6570)", None))
self.label_11.setText(QCoreApplication.translate("MainWindow", u"\u7ea0\u6b63\u524d\u5cf0\u503c\u4e2a\u6570", None))
self.label_12.setText(QCoreApplication.translate("MainWindow", u"\u7ea0\u6b63\u540e\u5cf0\u503c\u4e2a\u6570", None))
# retranslateUi

View File

@ -0,0 +1,765 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1920</width>
<height>1080</height>
</rect>
</property>
<property name="windowTitle">
<string>人工纠正</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout" columnstretch="2,6,2">
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_canvas">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>绘图区</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_canvas"/>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_left">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>人工纠正</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,1,1,6,1,1">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="pushButton_input_setting">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>导入设置</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_input">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>开始导入</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>寻峰参数设置</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>最小间隔</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_findpeaks_min_interval">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="maximum">
<double>10000.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>最小高度</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_findpeaks_min_height">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="maximum">
<double>10000.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>自动播放</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="2,1,8">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="pushButton_prev_move">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>&lt; &lt;(A)</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_pause">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>| |(S)</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_next_move">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>&gt; &gt;(D)</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>设置</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="4">
<item>
<layout class="QGridLayout" name="gridLayout_3" rowstretch="1,1,1,1,1" columnstretch="1,1,1,1">
<item row="1" column="1">
<widget class="QLabel" name="label_moveLength_preset_1">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>10000</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_maxRange_preset_1">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>40000</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButton_move_preset_1">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>预设1</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="label_moveSpeed_preset_3">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>500</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="spinBox_moveLength">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="radioButton_move_preset_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>预设2</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_maxRange_preset_3">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>100000</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_maxRange_preset_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>80000</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="radioButton_move_preset_3">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>预设3</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_moveLength_preset_3">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>25000</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QSpinBox" name="spinBox_maxRange">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="label_moveSpeed_preset_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>500</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QSpinBox" name="spinBox_moveSpeed">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_moveLength_preset_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>20000</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QRadioButton" name="radioButton_move_custom">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>自定义</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_moveSpeed_preset_1">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>500</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>移动距离</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>最大范围</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_8">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>移动间隔(ms)</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="checkBox">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>绘制参考线</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>导出标签</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="0" column="2">
<widget class="QGroupBox" name="groupBox_right">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>峰值坐标和信息</string>
</property>
<layout class="QGridLayout" name="gridLayout_4" rowstretch="1,1,1,1,20">
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>数据长度(点数)</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBox_data_length">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="readOnly">
<bool>false</bool>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property>
<property name="maximum">
<number>1000000000</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_11">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>纠正前峰值个数</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_12">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>纠正后峰值个数</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QSpinBox" name="spinBox_peak_length_original">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="readOnly">
<bool>false</bool>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property>
<property name="maximum">
<number>1000000000</number>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="spinBox_peak_length_corrected">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="readOnly">
<bool>false</bool>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property>
<property name="maximum">
<number>1000000000</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QTableWidget" name="tableWidget_peak_original">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QTableWidget" name="tableWidget_peak_corrected">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -50,6 +50,9 @@ class Ui_MainWindow_preprocess(object):
self.gridLayout.setObjectName(u"gridLayout") self.gridLayout.setObjectName(u"gridLayout")
self.groupBox_canvas = QGroupBox(self.centralwidget) self.groupBox_canvas = QGroupBox(self.centralwidget)
self.groupBox_canvas.setObjectName(u"groupBox_canvas") self.groupBox_canvas.setObjectName(u"groupBox_canvas")
font2 = QFont()
font2.setPointSize(10)
self.groupBox_canvas.setFont(font2)
self.verticalLayout_7 = QVBoxLayout(self.groupBox_canvas) self.verticalLayout_7 = QVBoxLayout(self.groupBox_canvas)
self.verticalLayout_7.setObjectName(u"verticalLayout_7") self.verticalLayout_7.setObjectName(u"verticalLayout_7")
self.verticalLayout_canvas = QVBoxLayout() self.verticalLayout_canvas = QVBoxLayout()
@ -62,8 +65,6 @@ class Ui_MainWindow_preprocess(object):
self.groupBox_left = QGroupBox(self.centralwidget) self.groupBox_left = QGroupBox(self.centralwidget)
self.groupBox_left.setObjectName(u"groupBox_left") self.groupBox_left.setObjectName(u"groupBox_left")
font2 = QFont()
font2.setPointSize(10)
self.groupBox_left.setFont(font2) self.groupBox_left.setFont(font2)
self.verticalLayout = QVBoxLayout(self.groupBox_left) self.verticalLayout = QVBoxLayout(self.groupBox_left)
self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setObjectName(u"verticalLayout")
@ -209,9 +210,9 @@ class Ui_MainWindow_preprocess(object):
self.gridLayout.setColumnStretch(0, 2) self.gridLayout.setColumnStretch(0, 2)
self.gridLayout.setColumnStretch(1, 8) self.gridLayout.setColumnStretch(1, 8)
MainWindow_preprocess.setCentralWidget(self.centralwidget) MainWindow_preprocess.setCentralWidget(self.centralwidget)
self.statusBar = QStatusBar(MainWindow_preprocess) self.statusbar = QStatusBar(MainWindow_preprocess)
self.statusBar.setObjectName(u"statusBar") self.statusbar.setObjectName(u"statusbar")
MainWindow_preprocess.setStatusBar(self.statusBar) MainWindow_preprocess.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_preprocess) self.retranslateUi(MainWindow_preprocess)

View File

@ -31,6 +31,11 @@
<layout class="QGridLayout" name="gridLayout" columnstretch="2,8"> <layout class="QGridLayout" name="gridLayout" columnstretch="2,8">
<item row="0" column="1"> <item row="0" column="1">
<widget class="QGroupBox" name="groupBox_canvas"> <widget class="QGroupBox" name="groupBox_canvas">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title"> <property name="title">
<string>绘图区</string> <string>绘图区</string>
</property> </property>
@ -275,7 +280,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QStatusBar" name="statusBar"/> <widget class="QStatusBar" name="statusbar"/>
<action name="action_selectPath"> <action name="action_selectPath">
<property name="text"> <property name="text">
<string>数据路径选择</string> <string>数据路径选择</string>

View File

@ -0,0 +1,175 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'artifact_label_input_setting.ui'
##
## Created by: Qt User Interface Compiler version 6.8.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QGridLayout, QGroupBox, QHBoxLayout,
QLabel, QMainWindow, QPlainTextEdit, QPushButton,
QSizePolicy, QSpinBox, QStatusBar, QVBoxLayout,
QWidget)
class Ui_MainWindow_artifact_label_input_setting(object):
def setupUi(self, MainWindow_artifact_label_input_setting):
if not MainWindow_artifact_label_input_setting.objectName():
MainWindow_artifact_label_input_setting.setObjectName(u"MainWindow_artifact_label_input_setting")
MainWindow_artifact_label_input_setting.resize(480, 800)
self.centralwidget = QWidget(MainWindow_artifact_label_input_setting)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.pushButton_cancel = QPushButton(self.centralwidget)
self.pushButton_cancel.setObjectName(u"pushButton_cancel")
font = QFont()
font.setPointSize(12)
self.pushButton_cancel.setFont(font)
self.gridLayout.addWidget(self.pushButton_cancel, 1, 3, 1, 1)
self.groupBox = QGroupBox(self.centralwidget)
self.groupBox.setObjectName(u"groupBox")
font1 = QFont()
font1.setPointSize(10)
self.groupBox.setFont(font1)
self.verticalLayout_2 = QVBoxLayout(self.groupBox)
self.verticalLayout_2.setObjectName(u"verticalLayout_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_5 = QVBoxLayout(self.groupBox_file_path_input_orgBcg)
self.verticalLayout_5.setObjectName(u"verticalLayout_5")
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.label_2 = QLabel(self.groupBox_file_path_input_orgBcg)
self.label_2.setObjectName(u"label_2")
self.label_2.setFont(font)
self.horizontalLayout_2.addWidget(self.label_2)
self.spinBox_input_freq_orgBcg = QSpinBox(self.groupBox_file_path_input_orgBcg)
self.spinBox_input_freq_orgBcg.setObjectName(u"spinBox_input_freq_orgBcg")
self.spinBox_input_freq_orgBcg.setFont(font)
self.spinBox_input_freq_orgBcg.setMinimum(1)
self.spinBox_input_freq_orgBcg.setMaximum(1000000)
self.horizontalLayout_2.addWidget(self.spinBox_input_freq_orgBcg)
self.verticalLayout_5.addLayout(self.horizontalLayout_2)
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_5.addWidget(self.plainTextEdit_file_path_input_orgBcg)
self.verticalLayout_5.setStretch(0, 1)
self.verticalLayout_5.setStretch(1, 2)
self.verticalLayout_2.addWidget(self.groupBox_file_path_input_orgBcg)
self.groupBox_file_path_input_BCG = QGroupBox(self.groupBox)
self.groupBox_file_path_input_BCG.setObjectName(u"groupBox_file_path_input_BCG")
self.verticalLayout_3 = QVBoxLayout(self.groupBox_file_path_input_BCG)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.label = QLabel(self.groupBox_file_path_input_BCG)
self.label.setObjectName(u"label")
self.label.setFont(font)
self.horizontalLayout.addWidget(self.label)
self.spinBox_input_freq_BCG = QSpinBox(self.groupBox_file_path_input_BCG)
self.spinBox_input_freq_BCG.setObjectName(u"spinBox_input_freq_BCG")
self.spinBox_input_freq_BCG.setFont(font)
self.spinBox_input_freq_BCG.setMinimum(1)
self.spinBox_input_freq_BCG.setMaximum(1000000)
self.horizontalLayout.addWidget(self.spinBox_input_freq_BCG)
self.verticalLayout_3.addLayout(self.horizontalLayout)
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_3.addWidget(self.plainTextEdit_file_path_input_BCG)
self.verticalLayout_3.setStretch(0, 1)
self.verticalLayout_3.setStretch(1, 2)
self.verticalLayout_2.addWidget(self.groupBox_file_path_input_BCG)
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)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.plainTextEdit_file_path_save_a = QPlainTextEdit(self.groupBox_file_path_save)
self.plainTextEdit_file_path_save_a.setObjectName(u"plainTextEdit_file_path_save_a")
self.verticalLayout_4.addWidget(self.plainTextEdit_file_path_save_a)
self.plainTextEdit_file_path_save_b = QPlainTextEdit(self.groupBox_file_path_save)
self.plainTextEdit_file_path_save_b.setObjectName(u"plainTextEdit_file_path_save_b")
self.verticalLayout_4.addWidget(self.plainTextEdit_file_path_save_b)
self.plainTextEdit_file_path_save_c = QPlainTextEdit(self.groupBox_file_path_save)
self.plainTextEdit_file_path_save_c.setObjectName(u"plainTextEdit_file_path_save_c")
self.verticalLayout_4.addWidget(self.plainTextEdit_file_path_save_c)
self.verticalLayout_2.addWidget(self.groupBox_file_path_save)
self.verticalLayout_2.setStretch(0, 2)
self.verticalLayout_2.setStretch(1, 2)
self.verticalLayout_2.setStretch(2, 3)
self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 4)
self.pushButton_confirm = QPushButton(self.centralwidget)
self.pushButton_confirm.setObjectName(u"pushButton_confirm")
self.pushButton_confirm.setFont(font)
self.gridLayout.addWidget(self.pushButton_confirm, 1, 2, 1, 1)
MainWindow_artifact_label_input_setting.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_artifact_label_input_setting)
self.statusbar.setObjectName(u"statusbar")
MainWindow_artifact_label_input_setting.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_artifact_label_input_setting)
QMetaObject.connectSlotsByName(MainWindow_artifact_label_input_setting)
# setupUi
def retranslateUi(self, MainWindow_artifact_label_input_setting):
MainWindow_artifact_label_input_setting.setWindowTitle(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_cancel.setText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u53d6\u6d88", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_orgBcg.setTitle(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u540c\u6b65\u540e\u7684orgBcg\u8def\u5f84", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input_orgBcg.setPlainText("")
self.plainTextEdit_file_path_input_orgBcg.setPlaceholderText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_BCG.setTitle(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u540c\u6b65\u540e\u7684BCG\u8def\u5f84", None))
self.label.setText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input_BCG.setPlainText("")
self.plainTextEdit_file_path_input_BCG.setPlaceholderText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_save.setTitle(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u4f53\u52a8\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_save_a.setPlaceholderText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_save_b.setPlaceholderText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_save_c.setPlaceholderText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.pushButton_confirm.setText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u786e\u5b9a", None))
# retranslateUi

View File

@ -0,0 +1,192 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow_artifact_label_input_setting</class>
<widget class="QMainWindow" name="MainWindow_artifact_label_input_setting">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>480</width>
<height>800</height>
</rect>
</property>
<property name="windowTitle">
<string>导入设置</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="3">
<widget class="QPushButton" name="pushButton_cancel">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>取消</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QGroupBox" name="groupBox">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>文件路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="2,2,3">
<item>
<widget class="QGroupBox" name="groupBox_file_path_input_orgBcg">
<property name="title">
<string>同步后的orgBcg路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="1,2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>采样率(Hz)</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_input_freq_orgBcg">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_orgBcg">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_file_path_input_BCG">
<property name="title">
<string>同步后的BCG路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="1,2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>采样率(Hz)</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_input_freq_BCG">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_BCG">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_file_path_save">
<property name="title">
<string>体动保存路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_save_a">
<property name="placeholderText">
<string>保存路径</string>
</property>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_save_b">
<property name="placeholderText">
<string>保存路径</string>
</property>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_save_c">
<property name="placeholderText">
<string>保存路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButton_confirm">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>确定</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -23,7 +23,7 @@ class Ui_MainWindow_detect_Jpeak_input_setting(object):
def setupUi(self, MainWindow_detect_Jpeak_input_setting): def setupUi(self, MainWindow_detect_Jpeak_input_setting):
if not MainWindow_detect_Jpeak_input_setting.objectName(): if not MainWindow_detect_Jpeak_input_setting.objectName():
MainWindow_detect_Jpeak_input_setting.setObjectName(u"MainWindow_detect_Jpeak_input_setting") MainWindow_detect_Jpeak_input_setting.setObjectName(u"MainWindow_detect_Jpeak_input_setting")
MainWindow_detect_Jpeak_input_setting.resize(487, 417) MainWindow_detect_Jpeak_input_setting.resize(480, 420)
self.centralwidget = QWidget(MainWindow_detect_Jpeak_input_setting) self.centralwidget = QWidget(MainWindow_detect_Jpeak_input_setting)
self.centralwidget.setObjectName(u"centralwidget") self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget) self.gridLayout = QGridLayout(self.centralwidget)
@ -38,6 +38,9 @@ class Ui_MainWindow_detect_Jpeak_input_setting(object):
self.groupBox = QGroupBox(self.centralwidget) self.groupBox = QGroupBox(self.centralwidget)
self.groupBox.setObjectName(u"groupBox") self.groupBox.setObjectName(u"groupBox")
font1 = QFont()
font1.setPointSize(10)
self.groupBox.setFont(font1)
self.verticalLayout_2 = QVBoxLayout(self.groupBox) self.verticalLayout_2 = QVBoxLayout(self.groupBox)
self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.groupBox_file_path_input = QGroupBox(self.groupBox) self.groupBox_file_path_input = QGroupBox(self.groupBox)

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>487</width> <width>480</width>
<height>417</height> <height>420</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -29,6 +29,11 @@
</item> </item>
<item row="0" column="0" colspan="4"> <item row="0" column="0" colspan="4">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title"> <property name="title">
<string>文件路径</string> <string>文件路径</string>
</property> </property>

View File

@ -0,0 +1,121 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'detect_Rpeak_input_setting.ui'
##
## Created by: Qt User Interface Compiler version 6.8.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QGridLayout, QGroupBox, QHBoxLayout,
QLabel, QMainWindow, QPlainTextEdit, QPushButton,
QSizePolicy, QSpinBox, QVBoxLayout, QWidget)
class Ui_MainWindow_detect_Rpeak_input_setting(object):
def setupUi(self, MainWindow_detect_Rpeak_input_setting):
if not MainWindow_detect_Rpeak_input_setting.objectName():
MainWindow_detect_Rpeak_input_setting.setObjectName(u"MainWindow_detect_Rpeak_input_setting")
MainWindow_detect_Rpeak_input_setting.resize(480, 320)
self.centralwidget = QWidget(MainWindow_detect_Rpeak_input_setting)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.pushButton_cancel = QPushButton(self.centralwidget)
self.pushButton_cancel.setObjectName(u"pushButton_cancel")
font = QFont()
font.setPointSize(12)
self.pushButton_cancel.setFont(font)
self.gridLayout.addWidget(self.pushButton_cancel, 2, 3, 1, 1)
self.groupBox = QGroupBox(self.centralwidget)
self.groupBox.setObjectName(u"groupBox")
font1 = QFont()
font1.setPointSize(10)
self.groupBox.setFont(font1)
self.verticalLayout_2 = QVBoxLayout(self.groupBox)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.groupBox_file_path_input = QGroupBox(self.groupBox)
self.groupBox_file_path_input.setObjectName(u"groupBox_file_path_input")
self.verticalLayout_3 = QVBoxLayout(self.groupBox_file_path_input)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.label = QLabel(self.groupBox_file_path_input)
self.label.setObjectName(u"label")
self.label.setFont(font)
self.horizontalLayout.addWidget(self.label)
self.spinBox_input_freq = QSpinBox(self.groupBox_file_path_input)
self.spinBox_input_freq.setObjectName(u"spinBox_input_freq")
self.spinBox_input_freq.setFont(font)
self.spinBox_input_freq.setMinimum(1)
self.spinBox_input_freq.setMaximum(1000000)
self.horizontalLayout.addWidget(self.spinBox_input_freq)
self.verticalLayout_3.addLayout(self.horizontalLayout)
self.plainTextEdit_file_path_input = QPlainTextEdit(self.groupBox_file_path_input)
self.plainTextEdit_file_path_input.setObjectName(u"plainTextEdit_file_path_input")
self.verticalLayout_3.addWidget(self.plainTextEdit_file_path_input)
self.verticalLayout_3.setStretch(0, 1)
self.verticalLayout_3.setStretch(1, 2)
self.verticalLayout_2.addWidget(self.groupBox_file_path_input)
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)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.plainTextEdit_file_path_save = QPlainTextEdit(self.groupBox_file_path_save)
self.plainTextEdit_file_path_save.setObjectName(u"plainTextEdit_file_path_save")
self.verticalLayout_4.addWidget(self.plainTextEdit_file_path_save)
self.verticalLayout_2.addWidget(self.groupBox_file_path_save)
self.verticalLayout_2.setStretch(0, 1)
self.verticalLayout_2.setStretch(1, 1)
self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 4)
self.pushButton_confirm = QPushButton(self.centralwidget)
self.pushButton_confirm.setObjectName(u"pushButton_confirm")
self.pushButton_confirm.setFont(font)
self.gridLayout.addWidget(self.pushButton_confirm, 2, 2, 1, 1)
MainWindow_detect_Rpeak_input_setting.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow_detect_Rpeak_input_setting)
QMetaObject.connectSlotsByName(MainWindow_detect_Rpeak_input_setting)
# setupUi
def retranslateUi(self, MainWindow_detect_Rpeak_input_setting):
MainWindow_detect_Rpeak_input_setting.setWindowTitle(QCoreApplication.translate("MainWindow_detect_Rpeak_input_setting", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_cancel.setText(QCoreApplication.translate("MainWindow_detect_Rpeak_input_setting", u"\u53d6\u6d88", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_detect_Rpeak_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input.setTitle(QCoreApplication.translate("MainWindow_detect_Rpeak_input_setting", u"\u6ee4\u6ce2\u540e\u7684ECG\u8def\u5f84", None))
self.label.setText(QCoreApplication.translate("MainWindow_detect_Rpeak_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input.setPlainText("")
self.plainTextEdit_file_path_input.setPlaceholderText(QCoreApplication.translate("MainWindow_detect_Rpeak_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_save.setTitle(QCoreApplication.translate("MainWindow_detect_Rpeak_input_setting", u"\u7b97\u6cd5\u8bc6\u522b\u51fa\u7684R\u5cf0\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_save.setPlaceholderText(QCoreApplication.translate("MainWindow_detect_Rpeak_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.pushButton_confirm.setText(QCoreApplication.translate("MainWindow_detect_Rpeak_input_setting", u"\u786e\u5b9a", None))
# retranslateUi

View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow_detect_Rpeak_input_setting</class>
<widget class="QMainWindow" name="MainWindow_detect_Rpeak_input_setting">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>480</width>
<height>320</height>
</rect>
</property>
<property name="windowTitle">
<string>导入设置</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="3">
<widget class="QPushButton" name="pushButton_cancel">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>取消</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QGroupBox" name="groupBox">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>文件路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1">
<item>
<widget class="QGroupBox" name="groupBox_file_path_input">
<property name="title">
<string>滤波后的ECG路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="1,2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>采样率(Hz)</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_input_freq">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_file_path_save">
<property name="title">
<string>算法识别出的R峰保存路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_save">
<property name="placeholderText">
<string>保存路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="pushButton_confirm">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>确定</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,193 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'label_check_input_setting.ui'
##
## Created by: Qt User Interface Compiler version 6.8.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QGridLayout, QGroupBox, QHBoxLayout,
QLabel, QMainWindow, QPlainTextEdit, QPushButton,
QSizePolicy, QSpinBox, QStatusBar, QVBoxLayout,
QWidget)
class Ui_MainWindow_artifact_label_input_setting(object):
def setupUi(self, MainWindow_artifact_label_input_setting):
if not MainWindow_artifact_label_input_setting.objectName():
MainWindow_artifact_label_input_setting.setObjectName(u"MainWindow_artifact_label_input_setting")
MainWindow_artifact_label_input_setting.resize(540, 540)
self.centralwidget = QWidget(MainWindow_artifact_label_input_setting)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.pushButton_cancel = QPushButton(self.centralwidget)
self.pushButton_cancel.setObjectName(u"pushButton_cancel")
font = QFont()
font.setPointSize(12)
self.pushButton_cancel.setFont(font)
self.gridLayout.addWidget(self.pushButton_cancel, 1, 3, 1, 1)
self.groupBox = QGroupBox(self.centralwidget)
self.groupBox.setObjectName(u"groupBox")
font1 = QFont()
font1.setPointSize(10)
self.groupBox.setFont(font1)
self.verticalLayout_2 = QVBoxLayout(self.groupBox)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.groupBox_file_path_input_signal = QGroupBox(self.groupBox)
self.groupBox_file_path_input_signal.setObjectName(u"groupBox_file_path_input_signal")
self.verticalLayout_5 = QVBoxLayout(self.groupBox_file_path_input_signal)
self.verticalLayout_5.setObjectName(u"verticalLayout_5")
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.label_2 = QLabel(self.groupBox_file_path_input_signal)
self.label_2.setObjectName(u"label_2")
self.label_2.setFont(font)
self.horizontalLayout_2.addWidget(self.label_2)
self.spinBox_input_freq_signal = QSpinBox(self.groupBox_file_path_input_signal)
self.spinBox_input_freq_signal.setObjectName(u"spinBox_input_freq_signal")
self.spinBox_input_freq_signal.setFont(font)
self.spinBox_input_freq_signal.setMinimum(1)
self.spinBox_input_freq_signal.setMaximum(1000000)
self.horizontalLayout_2.addWidget(self.spinBox_input_freq_signal)
self.verticalLayout_5.addLayout(self.horizontalLayout_2)
self.groupBox_2 = QGroupBox(self.groupBox_file_path_input_signal)
self.groupBox_2.setObjectName(u"groupBox_2")
self.horizontalLayout = QHBoxLayout(self.groupBox_2)
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.label = QLabel(self.groupBox_2)
self.label.setObjectName(u"label")
self.label.setFont(font)
self.label.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.horizontalLayout.addWidget(self.label)
self.spinBox_bandPassOrder = QSpinBox(self.groupBox_2)
self.spinBox_bandPassOrder.setObjectName(u"spinBox_bandPassOrder")
self.spinBox_bandPassOrder.setFont(font)
self.horizontalLayout.addWidget(self.spinBox_bandPassOrder)
self.label_3 = QLabel(self.groupBox_2)
self.label_3.setObjectName(u"label_3")
self.label_3.setFont(font)
self.label_3.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.horizontalLayout.addWidget(self.label_3)
self.spinBox_bandPassLow = QSpinBox(self.groupBox_2)
self.spinBox_bandPassLow.setObjectName(u"spinBox_bandPassLow")
self.spinBox_bandPassLow.setFont(font)
self.horizontalLayout.addWidget(self.spinBox_bandPassLow)
self.label_4 = QLabel(self.groupBox_2)
self.label_4.setObjectName(u"label_4")
self.label_4.setFont(font)
self.label_4.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.horizontalLayout.addWidget(self.label_4)
self.spinBox_bandPassHigh = QSpinBox(self.groupBox_2)
self.spinBox_bandPassHigh.setObjectName(u"spinBox_bandPassHigh")
self.spinBox_bandPassHigh.setFont(font)
self.horizontalLayout.addWidget(self.spinBox_bandPassHigh)
self.verticalLayout_5.addWidget(self.groupBox_2)
self.plainTextEdit_file_path_input_signal = QPlainTextEdit(self.groupBox_file_path_input_signal)
self.plainTextEdit_file_path_input_signal.setObjectName(u"plainTextEdit_file_path_input_signal")
self.verticalLayout_5.addWidget(self.plainTextEdit_file_path_input_signal)
self.verticalLayout_5.setStretch(0, 2)
self.verticalLayout_5.setStretch(1, 2)
self.verticalLayout_5.setStretch(2, 3)
self.verticalLayout_2.addWidget(self.groupBox_file_path_input_signal)
self.groupBox_file_path_input_peak = QGroupBox(self.groupBox)
self.groupBox_file_path_input_peak.setObjectName(u"groupBox_file_path_input_peak")
self.verticalLayout_3 = QVBoxLayout(self.groupBox_file_path_input_peak)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.plainTextEdit_file_path_input_peak = QPlainTextEdit(self.groupBox_file_path_input_peak)
self.plainTextEdit_file_path_input_peak.setObjectName(u"plainTextEdit_file_path_input_peak")
self.verticalLayout_3.addWidget(self.plainTextEdit_file_path_input_peak)
self.verticalLayout_3.setStretch(0, 2)
self.verticalLayout_2.addWidget(self.groupBox_file_path_input_peak)
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)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.plainTextEdit_file_path_save = QPlainTextEdit(self.groupBox_file_path_save)
self.plainTextEdit_file_path_save.setObjectName(u"plainTextEdit_file_path_save")
self.verticalLayout_4.addWidget(self.plainTextEdit_file_path_save)
self.verticalLayout_2.addWidget(self.groupBox_file_path_save)
self.verticalLayout_2.setStretch(0, 4)
self.verticalLayout_2.setStretch(1, 2)
self.verticalLayout_2.setStretch(2, 2)
self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 4)
self.pushButton_confirm = QPushButton(self.centralwidget)
self.pushButton_confirm.setObjectName(u"pushButton_confirm")
self.pushButton_confirm.setFont(font)
self.gridLayout.addWidget(self.pushButton_confirm, 1, 2, 1, 1)
MainWindow_artifact_label_input_setting.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_artifact_label_input_setting)
self.statusbar.setObjectName(u"statusbar")
MainWindow_artifact_label_input_setting.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_artifact_label_input_setting)
QMetaObject.connectSlotsByName(MainWindow_artifact_label_input_setting)
# setupUi
def retranslateUi(self, MainWindow_artifact_label_input_setting):
MainWindow_artifact_label_input_setting.setWindowTitle(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_cancel.setText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u53d6\u6d88", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_signal.setTitle(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u9884\u5904\u7406\u540e\u7684\u4fe1\u53f7\u8def\u5f84", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u5e26\u901a\u6ee4\u6ce2\u8bbe\u7f6e", None))
self.label.setText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u9636\u6570", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u622a\u6b62\u9891\u7387(Hz)", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"~", None))
self.plainTextEdit_file_path_input_signal.setPlainText("")
self.plainTextEdit_file_path_input_signal.setPlaceholderText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_peak.setTitle(QCoreApplication.translate("MainWindow_artifact_label_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_artifact_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_save.setTitle(QCoreApplication.translate("MainWindow_artifact_label_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_artifact_label_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.pushButton_confirm.setText(QCoreApplication.translate("MainWindow_artifact_label_input_setting", u"\u786e\u5b9a", None))
# retranslateUi

View File

@ -0,0 +1,228 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow_artifact_label_input_setting</class>
<widget class="QMainWindow" name="MainWindow_artifact_label_input_setting">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>540</width>
<height>540</height>
</rect>
</property>
<property name="windowTitle">
<string>导入设置</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="3">
<widget class="QPushButton" name="pushButton_cancel">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>取消</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QGroupBox" name="groupBox">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>文件路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="4,2,2">
<item>
<widget class="QGroupBox" name="groupBox_file_path_input_signal">
<property name="title">
<string>预处理后的信号路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="2,2,3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>采样率(Hz)</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_input_freq_signal">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>带通滤波设置</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>阶数</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_bandPassOrder">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>截止频率(Hz)</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_bandPassLow">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>~</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_bandPassHigh">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_signal">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_file_path_input_peak">
<property name="title">
<string>算法定位的峰值路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="2">
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_peak">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_file_path_save">
<property name="title">
<string>人工纠正后的峰值保存路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_save">
<property name="placeholderText">
<string>保存路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButton_confirm">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>确定</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -23,7 +23,7 @@ class Ui_MainWindow_preprocess_input_setting(object):
def setupUi(self, MainWindow_preprocess_input_setting): def setupUi(self, MainWindow_preprocess_input_setting):
if not MainWindow_preprocess_input_setting.objectName(): if not MainWindow_preprocess_input_setting.objectName():
MainWindow_preprocess_input_setting.setObjectName(u"MainWindow_preprocess_input_setting") MainWindow_preprocess_input_setting.setObjectName(u"MainWindow_preprocess_input_setting")
MainWindow_preprocess_input_setting.resize(487, 373) MainWindow_preprocess_input_setting.resize(480, 320)
self.centralwidget = QWidget(MainWindow_preprocess_input_setting) self.centralwidget = QWidget(MainWindow_preprocess_input_setting)
self.centralwidget.setObjectName(u"centralwidget") self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget) self.gridLayout = QGridLayout(self.centralwidget)
@ -38,6 +38,9 @@ class Ui_MainWindow_preprocess_input_setting(object):
self.groupBox = QGroupBox(self.centralwidget) self.groupBox = QGroupBox(self.centralwidget)
self.groupBox.setObjectName(u"groupBox") self.groupBox.setObjectName(u"groupBox")
font1 = QFont()
font1.setPointSize(10)
self.groupBox.setFont(font1)
self.verticalLayout_2 = QVBoxLayout(self.groupBox) self.verticalLayout_2 = QVBoxLayout(self.groupBox)
self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.groupBox_file_path_input = QGroupBox(self.groupBox) self.groupBox_file_path_input = QGroupBox(self.groupBox)

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>487</width> <width>480</width>
<height>373</height> <height>320</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -29,6 +29,11 @@
</item> </item>
<item row="0" column="0" colspan="4"> <item row="0" column="0" colspan="4">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title"> <property name="title">
<string>文件路径</string> <string>文件路径</string>
</property> </property>