Compare commits

..

87 Commits

Author SHA1 Message Date
0935aefeb2 新增粗对齐重采样功能,优化相关异常处理和UI元素,更新常量定义 2026-01-22 21:46:39 +08:00
a0254d8e66 修正低通滤波器通道名称,从"0.7lowpass_resp"更改为"0.5lowpass_resp",确保一致性 2026-01-20 15:44:51 +08:00
1285789b56 优化数据处理逻辑,新增sanitize_data方法以转换NumPy类型为原生Python类型,修正数据保存格式 2025-12-28 20:11:00 +08:00
986188cf9d 优化异常处理,新增traceback打印以便于调试,调整低通滤波器参数 2025-12-27 14:02:55 +08:00
df0df6ad4f 修正remark获取逻辑,优化待讨论状态判断条件 2025-12-23 16:58:51 +08:00
ee45d1d351 优化文件路径检查逻辑,修正路径引用方式以确保文件存在性验证 2025-12-20 13:20:55 +08:00
800c68655f 优化BCG和ECG信号对齐逻辑,修正前后信号计算方式,简化剩余长度计算 2025-12-19 11:11:23 +08:00
e7583fdb8d 新增删除历史粗对齐文件功能,优化相关常量和UI组件名称 2025-12-19 10:37:53 +08:00
b11fe50419 优化文件路径配置,新增同步路径参数,增强输入文件检查逻辑 2025-12-18 21:20:43 +08:00
af59f9d257 新增OrgBCG偏移微调功能,优化粗对齐信息获取和计算逻辑,调整UI布局和组件名称 2025-12-18 21:20:35 +08:00
6c688f26cf 重构数据切割和标签映射模块,新增OrgBCG和ECG通道支持,优化文件路径和异常处理逻辑,调整UI组件名称和布局 2025-12-18 20:00:45 +08:00
860bddf0a3 优化界面布局,新增偏移量调整功能,支持x轴解绑,手动获取偏移位置,调整控件大小和字体,增强X轴同步处理逻辑 2025-12-18 10:34:48 +08:00
2166a5827c 优化X轴联动功能,增强同步处理逻辑,避免回调冲突 2025-12-17 15:45:21 +08:00
02fe64012c 优化绘图逻辑,增强X轴联动功能,调整刻度格式化 2025-12-17 15:33:24 +08:00
6845626fe9 新增偏移格式化函数,优化BCG提前模式下的X轴刻度显示 2025-12-17 15:00:05 +08:00
ea024eafbc 优化文件路径读取逻辑,增强异常处理,调整信号处理流程 2025-12-17 01:38:22 +08:00
c6161e7dd5 优化J峰和R峰的绘制逻辑,调整BCG提前模式下的峰值位置计算 2025-12-17 01:38:07 +08:00
17eb1b34be 新增更新状态按钮及其快捷键,优化用户操作体验 2025-12-17 00:24:39 +08:00
334106006e 更新界面文本,优化幅值放缩设置的描述 2025-12-16 17:00:08 +08:00
1d791320eb 新增批量大小和幅值放缩设置,优化J峰预测功能 2025-12-16 16:57:30 +08:00
cbf871ca8c 新增快捷键设置功能,优化用户操作体验 2025-12-16 15:49:26 +08:00
347fe0dbac 重构重采样函数调用,使用别名以提高代码可读性 2025-12-16 13:46:52 +08:00
7237188b7d Revert "修正重采样函数调用错误与命名错误"
This reverts commit a3f2f04219.
2025-12-16 13:45:33 +08:00
a3f2f04219 修正重采样函数调用错误与命名错误 2025-12-16 13:43:23 +08:00
ca8bc9d7d5 新增设备启动时间偏差计算功能,更新相关错误提示信息 2025-12-16 13:35:43 +08:00
10be50b71c 更新UI,新增时间单位后缀,优化数据处理逻辑以支持秒级配置 2025-12-16 13:10:06 +08:00
20ad915760 更新UI布局,新增样本编号标签和添加zscore限幅选项,调整窗口大小和字体设置 2025-12-15 21:39:34 +08:00
8546ea730a 修正resample函数调用错误 2025-12-15 20:41:23 +08:00
4b3e4db9ac 更新BCG同步路径配置,使用新的频率参数以确保正确保存文件 2025-12-14 14:24:38 +08:00
fd5b3a4b74 新增NS阶段的值配置 2025-12-14 14:08:51 +08:00
e9ca2ec1e9 优化事件处理逻辑,确保新建事件时正确删除现有事件的高亮矩形 2025-09-26 14:51:16 +08:00
746f477703 优化事件处理逻辑,解决新建事件时,点击现有事件,候选新建事件框未删除的问题 2025-09-13 17:40:36 +08:00
704513e2bf 新增Stage同步路径配置,更新界面布局以支持Stage信号输入 2025-09-06 14:11:53 +08:00
4abd6168cd 优化矩形处理逻辑,添加辅助函数以设置矩形的x坐标和宽度,支持不同类型的矩形对象 2025-09-04 15:45:12 +08:00
2a0a62d201 优化矩形处理逻辑,支持不同版本的matplotlib中axvspan返回的对象类型 2025-09-04 11:45:18 +08:00
ca767d46cb 优化事件矩形处理逻辑,添加获取矩形宽度的辅助函数,确保支持不同类型的矩形对象 2025-09-03 22:43:35 +08:00
edd4178e4e 更新SA打标界面,调整信号长度下拉框选项,优化表格行选择行为 2025-09-02 15:33:27 +08:00
588a1ae4ed 优化SA打标界面布局,调整垂直间距和伸缩因子,提升界面可用性 2025-09-02 15:23:52 +08:00
676f3b80ee 修复信号窗口边界计算逻辑,确保返回正确的信号范围 2025-09-01 15:25:17 +08:00
496ff73f9a 更新SA打标界面,添加多个复选框以选择最佳拟合选项,调整布局和对齐方式,优化代码可读性 2025-09-01 15:13:07 +08:00
d622f5afff 优化SA打标界面代码格式,修复缩进和空行问题,增强可读性 2025-08-31 21:50:08 +08:00
95d58b94a7 重构SA打标界面事件索引处理逻辑,优化数据过滤和显示功能 2025-08-31 21:06:59 +08:00
728b020db6 优化SA打标界面前景色设置逻辑,简化条件判断 2025-08-31 20:00:48 +08:00
a7efcd0a85 更新SA打标界面快捷键设置,调整按钮文本及增加新按钮功能 2025-08-31 19:59:29 +08:00
3b8acfa27e 为SA打标界面添加样本编号标签并更新字体设置 2025-08-31 13:27:42 +08:00
da05fcfb2d 为SA打标界面添加自动保存选项并重构按钮布局 2025-08-28 20:41:10 +08:00
6395529d3d 重构SA打标界面 2025-08-28 20:28:38 +08:00
0bfe3d332b Merge branch 'master' into cxh_dev 2025-08-28 20:27:39 +08:00
f11de3ec35 为<呼吸质量标注>模块修复当前部分编号的上下限检查 2025-08-27 20:24:34 +08:00
c11a8b6dc6 为<呼吸质量标注>模块修复当前部分编号的上下限检查 2025-08-27 20:20:16 +08:00
3e55f46b87 为<呼吸质量标注>模块注释掉保存成功信息的弹窗提示 2025-08-27 16:24:26 +08:00
1f9b02d528 为<呼吸质量标注>模块在按钮点击后添加保存功能 2025-08-27 16:22:06 +08:00
3cc09a7f3a Merge branch 'master' into cxh_dev 2025-08-27 16:09:51 +08:00
a641e77d94 为<呼吸质量标注>模块设置自动下一段功能的复选框为默认选中状态,并更新相关按钮文本 2025-08-27 16:02:18 +08:00
37524888da 为<呼吸质量标注>模块修复自动下一段功能的复选框状态检查 2025-08-27 16:01:01 +08:00
e516c04df9 为<呼吸质量标注>模块更新快捷键设置及按钮文本 2025-08-27 15:56:24 +08:00
cc6e33e70f 为<呼吸质量标注>模块更新快捷键设置及按钮文本 2025-08-27 15:54:23 +08:00
225b62fb78 为<呼吸质量标注>模块更新按钮文本以包含功能说明 2025-08-27 15:47:20 +08:00
6745340919 Merge branch 'master' into cxh_dev
# Conflicts:
#	func/Module_resp_quality_label.py
#	ui/MainWindow/MainWindow_resp_quality_label.py
#	ui/MainWindow/MainWindow_resp_quality_label.ui
2025-08-27 15:27:03 +08:00
35305ac7d0 为<呼吸质量标注>模块调整布局,增加自动下一段功能的复选框 2025-08-27 15:25:40 +08:00
196b6f12e7 为<呼吸质量标注>模块增加自动下一段功能及相关UI调整 2025-08-27 15:22:04 +08:00
71ac24dd65 为<呼吸质量标注>模块更新按钮文本以包含功能说明 2025-08-27 15:17:08 +08:00
387942115f Merge branch 'master' into cxh_dev 2025-08-27 15:14:47 +08:00
8675ec2197 为<呼吸质量标注>模块增加了自动下一页功能及快捷键设置 2025-08-27 15:14:26 +08:00
e04c3f5d9d Merge branch 'master' into cxh_dev 2025-08-26 17:34:09 +08:00
d1108c724a 为<工件标注>和<呼吸质量标注>模块增加了快捷键设置 2025-08-26 17:26:04 +08:00
6e9a663118 Merge branch 'master' into cxh_dev 2025-08-26 15:09:08 +08:00
8f0f3f0365 修正了<裁切PSG信号和标签映射>中配置文件读取的一处错误 2025-08-11 17:17:30 +08:00
24ec83cd25 修正了<数据粗同步>中配置文件读取的一处错误 2025-08-09 15:04:17 +08:00
046a9e8c5d 重排SA标签的索引,从1开始并命名,同时优化排序逻辑 2025-07-25 16:51:00 +08:00
08bcbb4b28 重排SA标签的索引,从1开始并命名,同时按开始时间排序 2025-07-25 16:50:19 +08:00
0109eb5703 修正examine_file方法中的路径类型检查,并优化后续路径处理逻辑 2025-07-25 16:45:00 +08:00
a84e127c8b 增加index作为唯一标识 2025-07-25 16:44:17 +08:00
fa20d94744 修复了<数据粗同步>中输出原始信号时无法绘图的问题 2025-07-23 09:42:23 +08:00
7e6f761137 更新了<数据粗同步>中的绘图图例未显示的问题 2025-07-17 10:57:28 +08:00
c9202174fb 为<BCG的J峰算法定位>、<ECG的R峰算法定位>、<人工纠正>增加了不做滤波的选项 2025-06-28 20:35:10 +08:00
aa0d59f925 1、修复了<呼吸可用性及间期标注>中若THO峰值数据的历史存档为空,则无法正确打开数据文件的问题
2、修复了<呼吸可用性及间期标注>中点击标注后UI信息未更新的问题
2025-06-28 16:47:36 +08:00
7901415945 修正了输入体动路径的赋值逻辑,并调整了异常处理的注释 2025-06-19 14:43:54 +08:00
2f4c022e4e Merge branch 'master' into cxh_dev 2025-06-18 20:21:46 +08:00
17bf532a1b 更新了<BCG的J峰算法定位>中的预测异常的一个提示内容 2025-06-17 08:46:50 +08:00
2da21a8733 Merge branch 'master' into cxh_dev 2025-06-16 18:42:43 +08:00
4ef5463b1a 修复了<数据精同步>中切割索引可能存在负值的问题 2025-06-14 19:32:09 +08:00
bf0c780f01 优化了<数据精同步>的部分代码结构 2025-06-13 23:11:06 +08:00
30b041d945 Merge branch 'master' into cxh_dev 2025-06-11 10:12:23 +08:00
3224df78e8 Merge branch 'master' into cxh_dev 2025-06-10 14:24:57 +08:00
7b8fe62af8 Merge branch 'master' into cxh_dev 2025-06-09 21:20:47 +08:00
e26ee7440f 优化数据处理逻辑,确保在无体动情况下仍能正确读取和标记数据 2025-06-08 21:27:21 +08:00
39 changed files with 8206 additions and 1265 deletions

View File

@ -394,6 +394,8 @@ class MainWindow_SA_label(QMainWindow):
self.ax6.grid(True) self.ax6.grid(True)
self.ax6.xaxis.set_major_formatter(Params.FORMATTER) self.ax6.xaxis.set_major_formatter(Params.FORMATTER)
PublicFunc.__resetAllButton__(self, ButtonState) PublicFunc.__resetAllButton__(self, ButtonState)
self.ui.tableWidget_label.setHorizontalHeaderLabels(['原事件类型', '事件类型', '标签类型', '起始时间(s)', '终止时间(s)']) self.ui.tableWidget_label.setHorizontalHeaderLabels(['原事件类型', '事件类型', '标签类型', '起始时间(s)', '终止时间(s)'])
@ -1142,16 +1144,19 @@ class MainWindow_SA_label(QMainWindow):
self.ax4.grid(True) self.ax4.grid(True)
self.ax4.xaxis.set_major_formatter(Params.FORMATTER) self.ax4.xaxis.set_major_formatter(Params.FORMATTER)
self.ax4.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE) self.ax4.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
if self.ax5 is not None: if self.ax5 is not None:
self.ax5.clear() self.ax5.clear()
self.ax5.grid(True) self.ax5.grid(True)
self.ax5.xaxis.set_major_formatter(Params.FORMATTER) self.ax5.xaxis.set_major_formatter(Params.FORMATTER)
self.ax5.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE) self.ax5.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
if self.ax6 is not None: if self.ax6 is not None:
self.ax6.clear() self.ax6.clear()
self.ax6.grid(True) self.ax6.grid(True)
self.ax6.xaxis.set_major_formatter(Params.FORMATTER) self.ax6.xaxis.set_major_formatter(Params.FORMATTER)
def on_xlim_change(self, event_ax): def on_xlim_change(self, event_ax):
# 获取当前x轴范围 # 获取当前x轴范围
left, right = event_ax.get_xlim() left, right = event_ax.get_xlim()
@ -1185,23 +1190,23 @@ class MainWindow_SA_label(QMainWindow):
self.ui.spinBox_correctEnd.setValue(Config["BCG_EP"]) self.ui.spinBox_correctEnd.setValue(Config["BCG_EP"])
self.ui.label_BCG_event.setText("Index:{}/{}".format((Config["PlotEventIndex"] + 1), len(self.data.df_corrected))) self.ui.label_BCG_event.setText("Index:{}/{}".format((Config["PlotEventIndex"] + 1), len(self.data.df_corrected)))
self.ui.label_BCG_event_2.setText("Epoch:{} Duration:{}s".format(one_bcg_data["Epoch"], bcg_duration)) self.ui.label_BCG_event_2.setText("Epoch:{} Duration:{}s".format(one_bcg_data["Epoch"], bcg_duration))
self.plt_channel(plt_=self.ax0, SP=bcg_SP, EP=bcg_EP, channel="Flow T", bcg_duration_new=bcg_duration_new, self.plt_channel(plt_=self.ax0, SP=bcg_SP, EP=bcg_EP, channel="SpO2", event_code=[5],
show_mode="one")
self.plt_channel(plt_=self.ax1, SP=bcg_SP, EP=bcg_EP, channel="Flow P", bcg_duration_new=bcg_duration_new,
show_mode="one")
self.plt_channel(plt_=self.ax2, SP=bcg_SP, EP=bcg_EP, channel="Effort Tho", bcg_duration_new=bcg_duration_new,
show_mode="one")
self.plt_channel(plt_=self.ax3, SP=bcg_SP, EP=bcg_EP, channel="Effort Abd", bcg_duration_new=bcg_duration_new,
show_mode="one")
self.plt_channel(plt_=self.ax4, SP=bcg_SP, EP=bcg_EP, channel="SpO2", event_code=[5],
bcg_duration_new=bcg_duration_new, show_mode="one") bcg_duration_new=bcg_duration_new, show_mode="one")
self.plt_channel(plt_=self.ax5, SP=bcg_SP, EP=bcg_EP, channel="orgdata", self.plt_channel(plt_=self.ax1, SP=bcg_SP, EP=bcg_EP, channel="Flow T", bcg_duration_new=bcg_duration_new,
event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4], show_mode="one")
event_show_under=False, bcg_duration_new=bcg_duration_new, show_mode="one") self.plt_channel(plt_=self.ax2, SP=bcg_SP, EP=bcg_EP, channel="Flow P", bcg_duration_new=bcg_duration_new,
self.plt_channel(plt_=self.ax6, SP=bcg_SP, EP=bcg_EP, channel="0.7lowpass_resp", show_mode="one")
self.plt_channel(plt_=self.ax3, SP=bcg_SP, EP=bcg_EP, channel="Effort Tho", bcg_duration_new=bcg_duration_new,
show_mode="one")
self.plt_channel(plt_=self.ax4, SP=bcg_SP, EP=bcg_EP, channel="Effort Abd", bcg_duration_new=bcg_duration_new,
show_mode="one")
self.plt_channel(plt_=self.ax5, SP=bcg_SP, EP=bcg_EP, channel="0.7lowpass_resp",
event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4], event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4],
event_show_under=False, event_show_under=False,
bcg_duration_new=bcg_duration_new, show_mode="one") bcg_duration_new=bcg_duration_new, show_mode="one")
self.plt_channel(plt_=self.ax6, SP=bcg_SP, EP=bcg_EP, channel="orgdata",
event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4],
event_show_under=False, bcg_duration_new=bcg_duration_new, show_mode="one")
self.ax0.callbacks.connect('xlim_changed', lambda ax: self.on_xlim_change(ax)) self.ax0.callbacks.connect('xlim_changed', lambda ax: self.on_xlim_change(ax))
@ -1218,19 +1223,20 @@ class MainWindow_SA_label(QMainWindow):
# 进行向两边延展 # 进行向两边延展
bcg_SP = bcg_SP - Config["AddSecond"]["Front"] + time_move_count bcg_SP = bcg_SP - Config["AddSecond"]["Front"] + time_move_count
bcg_EP = bcg_EP + Config["AddSecond"]["Back"] + time_move_count bcg_EP = bcg_EP + Config["AddSecond"]["Back"] + time_move_count
self.plt_channel(plt_=self.ax0, SP=bcg_SP, EP=bcg_EP, channel="SpO2", event_code=[5], show_mode="new")
self.plt_channel(plt_=self.ax1, SP=bcg_SP, EP=bcg_EP, channel="Flow T", show_mode="new")
self.plt_channel(plt_=self.ax2, SP=bcg_SP, EP=bcg_EP, channel="Flow P", show_mode="new")
self.plt_channel(plt_=self.ax3, SP=bcg_SP, EP=bcg_EP, channel="Effort Tho", show_mode="new")
self.plt_channel(plt_=self.ax4, SP=bcg_SP, EP=bcg_EP, channel="Effort Abd", show_mode="new")
self.plt_channel(plt_=self.ax0, SP=bcg_SP, EP=bcg_EP, channel="Flow T", show_mode="new") self.plt_channel(plt_=self.ax5, SP=bcg_SP, EP=bcg_EP, channel="0.7lowpass_resp",
self.plt_channel(plt_=self.ax1, SP=bcg_SP, EP=bcg_EP, channel="Flow P", show_mode="new")
self.plt_channel(plt_=self.ax2, SP=bcg_SP, EP=bcg_EP, channel="Effort Tho", show_mode="new")
self.plt_channel(plt_=self.ax3, SP=bcg_SP, EP=bcg_EP, channel="Effort Abd", show_mode="new")
self.plt_channel(plt_=self.ax4, SP=bcg_SP, EP=bcg_EP, channel="SpO2", event_code=[5], show_mode="new")
self.plt_channel(plt_=self.ax5, SP=bcg_SP, EP=bcg_EP, channel="orgdata",
event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4],
event_show_under=False, show_mode="new")
self.plt_channel(plt_=self.ax6, SP=bcg_SP, EP=bcg_EP, channel="0.7lowpass_resp",
event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4], event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4],
event_show_under=False, event_show_under=False,
show_mode="new") show_mode="new")
self.plt_channel(plt_=self.ax6, SP=bcg_SP, EP=bcg_EP, channel="orgdata",
event_code=[6, 7, 8, 9, 10, 1, 2, 3, 4],
event_show_under=False, show_mode="new")
self.ui.label_BCG_event.setText( self.ui.label_BCG_event.setText(
"Index:{}/{}".format((Config["PlotEventIndex"] + 1), len(self.data.df_corrected))) "Index:{}/{}".format((Config["PlotEventIndex"] + 1), len(self.data.df_corrected)))
@ -1435,11 +1441,14 @@ class Data:
Config["InputConfig"]["SpO2Freq"] = result.data["freq"] Config["InputConfig"]["SpO2Freq"] = result.data["freq"]
else: else:
return result return result
result = PublicFunc.examine_file(Config["Path"]["Input_Artifact"], Filename.ARTIFACT_A, Params.ENDSWITH_TXT)
if result.status: # 没有体动也能打标
Config["Path"]["Input_Artifact"] = result.data["path"] artifact_result = PublicFunc.examine_file(Config["Path"]["Input_Artifact"], Filename.ARTIFACT_A, Params.ENDSWITH_TXT)
if artifact_result.status:
Config["Path"]["Input_Artifact"] = artifact_result.data["path"]
else: else:
return result pass
# return result
Config["Path"]["Input_Label"] = str( Config["Path"]["Input_Label"] = str(
Path(Config["Path"]["Input_Label"]) / Path(Filename.SA_LABEL_SYNC + Params.ENDSWITH_CSV)) Path(Config["Path"]["Input_Label"]) / Path(Filename.SA_LABEL_SYNC + Params.ENDSWITH_CSV))
@ -1448,11 +1457,20 @@ class Data:
Config["Path"]["Save_2"] = str( Config["Path"]["Save_2"] = str(
Path(Config["Path"]["Save_2"]) / Path(Filename.SA_LABEL_ADD + Params.ENDSWITH_CSV)) Path(Config["Path"]["Save_2"]) / Path(Filename.SA_LABEL_ADD + Params.ENDSWITH_CSV))
if not Path(Config["Path"]["Input_Artifact"]).exists(): if not artifact_result.status:
return Result().failure(info=Constants.INPUT_FAILURE + "\n" + # return Result().failure(info=Constants.INPUT_FAILURE + "\n" +
Filename.ARTIFACT_A + "" + # Filename.ARTIFACT_A + "" +
Config["Path"]["Input_Artifact"] + # Config["Path"]["Input_Artifact"] +
Constants.FAILURE_REASON["Path_Not_Exist"]) # Constants.FAILURE_REASON["Path_Not_Exist"])
# PublicFunc.msgbox_output(self, Constants.INPUT_FAILURE + "\n" +
# Filename.ARTIFACT_A + "" +
# Config["Path"]["Input_Artifact"] +
# Constants.FAILURE_REASON["Path_Not_Exist"],
# Constants.MSGBOX_TYPE_WARNING)
Config["Path"]["Input_Artifact"] = None
if not Path(Config["Path"]["Input_Label"]).exists(): if not Path(Config["Path"]["Input_Label"]).exists():
return Result().failure(info=Constants.INPUT_FAILURE + "\n" + return Result().failure(info=Constants.INPUT_FAILURE + "\n" +
Filename.SA_LABEL_SYNC + "" + Filename.SA_LABEL_SYNC + "" +
@ -1478,9 +1496,14 @@ class Data:
self.SpO2 = read_csv(Config["Path"]["Input_SpO2"], self.SpO2 = read_csv(Config["Path"]["Input_SpO2"],
encoding=Params.UTF8_ENCODING, encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1) header=None).to_numpy().reshape(-1)
self.Artifact = read_csv(Config["Path"]["Input_Artifact"],
encoding=Params.UTF8_ENCODING, if artifact_result.status:
header=None).to_numpy().reshape(-1) self.Artifact = read_csv(Config["Path"]["Input_Artifact"],
encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
else:
self.Artifact = array([])
self.event_label = zeros(len(self.OrgBCG) + (int(Config["AddSecond"]["Front"] + int(Config["AddSecond"]["Back"])) * Config["InputConfig"]["PlotFreq"])) self.event_label = zeros(len(self.OrgBCG) + (int(Config["AddSecond"]["Front"] + int(Config["AddSecond"]["Back"])) * Config["InputConfig"]["PlotFreq"]))
except Exception as e: except Exception as e:
return Result().failure(info=Constants.INPUT_FAILURE + return Result().failure(info=Constants.INPUT_FAILURE +

2199
func/Module_SA_label_v2.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,4 @@
import traceback
from gc import collect from gc import collect
from pathlib import Path from pathlib import Path
from traceback import format_exc from traceback import format_exc
@ -211,17 +212,22 @@ class SettingWindow(QMainWindow):
if result.status: if result.status:
Config["InputConfig"]["orgBcgFreq"] = result.data["freq"] Config["InputConfig"]["orgBcgFreq"] = result.data["freq"]
else: else:
PublicFunc.msgbox_output(self, Filename.ORGBCG_RAW + Constants.FAILURE_REASON["Get_Freq_Not_Correct"], Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, Filename.ORGBCG_RAW + Constants.FAILURE_REASON["Get_Freq_Not_Correct"],
Constants.MSGBOX_TYPE_ERROR)
result = PublicFunc.examine_file(Config["Path"]["Input_Tho"], Filename.THO_RAW, Params.ENDSWITH_TXT) result = PublicFunc.examine_file(Config["Path"]["Input_Tho"], Filename.THO_RAW, Params.ENDSWITH_TXT)
if result.status: if result.status:
Config["InputConfig"]["ThoFreq"] = result.data["freq"] Config["InputConfig"]["ThoFreq"] = result.data["freq"]
else: else:
PublicFunc.msgbox_output(self, Filename.THO_RAW + Constants.FAILURE_REASON["Get_Freq_Not_Correct"], Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, Filename.THO_RAW + Constants.FAILURE_REASON["Get_Freq_Not_Correct"],
Constants.MSGBOX_TYPE_ERROR)
result = PublicFunc.examine_file(Config["Path"]["Input_Abd"], Filename.ABD_RAW, Params.ENDSWITH_TXT) result = PublicFunc.examine_file(Config["Path"]["Input_Abd"], Filename.ABD_RAW, Params.ENDSWITH_TXT)
if result.status: if result.status:
Config["InputConfig"]["AbdFreq"] = result.data["freq"] Config["InputConfig"]["AbdFreq"] = result.data["freq"]
else: else:
PublicFunc.msgbox_output(self, Filename.ABD_RAW + Constants.FAILURE_REASON["Get_Freq_Not_Correct"], Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, Filename.ABD_RAW + Constants.FAILURE_REASON["Get_Freq_Not_Correct"],
Constants.MSGBOX_TYPE_ERROR)
# 数据回显 # 数据回显
self.ui.spinBox_input_orgBcg_freq.setValue(Config["InputConfig"]["orgBcgFreq"]) self.ui.spinBox_input_orgBcg_freq.setValue(Config["InputConfig"]["orgBcgFreq"])
@ -272,6 +278,8 @@ class MainWindow_approximately_align(QMainWindow):
self.ui.verticalLayout_canvas.addWidget(self.canvas) self.ui.verticalLayout_canvas.addWidget(self.canvas)
self.ui.verticalLayout_canvas.addWidget(self.figToolbar) self.ui.verticalLayout_canvas.addWidget(self.figToolbar)
self.ui.label_sampno.setText(str(self.sampID))
PublicFunc.__resetAllButton__(self, ButtonState) PublicFunc.__resetAllButton__(self, ButtonState)
self.ui.pushButton_input.clicked.connect(self.__slot_btn_input__) self.ui.pushButton_input.clicked.connect(self.__slot_btn_input__)
@ -348,7 +356,6 @@ class MainWindow_approximately_align(QMainWindow):
self.ui.radioButton_freqTHO.setText("备选1") self.ui.radioButton_freqTHO.setText("备选1")
self.ui.radioButton_freqABD.setText("备选2") self.ui.radioButton_freqABD.setText("备选2")
def __plot__(self, *args, **kwargs): def __plot__(self, *args, **kwargs):
sender = self.sender() sender = self.sender()
self.fig.clf() self.fig.clf()
@ -394,6 +401,19 @@ class MainWindow_approximately_align(QMainWindow):
else: else:
return result return result
def __preload_PreCut__(self):
time_bias_seconds = Config.get("TimeBiasSecond", None)
if time_bias_seconds is not None:
if time_bias_seconds > 0:
self.ui.spinBox_orgBcgPreCut.setValue(int(time_bias_seconds))
self.ui.spinBox_PSGPreCut.setValue(0)
self.ui.spinBox_PSGPreA.setValue(int(time_bias_seconds))
else:
self.ui.spinBox_orgBcgPreCut.setValue(0)
self.ui.spinBox_PSGPreCut.setValue(int(-time_bias_seconds))
self.ui.spinBox_orgBcgPreA.setValue(int(-time_bias_seconds))
def __slot_btn_input__(self): def __slot_btn_input__(self):
PublicFunc.__disableAllButton__(self, ButtonState) PublicFunc.__disableAllButton__(self, ButtonState)
@ -419,6 +439,7 @@ class MainWindow_approximately_align(QMainWindow):
self.ui.label_orgBcg_length.setText(str(orgBcg_seconds)) self.ui.label_orgBcg_length.setText(str(orgBcg_seconds))
self.ui.label_PSG_length.setText(str(PSG_seconds)) self.ui.label_PSG_length.setText(str(PSG_seconds))
self.__reset__() self.__reset__()
self.__preload_PreCut__()
self.setting.close() self.setting.close()
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
@ -446,11 +467,13 @@ class MainWindow_approximately_align(QMainWindow):
Config["RawSignal"] = self.ui.checkBox_RawSignal.isChecked() Config["RawSignal"] = self.ui.checkBox_RawSignal.isChecked()
Config["orgBcgConfig"].update({ Config["orgBcgConfig"].update({
"orgBcgDelBase": self.ui.checkBox_orgBcgDelBase.isChecked(), "orgBcgDelBase": self.ui.checkBox_orgBcgDelBase.isChecked(),
"orgBcgZScore": self.ui.checkBox_orgBcgZScore.isChecked() "orgBcgZScore": self.ui.checkBox_orgBcgZScore.isChecked(),
"orgBcgZScoreLimit": self.ui.checkBox_orgBcgZScoreLimit.isChecked(),
}) })
Config["PSGConfig"].update({ Config["PSGConfig"].update({
"PSGDelBase": self.ui.checkBox_PSGDelBase.isChecked(), "PSGDelBase": self.ui.checkBox_PSGDelBase.isChecked(),
"PSGZScore": self.ui.checkBox_PSGZScore.isChecked() "PSGZScore": self.ui.checkBox_PSGZScore.isChecked(),
"PSGZScoreLimit": self.ui.checkBox_PSGZScoreLimit.isChecked(),
}) })
if Config["RawSignal"]: if Config["RawSignal"]:
@ -518,6 +541,7 @@ class MainWindow_approximately_align(QMainWindow):
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
return return
else: else:
PublicFunc.text_output(self.ui, f"(5/5) {result.data}", Constants.TIPS_TYPE_INFO)
PublicFunc.text_output(self.ui, "(5/5)" + result.info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(5/5)" + result.info, Constants.TIPS_TYPE_INFO)
self.__plot__() self.__plot__()
@ -527,19 +551,30 @@ class MainWindow_approximately_align(QMainWindow):
def __slot_btn_CutOff__(self): def __slot_btn_CutOff__(self):
PublicFunc.__disableAllButton__(self, ButtonState) PublicFunc.__disableAllButton__(self, ButtonState)
if self.ui.spinBox_orgBcgPreA.value() + self.ui.spinBox_orgBcgPostCut.value() >= len(self.data.processed_downsample_orgBcg): if self.ui.spinBox_orgBcgPreA.value() + self.ui.spinBox_orgBcgPostCut.value() >= len(
self.data.processed_downsample_orgBcg):
result = Result().failure( result = Result().failure(
info=Constants.OPERATION_FAILURE + Constants.FAILURE_REASON["OrgBCG_Cut_Length_Not_Correct"]) info=Constants.OPERATION_FAILURE + Constants.FAILURE_REASON["OrgBCG_Cut_Length_Not_Correct"])
elif self.ui.spinBox_PSGPreCut.value() + self.ui.spinBox_PSGPostCut.value() >= len(self.data.processed_downsample_Tho): elif self.ui.spinBox_PSGPreCut.value() + self.ui.spinBox_PSGPostCut.value() >= len(
self.data.processed_downsample_Tho):
result = Result().failure( result = Result().failure(
info=Constants.OPERATION_FAILURE + Constants.FAILURE_REASON["PSG_Cut_Length_Not_Correct"]) info=Constants.OPERATION_FAILURE + Constants.FAILURE_REASON["PSG_Cut_Length_Not_Correct"])
else: else:
Config["orgBcgConfig"].update({"PreA": self.ui.spinBox_orgBcgPreA.value(), ApplyFrequency = Config["ApplyFrequency"]
"PreCut": self.ui.spinBox_orgBcgPreCut.value(), Config["orgBcgConfig"].update({"PreA": self.ui.spinBox_orgBcgPreA.value() * ApplyFrequency,
"PostCut": self.ui.spinBox_orgBcgPostCut.value()}) "PreCut": self.ui.spinBox_orgBcgPreCut.value() * ApplyFrequency,
Config["PSGConfig"].update({"PreA": self.ui.spinBox_PSGPreA.value(), "PostCut": self.ui.spinBox_orgBcgPostCut.value() * ApplyFrequency,
"PreCut": self.ui.spinBox_PSGPreCut.value(), "PreA_seconds": self.ui.spinBox_orgBcgPreA.value(),
"PostCut": self.ui.spinBox_PSGPostCut.value()}) "PreCut_seconds": self.ui.spinBox_orgBcgPreCut.value(),
"PostCut_seconds": self.ui.spinBox_orgBcgPostCut.value()
})
Config["PSGConfig"].update({"PreA": self.ui.spinBox_PSGPreA.value() * ApplyFrequency,
"PreCut": self.ui.spinBox_PSGPreCut.value() * ApplyFrequency,
"PostCut": self.ui.spinBox_PSGPostCut.value() * ApplyFrequency,
"PreA_seconds": self.ui.spinBox_PSGPreA.value(),
"PreCut_seconds": self.ui.spinBox_PSGPreCut.value(),
"PostCut_seconds": self.ui.spinBox_PSGPostCut.value()
})
PublicFunc.progressbar_update(self, 1, 1, Constants.DRAWING_DATA, 0) PublicFunc.progressbar_update(self, 1, 1, Constants.DRAWING_DATA, 0)
result = self.__plot__() result = self.__plot__()
@ -604,10 +639,10 @@ class MainWindow_approximately_align(QMainWindow):
else: else:
PublicFunc.text_output(self.ui, "(4/4)" + result.info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(4/4)" + result.info, Constants.TIPS_TYPE_INFO)
self.ui.radioButton_PABD.setText(str(result.data["abd_max"] + result.data["bias"])) self.ui.radioButton_PABD.setText(str((result.data["abd_max"] + result.data["bias"]) / Config["ApplyFrequency"]))
self.ui.radioButton_PTHO.setText(str(result.data["tho_max"] + result.data["bias"])) self.ui.radioButton_PTHO.setText(str((result.data["tho_max"] + result.data["bias"]) / Config["ApplyFrequency"]))
self.ui.radioButton_NABD.setText(str(result.data["abd_max2"] + result.data["bias"])) self.ui.radioButton_NABD.setText(str((result.data["abd_max2"] + result.data["bias"]) / Config["ApplyFrequency"]))
self.ui.radioButton_NTHO.setText(str(result.data["tho_max2"] + result.data["bias"])) self.ui.radioButton_NTHO.setText(str((result.data["tho_max2"] + result.data["bias"]) / Config["ApplyFrequency"]))
ButtonState["Current"]["radioButton_PTHO"] = True ButtonState["Current"]["radioButton_PTHO"] = True
ButtonState["Current"]["radioButton_PABD"] = True ButtonState["Current"]["radioButton_PABD"] = True
ButtonState["Current"]["radioButton_NTHO"] = True ButtonState["Current"]["radioButton_NTHO"] = True
@ -648,12 +683,11 @@ class MainWindow_approximately_align(QMainWindow):
Config["estimate"]["abd_slope"] = abd_slope Config["estimate"]["abd_slope"] = abd_slope
Config["estimate"]["abd_intercept"] = abd_intercept Config["estimate"]["abd_intercept"] = abd_intercept
self.ui.radioButton_freqTHO.setText(str(Config["estimate"]["tho_frequency"])) self.ui.radioButton_freqTHO.setText(str(Config["estimate"]["tho_frequency"] * Config["InputConfig"]["orgBcgFreq"]))
self.ui.radioButton_freqABD.setText(str(Config["estimate"]["abd_frequency"])) self.ui.radioButton_freqABD.setText(str(Config["estimate"]["abd_frequency"] * Config["InputConfig"]["orgBcgFreq"]))
ButtonState["Current"]["radioButton_freqTHO"] = True ButtonState["Current"]["radioButton_freqTHO"] = True
ButtonState["Current"]["radioButton_freqABD"] = True ButtonState["Current"]["radioButton_freqABD"] = True
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
@ -700,7 +734,6 @@ class MainWindow_approximately_align(QMainWindow):
ButtonState["Current"]["pushButton_save"] = True ButtonState["Current"]["pushButton_save"] = True
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
def __EpochChange__(self): def __EpochChange__(self):
# 获取当前值 # 获取当前值
value = self.ui.spinBox_SelectEpoch.value() value = self.ui.spinBox_SelectEpoch.value()
@ -727,24 +760,24 @@ class MainWindow_approximately_align(QMainWindow):
PublicFunc.__disableAllButton__(self, ButtonState) PublicFunc.__disableAllButton__(self, ButtonState)
if self.ui.radioButton_NTHO.isChecked(): if self.ui.radioButton_NTHO.isChecked():
relate = int(self.ui.radioButton_NTHO.text()) relate = float(self.ui.radioButton_NTHO.text())
reverse = -1 reverse = -1
elif self.ui.radioButton_PTHO.isChecked(): elif self.ui.radioButton_PTHO.isChecked():
relate = int(self.ui.radioButton_PTHO.text()) relate = float(self.ui.radioButton_PTHO.text())
reverse = 1 reverse = 1
elif self.ui.radioButton_PABD.isChecked(): elif self.ui.radioButton_PABD.isChecked():
relate = int(self.ui.radioButton_PABD.text()) relate = float(self.ui.radioButton_PABD.text())
reverse = 1 reverse = 1
elif self.ui.radioButton_NABD.isChecked(): elif self.ui.radioButton_NABD.isChecked():
relate = int(self.ui.radioButton_NABD.text()) relate = float(self.ui.radioButton_NABD.text())
reverse = -1 reverse = -1
elif self.ui.radioButton_custom.isChecked(): elif self.ui.radioButton_custom.isChecked():
relate = int(self.ui.spinBox_custom.value()) relate = float(self.ui.spinBox_custom.value())
reverse = 1 reverse = 1
else: else:
return return
# 最大相关系数值相对于PSG的位置 # 最大相关系数值相对于PSG的位置
Config.update({"pos": relate}) Config.update({"pos": int(relate * Config["ApplyFrequency"])})
# 设置epoch上下限 # 设置epoch上下限
Config.update({"orgBcg_reverse": reverse}) Config.update({"orgBcg_reverse": reverse})
PublicFunc.text_output(self.ui, "相对位置:{}".format(Config["pos"]), Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "相对位置:{}".format(Config["pos"]), Constants.TIPS_TYPE_INFO)
@ -789,76 +822,81 @@ class MainWindow_approximately_align(QMainWindow):
def DrawPicRawOverview(self): def DrawPicRawOverview(self):
try: try:
max_x = max(self.data.processed_downsample_Tho.shape[0], self.data.processed_downsample_Abd.shape[0], ApplyFrequency = Config["ApplyFrequency"]
self.data.processed_downsample_orgBcg.shape[0]) orgBcg_seconds = Config["orgBcg_seconds"]
PSG_seconds = Config["PSG_seconds"]
max_x = max(PSG_seconds, orgBcg_seconds)
ax1 = self.fig.add_subplot(311) ax1 = self.fig.add_subplot(311)
ax1.plot(self.data.processed_downsample_Tho, color='blue') ax1.plot(linspace(0, PSG_seconds, PSG_seconds * ApplyFrequency), self.data.processed_downsample_Tho, color='blue')
ax1.set_xlim(0, max_x) ax1.set_xlim(0, max_x)
ax1.set_title("THO") ax1.set_title("THO")
ax2 = self.fig.add_subplot(312, sharex=ax1, sharey=ax1) ax2 = self.fig.add_subplot(312, sharex=ax1, sharey=ax1)
ax2.plot(self.data.processed_downsample_orgBcg, color='blue') ax2.plot(linspace(0, orgBcg_seconds, orgBcg_seconds * ApplyFrequency), self.data.processed_downsample_orgBcg,
color='blue')
ax2.set_xlim(0, max_x) ax2.set_xlim(0, max_x)
ax2.set_title("orgBcg") ax2.set_title("orgBcg")
ax3 = self.fig.add_subplot(313, sharex=ax1, sharey=ax1) ax3 = self.fig.add_subplot(313, sharex=ax1, sharey=ax1)
ax3.plot(self.data.processed_downsample_Abd, color='blue') ax3.plot(linspace(0, PSG_seconds, PSG_seconds * ApplyFrequency), self.data.processed_downsample_Abd, color='blue')
ax3.set_xlim(0, max_x) ax3.set_xlim(0, max_x)
ax3.set_title("ABD") ax3.set_title("ABD")
self.fig.canvas.draw() self.fig.canvas.draw()
except Exception as e: except Exception as e:
traceback.print_exc()
return Result().failure(info=Constants.DRAW_FAILURE + "\n" + format_exc()) return Result().failure(info=Constants.DRAW_FAILURE + "\n" + format_exc())
# 返回图片以便存到QPixImage # 返回图片以便存到QPixImage
return Result().success(info=Constants.DRAW_FINISHED) return Result().success(info=Constants.DRAW_FINISHED)
def DrawPicOverviewWithCutOff(self): def DrawPicOverviewWithCutOff(self):
try: try:
max_x = max(self.data.processed_downsample_Tho.shape[0] + Config["PSGConfig"]["PreA"], ApplyFrequency = Config["ApplyFrequency"]
self.data.processed_downsample_orgBcg.shape[0] + Config["orgBcgConfig"]["PreA"]) orgBcg_seconds = Config["orgBcg_seconds"]
min_x = min(Config["PSGConfig"]["PreA"], Config["orgBcgConfig"]["PreA"], 0) PSG_seconds = Config["PSG_seconds"]
PSG_PreA_seconds = Config["PSGConfig"]["PreA_seconds"]
orgBcg_PreA_seconds = Config["orgBcgConfig"]["PreA_seconds"]
PSG_PreCut_seconds = Config["PSGConfig"]["PreCut_seconds"]
orgBcg_PreCut_seconds = Config["orgBcgConfig"]["PreCut_seconds"]
PSG_PostCut_seconds = Config["PSGConfig"]["PostCut_seconds"]
orgBcg_PostCut_seconds = Config["orgBcgConfig"]["PostCut_seconds"]
max_x = max(PSG_seconds + PSG_PreA_seconds,
orgBcg_seconds + orgBcg_PreA_seconds)
min_x = min(PSG_PreA_seconds, orgBcg_PreA_seconds, 0)
ax1 = self.fig.add_subplot(311) ax1 = self.fig.add_subplot(311)
ax1.plot( ax1.plot(
linspace(Config["PSGConfig"]["PreA"], linspace(PSG_PreA_seconds, (PSG_seconds + PSG_PreA_seconds), len(self.data.processed_downsample_Tho)),
len(self.data.processed_downsample_Tho) + Config["PSGConfig"]["PreA"], self.data.processed_downsample_Tho,
len(self.data.processed_downsample_Tho)), self.data.processed_downsample_Tho, color='blue') color='blue'
)
# 绘制x = PreCut的线 和 x = PostCut的虚线 # 绘制x = PreCut的线 和 x = PostCut的虚线
ax1.axvline(x=Config["PSGConfig"]["PreCut"] + Config["PSGConfig"]["PreA"], color='red', ax1.axvline(x=(PSG_PreCut_seconds + PSG_PreA_seconds), color='red', linestyle='--')
linestyle='--') ax1.axvline(x=(PSG_seconds - PSG_PostCut_seconds + PSG_PreA_seconds), color='red', linestyle='--')
ax1.axvline(
x=len(self.data.processed_downsample_Tho) - Config["PSGConfig"]["PostCut"] + Config["PSGConfig"][
"PreA"],
color='red', linestyle='--')
ax1.set_xlim(min_x, max_x) ax1.set_xlim(min_x, max_x)
ax1.set_title("THO") ax1.set_title("THO")
ax2 = self.fig.add_subplot(312, sharex=ax1, sharey=ax1) ax2 = self.fig.add_subplot(312, sharex=ax1, sharey=ax1)
ax2.plot( ax2.plot(
linspace(Config["orgBcgConfig"]["PreA"], linspace(orgBcg_PreA_seconds, (orgBcg_seconds + orgBcg_PreA_seconds),
len(self.data.processed_downsample_orgBcg) + Config["orgBcgConfig"]["PreA"],
len(self.data.processed_downsample_orgBcg)), self.data.processed_downsample_orgBcg, len(self.data.processed_downsample_orgBcg)), self.data.processed_downsample_orgBcg,
color='blue') color='blue')
ax2.axvline(x=Config["orgBcgConfig"]["PreCut"] + Config["orgBcgConfig"]["PreA"], color='red', ax2.axvline(x=(orgBcg_PreCut_seconds + orgBcg_PreA_seconds), color='red',
linestyle='--') linestyle='--')
ax2.axvline( ax2.axvline(x=orgBcg_seconds - orgBcg_PostCut_seconds + orgBcg_PreA_seconds, color='red', linestyle='--')
x=len(self.data.processed_downsample_orgBcg) - Config["orgBcgConfig"]["PostCut"] +
Config["orgBcgConfig"]["PreA"],
color='red', linestyle='--')
ax2.set_xlim(min_x, max_x) ax2.set_xlim(min_x, max_x)
ax2.set_title("orgBcg") ax2.set_title("orgBcg")
ax3 = self.fig.add_subplot(313, sharex=ax1, sharey=ax1) ax3 = self.fig.add_subplot(313, sharex=ax1, sharey=ax1)
ax3.plot( ax3.plot(
linspace(Config["PSGConfig"]["PreA"], linspace(PSG_PreA_seconds, (PSG_seconds + PSG_PreA_seconds), len(self.data.processed_downsample_Abd)),
len(self.data.processed_downsample_Abd) + Config["PSGConfig"]["PreA"], self.data.processed_downsample_Abd, color='blue')
len(self.data.processed_downsample_Abd)), self.data.processed_downsample_Abd, color='blue') ax3.axvline(x=(PSG_PreCut_seconds + PSG_PreA_seconds), color='red', linestyle='--')
ax3.axvline(x=Config["PSGConfig"]["PreCut"] + Config["PSGConfig"]["PreA"], color='red', ax3.axvline(x=(PSG_seconds - PSG_PostCut_seconds + PSG_PreA_seconds), color='red', linestyle='--')
linestyle='--')
ax3.axvline(
x=len(self.data.processed_downsample_Tho) - Config["PSGConfig"]["PostCut"] + Config["PSGConfig"][
"PreA"],
color='red', linestyle='--')
ax3.set_xlim(min_x, max_x) ax3.set_xlim(min_x, max_x)
ax3.set_title("ABD") ax3.set_title("ABD")
@ -888,27 +926,35 @@ class MainWindow_approximately_align(QMainWindow):
self.fig.canvas.draw() self.fig.canvas.draw()
except Exception as e: except Exception as e:
traceback.print_exc(e)
return Result().failure(info=Constants.DRAW_FAILURE + "\n" + format_exc()) return Result().failure(info=Constants.DRAW_FAILURE + "\n" + format_exc())
# 返回图片以便存到QPixImage # 返回图片以便存到QPixImage
return Result().success(info=Constants.DRAW_FINISHED) return Result().success(info=Constants.DRAW_FINISHED)
def DrawPicTryAlign(self): def DrawPicTryAlign(self):
try: try:
max_x = max(self.data.processed_downsample_Tho.shape[0], ApplyFrequency = Config["ApplyFrequency"]
self.data.processed_downsample_orgBcg.shape[0] + Config["pos"]) orgBcg_seconds = Config["orgBcg_seconds"]
min_x = min(Config["PSGConfig"]["PreA"], Config["orgBcgConfig"]["PreA"] + Config["pos"], 0) PSG_seconds = Config["PSG_seconds"]
PSG_PreA_seconds = Config["PSGConfig"]["PreA_seconds"]
orgBcg_PreA_seconds = Config["orgBcgConfig"]["PreA_seconds"]
pos_seconds = Config["pos"] / ApplyFrequency
max_x = max(PSG_seconds,
orgBcg_seconds + pos_seconds)
min_x = min(PSG_PreA_seconds, orgBcg_PreA_seconds + pos_seconds, 0)
ax1 = self.fig.add_subplot(311) ax1 = self.fig.add_subplot(311)
ax1.plot( ax1.plot(
linspace(0, len(self.data.processed_downsample_Tho), linspace(0, PSG_seconds,
len(self.data.processed_downsample_Tho)), self.data.processed_downsample_Tho, color='blue') len(self.data.processed_downsample_Tho)), self.data.processed_downsample_Tho, color='blue')
# 绘制x = PreCut的线 和 x = PostCut的虚线 # 绘制x = PreCut的线 和 x = PostCut的虚线
ax1.set_xlim(min_x, max_x) ax1.set_xlim(min_x, max_x)
ax1.set_title("THO") ax1.set_title("THO")
ax2 = self.fig.add_subplot(312, sharex=ax1, sharey=ax1) ax2 = self.fig.add_subplot(312, sharex=ax1, sharey=ax1)
ax2.plot(linspace(Config["pos"], ax2.plot(linspace(pos_seconds,
len(self.data.processed_downsample_orgBcg) + Config["pos"], orgBcg_seconds + pos_seconds,
len(self.data.processed_downsample_orgBcg)), self.data.processed_downsample_orgBcg, len(self.data.processed_downsample_orgBcg)), self.data.processed_downsample_orgBcg,
color='blue') color='blue')
ax2.set_xlim(min_x, max_x) ax2.set_xlim(min_x, max_x)
@ -916,7 +962,7 @@ class MainWindow_approximately_align(QMainWindow):
ax3 = self.fig.add_subplot(313, sharex=ax1, sharey=ax1) ax3 = self.fig.add_subplot(313, sharex=ax1, sharey=ax1)
ax3.plot( ax3.plot(
linspace(0, len(self.data.processed_downsample_Abd), linspace(0, PSG_seconds,
len(self.data.processed_downsample_Abd)), self.data.processed_downsample_Abd, color='blue') len(self.data.processed_downsample_Abd)), self.data.processed_downsample_Abd, color='blue')
ax3.set_xlim(min_x, max_x) ax3.set_xlim(min_x, max_x)
ax3.set_title("ABD") ax3.set_title("ABD")
@ -929,8 +975,18 @@ class MainWindow_approximately_align(QMainWindow):
def DrawPicByEpoch(self, epoch): def DrawPicByEpoch(self, epoch):
try: try:
PSG_SP = epoch * 30 * Config["ApplyFrequency"] ApplyFrequency = Config["ApplyFrequency"]
PSG_EP = (epoch + 6) * 30 * Config["ApplyFrequency"] pos_seconds = Config["pos"] / ApplyFrequency
PSG_SP_seconds = epoch * 30
PSG_EP_seconds = (epoch + 6) * 30
PSG_SP = epoch * 30 * ApplyFrequency
PSG_EP = (epoch + 6) * 30 * ApplyFrequency
orgBcg_SP_seconds = PSG_SP_seconds - pos_seconds
orgBcg_EP_seconds = PSG_EP_seconds - pos_seconds
orgBcg_SP = PSG_SP - Config["pos"] orgBcg_SP = PSG_SP - Config["pos"]
orgBcg_EP = PSG_EP - Config["pos"] orgBcg_EP = PSG_EP - Config["pos"]
@ -941,44 +997,46 @@ class MainWindow_approximately_align(QMainWindow):
# 根据PSG来和绘制 # 根据PSG来和绘制
ax1 = self.fig.add_subplot(321) ax1 = self.fig.add_subplot(321)
ax1.plot(linspace(PSG_SP, PSG_EP, len(tho_seg)), tho_seg) ax1.plot(linspace(PSG_SP_seconds, PSG_EP_seconds, len(tho_seg)), tho_seg)
tho_peaks, _ = find_peaks(tho_seg, prominence=0, distance=3 * Config["ApplyFrequency"]) tho_peaks, _ = find_peaks(tho_seg, prominence=0, distance=3 * Config["ApplyFrequency"])
ax1.plot(linspace(PSG_SP, PSG_EP, len(tho_seg))[tho_peaks], tho_seg[tho_peaks], "x") ax1.plot(linspace(PSG_SP_seconds, PSG_EP_seconds, len(tho_seg))[tho_peaks], tho_seg[tho_peaks], "x")
ax3 = self.fig.add_subplot(323) ax3 = self.fig.add_subplot(323)
ax3.plot(linspace(orgBcg_SP, orgBcg_EP, len(orgBcg_seg)), orgBcg_seg) ax3.plot(linspace(orgBcg_SP_seconds, orgBcg_EP_seconds, len(orgBcg_seg)), orgBcg_seg)
orgBcg_peaks, _ = find_peaks(orgBcg_seg, prominence=0, distance=3 * Config["ApplyFrequency"]) orgBcg_peaks, _ = find_peaks(orgBcg_seg, prominence=0, distance=3 * Config["ApplyFrequency"])
ax3.plot(linspace(orgBcg_SP, orgBcg_EP, len(orgBcg_seg))[orgBcg_peaks], orgBcg_seg[orgBcg_peaks], "x") ax3.plot(linspace(orgBcg_SP_seconds, orgBcg_EP_seconds, len(orgBcg_seg))[orgBcg_peaks], orgBcg_seg[orgBcg_peaks], "x")
ax2 = self.fig.add_subplot(325) ax2 = self.fig.add_subplot(325)
ax2.plot(linspace(PSG_SP, PSG_EP, len(abd_seg)), abd_seg) ax2.plot(linspace(PSG_SP_seconds, PSG_EP_seconds, len(abd_seg)), abd_seg)
abd_peaks, _ = find_peaks(abd_seg, prominence=0, distance=3 * Config["ApplyFrequency"]) abd_peaks, _ = find_peaks(abd_seg, prominence=0, distance=3 * Config["ApplyFrequency"])
ax2.plot(linspace(PSG_SP, PSG_EP, len(abd_seg))[abd_peaks], abd_seg[abd_peaks], "x") ax2.plot(linspace(PSG_SP_seconds, PSG_EP_seconds, len(abd_seg))[abd_peaks], abd_seg[abd_peaks], "x")
# 绘制间期 # 绘制间期
ax4 = self.fig.add_subplot(322) ax4 = self.fig.add_subplot(322)
ax4.plot(linspace(PSG_SP, PSG_EP, len(diff(tho_peaks).repeat(Config["ApplyFrequency"]))), ax4.plot(linspace(PSG_SP_seconds, PSG_EP_seconds, len(diff(tho_peaks).repeat(Config["ApplyFrequency"]))),
diff(tho_peaks).repeat(Config["ApplyFrequency"]), alpha=0.5, label="tho") diff(tho_peaks).repeat(Config["ApplyFrequency"]), label="tho")
ax4.plot(linspace(PSG_SP, PSG_EP, len(diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]))), ax4.plot(linspace(PSG_SP_seconds, PSG_EP_seconds, len(diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]))),
diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]), label="resp") diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]), label="resp")
ax4.set_title("tho_interval") ax4.set_title("tho_interval")
ax4.legend() ax4.legend()
ax4.set_ylim((10, 50)) ax4.set_ylim((10, 50))
ax5 = self.fig.add_subplot(324) ax5 = self.fig.add_subplot(324)
ax5.plot(linspace(orgBcg_SP, orgBcg_EP, len(diff(tho_peaks).repeat(Config["ApplyFrequency"]))), ax5.plot(linspace(orgBcg_SP_seconds, orgBcg_EP_seconds, len(diff(tho_peaks).repeat(Config["ApplyFrequency"]))),
diff(tho_peaks).repeat(Config["ApplyFrequency"])) diff(tho_peaks).repeat(Config["ApplyFrequency"]), label="tho")
ax5.plot(linspace(orgBcg_SP, orgBcg_EP, len(diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]))), ax5.plot(linspace(orgBcg_SP_seconds, orgBcg_EP_seconds, len(diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]))),
diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]), label="resp") diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]), label="resp")
ax5.set_title("resp_interval") ax5.set_title("resp_interval")
ax5.legend()
ax5.set_ylim((10, 50)) ax5.set_ylim((10, 50))
ax6 = self.fig.add_subplot(326) ax6 = self.fig.add_subplot(326)
ax6.plot(linspace(PSG_SP, PSG_EP, len(diff(abd_peaks).repeat(Config["ApplyFrequency"]))), ax6.plot(linspace(PSG_SP_seconds, PSG_EP_seconds, len(diff(abd_peaks).repeat(Config["ApplyFrequency"]))),
diff(abd_peaks).repeat(Config["ApplyFrequency"])) diff(abd_peaks).repeat(Config["ApplyFrequency"]), label="abd")
ax6.plot(linspace(PSG_SP, PSG_EP, len(diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]))), ax6.plot(linspace(PSG_SP_seconds, PSG_EP_seconds, len(diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]))),
diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]), label="resp") diff(orgBcg_peaks).repeat(Config["ApplyFrequency"]), label="resp")
ax6.set_title("abd_interval") ax6.set_title("abd_interval")
ax6.legend()
ax6.set_ylim((10, 50)) ax6.set_ylim((10, 50))
self.fig.canvas.draw() self.fig.canvas.draw()
@ -988,11 +1046,12 @@ class MainWindow_approximately_align(QMainWindow):
return Result().success(info=Constants.DRAW_FINISHED) return Result().success(info=Constants.DRAW_FINISHED)
def DrawAlignScatter(self, epoch_min, epoch_max, tho_bias_list, abd_bias_list, tho_y, abd_y, def DrawAlignScatter(self, epoch_min, epoch_max, tho_bias_list, abd_bias_list, tho_y, abd_y,
tho_frequency, abd_frequency): tho_frequency, abd_frequency):
try: try:
ax1 = self.fig.add_subplot(211) ax1 = self.fig.add_subplot(211)
ax1.scatter(linspace(epoch_min, epoch_max, len(tho_bias_list)), tho_bias_list, alpha=0.2) ax1.scatter(linspace(epoch_min, epoch_max, len(tho_bias_list)), tho_bias_list, alpha=0.2)
ax1.plot(linspace(epoch_min, epoch_max, len(tho_bias_list)), tho_y, color='orange', label=f"THO Frequency: {tho_frequency} Hz") ax1.plot(linspace(epoch_min, epoch_max, len(tho_bias_list)), tho_y, color='orange',
label=f"THO Frequency: {tho_frequency} Hz")
ax1.axhline(y=0, color='red', linestyle='--', alpha=0.3) ax1.axhline(y=0, color='red', linestyle='--', alpha=0.3)
ax1.set_xlabel("Epoch") ax1.set_xlabel("Epoch")
ax1.set_ylabel("Tho Bias / s") ax1.set_ylabel("Tho Bias / s")
@ -1001,7 +1060,8 @@ class MainWindow_approximately_align(QMainWindow):
ax2 = self.fig.add_subplot(212) ax2 = self.fig.add_subplot(212)
ax2.scatter(linspace(epoch_min, epoch_max, len(abd_bias_list)), abd_bias_list, alpha=0.2) ax2.scatter(linspace(epoch_min, epoch_max, len(abd_bias_list)), abd_bias_list, alpha=0.2)
ax2.plot(linspace(epoch_min, epoch_max, len(abd_bias_list)), abd_y, color='orange', label=f"ABD Frequency: {abd_frequency} Hz") ax2.plot(linspace(epoch_min, epoch_max, len(abd_bias_list)), abd_y, color='orange',
label=f"ABD Frequency: {abd_frequency} Hz")
ax2.axhline(y=0, color='red', linestyle='--', alpha=0.3) ax2.axhline(y=0, color='red', linestyle='--', alpha=0.3)
ax2.set_xlabel("Epoch") ax2.set_xlabel("Epoch")
ax2.set_ylabel("Abd Bias / s") ax2.set_ylabel("Abd Bias / s")
@ -1029,6 +1089,7 @@ class Data:
self.processed_downsample_Abd = None self.processed_downsample_Abd = None
def open_file(self): def open_file(self):
info = ""
if Path(Config["Path"]["Input_orgBcg"]).is_file(): if Path(Config["Path"]["Input_orgBcg"]).is_file():
Config["Path"]["Input_orgBcg"] = str(Path(Config["Path"]["Input_orgBcg"]).parent) Config["Path"]["Input_orgBcg"] = str(Path(Config["Path"]["Input_orgBcg"]).parent)
if Path(Config["Path"]["Input_Tho"]).is_file(): if Path(Config["Path"]["Input_Tho"]).is_file():
@ -1036,6 +1097,13 @@ class Data:
if Path(Config["Path"]["Input_Abd"]).is_file(): if Path(Config["Path"]["Input_Abd"]).is_file():
Config["Path"]["Input_Abd"] = str(Path(Config["Path"]["Input_Abd"]).parent) Config["Path"]["Input_Abd"] = str(Path(Config["Path"]["Input_Abd"]).parent)
result = PublicFunc.get_machine_start_time_bias(Config["Path"]["Input_Tho"], Config["Path"]["Input_orgBcg"])
if result.status:
Config["TimeBiasSecond"] = result.data["time_bias"]
else:
info += result.info + "\n"
result = PublicFunc.examine_file(Config["Path"]["Input_orgBcg"], Filename.ORGBCG_RAW, Params.ENDSWITH_TXT) result = PublicFunc.examine_file(Config["Path"]["Input_orgBcg"], Filename.ORGBCG_RAW, Params.ENDSWITH_TXT)
if result.status: if result.status:
Config["Path"]["Input_orgBcg"] = result.data["path"] Config["Path"]["Input_orgBcg"] = result.data["path"]
@ -1055,6 +1123,8 @@ class Data:
else: else:
return result return result
try: try:
self.raw_orgBcg = read_csv(Config["Path"]["Input_orgBcg"], self.raw_orgBcg = read_csv(Config["Path"]["Input_orgBcg"],
encoding=Params.UTF8_ENCODING, encoding=Params.UTF8_ENCODING,
@ -1069,7 +1139,7 @@ class Data:
return Result().failure(info=Constants.INPUT_FAILURE + Constants.FAILURE_REASON[ return Result().failure(info=Constants.INPUT_FAILURE + Constants.FAILURE_REASON[
"Open_Data_Exception"] + "\n" + format_exc()) "Open_Data_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.INPUT_FINISHED) return Result().success(info=info + Constants.INPUT_FINISHED)
def save(self, epoch): def save(self, epoch):
try: try:
@ -1114,6 +1184,10 @@ class Data:
int(Config["orgBcg_seconds"] * Config["ApplyFrequency"])) int(Config["orgBcg_seconds"] * Config["ApplyFrequency"]))
self.processed_Tho = resample(self.raw_Tho, int(Config["PSG_seconds"] * Config["ApplyFrequency"])) self.processed_Tho = resample(self.raw_Tho, int(Config["PSG_seconds"] * Config["ApplyFrequency"]))
self.processed_Abd = resample(self.raw_Abd, int(Config["PSG_seconds"] * Config["ApplyFrequency"])) self.processed_Abd = resample(self.raw_Abd, int(Config["PSG_seconds"] * Config["ApplyFrequency"]))
self.processed_downsample_orgBcg = self.processed_orgBcg.copy()
self.processed_downsample_Tho = self.processed_Tho.copy()
self.processed_downsample_Abd = self.processed_Abd.copy()
except Exception as e: except Exception as e:
return Result().failure( return Result().failure(
info=Constants.APPROXIMATELY_ONLY_ALIGN_RESAMPLE_FAILURE + Constants.FAILURE_REASON[ info=Constants.APPROXIMATELY_ONLY_ALIGN_RESAMPLE_FAILURE + Constants.FAILURE_REASON[
@ -1206,9 +1280,20 @@ class Data:
if Config["PSGConfig"]["PSGZScore"]: if Config["PSGConfig"]["PSGZScore"]:
self.processed_Tho = (self.processed_Tho - mean(self.processed_Tho)) / std(self.processed_Tho) self.processed_Tho = (self.processed_Tho - mean(self.processed_Tho)) / std(self.processed_Tho)
self.processed_Abd = (self.processed_Abd - mean(self.processed_Abd)) / std(self.processed_Abd) self.processed_Abd = (self.processed_Abd - mean(self.processed_Abd)) / std(self.processed_Abd)
if Config["PSGConfig"]["PSGZScoreLimit"]:
limit = 6
self.processed_Tho[self.processed_Tho > limit] = limit
self.processed_Tho[self.processed_Tho < -limit] = -limit
self.processed_Abd[self.processed_Abd > limit] = limit
self.processed_Abd[self.processed_Abd < -limit] = -limit
if Config["orgBcgConfig"]["orgBcgZScore"]: if Config["orgBcgConfig"]["orgBcgZScore"]:
self.processed_orgBcg = (self.processed_orgBcg - mean(self.processed_orgBcg)) / std( self.processed_orgBcg = (self.processed_orgBcg - mean(self.processed_orgBcg)) / std(
self.processed_orgBcg) self.processed_orgBcg)
if Config["orgBcgConfig"]["orgBcgZScoreLimit"]:
limit = 6
self.processed_orgBcg[self.processed_orgBcg > limit] = limit
self.processed_orgBcg[self.processed_orgBcg < -limit] = -limit
except Exception as e: except Exception as e:
return Result().failure( return Result().failure(
info=Constants.APPROXIMATELY_STANDARDIZE_FAILURE + Constants.FAILURE_REASON[ info=Constants.APPROXIMATELY_STANDARDIZE_FAILURE + Constants.FAILURE_REASON[
@ -1224,12 +1309,18 @@ class Data:
self.processed_downsample_Tho = self.processed_Tho[::int(temp_frequency / Config["ApplyFrequency"])] self.processed_downsample_Tho = self.processed_Tho[::int(temp_frequency / Config["ApplyFrequency"])]
self.processed_downsample_Abd = self.processed_Abd[::int(temp_frequency / Config["ApplyFrequency"])] self.processed_downsample_Abd = self.processed_Abd[::int(temp_frequency / Config["ApplyFrequency"])]
self.processed_downsample_orgBcg = self.processed_orgBcg[::int(temp_frequency / Config["ApplyFrequency"])] self.processed_downsample_orgBcg = self.processed_orgBcg[::int(temp_frequency / Config["ApplyFrequency"])]
except Exception as e: except Exception as e:
return Result().failure( return Result().failure(
info=Constants.APPROXIMATELY_ALIGN_RESAMPLE_FAILURE + Constants.FAILURE_REASON[ info=Constants.APPROXIMATELY_ALIGN_RESAMPLE_FAILURE + Constants.FAILURE_REASON[
"Resample_Exception"] + "\n" + format_exc()) "Resample_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.APPROXIMATELY_ALIGN_RESAMPLE_FINISHED) return Result().success(info=Constants.APPROXIMATELY_ALIGN_RESAMPLE_FINISHED, data={
"tho_length": len(self.processed_downsample_Tho),
"abd_length": len(self.processed_downsample_Abd),
"orgBcg_length": len(self.processed_downsample_orgBcg)
})
def calculate_correlation1(self): def calculate_correlation1(self):
# 计算互相关1/2 # 计算互相关1/2
@ -1305,9 +1396,10 @@ class Data:
def get_epoch(self): def get_epoch(self):
# 获取epoch # 获取epoch
try: try:
epoch_min = max(0, Config["pos"] // 30 // Config["ApplyFrequency"] + 1) epoch_second = Params.APPROXIMATELY_ALIGN_CONFIG_NEW_CONTENT["Second_PerEpoch"]
epoch_max = min(len(self.processed_downsample_Tho) // 30 // Config["ApplyFrequency"] - 1, epoch_min = max(0, Config["pos"] // epoch_second // Config["ApplyFrequency"] + 1)
(len(self.processed_downsample_orgBcg) + Config["pos"]) // 30 // Config[ epoch_max = min(len(self.processed_downsample_Tho) // epoch_second // Config["ApplyFrequency"] - 1,
(len(self.processed_downsample_orgBcg) + Config["pos"]) // epoch_second // Config[
"ApplyFrequency"] - 1) "ApplyFrequency"] - 1)
result = {"epoch_min": epoch_min, "epoch_max": epoch_max} result = {"epoch_min": epoch_min, "epoch_max": epoch_max}
@ -1380,7 +1472,14 @@ class Data:
theilsen = TheilSenRegressor() theilsen = TheilSenRegressor()
theilsen.fit(X, y) theilsen.fit(X, y)
slope = theilsen.coef_[0] slope = theilsen.coef_[0]
frequency = 1 - slope / epoch_second / temp_freq if slope != 0 else float('inf') # frequency = 1 - slope / epoch_second / temp_freq if slope != 0 else float('inf')
if slope != 0:
drift_rate = slope / epoch_second
# frequency = temp_freq * (1 - drift_rate)
frequency = 1 - drift_rate
else:
# frequency = float(temp_freq)
frequency = 1
theilsen_y = theilsen.predict(X) theilsen_y = theilsen.predict(X)
@ -1389,9 +1488,8 @@ class Data:
"frequency": frequency, "frequency": frequency,
"slope": slope, "slope": slope,
"intercept": theilsen.intercept_}, "intercept": theilsen.intercept_},
) )
except Exception as e: except Exception as e:
return Result().failure( return Result().failure(
info=Constants.APPROXIMATELY_ESTIMATE_FREQUENCY_FAILURE + Constants.FAILURE_REASON[ info=Constants.APPROXIMATELY_ESTIMATE_FREQUENCY_FAILURE + Constants.FAILURE_REASON[
"Estimate_Frequency_Exception"] + "\n" + format_exc()) "Estimate_Frequency_Exception"] + "\n" + format_exc())

View File

@ -317,6 +317,10 @@ class MainWindow_artifact_label(QMainWindow):
self.ui.tableWidget_type_5.cellDoubleClicked.connect(self.__slot_tableWidget_on_cell_double_clicked__) self.ui.tableWidget_type_5.cellDoubleClicked.connect(self.__slot_tableWidget_on_cell_double_clicked__)
self.ui.pushButton_input_setting.clicked.connect(self.setting.show) self.ui.pushButton_input_setting.clicked.connect(self.setting.show)
self.ui.pushButton_prev_move.setShortcut(QCoreApplication.translate("MainWindow", Params.ARTIFACT_LABEL_BTN_PREV_SHORTCUT_KEY))
self.ui.pushButton_pause.setShortcut(QCoreApplication.translate("MainWindow", Params.ARTIFACT_LABEL_BTN_PAUSE_SHORTCUT_KEY))
self.ui.pushButton_next_move.setShortcut(QCoreApplication.translate("MainWindow", Params.ARTIFACT_LABEL_BTN_NEXT_SHORTCUT_KEY))
@overrides @overrides
def closeEvent(self, event): def closeEvent(self, event):
reply = QMessageBox.question(self, '确认', '确认退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No) reply = QMessageBox.question(self, '确认', '确认退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)

View File

@ -276,6 +276,11 @@ class MainWindow_bcg_quality_label(QMainWindow):
self.ui.pushButton_prev.setShortcut(QCoreApplication.translate("MainWindow", Params.BCG_QUALITY_LABEL_BTN_PREV_SHORTCUT_KEY)) self.ui.pushButton_prev.setShortcut(QCoreApplication.translate("MainWindow", Params.BCG_QUALITY_LABEL_BTN_PREV_SHORTCUT_KEY))
self.ui.pushButton_next.setShortcut(QCoreApplication.translate("MainWindow", Params.BCG_QUALITY_LABEL_BTN_NEXT_SHORTCUT_KEY)) self.ui.pushButton_next.setShortcut(QCoreApplication.translate("MainWindow", Params.BCG_QUALITY_LABEL_BTN_NEXT_SHORTCUT_KEY))
self.ui.pushButton_a1.setShortcut(QCoreApplication.translate("MainWindow", Params.BCG_QUALITY_LABEL_BTN_a1_SHORTCUT_KEY))
self.ui.pushButton_a2.setShortcut(QCoreApplication.translate("MainWindow", Params.BCG_QUALITY_LABEL_BTN_a2_SHORTCUT_KEY))
self.ui.pushButton_b1.setShortcut(QCoreApplication.translate("MainWindow", Params.BCG_QUALITY_LABEL_BTN_b1_SHORTCUT_KEY))
self.ui.pushButton_b2.setShortcut(QCoreApplication.translate("MainWindow", Params.BCG_QUALITY_LABEL_BTN_b2_SHORTCUT_KEY))
self.ui.pushButton_c.setShortcut(QCoreApplication.translate("MainWindow", Params.BCG_QUALITY_LABEL_BTN_c_SHORTCUT_KEY))
@overrides @overrides
def closeEvent(self, event): def closeEvent(self, event):
@ -700,6 +705,9 @@ class MainWindow_bcg_quality_label(QMainWindow):
else: else:
info = result.info info = result.info
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
if self.ui.checkBox_auto_next.isChecked():
self.ui.pushButton_next.click()
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
def __slot_btn_invalid_signal_label__(self): def __slot_btn_invalid_signal_label__(self):
@ -902,11 +910,11 @@ class MainWindow_bcg_quality_label(QMainWindow):
self.ui.pushButton_b2.hide() self.ui.pushButton_b2.hide()
self.ui.pushButton_c.show() self.ui.pushButton_c.show()
self.ui.pushButton_f.show() self.ui.pushButton_f.show()
self.ui.pushButton_a1.setText("a") self.ui.pushButton_a1.setText("a1(U)")
self.ui.pushButton_a2.setText("a2") self.ui.pushButton_a2.setText("a2(I)")
self.ui.pushButton_b1.setText("b") self.ui.pushButton_b1.setText("b1(O)")
self.ui.pushButton_b2.setText("b2") self.ui.pushButton_b2.setText("b2(P)")
self.ui.pushButton_c.setText("c") self.ui.pushButton_c.setText("c(J)")
self.ui.pushButton_f.setText("删除") self.ui.pushButton_f.setText("删除")
self.ui.tableWidget_a1.show() self.ui.tableWidget_a1.show()
self.ui.tableWidget_a2.hide() self.ui.tableWidget_a2.hide()
@ -927,11 +935,11 @@ class MainWindow_bcg_quality_label(QMainWindow):
self.ui.pushButton_b2.show() self.ui.pushButton_b2.show()
self.ui.pushButton_c.show() self.ui.pushButton_c.show()
self.ui.pushButton_f.show() self.ui.pushButton_f.show()
self.ui.pushButton_a1.setText("a1") self.ui.pushButton_a1.setText("a1(U)")
self.ui.pushButton_a2.setText("a2") self.ui.pushButton_a2.setText("a2(I)")
self.ui.pushButton_b1.setText("b1") self.ui.pushButton_b1.setText("b1(O)")
self.ui.pushButton_b2.setText("b2") self.ui.pushButton_b2.setText("b2(P)")
self.ui.pushButton_c.setText("c") self.ui.pushButton_c.setText("c(J)")
self.ui.pushButton_f.setText("删除") self.ui.pushButton_f.setText("删除")
self.ui.tableWidget_a1.show() self.ui.tableWidget_a1.show()
self.ui.tableWidget_a2.show() self.ui.tableWidget_a2.show()

View File

@ -1,354 +0,0 @@
from ast import literal_eval
from gc import collect
from math import floor
from pathlib import Path
from traceback import format_exc
from PySide6.QtWidgets import QMessageBox, QMainWindow, QApplication
from numpy import array
from overrides import overrides
from pandas import read_csv, DataFrame
from yaml import dump, load, FullLoader
from func.utils.ConfigParams import Filename, Params
from func.utils.PublicFunc import PublicFunc
from func.utils.Constants import Constants
from func.utils.Result import Result
from ui.MainWindow.MainWindow_cut_PSG import Ui_MainWindow_cut_PSG
Config = {
}
ButtonState = {
"Default": {
"pushButton_execute": True
},
"Current": {
"pushButton_execute": True
}
}
class MainWindow_cut_PSG(QMainWindow):
def __init__(self):
super(MainWindow_cut_PSG, self).__init__()
self.ui = Ui_MainWindow_cut_PSG()
self.ui.setupUi(self)
self.root_path = None
self.sampID = None
self.__read_config__()
self.data = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
# 初始化进度条
self.ui.progressbar.setStyleSheet(Constants.PROGRESSBAR_STYLE)
self.progressbar = self.ui.progressbar
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
PublicFunc.__resetAllButton__(self, ButtonState)
Config.update({
"Path": {
"InputFolder": str(Path(self.root_path) / Filename.PATH_PSG_TEXT / Path(str(self.sampID))),
"SaveFolder": str(Path(self.root_path) / Filename.PATH_PSG_ALIGNED / Path(str(self.sampID))),
"InputAlignInfo": str(Path(self.root_path) / Filename.PATH_LABEL / Path(str(self.sampID)))
}
})
self.ui.plainTextEdit_channel.setPlainText(', '.join(Config["ChannelInput"].keys()))
self.ui.plainTextEdit_label.setPlainText(', '.join(Config["LabelInput"].keys()))
self.ui.pushButton_execute.clicked.connect(self.__slot_btn_execute__)
@overrides
def closeEvent(self, event):
reply = QMessageBox.question(self, '确认', '确认退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
if reply == QMessageBox.Yes:
PublicFunc.__disableAllButton__(self, ButtonState)
PublicFunc.statusbar_show_msg(self, PublicFunc.format_status_msg(Constants.SHUTTING_DOWN))
QApplication.processEvents()
# 释放资源
del self.data
self.deleteLater()
collect()
event.accept()
else:
event.ignore()
def __reset__(self):
ButtonState["Current"].update(ButtonState["Default"].copy())
def __read_config__(self):
if not Path(Params.CUT_PSG_CONFIG_FILE_PATH).exists():
with open(Params.CUT_PSG_CONFIG_FILE_PATH, "w") as f:
dump(Params.CUT_PSG_CONFIG_NEW_CONTENT, f)
with open(Params.CUT_PSG_CONFIG_FILE_PATH, "r") as f:
file_config = load(f.read(), Loader=FullLoader)
Config.update(file_config)
# 数据回显
self.ui.spinBox_ECGFreq.setValue(Config["ECGFreq"])
def __slot_btn_execute__(self):
PublicFunc.__disableAllButton__(self, ButtonState)
self.data = Data(self.root_path, self.sampID)
Config["ECGFreq"] = self.ui.spinBox_ECGFreq.value()
# 检查文件是否存在并获取其数据采样率
PublicFunc.progressbar_update(self, 1, 5, Constants.CUT_PSG_GETTING_FILE_AND_FREQ, 0)
result = self.data.get_file_and_freq()
if not result.status:
PublicFunc.text_output(self.ui, "(1/5)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(1/5)" + result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
# 导入数据
PublicFunc.progressbar_update(self, 2, 5, Constants.INPUTTING_DATA, 10)
result = self.data.open_file()
if not result.status:
PublicFunc.text_output(self.ui, "(2/5)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(2/5)" + result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
# 切割数据
PublicFunc.progressbar_update(self, 3, 5, Constants.CUT_PSG_CUTTING_DATA, 40)
result = self.data.cut_data()
if not result.status:
PublicFunc.text_output(self.ui, "(3/5)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(3/5)" + result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
# 标签映射
PublicFunc.progressbar_update(self, 4, 5, Constants.CUT_PSG_ALIGNING_LABEL, 60)
result = self.data.align_label()
if not result.status:
PublicFunc.text_output(self.ui, "(4/5)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(4/5)" + result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
# 保存数据
PublicFunc.progressbar_update(self, 5, 5, Constants.SAVING_DATA, 70)
result = self.data.save()
if not result.status:
PublicFunc.text_output(self.ui, "(5/5)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(5/5)" + result.info, Constants.TIPS_TYPE_INFO)
for key, raw in self.data.raw.items():
info = "保存{}的长度为{},采样率为{}Hz".format(key, str(len(raw)), str(self.data.freq[key]))
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
QApplication.processEvents()
PublicFunc.msgbox_output(self, result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
class Data:
def __init__(self, root_path, sampID):
self.alignInfo = None
self.raw = {key: array([]) for key in Config["ChannelInput"]}
self.freq = {key: 0 for key in Config["ChannelInput"]}
self.SALabel = None
self.startTime = None
self.root_path = root_path
self.sampID = sampID
def get_file_and_freq(self):
try:
for file_path in Path(Config["Path"]["InputFolder"]).glob('*'):
if file_path.is_file():
file_stem = Path(file_path).stem
for key, prefix in Config["ChannelInput"].items():
if file_stem.startswith(prefix):
freq_str = file_stem.rsplit('_', 1)[1]
try:
freq = int(freq_str)
self.freq[key] = freq
except ValueError:
return Result().failure(info=Constants.CUT_PSG_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["Filename_Format_not_Correct"])
for value in self.freq.values():
if value == 0:
return Result().failure(info=Constants.CUT_PSG_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["Filename_Format_not_Correct"])
if not any((Config["LabelInput"]["SA Label"] + Config["EndWith"]["SA Label"]) in str(file) for file in Path(Config["Path"]["InputFolder"]).glob('*')):
return Result().failure(info=Constants.CUT_PSG_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["File_not_Exist"])
if not any((Config["StartTime"] + Config["EndWith"]["StartTime"]) in str(file) for file in Path(Config["Path"]["InputFolder"]).glob('*')):
return Result().failure(info=Constants.CUT_PSG_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["File_not_Exist"])
if not Path(Config["Path"]["InputAlignInfo"]).exists():
return Result().failure(info=Constants.CUT_PSG_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["File_not_Exist"])
except Exception as e:
return Result().failure(info=Constants.CUT_PSG_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["Get_File_and_Freq_Excepetion"] + "\n" + format_exc())
return Result().success(info=Constants.CUT_PSG_GET_FILE_AND_FREQ_FINISHED)
def open_file(self):
path = str(Path(self.root_path) / Filename.PATH_PSG_TEXT / Path(str(self.sampID)))
for value in Config["ChannelInput"].values():
result = PublicFunc.examine_file(path, value, Params.ENDSWITH_TXT)
if not result.status:
return result
if Path(Config["Path"]["InputAlignInfo"]).is_file():
Config["Path"]["InputAlignInfo"] = str(Path(Config["Path"]["InputAlignInfo"]).parent)
Config["Path"]["InputAlignInfo"] = str(
Path(Config["Path"]["InputAlignInfo"]) / Path(
Filename.PRECISELY_ALIGN_INFO + Params.ENDSWITH_TXT))
try:
for key in Config["ChannelInput"].keys():
self.raw[key] = read_csv(Path(Config["Path"]["InputFolder"]) / Path((Config["ChannelInput"][key] + str(self.freq[key]) + Config["EndWith"][key])),
encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
self.SALabel = read_csv(Path(Config["Path"]["InputFolder"]) / Path((Config["LabelInput"]["SA Label"] + Config["EndWith"]["SA Label"])),
encoding=Params.GBK_ENCODING)
self.startTime = read_csv(Path(Config["Path"]["InputFolder"]) / Path((Config["StartTime"] + Config["EndWith"]["StartTime"])),
encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
self.alignInfo = read_csv(Path(Config["Path"]["InputAlignInfo"]),
encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
self.alignInfo = literal_eval(self.alignInfo[0])
except Exception as e:
return Result().failure(info=Constants.INPUT_FAILURE +
Constants.FAILURE_REASON["Open_Data_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.INPUT_FINISHED)
def cut_data(self):
try:
for key, raw in self.raw.items():
# 转换切割点
ECG_freq = Config["ECGFreq"]
raw_freq = self.freq[key]
duration_second = ((self.alignInfo["cut_index"]["back_ECG"] - self.alignInfo["cut_index"]["front_ECG"]) // 1000) + 1
start_index_cut = floor(self.alignInfo["cut_index"]["front_ECG"] * (raw_freq / ECG_freq))
end_index_cut = start_index_cut + (duration_second * raw_freq)
try:
# 切割信号
self.raw[key] = self.raw[key][start_index_cut:end_index_cut]
except Exception:
return Result().failure(info=Constants.CUT_PSG_CUT_DATA_FAILURE +
Constants.FAILURE_REASON["Cut_Data_Length_not_Correct"])
except Exception as e:
return Result().failure(info=Constants.CUT_PSG_CUT_DATA_FAILURE +
Constants.FAILURE_REASON["Cut_Data_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.CUT_PSG_CUT_DATA_FINISHED)
def align_label(self):
try:
# 读取SA标签
self.SALabel = self.SALabel.loc[:, ~self.SALabel.columns.str.contains("^Unnamed")]
self.SALabel = self.SALabel[self.SALabel["Event type"].isin(Params.CUT_PSG_SALABEL_EVENT)]
self.SALabel["Duration"] = self.SALabel["Duration"].astype(str)
self.SALabel["Duration"] = self.SALabel["Duration"].str.replace(r' \(.*?\)', '', regex=True)
except Exception:
return Result().failure(info=Constants.CUT_PSG_ALIGN_LABEL_FAILURE +
Constants.FAILURE_REASON["Align_Label_SALabel_Format_not_Correct"])
try:
# 获取记录开始时间
start_time = str(self.startTime[0]).split(" ")[1]
start_time = Data.get_time_to_seconds(start_time)
# 计算起始时间秒数和终止时间秒数
self.SALabel["Start"] = (self.SALabel["Time"].apply(self.get_time_to_seconds) - start_time).apply(
lambda x: x + 24 * 3600 if x < 0 else x).astype(int)
self.SALabel["End"] = self.SALabel["Start"] + self.SALabel["Duration"].astype(float).round(0).astype(int)
# 标签映射
ECG_length = self.alignInfo["cut_index"]["back_ECG"] - self.alignInfo["cut_index"]["front_ECG"]
self.SALabel["Start"] = self.SALabel["Start"] - round((self.alignInfo["cut_index"]["front_ECG"] / 1000))
self.SALabel["End"] = self.SALabel["End"] - round((self.alignInfo["cut_index"]["front_ECG"] / 1000))
self.SALabel = self.SALabel[self.SALabel["End"] >= 0]
self.SALabel.loc[self.SALabel["Start"] < 0, "Start"] = 0
self.SALabel = self.SALabel[self.SALabel["Start"] < ECG_length]
self.SALabel.loc[self.SALabel["End"] >= ECG_length, "End"] = ECG_length - 1
except Exception as e:
return Result().failure(info=Constants.CUT_PSG_ALIGN_LABEL_FAILURE +
Constants.FAILURE_REASON["Align_Label_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.CUT_PSG_ALIGN_LABEL_FINISHED)
def save(self):
for raw in self.raw.values():
if len(raw) == 0:
return Result().failure(info=Constants.SAVE_FAILURE +
Constants.FAILURE_REASON["Data_not_Exist"])
try:
for key, raw in self.raw.items():
DataFrame(raw.reshape(-1)).to_csv(Path(Config["Path"]["SaveFolder"]) / Path((Config["ChannelSave"][key] + str(self.freq[key]) + Config["EndWith"][key])),
index=False, header=False)
self.SALabel.to_csv(Path(Config["Path"]["SaveFolder"]) / Path((Config["LabelSave"]["SA Label"] + Config["EndWith"]["SA Label"])),
index=False,
encoding="gbk")
except PermissionError as e:
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
except FileNotFoundError as e:
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
except Exception as e:
return Result().failure(info=Constants.SAVE_FAILURE +
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.SAVE_FINISHED)
@staticmethod
def get_time_to_seconds(time_str):
h, m, s = map(int, time_str.split(":"))
return h * 3600 + m * 60 + s

View File

@ -0,0 +1,656 @@
import re
import traceback
from ast import literal_eval
from gc import collect
from math import floor, ceil
from pathlib import Path
from traceback import format_exc
import soxr
from PySide6.QtWidgets import QMessageBox, QMainWindow, QApplication
from numpy import array
from overrides import overrides
from pandas import read_csv, DataFrame
from yaml import dump, load, FullLoader
import numpy as np
from func.utils.ConfigParams import Filename, Params
from func.utils.PublicFunc import PublicFunc
from func.utils.Constants import Constants
from func.utils.Result import Result
from numpy import float32
from ui.MainWindow.MainWindow_cut_PAIR_FILE import Ui_MainWindow_cut_PAIR_FILE
Config = {
}
ButtonState = {
"Default": {
"checkBox_roughCut": True,
"checkBox_roughResample": False,
"pushButton_deleteRoughCut": False,
"pushButton_execute": True,
"spinBox_OrgBCGShift": False
},
"Current": {
"checkBox_roughCut": True,
"checkBox_roughResample": False,
"pushButton_deleteRoughCut": False,
"pushButton_execute": True,
"spinBox_OrgBCGShift": False
}
}
class MainWindow_cut_PAIR_FILE(QMainWindow):
def __init__(self):
super(MainWindow_cut_PAIR_FILE, self).__init__()
self.ui = Ui_MainWindow_cut_PAIR_FILE()
self.ui.setupUi(self)
self.root_path = None
self.sampID = None
self.__read_config__()
self.data = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
# 初始化进度条
self.ui.progressbar.setStyleSheet(Constants.PROGRESSBAR_STYLE)
self.progressbar = self.ui.progressbar
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
PublicFunc.__resetAllButton__(self, ButtonState)
Config.update({
"Path": {
"InputPSGFolder": str(Path(self.root_path) / Filename.PATH_PSG_TEXT / Path(str(self.sampID))),
"SavePSGFolder": str(Path(self.root_path) / Filename.PATH_PSG_ALIGNED / Path(str(self.sampID))),
"InputAlignInfo": str(Path(self.root_path) / Filename.PATH_LABEL / Path(str(self.sampID))),
"InputOrgBCGFolder": str(Path(self.root_path) / Filename.PATH_ORGBCG_TEXT / Path(str(self.sampID))),
"SaveOrgBCGFolder": str(Path(self.root_path) / Filename.PATH_ORGBCG_ALIGNED / Path(str(self.sampID)))
}
})
self.ui.plainTextEdit_channel.setPlainText(', '.join(Config["ChannelInput"].keys()))
self.ui.plainTextEdit_label.setPlainText(', '.join(Config["LabelInput"].keys()))
self.ui.pushButton_execute.clicked.connect(self.__slot_btn_execute__)
self.ui.checkBox_roughCut.stateChanged.connect(self.__change_approximate_align_mode__)
self.ui.pushButton_deleteRoughCut.clicked.connect(self.__delete_rough_cut_file__)
self.ui.spinBox_OrgBCGShift.setEnabled(False)
@overrides
def closeEvent(self, event):
reply = QMessageBox.question(self, '确认', '确认退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
if reply == QMessageBox.Yes:
PublicFunc.__disableAllButton__(self, ButtonState)
PublicFunc.statusbar_show_msg(self, PublicFunc.format_status_msg(Constants.SHUTTING_DOWN))
QApplication.processEvents()
# 释放资源
del self.data
self.deleteLater()
collect()
event.accept()
else:
event.ignore()
def __reset__(self):
ButtonState["Current"].update(ButtonState["Default"].copy())
def __read_config__(self):
if not Path(Params.CUT_PAIR_FILE_CONFIG_FILE_PATH).exists():
with open(Params.CUT_PAIR_FILE_CONFIG_FILE_PATH, "w") as f:
dump(Params.CUT_PAIR_FILE_CONFIG_NEW_CONTENT, f)
with open(Params.CUT_PAIR_FILE_CONFIG_FILE_PATH, "r") as f:
file_config = load(f.read(), Loader=FullLoader)
Config.update(file_config)
# 数据回显
self.ui.spinBox_ECGFreq.setValue(Config["ECGFreq"])
def __change_approximate_align_mode__(self):
# ChannelInput 添加OrgBCGCHannelInput
if self.ui.checkBox_roughCut.isChecked():
Config["ChannelInput"].update(Config["OrgBCGChannelInput"])
Config["ChannelInput"].update(Config["ECGChannelInput"])
# 修改ChannelSave中的Sync为RoughCut
for key in Config["ChannelSave"].keys():
if "Sync" in Config["ChannelSave"][key]:
Config["ChannelSave"][key] = Config["ChannelSave"][key].replace("Sync", "RoughCut")
ButtonState["Default"]["pushButton_deleteRoughCut"] = True
ButtonState["Default"]["checkBox_roughResample"] = True
self.ui.plainTextEdit_channel.setPlainText(', '.join(Config["ChannelInput"].keys()))
self.ui.spinBox_OrgBCGShift.setEnabled(True)
ButtonState["Current"]["pushButton_deleteRoughCut"] = True
ButtonState["Current"]["checkBox_roughResample"] = True
PublicFunc.finish_operation(self, ButtonState)
else:
# ChannelInput 移除OrgBCGCHannelInput
for key in Config["OrgBCGChannelInput"].keys():
if key in Config["ChannelInput"]:
Config["ChannelInput"].pop(key)
for key in Config["ECGChannelInput"].keys():
if key in Config["ChannelInput"]:
Config["ChannelInput"].pop(key)
# print(Config["ChannelInput"])
# 修改ChannelSave中的RoughCut为Sync
for key in Config["ChannelSave"].keys():
if "RoughCut" in Config["ChannelSave"][key]:
Config["ChannelSave"][key] = Config["ChannelSave"][key].replace("RoughCut", "Sync")
ButtonState["Default"]["pushButton_deleteRoughCut"] = False
ButtonState["Default"]["checkBox_roughResample"] = False
self.ui.plainTextEdit_channel.setPlainText(', '.join(Config["ChannelInput"].keys()))
self.ui.spinBox_OrgBCGShift.setEnabled(False)
ButtonState["Current"]["pushButton_deleteRoughCut"] = False
ButtonState["Current"]["checkBox_roughResample"] = False
PublicFunc.finish_operation(self, ButtonState)
def __slot_btn_execute__(self):
PublicFunc.__disableAllButton__(self, ButtonState)
self.data = Data(self.root_path, self.sampID)
Config["ECGFreq"] = self.ui.spinBox_ECGFreq.value()
# 检查文件是否存在并获取其数据采样率
PublicFunc.progressbar_update(self, 1, 5, Constants.CUT_PAIR_FILE_GETTING_FILE_AND_FREQ, 0)
result = self.data.get_file_and_freq()
if not result.status:
PublicFunc.text_output(self.ui, "(1/5)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
if self.ui.checkBox_roughCut.isChecked():
Config["BCGFreq"] = self.data.freq["OrgBCG"]
Config["ECGFreq"] = self.data.freq["ECG"]
PublicFunc.text_output(self.ui, "(1/5)" + result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
# 导入数据
PublicFunc.progressbar_update(self, 2, 5, Constants.INPUTTING_DATA, 10)
result = self.data.open_file()
if not result.status:
PublicFunc.text_output(self.ui, "(2/5)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(2/5)" + result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
if self.ui.checkBox_roughCut.isChecked():
# 获取或计算粗对齐信息
PublicFunc.progressbar_update(self, 3, 5, Constants.CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO, 20)
result_approximate = self.data.get_approximately_align_info()
if not result_approximate:
PublicFunc.msgbox_output(self, Constants.CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO_FAILURE, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(3/5)" + Constants.CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO_FINISHED, Constants.TIPS_TYPE_INFO)
if self.ui.checkBox_roughResample.isChecked():
result_resample = self.data.resample_BCG()
if not result_resample.status:
PublicFunc.text_output(self.ui, "(3/5)" + result_resample.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result_resample.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(3/5)" + result_resample.info, Constants.TIPS_TYPE_INFO)
result_approximate = self.data.calc_approximately_align_info(int(self.ui.spinBox_OrgBCGShift.value()))
if not result_approximate.status:
PublicFunc.text_output(self.ui, "(3/5)" + result_approximate.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result_approximate.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(3/5)" + result_approximate.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
# 切割数据
PublicFunc.progressbar_update(self, 3, 5, Constants.CUT_PAIR_FILE_CUTTING_DATA, 40)
PublicFunc.text_output(self.ui, "(3/5)" + str(self.data.alignInfo["cut_index"]), Constants.TIPS_TYPE_INFO)
result = self.data.cut_data()
if not result.status:
PublicFunc.text_output(self.ui, "(3/5)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(3/5)" + result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
# 标签映射
PublicFunc.progressbar_update(self, 4, 5, Constants.CUT_PAIR_FILE_ALIGNING_LABEL, 60)
result = self.data.align_label()
if not result.status:
PublicFunc.text_output(self.ui, "(4/5)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(4/5)" + result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
# 保存数据
PublicFunc.progressbar_update(self, 5, 5, Constants.SAVING_DATA, 70)
result = self.data.save()
if not result.status:
PublicFunc.text_output(self.ui, "(5/5)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(5/5)" + result.info, Constants.TIPS_TYPE_INFO)
for key, raw in self.data.raw.items():
info = "保存{}的长度为{},采样率为{}Hz".format(key, str(len(raw)), str(self.data.freq[key]))
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
QApplication.processEvents()
PublicFunc.msgbox_output(self, result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
def __delete_rough_cut_file__(self):
PublicFunc.__disableAllButton__(self, ButtonState)
self.data = Data(self.root_path, self.sampID)
# 删除粗切割文件
PublicFunc.progressbar_update(self, 1, 1, Constants.CUT_PAIR_FILE_DELETING_ROUGH_CUT_FILE, 50)
result = self.data.delete_rough_cut_file()
if not result.status:
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
PublicFunc.finish_operation(self, ButtonState)
return
else:
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState)
class Data:
def __init__(self, root_path, sampID):
self.actualBCGFreq = None
self.TimeBiasSecond = None
self.alignInfo = None
self.raw = {key: array([]) for key in Config["ChannelInput"]}
self.freq = {key: 0 for key in Config["ChannelInput"]}
self.SALabel = None
self.startTime = None
self.root_path = root_path
self.sampID = sampID
def get_file_and_freq(self):
try:
for file_path in Path(Config["Path"]["InputPSGFolder"]).glob('*'):
if file_path.is_file():
file_stem = Path(file_path).stem
for key, prefix in Config["ChannelInput"].items():
if not prefix.startswith("PSG:"):
continue
prefix = prefix[len("PSG:"):]
if file_stem.startswith(prefix):
freq_str = file_stem.rsplit('_', 1)[1]
try:
freq = int(freq_str)
self.freq[key] = freq
except ValueError:
return Result().failure(info=Constants.CUT_PAIR_FILE_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["Filename_Format_not_Correct"] + f"\n{Config['ChannelInput']}")
for file_path in Path(Config["Path"]["InputOrgBCGFolder"]).glob('*'):
if file_path.is_file():
file_stem = Path(file_path).stem
for key, prefix in Config["ChannelInput"].items():
if not prefix.startswith("OrgBCG:"):
continue
prefix = prefix[len("OrgBCG:"):]
if file_stem.startswith(prefix):
freq_str = file_stem.rsplit('_', 1)[1]
try:
freq = int(freq_str)
self.freq[key] = freq
except ValueError:
return Result().failure(info=Constants.CUT_PAIR_FILE_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["Filename_Format_not_Correct"] + f"\n{Config['ChannelInput']}")
for value in self.freq.values():
if value == 0:
return Result().failure(info=Constants.CUT_PAIR_FILE_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["Filename_Format_not_Correct"] + f"\n{Config['ChannelInput']}")
if not any((Config["LabelInput"]["SA Label"] + Config["EndWith"]["SA Label"]) in str(file) for file in Path(Config["Path"]["InputPSGFolder"]).glob('*')):
return Result().failure(info=Constants.CUT_PAIR_FILE_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["File_Not_Exist"])
if not any((Config["StartTime"] + Config["EndWith"]["StartTime"]) in str(file) for file in Path(Config["Path"]["InputPSGFolder"]).glob('*')):
return Result().failure(info=Constants.CUT_PAIR_FILE_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["File_Not_Exist"])
if not Path(Config["Path"]["InputAlignInfo"]).exists():
return Result().failure(info=Constants.CUT_PAIR_FILE_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["File_Not_Exist"])
except Exception as e:
return Result().failure(info=Constants.CUT_PAIR_FILE_GET_FILE_AND_FREQ_FAILURE +
Constants.FAILURE_REASON["Get_File_and_Freq_Excepetion"] + "\n" + format_exc())
return Result().success(info=Constants.CUT_PAIR_FILE_GET_FILE_AND_FREQ_FINISHED)
def open_file(self):
psg_path = str(Path(self.root_path) / Filename.PATH_PSG_TEXT / Path(str(self.sampID)))
bcg_path = str(Path(self.root_path) / Filename.PATH_ORGBCG_TEXT / Path(str(self.sampID)))
for value in Config["ChannelInput"].values():
if value.startswith("PSG:"):
value = value[len("PSG:"):]
result = PublicFunc.examine_file(psg_path, value, Params.ENDSWITH_TXT)
if not result.status:
return result
elif value.startswith("OrgBCG:"):
value = value[len("OrgBCG:"):]
result = PublicFunc.examine_file(bcg_path, value, Params.ENDSWITH_TXT)
if not result.status:
return result
if Path(Config["Path"]["InputAlignInfo"]).is_file():
Config["Path"]["InputAlignInfo"] = str(Path(Config["Path"]["InputAlignInfo"]).parent)
Config["Path"]["Input_Approximately_Align"] = str(
Path(Config["Path"]["InputAlignInfo"]) / Path(
Filename.APPROXIMATELY_ALIGN_INFO + Params.ENDSWITH_CSV))
Config["Path"]["InputAlignInfo"] = str(
Path(Config["Path"]["InputAlignInfo"]) / Path(
Filename.PRECISELY_ALIGN_INFO + Params.ENDSWITH_TXT))
try:
for key in Config["ChannelInput"].keys():
if not Config["ChannelInput"][key].startswith("OrgBCG"):
self.raw[key] = read_csv(Path(Config["Path"]["InputPSGFolder"]) / Path((Config["ChannelInput"][key][len("PSG:"):] + str(self.freq[key]) + Config["EndWith"][key])),
encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
elif Config["ChannelInput"][key].startswith("OrgBCG"):
self.raw[key] = read_csv(Path(Config["Path"]["InputOrgBCGFolder"]) / Path((Config["ChannelInput"][key][len("OrgBCG:"):] + str(self.freq[key]) + Config["EndWith"][key])),
encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
self.SALabel = read_csv(Path(Config["Path"]["InputPSGFolder"]) / Path((Config["LabelInput"]["SA Label"] + Config["EndWith"]["SA Label"])),
encoding=Params.GBK_ENCODING)
self.startTime = read_csv(Path(Config["Path"]["InputPSGFolder"]) / Path((Config["StartTime"] + Config["EndWith"]["StartTime"])),
encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
if Path(Config["Path"]["InputAlignInfo"]).exists():
self.alignInfo = read_csv(Path(Config["Path"]["InputAlignInfo"]),
encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
cleaned_str = re.sub(r'np\.(int64|float64|float32|int32)\((.*?)\)', r'\2', self.alignInfo[0])
self.alignInfo = literal_eval(cleaned_str)
except Exception as e:
return Result().failure(info=Constants.INPUT_FAILURE +
Constants.FAILURE_REASON["Open_Data_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.INPUT_FINISHED)
def get_approximately_align_info(self):
try:
df = read_csv(Config["Path"]["Input_Approximately_Align"])
pos = df["pos"].values[-1]
ApplyFrequency = df["ApplyFrequency"].values[-1]
self.TimeBiasSecond = pos / ApplyFrequency
self.actualBCGFreq = df["estimate_freq"].values[-1] * Config["BCGFreq"]
return Result().success(info=Constants.INPUT_FINISHED)
except Exception as e:
self.TimeBiasSecond = 0
self.actualBCGFreq = Config["BCGFreq"]
traceback.print_exc()
return Result().failure(info=Constants.INPUT_FAILURE
+ Constants.FAILURE_REASON["Get_Approximately_Align_Info_Exception"]
+ "\n" + format_exc())
def resample_BCG(self):
try:
for key in self.raw.keys():
if Config["ChannelInput"][key].startswith("OrgBCG:"):
# data = self.raw[key]
# n_samples = len(data)
# duration = n_samples / self.actualBCGFreq
#
# t_old = np.linspace(0, duration, n_samples, endpoint=False)
# n_new = int(np.round(duration * Config["BCGFreq"]))
# t_new = np.linspace(0, duration, n_new, endpoint=False)
# self.raw[key] = np.interp(t_new, t_old, data)
resample_signal = soxr.resample(
x=self.raw[key].astype(np.float64),
in_rate=self.actualBCGFreq,
out_rate=Config["BCGFreq"],
quality='VHQ'
)
print(f"Resampled BCG from {self.actualBCGFreq}Hz to {Config['BCGFreq']}Hz, original length: {len(self.raw[key])}, new length: {len(resample_signal)}")
self.raw[key] = resample_signal.astype(self.raw[key].dtype)
self.TimeBiasSecond = int(self.TimeBiasSecond * (self.actualBCGFreq / Config["BCGFreq"]))
return Result().success(info=Constants.CUT_PAIR_FILE_ROUGH_RESAMPLE_BCG_FINISHED)
except Exception as e:
traceback.print_exc()
print(e)
return Result().failure(info=Constants.CUT_PAIR_FILE_ROUGH_RESAMPLE_BCG_FAILURE +
Constants.FAILURE_REASON["Resample_BCG_Exception"] + "\n" + format_exc())
def calc_approximately_align_info(self, OrgBCGShift=0):
try:
# 获取BCG长度
BCG_freq = Config["BCGFreq"]
BCG_second = len(self.raw["OrgBCG"]) // BCG_freq
# 计算ECG长度
ECG_freq = Config["ECGFreq"]
ECG_second = len(self.raw["ECG"]) // ECG_freq
pos = self.TimeBiasSecond
# 如果pos<0表示BCG信号比ECG信号提前需要在开头去除掉一部分BCG信号
if pos < 0:
front_BCG = ceil(-pos) - OrgBCGShift
front_ECG = 0
else:
front_BCG = 0
front_ECG = ceil(pos) + OrgBCGShift
# 计算剩余长度
remain_BCG_second = BCG_second - front_BCG
remain_ECG_second = ECG_second - front_ECG
remain_second = min(remain_BCG_second, remain_ECG_second)
back_BCG = front_BCG + remain_second - 1
back_ECG = front_ECG + remain_second - 1
self.alignInfo = {
"cut_index": {
"front_BCG": front_BCG * BCG_freq,
"back_BCG": back_BCG * BCG_freq,
"front_ECG": front_ECG * ECG_freq,
"back_ECG": back_ECG * ECG_freq,
}
}
return Result().success(info=Constants.CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO_CALC_FINISHED)
except Exception as e:
traceback.print_exc()
print(e)
Result().failure(info=Constants.CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO_FAILURE +
Constants.FAILURE_REASON["Calculate_Approximately_Align_Info_Exception"] + "\n" + format_exc())
def delete_rough_cut_file(self):
# 在保存路径中删除RoughCut文件
try:
for key in Config["ChannelInput"].keys():
if Config["ChannelInput"][key].startswith("OrgBCG:"):
file_path = Path(Config["Path"]["SaveOrgBCGFolder"]).glob(f"{Config['ChannelSave'][key][len('OrgBCG:'):]}*{Config['EndWith'][key]}")
for file in file_path:
file.unlink()
if Config["ChannelInput"][key].startswith("PSG:"):
file_path = Path(Config["Path"]["SavePSGFolder"]).glob(f"{Config['ChannelSave'][key][len('PSG:'):]}*{Config['EndWith'][key]}")
for file in file_path:
file.unlink()
return Result().success(info=Constants.CUT_PAIR_FILE_DELETE_ROUGH_CUT_FILE_FINISHED)
except Exception as e:
return Result().failure(info=Constants.CUT_PAIR_FILE_DELETE_ROUGH_CUT_FILE_FAILURE +
Constants.FAILURE_REASON["Delete_Rough_Cut_File_Exception"] + "\n" + format_exc())
def cut_data(self):
try:
for key, raw in self.raw.items():
if Config["ChannelInput"][key].startswith("PSG:"):
# 转换切割点
ECG_freq = Config["ECGFreq"]
raw_freq = self.freq[key]
duration_second = ((self.alignInfo["cut_index"]["back_ECG"] - self.alignInfo["cut_index"]["front_ECG"]) // ECG_freq) + 1
start_index_cut = floor(self.alignInfo["cut_index"]["front_ECG"] * (raw_freq / ECG_freq))
end_index_cut = start_index_cut + (duration_second * raw_freq)
try:
# 切割信号
self.raw[key] = self.raw[key][start_index_cut:end_index_cut]
except Exception:
return Result().failure(info=Constants.CUT_PAIR_FILE_CUT_DATA_FAILURE +
Constants.FAILURE_REASON["Cut_Data_Length_not_Correct"])
elif Config["ChannelInput"][key].startswith("OrgBCG:"):
# 转换切割点
BCG_freq = Config["BCGFreq"]
raw_freq = self.freq[key]
duration_second = ((self.alignInfo["cut_index"]["back_BCG"] - self.alignInfo["cut_index"]["front_BCG"]) // BCG_freq) + 1
start_index_cut = floor(self.alignInfo["cut_index"]["front_BCG"] * (raw_freq / BCG_freq))
end_index_cut = start_index_cut + (duration_second * raw_freq)
try:
# 切割信号
self.raw[key] = self.raw[key][start_index_cut:end_index_cut]
except Exception:
return Result().failure(info=Constants.CUT_PAIR_FILE_CUT_DATA_FAILURE +
Constants.FAILURE_REASON["Cut_Data_Length_not_Correct"])
except Exception as e:
return Result().failure(info=Constants.CUT_PAIR_FILE_CUT_DATA_FAILURE +
Constants.FAILURE_REASON["Cut_Data_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.CUT_PAIR_FILE_CUT_DATA_FINISHED)
def align_label(self):
try:
# 读取SA标签
self.SALabel = self.SALabel.loc[:, ~self.SALabel.columns.str.contains("^Unnamed")]
self.SALabel = self.SALabel[self.SALabel["Event type"].isin(Params.CUT_PAIR_FILE_SALABEL_EVENT)]
self.SALabel["Duration"] = self.SALabel["Duration"].astype(str)
self.SALabel["Duration"] = self.SALabel["Duration"].str.replace(r' \(.*?\)', '', regex=True)
except Exception:
return Result().failure(info=Constants.CUT_PAIR_FILE_ALIGN_LABEL_FAILURE +
Constants.FAILURE_REASON["Align_Label_SALabel_Format_not_Correct"])
try:
# 获取记录开始时间
start_time = str(self.startTime[0]).split(" ")[1]
start_time = Data.get_time_to_seconds(start_time)
ECG_freq = Config["ECGFreq"]
# 计算起始时间秒数和终止时间秒数
self.SALabel["Start"] = (self.SALabel["Time"].apply(self.get_time_to_seconds) - start_time).apply(
lambda x: x + 24 * 3600 if x < 0 else x).astype(int)
self.SALabel["End"] = self.SALabel["Start"] + self.SALabel["Duration"].astype(float).round(0).astype(int)
# 标签映射
ECG_length = self.alignInfo["cut_index"]["back_ECG"] - self.alignInfo["cut_index"]["front_ECG"]
self.SALabel["Start"] = self.SALabel["Start"] - round((self.alignInfo["cut_index"]["front_ECG"] / ECG_freq))
self.SALabel["End"] = self.SALabel["End"] - round((self.alignInfo["cut_index"]["front_ECG"] / ECG_freq))
self.SALabel = self.SALabel[self.SALabel["End"] >= 0]
self.SALabel.loc[self.SALabel["Start"] < 0, "Start"] = 0
self.SALabel = self.SALabel[self.SALabel["Start"] < ECG_length]
self.SALabel.loc[self.SALabel["End"] >= ECG_length, "End"] = ECG_length - 1
except Exception as e:
return Result().failure(info=Constants.CUT_PAIR_FILE_ALIGN_LABEL_FAILURE +
Constants.FAILURE_REASON["Align_Label_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.CUT_PAIR_FILE_ALIGN_LABEL_FINISHED)
def save(self):
for raw in self.raw.values():
if len(raw) == 0:
return Result().failure(info=Constants.SAVE_FAILURE +
Constants.FAILURE_REASON["Data_not_Exist"])
try:
for key, raw in self.raw.items():
if Config["ChannelInput"][key].startswith("PSG:"):
# print(f"Saving PSG channel: {key} to {Config['Path']['SavePSGFolder']} / {Config['ChannelSave'][key] + str(self.freq[key]) + Config['EndWith'][key]}")
DataFrame(raw.reshape(-1)).to_csv(Path(Config["Path"]["SavePSGFolder"]) / Path((Config["ChannelSave"][key][len("PSG:"):] + str(self.freq[key]) + Config["EndWith"][key])),
index=False, header=False)
elif Config["ChannelInput"][key].startswith("OrgBCG:"):
# print(f"Saving OrgBCG channel: {key} to {Config['Path']['SaveOrgBCGFolder']} / {Config['ChannelSave'][key] + str(self.freq[key]) + Config['EndWith'][key]}")
DataFrame(raw.reshape(-1)).to_csv(Path(Config["Path"]["SaveOrgBCGFolder"]) / Path((Config["ChannelSave"][key][len("OrgBCG:"):] + str(self.freq[key]) + Config["EndWith"][key])),
index=False, header=False)
# 重排index从1开始并给index命名
self.SALabel.sort_values(by=["Start"], inplace=True)
self.SALabel.reset_index(drop=True, inplace=True)
self.SALabel.index = self.SALabel.index + 1
self.SALabel.index.name = "Index"
self.SALabel.to_csv(Path(Config["Path"]["SavePSGFolder"]) / Path((Config["LabelSave"]["SA Label"] + Config["EndWith"]["SA Label"])),
encoding="gbk")
except PermissionError as e:
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
except FileNotFoundError as e:
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
except Exception as e:
return Result().failure(info=Constants.SAVE_FAILURE +
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.SAVE_FINISHED)
@staticmethod
def get_time_to_seconds(time_str):
h, m, s = map(int, time_str.split(":"))
return h * 3600 + m * 60 + s

View File

@ -207,6 +207,8 @@ class MainWindow_detect_Jpeak(QMainWindow):
self.ui.spinBox_intervalHigh.editingFinished.connect(self.__update_config__) self.ui.spinBox_intervalHigh.editingFinished.connect(self.__update_config__)
self.ui.checkBox_useCPU.stateChanged.connect(self.__update_config__) self.ui.checkBox_useCPU.stateChanged.connect(self.__update_config__)
self.ui.comboBox_model.currentTextChanged.connect(self.__update_config__) self.ui.comboBox_model.currentTextChanged.connect(self.__update_config__)
self.ui.radioButton_skip_process.toggled.connect(self.__update_config__)
self.ui.radioButton_bandpass_process.toggled.connect(self.__update_config__)
@overrides @overrides
def closeEvent(self, event): def closeEvent(self, event):
@ -262,6 +264,7 @@ class MainWindow_detect_Jpeak(QMainWindow):
return Result().failure(info=Constants.DRAW_FAILURE) return Result().failure(info=Constants.DRAW_FAILURE)
def __update_config__(self): def __update_config__(self):
sender = self.sender()
Config["Filter"]["BandPassLow"] = self.ui.doubleSpinBox_bandPassLow.value() Config["Filter"]["BandPassLow"] = self.ui.doubleSpinBox_bandPassLow.value()
Config["Filter"]["BandPassHigh"] = self.ui.doubleSpinBox_bandPassHigh.value() Config["Filter"]["BandPassHigh"] = self.ui.doubleSpinBox_bandPassHigh.value()
Config["PeaksValue"] = self.ui.spinBox_peaksValue.value() Config["PeaksValue"] = self.ui.spinBox_peaksValue.value()
@ -270,6 +273,10 @@ class MainWindow_detect_Jpeak(QMainWindow):
Config["IntervalHigh"] = self.ui.spinBox_intervalHigh.value() Config["IntervalHigh"] = self.ui.spinBox_intervalHigh.value()
Config["UseCPU"] = self.ui.checkBox_useCPU.isChecked() Config["UseCPU"] = self.ui.checkBox_useCPU.isChecked()
Config["DetectMethod"] = self.ui.comboBox_model.currentText() Config["DetectMethod"] = self.ui.comboBox_model.currentText()
if sender == self.ui.radioButton_skip_process:
Config["Filter"]["Mode"] = "skip"
elif sender == self.ui.radioButton_bandpass_process:
Config["Filter"]["Mode"] = "bandpass"
def __slot_btn_input__(self): def __slot_btn_input__(self):
PublicFunc.__disableAllButton__(self, ButtonState) PublicFunc.__disableAllButton__(self, ButtonState)
@ -331,7 +338,8 @@ class MainWindow_detect_Jpeak(QMainWindow):
# 预测峰值 # 预测峰值
PublicFunc.progressbar_update(self, 2, 3, Constants.DETECT_JPEAK_PREDICTING_PEAK, 10) PublicFunc.progressbar_update(self, 2, 3, Constants.DETECT_JPEAK_PREDICTING_PEAK, 10)
self.model.selected_model = Config["DetectMethod"] self.model.selected_model = Config["DetectMethod"]
result = self.data.predict_Jpeak(self.model) scale = self.ui.spinBox_scaleValue.value() if self.ui.checkBox_scaleEnable.isChecked() else 0
result = self.data.predict_Jpeak(self.model, batch_size=int(self.ui.comboBox_batchSize.currentText()), scale=scale)
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, "(2/3)" + result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(2/3)" + result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
@ -444,22 +452,25 @@ class Data:
Constants.FAILURE_REASON["Data_Not_Exist"]) Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
if ((Config["Filter"]["BandPassLow"] >= Config["Filter"]["BandPassHigh"]) or if Config["Filter"]["Mode"] == "skip":
(Config["Filter"]["BandPassLow"] <= 0) or (Config["Filter"]["BandPassHigh"] <= 0)): self.processed_data = self.raw_data[:len(self.raw_data) // (Config["InputConfig"]["Freq"] * 10) * Config["InputConfig"]["Freq"] * 10]
return Result().failure( return Result().success(info=Constants.PREPROCESS_NO_NEED)
info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Filter_Args_Not_Correct"]) elif Config["Filter"]["Mode"] == "bandpass":
self.processed_data = preprocess(self.raw_data, if ((Config["Filter"]["BandPassLow"] >= Config["Filter"]["BandPassHigh"]) or
Config["InputConfig"]["Freq"], (Config["Filter"]["BandPassLow"] <= 0) or (Config["Filter"]["BandPassHigh"] <= 0)):
Config["Filter"]["BandPassLow"], return Result().failure(
Config["Filter"]["BandPassHigh"], info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Filter_Args_Not_Correct"])
Config["AmpValue"]) self.processed_data = preprocess(self.raw_data,
Config["InputConfig"]["Freq"],
Config["Filter"]["BandPassLow"],
Config["Filter"]["BandPassHigh"],
Config["AmpValue"])
return Result().success(info=Constants.PREPROCESS_FINISHED)
except Exception as e: except Exception as e:
return Result().failure(info=Constants.PREPROCESS_FAILURE + return Result().failure(info=Constants.PREPROCESS_FAILURE +
Constants.FAILURE_REASON["Preprocess_Exception"] + "\n" + format_exc()) Constants.FAILURE_REASON["Preprocess_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.PREPROCESS_FINISHED) def predict_Jpeak(self, model, batch_size=0, scale=0):
def predict_Jpeak(self, model):
if not (Path(model.model_folder_path) / Path(model.selected_model)).exists(): if not (Path(model.model_folder_path) / Path(model.selected_model)).exists():
return Result().failure(info=Constants.DETECT_JPEAK_PREDICT_FAILURE + return Result().failure(info=Constants.DETECT_JPEAK_PREDICT_FAILURE +
Constants.FAILURE_REASON["Model_File_Not_Exist"]) Constants.FAILURE_REASON["Model_File_Not_Exist"])
@ -479,7 +490,9 @@ class Data:
Config["IntervalHigh"], Config["IntervalHigh"],
Config["IntervalLow"], Config["IntervalLow"],
Config["PeaksValue"], Config["PeaksValue"],
Config["UseCPU"]) Config["UseCPU"],
batch_size,
scale)
except Exception as e: except Exception as e:
return Result().failure(info=Constants.DETECT_JPEAK_PREDICT_FAILURE + return Result().failure(info=Constants.DETECT_JPEAK_PREDICT_FAILURE +
Constants.FAILURE_REASON["Predict_Exception"] + "\n" + format_exc()) Constants.FAILURE_REASON["Predict_Exception"] + "\n" + format_exc())

View File

@ -201,6 +201,8 @@ class MainWindow_detect_Rpeak(QMainWindow):
self.ui.doubleSpinBox_bandPassHigh.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.spinBox_peaksValue.editingFinished.connect(self.__update_config__)
self.ui.comboBox_method.currentTextChanged.connect(self.__update_config__) self.ui.comboBox_method.currentTextChanged.connect(self.__update_config__)
self.ui.radioButton_skip_process.toggled.connect(self.__update_config__)
self.ui.radioButton_bandpass_process.toggled.connect(self.__update_config__)
@overrides @overrides
def closeEvent(self, event): def closeEvent(self, event):
@ -260,10 +262,15 @@ class MainWindow_detect_Rpeak(QMainWindow):
return Result().failure(info=Constants.DRAW_FAILURE) return Result().failure(info=Constants.DRAW_FAILURE)
def __update_config__(self): def __update_config__(self):
sender = self.sender()
Config["Filter"]["BandPassLow"] = self.ui.doubleSpinBox_bandPassLow.value() Config["Filter"]["BandPassLow"] = self.ui.doubleSpinBox_bandPassLow.value()
Config["Filter"]["BandPassHigh"] = self.ui.doubleSpinBox_bandPassHigh.value() Config["Filter"]["BandPassHigh"] = self.ui.doubleSpinBox_bandPassHigh.value()
Config["PeaksValue"] = self.ui.spinBox_peaksValue.value() Config["PeaksValue"] = self.ui.spinBox_peaksValue.value()
Config["DetectMethod"] = self.ui.comboBox_method.currentText() Config["DetectMethod"] = self.ui.comboBox_method.currentText()
if sender == self.ui.radioButton_skip_process:
Config["Filter"]["Mode"] = "skip"
elif sender == self.ui.radioButton_bandpass_process:
Config["Filter"]["Mode"] = "bandpass"
def __slot_btn_input__(self): def __slot_btn_input__(self):
PublicFunc.__disableAllButton__(self, ButtonState) PublicFunc.__disableAllButton__(self, ButtonState)
@ -446,20 +453,23 @@ class Data:
Constants.FAILURE_REASON["Data_Not_Exist"]) Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
if ((Config["Filter"]["BandPassLow"] >= Config["Filter"]["BandPassHigh"]) or if Config["Filter"]["Mode"] == "skip":
(Config["Filter"]["BandPassLow"] <= 0) or (Config["Filter"]["BandPassHigh"] <= 0)): self.processed_data = self.raw_data
return Result().failure( return Result().success(info=Constants.PREPROCESS_NO_NEED)
info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Filter_Args_Not_Correct"]) elif Config["Filter"]["Mode"] == "bandpass":
self.processed_data = preprocess(self.raw_data, if ((Config["Filter"]["BandPassLow"] >= Config["Filter"]["BandPassHigh"]) or
Config["InputConfig"]["Freq"], (Config["Filter"]["BandPassLow"] <= 0) or (Config["Filter"]["BandPassHigh"] <= 0)):
Config["Filter"]["BandPassLow"], return Result().failure(
Config["Filter"]["BandPassHigh"]) info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Filter_Args_Not_Correct"])
self.processed_data = preprocess(self.raw_data,
Config["InputConfig"]["Freq"],
Config["Filter"]["BandPassLow"],
Config["Filter"]["BandPassHigh"])
return Result().success(info=Constants.PREPROCESS_FINISHED)
except Exception as e: except Exception as e:
return Result().failure(info=Constants.PREPROCESS_FAILURE + return Result().failure(info=Constants.PREPROCESS_FAILURE +
Constants.FAILURE_REASON["Preprocess_Exception"] + "\n" + format_exc()) Constants.FAILURE_REASON["Preprocess_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.PREPROCESS_FINISHED)
def predict_Rpeak(self): def predict_Rpeak(self):
if self.processed_data is None: if self.processed_data is None:
return Result().failure(info=Constants.DETECT_RPEAK_PREDICT_FAILURE + return Result().failure(info=Constants.DETECT_RPEAK_PREDICT_FAILURE +

View File

@ -36,7 +36,8 @@ ButtonState = {
"pushButton_save": False, "pushButton_save": False,
"pushButton_prev_move": False, "pushButton_prev_move": False,
"pushButton_pause": False, "pushButton_pause": False,
"pushButton_next_move": False "pushButton_next_move": False,
"pushButton_update_state": False
}, },
"Current": { "Current": {
"pushButton_input_setting": True, "pushButton_input_setting": True,
@ -44,7 +45,8 @@ ButtonState = {
"pushButton_save": False, "pushButton_save": False,
"pushButton_prev_move": False, "pushButton_prev_move": False,
"pushButton_pause": False, "pushButton_pause": False,
"pushButton_next_move": False "pushButton_next_move": False,
"pushButton_update_state": False
} }
} }
@ -122,6 +124,10 @@ class SettingWindow(QMainWindow):
self.ui.plainTextEdit_file_path_input_peak.setPlainText(Config["Path"]["Input_Peak"]) self.ui.plainTextEdit_file_path_input_peak.setPlainText(Config["Path"]["Input_Peak"])
self.ui.plainTextEdit_file_path_input_approximately_align.setPlainText(Config["Path"]["Input_Approximately_Align"]) self.ui.plainTextEdit_file_path_input_approximately_align.setPlainText(Config["Path"]["Input_Approximately_Align"])
self.ui.plainTextEdit_file_path_save.setPlainText(Config["Path"]["Save"]) self.ui.plainTextEdit_file_path_save.setPlainText(Config["Path"]["Save"])
if Config["Filter"]["Mode"] == "skip":
self.ui.radioButton_skip_process.setChecked(True)
elif Config["Filter"]["Mode"] == "bandpass":
self.ui.radioButton_bandpass_process.setChecked(True)
if Config["Mode"] == "BCG": if Config["Mode"] == "BCG":
self.ui.spinBox_bandPassOrder.setValue(Config["Filter"]["BCGBandPassOrder"]) self.ui.spinBox_bandPassOrder.setValue(Config["Filter"]["BCGBandPassOrder"])
self.ui.doubleSpinBox_bandPassLow.setValue(Config["Filter"]["BCGBandPassLow"]) self.ui.doubleSpinBox_bandPassLow.setValue(Config["Filter"]["BCGBandPassLow"])
@ -140,6 +146,10 @@ class SettingWindow(QMainWindow):
Config["Path"]["Input_Peak"] = self.ui.plainTextEdit_file_path_input_peak.toPlainText() Config["Path"]["Input_Peak"] = self.ui.plainTextEdit_file_path_input_peak.toPlainText()
Config["Path"]["Input_Approximately_Align"] = self.ui.plainTextEdit_file_path_input_approximately_align.toPlainText() Config["Path"]["Input_Approximately_Align"] = self.ui.plainTextEdit_file_path_input_approximately_align.toPlainText()
Config["Path"]["Save"] = self.ui.plainTextEdit_file_path_save.toPlainText() Config["Path"]["Save"] = self.ui.plainTextEdit_file_path_save.toPlainText()
if self.ui.radioButton_skip_process.isChecked():
Config["Filter"]["Mode"] = "skip"
elif self.ui.radioButton_bandpass_process.isChecked():
Config["Filter"]["Mode"] = "bandpass"
if Config["Mode"] == "BCG": if Config["Mode"] == "BCG":
Config["Filter"]["BCGBandPassOrder"] = self.ui.spinBox_bandPassOrder.value() Config["Filter"]["BCGBandPassOrder"] = self.ui.spinBox_bandPassOrder.value()
Config["Filter"]["BCGBandPassLow"] = self.ui.doubleSpinBox_bandPassLow.value() Config["Filter"]["BCGBandPassLow"] = self.ui.doubleSpinBox_bandPassLow.value()
@ -249,6 +259,9 @@ class MainWindow_label_check(QMainWindow):
self.point_peak_corrected = None self.point_peak_corrected = None
self.annotation_tableWidget = None self.annotation_tableWidget = None
self.move_state = None
self.last_move_state = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }") self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState) PublicFunc.__styleAllButton__(self, ButtonState)
@ -324,6 +337,7 @@ class MainWindow_label_check(QMainWindow):
self.ui.pushButton_prev_move.clicked.connect(self.__slot_btn_move__) self.ui.pushButton_prev_move.clicked.connect(self.__slot_btn_move__)
self.ui.pushButton_pause.clicked.connect(self.__slot_btn_move__) self.ui.pushButton_pause.clicked.connect(self.__slot_btn_move__)
self.ui.pushButton_next_move.clicked.connect(self.__slot_btn_move__) self.ui.pushButton_next_move.clicked.connect(self.__slot_btn_move__)
self.ui.pushButton_update_state.clicked.connect(self.__update_state__)
self.ui.radioButton_move_preset_1.toggled.connect(self.__change_autoplay_args__) self.ui.radioButton_move_preset_1.toggled.connect(self.__change_autoplay_args__)
self.ui.radioButton_move_preset_2.toggled.connect(self.__change_autoplay_args__) self.ui.radioButton_move_preset_2.toggled.connect(self.__change_autoplay_args__)
self.ui.radioButton_move_preset_3.toggled.connect(self.__change_autoplay_args__) self.ui.radioButton_move_preset_3.toggled.connect(self.__change_autoplay_args__)
@ -339,6 +353,20 @@ class MainWindow_label_check(QMainWindow):
self.ui.spinBox_maxRange.editingFinished.connect(self.__update_config__) self.ui.spinBox_maxRange.editingFinished.connect(self.__update_config__)
self.ui.spinBox_moveSpeed.editingFinished.connect(self.__update_config__) self.ui.spinBox_moveSpeed.editingFinished.connect(self.__update_config__)
self.ui.pushButton_prev_move.setShortcut(
QCoreApplication.translate("MainWindow", Params.LABEL_CHECK_BTN_PREV_MOVE_SHORTCUT_KEY))
self.ui.pushButton_next_move.setShortcut(
QCoreApplication.translate("MainWindow", Params.LABEL_CHECK_BTN_NEXT_MOVE_SHORTCUT_KEY))
self.ui.pushButton_pause.setShortcut(
QCoreApplication.translate("MainWindow", Params.LABEL_CHECK_BTN_PAUSE_SHORTCUT_KEY)
)
self.ui.pushButton_update_state.setShortcut(
QCoreApplication.translate("MainWindow", Params.LABEL_CHECK_BTN_UPDATE_STATE_SHORTCUT_KEY)
)
@overrides @overrides
def closeEvent(self, event): def closeEvent(self, event):
reply = QMessageBox.question(self, '确认', '确认退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No) reply = QMessageBox.question(self, '确认', '确认退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
@ -568,6 +596,8 @@ class MainWindow_label_check(QMainWindow):
ButtonState["Current"]["pushButton_prev_move"] = True ButtonState["Current"]["pushButton_prev_move"] = True
ButtonState["Current"]["pushButton_next_move"] = True ButtonState["Current"]["pushButton_next_move"] = True
ButtonState["Current"]["pushButton_pause"] = True ButtonState["Current"]["pushButton_pause"] = True
ButtonState["Current"]["pushButton_update_state"] = True
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
def __slot_btn_save__(self): def __slot_btn_save__(self):
@ -587,6 +617,20 @@ class MainWindow_label_check(QMainWindow):
PublicFunc.msgbox_output(self, result.info, Constants.TIPS_TYPE_INFO) PublicFunc.msgbox_output(self, result.info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
def __update_state__(self):
if self.move_state == "moving":
self.ui.pushButton_pause.click()
self.move_state = "pause"
else:
if self.last_move_state == "prev":
self.ui.pushButton_prev_move.click()
elif self.last_move_state == "next":
self.ui.pushButton_next_move.click()
else:
self.ui.pushButton_next_move.click()
self.move_state = "moving"
def __slot_btn_move__(self): def __slot_btn_move__(self):
if self.data is None: if self.data is None:
return return
@ -594,6 +638,8 @@ class MainWindow_label_check(QMainWindow):
sender = self.sender() sender = self.sender()
if sender == self.ui.pushButton_prev_move: if sender == self.ui.pushButton_prev_move:
self.last_move_state = "prev"
self.move_state = "moving"
Config["AutoplayArgs"]["AutoplayMode"] = "prev" Config["AutoplayArgs"]["AutoplayMode"] = "prev"
self.autoplay_xlim_start = int(self.ax0.get_xlim()[1] - Config["AutoplayArgs"]["MaxRange"]) self.autoplay_xlim_start = int(self.ax0.get_xlim()[1] - Config["AutoplayArgs"]["MaxRange"])
self.autoplay_xlim_end = int(self.ax0.get_xlim()[1]) self.autoplay_xlim_end = int(self.ax0.get_xlim()[1])
@ -605,6 +651,8 @@ class MainWindow_label_check(QMainWindow):
self.timer_autoplay.start(Config["AutoplayArgs"]["MoveSpeed"]) self.timer_autoplay.start(Config["AutoplayArgs"]["MoveSpeed"])
PublicFunc.text_output(self.ui, Constants.LABEL_CHECK_PREV_MOVE, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, Constants.LABEL_CHECK_PREV_MOVE, Constants.TIPS_TYPE_INFO)
elif sender == self.ui.pushButton_next_move: elif sender == self.ui.pushButton_next_move:
self.last_move_state = "next"
self.move_state = "moving"
Config["AutoplayArgs"]["AutoplayMode"] = "next" Config["AutoplayArgs"]["AutoplayMode"] = "next"
self.autoplay_xlim_start = int(self.ax0.get_xlim()[0]) self.autoplay_xlim_start = int(self.ax0.get_xlim()[0])
self.autoplay_xlim_end = int(self.ax0.get_xlim()[0] + Config["AutoplayArgs"]["MaxRange"]) self.autoplay_xlim_end = int(self.ax0.get_xlim()[0] + Config["AutoplayArgs"]["MaxRange"])
@ -1054,7 +1102,7 @@ class Data:
try: try:
if Config["Mode"] == "BCG": if Config["Mode"] == "BCG":
if Config["Filter"]["BCGBandPassOrder"] == 0: if Config["Filter"]["BCGBandPassOrder"] == 0 or Config["Filter"]["Mode"] == "skip":
self.processed_data = self.raw_data self.processed_data = self.raw_data
else: else:
if ((Config["Filter"]["BCGBandPassLow"] >= Config["Filter"]["BCGBandPassHigh"]) or if ((Config["Filter"]["BCGBandPassLow"] >= Config["Filter"]["BCGBandPassHigh"]) or
@ -1067,7 +1115,7 @@ class Data:
Config["Filter"]["BCGBandPassHigh"], Config["Filter"]["BCGBandPassHigh"],
Config["InputConfig"]["Freq"]) Config["InputConfig"]["Freq"])
elif Config["Mode"] == "ECG": elif Config["Mode"] == "ECG":
if Config["Filter"]["ECGBandPassOrder"] == 0: if Config["Filter"]["ECGBandPassOrder"] == 0 or Config["Filter"]["Mode"] == "skip":
self.processed_data = self.raw_data self.processed_data = self.raw_data
else: else:
if ((Config["Filter"]["ECGBandPassLow"] >= Config["Filter"]["ECGBandPassHigh"]) or if ((Config["Filter"]["ECGBandPassLow"] >= Config["Filter"]["ECGBandPassHigh"]) or

View File

@ -16,11 +16,11 @@ from func.Module_detect_Jpeak import MainWindow_detect_Jpeak
from func.Module_detect_Rpeak import MainWindow_detect_Rpeak from func.Module_detect_Rpeak import MainWindow_detect_Rpeak
from func.Module_label_check import MainWindow_label_check from func.Module_label_check import MainWindow_label_check
from func.Module_precisely_align import MainWindow_precisely_align from func.Module_precisely_align import MainWindow_precisely_align
from func.Module_cut_PSG import MainWindow_cut_PSG from func.Module_cut_pair_file import MainWindow_cut_PAIR_FILE
from func.Module_artifact_label import MainWindow_artifact_label from func.Module_artifact_label import MainWindow_artifact_label
from func.Module_bcg_quality_label import MainWindow_bcg_quality_label from func.Module_bcg_quality_label import MainWindow_bcg_quality_label
from func.Module_resp_quality_label import MainWindow_resp_quality_label from func.Module_resp_quality_label import MainWindow_resp_quality_label
from func.Module_SA_label import MainWindow_SA_label from func.Module_SA_label_v2 import MainWindow_SA_label
from func.utils.ConfigParams import Filename, Params from func.utils.ConfigParams import Filename, Params
from func.utils.Constants import Constants from func.utils.Constants import Constants
@ -266,7 +266,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.check_save_path_and_mkdir(root_path, sampID) self.check_save_path_and_mkdir(root_path, sampID)
def __slot_btn_cut_PSG__(self): def __slot_btn_cut_PSG__(self):
self.cut_PSG = MainWindow_cut_PSG() self.cut_PSG = MainWindow_cut_PAIR_FILE()
root_path = self.ui.plainTextEdit_root_path.toPlainText() root_path = self.ui.plainTextEdit_root_path.toPlainText()
sampID = self.ui.comboBox_sampID.currentText() sampID = self.ui.comboBox_sampID.currentText()
if not self.check_root_path(): if not self.check_root_path():

View File

@ -9,13 +9,15 @@ from PySide6.QtWidgets import QMessageBox, QMainWindow, QApplication, QButtonGro
from matplotlib import gridspec, patches from matplotlib import gridspec, patches
from matplotlib.backends.backend_qt import NavigationToolbar2QT from matplotlib.backends.backend_qt import NavigationToolbar2QT
from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg
from matplotlib.ticker import FuncFormatter, ScalarFormatter
from numpy import (diff, where, correlate, corrcoef, searchsorted, sum as np_sum, max as np_max, min as np_min, arange, from numpy import (diff, where, correlate, corrcoef, searchsorted, sum as np_sum, max as np_max, min as np_min, arange,
array, array,
append, delete, abs as np_abs, argmin as np_argmin, argmax as np_argmax, asarray) append, delete, abs as np_abs, argmin as np_argmin, argmax as np_argmax, asarray)
from overrides import overrides from overrides import overrides
from pandas import read_csv, DataFrame from pandas import read_csv, DataFrame
from resampy import resample from resampy import resample as rspy_resample
from scipy.signal import find_peaks
from scipy.signal import find_peaks, resample as ss_resample
from yaml import dump, load, FullLoader from yaml import dump, load, FullLoader
from func.utils.ConfigParams import Filename, Params from func.utils.ConfigParams import Filename, Params
@ -37,7 +39,10 @@ ButtonState = {
"pushButton_calculate_correlation": False, "pushButton_calculate_correlation": False,
"pushButton_correlation_align": False, "pushButton_correlation_align": False,
"pushButton_view_align": False, "pushButton_view_align": False,
"pushButton_save": False "pushButton_save": False,
"checkBox_sync_xlim": False,
"pushButton_getPos": False,
"pushButton_resetPos": False
}, },
"Current": { "Current": {
"pushButton_input_setting": True, "pushButton_input_setting": True,
@ -45,7 +50,10 @@ ButtonState = {
"pushButton_calculate_correlation": False, "pushButton_calculate_correlation": False,
"pushButton_correlation_align": False, "pushButton_correlation_align": False,
"pushButton_view_align": False, "pushButton_view_align": False,
"pushButton_save": False "pushButton_save": False,
"checkBox_sync_xlim": False,
"pushButton_getPos": False,
"pushButton_resetPos": False
}, },
"Statue_1": { "Statue_1": {
"pushButton_input_setting": False, "pushButton_input_setting": False,
@ -53,7 +61,10 @@ ButtonState = {
"pushButton_calculate_correlation": True, "pushButton_calculate_correlation": True,
"pushButton_correlation_align": False, "pushButton_correlation_align": False,
"pushButton_view_align": False, "pushButton_view_align": False,
"pushButton_save": False "pushButton_save": False,
"checkBox_sync_xlim": True,
"pushButton_getPos": False,
"pushButton_resetPos": False
}, },
"Statue_2": { "Statue_2": {
"pushButton_input_setting": False, "pushButton_input_setting": False,
@ -61,7 +72,10 @@ ButtonState = {
"pushButton_calculate_correlation": True, "pushButton_calculate_correlation": True,
"pushButton_correlation_align": True, "pushButton_correlation_align": True,
"pushButton_view_align": False, "pushButton_view_align": False,
"pushButton_save": False "pushButton_save": False,
"checkBox_sync_xlim": False,
"pushButton_getPos": False,
"pushButton_resetPos": False
}, },
"Statue_3": { "Statue_3": {
"pushButton_input_setting": False, "pushButton_input_setting": False,
@ -69,7 +83,10 @@ ButtonState = {
"pushButton_calculate_correlation": False, "pushButton_calculate_correlation": False,
"pushButton_correlation_align": False, "pushButton_correlation_align": False,
"pushButton_view_align": True, "pushButton_view_align": True,
"pushButton_save": False "pushButton_save": False,
"checkBox_sync_xlim": False,
"pushButton_getPos": False,
"pushButton_resetPos": False
}, },
"Statue_4": { "Statue_4": {
"pushButton_input_setting": False, "pushButton_input_setting": False,
@ -77,7 +94,10 @@ ButtonState = {
"pushButton_calculate_correlation": False, "pushButton_calculate_correlation": False,
"pushButton_correlation_align": False, "pushButton_correlation_align": False,
"pushButton_view_align": False, "pushButton_view_align": False,
"pushButton_save": True "pushButton_save": True,
"checkBox_sync_xlim": False,
"pushButton_getPos": False,
"pushButton_resetPos": False
}, },
} }
@ -392,8 +412,12 @@ class MainWindow_precisely_align(QMainWindow):
self.ui.pushButton_correlation_align.clicked.connect(self.__slot_btn_correlation_align__) self.ui.pushButton_correlation_align.clicked.connect(self.__slot_btn_correlation_align__)
self.ui.pushButton_view_align.clicked.connect(self.__slot_btn_view_align__) self.ui.pushButton_view_align.clicked.connect(self.__slot_btn_view_align__)
self.ui.pushButton_save.clicked.connect(self.__slot_btn_save__) self.ui.pushButton_save.clicked.connect(self.__slot_btn_save__)
self.ui.pushButton_getPos.clicked.connect(self.__get_current_pos__)
self.ui.pushButton_resetPos.clicked.connect(self.__reset_pos__)
self.canvas.mpl_connect('pick_event', self.on_pick) self.canvas.mpl_connect('pick_event', self.on_pick)
self.ui.checkBox_sync_xlim.checkStateChanged.connect(self.__checkBox_sync_xlim_changed__)
self.ui.spinBox_BCG_front_JJIV_1.editingFinished.connect(self.__update_coordinate__) self.ui.spinBox_BCG_front_JJIV_1.editingFinished.connect(self.__update_coordinate__)
self.ui.spinBox_BCG_front_JJIV_2.editingFinished.connect(self.__update_coordinate__) self.ui.spinBox_BCG_front_JJIV_2.editingFinished.connect(self.__update_coordinate__)
self.ui.spinBox_BCG_back_JJIV_1.editingFinished.connect(self.__update_coordinate__) self.ui.spinBox_BCG_back_JJIV_1.editingFinished.connect(self.__update_coordinate__)
@ -403,6 +427,8 @@ class MainWindow_precisely_align(QMainWindow):
self.ui.spinBox_ECG_back_RRIV_1.editingFinished.connect(self.__update_coordinate__) self.ui.spinBox_ECG_back_RRIV_1.editingFinished.connect(self.__update_coordinate__)
self.ui.spinBox_ECG_back_RRIV_2.editingFinished.connect(self.__update_coordinate__) self.ui.spinBox_ECG_back_RRIV_2.editingFinished.connect(self.__update_coordinate__)
self.ui.label_sampno.setText(str(self.sampID))
@overrides @overrides
def closeEvent(self, event): def closeEvent(self, event):
reply = QMessageBox.question(self, '确认', '确认退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No) reply = QMessageBox.question(self, '确认', '确认退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
@ -469,39 +495,105 @@ class MainWindow_precisely_align(QMainWindow):
sender = self.sender() sender = self.sender()
def offset_formatter(x, pos):
if self.data.BCG_early:
return f"{int(x + self.data.approximately_align_pos)}"
else:
return f"{int(x - self.data.approximately_align_pos)}"
if sender == self.ui.pushButton_input: if sender == self.ui.pushButton_input:
self.gs = gridspec.GridSpec(2, 1, height_ratios=[1, 1]) self.gs = gridspec.GridSpec(2, 1, height_ratios=[1, 1])
self.fig.subplots_adjust(top=0.95, bottom=0.05, right=0.98, left=0.05, hspace=0.15, wspace=0) self.fig.subplots_adjust(top=0.95, bottom=0.05, right=0.98, left=0.05, hspace=0.15, wspace=0)
self.ax0 = self.fig.add_subplot(self.gs[0]) self.ax0 = self.fig.add_subplot(self.gs[0])
self.ax0.grid(True) self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(Params.FORMATTER) # self.ax0.xaxis.set_major_formatter(Params.FORMATTER)
self.ax1 = self.fig.add_subplot(self.gs[1], sharex=self.ax0, sharey=self.ax0) self.ax1 = self.fig.add_subplot(self.gs[1], sharey=self.ax0)
self.ax1.grid(True) self.ax1.grid(True)
self.ax1.xaxis.set_major_formatter(Params.FORMATTER) # self.ax1.xaxis.set_major_formatter(Params.FORMATTER)
Jpeak = self.data.Jpeak[:-2] Jpeak = self.data.Jpeak[:-2]
Rpeak = self.data.Rpeak[:-2] Rpeak = self.data.Rpeak[:-2]
self.ax0.set_title("JJIV") self.ax0.set_title("JJIV")
self.ax1.set_title("RRIV")
self._syncing_xlim_change = False
def on_ax0_xlim_changed(ax):
if self.ui.checkBox_sync_xlim.isChecked() is False:
return
if self._syncing_xlim_change:
return
if ax is self.ax0:
self._syncing_xlim_change = True
x0, x1 = ax.get_xlim()
self.ax1.set_xlim(x0, x1)
self._syncing_xlim_change = False
def on_ax1_xlim_changed(ax):
if self.ui.checkBox_sync_xlim.isChecked() is False:
return
if self._syncing_xlim_change:
return
if ax is self.ax1:
self._syncing_xlim_change = True
x0, x1 = ax.get_xlim()
self.ax0.set_xlim(x0, x1)
self._syncing_xlim_change = False
if self.data.BCG_early:
Jpeak = Jpeak - self.data.approximately_align_pos
else:
Jpeak = Jpeak + self.data.approximately_align_pos
# if self.data.BCG_early is True:
# self.ax0.stem(Jpeak, plot_element["JJIVs"],
# markerfmt="C0.", linefmt=Constants.PLOT_COLOR_GREEN,
# label=Constants.PRECISELY_ALIGN_PLOT_LABEL_JJIV)
# self.ax1.stem(Rpeak, plot_element["RRIVs"],
# markerfmt="C0.", linefmt=Constants.PLOT_COLOR_ORANGE,
# label=Constants.PRECISELY_ALIGN_PLOT_LABEL_RRIV)
# self.ax0.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--",
# label="Start Line")
# self.ax1.axvline(x=0, color=Constants.PLOT_COLOR_BLACK, linestyle="--", label="Start Line")
# elif self.data.BCG_early is False:
# Jpeak = Jpeak + self.data.approximately_align_pos
# self.ax0.stem(Jpeak, plot_element["JJIVs"],
# markerfmt="C0.", linefmt=Constants.PLOT_COLOR_GREEN,
# label=Constants.PRECISELY_ALIGN_PLOT_LABEL_JJIV)
# self.ax1.stem(Rpeak, plot_element["RRIVs"],
# markerfmt="C0.", linefmt=Constants.PLOT_COLOR_ORANGE,
# label=Constants.PRECISELY_ALIGN_PLOT_LABEL_RRIV)
# self.ax0.axvline(x=0, color=Constants.PLOT_COLOR_BLACK, linestyle="--", label="Start Line")
# self.ax1.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--",
# label="Start Line")
# else:
# self.ax0.stem(Jpeak, plot_element["JJIVs"],
# markerfmt="C0.", linefmt=Constants.PLOT_COLOR_GREEN,
# label=Constants.PRECISELY_ALIGN_PLOT_LABEL_JJIV)
# self.ax1.stem(Rpeak, plot_element["RRIVs"],
# markerfmt="C0.", linefmt=Constants.PLOT_COLOR_ORANGE,
# label=Constants.PRECISELY_ALIGN_PLOT_LABEL_RRIV)
# self.ax0.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--",
# label="Start Line")
# self.ax1.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--",
# label="Start Line")
self.ax0.stem(Jpeak, plot_element["JJIVs"], self.ax0.stem(Jpeak, plot_element["JJIVs"],
markerfmt="C0.", linefmt=Constants.PLOT_COLOR_GREEN, markerfmt="C0.", linefmt=Constants.PLOT_COLOR_GREEN,
label=Constants.PRECISELY_ALIGN_PLOT_LABEL_JJIV) label=Constants.PRECISELY_ALIGN_PLOT_LABEL_JJIV)
self.ax1.set_title("RRIV") self.ax0.xaxis.set_major_formatter(FuncFormatter(offset_formatter))
self.ax1.stem(Rpeak, plot_element["RRIVs"], self.ax1.stem(Rpeak, plot_element["RRIVs"],
markerfmt="C0.", linefmt=Constants.PLOT_COLOR_ORANGE, markerfmt="C0.", linefmt=Constants.PLOT_COLOR_ORANGE,
label=Constants.PRECISELY_ALIGN_PLOT_LABEL_RRIV) label=Constants.PRECISELY_ALIGN_PLOT_LABEL_RRIV)
if self.data.BCG_early is True: self.ax1.xaxis.set_major_formatter(Params.FORMATTER)
self.ax0.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--",
label="Start Line") self.ax0.callbacks.connect('xlim_changed', on_ax0_xlim_changed)
self.ax1.axvline(x=0, color=Constants.PLOT_COLOR_BLACK, linestyle="--", label="Start Line") self.ax1.callbacks.connect('xlim_changed', on_ax1_xlim_changed)
elif self.data.BCG_early is False:
self.ax0.axvline(x=0, color=Constants.PLOT_COLOR_BLACK, linestyle="--", label="Start Line")
self.ax1.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--",
label="Start Line")
else:
self.ax0.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--",
label="Start Line")
self.ax1.axvline(x=self.data.approximately_align_pos, color=Constants.PLOT_COLOR_BLACK, linestyle="--",
label="Start Line")
self.ax0.legend(loc=Constants.PLOT_UPPER_RIGHT) self.ax0.legend(loc=Constants.PLOT_UPPER_RIGHT)
self.ax1.legend(loc=Constants.PLOT_UPPER_RIGHT) self.ax1.legend(loc=Constants.PLOT_UPPER_RIGHT)
@ -631,6 +723,55 @@ class MainWindow_precisely_align(QMainWindow):
self.canvas.draw() self.canvas.draw()
return Result().failure(info=Constants.DRAW_FAILURE) return Result().failure(info=Constants.DRAW_FAILURE)
def __checkBox_sync_xlim_changed__(self):
if not self.ui.checkBox_sync_xlim.isChecked():
self.ui.pushButton_getPos.setEnabled(True)
self.ui.pushButton_resetPos.setEnabled(True)
else:
self.ui.pushButton_getPos.setEnabled(False)
self.ui.pushButton_resetPos.setEnabled(False)
def __get_current_pos__(self):
if self.ui.checkBox_sync_xlim.isChecked():
return
# 获取当前两子图的x轴起始点
ax0_x0, _ = self.ax0.get_xlim()
ax1_x0, _ = self.ax1.get_xlim()
# 获取ax0的trick位置
# if self.data.BCG_early:
# ax1_x0 += self.data.approximately_align_pos
# else:
# ax0_x0 -= self.data.approximately_align_pos
print(ax0_x0, ax1_x0)
actual_pos = -1 * self.data.approximately_align_pos if self.data.BCG_early else self.data.approximately_align_pos
actual_ax0_x0 = ax0_x0 - actual_pos
new_pos = actual_ax0_x0 - ax1_x0
print(actual_ax0_x0, ax1_x0)
if new_pos > 0:
self.data.BCG_early = True
else:
self.data.BCG_early = False
self.data.approximately_align_pos = abs(new_pos)
print(self.data.BCG_early, self.data.approximately_align_pos)
self.ui.label_pos.setText(str(int(self.data.approximately_align_pos) * (-1 if self.data.BCG_early else 1)))
self.ui.pushButton_input.click()
def __reset_pos__(self):
if self.data.TimeBiasSecond > 0:
self.data.BCG_early = True
else:
self.data.BCG_early = False
self.data.approximately_align_pos = abs(self.data.TimeBiasSecond)
self.ui.label_pos.setText(str(int(self.data.approximately_align_pos) * (-1 if self.data.BCG_early else 1)))
def __update_info__(self): def __update_info__(self):
self.ui.spinBox_BCG_front_JJIV_1.setValue(Config["IV_Coordinate"]["BCG_front_1"]) self.ui.spinBox_BCG_front_JJIV_1.setValue(Config["IV_Coordinate"]["BCG_front_1"])
self.ui.spinBox_BCG_front_JJIV_2.setValue(Config["IV_Coordinate"]["BCG_front_2"]) self.ui.spinBox_BCG_front_JJIV_2.setValue(Config["IV_Coordinate"]["BCG_front_2"])
@ -710,6 +851,9 @@ class MainWindow_precisely_align(QMainWindow):
action.setEnabled(True) action.setEnabled(True)
ButtonState["Current"].update(ButtonState["Statue_1"].copy()) ButtonState["Current"].update(ButtonState["Statue_1"].copy())
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
self.ui.label_pos.setText(str(int(self.data.approximately_align_pos) * (-1 if self.data.BCG_early else 1)))
self.ui.pushButton_input.clicked.disconnect() self.ui.pushButton_input.clicked.disconnect()
self.ui.pushButton_input.clicked.connect(self.__slot_btn_repick__) self.ui.pushButton_input.clicked.connect(self.__slot_btn_repick__)
self.ui.pushButton_input.setText("重新选取") self.ui.pushButton_input.setText("重新选取")
@ -1391,6 +1535,14 @@ class MainWindow_precisely_align(QMainWindow):
elif rect_right < 0: elif rect_right < 0:
rect_left = 0 rect_left = 0
rect_right = 0 rect_right = 0
if self.data.BCG_early:
# 如果是提前BCG模式J峰位置需要加上offset
rect_left += self.data.approximately_align_pos
rect_right += self.data.approximately_align_pos
else:
rect_left -= self.data.approximately_align_pos
rect_right -= self.data.approximately_align_pos
indices = where((self.data.Jpeak[:-2] >= rect_left) & (self.data.Jpeak[:-2] <= rect_right))[0] indices = where((self.data.Jpeak[:-2] >= rect_left) & (self.data.Jpeak[:-2] <= rect_right))[0]
if indices is None or len(indices) <= 0: if indices is None or len(indices) <= 0:
if self.ui.radioButton_BCG_front.isChecked(): if self.ui.radioButton_BCG_front.isChecked():
@ -1621,6 +1773,7 @@ class Data:
self.approximately_align_slope = None self.approximately_align_slope = None
self.approximately_align_intercept = None self.approximately_align_intercept = None
self.BCG_early = None self.BCG_early = None
self.TimeBiasSecond = None
self.res_orgBcg = None self.res_orgBcg = None
self.res_BCG = None self.res_BCG = None
@ -1645,9 +1798,6 @@ class Data:
self.correlation_align_point_match_ECG = array([]).astype(int) self.correlation_align_point_match_ECG = array([]).astype(int)
self.correlation_align_point_match_BCG = array([]).astype(int) self.correlation_align_point_match_BCG = array([]).astype(int)
self.argmax_BCG = None
self.argmax_ECG = None
def open_file(self): def open_file(self):
if Path(Config["Path"]["Input_OrgBCG"]).is_file(): if Path(Config["Path"]["Input_OrgBCG"]).is_file():
Config["Path"]["Input_OrgBCG"] = str(Path(Config["Path"]["Input_OrgBCG"]).parent) Config["Path"]["Input_OrgBCG"] = str(Path(Config["Path"]["Input_OrgBCG"]).parent)
@ -1662,6 +1812,13 @@ class Data:
if Path(Config["Path"]["Input_Approximately_Align"]).is_file(): if Path(Config["Path"]["Input_Approximately_Align"]).is_file():
Config["Path"]["Input_Approximately_Align"] = str(Path(Config["Path"]["Input_Approximately_Align"]).parent) Config["Path"]["Input_Approximately_Align"] = str(Path(Config["Path"]["Input_Approximately_Align"]).parent)
result = PublicFunc.get_machine_start_time_bias(Config["Path"]["Input_ECG"], Config["Path"]["Input_OrgBCG"])
if result.status:
self.TimeBiasSecond = result.data["time_bias"] * Config["InputConfig"]["UseFreq"]
else:
self.TimeBiasSecond = 0
result = PublicFunc.examine_file(Config["Path"]["Input_OrgBCG"], Filename.ORGBCG_RAW, Params.ENDSWITH_TXT) result = PublicFunc.examine_file(Config["Path"]["Input_OrgBCG"], Filename.ORGBCG_RAW, Params.ENDSWITH_TXT)
if result.status: if result.status:
Config["Path"]["Input_OrgBCG"] = result.data["path"] Config["Path"]["Input_OrgBCG"] = result.data["path"]
@ -1676,7 +1833,7 @@ class Data:
Filename.PRECISELY_ALIGN_INFO + Params.ENDSWITH_TXT)) Filename.PRECISELY_ALIGN_INFO + Params.ENDSWITH_TXT))
Config["Path"]["Save_OrgBCG"] = str( Config["Path"]["Save_OrgBCG"] = str(
Path(Config["Path"]["Save_OrgBCG"]) / Path( Path(Config["Path"]["Save_OrgBCG"]) / Path(
Filename.ORGBCG_SYNC + str(Config["InputConfig"]["orgBcgFreq"]) + Params.ENDSWITH_TXT)) Filename.ORGBCG_SYNC + str(Config["InputConfig"]["UseFreq"]) + Params.ENDSWITH_TXT))
result = PublicFunc.examine_file(Config["Path"]["Input_BCG"], Filename.BCG_FILTER, Params.ENDSWITH_TXT) result = PublicFunc.examine_file(Config["Path"]["Input_BCG"], Filename.BCG_FILTER, Params.ENDSWITH_TXT)
if result.status: if result.status:
Config["Path"]["Input_BCG"] = result.data["path"] Config["Path"]["Input_BCG"] = result.data["path"]
@ -1688,7 +1845,7 @@ class Data:
Config["InputConfig"]["BCGFreq"]) + Params.ENDSWITH_TXT)) Config["InputConfig"]["BCGFreq"]) + Params.ENDSWITH_TXT))
Config["Path"]["Save_BCG"] = str( Config["Path"]["Save_BCG"] = str(
Path(Config["Path"]["Save_BCG"]) / Path( Path(Config["Path"]["Save_BCG"]) / Path(
Filename.BCG_SYNC + str(Config["InputConfig"]["BCGFreq"]) + Params.ENDSWITH_TXT)) Filename.BCG_SYNC + str(Config["InputConfig"]["UseFreq"]) + Params.ENDSWITH_TXT))
Config["Path"]["Save_Jpeak"] = str( Config["Path"]["Save_Jpeak"] = str(
Path(Config["Path"]["Save_Jpeak"]) / Path( Path(Config["Path"]["Save_Jpeak"]) / Path(
Filename.JPEAK_SYNC + str(Config["InputConfig"]["BCGFreq"]) + Params.ENDSWITH_TXT)) Filename.JPEAK_SYNC + str(Config["InputConfig"]["BCGFreq"]) + Params.ENDSWITH_TXT))
@ -1718,11 +1875,11 @@ class Data:
Filename.RPEAK_FINAL_CORRECTED + "" + Filename.RPEAK_FINAL_CORRECTED + "" +
Config["Path"]["Input_Rpeak"] + Config["Path"]["Input_Rpeak"] +
Constants.FAILURE_REASON["Path_Not_Exist"]) Constants.FAILURE_REASON["Path_Not_Exist"])
if not Path(Config["Path"]["Input_Approximately_Align"]).exists(): # if not Path(Config["Path"]["Input_Approximately_Align"]).exists():
return Result().failure(info=Constants.INPUT_FAILURE + "\n" + # return Result().failure(info=Constants.INPUT_FAILURE + "\n" +
Filename.APPROXIMATELY_ALIGN_INFO + "" + # Filename.APPROXIMATELY_ALIGN_INFO + "" +
Config["Path"]["Input_Approximately_Align"] + # Config["Path"]["Input_Approximately_Align"] +
Constants.FAILURE_REASON["Path_Not_Exist"]) # Constants.FAILURE_REASON["Path_Not_Exist"])
try: try:
self.raw_orgBcg = read_csv(Config["Path"]["Input_OrgBCG"], self.raw_orgBcg = read_csv(Config["Path"]["Input_OrgBCG"],
@ -1740,8 +1897,6 @@ class Data:
self.Rpeak = read_csv(Config["Path"]["Input_Rpeak"], self.Rpeak = read_csv(Config["Path"]["Input_Rpeak"],
encoding=Params.UTF8_ENCODING, encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1) header=None).to_numpy().reshape(-1)
self.argmax_BCG = np_argmax(self.raw_BCG)
self.argmax_ECG = np_argmax(self.raw_ECG)
except Exception as e: except Exception as e:
return Result().failure(info=Constants.INPUT_FAILURE + return Result().failure(info=Constants.INPUT_FAILURE +
Constants.FAILURE_REASON["Open_Data_Exception"] + "\n" + format_exc()) Constants.FAILURE_REASON["Open_Data_Exception"] + "\n" + format_exc())
@ -1764,9 +1919,21 @@ class Data:
self.approximately_align_slope = df["estimate_slope"].values[-1] / \ self.approximately_align_slope = df["estimate_slope"].values[-1] / \
Params.APPROXIMATELY_ALIGN_CONFIG_NEW_CONTENT["Second_PerEpoch"] Params.APPROXIMATELY_ALIGN_CONFIG_NEW_CONTENT["Second_PerEpoch"]
self.approximately_align_intercept = df["estimate_intercept"].values[-1] * Config["InputConfig"]["UseFreq"] self.approximately_align_intercept = df["estimate_intercept"].values[-1] * Config["InputConfig"]["UseFreq"]
self.TimeBiasSecond = self.approximately_align_pos
except Exception: except Exception:
self.approximately_align_pos = 0 self.approximately_align_pos = abs(self.TimeBiasSecond)
if self.approximately_align_pos > 0:
if self.TimeBiasSecond > 0:
self.BCG_early = True
else:
self.BCG_early = False
else:
self.BCG_early = None
return Result().success(info=Constants.INPUT_FINISHED) return Result().success(info=Constants.INPUT_FINISHED)
@ -1776,7 +1943,7 @@ class Data:
try: try:
if Config["InputConfig"]["orgBcgFreq"] != Config["InputConfig"]["UseFreq"]: if Config["InputConfig"]["orgBcgFreq"] != Config["InputConfig"]["UseFreq"]:
self.raw_orgBcg = resample(self.raw_orgBcg, self.raw_orgBcg = ss_resample(self.raw_orgBcg,
int(len(self.raw_orgBcg) * int(len(self.raw_orgBcg) *
(Config["InputConfig"]["UseFreq"] / Config["InputConfig"][ (Config["InputConfig"]["UseFreq"] / Config["InputConfig"][
"orgBcgFreq"]))) "orgBcgFreq"])))
@ -1949,55 +2116,64 @@ class Data:
def correlation_align(self, mode): def correlation_align(self, mode):
try: try:
if mode == "init": if mode == "init":
anchor0 = [Config["front"]["anchor_R"], Config["front"]["anchor_J"]] Config["orgfs"] = ((int(Config["back"]["anchor_J"]) - int(Config["front"]["anchor_J"])) * Config["InputConfig"]["UseFreq"] /
anchor1 = [Config["back"]["anchor_R"], Config["back"]["anchor_J"]] (int(Config["back"]["anchor_R"]) - int(Config["front"]["anchor_R"])))
Config["orgfs"] = ((int(anchor1[1]) - int(anchor0[1])) * Config["InputConfig"]["UseFreq"] / Config["offset_anchor"] = Config["front"]["anchor_R"] - Config["front"]["anchor_J"]
(int(anchor1[0]) - int(anchor0[0])))
Config["offset_anchor"] = anchor0[0] - anchor0[1]
orgfs = Config["orgfs"]
off = Config["offset_anchor"]
self.res_orgBcg = self.raw_orgBcg.copy() self.res_orgBcg = self.raw_orgBcg.copy()
self.res_BCG = self.raw_BCG.copy() self.res_BCG = self.raw_BCG.copy()
self.cut_ECG = self.raw_ECG.copy() self.cut_ECG = self.raw_ECG.copy()
self.cut_Rpeak = self.Rpeak.copy() self.cut_Rpeak = self.Rpeak.copy()
if off > 0: Config["frontcut_index_BCG"], Config["frontcut_index_ECG"] = 0, 0
self.cut_ECG = self.cut_ECG[off:]
anchor0[0] = anchor0[0] - off if Config["offset_anchor"] > 0:
anchor1[0] = anchor1[0] - off self.cut_ECG = self.cut_ECG[Config["offset_anchor"]:]
idxs = where(self.cut_Rpeak > off)[0] Config["front"]["anchor_R"] = Config["front"]["anchor_R"] - Config["offset_anchor"]
self.cut_Rpeak = self.cut_Rpeak[idxs] - off Config["back"]["anchor_R"] = Config["back"]["anchor_R"] - Config["offset_anchor"]
idxs = where(self.cut_Rpeak > Config["offset_anchor"])[0]
self.cut_Rpeak = self.cut_Rpeak[idxs] - Config["offset_anchor"]
Config["frontcut_index_ECG"] += Config["offset_anchor"]
else: else:
self.res_BCG = self.res_BCG[-off:] self.res_BCG = self.res_BCG[-Config["offset_anchor"]:]
self.res_orgBcg = self.res_orgBcg[-off:] self.res_orgBcg = self.res_orgBcg[-Config["offset_anchor"]:]
anchor0[1] = anchor0[1] + off Config["front"]["anchor_J"] = Config["front"]["anchor_J"] + Config["offset_anchor"]
anchor1[1] = anchor1[1] + off Config["back"]["anchor_J"] = Config["back"]["anchor_J"] + Config["offset_anchor"]
Config["frontcut_index_BCG"] -= Config["offset_anchor"]
self.res_BCG = resample(self.res_BCG, orgfs, Config["InputConfig"]["UseFreq"]) self.res_BCG = rspy_resample(self.res_BCG, Config["orgfs"], Config["InputConfig"]["UseFreq"])
self.res_orgBcg = resample(self.res_orgBcg, orgfs, Config["InputConfig"]["UseFreq"]) self.res_orgBcg = rspy_resample(self.res_orgBcg, Config["orgfs"], Config["InputConfig"]["UseFreq"])
anchor0[1] = round(int(anchor0[1]) * Config["InputConfig"]["UseFreq"] / orgfs) Config["front"]["anchor_J"] = round(int(Config["front"]["anchor_J"]) * Config["InputConfig"]["UseFreq"] / Config["orgfs"])
anchor1[1] = round(int(anchor1[1]) * Config["InputConfig"]["UseFreq"] / orgfs) Config["back"]["anchor_J"] = round(int(Config["back"]["anchor_J"]) * Config["InputConfig"]["UseFreq"] / Config["orgfs"])
off = anchor1[0] - anchor1[1] Config["offset_anchor"] = Config["back"]["anchor_R"] - Config["back"]["anchor_J"]
if off > 0: if Config["offset_anchor"] > 0:
self.cut_ECG = self.cut_ECG[off:] self.cut_ECG = self.cut_ECG[Config["offset_anchor"]:]
anchor0[0] = anchor0[0] - off Config["front"]["anchor_R"] = Config["front"]["anchor_R"] - Config["offset_anchor"]
anchor1[0] = anchor1[0] - off Config["back"]["anchor_R"] = Config["back"]["anchor_R"] - Config["offset_anchor"]
idxs = where(self.cut_Rpeak > off)[0] idxs = where(self.cut_Rpeak > Config["offset_anchor"])[0]
self.cut_Rpeak = self.cut_Rpeak[idxs] - off self.cut_Rpeak = self.cut_Rpeak[idxs] - Config["offset_anchor"]
Config["frontcut_index_ECG"] += Config["offset_anchor"] * Config["orgfs"] / Config["InputConfig"]["UseFreq"]
else: else:
self.res_BCG = self.res_BCG[-off:] self.res_BCG = self.res_BCG[-Config["offset_anchor"]:]
self.res_orgBcg = self.res_orgBcg[-off:] self.res_orgBcg = self.res_orgBcg[-Config["offset_anchor"]:]
anchor0[1] = anchor0[1] + off Config["front"]["anchor_J"] = Config["front"]["anchor_J"] + Config["offset_anchor"]
anchor1[1] = anchor1[1] + off Config["back"]["anchor_J"] = Config["back"]["anchor_J"] + Config["offset_anchor"]
Config["frontcut_index_BCG"] -= Config["offset_anchor"] * Config["orgfs"] / Config["InputConfig"]["UseFreq"]
datalen = np_min([len(self.cut_ECG), len(self.res_BCG)]) datalen = np_min([len(self.cut_ECG), len(self.res_BCG)])
print(f"datalen: {datalen} len cut_ECG: {len(self.cut_ECG)} len res_BCG: {len(self.res_BCG)}")
self.cut_ECG = self.cut_ECG[:datalen] self.cut_ECG = self.cut_ECG[:datalen]
self.res_BCG = self.res_BCG[:datalen] self.res_BCG = self.res_BCG[:datalen]
self.res_orgBcg = self.res_orgBcg[:datalen] self.res_orgBcg = self.res_orgBcg[:datalen]
Config["frontcut_index_BCG"] = int(Config["frontcut_index_BCG"])
Config["frontcut_index_ECG"] = int(Config["frontcut_index_ECG"])
Config["backcut_index_BCG"] = int(Config["frontcut_index_BCG"] + datalen)
Config["backcut_index_ECG"] = int(Config["frontcut_index_ECG"] + datalen)
a = np_max([np_max(self.cut_ECG), np_max(self.res_BCG)]) a = np_max([np_max(self.cut_ECG), np_max(self.res_BCG)])
b = np_min([np_min(self.cut_ECG), np_min(self.res_BCG)]) b = np_min([np_min(self.cut_ECG), np_min(self.res_BCG)])
peak_ECG, _ = find_peaks(self.cut_ECG) peak_ECG, _ = find_peaks(self.cut_ECG)
@ -2009,8 +2185,8 @@ class Data:
result = { result = {
"res_BCG": self.res_BCG, "res_BCG": self.res_BCG,
"cut_ECG": self.cut_ECG, "cut_ECG": self.cut_ECG,
"anchor00": anchor0[0], "anchor00": Config["front"]["anchor_R"],
"anchor10": anchor1[0], "anchor10": Config["back"]["anchor_R"],
"a": a, "a": a,
"b": b, "b": b,
"peak_ECG": peak_ECG, "peak_ECG": peak_ECG,
@ -2034,38 +2210,41 @@ class Data:
def data_postprocess(self): def data_postprocess(self):
try: try:
if len(self.correlation_align_point_match_ECG) != 2 and len(self.correlation_align_point_match_BCG) != 2: if len(self.correlation_align_point_match_ECG) != 2 and len(self.correlation_align_point_match_BCG) != 2:
off = 0 Config["offset_anchor"] = 0
else: else:
self.correlation_align_point_match_ECG.sort() self.correlation_align_point_match_ECG.sort()
self.correlation_align_point_match_BCG.sort() self.correlation_align_point_match_BCG.sort()
off = round(((int(self.correlation_align_point_match_ECG[1]) - int( Config["offset_anchor"] = round(((int(self.correlation_align_point_match_ECG[1]) - int(
self.correlation_align_point_match_BCG[1])) + (int(self.correlation_align_point_match_ECG[0]) - int( self.correlation_align_point_match_BCG[1])) + (int(self.correlation_align_point_match_ECG[0]) - int(
self.correlation_align_point_match_BCG[0]))) / 2) self.correlation_align_point_match_BCG[0]))) / 2)
anchor0 = [Config["front"]["anchor_R"], Config["front"]["anchor_J"]] if Config["offset_anchor"] > 0:
anchor1 = [Config["back"]["anchor_R"], Config["back"]["anchor_J"]] self.cut_ECG = self.cut_ECG[Config["offset_anchor"]:]
Config["front"]["anchor_R"] = Config["front"]["anchor_R"] - Config["offset_anchor"]
if off > 0: Config["back"]["anchor_R"] = Config["back"]["anchor_R"] - Config["offset_anchor"]
self.cut_ECG = self.cut_ECG[off:] self.cut_Rpeak = self.cut_Rpeak[where(self.cut_Rpeak > Config["offset_anchor"])[0]] - Config["offset_anchor"]
anchor0[0] = anchor0[0] - off Config["frontcut_index_ECG"] += Config["offset_anchor"] * Config["orgfs"] / Config["InputConfig"]["UseFreq"]
anchor1[0] = anchor1[0] - off
self.cut_Rpeak = self.cut_Rpeak[where(self.cut_Rpeak > off)[0]] - off
else: else:
self.res_BCG = self.res_BCG[-off:] self.res_BCG = self.res_BCG[-Config["offset_anchor"]:]
self.res_orgBcg = self.res_orgBcg[-off:] self.res_orgBcg = self.res_orgBcg[-Config["offset_anchor"]:]
anchor0[1] = anchor0[1] + off Config["front"]["anchor_J"] = Config["front"]["anchor_J"] + Config["offset_anchor"]
anchor1[1] = anchor1[1] + off Config["back"]["anchor_J"] = Config["back"]["anchor_J"] + Config["offset_anchor"]
Config["frontcut_index_BCG"] -= Config["offset_anchor"] * Config["orgfs"] / Config["InputConfig"]["UseFreq"]
datalen = np_min([len(self.cut_ECG), len(self.res_BCG)]) datalen = np_min([len(self.cut_ECG), len(self.res_BCG)])
self.cut_ECG = self.cut_ECG[:datalen] self.cut_ECG = self.cut_ECG[:datalen]
self.res_BCG = self.res_BCG[:datalen] self.res_BCG = self.res_BCG[:datalen]
self.res_orgBcg = self.res_orgBcg[:datalen] self.res_orgBcg = self.res_orgBcg[:datalen]
Config["frontcut_index_BCG"] = int(Config["frontcut_index_BCG"])
Config["frontcut_index_ECG"] = int(Config["frontcut_index_ECG"])
Config["backcut_index_BCG"] = int(Config["frontcut_index_BCG"] + datalen)
Config["backcut_index_ECG"] = int(Config["frontcut_index_ECG"] + datalen)
idxs = where(self.cut_Rpeak < datalen)[0] idxs = where(self.cut_Rpeak < datalen)[0]
self.cut_Rpeak = self.cut_Rpeak[idxs] self.cut_Rpeak = self.cut_Rpeak[idxs]
Config["offset_correct"] = off
self.cut_Jpeak = [] self.cut_Jpeak = []
peaks, _ = find_peaks(self.res_BCG) peaks, _ = find_peaks(self.res_BCG)
for i in self.cut_Rpeak: for i in self.cut_Rpeak:
@ -2074,22 +2253,11 @@ class Data:
self.cut_Jpeak.append(peaks[idx]) self.cut_Jpeak.append(peaks[idx])
self.cut_Jpeak = asarray(self.cut_Jpeak).astype(int) self.cut_Jpeak = asarray(self.cut_Jpeak).astype(int)
frontcut_index_BCG = int(
(self.argmax_BCG - np_argmax(self.res_BCG) / Config["InputConfig"]["UseFreq"] * Config["orgfs"]))
backcut_index_BCG = int(len(self.res_BCG) / Config["InputConfig"]["UseFreq"] * Config["orgfs"] + np_argmax(
self.raw_BCG) - np_argmax(self.res_BCG) / Config["InputConfig"]["UseFreq"] * Config["orgfs"])
frontcut_index_ECG = self.argmax_ECG - np_argmax(self.cut_ECG)
backcut_index_ECG = len(self.cut_ECG) + self.argmax_ECG - np_argmax(self.cut_ECG)
Config["frontcut_index_BCG"] = frontcut_index_BCG
Config["backcut_index_BCG"] = backcut_index_BCG
Config["frontcut_index_ECG"] = frontcut_index_ECG
Config["backcut_index_ECG"] = backcut_index_ECG
except Exception as e: except Exception as e:
return Result().failure(info=Constants.PRECISELY_ALIGN_POSTPROCESS_VIEW_FAILURE + return Result().failure(info=Constants.PRECISELY_ALIGN_POSTPROCESS_VIEW_FAILURE +
Constants.FAILURE_REASON["PostProcess_Align_Exception"] + "\n" + format_exc()) Constants.FAILURE_REASON["PostProcess_Align_Exception"] + "\n" + format_exc())
info = f"{Constants.PRECISELY_ALIGN_POSTPROCESS_VIEW_FINISHED}BCG前后段被切割的坐标值为[{frontcut_index_BCG}, {backcut_index_BCG}]ECG前后段被切割的坐标值为[{frontcut_index_ECG}, {backcut_index_ECG}]" info = f"{Constants.PRECISELY_ALIGN_POSTPROCESS_VIEW_FINISHED}BCG前后段被切割的坐标值为[{Config['frontcut_index_BCG']}, {Config['backcut_index_BCG']}]ECG前后段被切割的坐标值为[{Config['frontcut_index_ECG']}, {Config['backcut_index_ECG']}]"
return Result().success(info=info) return Result().success(info=info)
def save_alignInfo(self): def save_alignInfo(self):
@ -2124,7 +2292,7 @@ class Data:
"back_ECG": Config["backcut_index_ECG"] "back_ECG": Config["backcut_index_ECG"]
} }
} }
save_data = [str(save_data)] save_data = [str(PublicFunc.sanitize_data(save_data))]
DataFrame(save_data).to_csv(Config["Path"]["Save_AlignInfo"], index=False, header=False) DataFrame(save_data).to_csv(Config["Path"]["Save_AlignInfo"], index=False, header=False)
except PermissionError as e: except PermissionError as e:
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"]) return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
@ -2139,10 +2307,10 @@ class Data:
not Path(Config["Path"]["Save_OrgBCG"]).parent.is_dir()): not Path(Config["Path"]["Save_OrgBCG"]).parent.is_dir()):
Path(Config["Path"]["Save_OrgBCG"]).parent.mkdir(parents=True, exist_ok=True) Path(Config["Path"]["Save_OrgBCG"]).parent.mkdir(parents=True, exist_ok=True)
if Config["InputConfig"]["orgBcgFreq"] != Config["InputConfig"]["UseFreq"]: # if Config["InputConfig"]["orgBcgFreq"] != Config["InputConfig"]["UseFreq"]:
self.res_orgBcg = resample(self.res_orgBcg, # self.res_orgBcg = ss_resample(self.res_orgBcg,
int(len(self.res_orgBcg) * # int(len(self.res_orgBcg) *
(Config["InputConfig"]["orgBcgFreq"] / Config["InputConfig"]["UseFreq"]))) # (Config["InputConfig"]["orgBcgFreq"] / Config["InputConfig"]["UseFreq"])))
if self.res_orgBcg is None: if self.res_orgBcg is None:
return Result().failure(info=Constants.PRECISELY_ALIGN_SAVING_RES_ORGBCG_FAILURE + return Result().failure(info=Constants.PRECISELY_ALIGN_SAVING_RES_ORGBCG_FAILURE +

View File

@ -12,6 +12,7 @@ from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg
from numpy import array, full, int64, append, zeros, where, arange, float64, nan, place, delete, setdiff1d from numpy import array, full, int64, append, zeros, where, arange, float64, nan, place, delete, setdiff1d
from overrides import overrides from overrides import overrides
from pandas import read_csv, DataFrame from pandas import read_csv, DataFrame
from pandas.errors import EmptyDataError
from scipy.signal import find_peaks, resample from scipy.signal import find_peaks, resample
from yaml import dump, load, FullLoader from yaml import dump, load, FullLoader
@ -329,6 +330,13 @@ class MainWindow_resp_quality_label(QMainWindow):
self.ui.doubleSpinBox_fillterMode_custom_low.valueChanged.connect(self.update_config) self.ui.doubleSpinBox_fillterMode_custom_low.valueChanged.connect(self.update_config)
self.ui.doubleSpinBox_fillterMode_custom_high.valueChanged.connect(self.update_config) self.ui.doubleSpinBox_fillterMode_custom_high.valueChanged.connect(self.update_config)
self.ui.pushButton_prev.setShortcut(QCoreApplication.translate("MainWindow", Params.RESP_QUALITY_LABEL_BTN_PREV_SHORTCUT_KEY))
self.ui.pushButton_next.setShortcut(QCoreApplication.translate("MainWindow", Params.RESP_QUALITY_LABEL_BTN_NEXT_SHORTCUT_KEY))
self.ui.pushButton_valid.setShortcut(QCoreApplication.translate("MainWindow", Params.RESP_QUALITY_LABEL_BTN_VALID_SHORTCUT_KEY))
self.ui.pushButton_invalid.setShortcut(QCoreApplication.translate("MainWindow", Params.RESP_QUALITY_LABEL_BTN_INVALID_SHORTCUT_KEY))
self.ui.pushButton_reset.setShortcut(QCoreApplication.translate("MainWindow", Params.RESP_QUALITY_LABEL_BTN_RESET_SHORTCUT_KEY))
@overrides @overrides
def closeEvent(self, event): def closeEvent(self, event):
reply = QMessageBox.question(self, '确认', '确认退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No) reply = QMessageBox.question(self, '确认', '确认退出吗?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
@ -885,7 +893,7 @@ class MainWindow_resp_quality_label(QMainWindow):
PublicFunc.text_output(self.ui, "(2/2)" + result.info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(2/2)" + result.info, Constants.TIPS_TYPE_INFO)
info = f"{Filename.RESP_QUALITY_LABEL}{Filename.THO_PEAK}保存成功" info = f"{Filename.RESP_QUALITY_LABEL}{Filename.THO_PEAK}保存成功"
PublicFunc.msgbox_output(self, info, Constants.TIPS_TYPE_INFO) # PublicFunc.msgbox_output(self, info, Constants.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
def __slot_btn_move__(self): def __slot_btn_move__(self):
@ -1016,6 +1024,7 @@ class MainWindow_resp_quality_label(QMainWindow):
Constants.TIPS_TYPE_INFO) Constants.TIPS_TYPE_INFO)
result = self.data.save_resp_quality_label() result = self.data.save_resp_quality_label()
self.update_tableWidget() self.update_tableWidget()
self.update_info()
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
@ -1023,6 +1032,10 @@ class MainWindow_resp_quality_label(QMainWindow):
return return
else: else:
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_INFO)
if self.sender() == self.ui.pushButton_valid or self.sender() == self.ui.pushButton_invalid:
if self.ui.checkBox_auto_next.isChecked():
self.ui.pushButton_next.click()
self.__slot_btn_save__()
def __slot_lineEdit_filter__(self, filter_text): def __slot_lineEdit_filter__(self, filter_text):
sender = self.sender() sender = self.sender()
@ -1559,16 +1572,21 @@ class Data():
return Result().success(info=Filename.RESP_QUALITY_LABEL + "" + Constants.ARCHIVE_EXIST) return Result().success(info=Filename.RESP_QUALITY_LABEL + "" + Constants.ARCHIVE_EXIST)
def get_archive_tho_peak(self): def get_archive_tho_peak(self):
if not Path(Config["Path"]["Save_Tho_peak"]).exists(): try:
if not Path(Config["Path"]["Save_Tho_peak"]).exists():
self.Tho_peak = array([]).astype(int)
self.Tho_peak_y = array([]).astype(int)
return Result().success(info=Filename.RESP_QUALITY_LABEL + "" + Constants.ARCHIVE_NOT_EXIST)
else:
self.Tho_peak = read_csv(Config["Path"]["Save_Tho_peak"],
encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
return Result().success(info=Filename.THO_PEAK + "" + Constants.ARCHIVE_EXIST)
except EmptyDataError as e:
self.Tho_peak = array([]).astype(int) self.Tho_peak = array([]).astype(int)
self.Tho_peak_y = array([]).astype(int) self.Tho_peak_y = array([]).astype(int)
return Result().success(info=Filename.RESP_QUALITY_LABEL + "" + Constants.ARCHIVE_NOT_EXIST) return Result().success(info=Filename.RESP_QUALITY_LABEL + "" + Constants.ARCHIVE_EMPTY)
else:
self.Tho_peak = read_csv(Config["Path"]["Save_Tho_peak"],
encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
return Result().success(info=Filename.THO_PEAK + "" + Constants.ARCHIVE_EXIST)
def resample_tho_and_OrgBCG(self): def resample_tho_and_OrgBCG(self):
if (self.OrgBCG is None) or (self.Tho is None): if (self.OrgBCG is None) or (self.Tho is None):

View File

@ -42,6 +42,7 @@ class Filename:
BCG_SYNC: str = "BCG_Sync_" BCG_SYNC: str = "BCG_Sync_"
# Folder: PSG_Aligned # Folder: PSG_Aligned
STAGE_SYNC: str = "5_class_Sync_"
ECG_SYNC: str = "ECG_Sync_" ECG_SYNC: str = "ECG_Sync_"
THO_SYNC: str = "Effort Tho_Sync_" THO_SYNC: str = "Effort Tho_Sync_"
ABD_SYNC: str = "Effort Abd_Sync_" ABD_SYNC: str = "Effort Abd_Sync_"
@ -139,6 +140,7 @@ class Params:
"Freq": 1000 "Freq": 1000
}, },
"Filter": { "Filter": {
"Mode": "skip",
"BandPassLow": 2, "BandPassLow": 2,
"BandPassHigh": 10 "BandPassHigh": 10
}, },
@ -159,6 +161,7 @@ class Params:
"Freq": 1000 "Freq": 1000
}, },
"Filter": { "Filter": {
"Mode": "skip",
"BandPassLow": 1, "BandPassLow": 1,
"BandPassHigh": 25 "BandPassHigh": 25
}, },
@ -174,6 +177,7 @@ class Params:
"Freq": 1000 "Freq": 1000
}, },
"Filter": { "Filter": {
"Mode": "skip",
"BCGBandPassOrder": 2, "BCGBandPassOrder": 2,
"BCGBandPassLow": 2, "BCGBandPassLow": 2,
"BCGBandPassHigh": 10, "BCGBandPassHigh": 10,
@ -195,6 +199,11 @@ class Params:
LABEL_CHECK_LABEL_TRANSPARENCY: float = 0.2 LABEL_CHECK_LABEL_TRANSPARENCY: float = 0.2
LABEL_CHECK_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY: str = "Z" LABEL_CHECK_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY: str = "Z"
LABEL_CHECK_BTN_PREV_MOVE_SHORTCUT_KEY = "A"
LABEL_CHECK_BTN_NEXT_MOVE_SHORTCUT_KEY = "D"
LABEL_CHECK_BTN_PAUSE_SHORTCUT_KEY = "S"
LABEL_CHECK_BTN_UPDATE_STATE_SHORTCUT_KEY = "Space"
# 数据精同步 # 数据精同步
PRECISELY_ALIGN_CONFIG_FILE_PATH: str = "./config/Config_precisely_align.yaml" PRECISELY_ALIGN_CONFIG_FILE_PATH: str = "./config/Config_precisely_align.yaml"
PRECISELY_ALIGN_CONFIG_NEW_CONTENT: dict = { PRECISELY_ALIGN_CONFIG_NEW_CONTENT: dict = {
@ -211,30 +220,39 @@ class Params:
PRECISELY_ALIGN_LABEL_TRANSPARENCY: float = 0.2 PRECISELY_ALIGN_LABEL_TRANSPARENCY: float = 0.2
# 冗余数据切割和标签映射 # 冗余数据切割和标签映射
CUT_PSG_CONFIG_FILE_PATH: str = "./config/Config_cut_PSG.yaml" CUT_PAIR_FILE_CONFIG_FILE_PATH: str = "./config/Config_cut_PAIR_FILE.yaml"
CUT_PSG_CONFIG_NEW_CONTENT: dict = { CUT_PAIR_FILE_CONFIG_NEW_CONTENT: dict = {
"ECGFreq": 1000, "ECGFreq": 1000,
"BCGFreq": 1000,
"ChannelInput": { "ChannelInput": {
"Effort Tho": Filename.THO_RAW, "Effort Tho": "PSG:" + Filename.THO_RAW,
"Effort Abd": Filename.ABD_RAW, "Effort Abd": "PSG:" + Filename.ABD_RAW,
"Flow T": Filename.FLOWT_RAW, "Flow T": "PSG:" + Filename.FLOWT_RAW,
"Flow P": Filename.FLOWP_RAW, "Flow P": "PSG:" + Filename.FLOWP_RAW,
"Snore": Filename.SNORE_RAW, "Snore": "PSG:" + Filename.SNORE_RAW,
"SpO2": Filename.SPO2_RAW, "SpO2": "PSG:" + Filename.SPO2_RAW,
"5_class": Filename.FIVE_CLASS_RAW "5_class": "PSG:" + Filename.FIVE_CLASS_RAW
},
"OrgBCGChannelInput":{
"OrgBCG": "OrgBCG:OrgBCG_Raw_"
},
"ECGChannelInput": {
"ECG": "PSG:" + Filename.ECG_RAW
}, },
"LabelInput": { "LabelInput": {
"SA Label": Filename.SA_LABEL_RAW "SA Label": Filename.SA_LABEL_RAW
}, },
"StartTime": Filename.STARTTIME_RAW, "StartTime": Filename.STARTTIME_RAW,
"ChannelSave": { "ChannelSave": {
"Effort Tho": Filename.THO_SYNC, "Effort Tho": "PSG:" + Filename.THO_SYNC,
"Effort Abd": Filename.ABD_SYNC, "Effort Abd": "PSG:" + Filename.ABD_SYNC,
"Flow T": Filename.FLOWT_SYNC, "Flow T": "PSG:" + Filename.FLOWT_SYNC,
"Flow P": Filename.FLOWP_SYNC, "Flow P": "PSG:" + Filename.FLOWP_SYNC,
"Snore": Filename.SNORE_SYNC, "Snore": "PSG:" + Filename.SNORE_SYNC,
"SpO2": Filename.SPO2_SYNC, "SpO2": "PSG:" + Filename.SPO2_SYNC,
"5_class": Filename.FIVE_CLASS_SYNC "5_class": "PSG:" + Filename.FIVE_CLASS_SYNC,
"OrgBCG": "OrgBCG:" + Filename.ORGBCG_SYNC,
"ECG": "PSG:" + Filename.ECG_SYNC
}, },
"LabelSave": { "LabelSave": {
"SA Label": Filename.SA_LABEL_SYNC "SA Label": Filename.SA_LABEL_SYNC
@ -249,10 +267,12 @@ class Params:
"SpO2": ENDSWITH_TXT, "SpO2": ENDSWITH_TXT,
"5_class": ENDSWITH_TXT, "5_class": ENDSWITH_TXT,
"SA Label": ENDSWITH_CSV, "SA Label": ENDSWITH_CSV,
"StartTime": ENDSWITH_TXT "StartTime": ENDSWITH_TXT,
"OrgBCG": ENDSWITH_TXT,
"ECG": ENDSWITH_TXT
}, },
} }
CUT_PSG_SALABEL_EVENT: list = ["Hypopnea", "Central apnea", "Obstructive apnea", "Mixed apnea"] CUT_PAIR_FILE_SALABEL_EVENT: list = ["Hypopnea", "Central apnea", "Obstructive apnea", "Mixed apnea"]
# 体动标注 # 体动标注
ARTIFACT_LABEL_CONFIG_FILE_PATH: str = "./config/Config_artifact_label.yaml" ARTIFACT_LABEL_CONFIG_FILE_PATH: str = "./config/Config_artifact_label.yaml"
@ -270,6 +290,10 @@ class Params:
} }
ARTIFACT_LABEL_LABEL_TRANSPARENCY: float = 0.3 ARTIFACT_LABEL_LABEL_TRANSPARENCY: float = 0.3
ARTIFACT_LABEL_ACTION_LABEL_ARTIFACT_SHORTCUT_KEY: str = "Z" ARTIFACT_LABEL_ACTION_LABEL_ARTIFACT_SHORTCUT_KEY: str = "Z"
ARTIFACT_LABEL_BTN_PREV_SHORTCUT_KEY: str = "A"
ARTIFACT_LABEL_BTN_NEXT_SHORTCUT_KEY: str = "D"
ARTIFACT_LABEL_BTN_PAUSE_SHORTCUT_KEY: str = "S"
# BCG的质量标注 # BCG的质量标注
BCG_QUALITY_LABEL_CONFIG_FILE_PATH: str = "./config/Config_bcg_quality_label.yaml" BCG_QUALITY_LABEL_CONFIG_FILE_PATH: str = "./config/Config_bcg_quality_label.yaml"
@ -281,6 +305,11 @@ class Params:
} }
BCG_QUALITY_LABEL_BTN_PREV_SHORTCUT_KEY: str = "A" BCG_QUALITY_LABEL_BTN_PREV_SHORTCUT_KEY: str = "A"
BCG_QUALITY_LABEL_BTN_NEXT_SHORTCUT_KEY: str = "D" BCG_QUALITY_LABEL_BTN_NEXT_SHORTCUT_KEY: str = "D"
BCG_QUALITY_LABEL_BTN_a1_SHORTCUT_KEY: str = "U"
BCG_QUALITY_LABEL_BTN_a2_SHORTCUT_KEY: str = "I"
BCG_QUALITY_LABEL_BTN_b1_SHORTCUT_KEY: str = "O"
BCG_QUALITY_LABEL_BTN_b2_SHORTCUT_KEY: str = "P"
BCG_QUALITY_LABEL_BTN_c_SHORTCUT_KEY: str = "J"
# 呼吸可用性及间期标注 # 呼吸可用性及间期标注
RESP_QUALITY_LABEL_CONFIG_FILE_PATH: str = "./config/Config_resp_quality_label.yaml" RESP_QUALITY_LABEL_CONFIG_FILE_PATH: str = "./config/Config_resp_quality_label.yaml"
@ -308,6 +337,11 @@ class Params:
RESP_QUALITY_LABEL_PARTS_TIME_SEC: int = 30 RESP_QUALITY_LABEL_PARTS_TIME_SEC: int = 30
RESP_QUALITY_LABEL_LABEL_TRANSPARENCY: float = 0.2 RESP_QUALITY_LABEL_LABEL_TRANSPARENCY: float = 0.2
RESP_QUALITY_LABEL_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY: str = "Z" RESP_QUALITY_LABEL_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY: str = "Z"
RESP_QUALITY_LABEL_BTN_PREV_SHORTCUT_KEY: str = "A"
RESP_QUALITY_LABEL_BTN_NEXT_SHORTCUT_KEY: str = "D"
RESP_QUALITY_LABEL_BTN_VALID_SHORTCUT_KEY: str = "F"
RESP_QUALITY_LABEL_BTN_INVALID_SHORTCUT_KEY: str = "G"
RESP_QUALITY_LABEL_BTN_RESET_SHORTCUT_KEY: str = "H"
# 睡眠呼吸暂停事件标注 # 睡眠呼吸暂停事件标注
SA_LABEL_CONFIG_FILE_PATH: str = "./config/Config_SA_label.yaml" SA_LABEL_CONFIG_FILE_PATH: str = "./config/Config_SA_label.yaml"
@ -326,18 +360,57 @@ class Params:
"Back": 60 "Back": 60
} }
} }
SA_LABEL_NEW_EVENT_FORMAT: dict = {
"Index": "", # 假设Epoch从1开始
"Event type": "", # 原始事件类型为空
"Stage": "",
"Time": "",
"Epoch": "",
"Date": "",
"Duration": "", # 计算持续时间
"HR bef.": "",
"HR extr.": "",
"HR delta": "",
"O2 bef.": "",
"O2 min.": "",
"O2 delta": "",
"Body Position": "",
"Validation": "",
"Start": "",
"End": "",
"correct_Start": "",
"correct_End":"",
"correct_EventsType": "", # 修正事件类型为空
"score": -1, # 默认分数为-1
"isLabeled": -1, # 默认未标记状态
"remark": "" # 默认备注为空
}
SA_LABEL_TRANSPARENCY: float = 0.05 SA_LABEL_TRANSPARENCY: float = 0.05
SA_LABEL_BTN_PREV_SHORTCUT_KEY: str = "A" SA_LABEL_BTN_PREV_10s_SHORTCUT_KEY: str = "Q"
SA_LABEL_BTN_NEXT_SHORTCUT_KEY: str = "D" SA_LABEL_BTN_NEXT_10s_SHORTCUT_KEY: str = "E"
SA_LABEL_BTN_PREV_30s_SHORTCUT_KEY: str = "A"
SA_LABEL_BTN_NEXT_30s_SHORTCUT_KEY: str = "D"
SA_LABEL_BTN_PREV_HALF_SHORTCUT_KEY: str = "F"
SA_LABEL_BTN_NEXT_HALF_SHORTCUT_KEY: str = "G"
SA_LABEL_BTN_BEST_FIT_SHORTCUT_KEY: str = "B"
SA_LABEL_BTN_EDIT_MODE_SHORTCUT_KEY: str = "Z"
SA_LABEL_BTN_PAN_MODE_SHORTCUT_KEY: str = "X"
SA_LABEL_BTN_CONFIRMLABEL_SHORTCUT_KEY: str = "S" SA_LABEL_BTN_CONFIRMLABEL_SHORTCUT_KEY: str = "S"
SA_LABEL_BTN_QUICK_REMARK_WAITINGFORTALK_SHORTCUT_KEY: str = "J" SA_LABEL_BTN_QUICK_REMARK_WAITINGFORTALK_SHORTCUT_KEY: str = "J"
SA_LABEL_RADIOBUTTON_OSA_SHORTCUT_KEY: str = "1" SA_LABEL_RADIOBUTTON_OSA_SHORTCUT_KEY: str = "7"
SA_LABEL_RADIOBUTTON_CSA_SHORTCUT_KEY: str = "2" SA_LABEL_RADIOBUTTON_CSA_SHORTCUT_KEY: str = "8"
SA_LABEL_RADIOBUTTON_MSA_SHORTCUT_KEY: str = "3" SA_LABEL_RADIOBUTTON_MSA_SHORTCUT_KEY: str = "9"
SA_LABEL_RADIOBUTTON_HPY_SHORTCUT_KEY: str = "4" SA_LABEL_RADIOBUTTON_HPY_SHORTCUT_KEY: str = "0"
SA_LABEL_RADIOBUTTON_1_CLASS_SHORTCUT_KEY: str = "U" SA_LABEL_RADIOBUTTON_1_CLASS_SHORTCUT_KEY: str = "1"
SA_LABEL_RADIOBUTTON_2_CLASS_SHORTCUT_KEY: str = "I" SA_LABEL_RADIOBUTTON_2_CLASS_SHORTCUT_KEY: str = "2"
SA_LABEL_RADIOBUTTON_3_CLASS_SHORTCUT_KEY: str = "O" SA_LABEL_RADIOBUTTON_3_CLASS_SHORTCUT_KEY: str = "3"
SA_LABEL_BTN_LITTLE_CHANGED_SHORTCUT_KEY: str = "U"
SA_LABEL_BTN_CHANGED_ON_MIDDLE_SHORTCUT_KEY: str = "I"
SA_LABEL_BTN_BETWEEN_ARTIFACT_SHORTCUT_KEY: str = "O"
SA_LABEL_BTN_LOW_SNR_SHORTCUT_KEY: str = "P"
# 禁止实例化 # 禁止实例化
def __new__(cls): def __new__(cls):

View File

@ -5,6 +5,7 @@ class Constants:
# 公共 # 公共
TIPS_TYPE_INFO: str = "Info" TIPS_TYPE_INFO: str = "Info"
TIPS_TYPE_WARNING: str = "Warning"
TIPS_TYPE_ERROR: str = "Error" TIPS_TYPE_ERROR: str = "Error"
MSGBOX_TYPE_INFO: str = "Info" MSGBOX_TYPE_INFO: str = "Info"
MSGBOX_TYPE_WARNING: str = "Warning" MSGBOX_TYPE_WARNING: str = "Warning"
@ -24,6 +25,7 @@ class Constants:
PREPROCESSING_DATA: str = "正在预处理数据" PREPROCESSING_DATA: str = "正在预处理数据"
PREPROCESS_FINISHED: str = "预处理完成" PREPROCESS_FINISHED: str = "预处理完成"
PREPROCESS_FAILURE: str = "预处理失败" PREPROCESS_FAILURE: str = "预处理失败"
PREPROCESS_NO_NEED: str = "不需要预处理"
RESAMPLING_DATA: str = "正在数据重采样" RESAMPLING_DATA: str = "正在数据重采样"
RESAMPLE_FINISHED: str = "重采样完成" RESAMPLE_FINISHED: str = "重采样完成"
@ -33,6 +35,7 @@ class Constants:
LOADING_ARCHIVE: str = "正在获取历史存档" LOADING_ARCHIVE: str = "正在获取历史存档"
ARCHIVE_EXIST: str = "找到历史存档,成功读取" ARCHIVE_EXIST: str = "找到历史存档,成功读取"
ARCHIVE_NOT_EXIST: str = "未找到历史存档,创建新存档" ARCHIVE_NOT_EXIST: str = "未找到历史存档,创建新存档"
ARCHIVE_EMPTY: str = "历史存档为空,创建新存档"
DRAWING_DATA: str = "正在绘制图形" DRAWING_DATA: str = "正在绘制图形"
DRAW_FINISHED: str = "绘制完成" DRAW_FINISHED: str = "绘制完成"
@ -141,6 +144,7 @@ class Constants:
"OrgBCG_Cut_Length_Not_Correct": "OrgBCG的切割长度不正确Pre+Post长度大于信号长度", "OrgBCG_Cut_Length_Not_Correct": "OrgBCG的切割长度不正确Pre+Post长度大于信号长度",
"PSG_Cut_Length_Not_Correct": "PSG的切割长度不正确Pre+Post长度大于信号长度", "PSG_Cut_Length_Not_Correct": "PSG的切割长度不正确Pre+Post长度大于信号长度",
"Get_Freq_Not_Correct": "(无法获取数据采样率,将填入配置文件中的采样率。可能是因为文件不存在或文件命名格式不正确导致,请检查数据)", "Get_Freq_Not_Correct": "(无法获取数据采样率,将填入配置文件中的采样率。可能是因为文件不存在或文件命名格式不正确导致,请检查数据)",
"orgBcg_Machine_Start_Time_Not_Exist": "OrgBCG的设备启动时间不存在",
"Open_Data_Exception": "(打开数据异常)", "Open_Data_Exception": "(打开数据异常)",
"Process_Exception": "(处理异常)", "Process_Exception": "(处理异常)",
@ -158,7 +162,7 @@ class Constants:
"Invalid_Side_Parameter": "(无效的方向参数)", "Invalid_Side_Parameter": "(无效的方向参数)",
"Get_Epoch_Exception": "获取epoch异常", "Get_Epoch_Exception": "获取epoch异常",
"Get_Corr_By_Epoch_Exception": "通过epoch获取相关性异常", "Get_Corr_By_Epoch_Exception": "通过epoch获取相关性异常",
"Predict_Exception": "(预测异常,请检查模型文件存放是否正确或检测方法是否正确)", "Predict_Exception": "(预测异常,请检查模型文件存放是否正确或检测方法是否正确或是尝试勾选上“强制使用CPU”运行",
"Read_Model_Exception": "(读取模型异常)", "Read_Model_Exception": "(读取模型异常)",
"Calculate_Correlation_Value_Equal": "(计算相关性参数相同)", "Calculate_Correlation_Value_Equal": "(计算相关性参数相同)",
"Get_Corresponding_Interval_Exception": "(获取对应区间异常)", "Get_Corresponding_Interval_Exception": "(获取对应区间异常)",
@ -179,7 +183,11 @@ class Constants:
"res_BCG_Not_Exist": "切割后BCG不存在", "res_BCG_Not_Exist": "切割后BCG不存在",
"cut_ECG_Not_Exist": "切割后ECG不存在", "cut_ECG_Not_Exist": "切割后ECG不存在",
"cut_Jpeak_Not_Exist": "切割后J峰不存在", "cut_Jpeak_Not_Exist": "切割后J峰不存在",
"cut_Rpeak_Not_Exist": "切割后R峰不存在" "cut_Rpeak_Not_Exist": "切割后R峰不存在",
"Get_Approximately_Align_Info_Exception": "(获取粗对齐信息异常)",
"Calculate_Approximately_Align_Info_Exception": "(计算粗对齐信息异常)",
"Delete_Rough_Cut_File_Exception": "(删除历史粗对齐文件异常)",
"Resample_BCG_Exception": "粗对齐重采样BCG异常",
} }
# 数据粗同步 # 数据粗同步
@ -349,17 +357,31 @@ class Constants:
PRECISELY_ALIGN_ACTION_GET_RANGE_NAME: str = f"设置范围({Params.PRECISELY_ALIGN_ACTION_GET_RANGE_SHORTCUT_KEY})" PRECISELY_ALIGN_ACTION_GET_RANGE_NAME: str = f"设置范围({Params.PRECISELY_ALIGN_ACTION_GET_RANGE_SHORTCUT_KEY})"
# 冗余数据切割和标签映射 # 冗余数据切割和标签映射
CUT_PSG_GETTING_FILE_AND_FREQ: str = "正在获取文件及其采样率" CUT_PAIR_FILE_GETTING_FILE_AND_FREQ: str = "正在获取文件及其采样率"
CUT_PSG_GET_FILE_AND_FREQ_FINISHED: str = "获取文件及其采样率完成" CUT_PAIR_FILE_GET_FILE_AND_FREQ_FINISHED: str = "获取文件及其采样率完成"
CUT_PSG_GET_FILE_AND_FREQ_FAILURE: str = "获取文件及其采样率失败" CUT_PAIR_FILE_GET_FILE_AND_FREQ_FAILURE: str = "获取文件及其采样率失败"
CUT_PSG_CUTTING_DATA: str = "正在切割数据" CUT_PAIR_FILE_CUTTING_DATA: str = "正在切割数据"
CUT_PSG_CUT_DATA_FINISHED: str = "切割数据完成" CUT_PAIR_FILE_CUT_DATA_FINISHED: str = "切割数据完成"
CUT_PSG_CUT_DATA_FAILURE: str = "切割数据失败" CUT_PAIR_FILE_CUT_DATA_FAILURE: str = "切割数据失败"
CUT_PAIR_FILE_ALIGNING_LABEL: str = "正在映射标签"
CUT_PAIR_FILE_ALIGN_LABEL_FINISHED: str = "映射标签完成"
CUT_PAIR_FILE_ALIGN_LABEL_FAILURE: str = "映射标签失败"
CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO: str = "正在获取粗对齐信息"
CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO_FAILURE: str = "获取粗对齐信息失败"
CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO_FINISHED: str = "获取粗对齐信息完成"
CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO_CALC_FINISHED: str = "计算粗对齐信息完成"
CUT_PAIR_FILE_DELETING_ROUGH_CUT_FILE: str = "正在删除历史粗对齐文件"
CUT_PAIR_FILE_DELETE_ROUGH_CUT_FILE_FINISHED: str = "删除历史粗对齐文件完成"
CUT_PAIR_FILE_DELETE_ROUGH_CUT_FILE_FAILURE: str = "删除历史粗对齐文件失败"
CUT_PAIR_FILE_ROUGH_RESAMPLE_BCG: str = "正在粗对齐重采样BCG"
CUT_PAIR_FILE_ROUGH_RESAMPLE_BCG_FINISHED: str = "粗对齐重采样BCG完成"
CUT_PAIR_FILE_ROUGH_RESAMPLE_BCG_FAILURE: str = "粗对齐重采样BCG失败"
CUT_PSG_ALIGNING_LABEL: str = "正在映射标签"
CUT_PSG_ALIGN_LABEL_FINISHED: str = "映射标签完成"
CUT_PSG_ALIGN_LABEL_FAILURE: str = "映射标签失败"
# 体动标注 # 体动标注
ARTIFACT_LABEL_PLOT_LABEL_ORGBCG_SYNC: str = "OrgBCG_Sync" ARTIFACT_LABEL_PLOT_LABEL_ORGBCG_SYNC: str = "OrgBCG_Sync"
@ -536,10 +558,10 @@ class Constants:
SA_LABEL_ALL_LABELED: str = "该份数据打标已全部完成" SA_LABEL_ALL_LABELED: str = "该份数据打标已全部完成"
SA_LABEL_MOVE_PREV10S: str = "向前10秒" SA_LABEL_MOVE_PREV10S: str = "向前10秒"
SA_LABEL_MOVE_PREV30S: str = "向前30秒" SA_LABEL_MOVE_PREV30S: str = "向前30秒"
SA_LABEL_MOVE_PREV60S: str = "向前60秒" SA_LABEL_MOVE_PREV_HALF: str = "向前半窗口"
SA_LABEL_MOVE_NEXT10S: str = "向后10秒" SA_LABEL_MOVE_NEXT10S: str = "向后10秒"
SA_LABEL_MOVE_NEXT30S: str = "向后30秒" SA_LABEL_MOVE_NEXT30S: str = "向后30秒"
SA_LABEL_MOVE_NEXT60S: str = "向后60秒" SA_LABEL_MOVE_NEXT_HALF: str = "向后半窗口"
SA_LABEL_LENGTH_TOO_LONG: str = "起始时间或终止时间超出信号长度范围,请输入正确的参数" SA_LABEL_LENGTH_TOO_LONG: str = "起始时间或终止时间超出信号长度范围,请输入正确的参数"
SA_LABEL_LENGTH_LESS_THEN_10S: str = "当前标注的事件的持续时间小于10秒" SA_LABEL_LENGTH_LESS_THEN_10S: str = "当前标注的事件的持续时间小于10秒"
SA_LABEL_WRONG_ARGS: str = "起始时间和终止时间输入错误" SA_LABEL_WRONG_ARGS: str = "起始时间和终止时间输入错误"

View File

@ -1,13 +1,14 @@
import traceback
from datetime import datetime from datetime import datetime
from logging import error, info from logging import error, info
from pathlib import Path from pathlib import Path
import json
from PySide6.QtWidgets import QMessageBox, QWidget, QPushButton, QProgressBar, QApplication, QRadioButton, QCheckBox from PySide6.QtWidgets import QMessageBox, QWidget, QPushButton, QProgressBar, QApplication, QRadioButton, QCheckBox
from func.utils.Constants import Constants from func.utils.Constants import Constants
from func.utils.CustomException import TipsTypeValueNotExistError, MsgBoxTypeValueNotExistError from func.utils.CustomException import TipsTypeValueNotExistError, MsgBoxTypeValueNotExistError
from func.utils.Result import Result from func.utils.Result import Result
import numpy as np
class PublicFunc: class PublicFunc:
@ -112,6 +113,10 @@ class PublicFunc:
if widget.objectName() in buttonState["Current"].keys(): if widget.objectName() in buttonState["Current"].keys():
widget.setEnabled(False) widget.setEnabled(False)
if isinstance(widget, QCheckBox):
if widget.objectName() in buttonState["Current"].keys():
widget.setEnabled(False)
@staticmethod @staticmethod
def __enableAllButton__(mainWindow, buttonState): def __enableAllButton__(mainWindow, buttonState):
# 启用按钮 # 启用按钮
@ -127,6 +132,10 @@ class PublicFunc:
if widget.objectName() in buttonState["Current"].keys(): if widget.objectName() in buttonState["Current"].keys():
widget.setEnabled(buttonState["Current"][widget.objectName()]) widget.setEnabled(buttonState["Current"][widget.objectName()])
if isinstance(widget, QCheckBox):
if widget.objectName() in buttonState["Current"].keys():
widget.setEnabled(buttonState["Current"][widget.objectName()])
@staticmethod @staticmethod
def __resetAllButton__(mainWindow, buttonState): def __resetAllButton__(mainWindow, buttonState):
# 启用按钮 # 启用按钮
@ -142,6 +151,10 @@ class PublicFunc:
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()])
if isinstance(widget, QCheckBox):
if widget.objectName() in buttonState["Default"].keys():
widget.setEnabled(buttonState["Default"][widget.objectName()])
@staticmethod @staticmethod
def __styleAllButton__(mainWindow, buttonState): def __styleAllButton__(mainWindow, buttonState):
# 启用按钮 # 启用按钮
@ -191,6 +204,8 @@ class PublicFunc:
@staticmethod @staticmethod
def examine_file(path_str, filename, suffix): def examine_file(path_str, filename, suffix):
if not isinstance(path_str, str):
path_str = str(path_str)
temp_path = [p for p in Path(path_str).glob(f"{filename}*") if p.stem.startswith(filename) and p.suffix == suffix] temp_path = [p for p in Path(path_str).glob(f"{filename}*") if p.stem.startswith(filename) and p.suffix == suffix]
if len(temp_path) == 0: if len(temp_path) == 0:
@ -214,17 +229,87 @@ class PublicFunc:
info=Constants.INPUT_FAILURE + "\n" + info=Constants.INPUT_FAILURE + "\n" +
filename + "" + filename + "" +
Constants.FAILURE_REASON["Data_Frequency_Not_In_Filename"]) Constants.FAILURE_REASON["Data_Frequency_Not_In_Filename"])
if Path(path).suffix != suffix: if path.suffix != suffix:
return Result().failure( return Result().failure(
info=Constants.INPUT_FAILURE + "\n" + info=Constants.INPUT_FAILURE + "\n" +
filename + "" + filename + "" +
Constants.FAILURE_REASON["Suffix_Not_Correct"]) Constants.FAILURE_REASON["Suffix_Not_Correct"])
data = { data = {
"path": str(path), "path": path,
"freq": int(freq) "freq": int(freq)
} }
return Result().success(data=data) return Result().success(data=data)
@staticmethod
def get_machine_start_time_bias(psg_dir_path, orgBcg_dir_path):
# 查看orgBcg文件夹下是否有zd5y2_jf_info.json文件
orgBcg_info_path = [p for p in Path(orgBcg_dir_path).glob("*info*") if
p.suffix == ".json"]
if len(orgBcg_info_path) == 0:
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
"*info.json" +
str(orgBcg_dir_path) +
Constants.FAILURE_REASON["File_Not_Exist"])
elif len(orgBcg_info_path) > 1:
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
"*info.json" +
str(orgBcg_dir_path) +
Constants.FAILURE_REASON["File_More_Than_One"])
else:
orgBcg_info_path = orgBcg_info_path[0]
with open(orgBcg_info_path, 'r', encoding='utf-8') as f:
orgBcg_info = json.load(f)
machine_start_time_str = orgBcg_info.get("StartDate", None)
if machine_start_time_str is None:
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
"*info.json" +
str(orgBcg_dir_path) +
Constants.FAILURE_REASON["orgBcg_Machine_Start_Time_Not_Exist"])
# 查看psg文件夹下是否有StartTime_Raw.txt文件
psg_start_time_path = [p for p in Path(psg_dir_path).glob("StartTime_Raw*") if
p.suffix == ".txt"]
if len(psg_start_time_path) == 0:
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
"StartTime_Raw.txt" +
str(psg_dir_path) +
Constants.FAILURE_REASON["File_Not_Exist"])
elif len(psg_start_time_path) > 1:
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
"StartTime_Raw.txt" +
str(psg_dir_path) +
Constants.FAILURE_REASON["File_More_Than_One"])
else:
psg_start_time_path = psg_start_time_path[0]
with open(psg_start_time_path, 'r', encoding='utf-8') as f:
# 读取第一行
psg_start_time_str = f.readline().strip()
print(psg_start_time_str)
try:
# 计算时间差,单位为秒
fmt = "%Y-%m-%d %H:%M:%S"
machine_start_time = datetime.strptime(machine_start_time_str, fmt)
psg_start_time = datetime.strptime(psg_start_time_str, fmt)
time_bias = (psg_start_time - machine_start_time).total_seconds()
except Exception as e:
traceback.print_exc()
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
"时间格式错误,无法计算时间差:" +
str(e))
return Result().success(data={"time_bias":time_bias})
@staticmethod @staticmethod
def examine_artifact(artifact): def examine_artifact(artifact):
# 检查体动标签正确性,长度 # 检查体动标签正确性,长度
@ -234,4 +319,22 @@ class PublicFunc:
for i in range(0, len(artifact), 4): for i in range(0, len(artifact), 4):
unit_data = artifact[i:i + 4] unit_data = artifact[i:i + 4]
if len(unit_data) < 4: if len(unit_data) < 4:
break break
@staticmethod
def sanitize_data(obj):
"""
递归将对象中的 NumPy 类型转换为 Python 原生类型
"""
if isinstance(obj, dict):
return {k: PublicFunc._sanitize_data(v) for k, v in obj.items()}
elif isinstance(obj, (list, tuple)):
return [PublicFunc._sanitize_data(i) for i in obj]
elif isinstance(obj, (np.integer, np.int64)):
return int(obj)
elif isinstance(obj, (np.floating, np.float64)):
return float(obj)
elif isinstance(obj, np.ndarray):
return obj.tolist()
else:
return obj

View File

@ -1,3 +1,4 @@
import torch
from numpy import diff, argwhere, argmax, where, delete, insert, mean, array, full, nan from numpy import diff, argwhere, argmax, where, delete, insert, mean, array, full, nan
from numpy import min as np_min from numpy import min as np_min
from numpy import max as np_max from numpy import max as np_max
@ -5,11 +6,12 @@ from torch import FloatTensor, no_grad, load
from torch import device as torch_device from torch import device as torch_device
from torch.cuda import is_available, empty_cache from torch.cuda import is_available, empty_cache
from torch.nn.functional import sigmoid from torch.nn.functional import sigmoid
from torch.utils.data import TensorDataset, DataLoader
from func.BCGDataset import BCG_Operation from func.BCGDataset import BCG_Operation
from func.Deep_Model import Unet,Fivelayer_Lstm_Unet,Fivelayer_Unet,Sixlayer_Unet from func.Deep_Model import Unet,Fivelayer_Lstm_Unet,Fivelayer_Unet,Sixlayer_Unet
def evaluate(test_data, model,fs,useCPU): def evaluate(test_data, model,fs,useCPU, batch_size=0, scale=0):
orgBCG = test_data orgBCG = test_data
operation = BCG_Operation() operation = BCG_Operation()
# 降采样 # 降采样
@ -17,7 +19,12 @@ def evaluate(test_data, model,fs,useCPU):
# plt.figure() # plt.figure()
# plt.plot(orgBCG) # plt.plot(orgBCG)
# plt.show() # plt.show()
if scale != 0:
orgBCG_std = orgBCG.std()
orgBCG = orgBCG * scale / orgBCG_std
orgBCG = orgBCG.reshape(-1, 1000) orgBCG = orgBCG.reshape(-1, 1000)
# test dataset # test dataset
orgData = FloatTensor(orgBCG).unsqueeze(1) orgData = FloatTensor(orgBCG).unsqueeze(1)
# predict # predict
@ -30,12 +37,32 @@ def evaluate(test_data, model,fs,useCPU):
# if gpu: # if gpu:
# orgData = orgData.cuda() # orgData = orgData.cuda()
# model.cuda() # model.cuda()
orgData = orgData.to(device)
model = model.to(device)
model.to(device)
orgData_tensor = FloatTensor(orgBCG).unsqueeze(1)
test_dataset = TensorDataset(orgData_tensor)
batch_size = len(test_dataset) if batch_size == 0 else batch_size
#全部数据放在一个batch里评估
test_loader = DataLoader(
dataset=test_dataset,
batch_size=batch_size,
shuffle=False,
num_workers=0 # 简单评估时设为 0
)
all_y_prob = []
with no_grad(): with no_grad():
y_hat = model(orgData) for i, data_batch in enumerate(test_loader):
y_prob = sigmoid(y_hat) # data_batch 是一个包含 (batch_size, 1, 1000) 数据的列表
inputs = data_batch[0].to(device)
# 预测
y_hat_batch = model(inputs)
y_prob_batch = sigmoid(y_hat_batch)
# 收集结果,移回 CPU
all_y_prob.append(y_prob_batch.cpu())
y_prob = torch.cat(all_y_prob, dim=0).view(-1)
beat = (y_prob>0.5).float().view(-1).cpu().data.numpy() beat = (y_prob>0.5).float().view(-1).cpu().data.numpy()
beat_diff = diff(beat) beat_diff = diff(beat)
up_index = argwhere(beat_diff==1) up_index = argwhere(beat_diff==1)
@ -250,7 +277,7 @@ def preprocess(raw_bcg, fs, low_cut, high_cut, amp_value):
bcg = preprocessing.Butterworth(bcg_data, "bandpass", low_cut=low_cut, high_cut=high_cut, order=3) * amp_value bcg = preprocessing.Butterworth(bcg_data, "bandpass", low_cut=low_cut, high_cut=high_cut, order=3) * amp_value
return bcg return bcg
def Jpeak_Detection(model_name, model_path, bcg_data, fs, interval_high, interval_low, peaks_value, useCPU): def Jpeak_Detection(model_name, model_path, bcg_data, fs, interval_high, interval_low, peaks_value, useCPU, batch_size=0, scale=0):
model_name = get_model_name(str(model_name)) model_name = get_model_name(str(model_name))
if model_name == "Fivelayer_Unet": if model_name == "Fivelayer_Unet":
@ -267,7 +294,7 @@ def Jpeak_Detection(model_name, model_path, bcg_data, fs, interval_high, interva
model.eval() model.eval()
# J峰预测 # J峰预测
beat, up_index, down_index, y_prob = evaluate(bcg_data, model=model, fs=fs, useCPU=useCPU) beat, up_index, down_index, y_prob = evaluate(bcg_data, model=model, fs=fs, useCPU=useCPU, batch_size=batch_size, scale=scale)
y_prob = y_prob.cpu().reshape(-1).data.numpy() y_prob = y_prob.cpu().reshape(-1).data.numpy()
predict_J = new_calculate_beat(y_prob, 1, th=0.6, up=fs // 100, th1=interval_high, th2=interval_low) predict_J = new_calculate_beat(y_prob, 1, th=0.6, up=fs // 100, th1=interval_high, th2=interval_low)

View File

@ -0,0 +1,771 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'MainWindow_SA_label_v2.ui'
##
## Created by: Qt User Interface Compiler version 6.7.0
##
## 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 (QAbstractItemView, QAbstractSpinBox, QApplication, QCheckBox,
QComboBox, QFrame, QGridLayout, QGroupBox,
QHBoxLayout, QHeaderView, QLabel, QLineEdit,
QMainWindow, QPushButton, QRadioButton, QSizePolicy,
QSpacerItem, QSpinBox, QStatusBar, QTableView,
QTextBrowser, QVBoxLayout, QWidget)
class Ui_MainWindow_SA_label(object):
def setupUi(self, MainWindow_SA_label):
if not MainWindow_SA_label.objectName():
MainWindow_SA_label.setObjectName(u"MainWindow_SA_label")
MainWindow_SA_label.resize(1921, 1080)
self.centralwidget = QWidget(MainWindow_SA_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.label_sampno = QLabel(self.groupBox_left)
self.label_sampno.setObjectName(u"label_sampno")
font1 = QFont()
font1.setPointSize(16)
self.label_sampno.setFont(font1)
self.verticalLayout_2.addWidget(self.label_sampno)
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)
font2 = QFont()
font2.setPointSize(12)
self.pushButton_input_setting.setFont(font2)
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(font2)
self.horizontalLayout.addWidget(self.pushButton_input)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.groupBox = QGroupBox(self.groupBox_left)
self.groupBox.setObjectName(u"groupBox")
self.verticalLayout_5 = QVBoxLayout(self.groupBox)
self.verticalLayout_5.setObjectName(u"verticalLayout_5")
self.horizontalLayout_8 = QHBoxLayout()
self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
self.checkBox_best_flow = QCheckBox(self.groupBox)
self.checkBox_best_flow.setObjectName(u"checkBox_best_flow")
self.checkBox_best_flow.setChecked(True)
self.horizontalLayout_8.addWidget(self.checkBox_best_flow)
self.checkBox_best_effort = QCheckBox(self.groupBox)
self.checkBox_best_effort.setObjectName(u"checkBox_best_effort")
self.checkBox_best_effort.setChecked(True)
self.horizontalLayout_8.addWidget(self.checkBox_best_effort)
self.checkBox_best_resp = QCheckBox(self.groupBox)
self.checkBox_best_resp.setObjectName(u"checkBox_best_resp")
self.checkBox_best_resp.setChecked(True)
self.horizontalLayout_8.addWidget(self.checkBox_best_resp)
self.checkBox_best_raw = QCheckBox(self.groupBox)
self.checkBox_best_raw.setObjectName(u"checkBox_best_raw")
self.checkBox_best_raw.setChecked(True)
self.horizontalLayout_8.addWidget(self.checkBox_best_raw)
self.pushButton_best_fit = QPushButton(self.groupBox)
self.pushButton_best_fit.setObjectName(u"pushButton_best_fit")
self.pushButton_best_fit.setFont(font2)
self.pushButton_best_fit.setChecked(False)
self.horizontalLayout_8.addWidget(self.pushButton_best_fit)
self.verticalLayout_5.addLayout(self.horizontalLayout_8)
self.line = QFrame(self.groupBox)
self.line.setObjectName(u"line")
self.line.setFrameShape(QFrame.Shape.HLine)
self.line.setFrameShadow(QFrame.Shadow.Sunken)
self.verticalLayout_5.addWidget(self.line)
self.horizontalLayout_6 = QHBoxLayout()
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
self.label_4 = QLabel(self.groupBox)
self.label_4.setObjectName(u"label_4")
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
self.label_4.setSizePolicy(sizePolicy1)
self.label_4.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignVCenter)
self.horizontalLayout_6.addWidget(self.label_4)
self.comboBox_window_signal_length = QComboBox(self.groupBox)
self.comboBox_window_signal_length.addItem("")
self.comboBox_window_signal_length.addItem("")
self.comboBox_window_signal_length.addItem("")
self.comboBox_window_signal_length.addItem("")
self.comboBox_window_signal_length.addItem("")
self.comboBox_window_signal_length.addItem("")
self.comboBox_window_signal_length.setObjectName(u"comboBox_window_signal_length")
sizePolicy1.setHeightForWidth(self.comboBox_window_signal_length.sizePolicy().hasHeightForWidth())
self.comboBox_window_signal_length.setSizePolicy(sizePolicy1)
self.comboBox_window_signal_length.setEditable(True)
self.comboBox_window_signal_length.setInsertPolicy(QComboBox.NoInsert)
self.horizontalLayout_6.addWidget(self.comboBox_window_signal_length)
self.horizontalSpacer_5 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout_6.addItem(self.horizontalSpacer_5)
self.verticalLayout_5.addLayout(self.horizontalLayout_6)
self.line_2 = QFrame(self.groupBox)
self.line_2.setObjectName(u"line_2")
self.line_2.setFrameShape(QFrame.Shape.HLine)
self.line_2.setFrameShadow(QFrame.Shadow.Sunken)
self.verticalLayout_5.addWidget(self.line_2)
self.horizontalLayout_9 = QHBoxLayout()
self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
self.checkBox_auto_save = QCheckBox(self.groupBox)
self.checkBox_auto_save.setObjectName(u"checkBox_auto_save")
self.checkBox_auto_save.setFont(font)
self.checkBox_auto_save.setChecked(True)
self.horizontalLayout_9.addWidget(self.checkBox_auto_save)
self.horizontalSpacer_6 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout_9.addItem(self.horizontalSpacer_6)
self.verticalLayout_5.addLayout(self.horizontalLayout_9)
self.verticalLayout_2.addWidget(self.groupBox)
self.groupBox_label = QGroupBox(self.groupBox_left)
self.groupBox_label.setObjectName(u"groupBox_label")
self.gridLayout_3 = QGridLayout(self.groupBox_label)
self.gridLayout_3.setObjectName(u"gridLayout_3")
self.label_2 = QLabel(self.groupBox_label)
self.label_2.setObjectName(u"label_2")
self.label_2.setFont(font2)
self.gridLayout_3.addWidget(self.label_2, 4, 0, 1, 1)
self.verticalSpacer_4 = QSpacerItem(20, 20, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_3.addItem(self.verticalSpacer_4, 2, 0, 1, 2)
self.lineEdit_filter_label_origin = QLineEdit(self.groupBox_label)
self.lineEdit_filter_label_origin.setObjectName(u"lineEdit_filter_label_origin")
self.lineEdit_filter_label_origin.setFont(font2)
self.gridLayout_3.addWidget(self.lineEdit_filter_label_origin, 0, 1, 1, 1)
self.lineEdit_filter_label_revised = QLineEdit(self.groupBox_label)
self.lineEdit_filter_label_revised.setObjectName(u"lineEdit_filter_label_revised")
self.lineEdit_filter_label_revised.setFont(font2)
self.gridLayout_3.addWidget(self.lineEdit_filter_label_revised, 4, 1, 1, 1)
self.label = QLabel(self.groupBox_label)
self.label.setObjectName(u"label")
self.label.setFont(font2)
self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1)
self.tableView_label = QTableView(self.groupBox_label)
self.tableView_label.setObjectName(u"tableView_label")
self.tableView_label.setEditTriggers(QAbstractItemView.NoEditTriggers)
self.gridLayout_3.addWidget(self.tableView_label, 1, 0, 1, 2)
self.tableView_label_revised = QTableView(self.groupBox_label)
self.tableView_label_revised.setObjectName(u"tableView_label_revised")
self.tableView_label_revised.setEditTriggers(QAbstractItemView.NoEditTriggers)
self.gridLayout_3.addWidget(self.tableView_label_revised, 5, 0, 1, 2)
self.gridLayout_3.setRowStretch(0, 2)
self.verticalLayout_2.addWidget(self.groupBox_label)
self.pushButton_reset_event = QPushButton(self.groupBox_left)
self.pushButton_reset_event.setObjectName(u"pushButton_reset_event")
self.pushButton_reset_event.setFont(font2)
self.verticalLayout_2.addWidget(self.pushButton_reset_event)
self.verticalSpacer_3 = QSpacerItem(20, 20, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Maximum)
self.verticalLayout_2.addItem(self.verticalSpacer_3)
self.pushButton_save = QPushButton(self.groupBox_left)
self.pushButton_save.setObjectName(u"pushButton_save")
sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(0)
sizePolicy2.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth())
self.pushButton_save.setSizePolicy(sizePolicy2)
self.pushButton_save.setFont(font2)
self.verticalLayout_2.addWidget(self.pushButton_save)
self.groupBox_4 = QGroupBox(self.groupBox_left)
self.groupBox_4.setObjectName(u"groupBox_4")
self.verticalLayout_6 = QVBoxLayout(self.groupBox_4)
self.verticalLayout_6.setObjectName(u"verticalLayout_6")
self.textBrowser_info = QTextBrowser(self.groupBox_4)
self.textBrowser_info.setObjectName(u"textBrowser_info")
self.verticalLayout_6.addWidget(self.textBrowser_info)
self.verticalLayout_2.addWidget(self.groupBox_4)
self.verticalLayout_2.setStretch(0, 1)
self.verticalLayout_2.setStretch(1, 1)
self.verticalLayout_2.setStretch(2, 4)
self.verticalLayout_2.setStretch(3, 15)
self.verticalLayout_2.setStretch(4, 1)
self.verticalLayout_2.setStretch(5, 1)
self.verticalLayout_2.setStretch(6, 2)
self.verticalLayout_2.setStretch(7, 5)
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.verticalSpacer_5 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_4.addItem(self.verticalSpacer_5, 1, 0, 1, 2)
self.groupBox_examineBySecond = QGroupBox(self.groupBox_right)
self.groupBox_examineBySecond.setObjectName(u"groupBox_examineBySecond")
self.verticalLayout_4 = QVBoxLayout(self.groupBox_examineBySecond)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.horizontalLayout_5 = QHBoxLayout()
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
self.label_3 = QLabel(self.groupBox_examineBySecond)
self.label_3.setObjectName(u"label_3")
self.horizontalLayout_5.addWidget(self.label_3)
self.lineEdit_jump_second = QLineEdit(self.groupBox_examineBySecond)
self.lineEdit_jump_second.setObjectName(u"lineEdit_jump_second")
self.horizontalLayout_5.addWidget(self.lineEdit_jump_second)
self.pushButton_jump_to = QPushButton(self.groupBox_examineBySecond)
self.pushButton_jump_to.setObjectName(u"pushButton_jump_to")
self.horizontalLayout_5.addWidget(self.pushButton_jump_to)
self.verticalLayout_4.addLayout(self.horizontalLayout_5)
self.gridLayout_8 = QGridLayout()
self.gridLayout_8.setObjectName(u"gridLayout_8")
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_8.addItem(self.horizontalSpacer, 0, 1, 1, 1)
self.pushButton_next_half = QPushButton(self.groupBox_examineBySecond)
self.pushButton_next_half.setObjectName(u"pushButton_next_half")
self.pushButton_next_half.setFont(font2)
self.pushButton_next_half.setProperty("offset", 15)
self.gridLayout_8.addWidget(self.pushButton_next_half, 1, 4, 1, 1)
self.pushButton_previous10s = QPushButton(self.groupBox_examineBySecond)
self.pushButton_previous10s.setObjectName(u"pushButton_previous10s")
self.pushButton_previous10s.setFont(font2)
self.pushButton_previous10s.setProperty("offset", -10)
self.gridLayout_8.addWidget(self.pushButton_previous10s, 0, 0, 1, 1)
self.pushButton_previous_half = QPushButton(self.groupBox_examineBySecond)
self.pushButton_previous_half.setObjectName(u"pushButton_previous_half")
self.pushButton_previous_half.setFont(font2)
self.pushButton_previous_half.setProperty("offset", -15)
self.gridLayout_8.addWidget(self.pushButton_previous_half, 0, 4, 1, 1)
self.pushButton_next30s = QPushButton(self.groupBox_examineBySecond)
self.pushButton_next30s.setObjectName(u"pushButton_next30s")
self.pushButton_next30s.setFont(font2)
self.pushButton_next30s.setProperty("offset", 30)
self.gridLayout_8.addWidget(self.pushButton_next30s, 1, 2, 1, 1)
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_8.addItem(self.horizontalSpacer_2, 1, 1, 1, 1)
self.pushButton_previous30s = QPushButton(self.groupBox_examineBySecond)
self.pushButton_previous30s.setObjectName(u"pushButton_previous30s")
self.pushButton_previous30s.setFont(font2)
self.pushButton_previous30s.setProperty("offset", -30)
self.gridLayout_8.addWidget(self.pushButton_previous30s, 0, 2, 1, 1)
self.pushButton_next10s = QPushButton(self.groupBox_examineBySecond)
self.pushButton_next10s.setObjectName(u"pushButton_next10s")
self.pushButton_next10s.setFont(font2)
self.pushButton_next10s.setProperty("offset", 10)
self.gridLayout_8.addWidget(self.pushButton_next10s, 1, 0, 1, 1)
self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_8.addItem(self.horizontalSpacer_3, 0, 3, 1, 1)
self.horizontalSpacer_4 = QSpacerItem(40, 20, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_8.addItem(self.horizontalSpacer_4, 1, 3, 1, 1)
self.gridLayout_8.setColumnMinimumWidth(0, 3)
self.gridLayout_8.setColumnMinimumWidth(1, 1)
self.gridLayout_8.setColumnMinimumWidth(2, 3)
self.gridLayout_8.setColumnMinimumWidth(3, 1)
self.gridLayout_8.setColumnMinimumWidth(4, 3)
self.verticalLayout_4.addLayout(self.gridLayout_8)
self.verticalLayout_4.setStretch(0, 1)
self.verticalLayout_4.setStretch(1, 2)
self.gridLayout_4.addWidget(self.groupBox_examineBySecond, 2, 0, 1, 2)
self.groupBox_label_operation = QGroupBox(self.groupBox_right)
self.groupBox_label_operation.setObjectName(u"groupBox_label_operation")
self.verticalLayout_3 = QVBoxLayout(self.groupBox_label_operation)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.horizontalLayout_7 = QHBoxLayout()
self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
self.label_5 = QLabel(self.groupBox_label_operation)
self.label_5.setObjectName(u"label_5")
sizePolicy2.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
self.label_5.setSizePolicy(sizePolicy2)
self.label_5.setFont(font2)
self.horizontalLayout_7.addWidget(self.label_5)
self.label_BCG_Index = QLabel(self.groupBox_label_operation)
self.label_BCG_Index.setObjectName(u"label_BCG_Index")
sizePolicy3 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Preferred)
sizePolicy3.setHorizontalStretch(0)
sizePolicy3.setVerticalStretch(0)
sizePolicy3.setHeightForWidth(self.label_BCG_Index.sizePolicy().hasHeightForWidth())
self.label_BCG_Index.setSizePolicy(sizePolicy3)
self.label_BCG_Index.setFont(font2)
self.horizontalLayout_7.addWidget(self.label_BCG_Index)
self.horizontalLayout_7.setStretch(0, 1)
self.horizontalLayout_7.setStretch(1, 5)
self.verticalLayout_3.addLayout(self.horizontalLayout_7)
self.label_BCG_Info = QLabel(self.groupBox_label_operation)
self.label_BCG_Info.setObjectName(u"label_BCG_Info")
self.label_BCG_Info.setFont(font2)
self.verticalLayout_3.addWidget(self.label_BCG_Info)
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.label_11 = QLabel(self.groupBox_label_operation)
self.label_11.setObjectName(u"label_11")
self.label_11.setFont(font2)
self.horizontalLayout_3.addWidget(self.label_11)
self.radioButton_OSA = QRadioButton(self.groupBox_label_operation)
self.radioButton_OSA.setObjectName(u"radioButton_OSA")
self.radioButton_OSA.setFont(font2)
self.radioButton_OSA.setChecked(True)
self.horizontalLayout_3.addWidget(self.radioButton_OSA)
self.radioButton_CSA = QRadioButton(self.groupBox_label_operation)
self.radioButton_CSA.setObjectName(u"radioButton_CSA")
self.radioButton_CSA.setFont(font2)
self.horizontalLayout_3.addWidget(self.radioButton_CSA)
self.radioButton_MSA = QRadioButton(self.groupBox_label_operation)
self.radioButton_MSA.setObjectName(u"radioButton_MSA")
self.radioButton_MSA.setFont(font2)
self.horizontalLayout_3.addWidget(self.radioButton_MSA)
self.radioButton_HPY = QRadioButton(self.groupBox_label_operation)
self.radioButton_HPY.setObjectName(u"radioButton_HPY")
self.radioButton_HPY.setFont(font2)
self.horizontalLayout_3.addWidget(self.radioButton_HPY)
self.verticalLayout_3.addLayout(self.horizontalLayout_3)
self.horizontalLayout_4 = QHBoxLayout()
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
self.label_12 = QLabel(self.groupBox_label_operation)
self.label_12.setObjectName(u"label_12")
self.label_12.setFont(font2)
self.horizontalLayout_4.addWidget(self.label_12)
self.radioButton_1_class = QRadioButton(self.groupBox_label_operation)
self.radioButton_1_class.setObjectName(u"radioButton_1_class")
self.radioButton_1_class.setFont(font2)
self.radioButton_1_class.setChecked(True)
self.horizontalLayout_4.addWidget(self.radioButton_1_class)
self.radioButton_2_class = QRadioButton(self.groupBox_label_operation)
self.radioButton_2_class.setObjectName(u"radioButton_2_class")
self.radioButton_2_class.setFont(font2)
self.horizontalLayout_4.addWidget(self.radioButton_2_class)
self.radioButton_3_class = QRadioButton(self.groupBox_label_operation)
self.radioButton_3_class.setObjectName(u"radioButton_3_class")
self.radioButton_3_class.setFont(font2)
self.horizontalLayout_4.addWidget(self.radioButton_3_class)
self.verticalLayout_3.addLayout(self.horizontalLayout_4)
self.verticalSpacer_9 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_3.addItem(self.verticalSpacer_9)
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.label_6 = QLabel(self.groupBox_label_operation)
self.label_6.setObjectName(u"label_6")
self.label_6.setFont(font2)
self.horizontalLayout_2.addWidget(self.label_6)
self.lineEdit_remark = QLineEdit(self.groupBox_label_operation)
self.lineEdit_remark.setObjectName(u"lineEdit_remark")
self.lineEdit_remark.setFont(font2)
self.horizontalLayout_2.addWidget(self.lineEdit_remark)
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
self.verticalSpacer_8 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_3.addItem(self.verticalSpacer_8)
self.label_7 = QLabel(self.groupBox_label_operation)
self.label_7.setObjectName(u"label_7")
self.label_7.setFont(font2)
self.verticalLayout_3.addWidget(self.label_7)
self.gridLayout_5 = QGridLayout()
self.gridLayout_5.setObjectName(u"gridLayout_5")
self.pushButton_quick_remark_input_durationNoEnough = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_durationNoEnough.setObjectName(u"pushButton_quick_remark_input_durationNoEnough")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_durationNoEnough.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_durationNoEnough.setSizePolicy(sizePolicy2)
self.pushButton_quick_remark_input_durationNoEnough.setFont(font2)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_durationNoEnough, 1, 1, 1, 1)
self.pushButton_quick_remark_input_maybeWrongLabeled = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_maybeWrongLabeled.setObjectName(u"pushButton_quick_remark_input_maybeWrongLabeled")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_maybeWrongLabeled.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_maybeWrongLabeled.setSizePolicy(sizePolicy2)
self.pushButton_quick_remark_input_maybeWrongLabeled.setFont(font2)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_maybeWrongLabeled, 1, 0, 1, 1)
self.pushButton_quick_remark_input_noNormalRespBetweenArtifact = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setObjectName(u"pushButton_quick_remark_input_noNormalRespBetweenArtifact")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setSizePolicy(sizePolicy2)
self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setFont(font2)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_noNormalRespBetweenArtifact, 2, 1, 1, 1)
self.pushButton_quick_remark_input_maybeDesaturation = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_maybeDesaturation.setObjectName(u"pushButton_quick_remark_input_maybeDesaturation")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_maybeDesaturation.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_maybeDesaturation.setSizePolicy(sizePolicy2)
self.pushButton_quick_remark_input_maybeDesaturation.setFont(font2)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_maybeDesaturation, 0, 1, 1, 1)
self.pushButton_quick_remark_input_littleChange = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_littleChange.setObjectName(u"pushButton_quick_remark_input_littleChange")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_littleChange.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_littleChange.setSizePolicy(sizePolicy2)
self.pushButton_quick_remark_input_littleChange.setFont(font2)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_littleChange, 2, 0, 1, 1)
self.pushButton_quick_remark_input_waitingForTalk = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_waitingForTalk.setObjectName(u"pushButton_quick_remark_input_waitingForTalk")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_waitingForTalk.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_waitingForTalk.setSizePolicy(sizePolicy2)
self.pushButton_quick_remark_input_waitingForTalk.setFont(font2)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_waitingForTalk, 0, 0, 1, 1)
self.pushButton_quick_remark_input_lowSignalNoiseRatio = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_lowSignalNoiseRatio.setObjectName(u"pushButton_quick_remark_input_lowSignalNoiseRatio")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_lowSignalNoiseRatio.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_lowSignalNoiseRatio.setSizePolicy(sizePolicy2)
self.pushButton_quick_remark_input_lowSignalNoiseRatio.setFont(font2)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_lowSignalNoiseRatio, 3, 0, 1, 1)
self.pushButton_quick_remark_input_changeOnMiddle = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_changeOnMiddle.setObjectName(u"pushButton_quick_remark_input_changeOnMiddle")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_changeOnMiddle.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_changeOnMiddle.setSizePolicy(sizePolicy2)
self.pushButton_quick_remark_input_changeOnMiddle.setFont(font2)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_changeOnMiddle, 3, 1, 1, 1)
self.verticalLayout_3.addLayout(self.gridLayout_5)
self.verticalSpacer_7 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_3.addItem(self.verticalSpacer_7)
self.gridLayout_6 = QGridLayout()
self.gridLayout_6.setObjectName(u"gridLayout_6")
self.label_8 = QLabel(self.groupBox_label_operation)
self.label_8.setObjectName(u"label_8")
self.label_8.setFont(font2)
self.gridLayout_6.addWidget(self.label_8, 0, 0, 1, 1)
self.label_9 = QLabel(self.groupBox_label_operation)
self.label_9.setObjectName(u"label_9")
self.label_9.setFont(font2)
self.gridLayout_6.addWidget(self.label_9, 1, 0, 1, 1)
self.spinBox_correctStart = QSpinBox(self.groupBox_label_operation)
self.spinBox_correctStart.setObjectName(u"spinBox_correctStart")
self.spinBox_correctStart.setFont(font2)
self.spinBox_correctStart.setButtonSymbols(QAbstractSpinBox.UpDownArrows)
self.spinBox_correctStart.setMaximum(100000)
self.gridLayout_6.addWidget(self.spinBox_correctStart, 0, 1, 1, 1)
self.spinBox_correctEnd = QSpinBox(self.groupBox_label_operation)
self.spinBox_correctEnd.setObjectName(u"spinBox_correctEnd")
self.spinBox_correctEnd.setFont(font2)
self.spinBox_correctEnd.setButtonSymbols(QAbstractSpinBox.UpDownArrows)
self.spinBox_correctEnd.setMaximum(100000)
self.gridLayout_6.addWidget(self.spinBox_correctEnd, 1, 1, 1, 1)
self.verticalLayout_3.addLayout(self.gridLayout_6)
self.verticalSpacer_6 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_3.addItem(self.verticalSpacer_6)
self.gridLayout_7 = QGridLayout()
self.gridLayout_7.setObjectName(u"gridLayout_7")
self.pushButton_confirmLabel = QPushButton(self.groupBox_label_operation)
self.pushButton_confirmLabel.setObjectName(u"pushButton_confirmLabel")
sizePolicy2.setHeightForWidth(self.pushButton_confirmLabel.sizePolicy().hasHeightForWidth())
self.pushButton_confirmLabel.setSizePolicy(sizePolicy2)
self.pushButton_confirmLabel.setFont(font2)
self.gridLayout_7.addWidget(self.pushButton_confirmLabel, 0, 1, 2, 1)
self.pushButton_next = QPushButton(self.groupBox_label_operation)
self.pushButton_next.setObjectName(u"pushButton_next")
sizePolicy2.setHeightForWidth(self.pushButton_next.sizePolicy().hasHeightForWidth())
self.pushButton_next.setSizePolicy(sizePolicy2)
self.pushButton_next.setFont(font2)
self.gridLayout_7.addWidget(self.pushButton_next, 1, 0, 1, 1)
self.pushButton_prev = QPushButton(self.groupBox_label_operation)
self.pushButton_prev.setObjectName(u"pushButton_prev")
sizePolicy2.setHeightForWidth(self.pushButton_prev.sizePolicy().hasHeightForWidth())
self.pushButton_prev.setSizePolicy(sizePolicy2)
self.pushButton_prev.setFont(font2)
self.gridLayout_7.addWidget(self.pushButton_prev, 0, 0, 1, 1)
self.verticalLayout_3.addLayout(self.gridLayout_7)
self.verticalLayout_3.setStretch(0, 1)
self.verticalLayout_3.setStretch(1, 1)
self.verticalLayout_3.setStretch(2, 2)
self.verticalLayout_3.setStretch(3, 2)
self.verticalLayout_3.setStretch(4, 1)
self.verticalLayout_3.setStretch(5, 2)
self.verticalLayout_3.setStretch(6, 1)
self.verticalLayout_3.setStretch(7, 1)
self.verticalLayout_3.setStretch(8, 6)
self.verticalLayout_3.setStretch(9, 1)
self.verticalLayout_3.setStretch(10, 2)
self.verticalLayout_3.setStretch(11, 1)
self.verticalLayout_3.setStretch(12, 3)
self.gridLayout_4.addWidget(self.groupBox_label_operation, 0, 0, 1, 2)
self.gridLayout_4.setRowStretch(0, 12)
self.gridLayout.addWidget(self.groupBox_right, 0, 2, 1, 1)
self.gridLayout.setColumnStretch(0, 3)
self.gridLayout.setColumnStretch(1, 7)
self.gridLayout.setColumnStretch(2, 3)
MainWindow_SA_label.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_SA_label)
self.statusbar.setObjectName(u"statusbar")
MainWindow_SA_label.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_SA_label)
self.comboBox_window_signal_length.setCurrentIndex(3)
QMetaObject.connectSlotsByName(MainWindow_SA_label)
# setupUi
def retranslateUi(self, MainWindow_SA_label):
MainWindow_SA_label.setWindowTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u7761\u7720\u547c\u5438\u6682\u505c\u4e8b\u4ef6\u6807\u6ce8", None))
self.groupBox_canvas.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u7ed8\u56fe\u533a", None))
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u7761\u7720\u547c\u5438\u6682\u505c\u4e8b\u4ef6\u6807\u6ce8", None))
self.label_sampno.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u7f16\u53f7\uff1a", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_input.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u5f00\u59cb\u5bfc\u5165", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u6253\u6807\u8bbe\u7f6e", None))
self.checkBox_best_flow.setText(QCoreApplication.translate("MainWindow_SA_label", u"Flow", None))
self.checkBox_best_effort.setText(QCoreApplication.translate("MainWindow_SA_label", u"Effort", None))
self.checkBox_best_resp.setText(QCoreApplication.translate("MainWindow_SA_label", u"Resp", None))
self.checkBox_best_raw.setText(QCoreApplication.translate("MainWindow_SA_label", u"Raw", None))
self.pushButton_best_fit.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u81ea\u9002\u5e94\u5e45\u503c\uff08B\uff09", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u663e\u793a\u7a97\u53e3\u957f\u5ea6/\u79d2\uff1a", None))
self.comboBox_window_signal_length.setItemText(0, QCoreApplication.translate("MainWindow_SA_label", u"30", None))
self.comboBox_window_signal_length.setItemText(1, QCoreApplication.translate("MainWindow_SA_label", u"60", None))
self.comboBox_window_signal_length.setItemText(2, QCoreApplication.translate("MainWindow_SA_label", u"120", None))
self.comboBox_window_signal_length.setItemText(3, QCoreApplication.translate("MainWindow_SA_label", u"180", None))
self.comboBox_window_signal_length.setItemText(4, QCoreApplication.translate("MainWindow_SA_label", u"300", None))
self.comboBox_window_signal_length.setItemText(5, QCoreApplication.translate("MainWindow_SA_label", u"600", None))
self.checkBox_auto_save.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4fee\u6539\u540e\u81ea\u52a8\u4fdd\u5b58", None))
self.groupBox_label.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u6807\u7b7e\u8bb0\u5f55", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u786e\u8ba4\u540e\u7684\u6807\u7b7e", None))
self.lineEdit_filter_label_origin.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label", u"\u7b5b\u9009\u5668", None))
self.lineEdit_filter_label_revised.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label", u"\u7b5b\u9009\u5668", None))
self.label.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u539f\u6570\u636e\u7684\u6807\u7b7e", None))
self.pushButton_reset_event.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u91cd\u7f6e\u6807\u7b7e", None))
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u624b\u52a8\u4fdd\u5b58", None))
self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u65e5\u5fd7", None))
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u7761\u7720\u547c\u5438\u6682\u505c\u4e8b\u4ef6\u6807\u6ce8", None))
self.groupBox_examineBySecond.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u8df3\u8f6c", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u8d77\u59cb\u79d2\u6570\uff1a", None))
self.pushButton_jump_to.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u8df3\u8f6c", None))
self.pushButton_next_half.setText(QCoreApplication.translate("MainWindow_SA_label", u"+\u534a\u7a97(G)", None))
self.pushButton_previous10s.setText(QCoreApplication.translate("MainWindow_SA_label", u"-10s(Q)", None))
self.pushButton_previous_half.setText(QCoreApplication.translate("MainWindow_SA_label", u"-\u534a\u7a97(F)", None))
self.pushButton_next30s.setText(QCoreApplication.translate("MainWindow_SA_label", u"+30s(D)", None))
self.pushButton_previous30s.setText(QCoreApplication.translate("MainWindow_SA_label", u"-30s(A)", None))
self.pushButton_next10s.setText(QCoreApplication.translate("MainWindow_SA_label", u"+10s(E)", None))
self.groupBox_label_operation.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u6807\u6ce8\u64cd\u4f5c", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e8b\u4ef6\u7f16\u53f7\uff1a", None))
self.label_BCG_Index.setText("")
self.label_BCG_Info.setText("")
self.label_11.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e8b\u4ef6\u7c7b\u578b", None))
self.radioButton_OSA.setText(QCoreApplication.translate("MainWindow_SA_label", u"OSA(7)", None))
self.radioButton_CSA.setText(QCoreApplication.translate("MainWindow_SA_label", u"CSA(8)", None))
self.radioButton_MSA.setText(QCoreApplication.translate("MainWindow_SA_label", u"MSA(9)", None))
self.radioButton_HPY.setText(QCoreApplication.translate("MainWindow_SA_label", u"HPY(0)", None))
self.label_12.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u6807\u7b7e\u7c7b\u578b", None))
self.radioButton_1_class.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e00\u7c7b(1)", None))
self.radioButton_2_class.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e8c\u7c7b(2)", None))
self.radioButton_3_class.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u5220\u9664(3)", None))
self.label_6.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u5907\u6ce8\uff1a", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u5feb\u901f\u5907\u6ce8\u8f93\u5165", None))
self.pushButton_quick_remark_input_durationNoEnough.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e8c\u7c7b-\u65f6\u957f\u4e0d\u8db3", None))
self.pushButton_quick_remark_input_maybeWrongLabeled.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e8c\u7c7b-\u7591\u4f3c\u533b\u751f\u8bef\u6807", None))
self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e8c\u7c7b-\u4f53\u52a8\u95f4\u65e0\u6b63\u5e38\u547c\u5438(O)", None))
self.pushButton_quick_remark_input_maybeDesaturation.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e00\u7c7b-\u5f62\u4f3c\u6f6e\u5f0f\u547c\u5438", None))
self.pushButton_quick_remark_input_littleChange.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e8c\u7c7b-\u8d77\u4f0f\u53d8\u5316\u4e0d\u5927(U)", None))
self.pushButton_quick_remark_input_waitingForTalk.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u5f85\u8ba8\u8bba(N)", None))
self.pushButton_quick_remark_input_lowSignalNoiseRatio.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e8c\u7c7b-\u4fe1\u566a\u6bd4\u4f4e(P)", None))
self.pushButton_quick_remark_input_changeOnMiddle.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e8c\u7c7b-\u4e2d\u95f4\u8d77\u4f0f(I)", None))
self.label_8.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4fee\u6b63\u540e\u8d77\u59cb\u65f6\u95f4(s)", None))
self.label_9.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4fee\u6b63\u540e\u7ec8\u6b62\u65f6\u95f4(s)", None))
self.pushButton_confirmLabel.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u786e\u5b9a\u6253\u6807\u53c2\u6570(S)", None))
self.pushButton_next.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e0b\u4e00\u4e2a\u4e8b\u4ef6", None))
self.pushButton_prev.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4e0a\u4e00\u4e2a\u4e8b\u4ef6", None))
# retranslateUi

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
################################################################################ ################################################################################
## Form generated from reading UI file 'MainWindow_approximately_align.ui' ## Form generated from reading UI file 'MainWindow_approximately_align.ui'
## ##
## Created by: Qt User Interface Compiler version 6.8.2 ## Created by: Qt User Interface Compiler version 6.9.2
## ##
## WARNING! All changes made in this file will be lost when recompiling UI file! ## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################ ################################################################################
@ -25,7 +25,7 @@ class Ui_MainWindow_approximately_align(object):
def setupUi(self, MainWindow_approximately_align): def setupUi(self, MainWindow_approximately_align):
if not MainWindow_approximately_align.objectName(): if not MainWindow_approximately_align.objectName():
MainWindow_approximately_align.setObjectName(u"MainWindow_approximately_align") MainWindow_approximately_align.setObjectName(u"MainWindow_approximately_align")
MainWindow_approximately_align.resize(1920, 1080) MainWindow_approximately_align.resize(1928, 1099)
self.centralwidget = QWidget(MainWindow_approximately_align) self.centralwidget = QWidget(MainWindow_approximately_align)
self.centralwidget.setObjectName(u"centralwidget") self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget) self.gridLayout = QGridLayout(self.centralwidget)
@ -65,9 +65,23 @@ class Ui_MainWindow_approximately_align(object):
self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.label_12 = QLabel(self.groupBox_left)
self.label_12.setObjectName(u"label_12")
self.horizontalLayout_2.addWidget(self.label_12)
self.label_sampno = QLabel(self.groupBox_left)
self.label_sampno.setObjectName(u"label_sampno")
self.horizontalLayout_2.addWidget(self.label_sampno)
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout_2.addItem(self.horizontalSpacer_2)
self.label_3 = QLabel(self.groupBox_left) self.label_3 = QLabel(self.groupBox_left)
self.label_3.setObjectName(u"label_3") self.label_3.setObjectName(u"label_3")
self.label_3.setFont(font1) self.label_3.setFont(font)
self.horizontalLayout_2.addWidget(self.label_3) self.horizontalLayout_2.addWidget(self.label_3)
@ -83,7 +97,7 @@ class Ui_MainWindow_approximately_align(object):
self.label_6 = QLabel(self.groupBox_left) self.label_6 = QLabel(self.groupBox_left)
self.label_6.setObjectName(u"label_6") self.label_6.setObjectName(u"label_6")
self.label_6.setFont(font1) self.label_6.setFont(font)
self.horizontalLayout_2.addWidget(self.label_6) self.horizontalLayout_2.addWidget(self.label_6)
@ -98,69 +112,75 @@ class Ui_MainWindow_approximately_align(object):
self.groupBox_standardize = QGroupBox(self.groupBox_left) self.groupBox_standardize = QGroupBox(self.groupBox_left)
self.groupBox_standardize.setObjectName(u"groupBox_standardize") self.groupBox_standardize.setObjectName(u"groupBox_standardize")
self.verticalLayout_5 = QVBoxLayout(self.groupBox_standardize) self.gridLayoutWidget = QWidget(self.groupBox_standardize)
self.verticalLayout_5.setObjectName(u"verticalLayout_5") self.gridLayoutWidget.setObjectName(u"gridLayoutWidget")
self.horizontalLayout = QHBoxLayout() self.gridLayoutWidget.setGeometry(QRect(0, 20, 421, 80))
self.horizontalLayout.setObjectName(u"horizontalLayout") self.gridLayout_4 = QGridLayout(self.gridLayoutWidget)
self.checkBox_orgBcgDelBase = QCheckBox(self.groupBox_standardize) self.gridLayout_4.setObjectName(u"gridLayout_4")
self.checkBox_orgBcgDelBase.setObjectName(u"checkBox_orgBcgDelBase") self.gridLayout_4.setContentsMargins(0, 0, 0, 0)
self.checkBox_orgBcgDelBase.setFont(font1) self.checkBox_PSGZScoreLimit = QCheckBox(self.gridLayoutWidget)
self.checkBox_orgBcgDelBase.setChecked(True) self.checkBox_PSGZScoreLimit.setObjectName(u"checkBox_PSGZScoreLimit")
self.horizontalLayout.addWidget(self.checkBox_orgBcgDelBase) self.gridLayout_4.addWidget(self.checkBox_PSGZScoreLimit, 1, 3, 1, 1)
self.checkBox_PSGDelBase = QCheckBox(self.groupBox_standardize) self.label_11 = QLabel(self.gridLayoutWidget)
self.checkBox_PSGDelBase.setObjectName(u"checkBox_PSGDelBase") self.label_11.setObjectName(u"label_11")
self.checkBox_PSGDelBase.setFont(font1) self.label_11.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.checkBox_PSGDelBase.setChecked(True)
self.horizontalLayout.addWidget(self.checkBox_PSGDelBase) self.gridLayout_4.addWidget(self.label_11, 1, 0, 1, 1)
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum) self.checkBox_orgBcgZScore = QCheckBox(self.gridLayoutWidget)
self.horizontalLayout.addItem(self.horizontalSpacer_2)
self.checkBox_RawSignal = QCheckBox(self.groupBox_standardize)
self.checkBox_RawSignal.setObjectName(u"checkBox_RawSignal")
self.checkBox_RawSignal.setFont(font1)
self.horizontalLayout.addWidget(self.checkBox_RawSignal)
self.verticalLayout_5.addLayout(self.horizontalLayout)
self.horizontalLayout_5 = QHBoxLayout()
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
self.checkBox_orgBcgZScore = QCheckBox(self.groupBox_standardize)
self.checkBox_orgBcgZScore.setObjectName(u"checkBox_orgBcgZScore") self.checkBox_orgBcgZScore.setObjectName(u"checkBox_orgBcgZScore")
self.checkBox_orgBcgZScore.setFont(font1) self.checkBox_orgBcgZScore.setFont(font1)
self.checkBox_orgBcgZScore.setChecked(True) self.checkBox_orgBcgZScore.setChecked(True)
self.horizontalLayout_5.addWidget(self.checkBox_orgBcgZScore) self.gridLayout_4.addWidget(self.checkBox_orgBcgZScore, 0, 2, 1, 1)
self.checkBox_PSGZScore = QCheckBox(self.groupBox_standardize) self.label_10 = QLabel(self.gridLayoutWidget)
self.label_10.setObjectName(u"label_10")
self.label_10.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_4.addWidget(self.label_10, 0, 0, 1, 1)
self.checkBox_PSGZScore = QCheckBox(self.gridLayoutWidget)
self.checkBox_PSGZScore.setObjectName(u"checkBox_PSGZScore") self.checkBox_PSGZScore.setObjectName(u"checkBox_PSGZScore")
self.checkBox_PSGZScore.setFont(font1) self.checkBox_PSGZScore.setFont(font1)
self.checkBox_PSGZScore.setChecked(True) self.checkBox_PSGZScore.setChecked(True)
self.horizontalLayout_5.addWidget(self.checkBox_PSGZScore) self.gridLayout_4.addWidget(self.checkBox_PSGZScore, 1, 2, 1, 1)
self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum) self.checkBox_PSGDelBase = QCheckBox(self.gridLayoutWidget)
self.checkBox_PSGDelBase.setObjectName(u"checkBox_PSGDelBase")
self.checkBox_PSGDelBase.setFont(font1)
self.checkBox_PSGDelBase.setChecked(True)
self.horizontalLayout_5.addItem(self.horizontalSpacer_3) self.gridLayout_4.addWidget(self.checkBox_PSGDelBase, 1, 1, 1, 1)
self.pushButton_Standardize = QPushButton(self.groupBox_standardize) self.checkBox_orgBcgDelBase = QCheckBox(self.gridLayoutWidget)
self.checkBox_orgBcgDelBase.setObjectName(u"checkBox_orgBcgDelBase")
self.checkBox_orgBcgDelBase.setFont(font1)
self.checkBox_orgBcgDelBase.setChecked(True)
self.gridLayout_4.addWidget(self.checkBox_orgBcgDelBase, 0, 1, 1, 1)
self.checkBox_orgBcgZScoreLimit = QCheckBox(self.gridLayoutWidget)
self.checkBox_orgBcgZScoreLimit.setObjectName(u"checkBox_orgBcgZScoreLimit")
self.gridLayout_4.addWidget(self.checkBox_orgBcgZScoreLimit, 0, 3, 1, 1)
self.checkBox_RawSignal = QCheckBox(self.gridLayoutWidget)
self.checkBox_RawSignal.setObjectName(u"checkBox_RawSignal")
self.checkBox_RawSignal.setFont(font)
self.gridLayout_4.addWidget(self.checkBox_RawSignal, 0, 4, 1, 1)
self.pushButton_Standardize = QPushButton(self.gridLayoutWidget)
self.pushButton_Standardize.setObjectName(u"pushButton_Standardize") self.pushButton_Standardize.setObjectName(u"pushButton_Standardize")
self.pushButton_Standardize.setFont(font1) self.pushButton_Standardize.setFont(font)
self.horizontalLayout_5.addWidget(self.pushButton_Standardize) self.gridLayout_4.addWidget(self.pushButton_Standardize, 1, 4, 1, 1)
self.verticalLayout_5.addLayout(self.horizontalLayout_5)
self.verticalLayout_5.setStretch(0, 1)
self.verticalLayout_5.setStretch(1, 1)
self.verticalLayout.addWidget(self.groupBox_standardize) self.verticalLayout.addWidget(self.groupBox_standardize)
self.groupBox_get_position = QGroupBox(self.groupBox_left) self.groupBox_get_position = QGroupBox(self.groupBox_left)
@ -547,24 +567,36 @@ class Ui_MainWindow_approximately_align(object):
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u6570\u636e\u7c97\u540c\u6b65", None)) self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u6570\u636e\u7c97\u540c\u6b65", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5bfc\u5165\u8bbe\u7f6e", None)) self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_input.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5f00\u59cb\u5bfc\u5165", None)) self.pushButton_input.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5f00\u59cb\u5bfc\u5165", None))
self.label_12.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u7f16\u53f7\uff1a", None))
self.label_sampno.setText(QCoreApplication.translate("MainWindow_approximately_align", u"None", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG\u65f6\u957f(\u79d2)\uff1a", None)) self.label_3.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG\u65f6\u957f(\u79d2)\uff1a", None))
self.label_orgBcg_length.setText(QCoreApplication.translate("MainWindow_approximately_align", u"0", None)) self.label_orgBcg_length.setText(QCoreApplication.translate("MainWindow_approximately_align", u"0", None))
self.label_6.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG\u65f6\u957f(\u79d2)\uff1a", None)) self.label_6.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG\u65f6\u957f(\u79d2)\uff1a", None))
self.label_PSG_length.setText(QCoreApplication.translate("MainWindow_approximately_align", u"0", None)) self.label_PSG_length.setText(QCoreApplication.translate("MainWindow_approximately_align", u"0", None))
self.groupBox_standardize.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u6807\u51c6\u5316", None)) self.groupBox_standardize.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u6807\u51c6\u5316", None))
self.checkBox_orgBcgDelBase.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG\u53bb\u57fa\u7ebf", None)) self.checkBox_PSGZScoreLimit.setText(QCoreApplication.translate("MainWindow_approximately_align", u"Z-Score\u9650\u5e45", None))
self.checkBox_PSGDelBase.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG\u53bb\u57fa\u7ebf", None)) self.label_11.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG", None))
self.checkBox_orgBcgZScore.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u6807\u51c6\u5316", None))
self.label_10.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG", None))
self.checkBox_PSGZScore.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u6807\u51c6\u5316", None))
self.checkBox_PSGDelBase.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u53bb\u57fa\u7ebf", None))
self.checkBox_orgBcgDelBase.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u53bb\u57fa\u7ebf", None))
self.checkBox_orgBcgZScoreLimit.setText(QCoreApplication.translate("MainWindow_approximately_align", u"Z-Score\u9650\u5e45", None))
self.checkBox_RawSignal.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u539f\u59cb\u4fe1\u53f7", None)) self.checkBox_RawSignal.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u539f\u59cb\u4fe1\u53f7", None))
self.checkBox_orgBcgZScore.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG\u6807\u51c6\u5316", None))
self.checkBox_PSGZScore.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG\u6807\u51c6\u5316", None))
self.pushButton_Standardize.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5e94\u7528", None)) self.pushButton_Standardize.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5e94\u7528", None))
self.groupBox_get_position.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u622a\u65ad", None)) self.groupBox_get_position.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u622a\u65ad", None))
self.label.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG_\u8865\u96f6\uff1a", None)) self.label.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG_\u8865\u96f6\uff1a", None))
self.spinBox_orgBcgPreA.setSuffix(QCoreApplication.translate("MainWindow_approximately_align", u" \u79d2", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG_\u8865\u96f6\uff1a", None)) self.label_2.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG_\u8865\u96f6\uff1a", None))
self.spinBox_PSGPreA.setSuffix(QCoreApplication.translate("MainWindow_approximately_align", u" \u79d2", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG_Pre \uff1a", None)) self.label_4.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG_Pre \uff1a", None))
self.spinBox_orgBcgPreCut.setSuffix(QCoreApplication.translate("MainWindow_approximately_align", u" \u79d2", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG_Pre \uff1a", None)) self.label_5.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG_Pre \uff1a", None))
self.spinBox_PSGPreCut.setSuffix(QCoreApplication.translate("MainWindow_approximately_align", u" \u79d2", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG_Post\uff1a", None)) self.label_7.setText(QCoreApplication.translate("MainWindow_approximately_align", u"OrgBCG_Post\uff1a", None))
self.spinBox_orgBcgPostCut.setSuffix(QCoreApplication.translate("MainWindow_approximately_align", u" \u79d2", None))
self.label_8.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG_Post\uff1a", None)) self.label_8.setText(QCoreApplication.translate("MainWindow_approximately_align", u"PSG_Post\uff1a", None))
self.spinBox_PSGPostCut.setSuffix(QCoreApplication.translate("MainWindow_approximately_align", u" \u79d2", None))
self.pushButton_CutOff.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5e94\u7528", None)) self.pushButton_CutOff.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5e94\u7528", None))
self.groupBox_align_position.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u5bf9\u9f50\u8d77\u59cb\u4f4d\u7f6e", None)) self.groupBox_align_position.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u5bf9\u9f50\u8d77\u59cb\u4f4d\u7f6e", None))
self.pushButton_ChangeView.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u4f30\u8ba1\u91c7\u6837\u7387", None)) self.pushButton_ChangeView.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u4f30\u8ba1\u91c7\u6837\u7387", None))

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1920</width> <width>1928</width>
<height>1080</height> <height>1099</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -68,11 +68,38 @@
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>编号:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_sampno">
<property name="text">
<string>None</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -109,7 +136,7 @@
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="label_6">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -136,126 +163,136 @@
<property name="title"> <property name="title">
<string>标准化</string> <string>标准化</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="1,1"> <widget class="QWidget" name="gridLayoutWidget">
<item> <property name="geometry">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0"> <rect>
<item> <x>0</x>
<widget class="QCheckBox" name="checkBox_orgBcgDelBase"> <y>20</y>
<property name="font"> <width>421</width>
<font> <height>80</height>
<pointsize>12</pointsize> </rect>
</font> </property>
</property> <layout class="QGridLayout" name="gridLayout_4">
<property name="text"> <item row="1" column="3">
<string>OrgBCG去基线</string> <widget class="QCheckBox" name="checkBox_PSGZScoreLimit">
</property> <property name="text">
<property name="checked"> <string>Z-Score限幅</string>
<bool>true</bool> </property>
</property> </widget>
</widget> </item>
</item> <item row="1" column="0">
<item> <widget class="QLabel" name="label_11">
<widget class="QCheckBox" name="checkBox_PSGDelBase"> <property name="text">
<property name="font"> <string>PSG</string>
<font> </property>
<pointsize>12</pointsize> <property name="alignment">
</font> <set>Qt::AlignmentFlag::AlignCenter</set>
</property> </property>
<property name="text"> </widget>
<string>PSG去基线</string> </item>
</property> <item row="0" column="2">
<property name="checked"> <widget class="QCheckBox" name="checkBox_orgBcgZScore">
<bool>true</bool> <property name="font">
</property> <font>
</widget> <pointsize>12</pointsize>
</item> </font>
<item> </property>
<spacer name="horizontalSpacer_2"> <property name="text">
<property name="orientation"> <string>标准化</string>
<enum>Qt::Orientation::Horizontal</enum> </property>
</property> <property name="checked">
<property name="sizeHint" stdset="0"> <bool>true</bool>
<size> </property>
<width>40</width> </widget>
<height>20</height> </item>
</size> <item row="0" column="0">
</property> <widget class="QLabel" name="label_10">
</spacer> <property name="text">
</item> <string>OrgBCG</string>
<item> </property>
<widget class="QCheckBox" name="checkBox_RawSignal"> <property name="alignment">
<property name="font"> <set>Qt::AlignmentFlag::AlignCenter</set>
<font> </property>
<pointsize>12</pointsize> </widget>
</font> </item>
</property> <item row="1" column="2">
<property name="text"> <widget class="QCheckBox" name="checkBox_PSGZScore">
<string>原始信号</string> <property name="font">
</property> <font>
</widget> <pointsize>12</pointsize>
</item> </font>
</layout> </property>
</item> <property name="text">
<item> <string>标准化</string>
<layout class="QHBoxLayout" name="horizontalLayout_5" stretch="0,0,0,0"> </property>
<item> <property name="checked">
<widget class="QCheckBox" name="checkBox_orgBcgZScore"> <bool>true</bool>
<property name="font"> </property>
<font> </widget>
<pointsize>12</pointsize> </item>
</font> <item row="1" column="1">
</property> <widget class="QCheckBox" name="checkBox_PSGDelBase">
<property name="text"> <property name="font">
<string>OrgBCG标准化</string> <font>
</property> <pointsize>12</pointsize>
<property name="checked"> </font>
<bool>true</bool> </property>
</property> <property name="text">
</widget> <string>去基线</string>
</item> </property>
<item> <property name="checked">
<widget class="QCheckBox" name="checkBox_PSGZScore"> <bool>true</bool>
<property name="font"> </property>
<font> </widget>
<pointsize>12</pointsize> </item>
</font> <item row="0" column="1">
</property> <widget class="QCheckBox" name="checkBox_orgBcgDelBase">
<property name="text"> <property name="font">
<string>PSG标准化</string> <font>
</property> <pointsize>12</pointsize>
<property name="checked"> </font>
<bool>true</bool> </property>
</property> <property name="text">
</widget> <string>去基线</string>
</item> </property>
<item> <property name="checked">
<spacer name="horizontalSpacer_3"> <bool>true</bool>
<property name="orientation"> </property>
<enum>Qt::Orientation::Horizontal</enum> </widget>
</property> </item>
<property name="sizeHint" stdset="0"> <item row="0" column="3">
<size> <widget class="QCheckBox" name="checkBox_orgBcgZScoreLimit">
<width>40</width> <property name="text">
<height>20</height> <string>Z-Score限幅</string>
</size> </property>
</property> </widget>
</spacer> </item>
</item> <item row="0" column="4">
<item> <widget class="QCheckBox" name="checkBox_RawSignal">
<widget class="QPushButton" name="pushButton_Standardize"> <property name="font">
<property name="font"> <font>
<font> <pointsize>10</pointsize>
<pointsize>12</pointsize> </font>
</font> </property>
</property> <property name="text">
<property name="text"> <string>原始信号</string>
<string>应用</string> </property>
</property> </widget>
</widget> </item>
</item> <item row="1" column="4">
</layout> <widget class="QPushButton" name="pushButton_Standardize">
</item> <property name="font">
</layout> <font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>应用</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
<item> <item>
@ -297,6 +334,9 @@
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum> <enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property> </property>
<property name="suffix">
<string> 秒</string>
</property>
<property name="maximum"> <property name="maximum">
<number>999999</number> <number>999999</number>
</property> </property>
@ -333,6 +373,9 @@
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum> <enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property> </property>
<property name="suffix">
<string> 秒</string>
</property>
<property name="maximum"> <property name="maximum">
<number>999999</number> <number>999999</number>
</property> </property>
@ -367,6 +410,9 @@
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum> <enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property> </property>
<property name="suffix">
<string> 秒</string>
</property>
<property name="maximum"> <property name="maximum">
<number>999999</number> <number>999999</number>
</property> </property>
@ -397,6 +443,9 @@
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum> <enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property> </property>
<property name="suffix">
<string> 秒</string>
</property>
<property name="maximum"> <property name="maximum">
<number>999999</number> <number>999999</number>
</property> </property>
@ -437,6 +486,9 @@
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum> <enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property> </property>
<property name="suffix">
<string> 秒</string>
</property>
<property name="maximum"> <property name="maximum">
<number>999999</number> <number>999999</number>
</property> </property>
@ -473,6 +525,9 @@
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum> <enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property> </property>
<property name="suffix">
<string> 秒</string>
</property>
<property name="maximum"> <property name="maximum">
<number>999999</number> <number>999999</number>
</property> </property>

View File

@ -3,7 +3,7 @@
################################################################################ ################################################################################
## Form generated from reading UI file 'MainWindow_bcg_quality_label.ui' ## Form generated from reading UI file 'MainWindow_bcg_quality_label.ui'
## ##
## Created by: Qt User Interface Compiler version 6.8.2 ## Created by: Qt User Interface Compiler version 6.7.0
## ##
## WARNING! All changes made in this file will be lost when recompiling UI file! ## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################ ################################################################################
@ -298,6 +298,13 @@ class Ui_MainWindow_bcg_quality_label(object):
self.gridLayout_7.addItem(self.verticalSpacer_2, 3, 0, 1, 2) self.gridLayout_7.addItem(self.verticalSpacer_2, 3, 0, 1, 2)
self.checkBox_auto_next = QCheckBox(self.groupBox_operation)
self.checkBox_auto_next.setObjectName(u"checkBox_auto_next")
self.checkBox_auto_next.setFont(font1)
self.checkBox_auto_next.setChecked(True)
self.gridLayout_7.addWidget(self.checkBox_auto_next, 1, 1, 1, 1)
self.gridLayout_7.setRowStretch(0, 1) self.gridLayout_7.setRowStretch(0, 1)
self.gridLayout_7.setRowStretch(1, 1) self.gridLayout_7.setRowStretch(1, 1)
self.gridLayout_7.setRowStretch(2, 1) self.gridLayout_7.setRowStretch(2, 1)
@ -534,14 +541,15 @@ class Ui_MainWindow_bcg_quality_label(object):
self.pushButton_next.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u">(D)", None)) self.pushButton_next.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u">(D)", None))
self.label.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u8f93\u5165\u5907\u6ce8", None)) self.label.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u8f93\u5165\u5907\u6ce8", None))
self.checkBox_display_afterfilter.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u53bb\u9664\u5de5\u9891\u566a\u58f0", None)) self.checkBox_display_afterfilter.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u53bb\u9664\u5de5\u9891\u566a\u58f0", None))
self.checkBox_auto_next.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u81ea\u52a8\u4e0b\u4e00\u9875", None))
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u624b\u52a8\u4fdd\u5b58", None)) self.pushButton_save.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u624b\u52a8\u4fdd\u5b58", None))
self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u65e5\u5fd7", None)) self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u65e5\u5fd7", None))
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u6807\u7b7e\u8bb0\u5f55", None)) self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u6807\u7b7e\u8bb0\u5f55", None))
self.pushButton_b1.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"b1", None)) self.pushButton_b1.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"b1(O)", None))
self.pushButton_b2.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"b2", None)) self.pushButton_b2.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"b2(P)", None))
self.pushButton_f.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u5220\u9664", None)) self.pushButton_f.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u5220\u9664", None))
self.pushButton_a2.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"a2", None)) self.pushButton_a2.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"a2(I)", None))
self.pushButton_a1.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"a1", None)) self.pushButton_a1.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"a1(U)", None))
self.pushButton_c.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"c", None)) self.pushButton_c.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"c(J)", None))
# retranslateUi # retranslateUi

View File

@ -517,6 +517,21 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="1">
<widget class="QCheckBox" name="checkBox_auto_next">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>自动下一页</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -617,7 +632,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>b1</string> <string>b1(O)</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -670,7 +685,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>b2</string> <string>b2(P)</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -719,7 +734,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>a2</string> <string>a2(I)</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -763,7 +778,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>a1</string> <string>a1(U)</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -820,7 +835,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>c</string> <string>c(J)</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
################################################################################ ################################################################################
## Form generated from reading UI file 'MainWindow_cut_PSG.ui' ## Form generated from reading UI file 'MainWindow_cut_PAIR_FILE.ui'
## ##
## Created by: Qt User Interface Compiler version 6.8.2 ## Created by: Qt User Interface Compiler version 6.9.2
## ##
## WARNING! All changes made in this file will be lost when recompiling UI file! ## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################ ################################################################################
@ -16,35 +16,36 @@ from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient,
QIcon, QImage, QKeySequence, QLinearGradient, QIcon, QImage, QKeySequence, QLinearGradient,
QPainter, QPalette, QPixmap, QRadialGradient, QPainter, QPalette, QPixmap, QRadialGradient,
QTransform) QTransform)
from PySide6.QtWidgets import (QApplication, QGridLayout, QGroupBox, QHBoxLayout, from PySide6.QtWidgets import (QApplication, QCheckBox, QGridLayout, QGroupBox,
QLabel, QMainWindow, QPlainTextEdit, QProgressBar, QHBoxLayout, QLabel, QMainWindow, QPlainTextEdit,
QPushButton, QSizePolicy, QSpacerItem, QSpinBox, QProgressBar, QPushButton, QSizePolicy, QSpacerItem,
QStatusBar, QTextBrowser, QVBoxLayout, QWidget) QSpinBox, QStatusBar, QTextBrowser, QVBoxLayout,
QWidget)
class Ui_MainWindow_cut_PSG(object): class Ui_MainWindow_cut_PAIR_FILE(object):
def setupUi(self, MainWindow_cut_PSG): def setupUi(self, MainWindow_cut_PAIR_FILE):
if not MainWindow_cut_PSG.objectName(): if not MainWindow_cut_PAIR_FILE.objectName():
MainWindow_cut_PSG.setObjectName(u"MainWindow_cut_PSG") MainWindow_cut_PAIR_FILE.setObjectName(u"MainWindow_cut_PAIR_FILE")
MainWindow_cut_PSG.setEnabled(True) MainWindow_cut_PAIR_FILE.setEnabled(True)
MainWindow_cut_PSG.resize(540, 720) MainWindow_cut_PAIR_FILE.resize(548, 739)
sizePolicy = QSizePolicy(QSizePolicy.Policy.Ignored, QSizePolicy.Policy.Preferred) sizePolicy = QSizePolicy(QSizePolicy.Policy.Ignored, QSizePolicy.Policy.Preferred)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow_cut_PSG.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(MainWindow_cut_PAIR_FILE.sizePolicy().hasHeightForWidth())
MainWindow_cut_PSG.setSizePolicy(sizePolicy) MainWindow_cut_PAIR_FILE.setSizePolicy(sizePolicy)
font = QFont() font = QFont()
font.setPointSize(12) font.setPointSize(12)
MainWindow_cut_PSG.setFont(font) MainWindow_cut_PAIR_FILE.setFont(font)
self.action_selectPath = QAction(MainWindow_cut_PSG) self.action_selectPath = QAction(MainWindow_cut_PAIR_FILE)
self.action_selectPath.setObjectName(u"action_selectPath") self.action_selectPath.setObjectName(u"action_selectPath")
font1 = QFont() font1 = QFont()
font1.setFamilies([u"\u9ed1\u4f53"]) font1.setFamilies([u"\u9ed1\u4f53"])
font1.setPointSize(14) font1.setPointSize(14)
self.action_selectPath.setFont(font1) self.action_selectPath.setFont(font1)
self.action = QAction(MainWindow_cut_PSG) self.action = QAction(MainWindow_cut_PAIR_FILE)
self.action.setObjectName(u"action") self.action.setObjectName(u"action")
self.action.setFont(font1) self.action.setFont(font1)
self.centralwidget = QWidget(MainWindow_cut_PSG) self.centralwidget = QWidget(MainWindow_cut_PAIR_FILE)
self.centralwidget.setObjectName(u"centralwidget") self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget) self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout") self.gridLayout.setObjectName(u"gridLayout")
@ -55,22 +56,33 @@ class Ui_MainWindow_cut_PSG(object):
self.groupBox_3.setFont(font2) self.groupBox_3.setFont(font2)
self.gridLayout_2 = QGridLayout(self.groupBox_3) self.gridLayout_2 = QGridLayout(self.groupBox_3)
self.gridLayout_2.setObjectName(u"gridLayout_2") self.gridLayout_2.setObjectName(u"gridLayout_2")
self.groupBox = QGroupBox(self.groupBox_3)
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.gridLayout_2.addWidget(self.groupBox, 1, 0, 1, 1)
self.groupBox_2 = QGroupBox(self.groupBox_3) self.groupBox_2 = QGroupBox(self.groupBox_3)
self.groupBox_2.setObjectName(u"groupBox_2") self.groupBox_2.setObjectName(u"groupBox_2")
self.verticalLayout_5 = QVBoxLayout(self.groupBox_2) self.verticalLayout_5 = QVBoxLayout(self.groupBox_2)
self.verticalLayout_5.setObjectName(u"verticalLayout_5") self.verticalLayout_5.setObjectName(u"verticalLayout_5")
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.checkBox_roughCut = QCheckBox(self.groupBox_2)
self.checkBox_roughCut.setObjectName(u"checkBox_roughCut")
self.checkBox_roughCut.setFont(font)
self.horizontalLayout_3.addWidget(self.checkBox_roughCut)
self.checkBox_roughResample = QCheckBox(self.groupBox_2)
self.checkBox_roughResample.setObjectName(u"checkBox_roughResample")
self.checkBox_roughResample.setFont(font)
self.horizontalLayout_3.addWidget(self.checkBox_roughResample)
self.pushButton_deleteRoughCut = QPushButton(self.groupBox_2)
self.pushButton_deleteRoughCut.setObjectName(u"pushButton_deleteRoughCut")
self.pushButton_deleteRoughCut.setFont(font)
self.horizontalLayout_3.addWidget(self.pushButton_deleteRoughCut)
self.verticalLayout_5.addLayout(self.horizontalLayout_3)
self.horizontalLayout = QHBoxLayout() self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout") self.horizontalLayout.setObjectName(u"horizontalLayout")
self.label_2 = QLabel(self.groupBox_2) self.label_2 = QLabel(self.groupBox_2)
@ -110,13 +122,23 @@ class Ui_MainWindow_cut_PSG(object):
self.verticalLayout_5.addLayout(self.horizontalLayout_6) self.verticalLayout_5.addLayout(self.horizontalLayout_6)
self.horizontalLayout_7 = QHBoxLayout() self.gridLayout_3 = QGridLayout()
self.horizontalLayout_7.setObjectName(u"horizontalLayout_7") self.gridLayout_3.setObjectName(u"gridLayout_3")
self.label_7 = QLabel(self.groupBox_2) self.label = QLabel(self.groupBox_2)
self.label_7.setObjectName(u"label_7") self.label.setObjectName(u"label")
self.label_7.setFont(font) self.label.setEnabled(False)
self.label.setFont(font)
self.horizontalLayout_7.addWidget(self.label_7) self.gridLayout_3.addWidget(self.label, 1, 0, 1, 1)
self.spinBox = QSpinBox(self.groupBox_2)
self.spinBox.setObjectName(u"spinBox")
self.spinBox.setEnabled(False)
self.spinBox.setFont(font)
self.spinBox.setMinimum(1)
self.spinBox.setMaximum(1000000)
self.gridLayout_3.addWidget(self.spinBox, 1, 1, 1, 1)
self.spinBox_ECGFreq = QSpinBox(self.groupBox_2) self.spinBox_ECGFreq = QSpinBox(self.groupBox_2)
self.spinBox_ECGFreq.setObjectName(u"spinBox_ECGFreq") self.spinBox_ECGFreq.setObjectName(u"spinBox_ECGFreq")
@ -124,12 +146,30 @@ class Ui_MainWindow_cut_PSG(object):
self.spinBox_ECGFreq.setMinimum(1) self.spinBox_ECGFreq.setMinimum(1)
self.spinBox_ECGFreq.setMaximum(1000000) self.spinBox_ECGFreq.setMaximum(1000000)
self.horizontalLayout_7.addWidget(self.spinBox_ECGFreq) self.gridLayout_3.addWidget(self.spinBox_ECGFreq, 0, 1, 1, 1)
self.horizontalLayout_7.setStretch(0, 1) self.label_7 = QLabel(self.groupBox_2)
self.horizontalLayout_7.setStretch(1, 1) self.label_7.setObjectName(u"label_7")
self.label_7.setFont(font)
self.verticalLayout_5.addLayout(self.horizontalLayout_7) self.gridLayout_3.addWidget(self.label_7, 0, 0, 1, 1)
self.label_3 = QLabel(self.groupBox_2)
self.label_3.setObjectName(u"label_3")
self.label_3.setFont(font2)
self.gridLayout_3.addWidget(self.label_3, 2, 0, 1, 1)
self.spinBox_OrgBCGShift = QSpinBox(self.groupBox_2)
self.spinBox_OrgBCGShift.setObjectName(u"spinBox_OrgBCGShift")
self.spinBox_OrgBCGShift.setFont(font)
self.spinBox_OrgBCGShift.setMinimum(-10000000)
self.spinBox_OrgBCGShift.setMaximum(10000000)
self.gridLayout_3.addWidget(self.spinBox_OrgBCGShift, 2, 1, 1, 1)
self.verticalLayout_5.addLayout(self.gridLayout_3)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding) self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
@ -159,15 +199,28 @@ class Ui_MainWindow_cut_PSG(object):
self.verticalLayout_5.addWidget(self.progressbar) self.verticalLayout_5.addWidget(self.progressbar)
self.verticalLayout_5.setStretch(0, 2) self.verticalLayout_5.setStretch(0, 1)
self.verticalLayout_5.setStretch(1, 2) self.verticalLayout_5.setStretch(1, 2)
self.verticalLayout_5.setStretch(2, 1) self.verticalLayout_5.setStretch(2, 2)
self.verticalLayout_5.setStretch(3, 2) self.verticalLayout_5.setStretch(3, 1)
self.verticalLayout_5.setStretch(4, 1) self.verticalLayout_5.setStretch(4, 2)
self.verticalLayout_5.setStretch(5, 1) self.verticalLayout_5.setStretch(5, 1)
self.verticalLayout_5.setStretch(6, 1)
self.gridLayout_2.addWidget(self.groupBox_2, 0, 0, 1, 2) self.gridLayout_2.addWidget(self.groupBox_2, 0, 0, 1, 2)
self.groupBox = QGroupBox(self.groupBox_3)
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.gridLayout_2.addWidget(self.groupBox, 1, 0, 1, 1)
self.pushButton_execute = QPushButton(self.groupBox_3) self.pushButton_execute = QPushButton(self.groupBox_3)
self.pushButton_execute.setObjectName(u"pushButton_execute") self.pushButton_execute.setObjectName(u"pushButton_execute")
sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred) sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
@ -180,34 +233,37 @@ class Ui_MainWindow_cut_PSG(object):
self.gridLayout_2.addWidget(self.pushButton_execute, 1, 1, 1, 1) self.gridLayout_2.addWidget(self.pushButton_execute, 1, 1, 1, 1)
self.gridLayout_2.setRowStretch(0, 7) self.gridLayout_2.setRowStretch(0, 7)
self.gridLayout_2.setRowStretch(1, 3)
self.gridLayout_2.setColumnStretch(0, 4) self.gridLayout_2.setColumnStretch(0, 4)
self.gridLayout_2.setColumnStretch(1, 1)
self.gridLayout.addWidget(self.groupBox_3, 0, 0, 1, 1) self.gridLayout.addWidget(self.groupBox_3, 0, 0, 1, 1)
self.gridLayout.setColumnStretch(0, 2) self.gridLayout.setColumnStretch(0, 2)
MainWindow_cut_PSG.setCentralWidget(self.centralwidget) MainWindow_cut_PAIR_FILE.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_cut_PSG) self.statusbar = QStatusBar(MainWindow_cut_PAIR_FILE)
self.statusbar.setObjectName(u"statusbar") self.statusbar.setObjectName(u"statusbar")
MainWindow_cut_PSG.setStatusBar(self.statusbar) MainWindow_cut_PAIR_FILE.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_cut_PSG) self.retranslateUi(MainWindow_cut_PAIR_FILE)
QMetaObject.connectSlotsByName(MainWindow_cut_PSG) QMetaObject.connectSlotsByName(MainWindow_cut_PAIR_FILE)
# setupUi # setupUi
def retranslateUi(self, MainWindow_cut_PSG): def retranslateUi(self, MainWindow_cut_PAIR_FILE):
MainWindow_cut_PSG.setWindowTitle(QCoreApplication.translate("MainWindow_cut_PSG", u"\u5197\u4f59\u6570\u636e\u5207\u5272\u548c\u6807\u7b7e\u6620\u5c04", None)) MainWindow_cut_PAIR_FILE.setWindowTitle(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u5197\u4f59\u6570\u636e\u5207\u5272\u548c\u6807\u7b7e\u6620\u5c04", None))
self.action_selectPath.setText(QCoreApplication.translate("MainWindow_cut_PSG", u"\u6570\u636e\u8def\u5f84\u9009\u62e9", None)) self.action_selectPath.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u6570\u636e\u8def\u5f84\u9009\u62e9", None))
self.action.setText(QCoreApplication.translate("MainWindow_cut_PSG", u"\u52a0\u8f7d\u5b58\u6863", None)) self.action.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u52a0\u8f7d\u5b58\u6863", None))
self.groupBox_3.setTitle(QCoreApplication.translate("MainWindow_cut_PSG", u"\u5197\u4f59\u6570\u636e\u5207\u5272\u548c\u6807\u7b7e\u6620\u5c04", None)) self.groupBox_3.setTitle(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u5197\u4f59\u6570\u636e\u5207\u5272\u548c\u6807\u7b7e\u6620\u5c04", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_cut_PSG", u"\u65e5\u5fd7", None)) self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u786e\u5b9a\u6570\u636e", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_cut_PSG", u"\u786e\u5b9a\u6570\u636e", None)) self.checkBox_roughCut.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u7c97\u5bf9\u9f50\u7ed3\u679c\u5207\u5272\u6a21\u5f0f", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_cut_PSG", u"\u9700\u8981\u5207\u5272\u7684\u901a\u9053\u540d\uff1a", None)) self.checkBox_roughResample.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u7c97\u5bf9\u9f50\u91cd\u91c7\u6837", None))
self.label_6.setText(QCoreApplication.translate("MainWindow_cut_PSG", u"\u9700\u8981\u6620\u5c04\u7684\u6807\u7b7e\uff1a", None)) self.pushButton_deleteRoughCut.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u5220\u9664\u7c97\u5bf9\u9f50\u5207\u5272\u6587\u4ef6", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_cut_PSG", u"\u6570\u636e\u7cbe\u540c\u6b65\u65f6ECG\u7684\u91c7\u6837\u7387\uff1a", None)) self.label_2.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u9700\u8981\u5207\u5272\u7684\u901a\u9053\u540d\uff1a", None))
self.label_show.setText(QCoreApplication.translate("MainWindow_cut_PSG", u"\u70b9\u51fb\u6267\u884c\u4ee5\u5f00\u59cb...", None)) self.label_6.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u9700\u8981\u6620\u5c04\u7684\u6807\u7b7e\uff1a", None))
self.pushButton_execute.setText(QCoreApplication.translate("MainWindow_cut_PSG", u"\u6267\u884c", None)) self.label.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"BCG\u539f\u59cb\u91c7\u6837\u7387\uff1a", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u6570\u636e\u7cbe\u540c\u6b65\u65f6ECG\u7684\u91c7\u6837\u7387\uff1a", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u7c97\u5bf9\u9f50\u5fae\u8c03\u79d2\u6570(-\uff1a\u538b\u7535\u5de6\u79fb +\uff1a\u538b\u7535\u53f3\u79fb)", None))
self.label_show.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u70b9\u51fb\u6267\u884c\u4ee5\u5f00\u59cb...", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u65e5\u5fd7", None))
self.pushButton_execute.setText(QCoreApplication.translate("MainWindow_cut_PAIR_FILE", u"\u6267\u884c", None))
# retranslateUi # retranslateUi

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>MainWindow_cut_PSG</class> <class>MainWindow_cut_PAIR_FILE</class>
<widget class="QMainWindow" name="MainWindow_cut_PSG"> <widget class="QMainWindow" name="MainWindow_cut_PAIR_FILE">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -9,8 +9,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>540</width> <width>548</width>
<height>720</height> <height>739</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -39,25 +39,53 @@
<property name="title"> <property name="title">
<string>冗余数据切割和标签映射</string> <string>冗余数据切割和标签映射</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2" rowstretch="7,3" columnstretch="4,1"> <layout class="QGridLayout" name="gridLayout_2" rowstretch="7,0" columnstretch="4,0">
<item row="1" column="0">
<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>
<item row="0" column="0" colspan="2"> <item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="groupBox_2">
<property name="title"> <property name="title">
<string>确定数据</string> <string>确定数据</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="2,2,1,2,1,1"> <layout class="QVBoxLayout" name="verticalLayout_5" stretch="1,2,2,1,2,1,1">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="checkBox_roughCut">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>粗对齐结果切割模式</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_roughResample">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>粗对齐重采样</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_deleteRoughCut">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>删除粗对齐切割文件</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1"> <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1">
<item> <item>
@ -108,20 +136,41 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_7" stretch="1,1"> <layout class="QGridLayout" name="gridLayout_3">
<item> <item row="1" column="0">
<widget class="QLabel" name="label_7"> <widget class="QLabel" name="label">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>12</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>数据精同步时ECG的采样率:</string> <string>BCG原始采样率:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="1">
<widget class="QSpinBox" name="spinBox">
<property name="enabled">
<bool>false</bool>
</property>
<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>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBox_ECGFreq"> <widget class="QSpinBox" name="spinBox_ECGFreq">
<property name="font"> <property name="font">
<font> <font>
@ -136,6 +185,45 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0">
<widget class="QLabel" name="label_7">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>数据精同步时ECG的采样率</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>粗对齐微调秒数(-:压电左移 +:压电右移)</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="spinBox_OrgBCGShift">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>-10000000</number>
</property>
<property name="maximum">
<number>10000000</number>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item> <item>
@ -189,6 +277,18 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<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>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QPushButton" name="pushButton_execute"> <widget class="QPushButton" name="pushButton_execute">
<property name="sizePolicy"> <property name="sizePolicy">

View File

@ -3,7 +3,7 @@
################################################################################ ################################################################################
## Form generated from reading UI file 'MainWindow_detect_Jpeak.ui' ## Form generated from reading UI file 'MainWindow_detect_Jpeak.ui'
## ##
## Created by: Qt User Interface Compiler version 6.8.2 ## Created by: Qt User Interface Compiler version 6.9.2
## ##
## WARNING! All changes made in this file will be lost when recompiling UI file! ## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################ ################################################################################
@ -16,11 +16,11 @@ from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient,
QIcon, QImage, QKeySequence, QLinearGradient, QIcon, QImage, QKeySequence, QLinearGradient,
QPainter, QPalette, QPixmap, QRadialGradient, QPainter, QPalette, QPixmap, QRadialGradient,
QTransform) QTransform)
from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QDoubleSpinBox, from PySide6.QtWidgets import (QAbstractSpinBox, QApplication, QCheckBox, QComboBox,
QGridLayout, QGroupBox, QHBoxLayout, QLabel, QDoubleSpinBox, QGridLayout, QGroupBox, QHBoxLayout,
QMainWindow, QPushButton, QSizePolicy, QSpacerItem, QLabel, QMainWindow, QPushButton, QRadioButton,
QSpinBox, QStatusBar, QTextBrowser, QVBoxLayout, QSizePolicy, QSpinBox, QStatusBar, QTextBrowser,
QWidget) QVBoxLayout, QWidget)
class Ui_MainWindow_detect_Jpeak(object): class Ui_MainWindow_detect_Jpeak(object):
def setupUi(self, MainWindow_detect_Jpeak): def setupUi(self, MainWindow_detect_Jpeak):
@ -99,34 +99,47 @@ class Ui_MainWindow_detect_Jpeak(object):
self.verticalLayout_5.setObjectName(u"verticalLayout_5") self.verticalLayout_5.setObjectName(u"verticalLayout_5")
self.groupBox_2 = QGroupBox(self.groupBox_args) self.groupBox_2 = QGroupBox(self.groupBox_args)
self.groupBox_2.setObjectName(u"groupBox_2") self.groupBox_2.setObjectName(u"groupBox_2")
self.horizontalLayout_5 = QHBoxLayout(self.groupBox_2) self.gridLayout_2 = QGridLayout(self.groupBox_2)
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5") self.gridLayout_2.setObjectName(u"gridLayout_2")
self.label = QLabel(self.groupBox_2) self.label = QLabel(self.groupBox_2)
self.label.setObjectName(u"label") self.label.setObjectName(u"label")
self.label.setFont(font) self.label.setFont(font)
self.horizontalLayout_5.addWidget(self.label) self.gridLayout_2.addWidget(self.label, 2, 0, 1, 1)
self.doubleSpinBox_bandPassLow = QDoubleSpinBox(self.groupBox_2)
self.doubleSpinBox_bandPassLow.setObjectName(u"doubleSpinBox_bandPassLow")
self.doubleSpinBox_bandPassLow.setFont(font)
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(font)
self.label_5.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.horizontalLayout_5.addWidget(self.label_5)
self.doubleSpinBox_bandPassHigh = QDoubleSpinBox(self.groupBox_2) self.doubleSpinBox_bandPassHigh = QDoubleSpinBox(self.groupBox_2)
self.doubleSpinBox_bandPassHigh.setObjectName(u"doubleSpinBox_bandPassHigh") self.doubleSpinBox_bandPassHigh.setObjectName(u"doubleSpinBox_bandPassHigh")
self.doubleSpinBox_bandPassHigh.setFont(font) self.doubleSpinBox_bandPassHigh.setFont(font)
self.doubleSpinBox_bandPassHigh.setMaximum(100.000000000000000) self.doubleSpinBox_bandPassHigh.setMaximum(100.000000000000000)
self.horizontalLayout_5.addWidget(self.doubleSpinBox_bandPassHigh) self.gridLayout_2.addWidget(self.doubleSpinBox_bandPassHigh, 2, 3, 1, 1)
self.label_5 = QLabel(self.groupBox_2)
self.label_5.setObjectName(u"label_5")
self.label_5.setFont(font)
self.label_5.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_2.addWidget(self.label_5, 2, 2, 1, 1)
self.radioButton_skip_process = QRadioButton(self.groupBox_2)
self.radioButton_skip_process.setObjectName(u"radioButton_skip_process")
self.radioButton_skip_process.setFont(font)
self.radioButton_skip_process.setChecked(True)
self.gridLayout_2.addWidget(self.radioButton_skip_process, 0, 0, 1, 1)
self.doubleSpinBox_bandPassLow = QDoubleSpinBox(self.groupBox_2)
self.doubleSpinBox_bandPassLow.setObjectName(u"doubleSpinBox_bandPassLow")
self.doubleSpinBox_bandPassLow.setFont(font)
self.doubleSpinBox_bandPassLow.setMaximum(100.000000000000000)
self.gridLayout_2.addWidget(self.doubleSpinBox_bandPassLow, 2, 1, 1, 1)
self.radioButton_bandpass_process = QRadioButton(self.groupBox_2)
self.radioButton_bandpass_process.setObjectName(u"radioButton_bandpass_process")
self.radioButton_bandpass_process.setFont(font)
self.gridLayout_2.addWidget(self.radioButton_bandpass_process, 1, 0, 1, 1)
self.verticalLayout_5.addWidget(self.groupBox_2) self.verticalLayout_5.addWidget(self.groupBox_2)
@ -208,26 +221,77 @@ class Ui_MainWindow_detect_Jpeak(object):
self.groupBox_3 = QGroupBox(self.groupBox_args) self.groupBox_3 = QGroupBox(self.groupBox_args)
self.groupBox_3.setObjectName(u"groupBox_3") self.groupBox_3.setObjectName(u"groupBox_3")
self.verticalLayout_2 = QVBoxLayout(self.groupBox_3) self.gridLayout_3 = QGridLayout(self.groupBox_3)
self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.gridLayout_3.setObjectName(u"gridLayout_3")
self.spinBox_scaleValue = QSpinBox(self.groupBox_3)
self.spinBox_scaleValue.setObjectName(u"spinBox_scaleValue")
self.spinBox_scaleValue.setFont(font)
self.spinBox_scaleValue.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_scaleValue.setMinimum(10)
self.spinBox_scaleValue.setMaximum(1000)
self.spinBox_scaleValue.setValue(100)
self.gridLayout_3.addWidget(self.spinBox_scaleValue, 1, 1, 1, 1)
self.checkBox_useCPU = QCheckBox(self.groupBox_3) self.checkBox_useCPU = QCheckBox(self.groupBox_3)
self.checkBox_useCPU.setObjectName(u"checkBox_useCPU") self.checkBox_useCPU.setObjectName(u"checkBox_useCPU")
self.checkBox_useCPU.setFont(font) self.checkBox_useCPU.setFont(font)
self.verticalLayout_2.addWidget(self.checkBox_useCPU) self.gridLayout_3.addWidget(self.checkBox_useCPU, 0, 0, 1, 1)
self.label_7 = QLabel(self.groupBox_3)
self.label_7.setObjectName(u"label_7")
self.label_7.setFont(font)
self.label_7.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.verticalLayout_2.addWidget(self.label_7)
self.comboBox_model = QComboBox(self.groupBox_3) self.comboBox_model = QComboBox(self.groupBox_3)
self.comboBox_model.setObjectName(u"comboBox_model") self.comboBox_model.setObjectName(u"comboBox_model")
sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(0)
sizePolicy2.setHeightForWidth(self.comboBox_model.sizePolicy().hasHeightForWidth())
self.comboBox_model.setSizePolicy(sizePolicy2)
self.comboBox_model.setFont(font) self.comboBox_model.setFont(font)
self.verticalLayout_2.addWidget(self.comboBox_model) self.gridLayout_3.addWidget(self.comboBox_model, 4, 1, 1, 1)
self.checkBox_scaleEnable = QCheckBox(self.groupBox_3)
self.checkBox_scaleEnable.setObjectName(u"checkBox_scaleEnable")
self.checkBox_scaleEnable.setFont(font)
self.gridLayout_3.addWidget(self.checkBox_scaleEnable, 1, 0, 1, 1)
self.label_8 = QLabel(self.groupBox_3)
self.label_8.setObjectName(u"label_8")
sizePolicy3 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
sizePolicy3.setHorizontalStretch(0)
sizePolicy3.setVerticalStretch(0)
sizePolicy3.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth())
self.label_8.setSizePolicy(sizePolicy3)
self.label_8.setFont(font)
self.label_8.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_8, 2, 0, 1, 1)
self.comboBox_batchSize = QComboBox(self.groupBox_3)
self.comboBox_batchSize.addItem("")
self.comboBox_batchSize.addItem("")
self.comboBox_batchSize.addItem("")
self.comboBox_batchSize.addItem("")
self.comboBox_batchSize.addItem("")
self.comboBox_batchSize.addItem("")
self.comboBox_batchSize.addItem("")
self.comboBox_batchSize.setObjectName(u"comboBox_batchSize")
self.comboBox_batchSize.setFont(font)
self.gridLayout_3.addWidget(self.comboBox_batchSize, 2, 1, 1, 1)
self.label_7 = QLabel(self.groupBox_3)
self.label_7.setObjectName(u"label_7")
sizePolicy4 = QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Preferred)
sizePolicy4.setHorizontalStretch(0)
sizePolicy4.setVerticalStretch(0)
sizePolicy4.setHeightForWidth(self.label_7.sizePolicy().hasHeightForWidth())
self.label_7.setSizePolicy(sizePolicy4)
self.label_7.setFont(font)
self.label_7.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_7, 4, 0, 1, 1)
self.verticalLayout_5.addWidget(self.groupBox_3) self.verticalLayout_5.addWidget(self.groupBox_3)
@ -240,10 +304,6 @@ class Ui_MainWindow_detect_Jpeak(object):
self.verticalLayout.addWidget(self.groupBox_args) 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 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.pushButton_view = QPushButton(self.groupBox_left) self.pushButton_view = QPushButton(self.groupBox_left)
@ -279,9 +339,8 @@ class Ui_MainWindow_detect_Jpeak(object):
self.verticalLayout.setStretch(0, 1) self.verticalLayout.setStretch(0, 1)
self.verticalLayout.setStretch(1, 7) self.verticalLayout.setStretch(1, 7)
self.verticalLayout.setStretch(2, 4) self.verticalLayout.setStretch(2, 1)
self.verticalLayout.setStretch(3, 1) self.verticalLayout.setStretch(3, 5)
self.verticalLayout.setStretch(4, 5)
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1) self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
@ -309,13 +368,25 @@ class Ui_MainWindow_detect_Jpeak(object):
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_detect_Jpeak", u"BCG\u7684\u5e26\u901a\u6ee4\u6ce2", None)) self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_detect_Jpeak", u"BCG\u7684\u5e26\u901a\u6ee4\u6ce2", None))
self.label.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u622a\u6b62\u9891\u7387(Hz)\uff1a", None)) self.label.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u622a\u6b62\u9891\u7387(Hz)\uff1a", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"~", None)) self.label_5.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"~", None))
self.radioButton_skip_process.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u4e0d\u6ee4\u6ce2", None))
self.radioButton_bandpass_process.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u5e26\u901a\u6ee4\u6ce2", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u5bfb\u5cf0\u9608\u503c(\u4e2a)", None)) self.label_2.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u5bfb\u5cf0\u9608\u503c(\u4e2a)", None))
self.label_6.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u4fe1\u53f7\u5e45\u503c\u8c03\u6574\u53c2\u6570", None)) self.label_6.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u4fe1\u53f7\u5e45\u503c\u8c03\u6574\u53c2\u6570", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u95f4\u671f\u4e0b\u4e0a\u9650\u9608\u503c", None)) self.label_3.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u95f4\u671f\u4e0b\u4e0a\u9650\u9608\u503c", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"~", None)) self.label_4.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"~", None))
self.groupBox_3.setTitle(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u6a21\u578b\u8bbe\u7f6e", None)) self.groupBox_3.setTitle(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u6a21\u578b\u8bbe\u7f6e", None))
self.checkBox_useCPU.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u5f3a\u5236\u4f7f\u7528CPU", None)) self.checkBox_useCPU.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u5f3a\u5236\u4f7f\u7528CPU", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u68c0\u6d4b\u6a21\u578b\u9009\u62e9", None)) self.checkBox_scaleEnable.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u5b9a\u4f4d\u65f6\u5e45\u503c\u653e\u7f29", None))
self.label_8.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"Batch Size:", None))
self.comboBox_batchSize.setItemText(0, QCoreApplication.translate("MainWindow_detect_Jpeak", u"0", None))
self.comboBox_batchSize.setItemText(1, QCoreApplication.translate("MainWindow_detect_Jpeak", u"64", None))
self.comboBox_batchSize.setItemText(2, QCoreApplication.translate("MainWindow_detect_Jpeak", u"128", None))
self.comboBox_batchSize.setItemText(3, QCoreApplication.translate("MainWindow_detect_Jpeak", u"256", None))
self.comboBox_batchSize.setItemText(4, QCoreApplication.translate("MainWindow_detect_Jpeak", u"512", None))
self.comboBox_batchSize.setItemText(5, QCoreApplication.translate("MainWindow_detect_Jpeak", u"1024", None))
self.comboBox_batchSize.setItemText(6, QCoreApplication.translate("MainWindow_detect_Jpeak", u"2048", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u68c0\u6d4b\u6a21\u578b\u9009\u62e9\uff1a", None))
self.pushButton_view.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u67e5\u770b\u7ed3\u679c", None)) self.pushButton_view.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u67e5\u770b\u7ed3\u679c", None))
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u4fdd\u5b58\u7ed3\u679c", None)) self.pushButton_save.setText(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u4fdd\u5b58\u7ed3\u679c", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u65e5\u5fd7", None)) self.groupBox.setTitle(QCoreApplication.translate("MainWindow_detect_Jpeak", u"\u65e5\u5fd7", None))

View File

@ -56,7 +56,7 @@
<property name="title"> <property name="title">
<string>BCG的J峰算法定位</string> <string>BCG的J峰算法定位</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,7,4,1,5"> <layout class="QVBoxLayout" name="verticalLayout" stretch="1,7,1,5">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
@ -108,8 +108,8 @@
<property name="title"> <property name="title">
<string>BCG的带通滤波</string> <string>BCG的带通滤波</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QGridLayout" name="gridLayout_2">
<item> <item row="2" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
@ -121,8 +121,8 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="3">
<widget class="QDoubleSpinBox" name="doubleSpinBox_bandPassLow"> <widget class="QDoubleSpinBox" name="doubleSpinBox_bandPassHigh">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>12</pointsize>
@ -133,7 +133,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="2">
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_5">
<property name="font"> <property name="font">
<font> <font>
@ -148,8 +148,23 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_bandPassHigh"> <widget class="QRadioButton" name="radioButton_skip_process">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>不滤波</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_bandPassLow">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>12</pointsize>
@ -160,6 +175,18 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButton_bandpass_process">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>带通滤波</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -294,8 +321,29 @@
<property name="title"> <property name="title">
<string>模型设置</string> <string>模型设置</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QGridLayout" name="gridLayout_3">
<item> <item row="1" column="1">
<widget class="QSpinBox" name="spinBox_scaleValue">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property>
<property name="minimum">
<number>10</number>
</property>
<property name="maximum">
<number>1000</number>
</property>
<property name="value">
<number>100</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="checkBox_useCPU"> <widget class="QCheckBox" name="checkBox_useCPU">
<property name="font"> <property name="font">
<font> <font>
@ -307,28 +355,117 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="4" column="1">
<widget class="QLabel" name="label_7"> <widget class="QComboBox" name="comboBox_model">
<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>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="checkBox_scaleEnable">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>12</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>检测模型选择</string> <string>定位时幅值放缩</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Batch Size:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set> <set>Qt::AlignmentFlag::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="1">
<widget class="QComboBox" name="comboBox_model"> <widget class="QComboBox" name="comboBox_batchSize">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>12</pointsize>
</font> </font>
</property> </property>
<item>
<property name="text">
<string>0</string>
</property>
</item>
<item>
<property name="text">
<string>64</string>
</property>
</item>
<item>
<property name="text">
<string>128</string>
</property>
</item>
<item>
<property name="text">
<string>256</string>
</property>
</item>
<item>
<property name="text">
<string>512</string>
</property>
</item>
<item>
<property name="text">
<string>1024</string>
</property>
</item>
<item>
<property name="text">
<string>2048</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<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> </widget>
</item> </item>
</layout> </layout>
@ -337,19 +474,6 @@
</layout> </layout>
</widget> </widget>
</item> </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> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>

View File

@ -17,8 +17,9 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QPalette, QPixmap, QRadialGradient, QTransform) QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QComboBox, QDoubleSpinBox, QGridLayout, from PySide6.QtWidgets import (QApplication, QComboBox, QDoubleSpinBox, QGridLayout,
QGroupBox, QHBoxLayout, QLabel, QMainWindow, QGroupBox, QHBoxLayout, QLabel, QMainWindow,
QPushButton, QSizePolicy, QSpacerItem, QSpinBox, QPushButton, QRadioButton, QSizePolicy, QSpacerItem,
QStatusBar, QTextBrowser, QVBoxLayout, QWidget) QSpinBox, QStatusBar, QTextBrowser, QVBoxLayout,
QWidget)
class Ui_MainWindow_detect_Rpeak(object): class Ui_MainWindow_detect_Rpeak(object):
def setupUi(self, MainWindow_detect_Rpeak): def setupUi(self, MainWindow_detect_Rpeak):
@ -68,34 +69,47 @@ class Ui_MainWindow_detect_Rpeak(object):
self.verticalLayout_5.setObjectName(u"verticalLayout_5") self.verticalLayout_5.setObjectName(u"verticalLayout_5")
self.groupBox_2 = QGroupBox(self.groupBox_args) self.groupBox_2 = QGroupBox(self.groupBox_args)
self.groupBox_2.setObjectName(u"groupBox_2") self.groupBox_2.setObjectName(u"groupBox_2")
self.horizontalLayout_5 = QHBoxLayout(self.groupBox_2) self.gridLayout_2 = QGridLayout(self.groupBox_2)
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5") self.gridLayout_2.setObjectName(u"gridLayout_2")
self.label = QLabel(self.groupBox_2) self.label = QLabel(self.groupBox_2)
self.label.setObjectName(u"label") self.label.setObjectName(u"label")
self.label.setFont(font1) self.label.setFont(font1)
self.horizontalLayout_5.addWidget(self.label) self.gridLayout_2.addWidget(self.label, 2, 0, 1, 1)
self.doubleSpinBox_bandPassLow = QDoubleSpinBox(self.groupBox_2) self.doubleSpinBox_bandPassLow = QDoubleSpinBox(self.groupBox_2)
self.doubleSpinBox_bandPassLow.setObjectName(u"doubleSpinBox_bandPassLow") self.doubleSpinBox_bandPassLow.setObjectName(u"doubleSpinBox_bandPassLow")
self.doubleSpinBox_bandPassLow.setFont(font1) self.doubleSpinBox_bandPassLow.setFont(font1)
self.doubleSpinBox_bandPassLow.setMaximum(100.000000000000000) self.doubleSpinBox_bandPassLow.setMaximum(100.000000000000000)
self.horizontalLayout_5.addWidget(self.doubleSpinBox_bandPassLow) self.gridLayout_2.addWidget(self.doubleSpinBox_bandPassLow, 2, 1, 1, 1)
self.label_5 = QLabel(self.groupBox_2) self.label_5 = QLabel(self.groupBox_2)
self.label_5.setObjectName(u"label_5") self.label_5.setObjectName(u"label_5")
self.label_5.setFont(font1) self.label_5.setFont(font1)
self.label_5.setAlignment(Qt.AlignmentFlag.AlignCenter) self.label_5.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.horizontalLayout_5.addWidget(self.label_5) self.gridLayout_2.addWidget(self.label_5, 2, 2, 1, 1)
self.radioButton_skip_process = QRadioButton(self.groupBox_2)
self.radioButton_skip_process.setObjectName(u"radioButton_skip_process")
self.radioButton_skip_process.setFont(font1)
self.radioButton_skip_process.setChecked(True)
self.gridLayout_2.addWidget(self.radioButton_skip_process, 0, 0, 1, 1)
self.doubleSpinBox_bandPassHigh = QDoubleSpinBox(self.groupBox_2) self.doubleSpinBox_bandPassHigh = QDoubleSpinBox(self.groupBox_2)
self.doubleSpinBox_bandPassHigh.setObjectName(u"doubleSpinBox_bandPassHigh") self.doubleSpinBox_bandPassHigh.setObjectName(u"doubleSpinBox_bandPassHigh")
self.doubleSpinBox_bandPassHigh.setFont(font1) self.doubleSpinBox_bandPassHigh.setFont(font1)
self.doubleSpinBox_bandPassHigh.setMaximum(100.000000000000000) self.doubleSpinBox_bandPassHigh.setMaximum(100.000000000000000)
self.horizontalLayout_5.addWidget(self.doubleSpinBox_bandPassHigh) self.gridLayout_2.addWidget(self.doubleSpinBox_bandPassHigh, 2, 3, 1, 1)
self.radioButton_bandpass_process = QRadioButton(self.groupBox_2)
self.radioButton_bandpass_process.setObjectName(u"radioButton_bandpass_process")
self.radioButton_bandpass_process.setFont(font1)
self.gridLayout_2.addWidget(self.radioButton_bandpass_process, 1, 0, 1, 1)
self.verticalLayout_5.addWidget(self.groupBox_2) self.verticalLayout_5.addWidget(self.groupBox_2)
@ -227,6 +241,8 @@ class Ui_MainWindow_detect_Rpeak(object):
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_detect_Rpeak", u"ECG\u7684\u5e26\u901a\u6ee4\u6ce2", 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.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_5.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"~", None))
self.radioButton_skip_process.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u4e0d\u6ee4\u6ce2", None))
self.radioButton_bandpass_process.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u5e26\u901a\u6ee4\u6ce2", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u5bfb\u5cf0\u9608\u503c(\u4e2a)", 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.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.label_7.setText(QCoreApplication.translate("MainWindow_detect_Rpeak", u"\u68c0\u6d4b\u65b9\u6cd5\u9009\u62e9", None))

View File

@ -77,8 +77,8 @@
<property name="title"> <property name="title">
<string>ECG的带通滤波</string> <string>ECG的带通滤波</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QGridLayout" name="gridLayout_2">
<item> <item row="2" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
@ -90,7 +90,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_bandPassLow"> <widget class="QDoubleSpinBox" name="doubleSpinBox_bandPassLow">
<property name="font"> <property name="font">
<font> <font>
@ -102,7 +102,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="2">
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_5">
<property name="font"> <property name="font">
<font> <font>
@ -117,7 +117,22 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="0">
<widget class="QRadioButton" name="radioButton_skip_process">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>不滤波</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QDoubleSpinBox" name="doubleSpinBox_bandPassHigh"> <widget class="QDoubleSpinBox" name="doubleSpinBox_bandPassHigh">
<property name="font"> <property name="font">
<font> <font>
@ -129,6 +144,18 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButton_bandpass_process">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>带通滤波</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -3,7 +3,7 @@
################################################################################ ################################################################################
## Form generated from reading UI file 'MainWindow_label_check.ui' ## Form generated from reading UI file 'MainWindow_label_check.ui'
## ##
## Created by: Qt User Interface Compiler version 6.8.2 ## Created by: Qt User Interface Compiler version 6.9.2
## ##
## WARNING! All changes made in this file will be lost when recompiling UI file! ## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################ ################################################################################
@ -156,6 +156,14 @@ class Ui_MainWindow_label_check(object):
self.horizontalLayout_2.addWidget(self.pushButton_pause) self.horizontalLayout_2.addWidget(self.pushButton_pause)
self.pushButton_update_state = QPushButton(self.groupBox_2)
self.pushButton_update_state.setObjectName(u"pushButton_update_state")
sizePolicy.setHeightForWidth(self.pushButton_update_state.sizePolicy().hasHeightForWidth())
self.pushButton_update_state.setSizePolicy(sizePolicy)
self.pushButton_update_state.setFont(font1)
self.horizontalLayout_2.addWidget(self.pushButton_update_state)
self.pushButton_next_move = QPushButton(self.groupBox_2) self.pushButton_next_move = QPushButton(self.groupBox_2)
self.pushButton_next_move.setObjectName(u"pushButton_next_move") self.pushButton_next_move.setObjectName(u"pushButton_next_move")
sizePolicy.setHeightForWidth(self.pushButton_next_move.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.pushButton_next_move.sizePolicy().hasHeightForWidth())
@ -505,6 +513,13 @@ class Ui_MainWindow_label_check(object):
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u81ea\u52a8\u64ad\u653e", None)) self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u81ea\u52a8\u64ad\u653e", None))
self.pushButton_prev_move.setText(QCoreApplication.translate("MainWindow_label_check", u"< <(A)", None)) self.pushButton_prev_move.setText(QCoreApplication.translate("MainWindow_label_check", u"< <(A)", None))
self.pushButton_pause.setText(QCoreApplication.translate("MainWindow_label_check", u"| |(S)", None)) self.pushButton_pause.setText(QCoreApplication.translate("MainWindow_label_check", u"| |(S)", None))
#if QT_CONFIG(tooltip)
self.pushButton_update_state.setToolTip(QCoreApplication.translate("MainWindow_label_check", u"\u6309\u4e0b\u540e\u6062\u590d\u4e0a\u6b21\u72b6\u6001", None))
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(whatsthis)
self.pushButton_update_state.setWhatsThis("")
#endif // QT_CONFIG(whatsthis)
self.pushButton_update_state.setText(QCoreApplication.translate("MainWindow_label_check", u"\u26aa( )", None))
self.pushButton_next_move.setText(QCoreApplication.translate("MainWindow_label_check", u"> >(D)", None)) self.pushButton_next_move.setText(QCoreApplication.translate("MainWindow_label_check", u"> >(D)", None))
self.groupBox_3.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u8bbe\u7f6e", None)) self.groupBox_3.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u8bbe\u7f6e", None))
self.label_moveLength_preset_1.setText(QCoreApplication.translate("MainWindow_label_check", u"10000", None)) self.label_moveLength_preset_1.setText(QCoreApplication.translate("MainWindow_label_check", u"10000", None))

View File

@ -237,6 +237,30 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QPushButton" name="pushButton_update_state">
<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="toolTip">
<string>按下后恢复上次状态</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>⚪( )</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QPushButton" name="pushButton_next_move"> <widget class="QPushButton" name="pushButton_next_move">
<property name="sizePolicy"> <property name="sizePolicy">

View File

@ -3,7 +3,7 @@
################################################################################ ################################################################################
## Form generated from reading UI file 'MainWindow_precisely_align.ui' ## Form generated from reading UI file 'MainWindow_precisely_align.ui'
## ##
## Created by: Qt User Interface Compiler version 6.7.0 ## Created by: Qt User Interface Compiler version 6.9.2
## ##
## WARNING! All changes made in this file will be lost when recompiling UI file! ## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################ ################################################################################
@ -27,7 +27,7 @@ class Ui_MainWindow_precisely_align(object):
if not MainWindow_precisely_align.objectName(): if not MainWindow_precisely_align.objectName():
MainWindow_precisely_align.setObjectName(u"MainWindow_precisely_align") MainWindow_precisely_align.setObjectName(u"MainWindow_precisely_align")
MainWindow_precisely_align.setEnabled(True) MainWindow_precisely_align.setEnabled(True)
MainWindow_precisely_align.resize(1920, 1080) MainWindow_precisely_align.resize(1912, 1061)
sizePolicy = QSizePolicy(QSizePolicy.Policy.Ignored, QSizePolicy.Policy.Preferred) sizePolicy = QSizePolicy(QSizePolicy.Policy.Ignored, QSizePolicy.Policy.Preferred)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
@ -69,6 +69,37 @@ class Ui_MainWindow_precisely_align(object):
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")
self.horizontalLayout_7 = QHBoxLayout()
self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
self.label_18 = QLabel(self.groupBox_left)
self.label_18.setObjectName(u"label_18")
self.label_18.setFont(font)
self.label_18.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter)
self.horizontalLayout_7.addWidget(self.label_18)
self.label_sampno = QLabel(self.groupBox_left)
self.label_sampno.setObjectName(u"label_sampno")
self.label_sampno.setFont(font)
self.horizontalLayout_7.addWidget(self.label_sampno)
self.label_20 = QLabel(self.groupBox_left)
self.label_20.setObjectName(u"label_20")
self.label_20.setFont(font)
self.label_20.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter)
self.horizontalLayout_7.addWidget(self.label_20)
self.label_pos = QLabel(self.groupBox_left)
self.label_pos.setObjectName(u"label_pos")
self.label_pos.setFont(font)
self.horizontalLayout_7.addWidget(self.label_pos)
self.verticalLayout.addLayout(self.horizontalLayout_7)
self.horizontalLayout_4 = QHBoxLayout() self.horizontalLayout_4 = QHBoxLayout()
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
self.pushButton_input_setting = QPushButton(self.groupBox_left) self.pushButton_input_setting = QPushButton(self.groupBox_left)
@ -138,7 +169,12 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_BCG_front_Signal_2 = QSpinBox(self.groupBox_2) self.spinBox_BCG_front_Signal_2 = QSpinBox(self.groupBox_2)
self.spinBox_BCG_front_Signal_2.setObjectName(u"spinBox_BCG_front_Signal_2") self.spinBox_BCG_front_Signal_2.setObjectName(u"spinBox_BCG_front_Signal_2")
self.spinBox_BCG_front_Signal_2.setEnabled(False) self.spinBox_BCG_front_Signal_2.setEnabled(False)
self.spinBox_BCG_front_Signal_2.setFont(font) sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(0)
sizePolicy2.setHeightForWidth(self.spinBox_BCG_front_Signal_2.sizePolicy().hasHeightForWidth())
self.spinBox_BCG_front_Signal_2.setSizePolicy(sizePolicy2)
self.spinBox_BCG_front_Signal_2.setFont(font2)
self.spinBox_BCG_front_Signal_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_BCG_front_Signal_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_BCG_front_Signal_2.setMinimum(0) self.spinBox_BCG_front_Signal_2.setMinimum(0)
self.spinBox_BCG_front_Signal_2.setMaximum(1000000000) self.spinBox_BCG_front_Signal_2.setMaximum(1000000000)
@ -147,7 +183,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_BCG_front_JJIV_1 = QSpinBox(self.groupBox_2) self.spinBox_BCG_front_JJIV_1 = QSpinBox(self.groupBox_2)
self.spinBox_BCG_front_JJIV_1.setObjectName(u"spinBox_BCG_front_JJIV_1") self.spinBox_BCG_front_JJIV_1.setObjectName(u"spinBox_BCG_front_JJIV_1")
self.spinBox_BCG_front_JJIV_1.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_BCG_front_JJIV_1.sizePolicy().hasHeightForWidth())
self.spinBox_BCG_front_JJIV_1.setSizePolicy(sizePolicy2)
self.spinBox_BCG_front_JJIV_1.setFont(font2)
self.spinBox_BCG_front_JJIV_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_BCG_front_JJIV_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_BCG_front_JJIV_1.setMinimum(0) self.spinBox_BCG_front_JJIV_1.setMinimum(0)
self.spinBox_BCG_front_JJIV_1.setMaximum(1000000000) self.spinBox_BCG_front_JJIV_1.setMaximum(1000000000)
@ -163,7 +201,12 @@ class Ui_MainWindow_precisely_align(object):
self.label_4 = QLabel(self.groupBox_2) self.label_4 = QLabel(self.groupBox_2)
self.label_4.setObjectName(u"label_4") self.label_4.setObjectName(u"label_4")
self.label_4.setFont(font) sizePolicy3 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Preferred)
sizePolicy3.setHorizontalStretch(0)
sizePolicy3.setVerticalStretch(0)
sizePolicy3.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
self.label_4.setSizePolicy(sizePolicy3)
self.label_4.setFont(font2)
self.label_4.setAlignment(Qt.AlignmentFlag.AlignCenter) self.label_4.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_2.addWidget(self.label_4, 0, 3, 1, 1) self.gridLayout_2.addWidget(self.label_4, 0, 3, 1, 1)
@ -171,7 +214,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_BCG_front_Signal_1 = QSpinBox(self.groupBox_2) self.spinBox_BCG_front_Signal_1 = QSpinBox(self.groupBox_2)
self.spinBox_BCG_front_Signal_1.setObjectName(u"spinBox_BCG_front_Signal_1") self.spinBox_BCG_front_Signal_1.setObjectName(u"spinBox_BCG_front_Signal_1")
self.spinBox_BCG_front_Signal_1.setEnabled(False) self.spinBox_BCG_front_Signal_1.setEnabled(False)
self.spinBox_BCG_front_Signal_1.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_BCG_front_Signal_1.sizePolicy().hasHeightForWidth())
self.spinBox_BCG_front_Signal_1.setSizePolicy(sizePolicy2)
self.spinBox_BCG_front_Signal_1.setFont(font2)
self.spinBox_BCG_front_Signal_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_BCG_front_Signal_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_BCG_front_Signal_1.setMinimum(0) self.spinBox_BCG_front_Signal_1.setMinimum(0)
self.spinBox_BCG_front_Signal_1.setMaximum(1000000000) self.spinBox_BCG_front_Signal_1.setMaximum(1000000000)
@ -180,7 +225,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_BCG_front_JJIV_2 = QSpinBox(self.groupBox_2) self.spinBox_BCG_front_JJIV_2 = QSpinBox(self.groupBox_2)
self.spinBox_BCG_front_JJIV_2.setObjectName(u"spinBox_BCG_front_JJIV_2") self.spinBox_BCG_front_JJIV_2.setObjectName(u"spinBox_BCG_front_JJIV_2")
self.spinBox_BCG_front_JJIV_2.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_BCG_front_JJIV_2.sizePolicy().hasHeightForWidth())
self.spinBox_BCG_front_JJIV_2.setSizePolicy(sizePolicy2)
self.spinBox_BCG_front_JJIV_2.setFont(font2)
self.spinBox_BCG_front_JJIV_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_BCG_front_JJIV_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_BCG_front_JJIV_2.setMinimum(0) self.spinBox_BCG_front_JJIV_2.setMinimum(0)
self.spinBox_BCG_front_JJIV_2.setMaximum(1000000000) self.spinBox_BCG_front_JJIV_2.setMaximum(1000000000)
@ -189,20 +236,26 @@ class Ui_MainWindow_precisely_align(object):
self.label_6 = QLabel(self.groupBox_2) self.label_6 = QLabel(self.groupBox_2)
self.label_6.setObjectName(u"label_6") self.label_6.setObjectName(u"label_6")
self.label_6.setFont(font) sizePolicy3.setHeightForWidth(self.label_6.sizePolicy().hasHeightForWidth())
self.label_6.setSizePolicy(sizePolicy3)
self.label_6.setFont(font2)
self.label_6.setAlignment(Qt.AlignmentFlag.AlignCenter) self.label_6.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_2.addWidget(self.label_6, 1, 3, 1, 1) self.gridLayout_2.addWidget(self.label_6, 1, 3, 1, 1)
self.label = QLabel(self.groupBox_2) self.label = QLabel(self.groupBox_2)
self.label.setObjectName(u"label") self.label.setObjectName(u"label")
self.label.setFont(font) sizePolicy3.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy3)
self.label.setFont(font2)
self.gridLayout_2.addWidget(self.label, 0, 1, 1, 1) self.gridLayout_2.addWidget(self.label, 0, 1, 1, 1)
self.label_2 = QLabel(self.groupBox_2) self.label_2 = QLabel(self.groupBox_2)
self.label_2.setObjectName(u"label_2") self.label_2.setObjectName(u"label_2")
self.label_2.setFont(font) sizePolicy3.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
self.label_2.setSizePolicy(sizePolicy3)
self.label_2.setFont(font2)
self.gridLayout_2.addWidget(self.label_2, 1, 1, 1, 1) self.gridLayout_2.addWidget(self.label_2, 1, 1, 1, 1)
@ -221,7 +274,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_BCG_back_Signal_2 = QSpinBox(self.groupBox_4) self.spinBox_BCG_back_Signal_2 = QSpinBox(self.groupBox_4)
self.spinBox_BCG_back_Signal_2.setObjectName(u"spinBox_BCG_back_Signal_2") self.spinBox_BCG_back_Signal_2.setObjectName(u"spinBox_BCG_back_Signal_2")
self.spinBox_BCG_back_Signal_2.setEnabled(False) self.spinBox_BCG_back_Signal_2.setEnabled(False)
self.spinBox_BCG_back_Signal_2.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_BCG_back_Signal_2.sizePolicy().hasHeightForWidth())
self.spinBox_BCG_back_Signal_2.setSizePolicy(sizePolicy2)
self.spinBox_BCG_back_Signal_2.setFont(font2)
self.spinBox_BCG_back_Signal_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_BCG_back_Signal_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_BCG_back_Signal_2.setMinimum(0) self.spinBox_BCG_back_Signal_2.setMinimum(0)
self.spinBox_BCG_back_Signal_2.setMaximum(1000000000) self.spinBox_BCG_back_Signal_2.setMaximum(1000000000)
@ -231,7 +286,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_BCG_back_Signal_1 = QSpinBox(self.groupBox_4) self.spinBox_BCG_back_Signal_1 = QSpinBox(self.groupBox_4)
self.spinBox_BCG_back_Signal_1.setObjectName(u"spinBox_BCG_back_Signal_1") self.spinBox_BCG_back_Signal_1.setObjectName(u"spinBox_BCG_back_Signal_1")
self.spinBox_BCG_back_Signal_1.setEnabled(False) self.spinBox_BCG_back_Signal_1.setEnabled(False)
self.spinBox_BCG_back_Signal_1.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_BCG_back_Signal_1.sizePolicy().hasHeightForWidth())
self.spinBox_BCG_back_Signal_1.setSizePolicy(sizePolicy2)
self.spinBox_BCG_back_Signal_1.setFont(font2)
self.spinBox_BCG_back_Signal_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_BCG_back_Signal_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_BCG_back_Signal_1.setMinimum(0) self.spinBox_BCG_back_Signal_1.setMinimum(0)
self.spinBox_BCG_back_Signal_1.setMaximum(1000000000) self.spinBox_BCG_back_Signal_1.setMaximum(1000000000)
@ -240,7 +297,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_BCG_back_JJIV_2 = QSpinBox(self.groupBox_4) self.spinBox_BCG_back_JJIV_2 = QSpinBox(self.groupBox_4)
self.spinBox_BCG_back_JJIV_2.setObjectName(u"spinBox_BCG_back_JJIV_2") self.spinBox_BCG_back_JJIV_2.setObjectName(u"spinBox_BCG_back_JJIV_2")
self.spinBox_BCG_back_JJIV_2.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_BCG_back_JJIV_2.sizePolicy().hasHeightForWidth())
self.spinBox_BCG_back_JJIV_2.setSizePolicy(sizePolicy2)
self.spinBox_BCG_back_JJIV_2.setFont(font2)
self.spinBox_BCG_back_JJIV_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_BCG_back_JJIV_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_BCG_back_JJIV_2.setMinimum(0) self.spinBox_BCG_back_JJIV_2.setMinimum(0)
self.spinBox_BCG_back_JJIV_2.setMaximum(1000000000) self.spinBox_BCG_back_JJIV_2.setMaximum(1000000000)
@ -256,7 +315,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_BCG_back_JJIV_1 = QSpinBox(self.groupBox_4) self.spinBox_BCG_back_JJIV_1 = QSpinBox(self.groupBox_4)
self.spinBox_BCG_back_JJIV_1.setObjectName(u"spinBox_BCG_back_JJIV_1") self.spinBox_BCG_back_JJIV_1.setObjectName(u"spinBox_BCG_back_JJIV_1")
self.spinBox_BCG_back_JJIV_1.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_BCG_back_JJIV_1.sizePolicy().hasHeightForWidth())
self.spinBox_BCG_back_JJIV_1.setSizePolicy(sizePolicy2)
self.spinBox_BCG_back_JJIV_1.setFont(font2)
self.spinBox_BCG_back_JJIV_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_BCG_back_JJIV_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_BCG_back_JJIV_1.setMinimum(0) self.spinBox_BCG_back_JJIV_1.setMinimum(0)
self.spinBox_BCG_back_JJIV_1.setMaximum(1000000000) self.spinBox_BCG_back_JJIV_1.setMaximum(1000000000)
@ -265,27 +326,35 @@ class Ui_MainWindow_precisely_align(object):
self.label_7 = QLabel(self.groupBox_4) self.label_7 = QLabel(self.groupBox_4)
self.label_7.setObjectName(u"label_7") self.label_7.setObjectName(u"label_7")
self.label_7.setFont(font) sizePolicy3.setHeightForWidth(self.label_7.sizePolicy().hasHeightForWidth())
self.label_7.setSizePolicy(sizePolicy3)
self.label_7.setFont(font2)
self.label_7.setAlignment(Qt.AlignmentFlag.AlignCenter) self.label_7.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_7, 1, 3, 1, 1) self.gridLayout_3.addWidget(self.label_7, 1, 3, 1, 1)
self.label_5 = QLabel(self.groupBox_4) self.label_5 = QLabel(self.groupBox_4)
self.label_5.setObjectName(u"label_5") self.label_5.setObjectName(u"label_5")
self.label_5.setFont(font) sizePolicy3.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
self.label_5.setSizePolicy(sizePolicy3)
self.label_5.setFont(font2)
self.label_5.setAlignment(Qt.AlignmentFlag.AlignCenter) self.label_5.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_3.addWidget(self.label_5, 0, 3, 1, 1) self.gridLayout_3.addWidget(self.label_5, 0, 3, 1, 1)
self.label_3 = QLabel(self.groupBox_4) self.label_3 = QLabel(self.groupBox_4)
self.label_3.setObjectName(u"label_3") self.label_3.setObjectName(u"label_3")
self.label_3.setFont(font) sizePolicy3.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy3)
self.label_3.setFont(font2)
self.gridLayout_3.addWidget(self.label_3, 0, 1, 1, 1) self.gridLayout_3.addWidget(self.label_3, 0, 1, 1, 1)
self.label_12 = QLabel(self.groupBox_4) self.label_12 = QLabel(self.groupBox_4)
self.label_12.setObjectName(u"label_12") self.label_12.setObjectName(u"label_12")
self.label_12.setFont(font) sizePolicy3.setHeightForWidth(self.label_12.sizePolicy().hasHeightForWidth())
self.label_12.setSizePolicy(sizePolicy3)
self.label_12.setFont(font2)
self.gridLayout_3.addWidget(self.label_12, 1, 1, 1, 1) self.gridLayout_3.addWidget(self.label_12, 1, 1, 1, 1)
@ -303,7 +372,9 @@ class Ui_MainWindow_precisely_align(object):
self.gridLayout_4.setObjectName(u"gridLayout_4") self.gridLayout_4.setObjectName(u"gridLayout_4")
self.spinBox_ECG_front_RRIV_2 = QSpinBox(self.groupBox_3) self.spinBox_ECG_front_RRIV_2 = QSpinBox(self.groupBox_3)
self.spinBox_ECG_front_RRIV_2.setObjectName(u"spinBox_ECG_front_RRIV_2") self.spinBox_ECG_front_RRIV_2.setObjectName(u"spinBox_ECG_front_RRIV_2")
self.spinBox_ECG_front_RRIV_2.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_ECG_front_RRIV_2.sizePolicy().hasHeightForWidth())
self.spinBox_ECG_front_RRIV_2.setSizePolicy(sizePolicy2)
self.spinBox_ECG_front_RRIV_2.setFont(font2)
self.spinBox_ECG_front_RRIV_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_ECG_front_RRIV_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_ECG_front_RRIV_2.setMinimum(0) self.spinBox_ECG_front_RRIV_2.setMinimum(0)
self.spinBox_ECG_front_RRIV_2.setMaximum(1000000000) self.spinBox_ECG_front_RRIV_2.setMaximum(1000000000)
@ -312,7 +383,9 @@ class Ui_MainWindow_precisely_align(object):
self.label_10 = QLabel(self.groupBox_3) self.label_10 = QLabel(self.groupBox_3)
self.label_10.setObjectName(u"label_10") self.label_10.setObjectName(u"label_10")
self.label_10.setFont(font) sizePolicy3.setHeightForWidth(self.label_10.sizePolicy().hasHeightForWidth())
self.label_10.setSizePolicy(sizePolicy3)
self.label_10.setFont(font2)
self.label_10.setAlignment(Qt.AlignmentFlag.AlignCenter) self.label_10.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_4.addWidget(self.label_10, 1, 3, 1, 1) self.gridLayout_4.addWidget(self.label_10, 1, 3, 1, 1)
@ -326,7 +399,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_ECG_front_Signal_2 = QSpinBox(self.groupBox_3) self.spinBox_ECG_front_Signal_2 = QSpinBox(self.groupBox_3)
self.spinBox_ECG_front_Signal_2.setObjectName(u"spinBox_ECG_front_Signal_2") self.spinBox_ECG_front_Signal_2.setObjectName(u"spinBox_ECG_front_Signal_2")
self.spinBox_ECG_front_Signal_2.setEnabled(False) self.spinBox_ECG_front_Signal_2.setEnabled(False)
self.spinBox_ECG_front_Signal_2.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_ECG_front_Signal_2.sizePolicy().hasHeightForWidth())
self.spinBox_ECG_front_Signal_2.setSizePolicy(sizePolicy2)
self.spinBox_ECG_front_Signal_2.setFont(font2)
self.spinBox_ECG_front_Signal_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_ECG_front_Signal_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_ECG_front_Signal_2.setMinimum(0) self.spinBox_ECG_front_Signal_2.setMinimum(0)
self.spinBox_ECG_front_Signal_2.setMaximum(1000000000) self.spinBox_ECG_front_Signal_2.setMaximum(1000000000)
@ -336,7 +411,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_ECG_front_Signal_1 = QSpinBox(self.groupBox_3) self.spinBox_ECG_front_Signal_1 = QSpinBox(self.groupBox_3)
self.spinBox_ECG_front_Signal_1.setObjectName(u"spinBox_ECG_front_Signal_1") self.spinBox_ECG_front_Signal_1.setObjectName(u"spinBox_ECG_front_Signal_1")
self.spinBox_ECG_front_Signal_1.setEnabled(False) self.spinBox_ECG_front_Signal_1.setEnabled(False)
self.spinBox_ECG_front_Signal_1.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_ECG_front_Signal_1.sizePolicy().hasHeightForWidth())
self.spinBox_ECG_front_Signal_1.setSizePolicy(sizePolicy2)
self.spinBox_ECG_front_Signal_1.setFont(font2)
self.spinBox_ECG_front_Signal_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_ECG_front_Signal_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_ECG_front_Signal_1.setMinimum(0) self.spinBox_ECG_front_Signal_1.setMinimum(0)
self.spinBox_ECG_front_Signal_1.setMaximum(1000000000) self.spinBox_ECG_front_Signal_1.setMaximum(1000000000)
@ -345,7 +422,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_ECG_front_RRIV_1 = QSpinBox(self.groupBox_3) self.spinBox_ECG_front_RRIV_1 = QSpinBox(self.groupBox_3)
self.spinBox_ECG_front_RRIV_1.setObjectName(u"spinBox_ECG_front_RRIV_1") self.spinBox_ECG_front_RRIV_1.setObjectName(u"spinBox_ECG_front_RRIV_1")
self.spinBox_ECG_front_RRIV_1.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_ECG_front_RRIV_1.sizePolicy().hasHeightForWidth())
self.spinBox_ECG_front_RRIV_1.setSizePolicy(sizePolicy2)
self.spinBox_ECG_front_RRIV_1.setFont(font2)
self.spinBox_ECG_front_RRIV_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_ECG_front_RRIV_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_ECG_front_RRIV_1.setMinimum(0) self.spinBox_ECG_front_RRIV_1.setMinimum(0)
self.spinBox_ECG_front_RRIV_1.setMaximum(1000000000) self.spinBox_ECG_front_RRIV_1.setMaximum(1000000000)
@ -354,20 +433,26 @@ class Ui_MainWindow_precisely_align(object):
self.label_8 = QLabel(self.groupBox_3) self.label_8 = QLabel(self.groupBox_3)
self.label_8.setObjectName(u"label_8") self.label_8.setObjectName(u"label_8")
self.label_8.setFont(font) sizePolicy3.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth())
self.label_8.setSizePolicy(sizePolicy3)
self.label_8.setFont(font2)
self.label_8.setAlignment(Qt.AlignmentFlag.AlignCenter) self.label_8.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_4.addWidget(self.label_8, 0, 3, 1, 1) self.gridLayout_4.addWidget(self.label_8, 0, 3, 1, 1)
self.label_13 = QLabel(self.groupBox_3) self.label_13 = QLabel(self.groupBox_3)
self.label_13.setObjectName(u"label_13") self.label_13.setObjectName(u"label_13")
self.label_13.setFont(font) sizePolicy3.setHeightForWidth(self.label_13.sizePolicy().hasHeightForWidth())
self.label_13.setSizePolicy(sizePolicy3)
self.label_13.setFont(font2)
self.gridLayout_4.addWidget(self.label_13, 0, 1, 1, 1) self.gridLayout_4.addWidget(self.label_13, 0, 1, 1, 1)
self.label_14 = QLabel(self.groupBox_3) self.label_14 = QLabel(self.groupBox_3)
self.label_14.setObjectName(u"label_14") self.label_14.setObjectName(u"label_14")
self.label_14.setFont(font) sizePolicy3.setHeightForWidth(self.label_14.sizePolicy().hasHeightForWidth())
self.label_14.setSizePolicy(sizePolicy3)
self.label_14.setFont(font2)
self.gridLayout_4.addWidget(self.label_14, 1, 1, 1, 1) self.gridLayout_4.addWidget(self.label_14, 1, 1, 1, 1)
@ -391,14 +476,18 @@ class Ui_MainWindow_precisely_align(object):
self.label_11 = QLabel(self.groupBox_5) self.label_11 = QLabel(self.groupBox_5)
self.label_11.setObjectName(u"label_11") self.label_11.setObjectName(u"label_11")
self.label_11.setFont(font) sizePolicy3.setHeightForWidth(self.label_11.sizePolicy().hasHeightForWidth())
self.label_11.setSizePolicy(sizePolicy3)
self.label_11.setFont(font2)
self.label_11.setAlignment(Qt.AlignmentFlag.AlignCenter) self.label_11.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_5.addWidget(self.label_11, 1, 3, 1, 1) self.gridLayout_5.addWidget(self.label_11, 1, 3, 1, 1)
self.spinBox_ECG_back_RRIV_2 = QSpinBox(self.groupBox_5) self.spinBox_ECG_back_RRIV_2 = QSpinBox(self.groupBox_5)
self.spinBox_ECG_back_RRIV_2.setObjectName(u"spinBox_ECG_back_RRIV_2") self.spinBox_ECG_back_RRIV_2.setObjectName(u"spinBox_ECG_back_RRIV_2")
self.spinBox_ECG_back_RRIV_2.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_ECG_back_RRIV_2.sizePolicy().hasHeightForWidth())
self.spinBox_ECG_back_RRIV_2.setSizePolicy(sizePolicy2)
self.spinBox_ECG_back_RRIV_2.setFont(font2)
self.spinBox_ECG_back_RRIV_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_ECG_back_RRIV_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_ECG_back_RRIV_2.setMinimum(0) self.spinBox_ECG_back_RRIV_2.setMinimum(0)
self.spinBox_ECG_back_RRIV_2.setMaximum(1000000000) self.spinBox_ECG_back_RRIV_2.setMaximum(1000000000)
@ -408,7 +497,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_ECG_back_Signal_2 = QSpinBox(self.groupBox_5) self.spinBox_ECG_back_Signal_2 = QSpinBox(self.groupBox_5)
self.spinBox_ECG_back_Signal_2.setObjectName(u"spinBox_ECG_back_Signal_2") self.spinBox_ECG_back_Signal_2.setObjectName(u"spinBox_ECG_back_Signal_2")
self.spinBox_ECG_back_Signal_2.setEnabled(False) self.spinBox_ECG_back_Signal_2.setEnabled(False)
self.spinBox_ECG_back_Signal_2.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_ECG_back_Signal_2.sizePolicy().hasHeightForWidth())
self.spinBox_ECG_back_Signal_2.setSizePolicy(sizePolicy2)
self.spinBox_ECG_back_Signal_2.setFont(font2)
self.spinBox_ECG_back_Signal_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_ECG_back_Signal_2.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_ECG_back_Signal_2.setMinimum(0) self.spinBox_ECG_back_Signal_2.setMinimum(0)
self.spinBox_ECG_back_Signal_2.setMaximum(1000000000) self.spinBox_ECG_back_Signal_2.setMaximum(1000000000)
@ -417,7 +508,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_ECG_back_RRIV_1 = QSpinBox(self.groupBox_5) self.spinBox_ECG_back_RRIV_1 = QSpinBox(self.groupBox_5)
self.spinBox_ECG_back_RRIV_1.setObjectName(u"spinBox_ECG_back_RRIV_1") self.spinBox_ECG_back_RRIV_1.setObjectName(u"spinBox_ECG_back_RRIV_1")
self.spinBox_ECG_back_RRIV_1.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_ECG_back_RRIV_1.sizePolicy().hasHeightForWidth())
self.spinBox_ECG_back_RRIV_1.setSizePolicy(sizePolicy2)
self.spinBox_ECG_back_RRIV_1.setFont(font2)
self.spinBox_ECG_back_RRIV_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_ECG_back_RRIV_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_ECG_back_RRIV_1.setMinimum(0) self.spinBox_ECG_back_RRIV_1.setMinimum(0)
self.spinBox_ECG_back_RRIV_1.setMaximum(1000000000) self.spinBox_ECG_back_RRIV_1.setMaximum(1000000000)
@ -427,7 +520,9 @@ class Ui_MainWindow_precisely_align(object):
self.spinBox_ECG_back_Signal_1 = QSpinBox(self.groupBox_5) self.spinBox_ECG_back_Signal_1 = QSpinBox(self.groupBox_5)
self.spinBox_ECG_back_Signal_1.setObjectName(u"spinBox_ECG_back_Signal_1") self.spinBox_ECG_back_Signal_1.setObjectName(u"spinBox_ECG_back_Signal_1")
self.spinBox_ECG_back_Signal_1.setEnabled(False) self.spinBox_ECG_back_Signal_1.setEnabled(False)
self.spinBox_ECG_back_Signal_1.setFont(font) sizePolicy2.setHeightForWidth(self.spinBox_ECG_back_Signal_1.sizePolicy().hasHeightForWidth())
self.spinBox_ECG_back_Signal_1.setSizePolicy(sizePolicy2)
self.spinBox_ECG_back_Signal_1.setFont(font2)
self.spinBox_ECG_back_Signal_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) self.spinBox_ECG_back_Signal_1.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_ECG_back_Signal_1.setMinimum(0) self.spinBox_ECG_back_Signal_1.setMinimum(0)
self.spinBox_ECG_back_Signal_1.setMaximum(1000000000) self.spinBox_ECG_back_Signal_1.setMaximum(1000000000)
@ -436,20 +531,26 @@ class Ui_MainWindow_precisely_align(object):
self.label_9 = QLabel(self.groupBox_5) self.label_9 = QLabel(self.groupBox_5)
self.label_9.setObjectName(u"label_9") self.label_9.setObjectName(u"label_9")
self.label_9.setFont(font) sizePolicy3.setHeightForWidth(self.label_9.sizePolicy().hasHeightForWidth())
self.label_9.setSizePolicy(sizePolicy3)
self.label_9.setFont(font2)
self.label_9.setAlignment(Qt.AlignmentFlag.AlignCenter) self.label_9.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_5.addWidget(self.label_9, 0, 3, 1, 1) self.gridLayout_5.addWidget(self.label_9, 0, 3, 1, 1)
self.label_15 = QLabel(self.groupBox_5) self.label_15 = QLabel(self.groupBox_5)
self.label_15.setObjectName(u"label_15") self.label_15.setObjectName(u"label_15")
self.label_15.setFont(font) sizePolicy3.setHeightForWidth(self.label_15.sizePolicy().hasHeightForWidth())
self.label_15.setSizePolicy(sizePolicy3)
self.label_15.setFont(font2)
self.gridLayout_5.addWidget(self.label_15, 0, 1, 1, 1) self.gridLayout_5.addWidget(self.label_15, 0, 1, 1, 1)
self.label_16 = QLabel(self.groupBox_5) self.label_16 = QLabel(self.groupBox_5)
self.label_16.setObjectName(u"label_16") self.label_16.setObjectName(u"label_16")
self.label_16.setFont(font) sizePolicy3.setHeightForWidth(self.label_16.sizePolicy().hasHeightForWidth())
self.label_16.setSizePolicy(sizePolicy3)
self.label_16.setFont(font2)
self.gridLayout_5.addWidget(self.label_16, 1, 1, 1, 1) self.gridLayout_5.addWidget(self.label_16, 1, 1, 1, 1)
@ -459,6 +560,42 @@ class Ui_MainWindow_precisely_align(object):
self.verticalLayout_5.addWidget(self.groupBox_5) self.verticalLayout_5.addWidget(self.groupBox_5)
self.groupBox_7 = QGroupBox(self.groupBox_args)
self.groupBox_7.setObjectName(u"groupBox_7")
self.horizontalLayout_6 = QHBoxLayout(self.groupBox_7)
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
self.gridLayout_6 = QGridLayout()
self.gridLayout_6.setObjectName(u"gridLayout_6")
self.pushButton_getPos = QPushButton(self.groupBox_7)
self.pushButton_getPos.setObjectName(u"pushButton_getPos")
self.pushButton_getPos.setFont(font)
self.gridLayout_6.addWidget(self.pushButton_getPos, 2, 0, 1, 1)
self.pushButton_resetPos = QPushButton(self.groupBox_7)
self.pushButton_resetPos.setObjectName(u"pushButton_resetPos")
self.pushButton_resetPos.setFont(font)
self.gridLayout_6.addWidget(self.pushButton_resetPos, 2, 1, 1, 1)
self.checkBox_sync_xlim = QCheckBox(self.groupBox_7)
self.checkBox_sync_xlim.setObjectName(u"checkBox_sync_xlim")
self.checkBox_sync_xlim.setFont(font)
self.checkBox_sync_xlim.setChecked(True)
self.gridLayout_6.addWidget(self.checkBox_sync_xlim, 0, 0, 1, 2)
self.label_19 = QLabel(self.groupBox_7)
self.label_19.setObjectName(u"label_19")
self.gridLayout_6.addWidget(self.label_19, 1, 0, 1, 2)
self.horizontalLayout_6.addLayout(self.gridLayout_6)
self.verticalLayout_5.addWidget(self.groupBox_7)
self.verticalLayout_5.setStretch(0, 2) self.verticalLayout_5.setStretch(0, 2)
self.verticalLayout_5.setStretch(1, 2) self.verticalLayout_5.setStretch(1, 2)
self.verticalLayout_5.setStretch(2, 2) self.verticalLayout_5.setStretch(2, 2)
@ -467,10 +604,6 @@ class Ui_MainWindow_precisely_align(object):
self.verticalLayout.addWidget(self.groupBox_args) self.verticalLayout.addWidget(self.groupBox_args)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout.addItem(self.verticalSpacer)
self.horizontalLayout_8 = QHBoxLayout() self.horizontalLayout_8 = QHBoxLayout()
self.horizontalLayout_8.setObjectName(u"horizontalLayout_8") self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
self.pushButton_calculate_correlation = QPushButton(self.groupBox_left) self.pushButton_calculate_correlation = QPushButton(self.groupBox_left)
@ -526,7 +659,8 @@ class Ui_MainWindow_precisely_align(object):
self.verticalLayout.addWidget(self.groupBox) self.verticalLayout.addWidget(self.groupBox)
self.verticalLayout.setStretch(0, 1) self.verticalLayout.setStretch(0, 1)
self.verticalLayout.setStretch(1, 7) self.verticalLayout.setStretch(1, 1)
self.verticalLayout.setStretch(2, 6)
self.verticalLayout.setStretch(3, 1) self.verticalLayout.setStretch(3, 1)
self.verticalLayout.setStretch(4, 1) self.verticalLayout.setStretch(4, 1)
self.verticalLayout.setStretch(5, 5) self.verticalLayout.setStretch(5, 5)
@ -551,6 +685,10 @@ class Ui_MainWindow_precisely_align(object):
self.action.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u52a0\u8f7d\u5b58\u6863", None)) self.action.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u52a0\u8f7d\u5b58\u6863", None))
self.groupBox_canvas.setTitle(QCoreApplication.translate("MainWindow_precisely_align", u"\u7ed8\u56fe\u533a", None)) self.groupBox_canvas.setTitle(QCoreApplication.translate("MainWindow_precisely_align", u"\u7ed8\u56fe\u533a", None))
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_precisely_align", u"\u6570\u636e\u7cbe\u540c\u6b65", None)) self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_precisely_align", u"\u6570\u636e\u7cbe\u540c\u6b65", None))
self.label_18.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u7f16\u53f7\uff1a", None))
self.label_sampno.setText(QCoreApplication.translate("MainWindow_precisely_align", u"None", None))
self.label_20.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u504f\u79fb\u91cf\uff1a", None))
self.label_pos.setText(QCoreApplication.translate("MainWindow_precisely_align", u"0", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u5bfc\u5165\u8bbe\u7f6e", None)) self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_input.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u5f00\u59cb\u5bfc\u5165", None)) self.pushButton_input.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u5f00\u59cb\u5bfc\u5165", None))
self.groupBox_args.setTitle(QCoreApplication.translate("MainWindow_precisely_align", u"\u53c2\u6570\u8f93\u5165", None)) self.groupBox_args.setTitle(QCoreApplication.translate("MainWindow_precisely_align", u"\u53c2\u6570\u8f93\u5165", None))
@ -581,6 +719,11 @@ class Ui_MainWindow_precisely_align(object):
self.label_9.setText(QCoreApplication.translate("MainWindow_precisely_align", u"~", None)) self.label_9.setText(QCoreApplication.translate("MainWindow_precisely_align", u"~", None))
self.label_15.setText(QCoreApplication.translate("MainWindow_precisely_align", u"RRIV\u5e8f\u53f7", None)) self.label_15.setText(QCoreApplication.translate("MainWindow_precisely_align", u"RRIV\u5e8f\u53f7", None))
self.label_16.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u4fe1\u53f7\u5750\u6807", None)) self.label_16.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u4fe1\u53f7\u5750\u6807", None))
self.groupBox_7.setTitle(QCoreApplication.translate("MainWindow_precisely_align", u"\u504f\u79fb\u91cf\u8c03\u6574", None))
self.pushButton_getPos.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u6355\u83b7\u5f53\u524d\u504f\u79fb\u91cf", None))
self.pushButton_resetPos.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u6062\u590d\u9ed8\u8ba4\u504f\u79fb\u91cf", None))
self.checkBox_sync_xlim.setText(QCoreApplication.translate("MainWindow_precisely_align", u"X\u8f74\u540c\u6b65\uff08\u4ec5\u5728\u9009\u5b9a\u533a\u95f4\u65f6\u6709\u6548\uff09", None))
self.label_19.setText(QCoreApplication.translate("MainWindow_precisely_align", u"Tips: \u91cd\u65b0\u6355\u83b7\u65f6\u5c06\u5bf9\u9f50\u70b9\u7f6e\u4e8ex\u8f74\u5de6\u4fa7\uff0c\u8ba1\u7b97x\u8f74\u8d77\u70b9\u5dee\u503c", None))
self.pushButton_calculate_correlation.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u8ba1\u7b97\u76f8\u5173\u6027", None)) self.pushButton_calculate_correlation.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u8ba1\u7b97\u76f8\u5173\u6027", None))
self.pushButton_correlation_align.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u76f8\u5173\u5bf9\u9f50", None)) self.pushButton_correlation_align.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u76f8\u5173\u5bf9\u9f50", None))
self.pushButton_view_align.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u67e5\u770b\u5bf9\u9f50\u7ed3\u679c", None)) self.pushButton_view_align.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u67e5\u770b\u5bf9\u9f50\u7ed3\u679c", None))

View File

@ -9,8 +9,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1920</width> <width>1912</width>
<height>1080</height> <height>1061</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -56,7 +56,65 @@
<property name="title"> <property name="title">
<string>数据精同步</string> <string>数据精同步</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,7,0,1,1,5"> <layout class="QVBoxLayout" name="verticalLayout" stretch="1,1,6,1,1,5">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_18">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>编号:</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_sampno">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>None</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_20">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>偏移量:</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_pos">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
@ -102,7 +160,7 @@
<property name="title"> <property name="title">
<string>参数输入</string> <string>参数输入</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="2,2,2,2,2"> <layout class="QVBoxLayout" name="verticalLayout_5" stretch="2,2,2,2,2,0">
<item> <item>
<widget class="QGroupBox" name="groupBox_6"> <widget class="QGroupBox" name="groupBox_6">
<property name="title"> <property name="title">
@ -177,9 +235,15 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -195,9 +259,15 @@
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QSpinBox" name="spinBox_BCG_front_JJIV_1"> <widget class="QSpinBox" name="spinBox_BCG_front_JJIV_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -228,9 +298,15 @@
</item> </item>
<item row="0" column="3"> <item row="0" column="3">
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -246,9 +322,15 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -264,9 +346,15 @@
</item> </item>
<item row="0" column="4"> <item row="0" column="4">
<widget class="QSpinBox" name="spinBox_BCG_front_JJIV_2"> <widget class="QSpinBox" name="spinBox_BCG_front_JJIV_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -282,9 +370,15 @@
</item> </item>
<item row="1" column="3"> <item row="1" column="3">
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="label_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -297,9 +391,15 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -309,9 +409,15 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -337,9 +443,15 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -358,9 +470,15 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -376,9 +494,15 @@
</item> </item>
<item row="0" column="4"> <item row="0" column="4">
<widget class="QSpinBox" name="spinBox_BCG_back_JJIV_2"> <widget class="QSpinBox" name="spinBox_BCG_back_JJIV_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -409,9 +533,15 @@
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QSpinBox" name="spinBox_BCG_back_JJIV_1"> <widget class="QSpinBox" name="spinBox_BCG_back_JJIV_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -427,9 +557,15 @@
</item> </item>
<item row="1" column="3"> <item row="1" column="3">
<widget class="QLabel" name="label_7"> <widget class="QLabel" name="label_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -442,9 +578,15 @@
</item> </item>
<item row="0" column="3"> <item row="0" column="3">
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -457,9 +599,15 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -469,9 +617,15 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLabel" name="label_12"> <widget class="QLabel" name="label_12">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -494,9 +648,15 @@
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="4"> <item row="0" column="4">
<widget class="QSpinBox" name="spinBox_ECG_front_RRIV_2"> <widget class="QSpinBox" name="spinBox_ECG_front_RRIV_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -512,9 +672,15 @@
</item> </item>
<item row="1" column="3"> <item row="1" column="3">
<widget class="QLabel" name="label_10"> <widget class="QLabel" name="label_10">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -542,9 +708,15 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -563,9 +735,15 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -581,9 +759,15 @@
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QSpinBox" name="spinBox_ECG_front_RRIV_1"> <widget class="QSpinBox" name="spinBox_ECG_front_RRIV_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -599,9 +783,15 @@
</item> </item>
<item row="0" column="3"> <item row="0" column="3">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -614,9 +804,15 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLabel" name="label_13"> <widget class="QLabel" name="label_13">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -626,9 +822,15 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLabel" name="label_14"> <widget class="QLabel" name="label_14">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -663,9 +865,15 @@
</item> </item>
<item row="1" column="3"> <item row="1" column="3">
<widget class="QLabel" name="label_11"> <widget class="QLabel" name="label_11">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -678,9 +886,15 @@
</item> </item>
<item row="0" column="4"> <item row="0" column="4">
<widget class="QSpinBox" name="spinBox_ECG_back_RRIV_2"> <widget class="QSpinBox" name="spinBox_ECG_back_RRIV_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -699,9 +913,15 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -717,9 +937,15 @@
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QSpinBox" name="spinBox_ECG_back_RRIV_1"> <widget class="QSpinBox" name="spinBox_ECG_back_RRIV_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -738,9 +964,15 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
@ -756,9 +988,15 @@
</item> </item>
<item row="0" column="3"> <item row="0" column="3">
<widget class="QLabel" name="label_9"> <widget class="QLabel" name="label_9">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -771,9 +1009,15 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLabel" name="label_15"> <widget class="QLabel" name="label_15">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -783,9 +1027,15 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLabel" name="label_16"> <widget class="QLabel" name="label_16">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -798,22 +1048,68 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
<string>偏移量调整</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<layout class="QGridLayout" name="gridLayout_6">
<item row="2" column="0">
<widget class="QPushButton" name="pushButton_getPos">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>捕获当前偏移量</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="pushButton_resetPos">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>恢复默认偏移量</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="checkBox_sync_xlim">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>X轴同步仅在选定区间时有效</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Tips: 重新捕获时将对齐点置于x轴左侧计算x轴起点差值</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </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> <item>
<layout class="QHBoxLayout" name="horizontalLayout_8"> <layout class="QHBoxLayout" name="horizontalLayout_8">
<item> <item>

View File

@ -3,7 +3,7 @@
################################################################################ ################################################################################
## Form generated from reading UI file 'MainWindow_resp_quality_label.ui' ## Form generated from reading UI file 'MainWindow_resp_quality_label.ui'
## ##
## Created by: Qt User Interface Compiler version 6.8.2 ## Created by: Qt User Interface Compiler version 6.7.0
## ##
## WARNING! All changes made in this file will be lost when recompiling UI file! ## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################ ################################################################################
@ -330,28 +330,12 @@ class Ui_MainWindow_resp_quality_label(object):
self.groupBox_label_operation.setObjectName(u"groupBox_label_operation") self.groupBox_label_operation.setObjectName(u"groupBox_label_operation")
self.gridLayout_7 = QGridLayout(self.groupBox_label_operation) self.gridLayout_7 = QGridLayout(self.groupBox_label_operation)
self.gridLayout_7.setObjectName(u"gridLayout_7") self.gridLayout_7.setObjectName(u"gridLayout_7")
self.label_10 = QLabel(self.groupBox_label_operation)
self.label_10.setObjectName(u"label_10")
sizePolicy1.setHeightForWidth(self.label_10.sizePolicy().hasHeightForWidth())
self.label_10.setSizePolicy(sizePolicy1)
self.label_10.setFont(font1)
self.label_10.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_7.addWidget(self.label_10, 1, 0, 1, 1)
self.lineEdit_current_part_label = QLineEdit(self.groupBox_label_operation)
self.lineEdit_current_part_label.setObjectName(u"lineEdit_current_part_label")
self.lineEdit_current_part_label.setEnabled(False)
self.lineEdit_current_part_label.setFont(font1)
self.gridLayout_7.addWidget(self.lineEdit_current_part_label, 1, 1, 1, 1)
self.lineEdit_current_part_num = QLineEdit(self.groupBox_label_operation) self.lineEdit_current_part_num = QLineEdit(self.groupBox_label_operation)
self.lineEdit_current_part_num.setObjectName(u"lineEdit_current_part_num") self.lineEdit_current_part_num.setObjectName(u"lineEdit_current_part_num")
self.lineEdit_current_part_num.setEnabled(False) self.lineEdit_current_part_num.setEnabled(False)
self.lineEdit_current_part_num.setFont(font1) self.lineEdit_current_part_num.setFont(font1)
self.gridLayout_7.addWidget(self.lineEdit_current_part_num, 0, 1, 1, 1) self.gridLayout_7.addWidget(self.lineEdit_current_part_num, 1, 1, 1, 1)
self.label_8 = QLabel(self.groupBox_label_operation) self.label_8 = QLabel(self.groupBox_label_operation)
self.label_8.setObjectName(u"label_8") self.label_8.setObjectName(u"label_8")
@ -360,7 +344,23 @@ class Ui_MainWindow_resp_quality_label(object):
self.label_8.setFont(font1) self.label_8.setFont(font1)
self.label_8.setAlignment(Qt.AlignmentFlag.AlignCenter) self.label_8.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_7.addWidget(self.label_8, 0, 0, 1, 1) self.gridLayout_7.addWidget(self.label_8, 1, 0, 1, 1)
self.label_10 = QLabel(self.groupBox_label_operation)
self.label_10.setObjectName(u"label_10")
sizePolicy1.setHeightForWidth(self.label_10.sizePolicy().hasHeightForWidth())
self.label_10.setSizePolicy(sizePolicy1)
self.label_10.setFont(font1)
self.label_10.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_7.addWidget(self.label_10, 2, 0, 1, 1)
self.lineEdit_current_part_label = QLineEdit(self.groupBox_label_operation)
self.lineEdit_current_part_label.setObjectName(u"lineEdit_current_part_label")
self.lineEdit_current_part_label.setEnabled(False)
self.lineEdit_current_part_label.setFont(font1)
self.gridLayout_7.addWidget(self.lineEdit_current_part_label, 2, 1, 1, 1)
self.gridLayout_8 = QGridLayout() self.gridLayout_8 = QGridLayout()
self.gridLayout_8.setObjectName(u"gridLayout_8") self.gridLayout_8.setObjectName(u"gridLayout_8")
@ -411,7 +411,14 @@ class Ui_MainWindow_resp_quality_label(object):
self.gridLayout_8.addWidget(self.pushButton_save, 1, 0, 1, 1) self.gridLayout_8.addWidget(self.pushButton_save, 1, 0, 1, 1)
self.gridLayout_7.addLayout(self.gridLayout_8, 2, 0, 1, 2) self.gridLayout_7.addLayout(self.gridLayout_8, 3, 0, 1, 2)
self.checkBox_auto_next = QCheckBox(self.groupBox_label_operation)
self.checkBox_auto_next.setObjectName(u"checkBox_auto_next")
self.checkBox_auto_next.setFont(font1)
self.checkBox_auto_next.setChecked(True)
self.gridLayout_7.addWidget(self.checkBox_auto_next, 0, 0, 1, 1)
self.verticalLayout_2.addWidget(self.groupBox_label_operation) self.verticalLayout_2.addWidget(self.groupBox_label_operation)
@ -551,14 +558,15 @@ class Ui_MainWindow_resp_quality_label(object):
self.label_7.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"~", None)) self.label_7.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"~", None))
self.pushButton_refilter_orgBcg.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5e94\u7528\u5e76\u8ba1\u7b97", None)) self.pushButton_refilter_orgBcg.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5e94\u7528\u5e76\u8ba1\u7b97", None))
self.groupBox_label_operation.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u6807\u6ce8\u64cd\u4f5c", None)) self.groupBox_label_operation.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u6807\u6ce8\u64cd\u4f5c", None))
self.label_10.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5f53\u524d\u7247\u6bb5\u6807\u7b7e", None))
self.label_8.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5f53\u524d\u7247\u6bb5\u6570", None)) self.label_8.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5f53\u524d\u7247\u6bb5\u6570", None))
self.label_10.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5f53\u524d\u7247\u6bb5\u6807\u7b7e", None))
self.pushButton_invalid.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4e0d\u53ef\u7528\uff08G\uff09", None)) self.pushButton_invalid.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4e0d\u53ef\u7528\uff08G\uff09", None))
self.pushButton_reset.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u91cd\u7f6e\uff08H\uff09", None)) self.pushButton_reset.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u91cd\u7f6e\uff08H\uff09", None))
self.pushButton_valid.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u53ef\u7528\uff08F\uff09", None)) self.pushButton_valid.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u53ef\u7528\uff08F\uff09", None))
self.pushButton_prev.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4e0a\u4e00\u6bb5(A)", None)) self.pushButton_prev.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4e0a\u4e00\u6bb5(A)", None))
self.pushButton_next.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4e0b\u4e00\u6bb5(D)", None)) self.pushButton_next.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4e0b\u4e00\u6bb5(D)", None))
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u624b\u52a8\u4fdd\u5b58", None)) self.pushButton_save.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u624b\u52a8\u4fdd\u5b58", None))
self.checkBox_auto_next.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u81ea\u52a8\u4e0b\u4e00\u6bb5", None))
self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u65e5\u5fd7", None)) self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u65e5\u5fd7", None))
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u547c\u5438\u53ef\u7528\u6027\u53ca\u95f4\u671f\u6807\u6ce8", None)) self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u547c\u5438\u53ef\u7528\u6027\u53ca\u95f4\u671f\u6807\u6ce8", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u9891\u8c31", None)) self.groupBox.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u9891\u8c31", None))

View File

@ -567,40 +567,7 @@
<string>标注操作</string> <string>标注操作</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_7"> <layout class="QGridLayout" name="gridLayout_7">
<item row="1" column="0">
<widget class="QLabel" name="label_10">
<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>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_current_part_label">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_current_part_num"> <widget class="QLineEdit" name="lineEdit_current_part_num">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
@ -612,7 +579,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -633,7 +600,40 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="2"> <item row="2" column="0">
<widget class="QLabel" name="label_10">
<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>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_current_part_label">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout_8"> <layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="1"> <item row="0" column="1">
<widget class="QPushButton" name="pushButton_invalid"> <widget class="QPushButton" name="pushButton_invalid">
@ -739,6 +739,21 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="0" column="0">
<widget class="QCheckBox" name="checkBox_auto_next">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>自动下一段</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -0,0 +1,358 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'SA_label_input_setting_v2.ui'
##
## Created by: Qt User Interface Compiler version 6.7.0
##
## 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_SA_label_input_setting(object):
def setupUi(self, MainWindow_SA_label_input_setting):
if not MainWindow_SA_label_input_setting.objectName():
MainWindow_SA_label_input_setting.setObjectName(u"MainWindow_SA_label_input_setting")
MainWindow_SA_label_input_setting.resize(848, 859)
self.centralwidget = QWidget(MainWindow_SA_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.gridLayout_2 = QGridLayout(self.groupBox)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.groupBox_file_path_input_signal_Stage = QGroupBox(self.groupBox)
self.groupBox_file_path_input_signal_Stage.setObjectName(u"groupBox_file_path_input_signal_Stage")
self.groupBox_file_path_input_signal_Stage.setEnabled(True)
self.verticalLayout_10 = QVBoxLayout(self.groupBox_file_path_input_signal_Stage)
self.verticalLayout_10.setObjectName(u"verticalLayout_10")
self.plainTextEdit_file_path_input_signal_Stage = QPlainTextEdit(self.groupBox_file_path_input_signal_Stage)
self.plainTextEdit_file_path_input_signal_Stage.setObjectName(u"plainTextEdit_file_path_input_signal_Stage")
self.plainTextEdit_file_path_input_signal_Stage.setEnabled(True)
self.plainTextEdit_file_path_input_signal_Stage.setUndoRedoEnabled(True)
self.verticalLayout_10.addWidget(self.plainTextEdit_file_path_input_signal_Stage)
self.gridLayout_2.addWidget(self.groupBox_file_path_input_signal_Stage, 6, 1, 1, 1)
self.groupBox_file_path_input_artifact = QGroupBox(self.groupBox)
self.groupBox_file_path_input_artifact.setObjectName(u"groupBox_file_path_input_artifact")
self.verticalLayout_11 = QVBoxLayout(self.groupBox_file_path_input_artifact)
self.verticalLayout_11.setObjectName(u"verticalLayout_11")
self.plainTextEdit_file_path_input_artifact = QPlainTextEdit(self.groupBox_file_path_input_artifact)
self.plainTextEdit_file_path_input_artifact.setObjectName(u"plainTextEdit_file_path_input_artifact")
self.verticalLayout_11.addWidget(self.plainTextEdit_file_path_input_artifact)
self.verticalLayout_11.setStretch(0, 2)
self.gridLayout_2.addWidget(self.groupBox_file_path_input_artifact, 5, 0, 1, 1)
self.groupBox_file_path_input_signal_FlowT = QGroupBox(self.groupBox)
self.groupBox_file_path_input_signal_FlowT.setObjectName(u"groupBox_file_path_input_signal_FlowT")
self.verticalLayout_7 = QVBoxLayout(self.groupBox_file_path_input_signal_FlowT)
self.verticalLayout_7.setObjectName(u"verticalLayout_7")
self.horizontalLayout_5 = QHBoxLayout()
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
self.label_5 = QLabel(self.groupBox_file_path_input_signal_FlowT)
self.label_5.setObjectName(u"label_5")
self.label_5.setFont(font)
self.horizontalLayout_5.addWidget(self.label_5)
self.spinBox_input_freq_signal_FlowT = QSpinBox(self.groupBox_file_path_input_signal_FlowT)
self.spinBox_input_freq_signal_FlowT.setObjectName(u"spinBox_input_freq_signal_FlowT")
self.spinBox_input_freq_signal_FlowT.setFont(font)
self.spinBox_input_freq_signal_FlowT.setMinimum(1)
self.spinBox_input_freq_signal_FlowT.setMaximum(1000000)
self.horizontalLayout_5.addWidget(self.spinBox_input_freq_signal_FlowT)
self.verticalLayout_7.addLayout(self.horizontalLayout_5)
self.plainTextEdit_file_path_input_signal_FlowT = QPlainTextEdit(self.groupBox_file_path_input_signal_FlowT)
self.plainTextEdit_file_path_input_signal_FlowT.setObjectName(u"plainTextEdit_file_path_input_signal_FlowT")
self.verticalLayout_7.addWidget(self.plainTextEdit_file_path_input_signal_FlowT)
self.verticalLayout_7.setStretch(1, 2)
self.gridLayout_2.addWidget(self.groupBox_file_path_input_signal_FlowT, 3, 0, 1, 1)
self.groupBox_file_path_save = QGroupBox(self.groupBox)
self.groupBox_file_path_save.setObjectName(u"groupBox_file_path_save")
self.verticalLayout_4 = QVBoxLayout(self.groupBox_file_path_save)
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.gridLayout_2.addWidget(self.groupBox_file_path_save, 6, 0, 1, 1)
self.groupBox_file_path_input_signal_SpO2 = QGroupBox(self.groupBox)
self.groupBox_file_path_input_signal_SpO2.setObjectName(u"groupBox_file_path_input_signal_SpO2")
self.verticalLayout_9 = QVBoxLayout(self.groupBox_file_path_input_signal_SpO2)
self.verticalLayout_9.setObjectName(u"verticalLayout_9")
self.horizontalLayout_7 = QHBoxLayout()
self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
self.label_7 = QLabel(self.groupBox_file_path_input_signal_SpO2)
self.label_7.setObjectName(u"label_7")
self.label_7.setFont(font)
self.horizontalLayout_7.addWidget(self.label_7)
self.spinBox_input_freq_signal_SpO2 = QSpinBox(self.groupBox_file_path_input_signal_SpO2)
self.spinBox_input_freq_signal_SpO2.setObjectName(u"spinBox_input_freq_signal_SpO2")
self.spinBox_input_freq_signal_SpO2.setFont(font)
self.spinBox_input_freq_signal_SpO2.setMinimum(1)
self.spinBox_input_freq_signal_SpO2.setMaximum(1000000)
self.horizontalLayout_7.addWidget(self.spinBox_input_freq_signal_SpO2)
self.verticalLayout_9.addLayout(self.horizontalLayout_7)
self.plainTextEdit_file_path_input_signal_SpO2 = QPlainTextEdit(self.groupBox_file_path_input_signal_SpO2)
self.plainTextEdit_file_path_input_signal_SpO2.setObjectName(u"plainTextEdit_file_path_input_signal_SpO2")
self.verticalLayout_9.addWidget(self.plainTextEdit_file_path_input_signal_SpO2)
self.verticalLayout_9.setStretch(1, 2)
self.gridLayout_2.addWidget(self.groupBox_file_path_input_signal_SpO2, 0, 1, 1, 1)
self.groupBox_file_path_input_signal_Tho = QGroupBox(self.groupBox)
self.groupBox_file_path_input_signal_Tho.setObjectName(u"groupBox_file_path_input_signal_Tho")
self.verticalLayout_3 = QVBoxLayout(self.groupBox_file_path_input_signal_Tho)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.label_3 = QLabel(self.groupBox_file_path_input_signal_Tho)
self.label_3.setObjectName(u"label_3")
self.label_3.setFont(font)
self.horizontalLayout_3.addWidget(self.label_3)
self.spinBox_input_freq_signal_Tho = QSpinBox(self.groupBox_file_path_input_signal_Tho)
self.spinBox_input_freq_signal_Tho.setObjectName(u"spinBox_input_freq_signal_Tho")
self.spinBox_input_freq_signal_Tho.setFont(font)
self.spinBox_input_freq_signal_Tho.setMinimum(1)
self.spinBox_input_freq_signal_Tho.setMaximum(1000000)
self.horizontalLayout_3.addWidget(self.spinBox_input_freq_signal_Tho)
self.verticalLayout_3.addLayout(self.horizontalLayout_3)
self.plainTextEdit_file_path_input_signal_Tho = QPlainTextEdit(self.groupBox_file_path_input_signal_Tho)
self.plainTextEdit_file_path_input_signal_Tho.setObjectName(u"plainTextEdit_file_path_input_signal_Tho")
self.verticalLayout_3.addWidget(self.plainTextEdit_file_path_input_signal_Tho)
self.verticalLayout_3.setStretch(1, 2)
self.gridLayout_2.addWidget(self.groupBox_file_path_input_signal_Tho, 2, 1, 1, 1)
self.groupBox_file_path_input_label = QGroupBox(self.groupBox)
self.groupBox_file_path_input_label.setObjectName(u"groupBox_file_path_input_label")
self.verticalLayout_12 = QVBoxLayout(self.groupBox_file_path_input_label)
self.verticalLayout_12.setObjectName(u"verticalLayout_12")
self.plainTextEdit_file_path_input_label = QPlainTextEdit(self.groupBox_file_path_input_label)
self.plainTextEdit_file_path_input_label.setObjectName(u"plainTextEdit_file_path_input_label")
self.verticalLayout_12.addWidget(self.plainTextEdit_file_path_input_label)
self.gridLayout_2.addWidget(self.groupBox_file_path_input_label, 5, 1, 1, 1)
self.groupBox_file_path_input_signal_Abd = QGroupBox(self.groupBox)
self.groupBox_file_path_input_signal_Abd.setObjectName(u"groupBox_file_path_input_signal_Abd")
self.verticalLayout_6 = QVBoxLayout(self.groupBox_file_path_input_signal_Abd)
self.verticalLayout_6.setObjectName(u"verticalLayout_6")
self.horizontalLayout_4 = QHBoxLayout()
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
self.label_4 = QLabel(self.groupBox_file_path_input_signal_Abd)
self.label_4.setObjectName(u"label_4")
self.label_4.setFont(font)
self.horizontalLayout_4.addWidget(self.label_4)
self.spinBox_input_freq_signal_Abd = QSpinBox(self.groupBox_file_path_input_signal_Abd)
self.spinBox_input_freq_signal_Abd.setObjectName(u"spinBox_input_freq_signal_Abd")
self.spinBox_input_freq_signal_Abd.setFont(font)
self.spinBox_input_freq_signal_Abd.setMinimum(1)
self.spinBox_input_freq_signal_Abd.setMaximum(1000000)
self.horizontalLayout_4.addWidget(self.spinBox_input_freq_signal_Abd)
self.verticalLayout_6.addLayout(self.horizontalLayout_4)
self.plainTextEdit_file_path_input_signal_Abd = QPlainTextEdit(self.groupBox_file_path_input_signal_Abd)
self.plainTextEdit_file_path_input_signal_Abd.setObjectName(u"plainTextEdit_file_path_input_signal_Abd")
self.verticalLayout_6.addWidget(self.plainTextEdit_file_path_input_signal_Abd)
self.verticalLayout_6.setStretch(1, 2)
self.gridLayout_2.addWidget(self.groupBox_file_path_input_signal_Abd, 2, 0, 1, 1)
self.groupBox_file_path_input_signal_OrgBCG = QGroupBox(self.groupBox)
self.groupBox_file_path_input_signal_OrgBCG.setObjectName(u"groupBox_file_path_input_signal_OrgBCG")
self.verticalLayout_5 = QVBoxLayout(self.groupBox_file_path_input_signal_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_signal_OrgBCG)
self.label_2.setObjectName(u"label_2")
self.label_2.setFont(font)
self.horizontalLayout_2.addWidget(self.label_2)
self.spinBox_input_freq_signal_OrgBCG = QSpinBox(self.groupBox_file_path_input_signal_OrgBCG)
self.spinBox_input_freq_signal_OrgBCG.setObjectName(u"spinBox_input_freq_signal_OrgBCG")
self.spinBox_input_freq_signal_OrgBCG.setFont(font)
self.spinBox_input_freq_signal_OrgBCG.setCursor(QCursor(Qt.ArrowCursor))
self.spinBox_input_freq_signal_OrgBCG.setMinimum(1)
self.spinBox_input_freq_signal_OrgBCG.setMaximum(1000000)
self.horizontalLayout_2.addWidget(self.spinBox_input_freq_signal_OrgBCG)
self.verticalLayout_5.addLayout(self.horizontalLayout_2)
self.plainTextEdit_file_path_input_signal_OrgBCG = QPlainTextEdit(self.groupBox_file_path_input_signal_OrgBCG)
self.plainTextEdit_file_path_input_signal_OrgBCG.setObjectName(u"plainTextEdit_file_path_input_signal_OrgBCG")
self.verticalLayout_5.addWidget(self.plainTextEdit_file_path_input_signal_OrgBCG)
self.verticalLayout_5.setStretch(0, 2)
self.verticalLayout_5.setStretch(1, 3)
self.gridLayout_2.addWidget(self.groupBox_file_path_input_signal_OrgBCG, 0, 0, 1, 1)
self.groupBox_file_path_input_signal_FlowP = QGroupBox(self.groupBox)
self.groupBox_file_path_input_signal_FlowP.setObjectName(u"groupBox_file_path_input_signal_FlowP")
self.verticalLayout_8 = QVBoxLayout(self.groupBox_file_path_input_signal_FlowP)
self.verticalLayout_8.setObjectName(u"verticalLayout_8")
self.horizontalLayout_6 = QHBoxLayout()
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
self.label_6 = QLabel(self.groupBox_file_path_input_signal_FlowP)
self.label_6.setObjectName(u"label_6")
self.label_6.setFont(font)
self.horizontalLayout_6.addWidget(self.label_6)
self.spinBox_input_freq_signal_FlowP = QSpinBox(self.groupBox_file_path_input_signal_FlowP)
self.spinBox_input_freq_signal_FlowP.setObjectName(u"spinBox_input_freq_signal_FlowP")
self.spinBox_input_freq_signal_FlowP.setFont(font)
self.spinBox_input_freq_signal_FlowP.setMinimum(1)
self.spinBox_input_freq_signal_FlowP.setMaximum(1000000)
self.horizontalLayout_6.addWidget(self.spinBox_input_freq_signal_FlowP)
self.verticalLayout_8.addLayout(self.horizontalLayout_6)
self.plainTextEdit_file_path_input_signal_FlowP = QPlainTextEdit(self.groupBox_file_path_input_signal_FlowP)
self.plainTextEdit_file_path_input_signal_FlowP.setObjectName(u"plainTextEdit_file_path_input_signal_FlowP")
self.verticalLayout_8.addWidget(self.plainTextEdit_file_path_input_signal_FlowP)
self.verticalLayout_8.setStretch(1, 2)
self.gridLayout_2.addWidget(self.groupBox_file_path_input_signal_FlowP, 3, 1, 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, 1, 2, 1, 1)
MainWindow_SA_label_input_setting.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_SA_label_input_setting)
self.statusbar.setObjectName(u"statusbar")
MainWindow_SA_label_input_setting.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_SA_label_input_setting)
QMetaObject.connectSlotsByName(MainWindow_SA_label_input_setting)
# setupUi
def retranslateUi(self, MainWindow_SA_label_input_setting):
MainWindow_SA_label_input_setting.setWindowTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_cancel.setText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u53d6\u6d88", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_signal_Stage.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u540c\u6b65\u540e\u7684Stage\u8def\u5f84", None))
self.plainTextEdit_file_path_input_signal_Stage.setPlaceholderText("")
self.groupBox_file_path_input_artifact.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u4f53\u52a8Artifact_a\u8def\u5f84", None))
self.plainTextEdit_file_path_input_artifact.setPlainText("")
self.plainTextEdit_file_path_input_artifact.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_signal_FlowT.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u540c\u6b65\u540e\u7684Flow T\u8def\u5f84", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input_signal_FlowT.setPlainText("")
self.plainTextEdit_file_path_input_signal_FlowT.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.plainTextEdit_file_path_input_signal_FlowT.setProperty("signal_type", QCoreApplication.translate("MainWindow_SA_label_input_setting", u"FlowT", None))
self.groupBox_file_path_save.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u4fee\u6b63\u540e\u7684\u547c\u5438\u6682\u505c\u6807\u7b7e\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_save.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.groupBox_file_path_input_signal_SpO2.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u540c\u6b65\u540e\u7684SpO2\u8def\u5f84", None))
self.label_7.setText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input_signal_SpO2.setPlainText("")
self.plainTextEdit_file_path_input_signal_SpO2.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.plainTextEdit_file_path_input_signal_SpO2.setProperty("signal_type", QCoreApplication.translate("MainWindow_SA_label_input_setting", u"SpO2", None))
self.groupBox_file_path_input_signal_Tho.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u540c\u6b65\u540e\u7684Effort Tho\u8def\u5f84", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input_signal_Tho.setPlainText("")
self.plainTextEdit_file_path_input_signal_Tho.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.plainTextEdit_file_path_input_signal_Tho.setProperty("signal_type", QCoreApplication.translate("MainWindow_SA_label_input_setting", u"Tho", None))
self.groupBox_file_path_input_label.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u540c\u6b65\u540e\u7684\u547c\u5438\u6682\u505c\u6807\u7b7e\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_input_label.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_signal_Abd.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u540c\u6b65\u540e\u7684Effort Abd\u8def\u5f84", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input_signal_Abd.setPlainText("")
self.plainTextEdit_file_path_input_signal_Abd.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.plainTextEdit_file_path_input_signal_Abd.setProperty("signal_type", QCoreApplication.translate("MainWindow_SA_label_input_setting", u"Abd", None))
self.groupBox_file_path_input_signal_OrgBCG.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u540c\u6b65\u540e\u7684OrgBCG\u8def\u5f84", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.spinBox_input_freq_signal_OrgBCG.setPrefix("")
self.plainTextEdit_file_path_input_signal_OrgBCG.setPlainText("")
self.plainTextEdit_file_path_input_signal_OrgBCG.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.plainTextEdit_file_path_input_signal_OrgBCG.setProperty("signal_type", QCoreApplication.translate("MainWindow_SA_label_input_setting", u"OrgBCG", None))
self.groupBox_file_path_input_signal_FlowP.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u540c\u6b65\u540e\u7684Flow P\u8def\u5f84", None))
self.label_6.setText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input_signal_FlowP.setPlainText("")
self.plainTextEdit_file_path_input_signal_FlowP.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.plainTextEdit_file_path_input_signal_FlowP.setProperty("signal_type", QCoreApplication.translate("MainWindow_SA_label_input_setting", u"FlowP", None))
self.pushButton_confirm.setText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u786e\u5b9a", None))
# retranslateUi

View File

@ -0,0 +1,462 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow_SA_label_input_setting</class>
<widget class="QMainWindow" name="MainWindow_SA_label_input_setting">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>848</width>
<height>859</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="QGridLayout" name="gridLayout_2">
<item row="6" column="1">
<widget class="QGroupBox" name="groupBox_file_path_input_signal_Stage">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>同步后的Stage路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_signal_Stage">
<property name="enabled">
<bool>true</bool>
</property>
<property name="undoRedoEnabled">
<bool>true</bool>
</property>
<property name="placeholderText">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="5" column="0">
<widget class="QGroupBox" name="groupBox_file_path_input_artifact">
<property name="title">
<string>体动Artifact_a路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11" stretch="2">
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_artifact">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="groupBox_file_path_input_signal_FlowT">
<property name="title">
<string>同步后的Flow T路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7" stretch="0,2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_5">
<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_FlowT">
<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_signal_FlowT">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
<property name="signal_type" stdset="0">
<string>FlowT</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="6" column="0">
<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>
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_file_path_input_signal_SpO2">
<property name="title">
<string>同步后的SpO2路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9" stretch="0,2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_7">
<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_SpO2">
<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_signal_SpO2">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
<property name="signal_type" stdset="0">
<string>SpO2</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="1">
<widget class="QGroupBox" name="groupBox_file_path_input_signal_Tho">
<property name="title">
<string>同步后的Effort Tho路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_3">
<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_Tho">
<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_signal_Tho">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
<property name="signal_type" stdset="0">
<string>Tho</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="5" column="1">
<widget class="QGroupBox" name="groupBox_file_path_input_label">
<property name="title">
<string>同步后的呼吸暂停标签保存路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_label">
<property name="placeholderText">
<string>文件路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_file_path_input_signal_Abd">
<property name="title">
<string>同步后的Effort Abd路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6" stretch="0,2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_4">
<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_Abd">
<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_signal_Abd">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
<property name="signal_type" stdset="0">
<string>Abd</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_file_path_input_signal_OrgBCG">
<property name="title">
<string>同步后的OrgBCG路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="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_OrgBCG">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="prefix">
<string/>
</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_signal_OrgBCG">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
<property name="signal_type" stdset="0">
<string>OrgBCG</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QGroupBox" name="groupBox_file_path_input_signal_FlowP">
<property name="title">
<string>同步后的Flow P路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8" stretch="0,2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_6">
<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_FlowP">
<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_signal_FlowP">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
<property name="signal_type" stdset="0">
<string>FlowP</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

@ -17,8 +17,8 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QPalette, QPixmap, QRadialGradient, QTransform) QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QDoubleSpinBox, QGridLayout, QGroupBox, from PySide6.QtWidgets import (QApplication, QDoubleSpinBox, QGridLayout, QGroupBox,
QHBoxLayout, QLabel, QMainWindow, QPlainTextEdit, QHBoxLayout, QLabel, QMainWindow, QPlainTextEdit,
QPushButton, QSizePolicy, QSpinBox, QStatusBar, QPushButton, QRadioButton, QSizePolicy, QSpinBox,
QVBoxLayout, QWidget) QStatusBar, QVBoxLayout, QWidget)
class Ui_MainWindow_label_check_input_setting(object): class Ui_MainWindow_label_check_input_setting(object):
def setupUi(self, MainWindow_label_check_input_setting): def setupUi(self, MainWindow_label_check_input_setting):
@ -69,14 +69,42 @@ class Ui_MainWindow_label_check_input_setting(object):
self.groupBox_2 = QGroupBox(self.groupBox_file_path_input_signal) self.groupBox_2 = QGroupBox(self.groupBox_file_path_input_signal)
self.groupBox_2.setObjectName(u"groupBox_2") self.groupBox_2.setObjectName(u"groupBox_2")
self.horizontalLayout = QHBoxLayout(self.groupBox_2) self.gridLayout_2 = QGridLayout(self.groupBox_2)
self.horizontalLayout.setObjectName(u"horizontalLayout") self.gridLayout_2.setObjectName(u"gridLayout_2")
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.gridLayout_2.addWidget(self.label_3, 1, 2, 1, 1)
self.doubleSpinBox_bandPassHigh = QDoubleSpinBox(self.groupBox_2)
self.doubleSpinBox_bandPassHigh.setObjectName(u"doubleSpinBox_bandPassHigh")
self.doubleSpinBox_bandPassHigh.setFont(font)
self.doubleSpinBox_bandPassHigh.setMaximum(100.000000000000000)
self.gridLayout_2.addWidget(self.doubleSpinBox_bandPassHigh, 1, 5, 1, 1)
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.gridLayout_2.addWidget(self.label_4, 1, 4, 1, 1)
self.label = QLabel(self.groupBox_2) self.label = QLabel(self.groupBox_2)
self.label.setObjectName(u"label") self.label.setObjectName(u"label")
self.label.setFont(font) self.label.setFont(font)
self.label.setAlignment(Qt.AlignmentFlag.AlignCenter) self.label.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.horizontalLayout.addWidget(self.label) self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1)
self.doubleSpinBox_bandPassLow = QDoubleSpinBox(self.groupBox_2)
self.doubleSpinBox_bandPassLow.setObjectName(u"doubleSpinBox_bandPassLow")
self.doubleSpinBox_bandPassLow.setFont(font)
self.doubleSpinBox_bandPassLow.setMaximum(100.000000000000000)
self.gridLayout_2.addWidget(self.doubleSpinBox_bandPassLow, 1, 3, 1, 1)
self.spinBox_bandPassOrder = QSpinBox(self.groupBox_2) self.spinBox_bandPassOrder = QSpinBox(self.groupBox_2)
self.spinBox_bandPassOrder.setObjectName(u"spinBox_bandPassOrder") self.spinBox_bandPassOrder.setObjectName(u"spinBox_bandPassOrder")
@ -85,35 +113,20 @@ class Ui_MainWindow_label_check_input_setting(object):
self.spinBox_bandPassOrder.setMaximum(10) self.spinBox_bandPassOrder.setMaximum(10)
self.spinBox_bandPassOrder.setValue(0) self.spinBox_bandPassOrder.setValue(0)
self.horizontalLayout.addWidget(self.spinBox_bandPassOrder) self.gridLayout_2.addWidget(self.spinBox_bandPassOrder, 1, 1, 1, 1)
self.label_3 = QLabel(self.groupBox_2) self.radioButton_skip_process = QRadioButton(self.groupBox_2)
self.label_3.setObjectName(u"label_3") self.radioButton_skip_process.setObjectName(u"radioButton_skip_process")
self.label_3.setFont(font) self.radioButton_skip_process.setFont(font)
self.label_3.setAlignment(Qt.AlignmentFlag.AlignCenter) self.radioButton_skip_process.setChecked(True)
self.horizontalLayout.addWidget(self.label_3) self.gridLayout_2.addWidget(self.radioButton_skip_process, 0, 0, 1, 3)
self.doubleSpinBox_bandPassLow = QDoubleSpinBox(self.groupBox_2) self.radioButton_bandpass_process = QRadioButton(self.groupBox_2)
self.doubleSpinBox_bandPassLow.setObjectName(u"doubleSpinBox_bandPassLow") self.radioButton_bandpass_process.setObjectName(u"radioButton_bandpass_process")
self.doubleSpinBox_bandPassLow.setFont(font) self.radioButton_bandpass_process.setFont(font)
self.doubleSpinBox_bandPassLow.setMaximum(100.000000000000000)
self.horizontalLayout.addWidget(self.doubleSpinBox_bandPassLow) self.gridLayout_2.addWidget(self.radioButton_bandpass_process, 0, 3, 1, 3)
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.doubleSpinBox_bandPassHigh = QDoubleSpinBox(self.groupBox_2)
self.doubleSpinBox_bandPassHigh.setObjectName(u"doubleSpinBox_bandPassHigh")
self.doubleSpinBox_bandPassHigh.setFont(font)
self.doubleSpinBox_bandPassHigh.setMaximum(100.000000000000000)
self.horizontalLayout.addWidget(self.doubleSpinBox_bandPassHigh)
self.verticalLayout_5.addWidget(self.groupBox_2) self.verticalLayout_5.addWidget(self.groupBox_2)
@ -197,9 +210,11 @@ class Ui_MainWindow_label_check_input_setting(object):
self.groupBox_file_path_input_signal.setTitle(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u9884\u5904\u7406\u540e\u7684\u4fe1\u53f7\u8def\u5f84", None)) self.groupBox_file_path_input_signal.setTitle(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u9884\u5904\u7406\u540e\u7684\u4fe1\u53f7\u8def\u5f84", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None)) self.label_2.setText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u5e26\u901a\u6ee4\u6ce2\u8bbe\u7f6e", None)) self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u5e26\u901a\u6ee4\u6ce2\u8bbe\u7f6e", None))
self.label.setText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u9636\u6570", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u622a\u6b62\u9891\u7387(Hz)", None)) self.label_3.setText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u622a\u6b62\u9891\u7387(Hz)", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"~", None)) self.label_4.setText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"~", None))
self.label.setText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u9636\u6570", None))
self.radioButton_skip_process.setText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u4e0d\u6ee4\u6ce2", None))
self.radioButton_bandpass_process.setText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u5e26\u901a\u6ee4\u6ce2", None))
self.plainTextEdit_file_path_input_signal.setPlainText("") self.plainTextEdit_file_path_input_signal.setPlainText("")
self.plainTextEdit_file_path_input_signal.setPlaceholderText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) self.plainTextEdit_file_path_input_signal.setPlaceholderText(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_peak.setTitle(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u7b97\u6cd5\u5b9a\u4f4d\u7684\u5cf0\u503c\u8def\u5f84", None)) self.groupBox_file_path_input_peak.setTitle(QCoreApplication.translate("MainWindow_label_check_input_setting", u"\u7b97\u6cd5\u5b9a\u4f4d\u7684\u5cf0\u503c\u8def\u5f84", None))

View File

@ -80,8 +80,50 @@
<property name="title"> <property name="title">
<string>带通滤波设置</string> <string>带通滤波设置</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QGridLayout" name="gridLayout_2">
<item> <item row="1" column="2">
<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 row="1" column="5">
<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>
<item row="1" column="4">
<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 row="1" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
@ -96,7 +138,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="3">
<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 row="1" column="1">
<widget class="QSpinBox" name="spinBox_bandPassOrder"> <widget class="QSpinBox" name="spinBox_bandPassOrder">
<property name="font"> <property name="font">
<font> <font>
@ -114,57 +168,30 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="0" colspan="3">
<widget class="QLabel" name="label_3"> <widget class="QRadioButton" name="radioButton_skip_process">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>12</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>截止频率(Hz)</string> <string>不滤波</string>
</property> </property>
<property name="alignment"> <property name="checked">
<set>Qt::AlignmentFlag::AlignCenter</set> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="3" colspan="3">
<widget class="QDoubleSpinBox" name="doubleSpinBox_bandPassLow"> <widget class="QRadioButton" name="radioButton_bandpass_process">
<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_4">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>12</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>~</string> <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> </property>
</widget> </widget>
</item> </item>