Compare commits

..

180 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
170926ddd0 优化了部分代码结构 2025-06-11 23:35:13 +08:00
647509cf4a 优化了部分代码结构 2025-06-11 23:34:12 +08:00
cc7e246d65 优化了部分代码结构 2025-06-11 23:33:09 +08:00
8010d7c250 优化了部分代码结构;
修改了复选框的样式
2025-06-11 11:09:48 +08:00
30b041d945 Merge branch 'master' into cxh_dev 2025-06-11 10:12:23 +08:00
3c60f769ca 修复了导入设置窗口活动的情况下,关闭模块窗口或点击了开始导入后,导入设置未同时关闭的问题 2025-06-11 08:37:24 +08:00
07223f222b 新增了手动切换深浅色模式的功能 2025-06-11 00:28:59 +08:00
8d3408aac3 修复了<睡眠呼吸暂停事件标注>中逐帧检查模式下复原按钮功能异常的问题 2025-06-10 22:16:18 +08:00
fede37f5c5 Merge remote-tracking branch 'origin/master' 2025-06-10 22:07:37 +08:00
34e52e25aa 修复了<数据精对齐>中相关对齐步骤选取峰值后点击重新选取却未能重置选取的峰值的问题 2025-06-10 22:07:22 +08:00
09efee5635 纠正了部分界面的信号名称规范 2025-06-10 19:50:51 +08:00
15bccb2da1 优化了所有按钮的点击体验 2025-06-10 19:45:08 +08:00
af1a0ec531 软件界面适配深色模式
修改了<体动标注>中按钮的颜色显示规则
2025-06-10 17:43:36 +08:00
3224df78e8 Merge branch 'master' into cxh_dev 2025-06-10 14:24:57 +08:00
bbd043cf58 优化代码格式 2025-06-10 13:46:33 +08:00
1a0284db16 更新README 2025-06-10 13:37:26 +08:00
32ceb1471f 点击功能模块时,程序将自动检查并获取数据文件的采样率,若能获取成功,则将数值填入导入设置的采样率中。若获取失败,则弹窗提示并填入yaml配置文件中的预设采样率。 2025-06-10 13:35:50 +08:00
953136c9c5 将<人工纠正>和<呼吸可用性及间期标注>的左键寻峰增加峰值修改为了通过有上限下限的矩形来获取峰值坐标 2025-06-10 12:07:11 +08:00
7b8fe62af8 Merge branch 'master' into cxh_dev 2025-06-09 21:20:47 +08:00
422030442c 修复了<数据精对齐>中重新选取区域导致的路径拼接错误的问题 2025-06-09 19:28:45 +08:00
e26ee7440f 优化数据处理逻辑,确保在无体动情况下仍能正确读取和标记数据 2025-06-08 21:27:21 +08:00
b0cf96615f Merge remote-tracking branch 'origin/cxh_dev' into cxh_dev 2025-06-08 17:22:25 +08:00
7b926cd25d 优化examine_file方法,确保文件名和后缀匹配 2025-06-08 17:22:01 +08:00
626377d406 Merge branch 'master' into cxh_dev 2025-06-08 17:21:42 +08:00
77882fe74c 优化examine_file方法,确保文件名和后缀匹配 2025-06-08 17:21:23 +08:00
cf1ad1d2df 修复了<数据精对齐>中无法重新选取区域的问题 2025-06-08 16:24:11 +08:00
3dd61f4641 修复了<呼吸可用性及间期标注>中无法重置尺度的问题 2025-06-08 14:56:33 +08:00
c6bd99cc74 完善了<体动标注>的体动合并规则 2025-06-08 12:45:04 +08:00
5306c580fa Merge branch 'master' into cxh_dev 2025-06-07 15:56:19 +08:00
dcf703121c 调整了setHighDpiScaleFactorRoundingPolicy的执行顺序,在app示例创建前进行设置 2025-06-06 22:47:31 +08:00
3a4c011a02 详细了预测J峰和R峰时发生错误的提示信息 2025-06-05 21:58:28 +08:00
29d4722c32 修复了几处按钮状态错误的问题 2025-06-05 21:43:02 +08:00
b4d508d31c 1、将所有模块设置为点击开始导入后就禁用导入设置和开始导入按钮 2025-06-05 21:27:30 +08:00
4c8ce6415a Merge branch 'master' into cxh_dev 2025-06-05 00:27:59 +08:00
c46916a4ef 添加ECG自动获取区间功能,优化相关提示信息 2025-06-04 22:26:32 +08:00
0c09cee828 1、修复了<数据粗同步>中,输入截断位置前端(_Pre)大于信号长度-后端(_Post)时,系统未正确校验并弹窗提示错误,导致应用操作失败的问题 2025-06-04 22:12:32 +08:00
06af421ce0 1、修复了修改采样率后保存数据时保存错误的问题。
2、删去了导入设置中,保存路径随着采样率变化而变化的功能,即采样率变化时将不再把实际的文件保存路径输出到文本框中显示
2025-06-04 21:59:24 +08:00
d329476521 1、修复了几处保存路径不存在时无法正确提示的问题 2025-06-04 20:27:03 +08:00
56149d47e9 1、修复了其他几个模块的Permission Denied时无法正确提示的问题
2、为这些模块重新添加了手动保存的功能,当内容尚未成功保存到磁盘时,内容将暂存到内存中,正确操作后手动点击手动保存将能正确保存结果
2025-06-04 20:12:28 +08:00
064422fe9d 移除冗余的提示信息输出,优化代码结构 2025-06-04 16:57:14 +08:00
fc22c1164e Merge branch 'master' into cxh_dev 2025-06-04 16:32:45 +08:00
65f0b9a1fa 清空并更新ID下拉框,设置默认选中项 2025-06-04 16:31:54 +08:00
364d475d19 精对齐添加通过粗对齐获取对应ECG区间的功能,优化相关提示信息 2025-06-04 15:35:48 +08:00
65f8bef694 1、修复了只读权限下保存csv时,无法正确保存的问题,当无法正确保存时,程序将输出较为直观的提示信息
2、对多处保存路径进行了空值检测,为空值时程序将输出较为直观的提示信息
2025-06-04 00:29:18 +08:00
ba2de0df39 修复了多处滤波器的滤波参数不判断是否合法的问题
当滤波器阶数为0时,将输出原始信号
2025-06-03 23:56:36 +08:00
7197994019 修复多处的Result结果未return的问题 2025-06-03 23:23:26 +08:00
454d068626 修复了主菜单中样本ID显示错误的问题
禁用了根目录路径的手动输入
2025-06-03 22:31:15 +08:00
b84c9915c0 修复了<呼吸可用性及间期标注>中无法绘制最后一个片段的信号的问题 2025-06-02 20:38:32 +08:00
dfbc383706 修复配置参数引用,统一使用Params替代ConfigParams 2025-06-02 20:27:47 +08:00
dd1efc8009 Merge branch 'master' into cxh_dev
# Conflicts:
#	func/Module_approximately_align.py
2025-06-02 20:24:11 +08:00
e200c2a488 添加采样率估计功能,优化界面布局和交互逻辑 2025-06-02 20:19:40 +08:00
31a6160c97 修复了<呼吸可用性及间期标注>中绘图失败的问题 2025-05-30 20:46:15 +08:00
e23f3e8ee0 新增了第一次打开<人工纠正>时就保存纠正后的文件的功能 2025-05-29 22:07:37 +08:00
80ffbbcc69 更新README 2025-05-29 21:40:00 +08:00
6494dc8478 新增了<呼吸可用性及间期标注>的体动分类显示的功能 2025-05-29 21:30:25 +08:00
afc93cf498 修复了<BCG的质量标注>中体动显示异常的问题 2025-05-29 21:21:02 +08:00
e379aa6a4a 更新了<BCG的质量标注>和<呼吸可用性及间期标注>的界面 2025-05-29 21:13:44 +08:00
b01e2f1161 修复了路径不存在时无法正确创建文件夹的问题 2025-05-29 14:05:52 +08:00
6b7ba17c6a 完善了<体动标注>中体动选取区域的判别功能 2025-05-29 13:49:44 +08:00
5b7516985f 更新README 2025-05-28 22:07:02 +08:00
13cf749a99 新增脚本filename_regulation_generator.py,有命名规范需要修改时,只需要修改ConfigParams.py的Filename类里面的变量的值,之后直接运行脚本filename_regulation_generator.py即可获取最新版本的数据结构化输入和输出命名规范.html 2025-05-28 22:04:49 +08:00
ee4df5ee93 1、修复了一处文件命名错误
2、添加了一条TODO LIST
2025-05-28 12:59:06 +08:00
29056a96f3 修复了<数据精对齐>中粗对齐虚线位置显示错误的问题 2025-05-27 21:12:55 +08:00
fd184c6384 修复了<呼吸可用性及间期标注>中点击应用并计算进行重新滤波后按钮全部被禁用的问题 2025-05-27 20:34:59 +08:00
wst
976244b3b4 修复了在<数据精对齐>中粗同步结果导入路径错误的问题
修复了在<BCG的J峰算法定位>中模型获取失败时导致的错误
2025-05-23 16:31:05 +08:00
9d88b6ab37 更新TODOLIST 2025-05-23 14:34:48 +08:00
0411966ed0 删除了若干个功能的导出标签按钮,因为其用处不大 2025-05-23 10:42:01 +08:00
6a325ba95b 完成了<BCG的质量标注>的代码重构 2025-05-23 10:25:25 +08:00
54f3852b01 修复了<数据粗同步>的保存路径错误的问题 2025-05-22 21:15:13 +08:00
196ee81a6f 完成了<BCG质量标注>的UI界面 2025-05-22 19:30:28 +08:00
a321dc5bd4 在导入数据时,将校验数据的扩展名是否合法 2025-05-22 17:12:58 +08:00
94b883032d 更改了体动的保存名称 2025-05-22 16:59:52 +08:00
b57bd9e7fa 完成了<呼吸可用性及间期标注>的代码重构
修复了<人工纠正>中多次寻峰时会保存多个相同峰值横坐标的问题
2025-05-22 15:58:29 +08:00
17b896e49d 优化了检查体动标签正确性的代码 2025-05-22 10:50:51 +08:00
c6778b5548 优化了导入数据的代码
更新README
2025-05-22 10:38:47 +08:00
a7758e502e 优化了重置绘图的代码 2025-05-22 10:02:32 +08:00
85a69648e0 优化了重置绘图的代码 2025-05-22 09:50:03 +08:00
99d355be6b 优化散点图绘制,添加坐标轴标签和零水平线 2025-05-21 21:58:39 +08:00
c9b5e35867 修复一处显示错误 2025-05-21 20:21:33 +08:00
424943e640 完成了<呼吸可用性及间期标注>的UI 2025-05-21 19:33:21 +08:00
d8d24fb9c2 完成了<睡眠呼吸暂停事件标注>的代码重构 2025-05-21 17:08:52 +08:00
0bada2dec9 完成了<睡眠呼吸暂停事件标注>的代码重构 2025-05-21 17:07:32 +08:00
d34cca1ff5 限制了<体动标注>的时间输入的类型 2025-05-21 16:25:46 +08:00
7516ffa469 优化了<体动标注>的表格样式 2025-05-21 15:37:07 +08:00
455db3f400 优化了<体动标注>的数据保存 2025-05-21 14:15:51 +08:00
88b2a0875a 优化了<体动标注>的数据导入 2025-05-21 14:09:23 +08:00
4ec1a69093 体动选取区域的判别尚未做的很完整,选中多个已有的体动的区域时可能会出现问题 2025-05-21 13:09:16 +08:00
74d9642be9 添加了<体动标注>的重采样
根据规范修改变量名称
2025-05-21 10:28:46 +08:00
f1447596b0 添加了<数据精同步>的重采样,并且OrgBCG的采样率在切割前后都将保持一致 2025-05-21 09:48:02 +08:00
4f150300fb 添加了<数据预处理>的重采样 2025-05-21 09:33:30 +08:00
6215399cf7 修复了文件夹不存在时无法保存的问题 2025-05-20 21:39:22 +08:00
497e1ced27 优化<数据粗同步>的代码 2025-05-20 21:27:31 +08:00
db07be0ca7 优化<冗余数据切割和标签映射>的代码
删去了<冗余数据切割和标签映射>的自动最大化
2025-05-20 21:02:03 +08:00
900912090a 优化<数据精同步>的代码 2025-05-20 20:25:45 +08:00
d2e0a61056 优化<人工纠正>的代码 2025-05-20 17:31:45 +08:00
d01dbcb5f5 修改了文件命名规则
优化<ECG的R峰算法定位>的代码
2025-05-20 17:16:26 +08:00
ec16546f47 优化<数据预处理>的代码
优化<BCG的J峰算法定位>的代码
2025-05-20 17:05:00 +08:00
60 changed files with 20012 additions and 3196 deletions

View File

@ -6,7 +6,22 @@
每个功能运行时,若./Config目录下不存在该功能对应的yaml配置文件则程序将创建一份默认的配置文件。配置文件的内容主要涉及一些对应功能的界面默认初始值的设置此配置文件可以根据用户需要自行修改或是在修改了相应参数后在导入设置界面中单击“确定”即可保存相关参数到yaml文件中。 每个功能运行时,若./Config目录下不存在该功能对应的yaml配置文件则程序将创建一份默认的配置文件。配置文件的内容主要涉及一些对应功能的界面默认初始值的设置此配置文件可以根据用户需要自行修改或是在修改了相应参数后在导入设置界面中单击“确定”即可保存相关参数到yaml文件中。
## TODO LIST
~~1、根据选定区域获取峰值时将绘制的区域设置为有上限和下限的矩形根据矩形获取到的横纵区域来计算峰值~~
~~2、体动选取区域的判别尚未做的很完整选中多个已有的体动的区域时可能会出现问题~~
~~3、部分模块在导入失败后重新导入时会出现问题已知模块有<人工纠正>、<体动标注>、<呼吸可用性及间期标注>、<睡眠呼吸暂停事件标注>,主要是涉及到按钮状态的设置,有待后续优化。当前将这些有涉及到的功能,禁止了导入数据后在不关闭界面的情况下直接重新导入~~
4、在J峰算法定位的时候滤波导致的信号偏移导致之后的峰值坐标点与实际峰值出现偏移
~~5、写一个脚本用于直接从ConfigParams.py中读取文件命名规则并直接自动化写入到一个markdown文件中。目的是方便文件命名的修改~~
~~6、<呼吸可用性及间期标注>的体动显示做一个和<BCG的质量标注>一样的可以根据勾选来显示需要显示的体动~~
~~7、各个模块中的检测父级文件夹是否存在的功能仍存在问题无法正确创建文件夹~~
~~8、将导入设置中的采样率修改为自动获取数据文件名中的采样率~~
## 1、主菜单 ## 1、主菜单

View File

@ -0,0 +1,291 @@
from markdown import markdown
from func.utils.ConfigParams import Filename, Params
markdown_text = f"""
# 文件命名规范
### 当一份数据被完整走完标注流程后,数据文件夹目录结构将会是:
.../{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}
|-{Filename.ARTIFACT_A}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.ARTIFACT_B}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.ARTIFACT_C}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_CSV}
|-{Filename.SQ_LABEL_10S}{Params.ENDSWITH_CSV}
|-{Filename.SQ_LABEL_30S}{Params.ENDSWITH_CSV}
|-{Filename.RESP_QUALITY_LABEL}{Params.ENDSWITH_TXT}
|-{Filename.THO_PEAK}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.SA_LABEL_CORRECTED}{Params.ENDSWITH_CSV}
|-{Filename.SA_LABEL_ADD}{Params.ENDSWITH_CSV}
|-{Filename.PRECISELY_ALIGN_INFO}{Params.ENDSWITH_TXT}
|-{Filename.APPROXIMATELY_ALIGN_INFO}{Params.ENDSWITH_CSV}
.../{Filename.PATH_ORGBCG_ALIGNED}/{Filename.PATH_SAMPID}
|-{Filename.BCG_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.ORGBCG_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.JPEAK_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
.../{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}
|-{Filename.ORGBCG_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.BCG_FILTER}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.JPEAK_REVISE}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.JPEAK_REVISE_CORRECTED}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
.../{Filename.PATH_ORGBCG_ORIGIN}/{Filename.PATH_SAMPID}
|-...
.../{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}
|-{Filename.ECG_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.RPEAK_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.FIVE_CLASS_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.SA_LABEL_SYNC}{Params.ENDSWITH_CSV}
|-{Filename.ABD_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.THO_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.FLOWT_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.FLOWP_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.SNORE_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.SPO2_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
.../{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}
|-{Filename.ECG_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.ECG_FILTER}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.RPEAK_FINAL}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.RPEAK_FINAL_CORRECTED}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.FIVE_CLASS_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.SA_LABEL_RAW}{Params.ENDSWITH_CSV}
|-{Filename.ABD_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.THO_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.FLOWT_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.FLOWP_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.SNORE_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.SPO2_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}
|-{Filename.STARTTIME_RAW}{Params.ENDSWITH_TXT}
.../{Filename.PATH_PSG_ORIGIN}/{Filename.PATH_SAMPID}
|-...
.../{Filename.PATH_REVEIVE_ORIGIN}
|-...
.../{Filename.PATH_REPORT}
|-...
### 1 数据粗同步
输入:
原始OrgBCG信号`./{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}/{Filename.ORGBCG_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
原始Tho信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.THO_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
原始Abd信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.ABD_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
输出:
粗同步后的位置索引:`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.APPROXIMATELY_ALIGN_INFO}{Params.ENDSWITH_CSV}`
### 2 预处理
输入:
原始OrgBCG信号`./{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}/{Filename.ORGBCG_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
原始ECG信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.ECG_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
输出:
滤波后的BCG信号`./{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}/{Filename.BCG_FILTER}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
滤波后的ECG信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.ECG_FILTER}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
### 3 数据精同步
#### 3.1 算法定位
#### 3.1.1 R峰算法定位
输入:
滤波后的ECG信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.ECG_FILTER}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
输出:
算法定位的R峰坐标`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.RPEAK_FINAL}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
#### 3.1.2 J峰算法定位
输入:
滤波后的BCG信号`./{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}/{Filename.BCG_FILTER}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
输出:
算法定位的J峰坐标`./{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}/{Filename.JPEAK_REVISE}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
#### 3.2 人工纠正
#### 3.2.1 R峰人工纠正
输入:
滤波后的ECG信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.ECG_FILTER}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
算法定位的R峰坐标`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.RPEAK_FINAL}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
粗同步后的位置索引:`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.APPROXIMATELY_ALIGN_INFO}{Params.ENDSWITH_CSV}`
输出:
人工纠正后的R峰坐标`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.RPEAK_FINAL_CORRECTED}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
#### 3.2.2 J峰人工纠正*
输入:
滤波后的BCG信号`./{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}/{Filename.BCG_FILTER}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
算法定位的J峰坐标`./{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}/{Filename.JPEAK_REVISE}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
粗同步后的位置索引:`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.APPROXIMATELY_ALIGN_INFO}{Params.ENDSWITH_CSV}`
输出:
人工纠正后的J峰坐标`./{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}/{Filename.JPEAK_REVISE_CORRECTED}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
#### 3.3 数据片段起止对齐、数据采样率同步
输入:
滤波后的ECG信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.ECG_FILTER}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
人工纠正后的R峰坐标`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.RPEAK_FINAL_CORRECTED}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
滤波后的BCG信号`./{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}/{Filename.BCG_FILTER}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
人工纠正后的J峰坐标`./{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}/{Filename.JPEAK_REVISE_CORRECTED}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
原始OrgBCG信号`./{Filename.PATH_ORGBCG_TEXT}/{Filename.PATH_SAMPID}/{Filename.ORGBCG_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
粗同步后的位置索引:`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.APPROXIMATELY_ALIGN_INFO}{Params.ENDSWITH_CSV}`
输出:
精同步对齐信息:`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.PRECISELY_ALIGN_INFO}{Params.ENDSWITH_TXT}`
同步后的ECG信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.ECG_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的R峰坐标`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.RPEAK_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的BCG信号`./{Filename.PATH_ORGBCG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.BCG_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的OrgBCG信号`./{Filename.PATH_ORGBCG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.ORGBCG_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的J峰坐标`./{Filename.PATH_ORGBCG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.JPEAK_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
#### 3.4、冗余数据切割、标签映射
输入:
精同步对齐信息:`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.PRECISELY_ALIGN_INFO}{Params.ENDSWITH_TXT}`
原始的Flow T信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.FLOWT_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
原始的Flow P信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.FLOWP_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
原始的Tho信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.THO_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
原始的Abd信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.ABD_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
原始的SpO2信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.SPO2_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
原始的Snore信号`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.SNORE_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
原始的睡眠分期标签:`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.FIVE_CLASS_RAW}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
原始的睡眠呼吸暂停事件标签:`./{Filename.PATH_PSG_TEXT}/{Filename.PATH_SAMPID}/{Filename.SA_LABEL_RAW}{Params.ENDSWITH_CSV}`
输出:
同步后的Flow T信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.FLOWT_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的Flow P信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.FLOWP_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的Tho信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.THO_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的Abd信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.ABD_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的SpO2信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.SPO2_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的Snore信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.SNORE_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的睡眠分期标签:`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.FIVE_CLASS_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的睡眠呼吸暂停事件标签:`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.SA_LABEL_SYNC}{Params.ENDSWITH_CSV}`
### 4 体动标记
输入:
同步后的BCG信号`./{Filename.PATH_ORGBCG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.BCG_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的OrgBCG信号`./{Filename.PATH_ORGBCG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.ORGBCG_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
输出:
txt格式的体动标签`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.ARTIFACT_A}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
体动标签类型数量统计:`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.ARTIFACT_B}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
csv格式的体动标签`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.ARTIFACT_C}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_CSV}`
### 5 质量评估
输入:
同步后的BCG信号`./{Filename.PATH_ORGBCG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.BCG_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
txt格式的体动标签`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.ARTIFACT_A}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
输出:
质量标签:`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.SQ_LABEL_10S}{Params.ENDSWITH_CSV}`或`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.SQ_LABEL_30S}{Params.ENDSWITH_CSV}`
### 6 呼吸提取
输入:
同步后的OrgBCG信号`./{Filename.PATH_ORGBCG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.ORGBCG_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的Tho信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.THO_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
txt格式的体动标签`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.ARTIFACT_A}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
输出:
呼吸可用性标签:`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.RESP_QUALITY_LABEL}{Params.ENDSWITH_TXT}`
Tho信号呼吸间期标签`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.THO_PEAK}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
### 8 呼吸暂停事件标注
输入:
同步后的OrgBCG信号`./{Filename.PATH_ORGBCG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.ORGBCG_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
txt格式的体动标签`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.ARTIFACT_A}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的Flow T信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.FLOWT_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的Flow P信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.FLOWP_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的Tho信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.THO_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的Abd信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.ABD_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的SpO2信号`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.SPO2_SYNC}{Filename.SUFFIX_FREQ}{Params.ENDSWITH_TXT}`
同步后的睡眠呼吸暂停事件标签:`./{Filename.PATH_PSG_ALIGNED}/{Filename.PATH_SAMPID}/{Filename.SA_LABEL_SYNC}{Params.ENDSWITH_CSV}`
输出:
修正后的呼吸暂停标签:`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.SA_LABEL_CORRECTED}{Params.ENDSWITH_CSV}`
新增的呼吸暂停标签:`./{Filename.PATH_LABEL}/{Filename.PATH_SAMPID}/{Filename.SA_LABEL_ADD}{Params.ENDSWITH_CSV}`
"""
html = markdown(markdown_text)
with open('数据结构化输入和输出命名规范.html', 'w', encoding='utf-8') as file:
file.write(html)

File diff suppressed because it is too large Load Diff

2199
func/Module_SA_label_v2.py Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,317 +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.PublicFunc import PublicFunc
from func.utils.Constants import Constants, ConfigParams
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.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) / ConfigParams.PUBLIC_PATH_PSG_TEXT / Path(str(self.sampID))),
"SaveFolder": str(Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_ALIGNED / Path(str(self.sampID))),
"InputAlignInfo": str(Path(self.root_path) / ConfigParams.PUBLIC_PATH_LABEL / Path(str(self.sampID)) / (ConfigParams.CUT_PSG_SAVE_ECG_ALIGNINFO_FILENAME + ConfigParams.ENDSWITH_TXT))
}
})
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(ConfigParams.CUT_PSG_CONFIG_FILE_PATH).exists():
with open(ConfigParams.CUT_PSG_CONFIG_FILE_PATH, "w") as f:
dump(ConfigParams.CUT_PSG_CONFIG_NEW_CONTENT, f)
with open(ConfigParams.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()
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):
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
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.CUT_PSG_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.CUT_PSG_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.CUT_PSG_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.CUT_PSG_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.CUT_PSG_FAILURE_REASON["File_not_Exist"])
except Exception as e:
return Result().failure(info=Constants.CUT_PSG_GET_FILE_AND_FREQ_FAILURE + Constants.CUT_PSG_GET_FILE_AND_FREQ_FAILURE["Get_File_and_Freq_Excepetion"] + "\n" + format_exc())
return Result().success(info=Constants.CUT_PSG_GET_FILE_AND_FREQ_FINISHED)
def open_file(self):
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=ConfigParams.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=ConfigParams.GBK_ENCODING)
self.startTime = read_csv(Path(Config["Path"]["InputFolder"]) / Path((Config["StartTime"] + Config["EndWith"]["StartTime"])),
encoding=ConfigParams.UTF8_ENCODING,
header=None).to_numpy().reshape(-1)
self.alignInfo = read_csv(Path(Config["Path"]["InputAlignInfo"]),
encoding=ConfigParams.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.CUT_PSG_FAILURE_REASON["Read_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.CUT_PSG_FAILURE_REASON["Cut_Data_Length_not_Correct"])
except Exception as e:
return Result().failure(info=Constants.CUT_PSG_CUT_DATA_FAILURE + Constants.CUT_PSG_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(ConfigParams.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.CUT_PSG_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.CUT_PSG_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.SAVING_FAILURE + Constants.CUT_PSG_FAILURE_REASON["Save_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 Exception as e:
return Result().failure(info=Constants.SAVING_FAILURE + Constants.CUT_PSG_FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.SAVING_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

@ -11,8 +11,9 @@ from overrides import overrides
from pandas import read_csv, DataFrame from pandas import read_csv, DataFrame
from yaml import dump, load, FullLoader from yaml import dump, load, FullLoader
from func.utils.ConfigParams import Filename, Params
from func.utils.PublicFunc import PublicFunc from func.utils.PublicFunc import PublicFunc
from func.utils.Constants import Constants, ConfigParams from func.utils.Constants import Constants
from func.utils.Result import Result from func.utils.Result import Result
from func.utils.detect_Jpeak import preprocess, Jpeak_Detection from func.utils.detect_Jpeak import preprocess, Jpeak_Detection
@ -50,8 +51,12 @@ class SettingWindow(QMainWindow):
self.root_path = root_path self.root_path = root_path
self.sampID = sampID self.sampID = sampID
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
self.config = None self.config = None
self.__read_config__() self.__read_config__()
self.__examine_freq__()
self.ui.spinBox_input_freq.valueChanged.connect(self.__update_ui__) self.ui.spinBox_input_freq.valueChanged.connect(self.__update_ui__)
self.ui.pushButton_confirm.clicked.connect(self.__write_config__) self.ui.pushButton_confirm.clicked.connect(self.__write_config__)
@ -59,24 +64,21 @@ class SettingWindow(QMainWindow):
self.ui.pushButton_cancel.clicked.connect(self.close) self.ui.pushButton_cancel.clicked.connect(self.close)
def __read_config__(self): def __read_config__(self):
if not Path(ConfigParams.DETECT_JPEAK_CONFIG_FILE_PATH).exists(): if not Path(Params.DETECT_JPEAK_CONFIG_FILE_PATH).exists():
with open(ConfigParams.DETECT_JPEAK_CONFIG_FILE_PATH, "w") as f: with open(Params.DETECT_JPEAK_CONFIG_FILE_PATH, "w") as f:
dump(ConfigParams.DETECT_JPEAK_CONFIG_NEW_CONTENT, f) dump(Params.DETECT_JPEAK_CONFIG_NEW_CONTENT, f)
with open(ConfigParams.DETECT_JPEAK_CONFIG_FILE_PATH, "r") as f: with open(Params.DETECT_JPEAK_CONFIG_FILE_PATH, "r") as f:
file_config = load(f.read(), Loader=FullLoader) file_config = load(f.read(), Loader=FullLoader)
Config.update(file_config) Config.update(file_config)
self.config = file_config self.config = file_config
Config.update({ Config.update({
"Path": { "Path": {
"Input": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_ORGBCG_TEXT / "Input": str((Path(self.root_path) / Filename.PATH_ORGBCG_TEXT /
Path(str(self.sampID)) / Path(ConfigParams.DETECT_JPEAK_INPUT_BCG_FILENAME + Path(str(self.sampID)))),
str(Config["InputConfig"]["Freq"]) + "Save": str((Path(self.root_path) / Filename.PATH_ORGBCG_TEXT /
ConfigParams.ENDSWITH_TXT))), Path(str(self.sampID))))
"Save": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_ORGBCG_TEXT /
Path(str(self.sampID)) / Path(ConfigParams.DETECT_JPEAK_SAVE_FILENAME +
ConfigParams.ENDSWITH_TXT)))
} }
}) })
@ -97,7 +99,7 @@ class SettingWindow(QMainWindow):
self.config["InputConfig"]["Freq"] = self.ui.spinBox_input_freq.value() self.config["InputConfig"]["Freq"] = self.ui.spinBox_input_freq.value()
self.config["ModelFolderPath"] = self.ui.plainTextEdit_deepmodel_path.toPlainText() self.config["ModelFolderPath"] = self.ui.plainTextEdit_deepmodel_path.toPlainText()
with open(ConfigParams.DETECT_JPEAK_CONFIG_FILE_PATH, "w") as f: with open(Params.DETECT_JPEAK_CONFIG_FILE_PATH, "w") as f:
dump(self.config, f) dump(self.config, f)
self.close() self.close()
@ -108,11 +110,24 @@ class SettingWindow(QMainWindow):
def __update_ui__(self): def __update_ui__(self):
self.ui.plainTextEdit_file_path_input.setPlainText( self.ui.plainTextEdit_file_path_input.setPlainText(
str((Path(self.root_path) / str((Path(self.root_path) /
ConfigParams.PUBLIC_PATH_ORGBCG_TEXT / Filename.PATH_ORGBCG_TEXT /
Path(str(self.sampID)) / Path(str(self.sampID)) /
Path(ConfigParams.DETECT_JPEAK_INPUT_BCG_FILENAME + Path(Filename.BCG_FILTER +
str(self.ui.spinBox_input_freq.value()) + str(self.ui.spinBox_input_freq.value()) +
ConfigParams.ENDSWITH_TXT)))) Params.ENDSWITH_TXT))))
def __examine_freq__(self):
if Path(Config["Path"]["Input"]).is_file():
Config["Path"]["Input"] = str(Path(Config["Path"]["Input"]).parent)
result = PublicFunc.examine_file(Config["Path"]["Input"], Filename.BCG_FILTER, Params.ENDSWITH_TXT)
if result.status:
Config["InputConfig"]["Freq"] = result.data["freq"]
else:
PublicFunc.msgbox_output(self, Filename.BCG_FILTER + Constants.FAILURE_REASON["Get_Freq_Not_Correct"], Constants.MSGBOX_TYPE_ERROR)
# 数据回显
self.ui.spinBox_input_freq.setValue(Config["InputConfig"]["Freq"])
class MainWindow_detect_Jpeak(QMainWindow): class MainWindow_detect_Jpeak(QMainWindow):
@ -141,6 +156,9 @@ class MainWindow_detect_Jpeak(QMainWindow):
self.gs = None self.gs = None
self.ax0 = None self.ax0 = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
self.msgBox = QMessageBox() self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE) self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@ -165,7 +183,7 @@ class MainWindow_detect_Jpeak(QMainWindow):
self.fig.subplots_adjust(top=0.98, bottom=0.05, right=0.98, left=0.1, hspace=0, wspace=0) self.fig.subplots_adjust(top=0.98, bottom=0.05, right=0.98, left=0.1, hspace=0, wspace=0)
self.ax0 = self.fig.add_subplot(self.gs[0]) self.ax0 = self.fig.add_subplot(self.gs[0])
self.ax0.grid(True) self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax0.xaxis.set_major_formatter(Params.FORMATTER)
PublicFunc.__resetAllButton__(self, ButtonState) PublicFunc.__resetAllButton__(self, ButtonState)
@ -189,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):
@ -200,9 +220,11 @@ class MainWindow_detect_Jpeak(QMainWindow):
QApplication.processEvents() QApplication.processEvents()
# 清空画框 # 清空画框
self.ax0.clear() if self.ax0 is not None:
self.ax0.clear()
# 释放资源 # 释放资源
self.setting.close()
del self.data del self.data
del self.model del self.model
self.fig.clf() self.fig.clf()
@ -216,7 +238,6 @@ class MainWindow_detect_Jpeak(QMainWindow):
def __reset__(self): def __reset__(self):
ButtonState["Current"].update(ButtonState["Default"].copy()) ButtonState["Current"].update(ButtonState["Default"].copy())
ButtonState["Current"]["pushButton_view"] = True
def __plot__(self): def __plot__(self):
# 清空画框 # 清空画框
@ -237,12 +258,13 @@ class MainWindow_detect_Jpeak(QMainWindow):
self.ax0.legend(loc=Constants.PLOT_UPPER_RIGHT) self.ax0.legend(loc=Constants.PLOT_UPPER_RIGHT)
self.canvas.draw() self.canvas.draw()
return Result().success(info=Constants.DRAWING_FINISHED) return Result().success(info=Constants.DRAW_FINISHED)
else: else:
self.canvas.draw() self.canvas.draw()
return Result().failure(info=Constants.DRAWING_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()
@ -251,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)
@ -288,14 +314,18 @@ class MainWindow_detect_Jpeak(QMainWindow):
else: else:
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)
self.__reset__() self.setting.close()
ButtonState["Current"]["pushButton_input_setting"] = False
ButtonState["Current"]["pushButton_input"] = False
ButtonState["Current"]["pushButton_view"] = True
ButtonState["Current"]["pushButton_save"] = False
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
def __slot_btn_view__(self): def __slot_btn_view__(self):
PublicFunc.__disableAllButton__(self, ButtonState) PublicFunc.__disableAllButton__(self, ButtonState)
# 数据预处理 # 数据预处理
PublicFunc.progressbar_update(self, 1, 3, Constants.DETECT_JPEAK_PROCESSING_DATA, 0) PublicFunc.progressbar_update(self, 1, 3, Constants.PREPROCESSING_DATA, 0)
result = self.data.preprocess() result = self.data.preprocess()
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, "(1/3)" + result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(1/3)" + result.info, Constants.TIPS_TYPE_ERROR)
@ -308,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)
@ -350,15 +381,18 @@ class MainWindow_detect_Jpeak(QMainWindow):
PublicFunc.progressbar_update(self, 1, 1, Constants.SAVING_DATA, 0) PublicFunc.progressbar_update(self, 1, 1, Constants.SAVING_DATA, 0)
total_rows = len(DataFrame(self.data.peak.reshape(-1))) total_rows = len(DataFrame(self.data.peak.reshape(-1)))
chunk_size = ConfigParams.DETECT_JPEAK_SAVE_CHUNK_SIZE chunk_size = Params.DETECT_JPEAK_SAVE_CHUNK_SIZE
with open(Config["Path"]["Save"], 'w') as f: try:
for start in range(0, total_rows, chunk_size): with open(Config["Path"]["Save"], 'w') as f:
end = min(start + chunk_size, total_rows) for start in range(0, total_rows, chunk_size):
chunk = DataFrame(self.data.peak.reshape(-1)).iloc[start:end] end = min(start + chunk_size, total_rows)
result = self.data.save(chunk) chunk = DataFrame(self.data.peak.reshape(-1)).iloc[start:end]
progress = int((end / total_rows) * 100) result = self.data.save(chunk)
self.progressbar.setValue(progress) progress = int((end / total_rows) * 100)
QApplication.processEvents() self.progressbar.setValue(progress)
QApplication.processEvents()
except FileNotFoundError as e:
result = Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
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)
@ -374,7 +408,7 @@ class MainWindow_detect_Jpeak(QMainWindow):
def reset_axes(self): def reset_axes(self):
self.ax0.clear() self.ax0.clear()
self.ax0.grid(True) self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax0.xaxis.set_major_formatter(Params.FORMATTER)
def update_ui_comboBox_model(self, model_list): def update_ui_comboBox_model(self, model_list):
self.ui.comboBox_model.clear() self.ui.comboBox_model.clear()
@ -390,41 +424,65 @@ class Data:
self.interval = None self.interval = None
def open_file(self): def open_file(self):
if not Path(Config["Path"]["Input"]).exists(): if Path(Config["Path"]["Input"]).is_file():
return Result().failure(info=Constants.INPUT_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Data_Path_Not_Exist"]) Config["Path"]["Input"] = str(Path(Config["Path"]["Input"]).parent)
result = PublicFunc.examine_file(Config["Path"]["Input"], Filename.BCG_FILTER, Params.ENDSWITH_TXT)
if result.status:
Config["Path"]["Input"] = result.data["path"]
Config["InputConfig"]["Freq"] = result.data["freq"]
Config["Path"]["Save"] = str(
Path(Config["Path"]["Save"]) / Path(Filename.JPEAK_REVISE + str(Config["InputConfig"]["Freq"]) + Params.ENDSWITH_TXT))
else:
return result
try: try:
self.raw_data = read_csv(Config["Path"]["Input"], self.raw_data = read_csv(Config["Path"]["Input"],
encoding=ConfigParams.UTF8_ENCODING, encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1) header=None).to_numpy().reshape(-1)
except Exception as e: except Exception as e:
return Result().failure(info=Constants.INPUT_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Read_Data_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.INPUT_FAILURE +
Constants.FAILURE_REASON["Open_Data_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.INPUT_FINISHED) return Result().success(info=Constants.INPUT_FINISHED)
def preprocess(self): def preprocess(self):
if self.raw_data is None: if self.raw_data is None:
return Result().failure(info=Constants.DETECT_JPEAK_PROCESS_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Raw_Data_Not_Exist"]) return Result().failure(info=Constants.PREPROCESS_FAILURE +
Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
self.processed_data = preprocess(self.raw_data, if Config["Filter"]["Mode"] == "skip":
Config["InputConfig"]["Freq"], self.processed_data = self.raw_data[:len(self.raw_data) // (Config["InputConfig"]["Freq"] * 10) * Config["InputConfig"]["Freq"] * 10]
Config["Filter"]["BandPassLow"], return Result().success(info=Constants.PREPROCESS_NO_NEED)
Config["Filter"]["BandPassHigh"], elif Config["Filter"]["Mode"] == "bandpass":
Config["AmpValue"]) if ((Config["Filter"]["BandPassLow"] >= Config["Filter"]["BandPassHigh"]) or
(Config["Filter"]["BandPassLow"] <= 0) or (Config["Filter"]["BandPassHigh"] <= 0)):
return Result().failure(
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"],
Config["AmpValue"])
return Result().success(info=Constants.PREPROCESS_FINISHED)
except Exception as e: except Exception as e:
return Result().failure(info=Constants.DETECT_JPEAK_PROCESS_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Filter_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.PREPROCESS_FAILURE +
Constants.FAILURE_REASON["Preprocess_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.DETECT_JPEAK_PROCESS_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 + Constants.DETECT_JPEAK_FAILURE_REASON["Model_File_Not_Exist"]) return Result().failure(info=Constants.DETECT_JPEAK_PREDICT_FAILURE +
Constants.FAILURE_REASON["Model_File_Not_Exist"])
if self.processed_data is None: if self.processed_data is None:
return Result().failure(info=Constants.DETECT_JPEAK_PREDICT_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Processed_Data_Not_Exist"]) return Result().failure(info=Constants.DETECT_JPEAK_PREDICT_FAILURE +
Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
if Config["IntervalLow"] >= Config["IntervalHigh"]:
return Result().failure(
info=Constants.DETECT_JPEAK_PREDICT_FAILURE + Constants.FAILURE_REASON["Interval_Args_Not_Correct"])
self.peak, self.interval = Jpeak_Detection(model.selected_model, self.peak, self.interval = Jpeak_Detection(model.selected_model,
Path(model.model_folder_path) / Path(model.selected_model), Path(model.model_folder_path) / Path(model.selected_model),
self.processed_data, self.processed_data,
@ -432,22 +490,28 @@ 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 + Constants.DETECT_JPEAK_FAILURE_REASON["Predict_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.DETECT_JPEAK_PREDICT_FAILURE +
Constants.FAILURE_REASON["Predict_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.DETECT_JPEAK_PREDICT_FINISHED) return Result().success(info=Constants.DETECT_JPEAK_PREDICT_FINISHED)
def save(self, chunk): def save(self, chunk):
if self.peak is None: if self.peak is None:
return Result().failure(info=Constants.SAVING_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Peak_Not_Exist"]) return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
chunk.to_csv(Config["Path"]["Save"], mode='a', index=False, header=False) chunk.to_csv(Config["Path"]["Save"], mode='a', index=False, header=False)
except PermissionError as e:
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
except Exception as e: except Exception as e:
return Result().failure(info=Constants.SAVING_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Save_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.SAVE_FAILURE +
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.SAVING_FINISHED) return Result().success(info=Constants.SAVE_FINISHED)
class Model: class Model:
@ -460,13 +524,13 @@ class Model:
def seek_model(self): def seek_model(self):
if not Path(Config["ModelFolderPath"]).exists(): if not Path(Config["ModelFolderPath"]).exists():
return Result().failure(info=Constants.DETECT_JPEAK_LOAD_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Model_Path_Not_Exist"]) return Result().failure(info=Constants.DETECT_JPEAK_LOAD_FAILURE + Constants.FAILURE_REASON["Model_Path_Not_Exist"])
try: try:
self.model_list = [file.name for file in Path(Config["ModelFolderPath"]).iterdir() if file.is_file()] self.model_list = [file.name for file in Path(Config["ModelFolderPath"]).iterdir() if file.is_file()]
if len(self.model_list) == 0: if len(self.model_list) == 0:
return Result().failure(info=Constants.DETECT_JPEAK_FAILURE_REASON["Model_File_Not_Exist"]) return Result().failure(info=Constants.FAILURE_REASON["Model_File_Not_Exist"])
except Exception as e: except Exception as e:
return Result().failure(info=Constants.DETECT_JPEAK_LOAD_FAILURE + Constants.DETECT_JPEAK_FAILURE_REASON["Read_Model_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.DETECT_JPEAK_LOAD_FAILURE + Constants.FAILURE_REASON["Read_Model_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.DETECT_JPEAK_LOAD_FINISHED) return Result().success(info=Constants.DETECT_JPEAK_LOAD_FINISHED)

View File

@ -11,8 +11,9 @@ from overrides import overrides
from pandas import read_csv, DataFrame from pandas import read_csv, DataFrame
from yaml import dump, load, FullLoader from yaml import dump, load, FullLoader
from func.utils.ConfigParams import Filename, Params
from func.utils.PublicFunc import PublicFunc from func.utils.PublicFunc import PublicFunc
from func.utils.Constants import Constants, ConfigParams from func.utils.Constants import Constants
from func.utils.Result import Result from func.utils.Result import Result
from func.utils.detect_Rpeak import preprocess, Rpeak_Detection, get_method from func.utils.detect_Rpeak import preprocess, Rpeak_Detection, get_method
@ -50,8 +51,12 @@ class SettingWindow(QMainWindow):
self.root_path = root_path self.root_path = root_path
self.sampID = sampID self.sampID = sampID
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
self.config = None self.config = None
self.__read_config__() self.__read_config__()
self.__examine_freq__()
self.ui.spinBox_input_freq.valueChanged.connect(self.__update_ui__) self.ui.spinBox_input_freq.valueChanged.connect(self.__update_ui__)
self.ui.pushButton_confirm.clicked.connect(self.__write_config__) self.ui.pushButton_confirm.clicked.connect(self.__write_config__)
@ -59,24 +64,21 @@ class SettingWindow(QMainWindow):
self.ui.pushButton_cancel.clicked.connect(self.close) self.ui.pushButton_cancel.clicked.connect(self.close)
def __read_config__(self): def __read_config__(self):
if not Path(ConfigParams.DETECT_RPEAK_CONFIG_FILE_PATH).exists(): if not Path(Params.DETECT_RPEAK_CONFIG_FILE_PATH).exists():
with open(ConfigParams.DETECT_RPEAK_CONFIG_FILE_PATH, "w") as f: with open(Params.DETECT_RPEAK_CONFIG_FILE_PATH, "w") as f:
dump(ConfigParams.DETECT_RPEAK_CONFIG_NEW_CONTENT, f) dump(Params.DETECT_RPEAK_CONFIG_NEW_CONTENT, f)
with open(ConfigParams.DETECT_RPEAK_CONFIG_FILE_PATH, "r") as f: with open(Params.DETECT_RPEAK_CONFIG_FILE_PATH, "r") as f:
file_config = load(f.read(), Loader=FullLoader) file_config = load(f.read(), Loader=FullLoader)
Config.update(file_config) Config.update(file_config)
self.config = file_config self.config = file_config
Config.update({ Config.update({
"Path": { "Path": {
"Input": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT / "Input": str((Path(self.root_path) / Filename.PATH_PSG_TEXT /
Path(str(self.sampID)) / Path(ConfigParams.DETECT_RPEAK_INPUT_ECG_FILENAME + Path(str(self.sampID)))),
str(Config["InputConfig"]["Freq"]) + "Save": str((Path(self.root_path) / Filename.PATH_PSG_TEXT /
ConfigParams.ENDSWITH_TXT))), Path(str(self.sampID))))
"Save": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT /
Path(str(self.sampID)) / Path(ConfigParams.DETECT_RPEAK_SAVE_FILENAME +
ConfigParams.ENDSWITH_TXT)))
} }
}) })
@ -94,7 +96,7 @@ class SettingWindow(QMainWindow):
# 保存配置到文件 # 保存配置到文件
self.config["InputConfig"]["Freq"] = self.ui.spinBox_input_freq.value() self.config["InputConfig"]["Freq"] = self.ui.spinBox_input_freq.value()
with open(ConfigParams.DETECT_RPEAK_CONFIG_FILE_PATH, "w") as f: with open(Params.DETECT_RPEAK_CONFIG_FILE_PATH, "w") as f:
dump(self.config, f) dump(self.config, f)
self.close() self.close()
@ -105,11 +107,25 @@ class SettingWindow(QMainWindow):
def __update_ui__(self): def __update_ui__(self):
self.ui.plainTextEdit_file_path_input.setPlainText( self.ui.plainTextEdit_file_path_input.setPlainText(
str((Path(self.root_path) / str((Path(self.root_path) /
ConfigParams.PUBLIC_PATH_PSG_TEXT / Filename.PATH_PSG_TEXT /
Path(str(self.sampID)) / Path(str(self.sampID)) /
Path(ConfigParams.DETECT_RPEAK_INPUT_ECG_FILENAME + Path(Filename.ECG_FILTER +
str(self.ui.spinBox_input_freq.value()) + str(self.ui.spinBox_input_freq.value()) +
ConfigParams.ENDSWITH_TXT)))) Params.ENDSWITH_TXT))))
def __examine_freq__(self):
if Path(Config["Path"]["Input"]).is_file():
Config["Path"]["Input"] = str(Path(Config["Path"]["Input"]).parent)
result = PublicFunc.examine_file(Config["Path"]["Input"], Filename.ECG_FILTER, Params.ENDSWITH_TXT)
if result.status:
Config["InputConfig"]["Freq"] = result.data["freq"]
else:
PublicFunc.msgbox_output(self, Filename.ECG_FILTER + Constants.FAILURE_REASON["Get_Freq_Not_Correct"],
Constants.MSGBOX_TYPE_ERROR)
# 数据回显
self.ui.spinBox_input_freq.setValue(Config["InputConfig"]["Freq"])
class MainWindow_detect_Rpeak(QMainWindow): class MainWindow_detect_Rpeak(QMainWindow):
@ -138,6 +154,9 @@ class MainWindow_detect_Rpeak(QMainWindow):
self.ax0 = None self.ax0 = None
self.ax1 = None self.ax1 = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
self.msgBox = QMessageBox() self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE) self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@ -162,11 +181,11 @@ class MainWindow_detect_Rpeak(QMainWindow):
self.fig.subplots_adjust(top=0.98, bottom=0.05, right=0.98, left=0.1, hspace=0, wspace=0) self.fig.subplots_adjust(top=0.98, bottom=0.05, right=0.98, left=0.1, hspace=0, wspace=0)
self.ax0 = self.fig.add_subplot(self.gs[0]) self.ax0 = self.fig.add_subplot(self.gs[0])
self.ax0.grid(True) self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax0.xaxis.set_major_formatter(Params.FORMATTER)
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE) self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
self.ax1 = self.fig.add_subplot(self.gs[1], sharex=self.ax0) self.ax1 = self.fig.add_subplot(self.gs[1], sharex=self.ax0)
self.ax1.grid(True) self.ax1.grid(True)
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax1.xaxis.set_major_formatter(Params.FORMATTER)
PublicFunc.__resetAllButton__(self, ButtonState) PublicFunc.__resetAllButton__(self, ButtonState)
@ -182,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):
@ -193,10 +214,13 @@ class MainWindow_detect_Rpeak(QMainWindow):
QApplication.processEvents() QApplication.processEvents()
# 清空画框 # 清空画框
self.ax0.clear() if self.ax0 is not None:
self.ax1.clear() self.ax0.clear()
if self.ax1 is not None:
self.ax1.clear()
# 释放资源 # 释放资源
self.setting.close()
del self.data del self.data
self.fig.clf() self.fig.clf()
plt.close(self.fig) plt.close(self.fig)
@ -209,7 +233,6 @@ class MainWindow_detect_Rpeak(QMainWindow):
def __reset__(self): def __reset__(self):
ButtonState["Current"].update(ButtonState["Default"].copy()) ButtonState["Current"].update(ButtonState["Default"].copy())
ButtonState["Current"]["pushButton_view"] = True
def __plot__(self): def __plot__(self):
# 清空画框 # 清空画框
@ -233,16 +256,21 @@ class MainWindow_detect_Rpeak(QMainWindow):
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)
self.canvas.draw() self.canvas.draw()
return Result().success(info=Constants.DRAWING_FINISHED) return Result().success(info=Constants.DRAW_FINISHED)
else: else:
self.canvas.draw() self.canvas.draw()
return Result().failure(info=Constants.DRAWING_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)
@ -261,7 +289,7 @@ class MainWindow_detect_Rpeak(QMainWindow):
# TODO获取检测方法的解耦 # TODO获取检测方法的解耦
method_list = get_method() method_list = get_method()
if len(method_list) == 0 or method_list is None: if len(method_list) == 0 or method_list is None:
result = Result().failure(info=Constants.DETECT_RPEAK_LOAD_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Method_Not_Exist"]) result = Result().failure(info=Constants.DETECT_RPEAK_LOAD_FAILURE + Constants.FAILURE_REASON["Method_Not_Exist"])
else: else:
result = Result().success(info=Constants.DETECT_RPEAK_LOAD_FINISHED) result = Result().success(info=Constants.DETECT_RPEAK_LOAD_FINISHED)
if not result.status: if not result.status:
@ -284,14 +312,18 @@ class MainWindow_detect_Rpeak(QMainWindow):
else: else:
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)
self.__reset__() self.setting.close()
ButtonState["Current"]["pushButton_input_setting"] = False
ButtonState["Current"]["pushButton_input"] = False
ButtonState["Current"]["pushButton_view"] = True
ButtonState["Current"]["pushButton_save"] = False
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
def __slot_btn_view__(self): def __slot_btn_view__(self):
PublicFunc.__disableAllButton__(self, ButtonState) PublicFunc.__disableAllButton__(self, ButtonState)
# 数据预处理 # 数据预处理
PublicFunc.progressbar_update(self, 1, 3, Constants.DETECT_RPEAK_PROCESSING_DATA, 0) PublicFunc.progressbar_update(self, 1, 3, Constants.PREPROCESSING_DATA, 0)
result = self.data.preprocess() result = self.data.preprocess()
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, "(1/3)" + result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(1/3)" + result.info, Constants.TIPS_TYPE_ERROR)
@ -345,15 +377,18 @@ class MainWindow_detect_Rpeak(QMainWindow):
PublicFunc.progressbar_update(self, 1, 1, Constants.SAVING_DATA, 0) PublicFunc.progressbar_update(self, 1, 1, Constants.SAVING_DATA, 0)
total_rows = len(DataFrame(self.data.peak.reshape(-1))) total_rows = len(DataFrame(self.data.peak.reshape(-1)))
chunk_size = ConfigParams.DETECT_RPEAK_SAVE_CHUNK_SIZE chunk_size = Params.DETECT_RPEAK_SAVE_CHUNK_SIZE
with open(Config["Path"]["Save"], 'w') as f: try:
for start in range(0, total_rows, chunk_size): with open(Config["Path"]["Save"], 'w') as f:
end = min(start + chunk_size, total_rows) for start in range(0, total_rows, chunk_size):
chunk = DataFrame(self.data.peak.reshape(-1)).iloc[start:end] end = min(start + chunk_size, total_rows)
result = self.data.save(chunk) chunk = DataFrame(self.data.peak.reshape(-1)).iloc[start:end]
progress = int((end / total_rows) * 100) result = self.data.save(chunk)
self.progressbar.setValue(progress) progress = int((end / total_rows) * 100)
QApplication.processEvents() self.progressbar.setValue(progress)
QApplication.processEvents()
except FileNotFoundError as e:
result = Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
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)
@ -370,10 +405,10 @@ class MainWindow_detect_Rpeak(QMainWindow):
self.ax0.clear() self.ax0.clear()
self.ax1.clear() self.ax1.clear()
self.ax0.grid(True) self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax0.xaxis.set_major_formatter(Params.FORMATTER)
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE) self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
self.ax1.grid(True) self.ax1.grid(True)
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax1.xaxis.set_major_formatter(Params.FORMATTER)
def update_ui_comboBox_method(self, method_list): def update_ui_comboBox_method(self, method_list):
self.ui.comboBox_method.clear() self.ui.comboBox_method.clear()
@ -390,35 +425,55 @@ class Data:
self.RRIV = None self.RRIV = None
def open_file(self): def open_file(self):
if not Path(Config["Path"]["Input"]).exists(): if Path(Config["Path"]["Input"]).is_file():
return Result().failure(info=Constants.INPUT_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Data_Path_Not_Exist"]) Config["Path"]["Input"] = str(Path(Config["Path"]["Input"]).parent)
result = PublicFunc.examine_file(Config["Path"]["Input"], Filename.ECG_FILTER, Params.ENDSWITH_TXT)
if result.status:
Config["Path"]["Input"] = result.data["path"]
Config["InputConfig"]["Freq"] = result.data["freq"]
Config["Path"]["Save"] = str(
Path(Config["Path"]["Save"]) / Path(Filename.RPEAK_FINAL + str(Config["InputConfig"]["Freq"]) + Params.ENDSWITH_TXT))
else:
return result
try: try:
self.raw_data = read_csv(Config["Path"]["Input"], self.raw_data = read_csv(Config["Path"]["Input"],
encoding=ConfigParams.UTF8_ENCODING, encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1) header=None).to_numpy().reshape(-1)
except Exception as e: except Exception as e:
return Result().failure(info=Constants.INPUT_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Read_Data_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.INPUT_FAILURE +
Constants.FAILURE_REASON["Open_Data_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.INPUT_FINISHED) return Result().success(info=Constants.INPUT_FINISHED)
def preprocess(self): def preprocess(self):
if self.raw_data is None: if self.raw_data is None:
return Result().failure(info=Constants.DETECT_RPEAK_PROCESS_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Raw_Data_Not_Exist"]) return Result().failure(info=Constants.PREPROCESS_FAILURE +
Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
self.processed_data = preprocess(self.raw_data, if Config["Filter"]["Mode"] == "skip":
Config["InputConfig"]["Freq"], self.processed_data = self.raw_data
Config["Filter"]["BandPassLow"], return Result().success(info=Constants.PREPROCESS_NO_NEED)
Config["Filter"]["BandPassHigh"]) elif Config["Filter"]["Mode"] == "bandpass":
if ((Config["Filter"]["BandPassLow"] >= Config["Filter"]["BandPassHigh"]) or
(Config["Filter"]["BandPassLow"] <= 0) or (Config["Filter"]["BandPassHigh"] <= 0)):
return Result().failure(
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.DETECT_RPEAK_PROCESS_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Filter_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.PREPROCESS_FAILURE +
Constants.FAILURE_REASON["Preprocess_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.DETECT_RPEAK_PROCESS_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 + Constants.DETECT_RPEAK_FAILURE_REASON["Processed_Data_Not_Exist"]) return Result().failure(info=Constants.DETECT_RPEAK_PREDICT_FAILURE +
Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
self.peak, self.interval, self.RRIV = Rpeak_Detection(self.processed_data, self.peak, self.interval, self.RRIV = Rpeak_Detection(self.processed_data,
@ -426,18 +481,22 @@ class Data:
Config["PeaksValue"], Config["PeaksValue"],
Config["DetectMethod"]) Config["DetectMethod"])
except Exception as e: except Exception as e:
return Result().failure(info=Constants.DETECT_RPEAK_PREDICT_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Predict_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.DETECT_RPEAK_PREDICT_FAILURE +
Constants.FAILURE_REASON["Predict_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.DETECT_RPEAK_PREDICT_FINISHED) return Result().success(info=Constants.DETECT_RPEAK_PREDICT_FINISHED)
def save(self, chunk): def save(self, chunk):
if self.peak is None: if self.peak is None:
return Result().failure(info=Constants.SAVING_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Peak_Not_Exist"]) return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
chunk.to_csv(Config["Path"]["Save"], mode='a', index=False, header=False) chunk.to_csv(Config["Path"]["Save"], mode='a', index=False, header=False)
except PermissionError as e:
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
except Exception as e: except Exception as e:
return Result().failure(info=Constants.SAVING_FAILURE + Constants.DETECT_RPEAK_FAILURE_REASON["Save_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.SAVE_FAILURE +
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.SAVING_FINISHED) return Result().success(info=Constants.SAVE_FINISHED)

View File

@ -9,14 +9,15 @@ from PySide6.QtWidgets import QMessageBox, QMainWindow, QApplication, QTableWidg
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 numpy import append, delete, arange from numpy import append, delete, arange, setdiff1d
from overrides import overrides from overrides import overrides
from pandas import read_csv, DataFrame from pandas import read_csv, DataFrame
from scipy.signal import find_peaks from scipy.signal import find_peaks
from yaml import dump, load, FullLoader from yaml import dump, load, FullLoader
from func.utils.ConfigParams import Filename, Params
from func.utils.PublicFunc import PublicFunc from func.utils.PublicFunc import PublicFunc
from func.utils.Constants import Constants, ConfigParams from func.utils.Constants import Constants
from func.Filters.Preprocessing import data_preprocess_for_label_check from func.Filters.Preprocessing import data_preprocess_for_label_check
from func.utils.Result import Result from func.utils.Result import Result
@ -32,18 +33,20 @@ ButtonState = {
"Default": { "Default": {
"pushButton_input_setting": True, "pushButton_input_setting": True,
"pushButton_input": True, "pushButton_input": True,
"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_save": False "pushButton_update_state": False
}, },
"Current": { "Current": {
"pushButton_input_setting": True, "pushButton_input_setting": True,
"pushButton_input": True, "pushButton_input": True,
"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_save": False "pushButton_update_state": False
} }
} }
@ -59,8 +62,12 @@ class SettingWindow(QMainWindow):
self.root_path = root_path self.root_path = root_path
self.sampID = sampID self.sampID = sampID
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
self.config = None self.config = None
self.__read_config__() self.__read_config__()
self.__examine_freq__()
self.ui.spinBox_input_freq_signal.valueChanged.connect(self.__update_ui__) self.ui.spinBox_input_freq_signal.valueChanged.connect(self.__update_ui__)
self.ui.spinBox_bandPassOrder.valueChanged.connect(self.__update_ui__) self.ui.spinBox_bandPassOrder.valueChanged.connect(self.__update_ui__)
@ -71,11 +78,11 @@ class SettingWindow(QMainWindow):
self.ui.pushButton_cancel.clicked.connect(self.close) self.ui.pushButton_cancel.clicked.connect(self.close)
def __read_config__(self): def __read_config__(self):
if not Path(ConfigParams.LABEL_CHECK_CONFIG_FILE_PATH).exists(): if not Path(Params.LABEL_CHECK_CONFIG_FILE_PATH).exists():
with open(ConfigParams.LABEL_CHECK_CONFIG_FILE_PATH, "w") as f: with open(Params.LABEL_CHECK_CONFIG_FILE_PATH, "w") as f:
dump(ConfigParams.LABEL_CHECK_CONFIG_NEW_CONTENT, f) dump(Params.LABEL_CHECK_CONFIG_NEW_CONTENT, f)
with open(ConfigParams.LABEL_CHECK_CONFIG_FILE_PATH, "r") as f: with open(Params.LABEL_CHECK_CONFIG_FILE_PATH, "r") as f:
file_config = load(f.read(), Loader=FullLoader) file_config = load(f.read(), Loader=FullLoader)
Config.update(file_config) Config.update(file_config)
self.config = file_config self.config = file_config
@ -83,38 +90,28 @@ class SettingWindow(QMainWindow):
if self.mode == "BCG": if self.mode == "BCG":
Config.update({ Config.update({
"Path": { "Path": {
"Input_Signal": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_ORGBCG_TEXT / "Input_Signal": str((Path(self.root_path) / Filename.PATH_ORGBCG_TEXT /
Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_INPUT_BCG_FILENAME + Path(str(self.sampID)))),
str(Config["InputConfig"]["Freq"]) + "Input_Peak": str((Path(self.root_path) / Filename.PATH_ORGBCG_TEXT /
ConfigParams.ENDSWITH_TXT))), Path(str(self.sampID)))),
"Input_Peak": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_ORGBCG_TEXT / "Input_Approximately_Align": str((Path(self.root_path) / Filename.PATH_LABEL /
Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_INPUT_JPEAK_FILENAME + Path(str(self.sampID)))),
ConfigParams.ENDSWITH_TXT))), "Save": str((Path(self.root_path) / Filename.PATH_ORGBCG_TEXT /
"Input_Approximately_Align": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_LABEL / Path(str(self.sampID))))
Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_APPROXIMATELY_ALIGNINFO_FILENAME +
ConfigParams.ENDSWITH_CSV))),
"Save": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_ORGBCG_TEXT /
Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_SAVE_JPEAK_FILENAME +
ConfigParams.ENDSWITH_TXT)))
}, },
"Mode": self.mode "Mode": self.mode
}) })
elif self.mode == "ECG": elif self.mode == "ECG":
Config.update({ Config.update({
"Path": { "Path": {
"Input_Signal": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT / "Input_Signal": str((Path(self.root_path) / Filename.PATH_PSG_TEXT /
Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_INPUT_ECG_FILENAME + Path(str(self.sampID)))),
str(Config["InputConfig"]["Freq"]) + "Input_Peak": str((Path(self.root_path) / Filename.PATH_PSG_TEXT /
ConfigParams.ENDSWITH_TXT))), Path(str(self.sampID)))),
"Input_Peak": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT / "Input_Approximately_Align": str((Path(self.root_path) / Filename.PATH_LABEL /
Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_INPUT_RPEAK_FILENAME + Path(str(self.sampID)))),
ConfigParams.ENDSWITH_TXT))), "Save": str((Path(self.root_path) / Filename.PATH_PSG_TEXT /
"Input_Approximately_Align": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_LABEL / Path(str(self.sampID))))
Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_APPROXIMATELY_ALIGNINFO_FILENAME +
ConfigParams.ENDSWITH_CSV))),
"Save": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT /
Path(str(self.sampID)) / Path(ConfigParams.LABEL_CHECK_SAVE_RPEAK_FILENAME +
ConfigParams.ENDSWITH_TXT)))
}, },
"Mode": self.mode "Mode": self.mode
}) })
@ -127,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"])
@ -145,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()
@ -159,7 +164,7 @@ class SettingWindow(QMainWindow):
# 保存配置到文件 # 保存配置到文件
self.config["InputConfig"]["Freq"] = self.ui.spinBox_input_freq_signal.value() self.config["InputConfig"]["Freq"] = self.ui.spinBox_input_freq_signal.value()
with open(ConfigParams.LABEL_CHECK_CONFIG_FILE_PATH, "w") as f: with open(Params.LABEL_CHECK_CONFIG_FILE_PATH, "w") as f:
dump(self.config, f) dump(self.config, f)
self.close() self.close()
@ -171,22 +176,55 @@ class SettingWindow(QMainWindow):
if self.mode == "BCG": if self.mode == "BCG":
self.ui.plainTextEdit_file_path_input_signal.setPlainText( self.ui.plainTextEdit_file_path_input_signal.setPlainText(
str((Path(self.root_path) / str((Path(self.root_path) /
ConfigParams.PUBLIC_PATH_ORGBCG_TEXT / Filename.PATH_ORGBCG_TEXT /
Path(str(self.sampID)) / Path(str(self.sampID)) /
Path(ConfigParams.LABEL_CHECK_INPUT_BCG_FILENAME + Path(Filename.BCG_FILTER +
str(self.ui.spinBox_input_freq_signal.value()) + str(self.ui.spinBox_input_freq_signal.value()) +
ConfigParams.ENDSWITH_TXT)))) Params.ENDSWITH_TXT))))
self.ui.plainTextEdit_file_path_input_peak.setPlainText(
str((Path(self.root_path) /
Filename.PATH_ORGBCG_TEXT /
Path(str(self.sampID)) /
Path(Filename.JPEAK_REVISE +
str(self.ui.spinBox_input_freq_signal.value()) +
Params.ENDSWITH_TXT))))
elif self.mode == "ECG": elif self.mode == "ECG":
self.ui.plainTextEdit_file_path_input_signal.setPlainText( self.ui.plainTextEdit_file_path_input_signal.setPlainText(
str((Path(self.root_path) / str((Path(self.root_path) /
ConfigParams.PUBLIC_PATH_PSG_TEXT / Filename.PATH_PSG_TEXT /
Path(str(self.sampID)) / Path(str(self.sampID)) /
Path(ConfigParams.LABEL_CHECK_INPUT_ECG_FILENAME + Path(Filename.ECG_FILTER +
str(self.ui.spinBox_input_freq_signal.value()) + str(self.ui.spinBox_input_freq_signal.value()) +
ConfigParams.ENDSWITH_TXT)))) Params.ENDSWITH_TXT))))
self.ui.plainTextEdit_file_path_input_peak.setPlainText(
str((Path(self.root_path) /
Filename.PATH_PSG_TEXT /
Path(str(self.sampID)) /
Path(Filename.RPEAK_FINAL +
str(self.ui.spinBox_input_freq_signal.value()) +
Params.ENDSWITH_TXT))))
else: else:
raise ValueError("模式不存在") raise ValueError("模式不存在")
def __examine_freq__(self):
if Config["Mode"] == "BCG":
signal = Filename.BCG_FILTER
elif Config["Mode"] == "ECG":
signal = Filename.ECG_FILTER
else:
raise ValueError("模式不存在")
if Path(Config["Path"]["Input_Signal"]).is_file():
Config["Path"]["Input_Signal"] = str(Path(Config["Path"]["Input_Signal"]).parent)
result = PublicFunc.examine_file(Config["Path"]["Input_Signal"], signal, Params.ENDSWITH_TXT)
if result.status:
Config["InputConfig"]["Freq"] = result.data["freq"]
else:
PublicFunc.msgbox_output(self, signal + Constants.FAILURE_REASON["Get_Freq_Not_Correct"], Constants.MSGBOX_TYPE_ERROR)
# 数据回显
self.ui.spinBox_input_freq_signal.setValue(Config["InputConfig"]["Freq"])
class MainWindow_label_check(QMainWindow): class MainWindow_label_check(QMainWindow):
@ -221,6 +259,12 @@ 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); }")
PublicFunc.__styleAllButton__(self, ButtonState)
# 初始化自动播放定时器 # 初始化自动播放定时器
self.autoplay_xlim_start = None self.autoplay_xlim_start = None
self.autoplay_xlim_end = None self.autoplay_xlim_end = None
@ -265,11 +309,11 @@ class MainWindow_label_check(QMainWindow):
self.fig.subplots_adjust(top=0.98, bottom=0.05, right=0.98, left=0.1, hspace=0, wspace=0) self.fig.subplots_adjust(top=0.98, bottom=0.05, right=0.98, left=0.1, hspace=0, wspace=0)
self.ax0 = self.fig.add_subplot(self.gs[0]) self.ax0 = self.fig.add_subplot(self.gs[0])
self.ax0.grid(True) self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax0.xaxis.set_major_formatter(Params.FORMATTER)
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE) self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
self.ax1 = self.fig.add_subplot(self.gs[1], sharex=self.ax0, sharey=self.ax0) self.ax1 = self.fig.add_subplot(self.gs[1], sharex=self.ax0, sharey=self.ax0)
self.ax1.grid(True) self.ax1.grid(True)
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax1.xaxis.set_major_formatter(Params.FORMATTER)
PublicFunc.__resetAllButton__(self, ButtonState) PublicFunc.__resetAllButton__(self, ButtonState)
@ -293,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__)
@ -308,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)
@ -322,10 +381,13 @@ class MainWindow_label_check(QMainWindow):
del self.point_peak_original del self.point_peak_original
del self.point_peak_corrected del self.point_peak_corrected
del self.annotation_tableWidget del self.annotation_tableWidget
self.ax0.clear() if self.ax0 is not None:
self.ax1.clear() self.ax0.clear()
if self.ax1 is not None:
self.ax1.clear()
# 释放资源 # 释放资源
self.setting.close()
del self.data del self.data
self.fig.clf() self.fig.clf()
plt.close(self.fig) plt.close(self.fig)
@ -372,12 +434,12 @@ class MainWindow_label_check(QMainWindow):
self.canvas.draw() self.canvas.draw()
self.ax0.autoscale(False) self.ax0.autoscale(False)
self.ax1.autoscale(False) self.ax1.autoscale(False)
return Result().success(info=Constants.DRAWING_FINISHED) return Result().success(info=Constants.DRAW_FINISHED)
else: else:
self.canvas.draw() self.canvas.draw()
self.ax0.autoscale(False) self.ax0.autoscale(False)
self.ax1.autoscale(False) self.ax1.autoscale(False)
return Result().failure(info=Constants.DRAWING_FAILURE) return Result().failure(info=Constants.DRAW_FAILURE)
def __plot_peaks__(self): def __plot_peaks__(self):
try: try:
@ -389,10 +451,10 @@ class MainWindow_label_check(QMainWindow):
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)
except Exception as e: except Exception as e:
return Result().failure(info=Constants.DRAWING_FAILURE + "\n" + format_exc()) return Result().failure(info=Constants.DRAW_FAILURE + "\n" + format_exc())
self.canvas.draw() self.canvas.draw()
return Result().success(info=Constants.DRAWING_FINISHED) return Result().success(info=Constants.DRAW_FINISHED)
def __redraw_peaks__(self): def __redraw_peaks__(self):
self.point_peak_corrected.remove() self.point_peak_corrected.remove()
@ -402,7 +464,7 @@ class MainWindow_label_check(QMainWindow):
def __update_tableWidget_and_info__(self): def __update_tableWidget_and_info__(self):
if self.data.original_peak is None or self.data.corrected_peak is None: if self.data.original_peak is None or self.data.corrected_peak is None:
return False, Constants.LABEL_CHECK_FAILURE_REASON["Peak_Not_Exist"] return False, Constants.FAILURE_REASON["Data_Not_Exist"]
try: try:
self.ui.tableWidget_peak_original.setRowCount(len(self.data.original_peak)) self.ui.tableWidget_peak_original.setRowCount(len(self.data.original_peak))
@ -415,9 +477,9 @@ class MainWindow_label_check(QMainWindow):
for row, value in enumerate(self.data.corrected_peak): for row, value in enumerate(self.data.corrected_peak):
item = QTableWidgetItem(str(value).strip()) item = QTableWidgetItem(str(value).strip())
self.ui.tableWidget_peak_corrected.setItem(row, 0, item) self.ui.tableWidget_peak_corrected.setItem(row, 0, item)
return Result().success(info=Constants.UPDATING_FINISHED) return Result().success(info=Constants.UPDATE_FINISHED)
except Exception as e: except Exception as e:
return Result().failure(info=Constants.UPDATING_FAILURE + "\n" + format_exc()) return Result().failure(info=Constants.UPDATE_FAILURE + "\n" + format_exc())
def __update_config__(self): def __update_config__(self):
Config["FindPeaks"]["MinInterval"] = self.ui.doubleSpinBox_findpeaks_min_interval.value() Config["FindPeaks"]["MinInterval"] = self.ui.doubleSpinBox_findpeaks_min_interval.value()
@ -446,116 +508,128 @@ class MainWindow_label_check(QMainWindow):
self.data = Data() self.data = Data()
# 导入数据 # 导入数据
PublicFunc.progressbar_update(self, 1, 6, Constants.INPUTTING_DATA, 0) PublicFunc.progressbar_update(self, 1, 7, Constants.INPUTTING_DATA, 0)
result = self.data.open_file() result = self.data.open_file()
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, "(1/6)" + result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(1/7)" + 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)
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
return return
else: else:
PublicFunc.text_output(self.ui, "(1/6)" + result.info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(1/7)" + result.info, Constants.TIPS_TYPE_INFO)
# 获取存档 # 获取存档
PublicFunc.progressbar_update(self, 2, 6, Constants.LABEL_CHECK_LOADING_ARCHIVE, 20) PublicFunc.progressbar_update(self, 2, 7, Constants.LOADING_ARCHIVE, 20)
result = self.data.get_archive() result = self.data.get_archive()
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, "(2/6)" + result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(2/7)" + 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)
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
return return
else: else:
PublicFunc.text_output(self.ui, "(2/6)" + result.info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(2/7)" + result.info, Constants.TIPS_TYPE_INFO)
# 保存
PublicFunc.progressbar_update(self, 3, 7, Constants.SAVING_DATA, 25)
result = self.data.save()
if not result.status:
PublicFunc.text_output(self.ui, "(3/7)" + 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/7)" + result.info, Constants.TIPS_TYPE_INFO)
# 数据预处理 # 数据预处理
PublicFunc.progressbar_update(self, 3, 6, Constants.LABEL_CHECK_PROCESSING_DATA, 30) PublicFunc.progressbar_update(self, 4, 7, Constants.PREPROCESSING_DATA, 30)
result = self.data.preprocess() result = self.data.preprocess()
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, "(3/6)" + result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(4/7)" + 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)
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
return return
else: else:
PublicFunc.text_output(self.ui, "(3/6)" + result.info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(4/7)" + result.info, Constants.TIPS_TYPE_INFO)
# 更新表格 # 更新表格
PublicFunc.progressbar_update(self, 4, 6, Constants.UPDATING_TABLEWIDGET_AND_INFO, 50) PublicFunc.progressbar_update(self, 5, 7, Constants.UPDATING_TABLEWIDGET_AND_INFO, 50)
result = self.__update_tableWidget_and_info__() result = self.__update_tableWidget_and_info__()
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, "(4/6)" + result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(5/7)" + 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)
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
return return
else: else:
PublicFunc.text_output(self.ui, "(4/6)" + result.info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(5/7)" + result.info, Constants.TIPS_TYPE_INFO)
# 绘图 # 绘图
PublicFunc.progressbar_update(self, 5, 6, Constants.DRAWING_DATA, 60) PublicFunc.progressbar_update(self, 6, 7, Constants.DRAWING_DATA, 60)
result = self.__plot__() result = self.__plot__()
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, "(5/6)" + result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(6/7)" + 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)
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
return return
else: else:
PublicFunc.text_output(self.ui, "(5/6)" + result.info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(6/7)" + result.info, Constants.TIPS_TYPE_INFO)
# 绘点 # 绘点
PublicFunc.progressbar_update(self, 6, 6, Constants.DRAWING_DATA, 80) PublicFunc.progressbar_update(self, 7, 7, Constants.DRAWING_DATA, 80)
result = self.__plot_peaks__() result = self.__plot_peaks__()
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, "(6/6)" + result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(7/7)" + 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)
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
return return
else: else:
PublicFunc.text_output(self.ui, "(6/6)" + result.info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(7/7)" + result.info, Constants.TIPS_TYPE_INFO)
self.__reset__() self.__reset__()
self.setting.close()
self.canvas.mpl_connect("motion_notify_event", self.on_motion) self.canvas.mpl_connect("motion_notify_event", self.on_motion)
self.figToolbar.action_Label_Multiple.setEnabled(True) self.figToolbar.action_Label_Multiple.setEnabled(True)
for action in self.figToolbar._actions.values(): for action in self.figToolbar._actions.values():
action.setEnabled(True) action.setEnabled(True)
ButtonState["Current"]["pushButton_input"] = False ButtonState["Current"]["pushButton_input"] = False
ButtonState["Current"]["pushButton_input_setting"] = False ButtonState["Current"]["pushButton_input_setting"] = False
ButtonState["Current"]["pushButton_save"] = True
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_save"] = 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):
reply = QMessageBox.question(self, Constants.QUESTION_TITLE, PublicFunc.__disableAllButton__(self, ButtonState)
Constants.QUESTION_CONTENT + Config["Path"]["Save"],
QMessageBox.Yes | QMessageBox.No,
QMessageBox.Yes)
if reply == QMessageBox.Yes:
PublicFunc.__disableAllButton__(self, ButtonState)
# 保存 # 保存
PublicFunc.progressbar_update(self, 1, 1, Constants.SAVING_DATA, 0) PublicFunc.progressbar_update(self, 1, 1, Constants.SAVING_DATA, 0)
result = self.data.save()
total_rows = len(DataFrame(self.data.corrected_peak.reshape(-1))) if not result.status:
chunk_size = ConfigParams.LABEL_CHECK_SAVE_CHUNK_SIZE PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_ERROR)
with open(Config["Path"]["Save"], 'w') as f: PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
for start in range(0, total_rows, chunk_size):
end = min(start + chunk_size, total_rows)
chunk = DataFrame(self.data.corrected_peak.reshape(-1)).iloc[start:end]
result = self.data.save(chunk)
progress = int((end / total_rows) * 100)
self.progressbar.setValue(progress)
QApplication.processEvents()
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.TIPS_TYPE_INFO)
PublicFunc.finish_operation(self, ButtonState) 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.TIPS_TYPE_INFO)
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:
@ -564,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])
@ -575,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"])
@ -652,13 +730,15 @@ class MainWindow_label_check(QMainWindow):
PublicFunc.text_output(self.ui, f"{Constants.LABEL_CHECK_JUMP_X_INDEX}{str(int(x))}", Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, f"{Constants.LABEL_CHECK_JUMP_X_INDEX}{str(int(x))}", Constants.TIPS_TYPE_INFO)
def reset_axes(self): def reset_axes(self):
self.ax0.clear() if self.ax0 is not None:
self.ax1.clear() self.ax0.clear()
self.ax0.grid(True) self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax0.xaxis.set_major_formatter(Params.FORMATTER)
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE) self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
self.ax1.grid(True) if self.ax1 is not None:
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax1.clear()
self.ax1.grid(True)
self.ax1.xaxis.set_major_formatter(Params.FORMATTER)
def on_xlim_change(self, event_ax): def on_xlim_change(self, event_ax):
try: try:
@ -754,6 +834,7 @@ class MainWindow_label_check(QMainWindow):
elif event.button == 3: elif event.button == 3:
self.is_right_button_pressed = True self.is_right_button_pressed = True
self.figToolbar.rect_start_x = event.xdata self.figToolbar.rect_start_x = event.xdata
self.figToolbar.rect_start_y = event.ydata
# 如果矩形patch已存在先移除 # 如果矩形patch已存在先移除
if self.figToolbar.rect_patch_ax0 is not None and self.figToolbar.rect_patch_ax1 is not None: if self.figToolbar.rect_patch_ax0 is not None and self.figToolbar.rect_patch_ax1 is not None:
self.figToolbar.rect_patch_ax0.remove() self.figToolbar.rect_patch_ax0.remove()
@ -764,9 +845,11 @@ class MainWindow_label_check(QMainWindow):
def on_release(self, event): def on_release(self, event):
if self.figToolbar.action_Label_Multiple.isChecked(): if self.figToolbar.action_Label_Multiple.isChecked():
if self.figToolbar.rect_start_x is not None: if self.figToolbar.rect_start_x is not None and self.figToolbar.rect_start_y is not None:
self.figToolbar.rect_end_x = event.xdata self.figToolbar.rect_end_x = event.xdata
if self.figToolbar.rect_start_x is not None and self.figToolbar.rect_end_x is not None: self.figToolbar.rect_end_y = event.ydata
if ((self.figToolbar.rect_start_x is not None and self.figToolbar.rect_end_x is not None) and
(self.figToolbar.rect_start_y is not None and self.figToolbar.rect_end_y is not None)):
if self.figToolbar.rect_start_x < self.figToolbar.rect_end_x: if self.figToolbar.rect_start_x < self.figToolbar.rect_end_x:
rect_left = self.figToolbar.rect_start_x rect_left = self.figToolbar.rect_start_x
rect_right = self.figToolbar.rect_end_x rect_right = self.figToolbar.rect_end_x
@ -776,9 +859,20 @@ class MainWindow_label_check(QMainWindow):
else: else:
rect_left = self.figToolbar.rect_start_x rect_left = self.figToolbar.rect_start_x
rect_right = self.figToolbar.rect_start_x rect_right = self.figToolbar.rect_start_x
if self.figToolbar.rect_start_y < self.figToolbar.rect_end_y:
rect_bottom = self.figToolbar.rect_start_y
rect_top = self.figToolbar.rect_end_y
elif self.figToolbar.rect_start_y > self.figToolbar.rect_end_y:
rect_bottom = self.figToolbar.rect_end_y
rect_top = self.figToolbar.rect_start_y
else:
rect_bottom = self.figToolbar.rect_start_y
rect_top = self.figToolbar.rect_start_y
else: else:
rect_left = self.figToolbar.rect_start_x rect_left = self.figToolbar.rect_start_x
rect_right = self.figToolbar.rect_start_x rect_right = self.figToolbar.rect_start_x
rect_bottom = self.figToolbar.rect_start_y
rect_top = self.figToolbar.rect_start_y
if event.button == 1 and self.is_left_button_pressed: if event.button == 1 and self.is_left_button_pressed:
self.is_left_button_pressed = False self.is_left_button_pressed = False
if rect_left < 0: if rect_left < 0:
@ -792,10 +886,18 @@ class MainWindow_label_check(QMainWindow):
rect_left = 0 rect_left = 0
rect_right = 0 rect_right = 0
selected_area_for_add_points = self.data.processed_data[int(rect_left):int(rect_right)] selected_area_for_add_points = self.data.processed_data[int(rect_left):int(rect_right)]
# 找到子列表的最小值
min_value = min(selected_area_for_add_points)
# 遍历子列表,将不满足条件的元素替换为最小值
selected_area_for_add_points = [
y if rect_bottom < y < rect_top else min_value
for y in selected_area_for_add_points
]
peaks_idx, _ = find_peaks(selected_area_for_add_points, peaks_idx, _ = find_peaks(selected_area_for_add_points,
height=Config["FindPeaks"]["MinHeight"], height=Config["FindPeaks"]["MinHeight"],
distance=Config["FindPeaks"]["MinInterval"]) distance=Config["FindPeaks"]["MinInterval"])
peaks_idx = peaks_idx + int(rect_left) peaks_idx = peaks_idx + int(rect_left)
peaks_idx = setdiff1d(peaks_idx, self.data.corrected_peak)
if len(peaks_idx) != 0: if len(peaks_idx) != 0:
PublicFunc.text_output(self.ui, f"{Constants.LABEL_CHECK_ADD_POINTS_SUCCESSFULLY}{peaks_idx}", PublicFunc.text_output(self.ui, f"{Constants.LABEL_CHECK_ADD_POINTS_SUCCESSFULLY}{peaks_idx}",
Constants.TIPS_TYPE_INFO) Constants.TIPS_TYPE_INFO)
@ -822,10 +924,20 @@ class MainWindow_label_check(QMainWindow):
self.__redraw_peaks__() self.__redraw_peaks__()
self.figToolbar.rect_start_x = None self.figToolbar.rect_start_x = None
self.figToolbar.rect_end_x = None self.figToolbar.rect_end_x = None
self.figToolbar.rect_start_y = None
self.figToolbar.rect_end_y = None
self.data.corrected_peak.sort() self.data.corrected_peak.sort()
self.data.corrected_peak_y = [self.data.processed_data[x] for x in self.data.corrected_peak] self.data.corrected_peak_y = [self.data.processed_data[x] for x in self.data.corrected_peak]
self.__update_tableWidget_and_info__() self.__update_tableWidget_and_info__()
DataFrame(self.data.corrected_peak).to_csv(Config["Path"]["Save"], index=False, header=False) result = self.data.save()
if not result.status:
info = f"未成功保存,错误提示:{result.info},结果已暂存到缓存中,请正确操作后重试。"
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_ERROR)
PublicFunc.msgbox_output(self, info, Constants.MSGBOX_TYPE_ERROR)
else:
info = result.info
PublicFunc.text_output(self.ui, info, Constants.TIPS_TYPE_INFO)
# 移除矩形patch # 移除矩形patch
if self.figToolbar.rect_patch_ax0 is not None and self.figToolbar.rect_patch_ax1 is not None: if self.figToolbar.rect_patch_ax0 is not None and self.figToolbar.rect_patch_ax1 is not None:
self.figToolbar.rect_patch_ax0.remove() self.figToolbar.rect_patch_ax0.remove()
@ -837,42 +949,54 @@ class MainWindow_label_check(QMainWindow):
def on_hold(self, event): def on_hold(self, event):
if self.figToolbar.rect_start_x is not None and event.xdata is not None: if self.figToolbar.rect_start_x is not None and event.xdata is not None:
self.figToolbar.rect_end_x = event.xdata self.figToolbar.rect_end_x = event.xdata
if self.figToolbar.rect_start_y is not None and event.ydata is not None:
self.figToolbar.rect_end_y = event.ydata
# 如果矩形patch不存在则创建一个新的 # 如果矩形patch不存在则创建一个新的
if self.figToolbar.rect_patch_ax0 is None: if self.figToolbar.rect_patch_ax0 is None:
if self.is_left_button_pressed: if self.is_left_button_pressed:
self.figToolbar.rect_patch_ax0 = patches.Rectangle((0, 0), 1, 1, fill=True, self.figToolbar.rect_patch_ax0 = patches.Rectangle((0, 0), 1, 1, fill=True,
alpha=ConfigParams.LABEL_CHECK_LABEL_TRANSPARENCY, alpha=Params.LABEL_CHECK_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_PINK) color=Constants.PLOT_COLOR_PINK)
elif self.is_right_button_pressed: elif self.is_right_button_pressed:
self.figToolbar.rect_patch_ax0 = patches.Rectangle((0, 0), 1, 1, fill=True, self.figToolbar.rect_patch_ax0 = patches.Rectangle((0, 0), 1, 1, fill=True,
alpha=ConfigParams.LABEL_CHECK_LABEL_TRANSPARENCY, alpha=Params.LABEL_CHECK_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_RED) color=Constants.PLOT_COLOR_RED)
self.ax0.add_patch(self.figToolbar.rect_patch_ax0) self.ax0.add_patch(self.figToolbar.rect_patch_ax0)
# 如果矩形patch不存在则创建一个新的 # 如果矩形patch不存在则创建一个新的
if self.figToolbar.rect_patch_ax1 is None: if self.figToolbar.rect_patch_ax1 is None:
if self.is_left_button_pressed: if self.is_left_button_pressed:
self.figToolbar.rect_patch_ax1 = patches.Rectangle((0, 0), 1, 1, fill=True, self.figToolbar.rect_patch_ax1 = patches.Rectangle((0, 0), 1, 1, fill=True,
alpha=ConfigParams.LABEL_CHECK_LABEL_TRANSPARENCY, alpha=Params.LABEL_CHECK_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_PINK) color=Constants.PLOT_COLOR_PINK)
elif self.is_right_button_pressed: elif self.is_right_button_pressed:
self.figToolbar.rect_patch_ax1 = patches.Rectangle((0, 0), 1, 1, fill=True, self.figToolbar.rect_patch_ax1 = patches.Rectangle((0, 0), 1, 1, fill=True,
alpha=ConfigParams.LABEL_CHECK_LABEL_TRANSPARENCY, alpha=Params.LABEL_CHECK_LABEL_TRANSPARENCY,
color=Constants.PLOT_COLOR_RED) color=Constants.PLOT_COLOR_RED)
self.ax1.add_patch(self.figToolbar.rect_patch_ax1) self.ax1.add_patch(self.figToolbar.rect_patch_ax1)
# 更新矩形patch的位置和大小 # 更新矩形patch的位置和大小
x_start = self.figToolbar.rect_start_x x_start = self.figToolbar.rect_start_x
x_end = self.figToolbar.rect_end_x x_end = self.figToolbar.rect_end_x
rect_down = min(self.ax0.get_ylim()[0], self.ax1.get_ylim()[0]) - 1000
rect_up = max(self.ax0.get_ylim()[1], self.ax1.get_ylim()[1]) + 1000 if self.is_left_button_pressed:
self.figToolbar.rect_patch_ax0.set_xy((min(x_start, x_end), rect_down)) y_start = self.figToolbar.rect_start_y
y_end = self.figToolbar.rect_end_y
self.figToolbar.rect_patch_ax0.set_xy((min(x_start, x_end), min(y_start, y_end)))
self.figToolbar.rect_patch_ax0.set_height(abs(y_end - y_start))
self.figToolbar.rect_patch_ax1.set_xy((min(x_start, x_end), min(y_start, y_end)))
self.figToolbar.rect_patch_ax1.set_height(abs(y_end - y_start))
elif self.is_right_button_pressed:
y_start = min(self.ax0.get_ylim()[0], self.ax1.get_ylim()[0]) - 1000
y_end = max(self.ax0.get_ylim()[1], self.ax1.get_ylim()[1]) + 1000
self.figToolbar.rect_patch_ax0.set_xy((min(x_start, x_end), y_start))
self.figToolbar.rect_patch_ax0.set_height(abs(y_end - y_start))
self.figToolbar.rect_patch_ax1.set_xy((min(x_start, x_end), y_start))
self.figToolbar.rect_patch_ax1.set_height(abs(y_end - y_start))
self.figToolbar.rect_patch_ax0.set_width(abs(x_end - x_start)) self.figToolbar.rect_patch_ax0.set_width(abs(x_end - x_start))
self.figToolbar.rect_patch_ax0.set_height(rect_up - rect_down)
self.figToolbar.rect_patch_ax1.set_xy((min(x_start, x_end), rect_down))
self.figToolbar.rect_patch_ax1.set_width(abs(x_end - x_start)) self.figToolbar.rect_patch_ax1.set_width(abs(x_end - x_start))
self.figToolbar.rect_patch_ax1.set_height(rect_up - rect_down)
self.canvas.draw() self.canvas.draw()
@ -889,18 +1013,58 @@ class Data:
self.approximately_align_pos = None self.approximately_align_pos = None
def open_file(self): def open_file(self):
if (not Path(Config["Path"]["Input_Signal"]).exists()) or (not Path(Config["Path"]["Input_Peak"]).exists()): if Config["Mode"] == "BCG":
return Result().failure(info=Constants.INPUT_FAILURE + Constants.LABEL_CHECK_FAILURE_REASON["Data_Path_Not_Exist"]) signal = Filename.BCG_FILTER
peak = Filename.JPEAK_REVISE
save = Filename.JPEAK_REVISE_CORRECTED
elif Config["Mode"] == "ECG":
signal = Filename.ECG_FILTER
peak = Filename.RPEAK_FINAL
save = Filename.RPEAK_FINAL_CORRECTED
else:
raise ValueError("模式不存在")
if Path(Config["Path"]["Input_Signal"]).is_file():
Config["Path"]["Input_Signal"] = str(Path(Config["Path"]["Input_Signal"]).parent)
if Path(Config["Path"]["Input_Peak"]).is_file():
Config["Path"]["Input_Peak"] = str(Path(Config["Path"]["Input_Peak"]).parent)
if Path(Config["Path"]["Input_Approximately_Align"]).is_file():
Config["Path"]["Input_Approximately_Align"] = str(Path(Config["Path"]["Input_Approximately_Align"]).parent)
result = PublicFunc.examine_file(Config["Path"]["Input_Signal"], signal, Params.ENDSWITH_TXT)
if result.status:
Config["Path"]["Input_Signal"] = result.data["path"]
Config["InputConfig"]["Freq"] = result.data["freq"]
else:
return result
Config["Path"]["Input_Peak"] = str(
Path(Config["Path"]["Input_Peak"]) / Path(peak + str(Config["InputConfig"]["Freq"]) + Params.ENDSWITH_TXT))
Config["Path"]["Input_Approximately_Align"] = str(
Path(Config["Path"]["Input_Approximately_Align"]) / Path(
Filename.APPROXIMATELY_ALIGN_INFO + Params.ENDSWITH_CSV))
Config["Path"]["Save"] = str(
Path(Config["Path"]["Save"]) / Path(save + str(Config["InputConfig"]["Freq"]) + Params.ENDSWITH_TXT))
if not Path(Config["Path"]["Input_Peak"]).exists():
return Result().failure(info=Constants.INPUT_FAILURE + "\n" +
peak + "" +
Config["Path"]["Input_Peak"] +
Constants.FAILURE_REASON["Path_Not_Exist"])
if not Path(Config["Path"]["Input_Approximately_Align"]).exists():
return Result().failure(info=Constants.INPUT_FAILURE + "\n" +
Filename.APPROXIMATELY_ALIGN_INFO + "" +
Config["Path"]["Input_Approximately_Align"] +
Constants.FAILURE_REASON["Path_Not_Exist"])
try: try:
self.raw_data = read_csv(Config["Path"]["Input_Signal"], self.raw_data = read_csv(Config["Path"]["Input_Signal"],
encoding=ConfigParams.UTF8_ENCODING, encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1) header=None).to_numpy().reshape(-1)
self.original_peak = read_csv(Config["Path"]["Input_Peak"], self.original_peak = read_csv(Config["Path"]["Input_Peak"],
encoding=ConfigParams.UTF8_ENCODING, encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1) header=None).to_numpy().reshape(-1)
except Exception as e: except Exception as e:
return Result().failure(info=Constants.INPUT_FAILURE + Constants.LABEL_CHECK_FAILURE_REASON["Read_Data_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.INPUT_FAILURE +
Constants.FAILURE_REASON["Open_Data_Exception"] + "\n" + format_exc())
try: try:
df = read_csv(Config["Path"]["Input_Approximately_Align"]) df = read_csv(Config["Path"]["Input_Approximately_Align"])
@ -925,49 +1089,69 @@ class Data:
def get_archive(self): def get_archive(self):
if not Path(Config["Path"]["Save"]).exists(): if not Path(Config["Path"]["Save"]).exists():
self.corrected_peak = self.original_peak self.corrected_peak = self.original_peak
return Result().success(info=Constants.LABEL_CHECK_ARCHIVE_NOT_EXIST) return Result().success(info=Constants.ARCHIVE_NOT_EXIST)
else: else:
self.corrected_peak = read_csv(Config["Path"]["Save"], self.corrected_peak = read_csv(Config["Path"]["Save"],
encoding=ConfigParams.UTF8_ENCODING, encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1) header=None).to_numpy().reshape(-1)
return Result().success(info=Constants.LABEL_CHECK_ARCHIVE_EXIST) return Result().success(info=Constants.ARCHIVE_EXIST)
def preprocess(self): def preprocess(self):
if self.raw_data is None: if self.raw_data is None:
return Result().failure(info=Constants.LABEL_CHECK_PROCESS_FAILURE + Constants.LABEL_CHECK_FAILURE_REASON["Raw_Data_Not_Exist"]) return Result().failure(info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
if Config["Mode"] == "BCG": if Config["Mode"] == "BCG":
self.processed_data = data_preprocess_for_label_check(self.raw_data, if Config["Filter"]["BCGBandPassOrder"] == 0 or Config["Filter"]["Mode"] == "skip":
Config["Filter"]["BCGBandPassOrder"], self.processed_data = self.raw_data
Config["Filter"]["BCGBandPassLow"], else:
Config["Filter"]["BCGBandPassHigh"], if ((Config["Filter"]["BCGBandPassLow"] >= Config["Filter"]["BCGBandPassHigh"]) or
Config["InputConfig"]["Freq"]) (Config["Filter"]["BCGBandPassLow"] <= 0) or (Config["Filter"]["BCGBandPassHigh"] <= 0)):
return Result().failure(
info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Filter_Args_Not_Correct"])
self.processed_data = data_preprocess_for_label_check(self.raw_data,
Config["Filter"]["BCGBandPassOrder"],
Config["Filter"]["BCGBandPassLow"],
Config["Filter"]["BCGBandPassHigh"],
Config["InputConfig"]["Freq"])
elif Config["Mode"] == "ECG": elif Config["Mode"] == "ECG":
self.processed_data = data_preprocess_for_label_check(self.raw_data, if Config["Filter"]["ECGBandPassOrder"] == 0 or Config["Filter"]["Mode"] == "skip":
Config["Filter"]["ECGBandPassOrder"], self.processed_data = self.raw_data
Config["Filter"]["ECGBandPassLow"], else:
Config["Filter"]["ECGBandPassHigh"], if ((Config["Filter"]["ECGBandPassLow"] >= Config["Filter"]["ECGBandPassHigh"]) or
Config["InputConfig"]["Freq"]) (Config["Filter"]["ECGBandPassLow"] <= 0) or (Config["Filter"]["ECGBandPassHigh"] <= 0)):
return Result().failure(
info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Filter_Args_Not_Correct"])
self.processed_data = data_preprocess_for_label_check(self.raw_data,
Config["Filter"]["ECGBandPassOrder"],
Config["Filter"]["ECGBandPassLow"],
Config["Filter"]["ECGBandPassHigh"],
Config["InputConfig"]["Freq"])
else: else:
raise ValueError("模式不存在") raise ValueError("模式不存在")
self.original_peak_y = [self.processed_data[x] for x in self.original_peak] self.original_peak_y = [self.processed_data[x] for x in self.original_peak]
self.corrected_peak_y = [self.processed_data[x] for x in self.corrected_peak] self.corrected_peak_y = [self.processed_data[x] for x in self.corrected_peak]
except Exception as e: except Exception as e:
return Result().failure(info=Constants.LABEL_CHECK_PROCESS_FAILURE + Constants.LABEL_CHECK_FAILURE_REASON["Filter_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.PREPROCESS_FAILURE +
Constants.FAILURE_REASON["Preprocess_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.LABEL_CHECK_PROCESS_FINISHED) return Result().success(info=Constants.PREPROCESS_FINISHED)
def save(self, chunk): def save(self):
if self.corrected_peak is None: if self.corrected_peak is None:
return Result().failure(info=Constants.SAVING_FAILURE + Constants.LABEL_CHECK_FAILURE_REASON["Peak_Not_Exist"]) return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
chunk.to_csv(Config["Path"]["Save"], mode='a', index=False, header=False) DataFrame(self.corrected_peak).to_csv(Config["Path"]["Save"], index=False, header=False)
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: except Exception as e:
return Result().failure(info=Constants.SAVING_FAILURE + Constants.LABEL_CHECK_FAILURE_REASON["Save_Exception"] + "\n" + format_exc()) return Result().failure(info=Constants.SAVE_FAILURE +
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.SAVING_FINISHED) return Result().success(info=Constants.SAVE_FINISHED)
class CustomNavigationToolbar(NavigationToolbar2QT): class CustomNavigationToolbar(NavigationToolbar2QT):
@ -976,19 +1160,19 @@ class CustomNavigationToolbar(NavigationToolbar2QT):
super().__init__(canvas, parent) super().__init__(canvas, parent)
# 初始化画框工具栏 # 初始化画框工具栏
self.action_Label_Multiple = QAction(Constants.LABEL_CHECK_ACTION_LABEL_MULTIPLE_NAME, self) self.action_Label_Multiple = QAction(Constants.LABEL_CHECK_ACTION_LABEL_MULTIPLE_NAME, self)
self.action_Label_Multiple.setFont(QFont(ConfigParams.FONT, 14)) self.action_Label_Multiple.setFont(QFont(Params.FONT, 14))
self.action_Label_Multiple.setCheckable(True) self.action_Label_Multiple.setCheckable(True)
self.action_Label_Multiple.setShortcut(QCoreApplication.translate( self.action_Label_Multiple.setShortcut(QCoreApplication.translate(
"MainWindow", "MainWindow",
ConfigParams.LABEL_CHECK_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY)) Params.LABEL_CHECK_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY))
self.insertAction(self._actions['pan'], self.action_Label_Multiple) self.insertAction(self._actions['pan'], self.action_Label_Multiple)
self._actions['pan'].setShortcut(QCoreApplication.translate( self._actions['pan'].setShortcut(QCoreApplication.translate(
"MainWindow", "MainWindow",
ConfigParams.ACTION_PAN_SHORTCUT_KEY)) Params.ACTION_PAN_SHORTCUT_KEY))
self._actions['zoom'].setShortcut(QCoreApplication.translate( self._actions['zoom'].setShortcut(QCoreApplication.translate(
"MainWindow", "MainWindow",
ConfigParams.ACTION_ZOOM_SHORTCUT_KEY)) Params.ACTION_ZOOM_SHORTCUT_KEY))
# 用于存储事件连接ID # 用于存储事件连接ID
self.cid_mouse_press = None self.cid_mouse_press = None
@ -998,6 +1182,8 @@ class CustomNavigationToolbar(NavigationToolbar2QT):
# 初始化矩形选择区域 # 初始化矩形选择区域
self.rect_start_x = None self.rect_start_x = None
self.rect_end_x = None self.rect_end_x = None
self.rect_start_y = None
self.rect_end_y = None
self.rect_patch_ax0 = None # 用于绘制矩形的patch self.rect_patch_ax0 = None # 用于绘制矩形的patch
self.rect_patch_ax1 = None # 用于绘制矩形的patch self.rect_patch_ax1 = None # 用于绘制矩形的patch

View File

@ -1,6 +1,8 @@
from pathlib import Path from pathlib import Path
from traceback import format_exc
from PySide6.QtWidgets import QMainWindow, QMessageBox, QFileDialog from PySide6.QtCore import Qt
from PySide6.QtWidgets import QMainWindow, QMessageBox, QFileDialog, QApplication, QWidget
from PySide6.QtGui import QGuiApplication from PySide6.QtGui import QGuiApplication
from matplotlib import use from matplotlib import use
from yaml import dump, load, FullLoader from yaml import dump, load, FullLoader
@ -14,20 +16,64 @@ 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_SA_label import MainWindow_SA_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_SA_label_v2 import MainWindow_SA_label
from func.utils.Constants import Constants, ConfigParams from func.utils.ConfigParams import Filename, Params
from func.utils.Constants import Constants
use("QtAgg") use("QtAgg")
# style.use('dark_background')
# rcParams.update({
# 'figure.facecolor': '#f5f5dc',
# 'axes.facecolor': '#f5f5dc'
# })
Config = { Config = {
} }
ButtonState = {
"Default": {
"pushButton_open": True,
"pushButton_approximately_align": True,
"pushButton_preprocess_BCG": True,
"pushButton_preprocess_ECG": True,
"pushButton_detect_Jpeak": True,
"pushButton_detect_Rpeak": True,
"pushButton_label_check_BCG": True,
"pushButton_label_check_ECG": True,
"pushButton_precisely_align": True,
"pushButton_cut_PSG": True,
"pushButton_artifact_label": True,
"pushButton_bcg_quality_label": True,
"pushButton_resp_quality_label": True,
"pushButton_SA_label": True
},
"Current": {
"pushButton_open": True,
"pushButton_approximately_align": True,
"pushButton_preprocess_BCG": True,
"pushButton_preprocess_ECG": True,
"pushButton_detect_Jpeak": True,
"pushButton_detect_Rpeak": True,
"pushButton_label_check_BCG": True,
"pushButton_label_check_ECG": True,
"pushButton_precisely_align": True,
"pushButton_cut_PSG": True,
"pushButton_artifact_label": True,
"pushButton_bcg_quality_label": True,
"pushButton_resp_quality_label": True,
"pushButton_SA_label": True
}
}
class MainWindow(QMainWindow, Ui_Signal_Label): class MainWindow(QMainWindow, Ui_Signal_Label):
@ -52,7 +98,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.__read_config__() self.__read_config__()
self.ui.plainTextEdit_root_path.setPlainText(Config["Path"]["Root"]) self.ui.plainTextEdit_root_path.setPlainText(Config["Path"]["Root"])
self.seek_sampID(Path(Config["Path"]["Root"]) / Path(ConfigParams.PUBLIC_PATH_ORGBCG_TEXT)) self.seek_sampID(Path(Config["Path"]["Root"]) / Path(Filename.PATH_ORGBCG_TEXT))
self.approximately_align = None self.approximately_align = None
self.preprocess = None self.preprocess = None
@ -62,10 +108,22 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.precisely_align = None self.precisely_align = None
self.cut_PSG = None self.cut_PSG = None
self.artifact_label = None self.artifact_label = None
self.bcg_quality_label = None
self.resp_quality_label = None
self.SA_label = None self.SA_label = None
PublicFunc.__styleAllButton__(self, ButtonState)
try:
if QApplication.styleHints().colorScheme() == Qt.ColorScheme.Dark:
self.ui.checkBox_darkmode.setChecked(True)
else:
self.ui.checkBox_darkmode.setChecked(False)
except Exception as e:
PublicFunc.msgbox_output(self, Constants.MAINWINDOW_GET_DARKMODE_FAILURE + "" + format_exc(), Constants.TIPS_TYPE_ERROR)
# 绑定槽函数 # 绑定槽函数
self.ui.checkBox_darkmode.stateChanged.connect(self.set_dark_mode_status)
self.ui.pushButton_open.clicked.connect(self.__slot_btn_open__) self.ui.pushButton_open.clicked.connect(self.__slot_btn_open__)
self.ui.pushButton_approximately_align.clicked.connect(self.__slot_btn_approximately_align__) self.ui.pushButton_approximately_align.clicked.connect(self.__slot_btn_approximately_align__)
self.ui.pushButton_preprocess_BCG.clicked.connect(self.__slot_btn_preprocess__) self.ui.pushButton_preprocess_BCG.clicked.connect(self.__slot_btn_preprocess__)
@ -77,22 +135,24 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.ui.pushButton_precisely_align.clicked.connect(self.__slot_btn_precisely_align__) self.ui.pushButton_precisely_align.clicked.connect(self.__slot_btn_precisely_align__)
self.ui.pushButton_cut_PSG.clicked.connect(self.__slot_btn_cut_PSG__) self.ui.pushButton_cut_PSG.clicked.connect(self.__slot_btn_cut_PSG__)
self.ui.pushButton_artifact_label.clicked.connect(self.__slot_btn_artifact_label__) self.ui.pushButton_artifact_label.clicked.connect(self.__slot_btn_artifact_label__)
self.ui.pushButton_bcg_quality_label.clicked.connect(self.__slot_btn_bcg_quality_label__)
self.ui.pushButton_resp_quality_label.clicked.connect(self.__slot_btn_resp_quality_label__)
self.ui.pushButton_SA_label.clicked.connect(self.__slot_btn_SA_label__) self.ui.pushButton_SA_label.clicked.connect(self.__slot_btn_SA_label__)
@staticmethod @staticmethod
def __read_config__(): def __read_config__():
if not Path(ConfigParams.PUBLIC_CONFIG_FILE_PATH).exists(): if not Path(Params.PUBLIC_CONFIG_FILE_PATH).exists():
Path(ConfigParams.PUBLIC_CONFIG_FILE_PATH).parent.mkdir(parents=True, exist_ok=True) Path(Params.PUBLIC_CONFIG_FILE_PATH).parent.mkdir(parents=True, exist_ok=True)
with open(ConfigParams.PUBLIC_CONFIG_FILE_PATH, "w") as f: with open(Params.PUBLIC_CONFIG_FILE_PATH, "w") as f:
dump(ConfigParams.PUBLIC_CONFIG_NEW_CONTENT, f) dump(Params.PUBLIC_CONFIG_NEW_CONTENT, f)
with open(ConfigParams.PUBLIC_CONFIG_FILE_PATH, "r") as f: with open(Params.PUBLIC_CONFIG_FILE_PATH, "r") as f:
file_config = load(f.read(), Loader=FullLoader) file_config = load(f.read(), Loader=FullLoader)
Config.update(file_config) Config.update(file_config)
@staticmethod @staticmethod
def __write_config__(): def __write_config__():
with open(Path(ConfigParams.PUBLIC_CONFIG_FILE_PATH), "w") as f: with open(Path(Params.PUBLIC_CONFIG_FILE_PATH), "w") as f:
dump(Config, f) dump(Config, f)
def __slot_btn_open__(self): def __slot_btn_open__(self):
@ -100,7 +160,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
file_dialog.setFileMode(QFileDialog.Directory) file_dialog.setFileMode(QFileDialog.Directory)
file_dialog.setOption(QFileDialog.ShowDirsOnly, True) file_dialog.setOption(QFileDialog.ShowDirsOnly, True)
if file_dialog.exec_() == QFileDialog.Accepted: if file_dialog.exec_() == QFileDialog.Accepted:
self.seek_sampID(Path(file_dialog.selectedFiles()[0]) / ConfigParams.PUBLIC_PATH_ORGBCG_TEXT) self.seek_sampID(Path(file_dialog.selectedFiles()[0]) / Filename.PATH_ORGBCG_TEXT)
self.ui.plainTextEdit_root_path.setPlainText(file_dialog.selectedFiles()[0]) self.ui.plainTextEdit_root_path.setPlainText(file_dialog.selectedFiles()[0])
# 修改配置 # 修改配置
@ -120,6 +180,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.approximately_align.show(root_path, int(sampID)) self.approximately_align.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率 # 默认最大化显示而非固定分辨率
self.approximately_align.showMaximized() self.approximately_align.showMaximized()
self.check_save_path_and_mkdir(root_path, sampID)
def __slot_btn_preprocess__(self): def __slot_btn_preprocess__(self):
self.preprocess = MainWindow_preprocess() self.preprocess = MainWindow_preprocess()
@ -140,6 +201,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.preprocess.show(mode, root_path, int(sampID)) self.preprocess.show(mode, root_path, int(sampID))
# 默认最大化显示而非固定分辨率 # 默认最大化显示而非固定分辨率
self.preprocess.showMaximized() self.preprocess.showMaximized()
self.check_save_path_and_mkdir(root_path, sampID)
def __slot_btn_detect_Jpeak__(self): def __slot_btn_detect_Jpeak__(self):
self.detect_Jpeak = MainWindow_detect_Jpeak() self.detect_Jpeak = MainWindow_detect_Jpeak()
@ -152,6 +214,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.detect_Jpeak.show(root_path, int(sampID)) self.detect_Jpeak.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率 # 默认最大化显示而非固定分辨率
self.detect_Jpeak.showMaximized() self.detect_Jpeak.showMaximized()
self.check_save_path_and_mkdir(root_path, sampID)
def __slot_btn_detect_Rpeak__(self): def __slot_btn_detect_Rpeak__(self):
self.detect_Rpeak = MainWindow_detect_Rpeak() self.detect_Rpeak = MainWindow_detect_Rpeak()
@ -164,6 +227,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.detect_Rpeak.show(root_path, int(sampID)) self.detect_Rpeak.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率 # 默认最大化显示而非固定分辨率
self.detect_Rpeak.showMaximized() self.detect_Rpeak.showMaximized()
self.check_save_path_and_mkdir(root_path, sampID)
def __slot_btn_label_check__(self): def __slot_btn_label_check__(self):
self.label_check = MainWindow_label_check() self.label_check = MainWindow_label_check()
@ -186,7 +250,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.label_check.show(mode, root_path, int(sampID)) self.label_check.show(mode, root_path, int(sampID))
# 默认最大化显示而非固定分辨率 # 默认最大化显示而非固定分辨率
self.label_check.showMaximized() self.label_check.showMaximized()
self.check_save_path_and_mkdir(root_path, sampID)
def __slot_btn_precisely_align__(self): def __slot_btn_precisely_align__(self):
self.precisely_align = MainWindow_precisely_align() self.precisely_align = MainWindow_precisely_align()
@ -199,9 +263,10 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.precisely_align.show(root_path, int(sampID)) self.precisely_align.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率 # 默认最大化显示而非固定分辨率
self.precisely_align.showMaximized() self.precisely_align.showMaximized()
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():
@ -209,8 +274,7 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
if not self.check_sampID(): if not self.check_sampID():
return return
self.cut_PSG.show(root_path, int(sampID)) self.cut_PSG.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率 self.check_save_path_and_mkdir(root_path, sampID)
self.cut_PSG.showMaximized()
def __slot_btn_artifact_label__(self): def __slot_btn_artifact_label__(self):
self.artifact_label = MainWindow_artifact_label() self.artifact_label = MainWindow_artifact_label()
@ -223,6 +287,33 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.artifact_label.show(root_path, int(sampID)) self.artifact_label.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率 # 默认最大化显示而非固定分辨率
self.artifact_label.showMaximized() self.artifact_label.showMaximized()
self.check_save_path_and_mkdir(root_path, sampID)
def __slot_btn_bcg_quality_label__(self):
self.bcg_quality_label = MainWindow_bcg_quality_label()
root_path = self.ui.plainTextEdit_root_path.toPlainText()
sampID = self.ui.comboBox_sampID.currentText()
if not self.check_root_path():
return
if not self.check_sampID():
return
self.bcg_quality_label.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率
self.bcg_quality_label.showMaximized()
self.check_save_path_and_mkdir(root_path, sampID)
def __slot_btn_resp_quality_label__(self):
self.resp_quality_label = MainWindow_resp_quality_label()
root_path = self.ui.plainTextEdit_root_path.toPlainText()
sampID = self.ui.comboBox_sampID.currentText()
if not self.check_root_path():
return
if not self.check_sampID():
return
self.resp_quality_label.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率
self.resp_quality_label.showMaximized()
self.check_save_path_and_mkdir(root_path, sampID)
def __slot_btn_SA_label__(self): def __slot_btn_SA_label__(self):
self.SA_label = MainWindow_SA_label() self.SA_label = MainWindow_SA_label()
@ -235,15 +326,18 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
self.SA_label.show(root_path, int(sampID)) self.SA_label.show(root_path, int(sampID))
# 默认最大化显示而非固定分辨率 # 默认最大化显示而非固定分辨率
self.SA_label.showMaximized() self.SA_label.showMaximized()
self.check_save_path_and_mkdir(root_path, sampID)
def seek_sampID(self, path): def seek_sampID(self, path):
if not Path(path).exists(): if not Path(path).exists():
PublicFunc.msgbox_output(self, Constants.MAINWINDOW_ROOT_PATH_NOT_EXIST, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, Constants.MAINWINDOW_ROOT_PATH_NOT_EXIST, Constants.MSGBOX_TYPE_ERROR)
self.ui.comboBox_sampID.clear()
return return
sub_folders = [item.name for item in Path(path).iterdir() if item.is_dir()] sub_folders = [item.name for item in Path(path).iterdir() if item.is_dir()]
self.ui.comboBox_sampID.clear()
self.ui.comboBox_sampID.addItems(sub_folders) self.ui.comboBox_sampID.addItems(sub_folders)
self.ui.comboBox_sampID.setCurrentIndex(0)
def check_root_path(self): def check_root_path(self):
if self.ui.plainTextEdit_root_path.toPlainText() == Constants.STRING_IS_EMPTY: if self.ui.plainTextEdit_root_path.toPlainText() == Constants.STRING_IS_EMPTY:
@ -256,3 +350,60 @@ class MainWindow(QMainWindow, Ui_Signal_Label):
PublicFunc.msgbox_output(self, Constants.MAINWINDOW_SAMPID_EMPTY, Constants.MSGBOX_TYPE_ERROR) PublicFunc.msgbox_output(self, Constants.MAINWINDOW_SAMPID_EMPTY, Constants.MSGBOX_TYPE_ERROR)
return False return False
return True return True
def check_save_path_and_mkdir(self, root_path, sampID):
path_Label = Path(root_path) / Path(Filename.PATH_LABEL) / Path(str(sampID))
path_OrgBCG_Aligned = Path(root_path) / Path(Filename.PATH_ORGBCG_ALIGNED) / Path(str(sampID))
path_PSG_Aligned = Path(root_path) / Path(Filename.PATH_PSG_ALIGNED) / Path(str(sampID))
path_OrgBCG_Text = Path(root_path) / Path(Filename.PATH_ORGBCG_TEXT) / Path(str(sampID))
path_PSG_Text = Path(root_path) / Path(Filename.PATH_PSG_TEXT) / Path(str(sampID))
path_list = [path_Label, path_OrgBCG_Aligned, path_PSG_Aligned, path_OrgBCG_Text, path_PSG_Text]
for path in path_list:
if not path.exists():
path.mkdir(parents=True, exist_ok=True)
def set_dark_mode_status(self):
module_list = [
self,
self.approximately_align,
self.preprocess,
self.detect_Jpeak,
self.detect_Rpeak,
self.label_check,
self.precisely_align,
self.cut_PSG,
self.artifact_label,
self.bcg_quality_label,
self.resp_quality_label,
self.SA_label
]
try:
if self.ui.checkBox_darkmode.isChecked():
QApplication.styleHints().setColorScheme(Qt.ColorScheme.Dark)
else:
QApplication.styleHints().setColorScheme(Qt.ColorScheme.Light)
except Exception as e:
PublicFunc.msgbox_output(self, Constants.MAINWINDOW_DARKMODE_FAILURE + "" + format_exc(), Constants.MSGBOX_TYPE_ERROR)
return
for module in module_list:
try:
if module is not None:
MainWindow.update_widget_style(module)
except RuntimeError:
pass
@staticmethod
def update_widget_style(mainWindow):
all_widgets = mainWindow.centralWidget().findChildren(QWidget)
# 迭代所有部件
for widget in all_widgets:
try:
widget.style().unpolish(widget)
widget.style().polish(widget)
widget.update()
except TypeError:
pass

File diff suppressed because it is too large Load Diff

View File

@ -12,8 +12,9 @@ from pandas import read_csv, DataFrame
from scipy.signal import resample from scipy.signal import resample
from yaml import dump, load, FullLoader from yaml import dump, load, FullLoader
from func.utils.ConfigParams import Filename, Params
from func.utils.PublicFunc import PublicFunc from func.utils.PublicFunc import PublicFunc
from func.utils.Constants import Constants, ConfigParams from func.utils.Constants import Constants
from func.Filters.Preprocessing import Butterworth_for_BCG_PreProcess, Butterworth_for_ECG_PreProcess from func.Filters.Preprocessing import Butterworth_for_BCG_PreProcess, Butterworth_for_ECG_PreProcess
from func.utils.Result import Result from func.utils.Result import Result
@ -52,8 +53,12 @@ class SettingWindow(QMainWindow):
self.root_path = root_path self.root_path = root_path
self.sampID = sampID self.sampID = sampID
self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
self.config = None self.config = None
self.__read_config__() self.__read_config__()
self.__examine_freq__()
self.ui.spinBox_input_freq.valueChanged.connect(self.__update_ui__) self.ui.spinBox_input_freq.valueChanged.connect(self.__update_ui__)
self.ui.spinBox_output_freq.valueChanged.connect(self.__update_ui__) self.ui.spinBox_output_freq.valueChanged.connect(self.__update_ui__)
@ -62,11 +67,11 @@ class SettingWindow(QMainWindow):
self.ui.pushButton_cancel.clicked.connect(self.close) self.ui.pushButton_cancel.clicked.connect(self.close)
def __read_config__(self): def __read_config__(self):
if not Path(ConfigParams.PREPROCESS_CONFIG_FILE_PATH).exists(): if not Path(Params.PREPROCESS_CONFIG_FILE_PATH).exists():
with open(ConfigParams.PREPROCESS_CONFIG_FILE_PATH, "w") as f: with open(Params.PREPROCESS_CONFIG_FILE_PATH, "w") as f:
dump(ConfigParams.PREPROCESS_CONFIG_NEW_CONTENT, f) dump(Params.PREPROCESS_CONFIG_NEW_CONTENT, f)
with open(ConfigParams.PREPROCESS_CONFIG_FILE_PATH, "r") as f: with open(Params.PREPROCESS_CONFIG_FILE_PATH, "r") as f:
file_config = load(f.read(), Loader=FullLoader) file_config = load(f.read(), Loader=FullLoader)
Config.update(file_config) Config.update(file_config)
self.config = file_config self.config = file_config
@ -74,9 +79,9 @@ class SettingWindow(QMainWindow):
if self.mode == "BCG": if self.mode == "BCG":
Config.update({ Config.update({
"Path": { "Path": {
"Input": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_ORGBCG_TEXT / "Input": str((Path(self.root_path) / Filename.PATH_ORGBCG_TEXT /
Path(str(self.sampID)))), Path(str(self.sampID)))),
"Save": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_ORGBCG_TEXT / "Save": str((Path(self.root_path) / Filename.PATH_ORGBCG_TEXT /
Path(str(self.sampID)))) Path(str(self.sampID))))
}, },
"Mode": self.mode "Mode": self.mode
@ -84,9 +89,9 @@ class SettingWindow(QMainWindow):
elif self.mode == "ECG": elif self.mode == "ECG":
Config.update({ Config.update({
"Path": { "Path": {
"Input": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT / "Input": str((Path(self.root_path) / Filename.PATH_PSG_TEXT /
Path(str(self.sampID)))), Path(str(self.sampID)))),
"Save": str((Path(self.root_path) / ConfigParams.PUBLIC_PATH_PSG_TEXT / "Save": str((Path(self.root_path) / Filename.PATH_PSG_TEXT /
Path(str(self.sampID)))) Path(str(self.sampID))))
}, },
"Mode": self.mode "Mode": self.mode
@ -111,7 +116,7 @@ class SettingWindow(QMainWindow):
self.config["InputConfig"]["Freq"] = self.ui.spinBox_input_freq.value() self.config["InputConfig"]["Freq"] = self.ui.spinBox_input_freq.value()
self.config["OutputConfig"]["Freq"] = self.ui.spinBox_output_freq.value() self.config["OutputConfig"]["Freq"] = self.ui.spinBox_output_freq.value()
with open(ConfigParams.PREPROCESS_CONFIG_FILE_PATH, "w") as f: with open(Params.PREPROCESS_CONFIG_FILE_PATH, "w") as f:
dump(self.config, f) dump(self.config, f)
self.close() self.close()
@ -123,36 +128,42 @@ class SettingWindow(QMainWindow):
if self.mode == "BCG": if self.mode == "BCG":
self.ui.plainTextEdit_file_path_input.setPlainText( self.ui.plainTextEdit_file_path_input.setPlainText(
str((Path(self.root_path) / str((Path(self.root_path) /
ConfigParams.PUBLIC_PATH_ORGBCG_TEXT / Filename.PATH_ORGBCG_TEXT /
Path(str(self.sampID)) / Path(str(self.sampID)) /
Path(ConfigParams.ORGBCG_RAW + Path(Filename.ORGBCG_RAW +
str(self.ui.spinBox_input_freq.value()) + str(self.ui.spinBox_input_freq.value()) +
ConfigParams.ENDSWITH_TXT)))) Params.ENDSWITH_TXT))))
self.ui.plainTextEdit_file_path_save.setPlainText(
str((Path(self.root_path) /
ConfigParams.PUBLIC_PATH_ORGBCG_TEXT /
Path(str(self.sampID)) /
Path(ConfigParams.BCG_FILTER +
str(self.ui.spinBox_output_freq.value()) +
ConfigParams.ENDSWITH_TXT))))
elif self.mode == "ECG": elif self.mode == "ECG":
self.ui.plainTextEdit_file_path_input.setPlainText( self.ui.plainTextEdit_file_path_input.setPlainText(
str((Path(self.root_path) / str((Path(self.root_path) /
ConfigParams.PUBLIC_PATH_PSG_TEXT / Filename.PATH_PSG_TEXT /
Path(str(self.sampID)) / Path(str(self.sampID)) /
Path(ConfigParams.ECG_RAW + Path(Filename.ECG_RAW +
str(self.ui.spinBox_input_freq.value()) + str(self.ui.spinBox_input_freq.value()) +
ConfigParams.ENDSWITH_TXT)))) Params.ENDSWITH_TXT))))
self.ui.plainTextEdit_file_path_save.setPlainText(
str((Path(self.root_path) /
ConfigParams.PUBLIC_PATH_PSG_TEXT /
Path(str(self.sampID)) /
Path(ConfigParams.ECG_FILTER +
str(self.ui.spinBox_output_freq.value()) +
ConfigParams.ENDSWITH_TXT))))
else: else:
raise ValueError("模式不存在") raise ValueError("模式不存在")
def __examine_freq__(self):
if Config["Mode"] == "BCG":
signal = Filename.ORGBCG_RAW
elif Config["Mode"] == "ECG":
signal = Filename.ECG_RAW
else:
raise ValueError("模式不存在")
if Path(Config["Path"]["Input"]).is_file():
Config["Path"]["Input"] = str(Path(Config["Path"]["Input"]).parent)
result = PublicFunc.examine_file(Config["Path"]["Input"], signal, Params.ENDSWITH_TXT)
if result.status:
Config["InputConfig"]["Freq"] = result.data["freq"]
else:
PublicFunc.msgbox_output(self, signal + Constants.FAILURE_REASON["Get_Freq_Not_Correct"], Constants.MSGBOX_TYPE_ERROR)
# 数据回显
self.ui.spinBox_input_freq.setValue(Config["InputConfig"]["Freq"])
class MainWindow_preprocess(QMainWindow): class MainWindow_preprocess(QMainWindow):
@ -180,6 +191,9 @@ class MainWindow_preprocess(QMainWindow):
self.gs = None self.gs = None
self.ax0 = None self.ax0 = None
self.ui.textBrowser_info.setStyleSheet("QTextBrowser { background-color: rgb(255, 255, 200); }")
PublicFunc.__styleAllButton__(self, ButtonState)
self.msgBox = QMessageBox() self.msgBox = QMessageBox()
self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE) self.msgBox.setWindowTitle(Constants.MAINWINDOW_MSGBOX_TITLE)
@ -205,7 +219,7 @@ class MainWindow_preprocess(QMainWindow):
self.fig.subplots_adjust(top=0.98, bottom=0.05, right=0.98, left=0.1, hspace=0, wspace=0) self.fig.subplots_adjust(top=0.98, bottom=0.05, right=0.98, left=0.1, hspace=0, wspace=0)
self.ax0 = self.fig.add_subplot(self.gs[0]) self.ax0 = self.fig.add_subplot(self.gs[0])
self.ax0.grid(True) self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax0.xaxis.set_major_formatter(Params.FORMATTER)
PublicFunc.__resetAllButton__(self, ButtonState) PublicFunc.__resetAllButton__(self, ButtonState)
@ -239,9 +253,11 @@ class MainWindow_preprocess(QMainWindow):
QApplication.processEvents() QApplication.processEvents()
# 清空画框 # 清空画框
self.ax0.clear() if self.ax0 is not None:
self.ax0.clear()
# 释放资源 # 释放资源
self.setting.close()
del self.data del self.data
self.fig.clf() self.fig.clf()
plt.close(self.fig) plt.close(self.fig)
@ -254,7 +270,6 @@ class MainWindow_preprocess(QMainWindow):
def __reset__(self): def __reset__(self):
ButtonState["Current"].update(ButtonState["Default"].copy()) ButtonState["Current"].update(ButtonState["Default"].copy())
ButtonState["Current"]["pushButton_view"] = True
def __plot__(self): def __plot__(self):
# 清空画框 # 清空画框
@ -271,10 +286,10 @@ class MainWindow_preprocess(QMainWindow):
label=Constants.PREPROCESS_PLOT_LABEL_PROCESSED_DATA) label=Constants.PREPROCESS_PLOT_LABEL_PROCESSED_DATA)
self.ax0.legend(loc=Constants.PLOT_UPPER_RIGHT) self.ax0.legend(loc=Constants.PLOT_UPPER_RIGHT)
self.canvas.draw() self.canvas.draw()
return Result().success(info=Constants.DRAWING_FINISHED) return Result().success(info=Constants.DRAW_FINISHED)
else: else:
self.canvas.draw() self.canvas.draw()
return Result().success(info=Constants.DRAWING_FAILURE) return Result().success(info=Constants.DRAW_FAILURE)
def __update_config__(self): def __update_config__(self):
if self.mode == "BCG": if self.mode == "BCG":
@ -309,14 +324,29 @@ class MainWindow_preprocess(QMainWindow):
else: else:
PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_INFO) PublicFunc.text_output(self.ui, "(1/1)" + result.info, Constants.TIPS_TYPE_INFO)
self.__reset__() # 重采样
PublicFunc.progressbar_update(self, 2, 2, Constants.RESAMPLING_DATA, 0)
result = self.data.resample()
if not result.status:
PublicFunc.text_output(self.ui, "(2/2)" + 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/2)" + result.info, Constants.TIPS_TYPE_INFO)
self.setting.close()
ButtonState["Current"]["pushButton_input_setting"] = False
ButtonState["Current"]["pushButton_input"] = False
ButtonState["Current"]["pushButton_view"] = True
ButtonState["Current"]["pushButton_save"] = False
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
def __slot_btn_view__(self): def __slot_btn_view__(self):
PublicFunc.__disableAllButton__(self, ButtonState) PublicFunc.__disableAllButton__(self, ButtonState)
# 数据预处理 # 数据预处理
PublicFunc.progressbar_update(self, 1, 2, Constants.PREPROCESS_PROCESSING_DATA, 0) PublicFunc.progressbar_update(self, 1, 2, Constants.PREPROCESSING_DATA, 0)
result = self.data.preprocess() result = self.data.preprocess()
if not result.status: if not result.status:
PublicFunc.text_output(self.ui, "(1/2)" + result.info, Constants.TIPS_TYPE_ERROR) PublicFunc.text_output(self.ui, "(1/2)" + result.info, Constants.TIPS_TYPE_ERROR)
@ -352,15 +382,18 @@ class MainWindow_preprocess(QMainWindow):
PublicFunc.progressbar_update(self, 1, 1, Constants.SAVING_DATA, 0) PublicFunc.progressbar_update(self, 1, 1, Constants.SAVING_DATA, 0)
total_rows = len(DataFrame(self.data.processed_data.reshape(-1))) total_rows = len(DataFrame(self.data.processed_data.reshape(-1)))
chunk_size = ConfigParams.PREPROCESS_SAVE_CHUNK_SIZE chunk_size = Params.PREPROCESS_SAVE_CHUNK_SIZE
with open(Config["Path"]["Save"], 'w') as f: try:
for start in range(0, total_rows, chunk_size): with open(Config["Path"]["Save"], 'w') as f:
end = min(start + chunk_size, total_rows) for start in range(0, total_rows, chunk_size):
chunk = DataFrame(self.data.processed_data.reshape(-1)).iloc[start:end] end = min(start + chunk_size, total_rows)
result = self.data.save(chunk) chunk = DataFrame(self.data.processed_data.reshape(-1)).iloc[start:end]
progress = int((end / total_rows) * 100) result = self.data.save(chunk)
self.progressbar.setValue(progress) progress = int((end / total_rows) * 100)
QApplication.processEvents() self.progressbar.setValue(progress)
QApplication.processEvents()
except FileNotFoundError as e:
result = Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_File_Not_Found"])
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)
@ -374,9 +407,10 @@ class MainWindow_preprocess(QMainWindow):
PublicFunc.finish_operation(self, ButtonState) PublicFunc.finish_operation(self, ButtonState)
def reset_axes(self): def reset_axes(self):
self.ax0.clear() if self.ax0 is not None:
self.ax0.grid(True) self.ax0.clear()
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER) self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(Params.FORMATTER)
class Data: class Data:
@ -387,46 +421,29 @@ class Data:
def open_file(self): def open_file(self):
if Config["Mode"] == "BCG": if Config["Mode"] == "BCG":
signal = ConfigParams.ORGBCG_RAW signal = Filename.ORGBCG_RAW
save = Filename.BCG_FILTER
elif Config["Mode"] == "ECG": elif Config["Mode"] == "ECG":
signal = ConfigParams.ECG_RAW signal = Filename.ECG_RAW
save = Filename.ECG_FILTER
else: else:
raise ValueError("模式不存在") raise ValueError("模式不存在")
if Path(Config["Path"]["Input"]).is_file(): if Path(Config["Path"]["Input"]).is_file():
Config["Path"]["Input"] = str(Path(Config["Path"]["Input"]).parent) Config["Path"]["Input"] = str(Path(Config["Path"]["Input"]).parent)
if not Path(Config["Path"]["Input"]).exists(): result = PublicFunc.examine_file(Config["Path"]["Input"], signal, Params.ENDSWITH_TXT)
return Result().failure(info=Constants.INPUT_FAILURE + Constants.FAILURE_REASON["Path_Not_Exist"]) if result.status:
Config["Path"]["Input"] = result.data["path"]
temp_path = list( Config["InputConfig"]["Freq"] = result.data["freq"]
Path(Config["Path"]["Input"]).glob(f"{signal}*")) Config["Path"]["Save"] = str(
if len(temp_path) == 0: Path(Config["Path"]["Save"]) / Path(save + str(Config["OutputConfig"]["Freq"]) + Params.ENDSWITH_TXT))
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
signal + "" +
Config["Path"]["Input"] +
Constants.FAILURE_REASON["File_Not_Exist"])
elif len(temp_path) > 1:
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
signal + "" +
Config["Path"]["Input"] +
Constants.FAILURE_REASON["Data_File_More_Than_One"])
else: else:
path = temp_path[0] return result
Config["Path"]["Input"] = str(path)
freq = path.stem.split("_")[-1]
# 验证是否为整数或是否存在
if not freq.isdigit():
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
signal + "" +
Constants.FAILURE_REASON["Data_Frequency_Not_In_Filename"])
Config["InputConfig"]["Freq"] = int(freq)
try: try:
self.raw_data = read_csv(Config["Path"]["Input"], self.raw_data = read_csv(Config["Path"]["Input"],
encoding=ConfigParams.UTF8_ENCODING, encoding=Params.UTF8_ENCODING,
header=None).to_numpy().reshape(-1) header=None).to_numpy().reshape(-1)
except Exception as e: except Exception as e:
return Result().failure(info=Constants.INPUT_FAILURE + return Result().failure(info=Constants.INPUT_FAILURE +
@ -434,43 +451,72 @@ class Data:
return Result().success(info=Constants.INPUT_FINISHED) return Result().success(info=Constants.INPUT_FINISHED)
def preprocess(self): def resample(self):
if self.raw_data is None: if self.raw_data is None:
Result().failure(info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Data_Not_Exist"]) return Result().failure(info=Constants.RESAMPLE_FAILURE + Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
if Config["InputConfig"]["Freq"] != Config["OutputConfig"]["Freq"]: if Config["InputConfig"]["Freq"] != Config["OutputConfig"]["Freq"]:
self.raw_data = resample(self.raw_data, self.raw_data = resample(self.raw_data,
int(len(self.raw_data) * int(len(self.raw_data) *
(Config["OutputConfig"]["Freq"] / Config["InputConfig"]["Freq"]))) (Config["OutputConfig"]["Freq"] / Config["InputConfig"]["Freq"])))
else:
return Result().success(info=Constants.RESAMPLE_NO_NEED)
except Exception as e:
return Result().failure(info=Constants.RESAMPLE_FAILURE +
Constants.FAILURE_REASON["Resample_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.RESAMPLE_FINISHED)
def preprocess(self):
if self.raw_data is None:
return Result().failure(info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Data_Not_Exist"])
try:
if Config["Mode"] == "BCG": if Config["Mode"] == "BCG":
self.processed_data = Butterworth_for_BCG_PreProcess(self.raw_data, type='bandpass', if Config["Filter"]["BCGBandPassOrder"] == 0:
low_cut=Config["Filter"]["BCGBandPassLow"], self.processed_data = self.raw_data
high_cut=Config["Filter"]["BCGBandPassHigh"], else:
order=Config["Filter"]["BCGBandPassOrder"], if ((Config["Filter"]["BCGBandPassLow"] >= Config["Filter"]["BCGBandPassHigh"]) or
sample_rate=Config["OutputConfig"]["Freq"]) (Config["Filter"]["BCGBandPassLow"] <= 0) or (Config["Filter"]["BCGBandPassHigh"] <= 0)):
return Result().failure(
info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Filter_Args_Not_Correct"])
self.processed_data = Butterworth_for_BCG_PreProcess(self.raw_data, type='bandpass',
low_cut=Config["Filter"]["BCGBandPassLow"],
high_cut=Config["Filter"]["BCGBandPassHigh"],
order=Config["Filter"]["BCGBandPassOrder"],
sample_rate=Config["OutputConfig"]["Freq"])
elif Config["Mode"] == "ECG": elif Config["Mode"] == "ECG":
self.processed_data = Butterworth_for_ECG_PreProcess(self.raw_data, type='bandpass', if Config["Filter"]["ECGBandPassOrder"] == 0:
low_cut=Config["Filter"]["ECGBandPassLow"], self.processed_data = self.raw_data
high_cut=Config["Filter"]["ECGBandPassHigh"], else:
order=Config["Filter"]["ECGBandPassOrder"], if ((Config["Filter"]["ECGBandPassLow"] >= Config["Filter"]["ECGBandPassHigh"]) or
sample_rate=Config["OutputConfig"]["Freq"]) (Config["Filter"]["ECGBandPassLow"] <= 0) or (Config["Filter"]["ECGBandPassHigh"] <= 0)):
return Result().failure(
info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Filter_Args_Not_Correct"])
self.processed_data = Butterworth_for_ECG_PreProcess(self.raw_data, type='bandpass',
low_cut=Config["Filter"]["ECGBandPassLow"],
high_cut=Config["Filter"]["ECGBandPassHigh"],
order=Config["Filter"]["ECGBandPassOrder"],
sample_rate=Config["OutputConfig"]["Freq"])
else: else:
raise ValueError("模式不存在") raise ValueError("模式不存在")
except Exception as e: except Exception as e:
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) return Result().success(info=Constants.PREPROCESS_FINISHED)
def save(self, chunk): def save(self, chunk):
if self.processed_data is None: if self.processed_data is None:
return Result().failure(info=Constants.SAVING_FAILURE + Constants.FAILURE_REASON["Data_Not_Exist"]) return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Data_Not_Exist"])
try: try:
chunk.to_csv(Config["Path"]["Save"], mode='a', index=False, header=False, float_format='%.4f') chunk.to_csv(Config["Path"]["Save"], mode='a', index=False, header=False, float_format='%.4f')
except PermissionError as e:
return Result().failure(info=Constants.SAVE_FAILURE + Constants.FAILURE_REASON["Save_Permission_Denied"])
except Exception as e: except Exception as e:
return Result().failure(info=Constants.SAVING_FAILURE + return Result().failure(info=Constants.SAVE_FAILURE +
Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc()) Constants.FAILURE_REASON["Save_Exception"] + "\n" + format_exc())
return Result().success(Constants.SAVING_FINISHED) return Result().success(Constants.SAVE_FINISHED)

File diff suppressed because it is too large Load Diff

View File

@ -2,24 +2,83 @@ from PySide6.QtGui import QIntValidator, QDoubleValidator
from matplotlib.ticker import FuncFormatter from matplotlib.ticker import FuncFormatter
class ConfigParams: class Filename:
# 文件命名
PATH_ORGBCG_TEXT: str = "OrgBCG_Text"
PATH_PSG_TEXT: str = "PSG_Text"
PATH_ORGBCG_ALIGNED: str = "OrgBCG_Aligned"
PATH_PSG_ALIGNED: str = "PSG_Aligned"
PATH_ORGBCG_ORIGIN: str = "OrgBCG_Origin"
PATH_PSG_ORIGIN: str = "PSG_Origin"
PATH_LABEL: str = "Label"
PATH_REVEIVE_ORIGIN: str = "Receive_Origin"
PATH_REPORT: str = "Report"
PATH_SAMPID: str = "<sampID>"
SUFFIX_FREQ: str = "采样率"
# Folder: OrgBCG_Text
ORGBCG_RAW: str = "OrgBCG_Raw_"
BCG_FILTER: str = "BCG_Filter_"
JPEAK_REVISE: str = "Jpeak_revise_"
JPEAK_REVISE_CORRECTED: str = "Jpeak_revise_corrected_"
# Folder: PSG_Text
ECG_RAW: str = "ECG II_Raw_"
THO_RAW: str = "Effort Tho_Raw_"
ABD_RAW: str = "Effort Abd_Raw_"
FLOWT_RAW: str = "Flow T_Raw_"
FLOWP_RAW: str = "Flow P_Raw_"
SNORE_RAW: str = "Snore_Raw_"
SPO2_RAW: str = "SpO2_Raw_"
FIVE_CLASS_RAW: str = "5_class_Raw_"
STARTTIME_RAW: str = "StartTime_Raw"
SA_LABEL_RAW: str = "SA Label_Raw"
ECG_FILTER: str = "ECG_Filter_"
RPEAK_FINAL: str = "Rpeak_final_"
RPEAK_FINAL_CORRECTED: str = "Rpeak_final_corrected_"
# Folder: OrgBCG_Aligned
ORGBCG_SYNC: str = "OrgBCG_Sync_"
BCG_SYNC: str = "BCG_Sync_"
# Folder: PSG_Aligned
STAGE_SYNC: str = "5_class_Sync_"
ECG_SYNC: str = "ECG_Sync_"
THO_SYNC: str = "Effort Tho_Sync_"
ABD_SYNC: str = "Effort Abd_Sync_"
FLOWT_SYNC: str = "Flow T_Sync_"
FLOWP_SYNC: str = "Flow P_Sync_"
SNORE_SYNC: str = "Snore_Sync_"
SPO2_SYNC: str = "SpO2_Sync_"
FIVE_CLASS_SYNC: str = "5_class_Sync_"
SA_LABEL_SYNC: str = "SA Label_Sync"
JPEAK_SYNC: str = "Jpeak_Sync_"
RPEAK_SYNC: str = "Rpeak_Sync_"
# Folder: Label
APPROXIMATELY_ALIGN_INFO: str = "Approximately_Align_Info"
PRECISELY_ALIGN_INFO: str = "Precisely_Align_Info"
ARTIFACT_A: str = "Artifact_a_"
ARTIFACT_B: str = "Artifact_b_"
ARTIFACT_C: str = "Artifact_c_"
SA_LABEL_CORRECTED: str = "SA Label_corrected"
SA_LABEL_ADD: str = "SA Label_add"
RESP_QUALITY_LABEL: str = "Resp_quality_label"
THO_PEAK: str = "Tho_peak_"
SQ_LABEL_10S: str = "SQ_label_10s"
SQ_LABEL_30S: str = "SQ_label_30s"
class Params:
# 公共 # 公共
PUBLIC_CONFIG_FILE_PATH: str = "./config/Config_public.yaml" PUBLIC_CONFIG_FILE_PATH: str = "./config/Config_public.yaml"
PUBLIC_PATH_ORGBCG_TEXT: str = "OrgBCG_Text"
PUBLIC_PATH_PSG_TEXT: str = "PSG_Text"
PUBLIC_PATH_ORGBCG_ALIGNED: str = "OrgBCG_Aligned"
PUBLIC_PATH_PSG_ALIGNED: str = "PSG_Aligned"
PUBLIC_PATH_LABEL: str = "Label"
PUBLIC_CONFIG_NEW_CONTENT = { PUBLIC_CONFIG_NEW_CONTENT = {
"Path": { "Path": {
"Root": "" "Root": ""
} }
} }
UTF8_ENCODING: str = "utf-8" UTF8_ENCODING: str = "utf-8"
# 目前用到这个编码的地方:
# <BCG的质量评估打标>里的保存和读取csv文件的地方注意的是读取原始数据时依然使用UTF-8
GBK_ENCODING: str = "gbk" GBK_ENCODING: str = "gbk"
ENDSWITH_TXT: str = ".txt" ENDSWITH_TXT: str = ".txt"
ENDSWITH_CSV: str = ".csv" ENDSWITH_CSV: str = ".csv"
@ -28,16 +87,8 @@ class ConfigParams:
ACTION_PAN_SHORTCUT_KEY: str = "X" ACTION_PAN_SHORTCUT_KEY: str = "X"
ACTION_ZOOM_SHORTCUT_KEY: str = "C" ACTION_ZOOM_SHORTCUT_KEY: str = "C"
FONT: str = "Microsoft YaHei UI" FONT: str = "Microsoft YaHei UI"
VALIDATOR_INTEGER = QIntValidator(-2**31, 2**31 - 1)
ORGBCG_RAW: str = "OrgBCG_Raw_" VALIDATOR_DOUBLE = QDoubleValidator(-1e100, 1e100, 10)
ECG_RAW: str = "ECG II_Raw_"
THO_RAW: str = "Effort Tho_Raw_"
ABD_RAW: str = "Effort Abd_Raw_"
BCG_FILTER: str = "BCG_Filter_"
ECG_FILTER: str = "ECG_Filter_"
# 数据粗同步 # 数据粗同步
APPROXIMATELY_ALIGN_CONFIG_FILE_PATH: str = "./config/Config_approximately_align.yaml" APPROXIMATELY_ALIGN_CONFIG_FILE_PATH: str = "./config/Config_approximately_align.yaml"
@ -55,15 +106,12 @@ class ConfigParams:
"BandPassHigh": 0.7 "BandPassHigh": 0.7
}, },
"Multiple_Factor":100, "Multiple_Factor":100,
"Second_PerEpoch": 30,
"CorrByEpoch": "CorrByEpoch":
{ {
"window_epoch": 6 "window_epoch": 6
} }
} }
APPROXIMATELY_ALIGN_INPUT_ORGBCG_FILENAME: str = "OrgBCG_Raw_"
APPROXIMATELY_ALIGN_INPUT_THO_FILENAME: str = "Effort Tho_Raw_"
APPROXIMATELY_ALIGN_INPUT_ABD_FILENAME: str = "Effort Abd_Raw_"
APPROXIMATELY_ALIGN_SAVE_FILENAME: str = "Approximately_Align_Info"
# 预处理 # 预处理
PREPROCESS_CONFIG_FILE_PATH: str = "./config/Config_preprocess.yaml" PREPROCESS_CONFIG_FILE_PATH: str = "./config/Config_preprocess.yaml"
@ -83,10 +131,6 @@ class ConfigParams:
"ECGBandPassHigh": 25 "ECGBandPassHigh": 25
} }
} }
PREPROCESS_INPUT_BCG_FILENAME: str = "OrgBCG_Raw_"
PREPROCESS_INPUT_ECG_FILENAME: str = "ECG II_Raw_"
PREPROCESS_SAVE_BCG_FILENAME: str = "BCG_Filter_"
PREPROCESS_SAVE_ECG_FILENAME: str = "ECG_Filter_"
PREPROCESS_SAVE_CHUNK_SIZE: int = 1000000 PREPROCESS_SAVE_CHUNK_SIZE: int = 1000000
# BCG的J峰算法定位 # BCG的J峰算法定位
@ -96,6 +140,7 @@ class ConfigParams:
"Freq": 1000 "Freq": 1000
}, },
"Filter": { "Filter": {
"Mode": "skip",
"BandPassLow": 2, "BandPassLow": 2,
"BandPassHigh": 10 "BandPassHigh": 10
}, },
@ -107,8 +152,6 @@ class ConfigParams:
"UseCPU": False, "UseCPU": False,
"DetectMethod": "" "DetectMethod": ""
} }
DETECT_JPEAK_INPUT_BCG_FILENAME: str = "BCG_Filter_"
DETECT_JPEAK_SAVE_FILENAME: str = "JPeak_revise"
DETECT_JPEAK_SAVE_CHUNK_SIZE: int = 100 DETECT_JPEAK_SAVE_CHUNK_SIZE: int = 100
# ECG的R峰算法定位 # ECG的R峰算法定位
@ -118,14 +161,13 @@ class ConfigParams:
"Freq": 1000 "Freq": 1000
}, },
"Filter": { "Filter": {
"BandPassLow": 2, "Mode": "skip",
"BandPassHigh": 15 "BandPassLow": 1,
"BandPassHigh": 25
}, },
"PeaksValue": 200, "PeaksValue": 200,
"DetectMethod": "" "DetectMethod": ""
} }
DETECT_RPEAK_INPUT_ECG_FILENAME: str = "ECG_Filter_"
DETECT_RPEAK_SAVE_FILENAME: str = "Rpeak_final"
DETECT_RPEAK_SAVE_CHUNK_SIZE: int = 100 DETECT_RPEAK_SAVE_CHUNK_SIZE: int = 100
# 人工纠正 # 人工纠正
@ -135,6 +177,7 @@ class ConfigParams:
"Freq": 1000 "Freq": 1000
}, },
"Filter": { "Filter": {
"Mode": "skip",
"BCGBandPassOrder": 2, "BCGBandPassOrder": 2,
"BCGBandPassLow": 2, "BCGBandPassLow": 2,
"BCGBandPassHigh": 10, "BCGBandPassHigh": 10,
@ -152,69 +195,67 @@ class ConfigParams:
"MoveSpeed": 1000 "MoveSpeed": 1000
} }
} }
LABEL_CHECK_INPUT_BCG_FILENAME: str = "BCG_Filter_"
LABEL_CHECK_INPUT_JPEAK_FILENAME: str = "JPeak_revise"
LABEL_CHECK_SAVE_JPEAK_FILENAME: str = "JPeak_revise_corrected"
LABEL_CHECK_INPUT_ECG_FILENAME: str = "ECG_Filter_"
LABEL_CHECK_INPUT_RPEAK_FILENAME: str = "Rpeak_final"
LABEL_CHECK_SAVE_RPEAK_FILENAME: str = "Rpeak_final_corrected"
LABEL_CHECK_APPROXIMATELY_ALIGNINFO_FILENAME: str = "Approximately_Align_Info"
LABEL_CHECK_SAVE_CHUNK_SIZE: int = 100 LABEL_CHECK_SAVE_CHUNK_SIZE: int = 100
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 = {
"InputConfig": { "InputConfig": {
"ECGFreq": 1000 "orgBcgFreq": 1000,
"BCGFreq": 1000,
"ECGFreq": 1000,
"UseFreq": 1000
} }
} }
PRECISELY_ALIGN_INPUT_ORGBCG_FILENAME: str = "OrgBCG_Raw_"
PRECISELY_ALIGN_INPUT_BCG_FILENAME: str = "BCG_Filter_"
PRECISELY_ALIGN_INPUT_JPEAK_FILENAME: str = "JPeak_revise_corrected"
PRECISELY_ALIGN_SAVE_ALIGNINFO_FILENAME: str = "Align_info"
PRECISELY_ALIGN_INPUT_ECG_FILENAME: str = "ECG_Filter_"
PRECISELY_ALIGN_INPUT_RPEAK_FILENAME: str = "Rpeak_final_corrected"
PRECISELY_ALIGN_SAVE_ORGBCG_FILENAME: str = "OrgBCG_Sync_"
PRECISELY_ALIGN_SAVE_BCG_FILENAME: str = "BCG_Sync_"
PRECISELY_ALIGN_SAVE_ECG_FILENAME: str = "ECG_Sync_"
PRECISELY_ALIGN_SAVE_JPEAK_FILENAME: str = "JPeak_Sync"
PRECISELY_ALIGN_SAVE_RPEAK_FILENAME: str = "Rpeak_Sync"
PRECISELY_ALIGN_APPROXIMATELY_ALIGNINFO_FILENAME: str = "Approximately_Align_Info"
PRECISELY_ALIGN_ACTION_GET_RANGE_SHORTCUT_KEY: str = "Z" PRECISELY_ALIGN_ACTION_GET_RANGE_SHORTCUT_KEY: str = "Z"
PRECISELY_ALIGN_SAVE_CHUNK_SIZE: int = 1000000 PRECISELY_ALIGN_SAVE_CHUNK_SIZE: int = 1000000
PRECISELY_ALIGN_SAVE_PEAK_CHUNK_SIZE: int = 100 PRECISELY_ALIGN_SAVE_PEAK_CHUNK_SIZE: int = 100
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": "Effort Tho_Raw_", "Effort Tho": "PSG:" + Filename.THO_RAW,
"Effort Abd": "Effort Abd_Raw_", "Effort Abd": "PSG:" + Filename.ABD_RAW,
"Flow T": "Flow T_Raw_", "Flow T": "PSG:" + Filename.FLOWT_RAW,
"Flow P": "Flow P_Raw_", "Flow P": "PSG:" + Filename.FLOWP_RAW,
"Snore": "Snore_Raw_", "Snore": "PSG:" + Filename.SNORE_RAW,
"SpO2": "SpO2_Raw_", "SpO2": "PSG:" + Filename.SPO2_RAW,
"5_class": "5_class_Raw_" "5_class": "PSG:" + Filename.FIVE_CLASS_RAW
},
"OrgBCGChannelInput":{
"OrgBCG": "OrgBCG:OrgBCG_Raw_"
},
"ECGChannelInput": {
"ECG": "PSG:" + Filename.ECG_RAW
}, },
"LabelInput": { "LabelInput": {
"SA Label": "SA Label_Raw" "SA Label": Filename.SA_LABEL_RAW
}, },
"StartTime": "StartTime_Raw", "StartTime": Filename.STARTTIME_RAW,
"ChannelSave": { "ChannelSave": {
"Effort Tho": "Effort Tho_Sync_", "Effort Tho": "PSG:" + Filename.THO_SYNC,
"Effort Abd": "Effort Abd_Sync_", "Effort Abd": "PSG:" + Filename.ABD_SYNC,
"Flow T": "Flow T_Sync_", "Flow T": "PSG:" + Filename.FLOWT_SYNC,
"Flow P": "Flow P_Sync_", "Flow P": "PSG:" + Filename.FLOWP_SYNC,
"Snore": "Snore_Sync_", "Snore": "PSG:" + Filename.SNORE_SYNC,
"SpO2": "SpO2_Sync_", "SpO2": "PSG:" + Filename.SPO2_SYNC,
"5_class": "5_class_Sync_" "5_class": "PSG:" + Filename.FIVE_CLASS_SYNC,
"OrgBCG": "OrgBCG:" + Filename.ORGBCG_SYNC,
"ECG": "PSG:" + Filename.ECG_SYNC
}, },
"LabelSave": { "LabelSave": {
"SA Label": "SA Label_Sync" "SA Label": Filename.SA_LABEL_SYNC
}, },
"EndWith": { "EndWith": {
"Effort Tho": ENDSWITH_TXT, "Effort Tho": ENDSWITH_TXT,
@ -226,19 +267,20 @@ class ConfigParams:
"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_SAVE_ECG_ALIGNINFO_FILENAME: str = "Align_info" CUT_PAIR_FILE_SALABEL_EVENT: list = ["Hypopnea", "Central apnea", "Obstructive apnea", "Mixed apnea"]
CUT_PSG_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"
ARTIFACT_LABEL_CONFIG_NEW_CONTENT: dict = { ARTIFACT_LABEL_CONFIG_NEW_CONTENT: dict = {
"InputConfig": { "InputConfig": {
"orgBcgFreq": 1000, "orgBcgFreq": 1000,
"BCGFreq": 1000 "BCGFreq": 1000,
"UseFreq": 1000
}, },
"CustomAutoplayArgs": { "CustomAutoplayArgs": {
"MoveLength": 15000, "MoveLength": 15000,
@ -246,22 +288,69 @@ class ConfigParams:
"MoveSpeed": 1000 "MoveSpeed": 1000
} }
} }
ARTIFACT_LABEL_INPUT_ORGBCG_FILENAME: str = "OrgBCG_Sync_"
ARTIFACT_LABEL_INPUT_BCG_FILENAME: str = "BCG_Sync_"
ARTIFACT_LABEL_SAVE_FILENAME_A: str = "Artifact_a"
ARTIFACT_LABEL_SAVE_FILENAME_B: str = "Artifact_b"
ARTIFACT_LABEL_SAVE_FILENAME_C: str = "Artifact_c"
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_QUALITY_LABEL_CONFIG_FILE_PATH: str = "./config/Config_bcg_quality_label.yaml"
BCG_QUALITY_LABEL_CONFIG_NEW_CONTENT: dict = {
"InputConfig": {
"BCGFreq": 1000,
"UseFreq": 1000
}
}
BCG_QUALITY_LABEL_BTN_PREV_SHORTCUT_KEY: str = "A"
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_NEW_CONTENT: dict = {
"InputConfig": {
"OrgBCGFreq": 1000,
"ThoFreq": 100,
"OrgBCGUseFreq": 1000,
"ThoUseFreq": 100
},
"Threshold": {
"Low": 0.65,
"High": 0.8
},
"FindPeaks" : {
"MinInterval": 300,
"MinHeight": 0.1
},
"Filter": {
"BandPassLow": 0.1,
"BandPassHigh": 1
}
}
RESP_QUALITY_LABEL_PREPROCESS_FC: int = 1
RESP_QUALITY_LABEL_PARTS_TIME_SEC: int = 30
RESP_QUALITY_LABEL_LABEL_TRANSPARENCY: float = 0.2
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"
SA_LABEL_CONFIG_NEW_CONTENT: dict = { SA_LABEL_CONFIG_NEW_CONTENT: dict = {
"InputConfig": { "InputConfig": {
"orgBcgFreq": 1000, "OrgBCGFreq": 1000,
"ThoFreq": 100, "ThoFreq": 100,
"AbdFreq": 100, "AbdFreq": 100,
"FlowTFreq": 100, "FlowTFreq": 10,
"FlowPFreq": 100, "FlowPFreq": 100,
"SpO2Freq": 1, "SpO2Freq": 1,
"PlotFreq": 100 "PlotFreq": 100
@ -271,71 +360,62 @@ class ConfigParams:
"Back": 60 "Back": 60
} }
} }
SA_LABEL_INPUT_ORGBCG_FILENAME: str = "OrgBCG_Sync_"
SA_LABEL_INPUT_THO_FILENAME: str = "Effort Tho_Sync_"
SA_LABEL_INPUT_ABD_FILENAME: str = "Effort Abd_Sync_"
SA_LABEL_INPUT_FLOWT_FILENAME: str = "Flow T_Sync_"
SA_LABEL_INPUT_FLOWP_FILENAME: str = "Flow P_Sync_"
SA_LABEL_INPUT_SPO2_FILENAME: str = "SpO2_Sync_"
SA_LABEL_INPUT_ARTIFACT_FILENAME: str = "Artifact_a"
SA_LABEL_INPUT_LABEL_FILENAME: str = "SA Label_Sync"
SA_LABEL_SAVE_FILENAME: str = "SA Label_corrected"
SA_LABEL_SAVE2_FILENAME: str = "SA Label_add"
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
# TODO弃用 SA_LABEL_BTN_PREV_10s_SHORTCUT_KEY: str = "Q"
# 通用 SA_LABEL_BTN_NEXT_10s_SHORTCUT_KEY: str = "E"
VALIDATOR_INTEGER = QIntValidator(-2**31, 2**31 - 1) SA_LABEL_BTN_PREV_30s_SHORTCUT_KEY: str = "A"
VALIDATOR_DOUBLE = QDoubleValidator(-1e100, 1e100, 10) 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"
BCG_QUALITY_LABEL_INPUT_BCG_FILENAME: str = "BCG_sync_" SA_LABEL_BTN_BEST_FIT_SHORTCUT_KEY: str = "B"
BCG_QUALITY_LABEL_INPUT_ARTIFACT_FILENAME: str = "Artifact_a" SA_LABEL_BTN_EDIT_MODE_SHORTCUT_KEY: str = "Z"
BCG_QUALITY_LABEL_SAVE_FILENAME: str = "SQ_label_" SA_LABEL_BTN_PAN_MODE_SHORTCUT_KEY: str = "X"
SA_LABEL_BTN_CONFIRMLABEL_SHORTCUT_KEY: str = "S"
BCG_QUALITY_LABEL_INPUT_DEFAULT_FS: int = 1000 SA_LABEL_BTN_QUICK_REMARK_WAITINGFORTALK_SHORTCUT_KEY: str = "J"
SA_LABEL_RADIOBUTTON_OSA_SHORTCUT_KEY: str = "7"
BCG_QUALITY_LABEL_SAVE_MODE_10S: str = "10s" SA_LABEL_RADIOBUTTON_CSA_SHORTCUT_KEY: str = "8"
BCG_QUALITY_LABEL_SAVE_MODE_30S: str = "30s" SA_LABEL_RADIOBUTTON_MSA_SHORTCUT_KEY: str = "9"
SA_LABEL_RADIOBUTTON_HPY_SHORTCUT_KEY: str = "0"
BCG_QUALITY_LABEL_MODE_10S_LENGTH = 10 * BCG_QUALITY_LABEL_INPUT_DEFAULT_FS SA_LABEL_RADIOBUTTON_1_CLASS_SHORTCUT_KEY: str = "1"
BCG_QUALITY_LABEL_MODE_30S_LENGTH = 30 * BCG_QUALITY_LABEL_INPUT_DEFAULT_FS SA_LABEL_RADIOBUTTON_2_CLASS_SHORTCUT_KEY: str = "2"
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"
RESP_QUALITY_LABEL_INPUT_XINXIAO_FILENAME: str = "orgBcg_sync_" SA_LABEL_BTN_BETWEEN_ARTIFACT_SHORTCUT_KEY: str = "O"
RESP_QUALITY_LABEL_INPUT_THO_FILENAME: str = "Effort_Tho_sync_" SA_LABEL_BTN_LOW_SNR_SHORTCUT_KEY: str = "P"
RESP_QUALITY_LABEL_INPUT_ARTIFACT_FILENAME: str = "Artifact_a"
RESP_QUALITY_LABEL_SAVE_RESP_QUALITY_LABNEL_FILENAME: str = "Resp_quality_label"
RESP_QUALITY_LABEL_SAVE_THO_PEAK_FILENAME: str = "Tho_peak"
RESP_QUALITY_LABEL_INPUT_XINXIAO_DEFAULT_FS: int = 1000
RESP_QUALITY_LABEL_INPUT_THO_DEFAULT_FS: int = 200
RESP_QUALITY_LABEL_PARTS_TIME_SEC: int = 30
RESP_QUALITY_LABEL_PREPROCESS_FC: int = 1
RESP_QUALITY_LABEL_THRESHOLD1_DEFAULT: float = 0.65
RESP_QUALITY_LABEL_THRESHOLD2_DEFAULT: float = 0.8
RESP_QUALITY_LABEL_FINDPEAKS_MIN_INTERVAL_DEFAULT: int = 300
RESP_QUALITY_LABEL_FINDPEAKS_MIN_HEIGHT_DEFAULT: float = 0.1
RESP_QUALITY_LABEL_CUSTOM_LOW_DEFAULT: float = 0.1
RESP_QUALITY_LABEL_CUSTOM_HIGH_DEFAULT: float = 1
RESP_QUALITY_LABEL_LABEL_TRANSPARENCY: float = 0.2
RESP_QUALITY_LABEL_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY: str = "Z"
# 睡眠呼吸暂停事件打标
# 禁止实例化 # 禁止实例化
def __new__(cls): def __new__(cls):
raise TypeError("Constants class cannot be instantiated") raise TypeError("Constants class cannot be instantiated")
# 禁止修改常量 # 禁止修改常量
@classmethod @classmethod
def __setattr__(cls, key, value): def __setattr__(cls, key, value):

View File

@ -1,10 +1,11 @@
from func.utils.ConfigParams import ConfigParams from func.utils.ConfigParams import Params
class Constants: 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"
@ -14,6 +15,8 @@ class Constants:
MAINWINDOW_ROOT_PATH_NOT_EXIST: str = "根目录路径输入错误" MAINWINDOW_ROOT_PATH_NOT_EXIST: str = "根目录路径输入错误"
MAINWINDOW_SAMPID_EMPTY: str = "样本ID为空" MAINWINDOW_SAMPID_EMPTY: str = "样本ID为空"
MAINWINDOW_MSGBOX_TITLE: str = "消息" MAINWINDOW_MSGBOX_TITLE: str = "消息"
MAINWINDOW_GET_DARKMODE_FAILURE: str = "获取深浅色状态失败,不影响标注工作,可忽略"
MAINWINDOW_DARKMODE_FAILURE: str = "切换深浅色模式失败,不影响标注工作,可忽略"
INPUTTING_DATA: str = "正在导入数据" INPUTTING_DATA: str = "正在导入数据"
INPUT_FINISHED: str = "导入完成" INPUT_FINISHED: str = "导入完成"
@ -22,22 +25,33 @@ 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 = "重采样完成"
RESAMPLE_FAILURE: str = "重采样失败" RESAMPLE_FAILURE: str = "重采样失败"
RESAMPLE_NO_NEED: str = "无需进行重采样"
LOADING_ARCHIVE: str = "正在获取历史存档"
ARCHIVE_EXIST: str = "找到历史存档,成功读取"
ARCHIVE_NOT_EXIST: str = "未找到历史存档,创建新存档"
ARCHIVE_EMPTY: str = "历史存档为空,创建新存档"
DRAWING_DATA: str = "正在绘制图形" DRAWING_DATA: str = "正在绘制图形"
DRAWING_FINISHED: str = "绘制完成" DRAW_FINISHED: str = "绘制完成"
DRAWING_FAILURE: str = "绘制失败" DRAW_FAILURE: str = "绘制失败"
UPDATING_TABLEWIDGET_AND_INFO: str = "正在更新表格和信息" UPDATING_TABLEWIDGET_AND_INFO: str = "正在更新表格和信息"
UPDATING_FINISHED: str = "更新完成" UPDATING_TABLEWIDGET: str = "正在更新表格"
UPDATING_FAILURE: str = "更新失败" UPDATING_INFO: str = "正在更新信息"
UPDATE_FINISHED: str = "更新完成"
UPDATE_FAILURE: str = "更新失败"
SAVING_DATA: str = "正在保存数据" SAVING_DATA: str = "正在保存数据"
SAVING_FINISHED: str = "保存完成" SAVE_FINISHED: str = "保存完成"
SAVING_FAILURE: str = "保存失败" SAVE_FAILURE: str = "保存失败"
CORRESPONDING_INTERVAL_PROMOTE_TEMPLATE: str = "经粗对齐计算BCG({},{})对应的ECG约区间为({},{})"
OPERATION_FINISHED: str = "操作完成" OPERATION_FINISHED: str = "操作完成"
OPERATION_FAILURE: str = "操作失败" OPERATION_FAILURE: str = "操作失败"
@ -61,11 +75,6 @@ class Constants:
PLOT_COLOR_PINK: str = "#ff00ff" PLOT_COLOR_PINK: str = "#ff00ff"
PLOT_COLOR_PURPLE: str = "m" PLOT_COLOR_PURPLE: str = "m"
PLOT_COLOR_GRAY: str = "gray" PLOT_COLOR_GRAY: str = "gray"
PLOT_COLOR_DEEP_YELLOW: str = "#ffa500"
PLOT_COLOR_YELLOW: str = "#ffff00"
PLOT_COLOR_AQUA: str = "#00ffff"
PLOT_COLOR_PURPLE_PINK: str = "#ee82ee"
PLOT_COLOR_DEEP_GREY: str = "#808080"
PROGRESSBAR_STYLE: str = """ PROGRESSBAR_STYLE: str = """
QProgressBar { QProgressBar {
@ -75,7 +84,7 @@ class Constants:
color: black; color: black;
text-align: center; text-align: center;
height: 20px; height: 20px;
background: #E5E4E4; background: rgba(245, 245, 220, 128);
} }
QProgressBar::chunk { QProgressBar::chunk {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #9AFF99, stop:1 #9A9AFE); background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #9AFF99, stop:1 #9A9AFE);
@ -83,16 +92,102 @@ class Constants:
} }
""" """
LABELBTN_STYLE_NORMAL: str = """
QPushButton:hover {
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
CHECKBOX_STYLE_NORMAL: str = '''
QCheckBox {
border: 2px solid rgb(128, 128, 128);
border-radius: 11px;
}
QCheckBox::indicator{
width: 20px;
height: 20px;
border-radius: 10px;
}
QCheckBox::indicator:checked {
background-color: rgba(0, 255, 0, 192);
image: url(./image/correct.svg);
}
QCheckBox::indicator:unchecked {
background-color: rgba(255, 0, 0, 128);
}
QCheckBox::indicator:disabled {
background-color: rgba(119, 136, 153, 128);
}'''
FAILURE_REASON: dict = { FAILURE_REASON: dict = {
"Path_Not_Exist": "(路径不存在)", "Path_Not_Exist": "(路径不存在)",
"File_Not_Exist": "(数据文件不存在)", "File_Not_Exist": "(数据文件不存在)",
"File_More_Than_One": "(数据文件超过一个)", "File_More_Than_One": "(数据文件超过一个)",
"Data_Frequency_Not_In_Filename": "(无法找到文件名中的数据频率信息)",
"Suffix_Not_Correct": "(文件扩展名不正确)",
"Frequency_Not_In_Filename": "(数据频率不在文件名中)", "Frequency_Not_In_Filename": "(数据频率不在文件名中)",
"Data_Not_Exist": "(数据不存在)", "Data_Not_Exist": "(数据不存在)",
"Model_Path_Not_Exist": "(模型文件不存在)",
"Cut_Data_Length_not_Correct": "(切割数据时长度不正确)",
"Align_Label_SALabel_Format_not_Correct": "映射标签时SA Label中的文件格式不正确",
"Filename_Format_not_Correct": "(文件名格式不正确)",
"Method_Not_Exist": "(检测方法不存在)",
"Data_Length_not_Correct": "OrgBCG和BCG长度不匹配",
"Artifact_Format_Not_Correct": "(体动长度或格式不正确)",
"Data_Length_Not_Correct": "(信号长度不正确)",
"Filter_Args_Not_Correct": "滤波器参数输入不正确上下截止频率都要大于0且上截止频率应大于下截止频率",
"Interval_Args_Not_Correct": "(间期参数输入不正确,上间期阈值应大于下间期阈值)",
"Save_Permission_Denied": "(所保存的文件正在被其他进程使用)",
"Save_File_Not_Found": "(保存路径不存在)",
"OrgBCG_Cut_Length_Not_Correct": "OrgBCG的切割长度不正确Pre+Post长度大于信号长度",
"PSG_Cut_Length_Not_Correct": "PSG的切割长度不正确Pre+Post长度大于信号长度",
"Get_Freq_Not_Correct": "(无法获取数据采样率,将填入配置文件中的采样率。可能是因为文件不存在或文件命名格式不正确导致,请检查数据)",
"orgBcg_Machine_Start_Time_Not_Exist": "OrgBCG的设备启动时间不存在",
"Open_Data_Exception": "(打开数据异常)", "Open_Data_Exception": "(打开数据异常)",
"Process_Exception": "(处理异常)",
"Preprocess_Exception": "(预处理异常)", "Preprocess_Exception": "(预处理异常)",
"Save_Exception": "(保存异常)" "Save_Exception": "(保存异常)",
"Only_Resample_Exception": "(仅重采样异常)",
"Resp_Get_Exception": "(呼吸提取异常)",
"Pre_Resample_Exception": "(预重采样异常)",
"Delete_Base_Exception": "(去基线异常)",
"Standardize_Exception": "(标准化异常)",
"Resample_Exception": "(重采样异常)",
"Calculate_Correlation1_Exception": "计算互相关1/2异常",
"Calculate_Correlation2_Exception": "计算互相关2/2异常",
"Calculate_Maxvalue_Pos_Exception": "(计算最大值位置异常)",
"Invalid_Side_Parameter": "(无效的方向参数)",
"Get_Epoch_Exception": "获取epoch异常",
"Get_Corr_By_Epoch_Exception": "通过epoch获取相关性异常",
"Predict_Exception": "预测异常请检查模型文件存放是否正确或检测方法是否正确或是尝试勾选上“强制使用CPU”运行",
"Read_Model_Exception": "(读取模型异常)",
"Calculate_Correlation_Value_Equal": "(计算相关性参数相同)",
"Get_Corresponding_Interval_Exception": "(获取对应区间异常)",
"Calculate_Correlation_JJIVRange_too_Large": "计算相关性JJIV范围大于RRIV范围",
"Calculate_Correlation_Exception": "(计算相关性异常)",
"Correlation_Align_Exception": "(处理相关对齐异常)",
"PostProcess_Align_Exception": "(数据后处理异常)",
"Cut_Data_Exception": "(切割数据异常)",
"Align_Label_Exception": "(映射标签异常)",
"Get_File_and_Freq_Excepetion": "(检查文件是否存在并获取其数据采样率异常)",
"Update_tableWidget_Exception": "(更新表格异常)",
"Update_Info_Exception": "(更新信息异常)",
"Get_Artifact_Format_Exception": "(获取体动长度或格式异常)",
"Label_Format_Exception": "(获取标签格式异常)",
"Calculate_Peak_Exception": "(计算峰值异常)",
"res_orgBcg_Not_Exist": "切割后OrgBCG不存在",
"res_BCG_Not_Exist": "切割后BCG不存在",
"cut_ECG_Not_Exist": "切割后ECG不存在",
"cut_Jpeak_Not_Exist": "切割后J峰不存在",
"cut_Rpeak_Not_Exist": "切割后R峰不存在",
"Get_Approximately_Align_Info_Exception": "(获取粗对齐信息异常)",
"Calculate_Approximately_Align_Info_Exception": "(计算粗对齐信息异常)",
"Delete_Rough_Cut_File_Exception": "(删除历史粗对齐文件异常)",
"Resample_BCG_Exception": "粗对齐重采样BCG异常",
} }
# 数据粗同步 # 数据粗同步
@ -136,41 +231,11 @@ class Constants:
APPROXIMATELY_EPOCH_GET_FINISHED: str = "获取epoch完成" APPROXIMATELY_EPOCH_GET_FINISHED: str = "获取epoch完成"
APPROXIMATELY_EPOCH_GET_FAILURE: str = "获取epoch失败" APPROXIMATELY_EPOCH_GET_FAILURE: str = "获取epoch失败"
APPROXIMATELY_ALIGN_FAILURE_REASON = { APPROXIMATELY_ESTIMATE_FREQUENCY_CALCULATING: str = "正在估计采样率"
"Data_Path_Not_Exist": "(路径不存在)", APPROXIMATELY_ESTIMATE_FREQUENCY_FINISHED: str = "估计采样率完成"
"Data_File_Not_Exist": "(数据文件不存在)", APPROXIMATELY_ESTIMATE_FREQUENCY_FAILURE: str = "估计采样率失败"
"Data_File_More_Than_One": "(数据文件超过一个)",
"Data_Frequency_Not_In_Filename": "(数据频率不在文件名中)",
"Read_Data_Exception": "(读取数据异常)",
"Raw_Data_Not_Exist": "(原始数据不存在)",
"Only_Resample_Exception": "(仅重采样异常)",
"Resp_Get_Exception": "(呼吸提取异常)",
"Pre_Resample_Exception": "(预重采样异常)",
"Delete_Base_Exception": "(去基线异常)",
"Standardize_Exception": "(标准化异常)",
"Resample_Exception": "(重采样异常)",
"Calculate_Correlation1_Exception": "计算互相关1/2异常",
"Calculate_Correlation2_Exception": "计算互相关2/2异常",
"Calculate_Maxvalue_Pos_Exception": "(计算最大值位置异常)",
"Get_Epoch_Exception": "获取epoch异常",
"Processed_Data_Not_Exist": "(处理后数据不存在)",
"Save_Exception": "(保存异常)"
}
# 预处理 # 预处理
PREPROCESS_PROCESSING_DATA: str = "正在处理数据"
PREPROCESS_PROCESS_FINISHED: str = "处理完成"
PREPROCESS_PROCESS_FAILURE: str = "处理失败"
PREPROCESS_FAILURE_REASON = {
"Data_Path_Not_Exist": "(路径不存在)",
"Read_Data_Exception": "(读取数据异常)",
"Raw_Data_Not_Exist": "(原始数据不存在)",
"Filter_Exception": "(滤波器异常)",
"Processed_Data_Not_Exist": "(处理后数据不存在)",
"Save_Exception": "(保存异常)"
}
PREPROCESS_PLOT_LABEL_ORIGINAL_DATA: str = "Original_Data" PREPROCESS_PLOT_LABEL_ORIGINAL_DATA: str = "Original_Data"
PREPROCESS_PLOT_LABEL_PROCESSED_DATA: str = "Processed_Data" PREPROCESS_PLOT_LABEL_PROCESSED_DATA: str = "Processed_Data"
PREPROCESS_OUTPUT_INPUT_AMP_OFFSET: int = 1850 PREPROCESS_OUTPUT_INPUT_AMP_OFFSET: int = 1850
@ -180,26 +245,10 @@ class Constants:
DETECT_JPEAK_LOAD_FINISHED: str = "读取完成" DETECT_JPEAK_LOAD_FINISHED: str = "读取完成"
DETECT_JPEAK_LOAD_FAILURE: str = "读取失败" DETECT_JPEAK_LOAD_FAILURE: str = "读取失败"
DETECT_JPEAK_PREDICTING_PEAK: str = "正在预测峰值" DETECT_JPEAK_PREDICTING_PEAK: str = "正在预测峰值"
DETECT_JPEAK_PREDICT_FINISHED: str = "预测完成" DETECT_JPEAK_PREDICT_FINISHED: str = "预测完成"
DETECT_JPEAK_PREDICT_FAILURE: str = "预测失败" DETECT_JPEAK_PREDICT_FAILURE: str = "预测失败"
DETECT_JPEAK_FAILURE_REASON = {
"Data_Path_Not_Exist": "(数据路径不存在)",
"Read_Data_Exception": "(读取数据异常)",
"Model_Path_Not_Exist": "(模型路径不存在)",
"Model_File_Not_Exist": "(模型文件不存在)",
"Read_Model_Exception": "(读取模型异常)",
"Predict_Exception": "(峰值预测异常)",
"Raw_Data_Not_Exist": "(原始数据不存在)",
"Filter_Exception": "(滤波器异常)",
"Processed_Data_Not_Exist": "(处理后数据不存在)",
"Peak_Not_Exist": "(预测的峰值不存在)",
"Save_Exception": "(保存异常)"
}
DETECT_JPEAK_DATA_LENGTH_POINTS: str = "数据长度(点数):" DETECT_JPEAK_DATA_LENGTH_POINTS: str = "数据长度(点数):"
DETECT_JPEAK_DURATION_MIN: str = "数据时长(分钟):" DETECT_JPEAK_DURATION_MIN: str = "数据时长(分钟):"
DETECT_JPEAK_PEAK_AMOUNT: str = "J峰个数" DETECT_JPEAK_PEAK_AMOUNT: str = "J峰个数"
@ -212,54 +261,19 @@ class Constants:
DETECT_RPEAK_LOAD_FINISHED: str = "读取完成" DETECT_RPEAK_LOAD_FINISHED: str = "读取完成"
DETECT_RPEAK_LOAD_FAILURE: str = "读取失败" DETECT_RPEAK_LOAD_FAILURE: str = "读取失败"
DETECT_RPEAK_PROCESSING_DATA: str = "正在处理数据"
DETECT_RPEAK_PROCESS_FINISHED: str = "处理完成"
DETECT_RPEAK_PROCESS_FAILURE: str = "处理失败"
DETECT_RPEAK_PREDICTING_PEAK: str = "正在预测峰值" DETECT_RPEAK_PREDICTING_PEAK: str = "正在预测峰值"
DETECT_RPEAK_PREDICT_FINISHED: str = "预测完成" DETECT_RPEAK_PREDICT_FINISHED: str = "预测完成"
DETECT_RPEAK_PREDICT_FAILURE: str = "预测失败" DETECT_RPEAK_PREDICT_FAILURE: str = "预测失败"
DETECT_RPEAK_FAILURE_REASON = {
"Data_Path_Not_Exist": "(数据路径不存在)",
"Read_Data_Exception": "(读取数据异常)",
"Method_Not_Exist": "(检测方法不存在)",
"Read_Method_Exception": "(读取方法异常)",
"Predict_Exception": "(峰值预测异常)",
"Raw_Data_Not_Exist": "(原始数据不存在)",
"Filter_Exception": "(滤波器异常)",
"Processed_Data_Not_Exist": "(处理后数据不存在)",
"Peak_Not_Exist": "(预测的峰值不存在)",
"Save_Exception": "(保存异常)"
}
DETECT_RPEAK_DATA_LENGTH_POINTS: str = "数据长度(点数):" DETECT_RPEAK_DATA_LENGTH_POINTS: str = "数据长度(点数):"
DETECT_RPEAK_DURATION_MIN: str = "数据时长(分钟):" DETECT_RPEAK_DURATION_MIN: str = "数据时长(分钟):"
DETECT_RPEAK_PEAK_AMOUNT: str = "R峰个数" DETECT_RPEAK_PEAK_AMOUNT: str = "R峰个数"
DETECT_RPEAK_PLOT_LABEL_RRIV: str = "RRIV" DETECT_RPEAK_PLOT_LABEL_RRIV: str = "RRIV"
DETECT_RPEAK_PLOT_LABEL_ECG: str = "ECG" DETECT_RPEAK_PLOT_LABEL_ECG: str = "ECG_Processed"
DETECT_RPEAK_PLOT_LABEL_R_PEAKS: str = "R_Peaks" DETECT_RPEAK_PLOT_LABEL_R_PEAKS: str = "R_Peaks"
DETECT_RPEAK_PLOT_LABEL_INTERVAL: str = "Interval" DETECT_RPEAK_PLOT_LABEL_INTERVAL: str = "Interval"
# 人工纠正 # 人工纠正
LABEL_CHECK_PROCESSING_DATA: str = "正在处理数据"
LABEL_CHECK_PROCESS_FINISHED: str = "处理完成"
LABEL_CHECK_PROCESS_FAILURE: str = "处理失败"
LABEL_CHECK_LOADING_ARCHIVE: str = "正在获取历史存档"
LABEL_CHECK_ARCHIVE_EXIST: str = "找到历史存档,成功读取"
LABEL_CHECK_ARCHIVE_NOT_EXIST: str = "未找到历史存档,创建新存档"
LABEL_CHECK_FAILURE_REASON = {
"Data_Path_Not_Exist": "(数据路径不存在)",
"Read_Data_Exception": "(读取数据异常)",
"Raw_Data_Not_Exist": "(原始数据不存在)",
"Filter_Exception": "(滤波器异常)",
"Processed_Data_Not_Exist": "(处理后数据不存在)",
"Peak_Not_Exist": "(峰值不存在)",
"Save_Exception": "(保存异常)"
}
LABEL_CHECK_PLOT_LABEL_SIGNAL: str = "Data_Processed" LABEL_CHECK_PLOT_LABEL_SIGNAL: str = "Data_Processed"
LABEL_CHECK_PLOT_LABEL_PEAK_ORIGINAL: str = "Peaks_Original" LABEL_CHECK_PLOT_LABEL_PEAK_ORIGINAL: str = "Peaks_Original"
LABEL_CHECK_PLOT_LABEL_PEAK_CORRECTED: str = "Peaks_Corrected" LABEL_CHECK_PLOT_LABEL_PEAK_CORRECTED: str = "Peaks_Corrected"
@ -275,13 +289,18 @@ class Constants:
LABEL_CHECK_ADD_POINTS_SUCCESSFULLY: str = "成功新增点,横坐标:" LABEL_CHECK_ADD_POINTS_SUCCESSFULLY: str = "成功新增点,横坐标:"
LABEL_CHECK_REMOVE_POINTS_SUCCESSFULLY: str = "成功删除点,横坐标:" LABEL_CHECK_REMOVE_POINTS_SUCCESSFULLY: str = "成功删除点,横坐标:"
LABEL_CHECK_NO_POINT_IN_THE_INTERVAL: str = "所选区间内无新增或删除点" LABEL_CHECK_NO_POINT_IN_THE_INTERVAL: str = "所选区间内无新增或删除点"
LABEL_CHECK_ACTION_LABEL_MULTIPLE_NAME: str = f"批量更改标签({ConfigParams.LABEL_CHECK_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY})" LABEL_CHECK_ACTION_LABEL_MULTIPLE_NAME: str = f"批量更改标签({Params.LABEL_CHECK_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY})"
# 数据精同步 # 数据精同步
PRECISELY_ALIGN_PROCESSING_DATA: str = "正在处理数据" PRECISELY_ALIGN_PROCESSING_DATA: str = "正在处理数据"
PRECISELY_ALIGN_PROCESS_FINISHED: str = "处理完成" PRECISELY_ALIGN_PROCESS_FINISHED: str = "处理完成"
PRECISELY_ALIGN_PROCESS_FAILURE: str = "处理失败" PRECISELY_ALIGN_PROCESS_FAILURE: str = "处理失败"
#
PRECISELY_ALIGN_GET_RRIV_FROM_ECG_POINT_FAILURE: str = "从ECG点获取RRIV失败"
PRECISELY_ALIGN_GET_RRIV_FROM_ECG_POINT_FINISHED: str = "从ECG点获取RRIV完成"
PRECISELY_ALIGN_CALCULATING_CORRELATION_FRONT: str = "正在计算前段相关性" PRECISELY_ALIGN_CALCULATING_CORRELATION_FRONT: str = "正在计算前段相关性"
PRECISELY_ALIGN_CALCULATE_FINISHED_FRONT: str = "计算前段相关性完成" PRECISELY_ALIGN_CALCULATE_FINISHED_FRONT: str = "计算前段相关性完成"
PRECISELY_ALIGN_CALCULATE_FAILURE_FRONT: str = "计算前段相关性失败" PRECISELY_ALIGN_CALCULATE_FAILURE_FRONT: str = "计算前段相关性失败"
@ -289,6 +308,10 @@ class Constants:
PRECISELY_ALIGN_CALCULATE_FINISHED_BACK: str = "计算后段相关性完成" PRECISELY_ALIGN_CALCULATE_FINISHED_BACK: str = "计算后段相关性完成"
PRECISELY_ALIGN_CALCULATE_FAILURE_BACK: str = "计算后段相关性失败" PRECISELY_ALIGN_CALCULATE_FAILURE_BACK: str = "计算后段相关性失败"
PRECISELY_ALIGN_GET_CORRESPONDING_INTERVAL : str = "正在获取对应区间"
PRECISELY_ALIGN_GET_CORRESPONDING_INTERVAL_FAILURE : str = "获取对应区间失败"
PRECISELY_ALIGN_GET_CORRESPONDING_INTERVAL_FINISHED : str = "获取对应区间完成"
PRECISELY_ALIGN_ALIGNING_CORRELATION: str = "正在处理相关对齐" PRECISELY_ALIGN_ALIGNING_CORRELATION: str = "正在处理相关对齐"
PRECISELY_ALIGN_ALIGN_CORRELATION_FINISHED: str = "处理相关对齐完成" PRECISELY_ALIGN_ALIGN_CORRELATION_FINISHED: str = "处理相关对齐完成"
PRECISELY_ALIGN_ALIGN_CORRELATION_FAILURE: str = "处理相关对齐失败" PRECISELY_ALIGN_ALIGN_CORRELATION_FAILURE: str = "处理相关对齐失败"
@ -301,9 +324,9 @@ class Constants:
PRECISELY_ALIGN_SAVING_ALIGNINFO_FINISHED: str = "保存对齐信息完成" PRECISELY_ALIGN_SAVING_ALIGNINFO_FINISHED: str = "保存对齐信息完成"
PRECISELY_ALIGN_SAVING_ALIGNINFO_FAILURE: str = "保存对齐信息失败" PRECISELY_ALIGN_SAVING_ALIGNINFO_FAILURE: str = "保存对齐信息失败"
PRECISELY_ALIGN_SAVING_RES_ORGBCG: str = "正在保存切割后orgBcg" PRECISELY_ALIGN_SAVING_RES_ORGBCG: str = "正在保存切割后OrgBCG"
PRECISELY_ALIGN_SAVING_RES_ORGBCG_FINISHED: str = "保存切割后orgBcg完成" PRECISELY_ALIGN_SAVING_RES_ORGBCG_FINISHED: str = "保存切割后OrgBCG完成"
PRECISELY_ALIGN_SAVING_RES_ORGBCG_FAILURE: str = "保存切割后orgBcg失败" PRECISELY_ALIGN_SAVING_RES_ORGBCG_FAILURE: str = "保存切割后OrgBCG失败"
PRECISELY_ALIGN_SAVING_RES_BCG: str = "正在保存切割后BCG" PRECISELY_ALIGN_SAVING_RES_BCG: str = "正在保存切割后BCG"
PRECISELY_ALIGN_SAVING_RES_BCG_FINISHED: str = "保存切割后BCG完成" PRECISELY_ALIGN_SAVING_RES_BCG_FINISHED: str = "保存切割后BCG完成"
@ -321,24 +344,6 @@ class Constants:
PRECISELY_ALIGN_SAVING_CUT_RPEAK_FINISHED: str = "保存切割后R峰完成" PRECISELY_ALIGN_SAVING_CUT_RPEAK_FINISHED: str = "保存切割后R峰完成"
PRECISELY_ALIGN_SAVING_CUT_RPEAK_FAILURE: str = "保存切割后R峰失败" PRECISELY_ALIGN_SAVING_CUT_RPEAK_FAILURE: str = "保存切割后R峰失败"
PRECISELY_ALIGN_FAILURE_REASON = {
"Data_Path_Not_Exist": "(数据路径不存在)",
"Read_Data_Exception": "(读取数据异常)",
"Data_Not_Exist": "(数据不存在)",
"Process_Data_Exception": "(处理数据异常)",
"Calculate_Correlation_Value_Equal": "(计算相关性参数相同)",
"Calculate_Correlation_JJIVRange_too_Large": "计算相关性JJIV范围大于RRIV范围",
"Calculate_Correlation_Exception": "(计算相关性异常)",
"Correlation_Align_Exception": "(处理相关对齐异常)",
"PostProcess_Align_Exception": "(数据后处理异常)",
"res_orgBcg_Not_Exist": "切割后orgBcg不存在",
"res_BCG_Not_Exist": "切割后BCG不存在",
"cut_ECG_Not_Exist": "切割后ECG不存在",
"cut_Jpeak_Not_Exist": "切割后J峰不存在",
"cut_Rpeak_Not_Exist": "切割后R峰不存在",
"Save_Exception": "(保存异常)"
}
PRECISELY_ALIGN_PLOT_LABEL_JJIV: str = "JJIV" PRECISELY_ALIGN_PLOT_LABEL_JJIV: str = "JJIV"
PRECISELY_ALIGN_PLOT_LABEL_RRIV: str = "RRIV" PRECISELY_ALIGN_PLOT_LABEL_RRIV: str = "RRIV"
PRECISELY_ALIGN_PLOT_LABEL_CORRE_RRIV_JJIV: str = "corre(RRIV, JJIV)" PRECISELY_ALIGN_PLOT_LABEL_CORRE_RRIV_JJIV: str = "corre(RRIV, JJIV)"
@ -349,59 +354,38 @@ class Constants:
PRECISELY_ALIGN_PLOT_LABEL_SELECTED_POINT: str = "Selected Point" PRECISELY_ALIGN_PLOT_LABEL_SELECTED_POINT: str = "Selected Point"
PRECISELY_ALIGN_NO_POINT_IN_THE_INTERVAL: str = "所选区间内无有效点" PRECISELY_ALIGN_NO_POINT_IN_THE_INTERVAL: str = "所选区间内无有效点"
PRECISELY_ALIGN_RECOVER_SCALE: str = "尺度恢复" PRECISELY_ALIGN_RECOVER_SCALE: str = "尺度恢复"
PRECISELY_ALIGN_ACTION_GET_RANGE_NAME: str = f"设置范围({ConfigParams.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_PSG_ALIGNING_LABEL: str = "正在映射标签" CUT_PAIR_FILE_ALIGNING_LABEL: str = "正在映射标签"
CUT_PSG_ALIGN_LABEL_FINISHED: str = "映射标签完成" CUT_PAIR_FILE_ALIGN_LABEL_FINISHED: str = "映射标签完成"
CUT_PSG_ALIGN_LABEL_FAILURE: 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_FAILURE_REASON: str = {
"Filename_Format_not_Correct": "(文件名格式不正确)",
"File_not_Exist": "(需要处理的文件不存在)",
"Get_File_and_Freq_Excepetion": "(检查文件是否存在并获取其数据采样率异常)",
"Read_Data_Exception": "(读取数据异常)",
"Cut_Data_Length_not_Correct": "(切割数据时长度不正确)",
"Cut_Data_Exception": "(切割数据异常)",
"Align_Label_SALabel_Format_not_Correct": "映射标签时SA Label中的文件格式不正确",
"Align_Label_Exception": "(映射标签异常)",
"Save_Data_not_Exist": "(需要保存的数据不存在)",
"Save_Exception": "(保存异常)"
}
# 体动标注 # 体动标注
ARTIFACT_LABEL_LOADING_ARCHIVE: str = "正在获取历史存档" ARTIFACT_LABEL_PLOT_LABEL_ORGBCG_SYNC: str = "OrgBCG_Sync"
ARTIFACT_LABEL_ARCHIVE_EXIST: str = "找到历史存档,成功读取" ARTIFACT_LABEL_PLOT_LABEL_BCG_SYNC: str = "BCG_Sync"
ARTIFACT_LABEL_ARCHIVE_NOT_EXIST: str = "未找到历史存档,创建新存档"
ARTIFACT_LABEL_UPDATING_TABLE: str = "正在更新表格"
ARTIFACT_LABEL_UPDATING_INFO: str = "正在更新信息"
ARTIFACT_LABEL_UPDATE_FINISHED: str = "更新完成"
ARTIFACT_LABEL_UPDATE_FAILURE: str = "更新失败"
ARTIFACT_LABEL_FAILURE_REASON: str = {
"Data_Path_Not_Exist": "(数据路径不存在)",
"Read_Data_Exception": "(读取数据异常)",
"File_not_Exist": "(需要处理的文件不存在)",
"Data_Length_not_Correct": "orgBcg和BCG长度不匹配",
"Artifact_Format_Not_Correct": "(体动长度或格式不正确)",
"Get_Artifact_Format_Exception": "(获取体动长度或格式异常)",
"Update_tableWidget_Exception": "(更新表格异常)",
"Update_Info_Exception": "(更新信息异常)",
"Save_Data_not_Exist": "(需要保存的数据不存在)",
"Save_Exception": "(保存异常)"
}
ARTIFACT_LABEL_PLOT_LABEL_ORGBCG_SYNC: str = "orgBcg_sync"
ARTIFACT_LABEL_PLOT_LABEL_BCG_SYNC: str = "BCG_sync"
ARTIFACT_LABEL_PREV_MOVE: str = "向前移动" ARTIFACT_LABEL_PREV_MOVE: str = "向前移动"
ARTIFACT_LABEL_NEXT_MOVE: str = "向后移动" ARTIFACT_LABEL_NEXT_MOVE: str = "向后移动"
ARTIFACT_LABEL_PAUSE: str = "暂停移动" ARTIFACT_LABEL_PAUSE: str = "暂停移动"
@ -412,112 +396,87 @@ class Constants:
ARTIFACT_LABEL_JUMP_ARTIFACT: str = "跳转到体动" ARTIFACT_LABEL_JUMP_ARTIFACT: str = "跳转到体动"
ARTIFACT_LABEL_RECOVER_SCALE: str = "尺度恢复" ARTIFACT_LABEL_RECOVER_SCALE: str = "尺度恢复"
ARTIFACT_LABEL_MISS_ARGS: str = "打标参数未填写" ARTIFACT_LABEL_MISS_ARGS: str = "打标参数未填写"
ARTIFACT_LABEL_OVERLAPPING: str = "当前所打标的片段存在重合,重合片段序号:" ARTIFACT_LABEL_FRONT_TWO_SECONDS_MERGE: str = "所选区域前2秒内有体动将根据规则执行合并"
ARTIFACT_LABEL_BACK_TWO_SECONDS_MERGE: str = "所选区域后2秒内有体动将根据规则执行合并"
ARTIFACT_LABEL_FRONT_AND_BACK_TWO_SECONDS_MERGE: str = "所选区域前后2秒内都有体动将根据规则执行合并"
ARTIFACT_LABEL_FRONT_TWO_SECONDS_WARNING: str = "所选区域前2秒内有体动仅进行提示"
ARTIFACT_LABEL_BACK_TWO_SECONDS_WARNING: str = "所选区域后2秒内有体动仅进行提示"
ARTIFACT_LABEL_FRONT_AND_BACK_TWO_SECONDS_WARNING: str = "所选区域前后2秒内都有体动仅进行提示"
ARTIFACT_LABEL_DELETE_ARTIFACT_SUCCESSFULLY: str = "体动被删除" ARTIFACT_LABEL_DELETE_ARTIFACT_SUCCESSFULLY: str = "体动被删除"
ARTIFACT_LABEL_DELETE_ARTIFACT_FAILURE: str = "需要被删除的体动不存在" ARTIFACT_LABEL_DELETE_ARTIFACT_FAILURE: str = "需要被删除的体动不存在"
ARTIFACT_LABEL_ACTION_LABEL: str = f"标注体动({ConfigParams.ARTIFACT_LABEL_ACTION_LABEL_ARTIFACT_SHORTCUT_KEY})" ARTIFACT_LABEL_ACTION_LABEL: str = f"标注体动({Params.ARTIFACT_LABEL_ACTION_LABEL_ARTIFACT_SHORTCUT_KEY})"
# 橙色orange
ARTIFACT_LABEL_LABELBTN_STYLE_1: str = """ ARTIFACT_LABEL_LABELBTN_STYLE_1: str = """
QPushButton { QPushButton {
background-color: #ffa500; /* 设置背景颜色 */ background-color: rgba(255, 165, 0, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */ padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */ border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */ border-radius: 10px; /* 设置圆角 */
} }
QPushButton:hover { QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */ background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}""" }"""
# 黄色yellow
ARTIFACT_LABEL_LABELBTN_STYLE_2: str = """ ARTIFACT_LABEL_LABELBTN_STYLE_2: str = """
QPushButton { QPushButton {
background-color: #ffff00; /* 设置背景颜色 */ background-color: rgba(255, 255, 0, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */ padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */ border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */ border-radius: 10px; /* 设置圆角 */
} }
QPushButton:hover { QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */ background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}""" }"""
# 草绿色limegreen
ARTIFACT_LABEL_LABELBTN_STYLE_3: str = """ ARTIFACT_LABEL_LABELBTN_STYLE_3: str = """
QPushButton { QPushButton {
background-color: #00ffff; /* 设置背景颜色 */ background-color: rgba(50, 205, 50, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */ padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */ border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */ border-radius: 10px; /* 设置圆角 */
} }
QPushButton:hover { QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */ background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}""" }"""
# 青色cyan
ARTIFACT_LABEL_LABELBTN_STYLE_4: str = """ ARTIFACT_LABEL_LABELBTN_STYLE_4: str = """
QPushButton { QPushButton {
background-color: #ee82ee; /* 设置背景颜色 */ background-color: rgba(0, 255, 255, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */ padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */ border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */ border-radius: 10px; /* 设置圆角 */
} }
QPushButton:hover { QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */ background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}""" }"""
# 品红色magenta
ARTIFACT_LABEL_LABELBTN_STYLE_5: str = """ ARTIFACT_LABEL_LABELBTN_STYLE_5: str = """
QPushButton { QPushButton {
background-color: #808080; /* 设置背景颜色 */ background-color: rgba(255, 0, 255, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */ padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */ border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */ border-radius: 10px; /* 设置圆角 */
} }
QPushButton:hover { QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */ background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}""" }"""
# 睡眠呼吸暂停事件标注 # BCG的质量标注
SA_LABEL_LOADING_ARCHIVE: str = "正在获取历史存档"
SA_LABEL_ARCHIVE_EXIST: str = "找到历史存档,成功读取"
SA_LABEL_ARCHIVE_NOT_EXIST: str = "未找到历史存档,创建新存档"
SA_LABEL_UPDATING_TABLE: str = "正在更新表格"
SA_LABEL_UPDATING_INFO: str = "正在更新信息"
SA_LABEL_UPDATE_FINISHED: str = "更新完成"
SA_LABEL_UPDATE_FAILURE: str = "更新失败"
SA_LABEL_PROCESSING_DATA: str = "正在处理数据"
SA_LABEL_PROCESS_FINISHED: str = "处理完成"
SA_LABEL_PROCESS_FAILURE: str = "处理失败"
SA_LABEL_FAILURE_REASON = {
"Data_Path_Not_Exist": "(数据路径不存在)",
"Read_Data_Exception": "(读取数据异常)",
"Raw_Data_Not_Exist": "(原始数据不存在)",
"Filter_Exception": "(滤波器异常)",
"Resample_Exception": "(重采样异常)",
"Artifact_Format_Not_Correct": "(体动长度或格式不正确)",
"Get_Artifact_Format_Exception": "(获取体动长度或格式异常)",
"Label_Format_Exception": "(获取标签格式异常)",
"Update_tableWidget_Exception": "(更新表格异常)",
"Update_Info_Exception": "(更新信息异常)",
"Process_Data_Exception": "(处理数据异常)",
"Save_Exception": "(保存异常)"
}
SA_LABEL_JUMP: str = "跳转到事件"
# TODO弃用
# 质量打标
BCG_QUALITY_LABEL_FILES_NOT_FOUND: str = f"无法找到{ConfigParams.BCG_QUALITY_LABEL_INPUT_BCG_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.BCG_QUALITY_LABEL_INPUT_ARTIFACT_FILENAME}{ConfigParams.ENDSWITH_TXT},无法执行<BCG的质量标注>"
BCG_QUALITY_LABEL_FILES_FOUND: str = f"找到{ConfigParams.BCG_QUALITY_LABEL_INPUT_BCG_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.BCG_QUALITY_LABEL_INPUT_ARTIFACT_FILENAME}{ConfigParams.ENDSWITH_TXT}"
BCG_QUALITY_LABEL_HISTORICAL_SAVE_FOUND: str = f"找到历史存档文件{ConfigParams.BCG_QUALITY_LABEL_SAVE_FILENAME}{ConfigParams.BCG_QUALITY_LABEL_SAVE_MODE_10S}{ConfigParams.ENDSWITH_CSV}{ConfigParams.BCG_QUALITY_LABEL_SAVE_FILENAME}{ConfigParams.BCG_QUALITY_LABEL_SAVE_MODE_30S}{ConfigParams.ENDSWITH_CSV},已成功读取"
BCG_QUALITY_LABEL_MODE_UNSELECTED: str = "显示模式未选择"
BCG_QUALITY_LABEL_INPUT_SIGNAL_FAILURE: str = "导入信号失败,请检查信号长度"
BCG_QUALITY_LABEL_INPUT_ARTIFACT_FAILURE_FORMAT: str = "导入体动失败,请检查体动标签格式"
BCG_QUALITY_LABEL_INPUT_ARTIFACT_FAILURE_LENGTH: str = "导入体动失败请检查体动长度是否为4的倍数"
BCG_QUALITY_LABEL_RUNNING: str = "开始执行任务<BCG的质量评估标注>"
BCG_QUALITY_LABEL_10S_MODE: str = f"{ConfigParams.BCG_QUALITY_LABEL_SAVE_MODE_10S}_MODE"
BCG_QUALITY_LABEL_30S_MODE: str = f"{ConfigParams.BCG_QUALITY_LABEL_SAVE_MODE_30S}_MODE"
BCG_QUALITY_LABEL_COLUMN_LABEL: str = "label" BCG_QUALITY_LABEL_COLUMN_LABEL: str = "label"
BCG_QUALITY_LABEL_COLUMN_REMARK: str = "remark" BCG_QUALITY_LABEL_COLUMN_REMARK: str = "remark"
BCG_QUALITY_LABEL_PLOT_LABEL_SIGNAL: str = "BCG"
BCG_QUALITY_LABEL_PLOT_LABEL_ARTIFACT: str = "Artifact"
BCG_QUALITY_LABEL_PLOT_LABEL_LONGEST_CONTINUOUS: str = "Longest_Continuous"
BCG_QUALITY_LABEL_10S_A: str = "a1"
BCG_QUALITY_LABEL_10S_B: str = "b1"
BCG_QUALITY_LABEL_10S_C: str = "c1"
BCG_QUALITY_LABEL_30S_A1: str = "a1"
BCG_QUALITY_LABEL_30S_A2: str = "a2"
BCG_QUALITY_LABEL_30S_B1: str = "b1"
BCG_QUALITY_LABEL_30S_B2: str = "b2"
BCG_QUALITY_LABEL_30S_C: str = "c1"
BCG_QUALITY_LABEL_TOBELABELED: str = "f1"
BCG_QUALITY_LABEL_VIEWING_THE_FIRST_PART: str = "你正在查看第1段信号" BCG_QUALITY_LABEL_VIEWING_THE_FIRST_PART: str = "你正在查看第1段信号"
BCG_QUALITY_LABEL_VIEWING_THE_LAST_PART: str = "你正在查看最后1段信号" BCG_QUALITY_LABEL_VIEWING_THE_LAST_PART: str = "你正在查看最后1段信号"
BCG_QUALITY_LABEL_VIEWING_THE_FIRST_PART_UNLABELED: str = "前面的片段都被打标将跳转至第1段信号" BCG_QUALITY_LABEL_VIEWING_THE_FIRST_PART_UNLABELED: str = "前面的片段都被打标将跳转至第1段信号"
@ -525,107 +484,87 @@ class Constants:
BCG_QUALITY_LABEL_LABELED_FINISHED: str = "该份数据打标已全部完成" BCG_QUALITY_LABEL_LABELED_FINISHED: str = "该份数据打标已全部完成"
BCG_QUALITY_LABEL_VIEWING_PART: str = "正在查看信号段" BCG_QUALITY_LABEL_VIEWING_PART: str = "正在查看信号段"
BCG_QUALITY_LABEL_JUMP_PART: str = "跳转到片段" BCG_QUALITY_LABEL_JUMP_PART: str = "跳转到片段"
BCG_QUALITY_LABEL_CLICKED_CHECKBOX_HIGHLIGHT_LONGEST_CONTINUOUS: str = "点击了<高亮最长连续>"
BCG_QUALITY_LABEL_CLICKED_CHECKBOX_DISPLAY_AFTERFILTER: str = "点击了<去除工频噪声>"
BCG_QUALITY_LABEL_CLICKED_CHECKBOX_EXAMINE_TOBOLABELED: str = "点击了<仅查未标片段>"
BCG_QUALITY_LABEL_LABEL_ALL_TO_TYPE_C_QUESTION_CONTENT: str = "你确定要将所有片段标记为类型C" BCG_QUALITY_LABEL_LABEL_ALL_TO_TYPE_C_QUESTION_CONTENT: str = "你确定要将所有片段标记为类型C"
BCG_QUALITY_LABEL_LABEL_ALL_TO_TYPE_C: str = "已将所有片段标记为类型C"
BCG_QUALITY_LABEL_LABEL_ARTIFACT_TO_TYPE_C_QUESTION_CONTENT: str = "你确定要将所有带有体动的片段标记为类型C" BCG_QUALITY_LABEL_LABEL_ARTIFACT_TO_TYPE_C_QUESTION_CONTENT: str = "你确定要将所有带有体动的片段标记为类型C"
BCG_QUALITY_LABEL_LABEL_ARTIFACT_TO_TYPE_C: str = "已将所有带有体动的片段标记为类型C"
BCG_QUALITY_LABEL_PLOT_LABEL_SIGNAL: str = "BCG"
BCG_QUALITY_LABEL_PLOT_LABEL_ARTIFACT: str = "Artifact"
BCG_QUALITY_LABEL_PLOT_LABEL_LONGEST_CONTINUOUS: str = "Longest_Continuous"
BCG_QUALITY_LABEL_10S_A: str = "a"
BCG_QUALITY_LABEL_10S_B: str = "b"
BCG_QUALITY_LABEL_10S_C: str = "c"
BCG_QUALITY_LABEL_10S_A_LIST: str = "label_a"
BCG_QUALITY_LABEL_10S_B_LIST: str = "label_b"
BCG_QUALITY_LABEL_10S_C_LIST: str = "label_c"
BCG_QUALITY_LABEL_30S_A1: str = "a"
BCG_QUALITY_LABEL_30S_A2: str = "b"
BCG_QUALITY_LABEL_30S_B1: str = "c"
BCG_QUALITY_LABEL_30S_B2: str = "d"
BCG_QUALITY_LABEL_30S_C: str = "e"
BCG_QUALITY_LABEL_30S_A1_LIST: str = "label_a1"
BCG_QUALITY_LABEL_30S_A2_LIST: str = "label_a2"
BCG_QUALITY_LABEL_30S_B1_LIST: str = "label_b1"
BCG_QUALITY_LABEL_30S_B2_LIST: str = "label_b2"
BCG_QUALITY_LABEL_30S_C_LIST: str = "label_c"
BCG_QUALITY_LABEL_tobeLabeled: str = "f"
BCG_QUALITY_LABEL_tobeLabeled_LIST: str = "label_tobeLabeled"
BCG_QUALITY_LABEL_LABELBTN_STYLE: str = """ BCG_QUALITY_LABEL_LABELBTN_STYLE: str = """
QPushButton { QPushButton {
background-color: orange; /* 设置背景颜色 */ background-color: rgba(255, 165, 0, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */ padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */ border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */ border-radius: 10px; /* 设置圆角 */
} }
QPushButton:hover { QPushButton:hover {
background-color: yellow; /* 鼠标悬停时的背景颜色 */ background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}""" }"""
# 呼吸可用性及间期标注 # 呼吸可用性及间期标注
RESP_QUALITY_LABEL_FILES_NOT_FOUND: str = f"无法找到{ConfigParams.RESP_QUALITY_LABEL_INPUT_XINXIAO_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.RESP_QUALITY_LABEL_INPUT_THO_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.RESP_QUALITY_LABEL_INPUT_ARTIFACT_FILENAME}{ConfigParams.ENDSWITH_TXT},无法执行<呼吸可用性及间期标注>" RESP_QUALITY_LABEL_CALCULATING_PEAK: str = "正在计算峰值"
RESP_QUALITY_LABEL_FILES_FOUND: str = f"找到{ConfigParams.RESP_QUALITY_LABEL_INPUT_XINXIAO_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.RESP_QUALITY_LABEL_INPUT_THO_FILENAME}{ConfigParams.ENDSWITH_TXT}{ConfigParams.RESP_QUALITY_LABEL_INPUT_ARTIFACT_FILENAME}{ConfigParams.ENDSWITH_TXT}" RESP_QUALITY_LABEL_CALCULATE_FINISHED: str = "计算完成"
RESP_QUALITY_LABEL_HISTORICAL_SAVE1_FOUND: str = f"找到历史存档文件{ConfigParams.RESP_QUALITY_LABEL_SAVE_RESP_QUALITY_LABNEL_FILENAME}{ConfigParams.ENDSWITH_TXT},已成功读取" RESP_QUALITY_LABEL_CALCULATE_FAILURE: str = "计算失败"
RESP_QUALITY_LABEL_HISTORICAL_SAVE2_FOUND: str = f"找到历史存档文件{ConfigParams.RESP_QUALITY_LABEL_SAVE_THO_PEAK_FILENAME}{ConfigParams.ENDSWITH_TXT},已成功读取"
RESP_QUALITY_LABEL_INPUT_SIGNAL_FAILURE: str = "导入信号失败,请检查信号长度"
RESP_QUALITY_LABEL_INPUT_SUCCESSFULLY: str = "导入数据成功"
RESP_QUALITY_LABEL_PREPROCESS_SUCCESSFULLY: str = "导入数据成功"
RESP_QUALITY_LABEL_INPUT_ARTIFACT_FAILURE_FORMAT: str = "导入体动失败,请检查体动标签格式"
RESP_QUALITY_LABEL_INPUT_ARTIFACT_FAILURE_LENGTH: str = "导入体动失败请检查体动长度是否为4的倍数"
RESP_QUALITY_LABEL_RUNNING: str = "开始执行任务<呼吸可用性及间期标注>" RESP_QUALITY_LABEL_PLOT_LABEL_ORGBCG: str = "BDR_Sync by filter OrgBCG_Sync"
RESP_QUALITY_LABEL_PLOT_LABEL_ORGBCG: str = "BDR_sync by filter orgBcg_sync" RESP_QUALITY_LABEL_PLOT_LABEL_THO: str = "THO_Sync after preprocess"
RESP_QUALITY_LABEL_PLOT_LABEL_THO: str = "THO_sync after preprocess" RESP_QUALITY_LABEL_PLOT_LABEL_THO_PEAKS: str = "Tho_peak"
RESP_QUALITY_LABEL_PLOT_LABEL_THO_PEAKS: str = "THO_peak"
RESP_QUALITY_LABEL_PLOT_LABEL_ARTIFACT: str = "Artifact" RESP_QUALITY_LABEL_PLOT_LABEL_ARTIFACT: str = "Artifact"
RESP_QUALITY_LABEL_SPECTRUM_BDR_TITLE: str = "Spectrum of BDR_sync by filter OrgBCG_Sync"
RESP_QUALITY_LABEL_SPECTRUM_THO_TITLE: str = "Spectrum of THO_sync after preprocess"
RESP_QUALITY_LABEL_SPECTRUM_ORGBCG_LABEL: str = "OrgBCG"
RESP_QUALITY_LABEL_SPECTRUM_BDR_LABEL: str = "BDR"
RESP_QUALITY_LABEL_SPECTRUM_THO_LABEL: str = "Tho"
RESP_QUALITY_LABEL_VIEWING_THE_FIRST_PART: str = "你正在查看第1段信号" RESP_QUALITY_LABEL_VIEWING_THE_FIRST_PART: str = "你正在查看第1段信号"
RESP_QUALITY_LABEL_VIEWING_THE_LAST_PART: str = "你正在查看最后1段信号" RESP_QUALITY_LABEL_VIEWING_THE_LAST_PART: str = "你正在查看最后1段信号"
RESP_QUALITY_LABEL_ACTION_LABEL_MULTIPLE_NAME: str = f"批量更改标签({ConfigParams.RESP_QUALITY_LABEL_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY})" RESP_QUALITY_LABEL_PREV_PART: str = "上一个片段index "
RESP_QUALITY_LABEL_CUSTOM_NAVIGATIONTOOLBAR_WIDGET_NAME: str = "MainWindow" RESP_QUALITY_LABEL_NEXT_PART: str = "下一个片段index "
RESP_QUALITY_LABEL_BUTTON_PRESS_EVENT: str = "button_press_event" RESP_QUALITY_LABEL_JUMP: str = "跳转到片段index "
RESP_QUALITY_LABEL_BUTTON_RELEASE_EVENT: str = "button_release_event" RESP_QUALITY_LABEL_LABEL_SUCCESSFULLY: str = "片段标注成功"
RESP_QUALITY_LABEL_MOTION_NOTIFY_EVENT: str = "motion_notify_event" RESP_QUALITY_LABEL_LABEL_TYPE: str = "标注类型为:"
RESP_QUALITY_LABEL_ADD_POINTS_SUCCESSFULLY: str = "成功新增点,横坐标:" RESP_QUALITY_LABEL_ADD_POINTS_SUCCESSFULLY: str = "成功新增点,横坐标:"
RESP_QUALITY_LABEL_REMOVE_POINTS_SUCCESSFULLY: str = "成功删除点,横坐标:" RESP_QUALITY_LABEL_REMOVE_POINTS_SUCCESSFULLY: str = "成功删除点,横坐标:"
RESP_QUALITY_LABEL_NO_POINT_IN_THE_INTERVAL: str = "所选区间内无新增或删除点" RESP_QUALITY_LABEL_NO_POINT_IN_THE_INTERVAL: str = "所选区间内无新增或删除点"
RESP_QUALITY_LABEL_SAVE_PEAKS_SUCCESSFULLY: str = "保存峰值成功" RESP_QUALITY_LABEL_CUSTOM_FILTER_ARGS_ERROR: str = "OrgBCG带通滤波频率设置范围应为数字范围是0~1且上截止频率应大于下截止频率"
RESP_QUALITY_LABEL_DATA_NOT_FOUND: str = "数据未导入" RESP_QUALITY_LABEL_AUTOLABEL_ARGS_ERROR: str = "人工标注阈值设置范围应为数字范围是0~1且[1]应大于[0]"
RESP_QUALITY_LABEL_LABEL_SUCCESSFULLY: str = "片段标注并保存成功" RESP_QUALITY_LABEL_CHECK_ARGS_QUESTION_CONTENT: str = "你确定要执行此操作吗,请确保参数输入正确"
RESP_QUALITY_LABEL_RESET_SUCCESSFULLY: str = "片段重置并保存成功" RESP_QUALITY_LABEL_ACTION_LABEL_MULTIPLE_NAME: str = f"批量更改标签({Params.RESP_QUALITY_LABEL_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY})"
RESP_QUALITY_LABEL_PLOT_LABEL_VLINE: str = "vline"
RESP_QUALITY_LABEL_PLOT_LABEL_HLINE: str = "hline"
RESP_QUALITY_LABEL_A_QUALITY: int = 1 RESP_QUALITY_LABEL_A_QUALITY: int = 1
RESP_QUALITY_LABEL_B_QUALITY: int = 0 RESP_QUALITY_LABEL_B_QUALITY: int = 0
RESP_QUALITY_LABEL_C_QUALITY: int = -1 RESP_QUALITY_LABEL_C_QUALITY: int = -1
RESP_QUALITY_LABEL_LABELED: str = "已标注"
RESP_QUALITY_LABEL_TOBELABELED: str = "未标注"
RESP_QUALITY_LABEL_SPECTRUM_BDR_TITLE: str = "Spectrum of BDR_sync by filter orgBcg_sync"
RESP_QUALITY_LABEL_SPECTRUM_THO_TITLE: str = "Spectrum of THO_sync after preprocess"
RESP_QUALITY_LABEL_SPECTRUM_ORGBCG_LABEL: str = "orgBcg"
RESP_QUALITY_LABEL_SPECTRUM_BDR_LABEL: str = "BDR"
RESP_QUALITY_LABEL_SPECTRUM_THO_LABEL: str = "THO"
RESP_QUALITY_LABEL_CUSTOM_FILTER_ARGS_ERROR: str = "orgBcg带通滤波频率设置范围应为数字范围是0~1"
RESP_QUALITY_LABEL_AUTOLABEL_ARGS_ERROR: str = "人工标注阈值设置范围应为数字范围是0~1"
RESP_QUALITY_LABEL_CHECK_ARGS_QUESTION_CONTENT: str = "你确定要执行此操作吗,请确保参数输入正确"
RESP_QUALITY_LABEL_KEY_VALUE = { RESP_QUALITY_LABEL_KEY_VALUE = {
1: "Good", 1: "Good",
0: "Bad", 0: "Bad",
-1: "None" -1: "None"
} }
RESP_QUALITY_LABEL_FIGTOOLBAR_SPECTRUM_STYLESHEET: str = """
QToolBar {
border: 1px;
spacing: 2px; /* 设置工具栏按钮之间的间距 */
}
QToolButton {
height: 20px; /* 设置工具栏按钮的高度 */
width: 20px; /* 设置工具栏按钮的宽度 */
font-size: 8px; /* 设置按钮文字大小 */
}
QToolButton::menu-button {
width: 0px; /* 隐藏下拉菜单按钮 */
}
"""
# 睡眠呼吸暂停事件标注
# 睡眠呼吸暂停事件打标 SA_LABEL_JUMP: str = "跳转到事件"
SA_LABEL_CHANNEL_NAME_FLOWT: str = "Flow T" SA_LABEL_VIEWING_FIRST: str = "你正在查看第1个事件"
SA_LABEL_CHANNEL_NAME_FLOWP: str = "Flow P" SA_LABEL_VIEWING_LAST: str = "你正在查看最后1个事件"
SA_LABEL_CHANNEL_NAME_EFFORTTHO: str = "Effort Tho" SA_LABEL_PREV_EVENT: str = "上一个事件index "
SA_LABEL_CHANNEL_NAME_EFFORTABD: str = "Effort Abd" SA_LABEL_NEXT_EVENT: str = "下一个事件index "
SA_LABEL_CHANNEL_NAME_SPO2: str = "SpO2" SA_LABEL_ALL_LABELED: str = "该份数据打标已全部完成"
SA_LABEL_MOVE_PREV10S: str = "向前10秒"
SA_LABEL_MOVE_PREV30S: str = "向前30秒"
SA_LABEL_MOVE_PREV_HALF: str = "向前半窗口"
SA_LABEL_MOVE_NEXT10S: str = "向后10秒"
SA_LABEL_MOVE_NEXT30S: str = "向后30秒"
SA_LABEL_MOVE_NEXT_HALF: str = "向后半窗口"
SA_LABEL_LENGTH_TOO_LONG: str = "起始时间或终止时间超出信号长度范围,请输入正确的参数"
SA_LABEL_LENGTH_LESS_THEN_10S: str = "当前标注的事件的持续时间小于10秒"
SA_LABEL_WRONG_ARGS: str = "起始时间和终止时间输入错误"
# 禁止实例化 # 禁止实例化
def __new__(cls): def __new__(cls):

View File

@ -1,11 +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 PySide6.QtWidgets import QMessageBox, QWidget, QPushButton, QProgressBar, QApplication, QRadioButton import json
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
import numpy as np
class PublicFunc: class PublicFunc:
@ -110,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):
# 启用按钮 # 启用按钮
@ -125,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):
# 启用按钮 # 启用按钮
@ -140,6 +151,23 @@ 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
def __styleAllButton__(mainWindow, buttonState):
# 启用按钮
all_widgets = mainWindow.centralWidget().findChildren(QWidget)
# 迭代所有部件,查找按钮并启用它们
for widget in all_widgets:
if isinstance(widget, QPushButton):
if widget.objectName() in buttonState["Default"].keys():
widget.setStyleSheet(Constants.LABELBTN_STYLE_NORMAL)
if isinstance(widget, QCheckBox):
widget.setStyleSheet(Constants.CHECKBOX_STYLE_NORMAL)
@staticmethod @staticmethod
def add_progressbar(mainWindow): def add_progressbar(mainWindow):
mainWindow.progressbar = QProgressBar() mainWindow.progressbar = QProgressBar()
@ -172,4 +200,141 @@ class PublicFunc:
raise ValueError("进度条值的范围应该在[0, 100]") raise ValueError("进度条值的范围应该在[0, 100]")
PublicFunc.statusbar_show_msg(mainWindow, PublicFunc.format_status_msg(f"({str(current)}/{str(total)}){msg}")) PublicFunc.statusbar_show_msg(mainWindow, PublicFunc.format_status_msg(f"({str(current)}/{str(total)}){msg}"))
mainWindow.progressbar.setValue(progressbarState) mainWindow.progressbar.setValue(progressbarState)
QApplication.processEvents() QApplication.processEvents()
@staticmethod
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]
if len(temp_path) == 0:
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
filename + "" +
path_str +
Constants.FAILURE_REASON["File_Not_Exist"])
elif len(temp_path) > 1:
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
filename + "" +
path_str +
Constants.FAILURE_REASON["File_More_Than_One"])
else:
path = temp_path[0]
freq = path.stem.split("_")[-1]
# 验证是否为整数或是否存在
if not freq.isdigit():
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
filename + "" +
Constants.FAILURE_REASON["Data_Frequency_Not_In_Filename"])
if path.suffix != suffix:
return Result().failure(
info=Constants.INPUT_FAILURE + "\n" +
filename + "" +
Constants.FAILURE_REASON["Suffix_Not_Correct"])
data = {
"path": path,
"freq": int(freq)
}
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
def examine_artifact(artifact):
# 检查体动标签正确性,长度
if len(artifact) % 4 != 0:
return Result().failure(info=Constants.INPUT_FAILURE +
Constants.FAILURE_REASON["Artifact_Format_Not_Correct"])
for i in range(0, len(artifact), 4):
unit_data = artifact[i:i + 4]
if len(unit_data) < 4:
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)

2
image/correct.svg Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" ?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 200 200" data-name="Layer 1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"><title/><path d="M100,15a85,85,0,1,0,85,85A84.93,84.93,0,0,0,100,15Zm0,150a65,65,0,1,1,65-65A64.87,64.87,0,0,1,100,165Zm25-91.5-29,35L76,94c-4.5-3.5-10.5-2.5-14,2s-2.5,10.5,2,14c6,4.5,12.5,9,18.5,13.5,4.5,3,8.5,7.5,14,8,1.5,0,3.5,0,5-1l3-3,22.5-27c4-5,8-9.5,12-14.5,3-4,4-9,.5-13L138,71.5c-3.5-2.5-9.5-2-13,2Z"/></svg>

After

Width:  |  Height:  |  Size: 560 B

9
run.py
View File

@ -1,3 +1,4 @@
from importlib.util import find_spec
from logging import getLogger, NOTSET, FileHandler, Formatter, StreamHandler, info from logging import getLogger, NOTSET, FileHandler, Formatter, StreamHandler, info
from os import environ from os import environ
from pathlib import Path from pathlib import Path
@ -6,7 +7,6 @@ from time import strftime, localtime, time
from PySide6.QtCore import Qt from PySide6.QtCore import Qt
from PySide6.QtWidgets import QApplication from PySide6.QtWidgets import QApplication
from func.Module_mainwindow import MainWindow from func.Module_mainwindow import MainWindow
import importlib.util
if __name__ == '__main__': if __name__ == '__main__':
# 设置日志 # 设置日志
@ -28,7 +28,7 @@ if __name__ == '__main__':
info("程序启动") info("程序启动")
# 解决 Could not find the Qt platform plugin "windows" # 解决 Could not find the Qt platform plugin "windows"
spec = importlib.util.find_spec("PySide6") spec = find_spec("PySide6")
if spec and spec.origin: if spec and spec.origin:
dirname = Path(spec.origin).parent dirname = Path(spec.origin).parent
plugin_path = dirname / 'plugins' / 'platforms' plugin_path = dirname / 'plugins' / 'platforms'
@ -37,10 +37,9 @@ if __name__ == '__main__':
# 解决 Error #15: Initializing libiomp5md.dll # 解决 Error #15: Initializing libiomp5md.dll
environ["KMP_DUPLICATE_LIB_OK"] = "TRUE" environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
QApplication.setHighDpiScaleFactorRoundingPolicy(Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)
app = QApplication(argv) app = QApplication(argv)
app.setHighDpiScaleFactorRoundingPolicy(Qt.HighDpiScaleFactorRoundingPolicy.PassThrough) app.setStyle("Fusion")
app.styleHints().setColorScheme(Qt.ColorScheme.Light) # 强制使用浅色模式
mainWindow = MainWindow() mainWindow = MainWindow()
mainWindow.show() mainWindow.show()
exit(app.exec()) exit(app.exec())

View File

@ -81,84 +81,6 @@ class Ui_MainWindow_SA_label(object):
self.verticalLayout_2.addItem(self.verticalSpacer) self.verticalLayout_2.addItem(self.verticalSpacer)
self.groupBox_plotArgs = QGroupBox(self.groupBox_left)
self.groupBox_plotArgs.setObjectName(u"groupBox_plotArgs")
self.gridLayout_2 = QGridLayout(self.groupBox_plotArgs)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.label_3 = QLabel(self.groupBox_plotArgs)
self.label_3.setObjectName(u"label_3")
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy1)
self.label_3.setFont(font1)
self.gridLayout_2.addWidget(self.label_3, 1, 0, 1, 1)
self.label_5 = QLabel(self.groupBox_plotArgs)
self.label_5.setObjectName(u"label_5")
sizePolicy1.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
self.label_5.setSizePolicy(sizePolicy1)
self.label_5.setFont(font1)
self.gridLayout_2.addWidget(self.label_5, 2, 0, 1, 1)
self.label_4 = QLabel(self.groupBox_plotArgs)
self.label_4.setObjectName(u"label_4")
sizePolicy1.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
self.label_4.setSizePolicy(sizePolicy1)
self.label_4.setFont(font1)
self.gridLayout_2.addWidget(self.label_4, 0, 0, 1, 1)
self.label_10 = QLabel(self.groupBox_plotArgs)
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.gridLayout_2.addWidget(self.label_10, 3, 0, 1, 1)
self.spinBox_plot_freq = QSpinBox(self.groupBox_plotArgs)
self.spinBox_plot_freq.setObjectName(u"spinBox_plot_freq")
self.spinBox_plot_freq.setFont(font1)
self.spinBox_plot_freq.setMinimum(1)
self.spinBox_plot_freq.setMaximum(10000)
self.gridLayout_2.addWidget(self.spinBox_plot_freq, 0, 1, 1, 1)
self.spinBox_orgBcg_freq = QSpinBox(self.groupBox_plotArgs)
self.spinBox_orgBcg_freq.setObjectName(u"spinBox_orgBcg_freq")
self.spinBox_orgBcg_freq.setFont(font1)
self.spinBox_orgBcg_freq.setMinimum(1)
self.spinBox_orgBcg_freq.setMaximum(10000)
self.gridLayout_2.addWidget(self.spinBox_orgBcg_freq, 1, 1, 1, 1)
self.spinBox_front_add_second = QSpinBox(self.groupBox_plotArgs)
self.spinBox_front_add_second.setObjectName(u"spinBox_front_add_second")
self.spinBox_front_add_second.setFont(font1)
self.spinBox_front_add_second.setMinimum(1)
self.spinBox_front_add_second.setMaximum(10000)
self.gridLayout_2.addWidget(self.spinBox_front_add_second, 2, 1, 1, 1)
self.spinBox_back_add_second = QSpinBox(self.groupBox_plotArgs)
self.spinBox_back_add_second.setObjectName(u"spinBox_back_add_second")
self.spinBox_back_add_second.setFont(font1)
self.spinBox_back_add_second.setMinimum(1)
self.spinBox_back_add_second.setMaximum(10000)
self.gridLayout_2.addWidget(self.spinBox_back_add_second, 3, 1, 1, 1)
self.verticalLayout_2.addWidget(self.groupBox_plotArgs)
self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer_2)
self.groupBox_label = QGroupBox(self.groupBox_left) self.groupBox_label = QGroupBox(self.groupBox_left)
self.groupBox_label.setObjectName(u"groupBox_label") self.groupBox_label.setObjectName(u"groupBox_label")
self.gridLayout_3 = QGridLayout(self.groupBox_label) self.gridLayout_3 = QGridLayout(self.groupBox_label)
@ -209,11 +131,11 @@ class Ui_MainWindow_SA_label(object):
self.gridLayout_3.addItem(self.verticalSpacer_4, 2, 0, 1, 2) self.gridLayout_3.addItem(self.verticalSpacer_4, 2, 0, 1, 2)
self.gridLayout_3.setRowMinimumHeight(0, 1) self.gridLayout_3.setRowStretch(0, 2)
self.gridLayout_3.setRowMinimumHeight(1, 5) self.gridLayout_3.setRowStretch(1, 10)
self.gridLayout_3.setRowMinimumHeight(2, 1) self.gridLayout_3.setRowStretch(2, 1)
self.gridLayout_3.setRowMinimumHeight(3, 1) self.gridLayout_3.setRowStretch(4, 2)
self.gridLayout_3.setRowMinimumHeight(4, 5) self.gridLayout_3.setRowStretch(5, 10)
self.verticalLayout_2.addWidget(self.groupBox_label) self.verticalLayout_2.addWidget(self.groupBox_label)
@ -221,6 +143,17 @@ class Ui_MainWindow_SA_label(object):
self.verticalLayout_2.addItem(self.verticalSpacer_3) self.verticalLayout_2.addItem(self.verticalSpacer_3)
self.pushButton_save = QPushButton(self.groupBox_left)
self.pushButton_save.setObjectName(u"pushButton_save")
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth())
self.pushButton_save.setSizePolicy(sizePolicy1)
self.pushButton_save.setFont(font1)
self.verticalLayout_2.addWidget(self.pushButton_save)
self.groupBox_4 = QGroupBox(self.groupBox_left) self.groupBox_4 = QGroupBox(self.groupBox_left)
self.groupBox_4.setObjectName(u"groupBox_4") self.groupBox_4.setObjectName(u"groupBox_4")
self.verticalLayout_6 = QVBoxLayout(self.groupBox_4) self.verticalLayout_6 = QVBoxLayout(self.groupBox_4)
@ -235,11 +168,10 @@ class Ui_MainWindow_SA_label(object):
self.verticalLayout_2.setStretch(0, 2) self.verticalLayout_2.setStretch(0, 2)
self.verticalLayout_2.setStretch(1, 1) self.verticalLayout_2.setStretch(1, 1)
self.verticalLayout_2.setStretch(2, 4) self.verticalLayout_2.setStretch(2, 15)
self.verticalLayout_2.setStretch(3, 1) self.verticalLayout_2.setStretch(3, 1)
self.verticalLayout_2.setStretch(4, 15) self.verticalLayout_2.setStretch(4, 2)
self.verticalLayout_2.setStretch(5, 1) self.verticalLayout_2.setStretch(5, 5)
self.verticalLayout_2.setStretch(6, 5)
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1) self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
@ -448,67 +380,64 @@ class Ui_MainWindow_SA_label(object):
self.gridLayout_5.setObjectName(u"gridLayout_5") self.gridLayout_5.setObjectName(u"gridLayout_5")
self.pushButton_quick_remark_input_durationNoEnough = QPushButton(self.groupBox_label_operation) self.pushButton_quick_remark_input_durationNoEnough = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_durationNoEnough.setObjectName(u"pushButton_quick_remark_input_durationNoEnough") self.pushButton_quick_remark_input_durationNoEnough.setObjectName(u"pushButton_quick_remark_input_durationNoEnough")
sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred) sizePolicy1.setHeightForWidth(self.pushButton_quick_remark_input_durationNoEnough.sizePolicy().hasHeightForWidth())
sizePolicy2.setHorizontalStretch(0) self.pushButton_quick_remark_input_durationNoEnough.setSizePolicy(sizePolicy1)
sizePolicy2.setVerticalStretch(0)
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(font1) self.pushButton_quick_remark_input_durationNoEnough.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_durationNoEnough, 1, 1, 1, 1) 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 = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_maybeWrongLabeled.setObjectName(u"pushButton_quick_remark_input_maybeWrongLabeled") self.pushButton_quick_remark_input_maybeWrongLabeled.setObjectName(u"pushButton_quick_remark_input_maybeWrongLabeled")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_maybeWrongLabeled.sizePolicy().hasHeightForWidth()) sizePolicy1.setHeightForWidth(self.pushButton_quick_remark_input_maybeWrongLabeled.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_maybeWrongLabeled.setSizePolicy(sizePolicy2) self.pushButton_quick_remark_input_maybeWrongLabeled.setSizePolicy(sizePolicy1)
self.pushButton_quick_remark_input_maybeWrongLabeled.setFont(font1) self.pushButton_quick_remark_input_maybeWrongLabeled.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_maybeWrongLabeled, 1, 0, 1, 1) 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 = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setObjectName(u"pushButton_quick_remark_input_noNormalRespBetweenArtifact") self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setObjectName(u"pushButton_quick_remark_input_noNormalRespBetweenArtifact")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.sizePolicy().hasHeightForWidth()) sizePolicy1.setHeightForWidth(self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setSizePolicy(sizePolicy2) self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setSizePolicy(sizePolicy1)
self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setFont(font1) self.pushButton_quick_remark_input_noNormalRespBetweenArtifact.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_noNormalRespBetweenArtifact, 2, 1, 1, 1) 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 = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_maybeDesaturation.setObjectName(u"pushButton_quick_remark_input_maybeDesaturation") self.pushButton_quick_remark_input_maybeDesaturation.setObjectName(u"pushButton_quick_remark_input_maybeDesaturation")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_maybeDesaturation.sizePolicy().hasHeightForWidth()) sizePolicy1.setHeightForWidth(self.pushButton_quick_remark_input_maybeDesaturation.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_maybeDesaturation.setSizePolicy(sizePolicy2) self.pushButton_quick_remark_input_maybeDesaturation.setSizePolicy(sizePolicy1)
self.pushButton_quick_remark_input_maybeDesaturation.setFont(font1) self.pushButton_quick_remark_input_maybeDesaturation.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_maybeDesaturation, 0, 1, 1, 1) 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 = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_littleChange.setObjectName(u"pushButton_quick_remark_input_littleChange") self.pushButton_quick_remark_input_littleChange.setObjectName(u"pushButton_quick_remark_input_littleChange")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_littleChange.sizePolicy().hasHeightForWidth()) sizePolicy1.setHeightForWidth(self.pushButton_quick_remark_input_littleChange.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_littleChange.setSizePolicy(sizePolicy2) self.pushButton_quick_remark_input_littleChange.setSizePolicy(sizePolicy1)
self.pushButton_quick_remark_input_littleChange.setFont(font1) self.pushButton_quick_remark_input_littleChange.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_littleChange, 2, 0, 1, 1) 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 = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_waitingForTalk.setObjectName(u"pushButton_quick_remark_input_waitingForTalk") self.pushButton_quick_remark_input_waitingForTalk.setObjectName(u"pushButton_quick_remark_input_waitingForTalk")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_waitingForTalk.sizePolicy().hasHeightForWidth()) sizePolicy1.setHeightForWidth(self.pushButton_quick_remark_input_waitingForTalk.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_waitingForTalk.setSizePolicy(sizePolicy2) self.pushButton_quick_remark_input_waitingForTalk.setSizePolicy(sizePolicy1)
self.pushButton_quick_remark_input_waitingForTalk.setFont(font1) self.pushButton_quick_remark_input_waitingForTalk.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_waitingForTalk, 0, 0, 1, 1) 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 = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_lowSignalNoiseRatio.setObjectName(u"pushButton_quick_remark_input_lowSignalNoiseRatio") self.pushButton_quick_remark_input_lowSignalNoiseRatio.setObjectName(u"pushButton_quick_remark_input_lowSignalNoiseRatio")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_lowSignalNoiseRatio.sizePolicy().hasHeightForWidth()) sizePolicy1.setHeightForWidth(self.pushButton_quick_remark_input_lowSignalNoiseRatio.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_lowSignalNoiseRatio.setSizePolicy(sizePolicy2) self.pushButton_quick_remark_input_lowSignalNoiseRatio.setSizePolicy(sizePolicy1)
self.pushButton_quick_remark_input_lowSignalNoiseRatio.setFont(font1) self.pushButton_quick_remark_input_lowSignalNoiseRatio.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_lowSignalNoiseRatio, 3, 0, 1, 1) 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 = QPushButton(self.groupBox_label_operation)
self.pushButton_quick_remark_input_changeOnMiddle.setObjectName(u"pushButton_quick_remark_input_changeOnMiddle") self.pushButton_quick_remark_input_changeOnMiddle.setObjectName(u"pushButton_quick_remark_input_changeOnMiddle")
sizePolicy2.setHeightForWidth(self.pushButton_quick_remark_input_changeOnMiddle.sizePolicy().hasHeightForWidth()) sizePolicy1.setHeightForWidth(self.pushButton_quick_remark_input_changeOnMiddle.sizePolicy().hasHeightForWidth())
self.pushButton_quick_remark_input_changeOnMiddle.setSizePolicy(sizePolicy2) self.pushButton_quick_remark_input_changeOnMiddle.setSizePolicy(sizePolicy1)
self.pushButton_quick_remark_input_changeOnMiddle.setFont(font1) self.pushButton_quick_remark_input_changeOnMiddle.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_changeOnMiddle, 3, 1, 1, 1) self.gridLayout_5.addWidget(self.pushButton_quick_remark_input_changeOnMiddle, 3, 1, 1, 1)
@ -561,24 +490,24 @@ class Ui_MainWindow_SA_label(object):
self.gridLayout_7.setObjectName(u"gridLayout_7") self.gridLayout_7.setObjectName(u"gridLayout_7")
self.pushButton_prev = QPushButton(self.groupBox_label_operation) self.pushButton_prev = QPushButton(self.groupBox_label_operation)
self.pushButton_prev.setObjectName(u"pushButton_prev") self.pushButton_prev.setObjectName(u"pushButton_prev")
sizePolicy2.setHeightForWidth(self.pushButton_prev.sizePolicy().hasHeightForWidth()) sizePolicy1.setHeightForWidth(self.pushButton_prev.sizePolicy().hasHeightForWidth())
self.pushButton_prev.setSizePolicy(sizePolicy2) self.pushButton_prev.setSizePolicy(sizePolicy1)
self.pushButton_prev.setFont(font1) self.pushButton_prev.setFont(font1)
self.gridLayout_7.addWidget(self.pushButton_prev, 0, 0, 1, 1) self.gridLayout_7.addWidget(self.pushButton_prev, 0, 0, 1, 1)
self.pushButton_next = QPushButton(self.groupBox_label_operation) self.pushButton_next = QPushButton(self.groupBox_label_operation)
self.pushButton_next.setObjectName(u"pushButton_next") self.pushButton_next.setObjectName(u"pushButton_next")
sizePolicy2.setHeightForWidth(self.pushButton_next.sizePolicy().hasHeightForWidth()) sizePolicy1.setHeightForWidth(self.pushButton_next.sizePolicy().hasHeightForWidth())
self.pushButton_next.setSizePolicy(sizePolicy2) self.pushButton_next.setSizePolicy(sizePolicy1)
self.pushButton_next.setFont(font1) self.pushButton_next.setFont(font1)
self.gridLayout_7.addWidget(self.pushButton_next, 1, 0, 1, 1) self.gridLayout_7.addWidget(self.pushButton_next, 1, 0, 1, 1)
self.pushButton_confirmLabel = QPushButton(self.groupBox_label_operation) self.pushButton_confirmLabel = QPushButton(self.groupBox_label_operation)
self.pushButton_confirmLabel.setObjectName(u"pushButton_confirmLabel") self.pushButton_confirmLabel.setObjectName(u"pushButton_confirmLabel")
sizePolicy2.setHeightForWidth(self.pushButton_confirmLabel.sizePolicy().hasHeightForWidth()) sizePolicy1.setHeightForWidth(self.pushButton_confirmLabel.sizePolicy().hasHeightForWidth())
self.pushButton_confirmLabel.setSizePolicy(sizePolicy2) self.pushButton_confirmLabel.setSizePolicy(sizePolicy1)
self.pushButton_confirmLabel.setFont(font1) self.pushButton_confirmLabel.setFont(font1)
self.gridLayout_7.addWidget(self.pushButton_confirmLabel, 0, 1, 2, 1) self.gridLayout_7.addWidget(self.pushButton_confirmLabel, 0, 1, 2, 1)
@ -632,16 +561,12 @@ class Ui_MainWindow_SA_label(object):
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u7761\u7720\u547c\u5438\u6682\u505c\u4e8b\u4ef6\u6807\u6ce8", None)) self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u7761\u7720\u547c\u5438\u6682\u505c\u4e8b\u4ef6\u6807\u6ce8", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u5bfc\u5165\u8bbe\u7f6e", 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.pushButton_input.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u5f00\u59cb\u5bfc\u5165", None))
self.groupBox_plotArgs.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u53c2\u6570\u8bbe\u7f6e", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_SA_label", u"orgBcg\u4fe1\u53f7\u91c7\u6837\u7387(Hz)", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4fe1\u53f7\u5411\u524d\u6269\u5c55(s)", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u7ed8\u56fe\u91c7\u6837\u7387(Hz)", None))
self.label_10.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u4fe1\u53f7\u5411\u540e\u6269\u5c55(s)", None))
self.groupBox_label.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u6807\u7b7e\u8bb0\u5f55", None)) self.groupBox_label.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u6807\u7b7e\u8bb0\u5f55", None))
self.label.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u539f\u6570\u636e\u7684\u6807\u7b7e", None)) self.label.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u539f\u6570\u636e\u7684\u6807\u7b7e", None))
self.lineEdit_filter_label_add.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label", u"\u7b5b\u9009\u5668", None)) self.lineEdit_filter_label_add.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label", u"\u7b5b\u9009\u5668", None))
self.lineEdit_filter_label.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label", u"\u7b5b\u9009\u5668", None)) self.lineEdit_filter_label.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label", u"\u7b5b\u9009\u5668", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u65b0\u589e\u7684\u6807\u7b7e", None)) self.label_2.setText(QCoreApplication.translate("MainWindow_SA_label", u"\u65b0\u589e\u7684\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_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_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"\u9010\u5e27\u68c0\u67e5", None)) self.groupBox_examineBySecond.setTitle(QCoreApplication.translate("MainWindow_SA_label", u"\u9010\u5e27\u68c0\u67e5", None))

View File

@ -42,7 +42,7 @@
<property name="title"> <property name="title">
<string>睡眠呼吸暂停事件标注</string> <string>睡眠呼吸暂停事件标注</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="2,1,4,1,15,1,5"> <layout class="QVBoxLayout" name="verticalLayout_2" stretch="2,1,15,1,2,5">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
@ -96,166 +96,12 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QGroupBox" name="groupBox_plotArgs">
<property name="title">
<string>参数设置</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>orgBcg信号采样率(Hz)</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_5">
<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>信号向前扩展(s)</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>绘图采样率(Hz)</string>
</property>
</widget>
</item>
<item row="3" 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>信号向后扩展(s)</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBox_plot_freq">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="spinBox_orgBcg_freq">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="spinBox_front_add_second">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="spinBox_back_add_second">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QGroupBox" name="groupBox_label"> <widget class="QGroupBox" name="groupBox_label">
<property name="title"> <property name="title">
<string>标签记录</string> <string>标签记录</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3" rowminimumheight="1,5,1,1,5,0"> <layout class="QGridLayout" name="gridLayout_3" rowstretch="2,10,1,0,2,10" rowminimumheight="0,0,0,0,0,0">
<item row="1" column="0" colspan="2"> <item row="1" column="0" colspan="2">
<widget class="QTableWidget" name="tableWidget_label"> <widget class="QTableWidget" name="tableWidget_label">
<property name="columnCount"> <property name="columnCount">
@ -362,6 +208,24 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QPushButton" name="pushButton_save">
<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>手动保存</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QGroupBox" name="groupBox_4"> <widget class="QGroupBox" name="groupBox_4">
<property name="title"> <property name="title">

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.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!
################################################################################ ################################################################################
@ -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)
@ -317,11 +337,12 @@ class Ui_MainWindow_approximately_align(object):
self.groupBox_align_position.setObjectName(u"groupBox_align_position") self.groupBox_align_position.setObjectName(u"groupBox_align_position")
self.gridLayout_2 = QGridLayout(self.groupBox_align_position) self.gridLayout_2 = QGridLayout(self.groupBox_align_position)
self.gridLayout_2.setObjectName(u"gridLayout_2") self.gridLayout_2.setObjectName(u"gridLayout_2")
self.radioButton_PABD = QRadioButton(self.groupBox_align_position) self.pushButton_ChangeView = QPushButton(self.groupBox_align_position)
self.radioButton_PABD.setObjectName(u"radioButton_PABD") self.pushButton_ChangeView.setObjectName(u"pushButton_ChangeView")
self.radioButton_PABD.setFont(font1) self.pushButton_ChangeView.setMinimumSize(QSize(0, 30))
self.pushButton_ChangeView.setFont(font1)
self.gridLayout_2.addWidget(self.radioButton_PABD, 1, 2, 1, 1) self.gridLayout_2.addWidget(self.pushButton_ChangeView, 0, 2, 1, 1)
self.radioButton_NTHO = QRadioButton(self.groupBox_align_position) self.radioButton_NTHO = QRadioButton(self.groupBox_align_position)
self.radioButton_NTHO.setObjectName(u"radioButton_NTHO") self.radioButton_NTHO.setObjectName(u"radioButton_NTHO")
@ -329,12 +350,37 @@ class Ui_MainWindow_approximately_align(object):
self.gridLayout_2.addWidget(self.radioButton_NTHO, 1, 1, 1, 1) self.gridLayout_2.addWidget(self.radioButton_NTHO, 1, 1, 1, 1)
self.radioButton_PTHO = QRadioButton(self.groupBox_align_position)
self.radioButton_PTHO.setObjectName(u"radioButton_PTHO")
self.radioButton_PTHO.setFont(font1)
self.gridLayout_2.addWidget(self.radioButton_PTHO, 1, 0, 1, 1)
self.radioButton_custom = QRadioButton(self.groupBox_align_position) self.radioButton_custom = QRadioButton(self.groupBox_align_position)
self.radioButton_custom.setObjectName(u"radioButton_custom") self.radioButton_custom.setObjectName(u"radioButton_custom")
self.radioButton_custom.setFont(font1) self.radioButton_custom.setFont(font1)
self.gridLayout_2.addWidget(self.radioButton_custom, 2, 1, 1, 1) self.gridLayout_2.addWidget(self.radioButton_custom, 2, 1, 1, 1)
self.radioButton_PABD = QRadioButton(self.groupBox_align_position)
self.radioButton_PABD.setObjectName(u"radioButton_PABD")
self.radioButton_PABD.setFont(font1)
self.gridLayout_2.addWidget(self.radioButton_PABD, 1, 2, 1, 1)
self.pushButton_GetPos = QPushButton(self.groupBox_align_position)
self.pushButton_GetPos.setObjectName(u"pushButton_GetPos")
self.pushButton_GetPos.setMinimumSize(QSize(0, 30))
self.pushButton_GetPos.setFont(font1)
self.gridLayout_2.addWidget(self.pushButton_GetPos, 0, 0, 1, 1)
self.radioButton_NABD = QRadioButton(self.groupBox_align_position)
self.radioButton_NABD.setObjectName(u"radioButton_NABD")
self.radioButton_NABD.setFont(font1)
self.gridLayout_2.addWidget(self.radioButton_NABD, 2, 0, 1, 1)
self.spinBox_custom = QSpinBox(self.groupBox_align_position) self.spinBox_custom = QSpinBox(self.groupBox_align_position)
self.spinBox_custom.setObjectName(u"spinBox_custom") self.spinBox_custom.setObjectName(u"spinBox_custom")
self.spinBox_custom.setMinimumSize(QSize(90, 0)) self.spinBox_custom.setMinimumSize(QSize(90, 0))
@ -346,35 +392,38 @@ class Ui_MainWindow_approximately_align(object):
self.gridLayout_2.addWidget(self.spinBox_custom, 2, 2, 1, 1) self.gridLayout_2.addWidget(self.spinBox_custom, 2, 2, 1, 1)
self.radioButton_PTHO = QRadioButton(self.groupBox_align_position)
self.radioButton_PTHO.setObjectName(u"radioButton_PTHO")
self.radioButton_PTHO.setFont(font1)
self.gridLayout_2.addWidget(self.radioButton_PTHO, 1, 0, 1, 1)
self.radioButton_NABD = QRadioButton(self.groupBox_align_position)
self.radioButton_NABD.setObjectName(u"radioButton_NABD")
self.radioButton_NABD.setFont(font1)
self.gridLayout_2.addWidget(self.radioButton_NABD, 2, 0, 1, 1)
self.pushButton_GetPos = QPushButton(self.groupBox_align_position)
self.pushButton_GetPos.setObjectName(u"pushButton_GetPos")
self.pushButton_GetPos.setMinimumSize(QSize(0, 30))
self.pushButton_GetPos.setFont(font1)
self.gridLayout_2.addWidget(self.pushButton_GetPos, 0, 0, 1, 1)
self.pushButton_ChangeView = QPushButton(self.groupBox_align_position)
self.pushButton_ChangeView.setObjectName(u"pushButton_ChangeView")
self.pushButton_ChangeView.setMinimumSize(QSize(0, 30))
self.pushButton_ChangeView.setFont(font1)
self.gridLayout_2.addWidget(self.pushButton_ChangeView, 0, 2, 1, 1)
self.verticalLayout.addWidget(self.groupBox_align_position) self.verticalLayout.addWidget(self.groupBox_align_position)
self.groupBox_2 = QGroupBox(self.groupBox_left)
self.groupBox_2.setObjectName(u"groupBox_2")
self.groupBox_2.setMinimumSize(QSize(0, 0))
self.layoutWidget = QWidget(self.groupBox_2)
self.layoutWidget.setObjectName(u"layoutWidget")
self.layoutWidget.setGeometry(QRect(11, 18, 401, 41))
self.verticalLayout_3 = QVBoxLayout(self.layoutWidget)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_3 = QHBoxLayout()
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.radioButton_freqTHO = QRadioButton(self.layoutWidget)
self.radioButton_freqTHO.setObjectName(u"radioButton_freqTHO")
self.radioButton_freqTHO.setFont(font1)
self.horizontalLayout_3.addWidget(self.radioButton_freqTHO)
self.radioButton_freqABD = QRadioButton(self.layoutWidget)
self.radioButton_freqABD.setObjectName(u"radioButton_freqABD")
self.radioButton_freqABD.setFont(font1)
self.horizontalLayout_3.addWidget(self.radioButton_freqABD)
self.verticalLayout_3.addLayout(self.horizontalLayout_3)
self.verticalLayout.addWidget(self.groupBox_2)
self.groupBox_view_partially = QGroupBox(self.groupBox_left) self.groupBox_view_partially = QGroupBox(self.groupBox_left)
self.groupBox_view_partially.setObjectName(u"groupBox_view_partially") self.groupBox_view_partially.setObjectName(u"groupBox_view_partially")
self.verticalLayout_2 = QVBoxLayout(self.groupBox_view_partially) self.verticalLayout_2 = QVBoxLayout(self.groupBox_view_partially)
@ -456,10 +505,6 @@ class Ui_MainWindow_approximately_align(object):
self.verticalLayout.addWidget(self.groupBox_view_partially) self.verticalLayout.addWidget(self.groupBox_view_partially)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout.addItem(self.verticalSpacer)
self.pushButton_save = QPushButton(self.groupBox_left) self.pushButton_save = QPushButton(self.groupBox_left)
self.pushButton_save.setObjectName(u"pushButton_save") self.pushButton_save.setObjectName(u"pushButton_save")
sizePolicy.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth())
@ -483,11 +528,12 @@ class Ui_MainWindow_approximately_align(object):
self.verticalLayout.setStretch(0, 1) self.verticalLayout.setStretch(0, 1)
self.verticalLayout.setStretch(1, 1) self.verticalLayout.setStretch(1, 1)
self.verticalLayout.setStretch(2, 3) self.verticalLayout.setStretch(2, 3)
self.verticalLayout.setStretch(4, 2) self.verticalLayout.setStretch(3, 4)
self.verticalLayout.setStretch(5, 4) self.verticalLayout.setStretch(4, 3)
self.verticalLayout.setStretch(6, 1) self.verticalLayout.setStretch(5, 2)
self.verticalLayout.setStretch(6, 4)
self.verticalLayout.setStretch(7, 1) self.verticalLayout.setStretch(7, 1)
self.verticalLayout.setStretch(8, 4) self.verticalLayout.setStretch(8, 6)
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1) self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
@ -521,33 +567,48 @@ 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_3.setText(QCoreApplication.translate("MainWindow_approximately_align", u"orgBcg\u65f6\u957f(\u79d2)\uff1a", 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_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.label_4.setText(QCoreApplication.translate("MainWindow_approximately_align", u"orgBcg_Pre \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.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.label_7.setText(QCoreApplication.translate("MainWindow_approximately_align", u"orgBcg_Post\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.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.radioButton_PABD.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5907\u90093", None)) self.pushButton_ChangeView.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u4f30\u8ba1\u91c7\u6837\u7387", None))
self.radioButton_NTHO.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5907\u90092", None)) self.radioButton_NTHO.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5907\u90092", None))
self.radioButton_custom.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u81ea\u5b9a\u4e49", None))
self.radioButton_PTHO.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5907\u90091", None)) self.radioButton_PTHO.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5907\u90091", None))
self.radioButton_NABD.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5907\u90094", None)) self.radioButton_custom.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u81ea\u5b9a\u4e49", None))
self.radioButton_PABD.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5907\u90093", None))
self.pushButton_GetPos.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u8ba1\u7b97\u5bf9\u9f50", None)) self.pushButton_GetPos.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u8ba1\u7b97\u5bf9\u9f50", None))
self.pushButton_ChangeView.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5207\u6362\u89c6\u56fe", None)) self.radioButton_NABD.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5907\u90094", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u91c7\u6837\u7387\u4f30\u8ba1", None))
self.radioButton_freqTHO.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5907\u90091", None))
self.radioButton_freqABD.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u5907\u90092", None))
self.groupBox_view_partially.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u5c40\u90e8\u89c2\u6d4b", None)) self.groupBox_view_partially.setTitle(QCoreApplication.translate("MainWindow_approximately_align", u"\u5c40\u90e8\u89c2\u6d4b", None))
self.label_9.setText(QCoreApplication.translate("MainWindow_approximately_align", u"Epoch\uff1a", None)) self.label_9.setText(QCoreApplication.translate("MainWindow_approximately_align", u"Epoch\uff1a", None))
self.pushButton_JUMP.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u8df3\u8f6c", None)) self.pushButton_JUMP.setText(QCoreApplication.translate("MainWindow_approximately_align", u"\u8df3\u8f6c", 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">
@ -25,7 +25,7 @@
<property name="title"> <property name="title">
<string>数据粗同步</string> <string>数据粗同步</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,1,3,0,2,4,1,1,4"> <layout class="QVBoxLayout" name="verticalLayout" stretch="1,1,3,4,3,2,4,1,6">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
@ -68,15 +68,42 @@
</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">
<string>orgBcg时长(秒)</string> <string>OrgBCG时长(秒)</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -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>
@ -274,7 +311,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>orgBcg_补零</string> <string>OrgBCG_补零</string>
</property> </property>
</widget> </widget>
</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>
@ -350,7 +393,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>orgBcg_Pre </string> <string>OrgBCG_Pre </string>
</property> </property>
</widget> </widget>
</item> </item>
@ -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>
@ -414,7 +463,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>orgBcg_Post</string> <string>OrgBCG_Post</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -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>
@ -531,15 +586,21 @@
<string>对齐起始位置</string> <string>对齐起始位置</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="2"> <item row="0" column="2">
<widget class="QRadioButton" name="radioButton_PABD"> <widget class="QPushButton" name="pushButton_ChangeView">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</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>备选3</string> <string>估计采样率</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -555,6 +616,18 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButton_PTHO">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>备选1</string>
</property>
</widget>
</item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QRadioButton" name="radioButton_custom"> <widget class="QRadioButton" name="radioButton_custom">
<property name="font"> <property name="font">
@ -567,6 +640,48 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2">
<widget class="QRadioButton" name="radioButton_PABD">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>备选3</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="pushButton_GetPos">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>计算对齐</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="radioButton_NABD">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>备选4</string>
</property>
</widget>
</item>
<item row="2" column="2"> <item row="2" column="2">
<widget class="QSpinBox" name="spinBox_custom"> <widget class="QSpinBox" name="spinBox_custom">
<property name="minimumSize"> <property name="minimumSize">
@ -594,69 +709,62 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButton_PTHO">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>备选1</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="radioButton_NABD">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>备选4</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="pushButton_GetPos">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>计算对齐</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="pushButton_ChangeView">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>切换视图</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="title">
<string>采样率估计</string>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>11</x>
<y>18</y>
<width>401</width>
<height>41</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QRadioButton" name="radioButton_freqTHO">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>备选1</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_freqABD">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>备选2</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
<item> <item>
<widget class="QGroupBox" name="groupBox_view_partially"> <widget class="QGroupBox" name="groupBox_view_partially">
<property name="title"> <property name="title">
@ -807,19 +915,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>
<widget class="QPushButton" name="pushButton_save"> <widget class="QPushButton" name="pushButton_save">
<property name="sizePolicy"> <property name="sizePolicy">

View File

@ -391,8 +391,11 @@ class Ui_MainWindow_artifact_label(object):
self.pushButton_save = QPushButton(self.groupBox_left) self.pushButton_save = QPushButton(self.groupBox_left)
self.pushButton_save.setObjectName(u"pushButton_save") self.pushButton_save.setObjectName(u"pushButton_save")
sizePolicy.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth()) sizePolicy4 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
self.pushButton_save.setSizePolicy(sizePolicy) sizePolicy4.setHorizontalStretch(0)
sizePolicy4.setVerticalStretch(0)
sizePolicy4.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth())
self.pushButton_save.setSizePolicy(sizePolicy4)
self.pushButton_save.setFont(font1) self.pushButton_save.setFont(font1)
self.verticalLayout_2.addWidget(self.pushButton_save) self.verticalLayout_2.addWidget(self.pushButton_save)
@ -416,6 +419,7 @@ class Ui_MainWindow_artifact_label(object):
self.verticalLayout_2.setStretch(4, 6) self.verticalLayout_2.setStretch(4, 6)
self.verticalLayout_2.setStretch(5, 1) self.verticalLayout_2.setStretch(5, 1)
self.verticalLayout_2.setStretch(6, 1) self.verticalLayout_2.setStretch(6, 1)
self.verticalLayout_2.setStretch(7, 3)
self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1) self.gridLayout.addWidget(self.groupBox_left, 0, 0, 1, 1)
@ -457,9 +461,6 @@ class Ui_MainWindow_artifact_label(object):
self.pushButton_type_1 = QPushButton(self.groupBox_right) self.pushButton_type_1 = QPushButton(self.groupBox_right)
self.pushButton_type_1.setObjectName(u"pushButton_type_1") self.pushButton_type_1.setObjectName(u"pushButton_type_1")
sizePolicy4 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
sizePolicy4.setHorizontalStretch(0)
sizePolicy4.setVerticalStretch(0)
sizePolicy4.setHeightForWidth(self.pushButton_type_1.sizePolicy().hasHeightForWidth()) sizePolicy4.setHeightForWidth(self.pushButton_type_1.sizePolicy().hasHeightForWidth())
self.pushButton_type_1.setSizePolicy(sizePolicy4) self.pushButton_type_1.setSizePolicy(sizePolicy4)
font2 = QFont() font2 = QFont()
@ -693,7 +694,7 @@ class Ui_MainWindow_artifact_label(object):
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u6807\u6ce8\u53c2\u6570", None)) self.groupBox.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u6807\u6ce8\u53c2\u6570", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u8d77\u59cb\u65f6\u95f4(ms)", None)) self.label_3.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u8d77\u59cb\u65f6\u95f4(ms)", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u7ec8\u6b62\u65f6\u95f4(ms)", None)) self.label_4.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u7ec8\u6b62\u65f6\u95f4(ms)", None))
self.label.setText(QCoreApplication.translate("MainWindow_artifact_label", u"orgBcg 20Hz\u4ee5\u4e0a\u80fd\u91cf\u5360\u6bd4", None)) self.label.setText(QCoreApplication.translate("MainWindow_artifact_label", u"OrgBCG 20Hz\u4ee5\u4e0a\u80fd\u91cf\u5360\u6bd4", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u4f53\u52a8\u65f6\u957f(ms)", None)) self.label_5.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u4f53\u52a8\u65f6\u957f(ms)", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_artifact_label", u"BCG 20Hz\u4ee5\u4e0a\u80fd\u91cf\u5360\u6bd4", None)) self.label_2.setText(QCoreApplication.translate("MainWindow_artifact_label", u"BCG 20Hz\u4ee5\u4e0a\u80fd\u91cf\u5360\u6bd4", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u81ea\u52a8\u64ad\u653e", None)) self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u81ea\u52a8\u64ad\u653e", None))
@ -717,7 +718,7 @@ class Ui_MainWindow_artifact_label(object):
self.label_7.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u79fb\u52a8\u8ddd\u79bb", None)) self.label_7.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u79fb\u52a8\u8ddd\u79bb", None))
self.label_6.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u6700\u5927\u8303\u56f4", None)) self.label_6.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u6700\u5927\u8303\u56f4", None))
self.label_8.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u79fb\u52a8\u95f4\u9694(ms)", None)) self.label_8.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u79fb\u52a8\u95f4\u9694(ms)", None))
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u5bfc\u51fa\u6807\u7b7e", None)) self.pushButton_save.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u624b\u52a8\u4fdd\u5b58", None))
self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u65e5\u5fd7", None)) self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u65e5\u5fd7", None))
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u6807\u6ce8\u64cd\u4f5c\u548c\u4fe1\u606f", None)) self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_artifact_label", u"\u6807\u6ce8\u64cd\u4f5c\u548c\u4fe1\u606f", None))
self.pushButton_type_1.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u5267\u70c8\u4f53\u52a8", None)) self.pushButton_type_1.setText(QCoreApplication.translate("MainWindow_artifact_label", u"\u5267\u70c8\u4f53\u52a8", None))

View File

@ -42,7 +42,7 @@
<property name="title"> <property name="title">
<string>体动标注</string> <string>体动标注</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,3,1,6,1,1,0"> <layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,3,1,6,1,1,3">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
@ -152,7 +152,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>orgBcg 20Hz以上能量占比</string> <string>OrgBCG 20Hz以上能量占比</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -679,7 +679,7 @@
<item> <item>
<widget class="QPushButton" name="pushButton_save"> <widget class="QPushButton" name="pushButton_save">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -690,7 +690,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>导出标签</string> <string>手动保存</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -0,0 +1,555 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'MainWindow_bcg_quality_label.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, QCheckBox, QGridLayout, QGroupBox,
QHBoxLayout, QHeaderView, QLabel, QLineEdit,
QMainWindow, QPushButton, QSizePolicy, QSpacerItem,
QStatusBar, QTableWidget, QTableWidgetItem, QTextBrowser,
QVBoxLayout, QWidget)
class Ui_MainWindow_bcg_quality_label(object):
def setupUi(self, MainWindow_bcg_quality_label):
if not MainWindow_bcg_quality_label.objectName():
MainWindow_bcg_quality_label.setObjectName(u"MainWindow_bcg_quality_label")
MainWindow_bcg_quality_label.resize(1920, 1080)
self.centralwidget = QWidget(MainWindow_bcg_quality_label)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.groupBox_canvas = QGroupBox(self.centralwidget)
self.groupBox_canvas.setObjectName(u"groupBox_canvas")
font = QFont()
font.setPointSize(10)
self.groupBox_canvas.setFont(font)
self.verticalLayout = QVBoxLayout(self.groupBox_canvas)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout_canvas = QVBoxLayout()
self.verticalLayout_canvas.setObjectName(u"verticalLayout_canvas")
self.verticalLayout.addLayout(self.verticalLayout_canvas)
self.gridLayout.addWidget(self.groupBox_canvas, 0, 1, 1, 1)
self.groupBox_left = QGroupBox(self.centralwidget)
self.groupBox_left.setObjectName(u"groupBox_left")
self.groupBox_left.setFont(font)
self.verticalLayout_2 = QVBoxLayout(self.groupBox_left)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.pushButton_input_setting = QPushButton(self.groupBox_left)
self.pushButton_input_setting.setObjectName(u"pushButton_input_setting")
sizePolicy = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_input_setting.sizePolicy().hasHeightForWidth())
self.pushButton_input_setting.setSizePolicy(sizePolicy)
font1 = QFont()
font1.setPointSize(12)
self.pushButton_input_setting.setFont(font1)
self.horizontalLayout.addWidget(self.pushButton_input_setting)
self.pushButton_input = QPushButton(self.groupBox_left)
self.pushButton_input.setObjectName(u"pushButton_input")
sizePolicy.setHeightForWidth(self.pushButton_input.sizePolicy().hasHeightForWidth())
self.pushButton_input.setSizePolicy(sizePolicy)
self.pushButton_input.setFont(font1)
self.horizontalLayout.addWidget(self.pushButton_input)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer)
self.groupBox_status = QGroupBox(self.groupBox_left)
self.groupBox_status.setObjectName(u"groupBox_status")
self.gridLayout_3 = QGridLayout(self.groupBox_status)
self.gridLayout_3.setObjectName(u"gridLayout_3")
self.label_5 = QLabel(self.groupBox_status)
self.label_5.setObjectName(u"label_5")
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
self.label_5.setSizePolicy(sizePolicy1)
self.label_5.setFont(font1)
self.gridLayout_3.addWidget(self.label_5, 0, 0, 1, 1)
self.label_6 = QLabel(self.groupBox_status)
self.label_6.setObjectName(u"label_6")
sizePolicy1.setHeightForWidth(self.label_6.sizePolicy().hasHeightForWidth())
self.label_6.setSizePolicy(sizePolicy1)
self.label_6.setFont(font1)
self.gridLayout_3.addWidget(self.label_6, 1, 0, 1, 1)
self.label_12 = QLabel(self.groupBox_status)
self.label_12.setObjectName(u"label_12")
sizePolicy1.setHeightForWidth(self.label_12.sizePolicy().hasHeightForWidth())
self.label_12.setSizePolicy(sizePolicy1)
self.label_12.setFont(font1)
self.gridLayout_3.addWidget(self.label_12, 2, 0, 1, 1)
self.label_13 = QLabel(self.groupBox_status)
self.label_13.setObjectName(u"label_13")
sizePolicy1.setHeightForWidth(self.label_13.sizePolicy().hasHeightForWidth())
self.label_13.setSizePolicy(sizePolicy1)
self.label_13.setFont(font1)
self.gridLayout_3.addWidget(self.label_13, 3, 0, 1, 1)
self.lineEdit_artifact_time_percentage = QLineEdit(self.groupBox_status)
self.lineEdit_artifact_time_percentage.setObjectName(u"lineEdit_artifact_time_percentage")
self.lineEdit_artifact_time_percentage.setEnabled(False)
self.lineEdit_artifact_time_percentage.setFont(font1)
self.gridLayout_3.addWidget(self.lineEdit_artifact_time_percentage, 3, 1, 1, 1)
self.lineEdit_longest_continuous_time = QLineEdit(self.groupBox_status)
self.lineEdit_longest_continuous_time.setObjectName(u"lineEdit_longest_continuous_time")
self.lineEdit_longest_continuous_time.setEnabled(False)
self.lineEdit_longest_continuous_time.setFont(font1)
self.gridLayout_3.addWidget(self.lineEdit_longest_continuous_time, 2, 1, 1, 1)
self.lineEdit_data_part_num = QLineEdit(self.groupBox_status)
self.lineEdit_data_part_num.setObjectName(u"lineEdit_data_part_num")
self.lineEdit_data_part_num.setEnabled(False)
self.lineEdit_data_part_num.setFont(font1)
self.gridLayout_3.addWidget(self.lineEdit_data_part_num, 1, 1, 1, 1)
self.lineEdit_current_part_time = QLineEdit(self.groupBox_status)
self.lineEdit_current_part_time.setObjectName(u"lineEdit_current_part_time")
self.lineEdit_current_part_time.setEnabled(False)
self.lineEdit_current_part_time.setFont(font1)
self.gridLayout_3.addWidget(self.lineEdit_current_part_time, 0, 1, 1, 1)
self.verticalLayout_2.addWidget(self.groupBox_status)
self.verticalSpacer_5 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer_5)
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.groupBox_artifact_type = QGroupBox(self.groupBox_left)
self.groupBox_artifact_type.setObjectName(u"groupBox_artifact_type")
self.verticalLayout_3 = QVBoxLayout(self.groupBox_artifact_type)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.checkBox_allin = QCheckBox(self.groupBox_artifact_type)
self.checkBox_allin.setObjectName(u"checkBox_allin")
font2 = QFont()
font2.setPointSize(20)
self.checkBox_allin.setFont(font2)
self.checkBox_allin.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_allin)
self.checkBox_type1 = QCheckBox(self.groupBox_artifact_type)
self.checkBox_type1.setObjectName(u"checkBox_type1")
self.checkBox_type1.setFont(font1)
self.checkBox_type1.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_type1)
self.checkBox_type2 = QCheckBox(self.groupBox_artifact_type)
self.checkBox_type2.setObjectName(u"checkBox_type2")
self.checkBox_type2.setFont(font1)
self.checkBox_type2.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_type2)
self.checkBox_type3 = QCheckBox(self.groupBox_artifact_type)
self.checkBox_type3.setObjectName(u"checkBox_type3")
self.checkBox_type3.setFont(font1)
self.checkBox_type3.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_type3)
self.checkBox_type4 = QCheckBox(self.groupBox_artifact_type)
self.checkBox_type4.setObjectName(u"checkBox_type4")
self.checkBox_type4.setFont(font1)
self.checkBox_type4.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_type4)
self.checkBox_type5 = QCheckBox(self.groupBox_artifact_type)
self.checkBox_type5.setObjectName(u"checkBox_type5")
self.checkBox_type5.setFont(font1)
self.checkBox_type5.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_type5)
self.horizontalLayout_2.addWidget(self.groupBox_artifact_type)
self.groupBox_function = QGroupBox(self.groupBox_left)
self.groupBox_function.setObjectName(u"groupBox_function")
self.gridLayout_13 = QGridLayout(self.groupBox_function)
self.gridLayout_13.setObjectName(u"gridLayout_13")
self.pushButton_invalid_signal_label = QPushButton(self.groupBox_function)
self.pushButton_invalid_signal_label.setObjectName(u"pushButton_invalid_signal_label")
sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(0)
sizePolicy2.setHeightForWidth(self.pushButton_invalid_signal_label.sizePolicy().hasHeightForWidth())
self.pushButton_invalid_signal_label.setSizePolicy(sizePolicy2)
self.pushButton_invalid_signal_label.setFont(font1)
self.gridLayout_13.addWidget(self.pushButton_invalid_signal_label, 0, 0, 1, 1)
self.pushButton_Ctype_signal_label = QPushButton(self.groupBox_function)
self.pushButton_Ctype_signal_label.setObjectName(u"pushButton_Ctype_signal_label")
sizePolicy2.setHeightForWidth(self.pushButton_Ctype_signal_label.sizePolicy().hasHeightForWidth())
self.pushButton_Ctype_signal_label.setSizePolicy(sizePolicy2)
self.pushButton_Ctype_signal_label.setFont(font1)
self.gridLayout_13.addWidget(self.pushButton_Ctype_signal_label, 1, 0, 1, 1)
self.horizontalLayout_2.addWidget(self.groupBox_function)
self.horizontalLayout_2.setStretch(0, 2)
self.horizontalLayout_2.setStretch(1, 1)
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
self.verticalSpacer_4 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer_4)
self.groupBox_operation = QGroupBox(self.groupBox_left)
self.groupBox_operation.setObjectName(u"groupBox_operation")
self.gridLayout_7 = QGridLayout(self.groupBox_operation)
self.gridLayout_7.setObjectName(u"gridLayout_7")
self.pushButton_prev = QPushButton(self.groupBox_operation)
self.pushButton_prev.setObjectName(u"pushButton_prev")
sizePolicy2.setHeightForWidth(self.pushButton_prev.sizePolicy().hasHeightForWidth())
self.pushButton_prev.setSizePolicy(sizePolicy2)
self.pushButton_prev.setFont(font1)
self.gridLayout_7.addWidget(self.pushButton_prev, 4, 0, 1, 1)
self.checkBox_examine_tobeLabeled = QCheckBox(self.groupBox_operation)
self.checkBox_examine_tobeLabeled.setObjectName(u"checkBox_examine_tobeLabeled")
self.checkBox_examine_tobeLabeled.setFont(font1)
self.gridLayout_7.addWidget(self.checkBox_examine_tobeLabeled, 1, 0, 1, 1)
self.checkBox_highlight_longest_continuous = QCheckBox(self.groupBox_operation)
self.checkBox_highlight_longest_continuous.setObjectName(u"checkBox_highlight_longest_continuous")
self.checkBox_highlight_longest_continuous.setFont(font1)
self.gridLayout_7.addWidget(self.checkBox_highlight_longest_continuous, 0, 0, 1, 1)
self.pushButton_next = QPushButton(self.groupBox_operation)
self.pushButton_next.setObjectName(u"pushButton_next")
sizePolicy2.setHeightForWidth(self.pushButton_next.sizePolicy().hasHeightForWidth())
self.pushButton_next.setSizePolicy(sizePolicy2)
self.pushButton_next.setFont(font1)
self.gridLayout_7.addWidget(self.pushButton_next, 4, 1, 1, 1)
self.label = QLabel(self.groupBox_operation)
self.label.setObjectName(u"label")
self.label.setFont(font1)
self.label.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_7.addWidget(self.label, 2, 0, 1, 1)
self.checkBox_display_afterfilter = QCheckBox(self.groupBox_operation)
self.checkBox_display_afterfilter.setObjectName(u"checkBox_display_afterfilter")
self.checkBox_display_afterfilter.setFont(font1)
self.gridLayout_7.addWidget(self.checkBox_display_afterfilter, 0, 1, 1, 1)
self.lineEdit_remark = QLineEdit(self.groupBox_operation)
self.lineEdit_remark.setObjectName(u"lineEdit_remark")
self.lineEdit_remark.setEnabled(True)
self.lineEdit_remark.setFont(font1)
self.gridLayout_7.addWidget(self.lineEdit_remark, 2, 1, 1, 1)
self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
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(1, 1)
self.gridLayout_7.setRowStretch(2, 1)
self.gridLayout_7.setRowStretch(3, 1)
self.gridLayout_7.setRowStretch(4, 3)
self.gridLayout_7.setColumnStretch(0, 1)
self.gridLayout_7.setColumnStretch(1, 1)
self.verticalLayout_2.addWidget(self.groupBox_operation)
self.verticalSpacer_3 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer_3)
self.pushButton_save = QPushButton(self.groupBox_left)
self.pushButton_save.setObjectName(u"pushButton_save")
sizePolicy2.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth())
self.pushButton_save.setSizePolicy(sizePolicy2)
self.pushButton_save.setFont(font1)
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, 2)
self.verticalLayout_2.setStretch(1, 1)
self.verticalLayout_2.setStretch(2, 4)
self.verticalLayout_2.setStretch(3, 1)
self.verticalLayout_2.setStretch(4, 6)
self.verticalLayout_2.setStretch(5, 1)
self.verticalLayout_2.setStretch(6, 6)
self.verticalLayout_2.setStretch(7, 1)
self.verticalLayout_2.setStretch(8, 2)
self.verticalLayout_2.setStretch(9, 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_9 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_4.addItem(self.verticalSpacer_9, 7, 0, 1, 2)
self.verticalSpacer_7 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_4.addItem(self.verticalSpacer_7, 3, 0, 1, 2)
self.pushButton_b1 = QPushButton(self.groupBox_right)
self.pushButton_b1.setObjectName(u"pushButton_b1")
sizePolicy2.setHeightForWidth(self.pushButton_b1.sizePolicy().hasHeightForWidth())
self.pushButton_b1.setSizePolicy(sizePolicy2)
font3 = QFont()
font3.setPointSize(24)
self.pushButton_b1.setFont(font3)
self.gridLayout_4.addWidget(self.pushButton_b1, 4, 0, 1, 1)
self.tableWidget_c = QTableWidget(self.groupBox_right)
if (self.tableWidget_c.columnCount() < 1):
self.tableWidget_c.setColumnCount(1)
self.tableWidget_c.setObjectName(u"tableWidget_c")
self.tableWidget_c.setFont(font1)
self.tableWidget_c.setColumnCount(1)
self.gridLayout_4.addWidget(self.tableWidget_c, 8, 1, 1, 1)
self.tableWidget_a1 = QTableWidget(self.groupBox_right)
if (self.tableWidget_a1.columnCount() < 1):
self.tableWidget_a1.setColumnCount(1)
self.tableWidget_a1.setObjectName(u"tableWidget_a1")
self.tableWidget_a1.setFont(font1)
self.tableWidget_a1.setColumnCount(1)
self.tableWidget_a1.horizontalHeader().setMinimumSectionSize(33)
self.tableWidget_a1.horizontalHeader().setDefaultSectionSize(75)
self.tableWidget_a1.verticalHeader().setMinimumSectionSize(32)
self.gridLayout_4.addWidget(self.tableWidget_a1, 0, 1, 1, 1)
self.pushButton_b2 = QPushButton(self.groupBox_right)
self.pushButton_b2.setObjectName(u"pushButton_b2")
sizePolicy2.setHeightForWidth(self.pushButton_b2.sizePolicy().hasHeightForWidth())
self.pushButton_b2.setSizePolicy(sizePolicy2)
self.pushButton_b2.setFont(font3)
self.gridLayout_4.addWidget(self.pushButton_b2, 6, 0, 1, 1)
self.pushButton_f = QPushButton(self.groupBox_right)
self.pushButton_f.setObjectName(u"pushButton_f")
sizePolicy2.setHeightForWidth(self.pushButton_f.sizePolicy().hasHeightForWidth())
self.pushButton_f.setSizePolicy(sizePolicy2)
self.pushButton_f.setFont(font3)
self.gridLayout_4.addWidget(self.pushButton_f, 10, 0, 1, 1)
self.tableWidget_f = QTableWidget(self.groupBox_right)
if (self.tableWidget_f.columnCount() < 1):
self.tableWidget_f.setColumnCount(1)
self.tableWidget_f.setObjectName(u"tableWidget_f")
self.tableWidget_f.setFont(font1)
self.tableWidget_f.setColumnCount(1)
self.gridLayout_4.addWidget(self.tableWidget_f, 10, 1, 1, 1)
self.pushButton_a2 = QPushButton(self.groupBox_right)
self.pushButton_a2.setObjectName(u"pushButton_a2")
sizePolicy2.setHeightForWidth(self.pushButton_a2.sizePolicy().hasHeightForWidth())
self.pushButton_a2.setSizePolicy(sizePolicy2)
self.pushButton_a2.setFont(font3)
self.gridLayout_4.addWidget(self.pushButton_a2, 2, 0, 1, 1)
self.verticalSpacer_6 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_4.addItem(self.verticalSpacer_6, 1, 0, 1, 2)
self.tableWidget_b1 = QTableWidget(self.groupBox_right)
if (self.tableWidget_b1.columnCount() < 1):
self.tableWidget_b1.setColumnCount(1)
self.tableWidget_b1.setObjectName(u"tableWidget_b1")
self.tableWidget_b1.setFont(font1)
self.tableWidget_b1.setColumnCount(1)
self.gridLayout_4.addWidget(self.tableWidget_b1, 4, 1, 1, 1)
self.pushButton_a1 = QPushButton(self.groupBox_right)
self.pushButton_a1.setObjectName(u"pushButton_a1")
sizePolicy2.setHeightForWidth(self.pushButton_a1.sizePolicy().hasHeightForWidth())
self.pushButton_a1.setSizePolicy(sizePolicy2)
self.pushButton_a1.setFont(font3)
self.gridLayout_4.addWidget(self.pushButton_a1, 0, 0, 1, 1)
self.tableWidget_b2 = QTableWidget(self.groupBox_right)
if (self.tableWidget_b2.columnCount() < 1):
self.tableWidget_b2.setColumnCount(1)
self.tableWidget_b2.setObjectName(u"tableWidget_b2")
self.tableWidget_b2.setFont(font1)
self.tableWidget_b2.setColumnCount(1)
self.gridLayout_4.addWidget(self.tableWidget_b2, 6, 1, 1, 1)
self.tableWidget_a2 = QTableWidget(self.groupBox_right)
if (self.tableWidget_a2.columnCount() < 1):
self.tableWidget_a2.setColumnCount(1)
self.tableWidget_a2.setObjectName(u"tableWidget_a2")
self.tableWidget_a2.setFont(font1)
self.tableWidget_a2.setColumnCount(1)
self.gridLayout_4.addWidget(self.tableWidget_a2, 2, 1, 1, 1)
self.verticalSpacer_8 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_4.addItem(self.verticalSpacer_8, 5, 0, 1, 2)
self.pushButton_c = QPushButton(self.groupBox_right)
self.pushButton_c.setObjectName(u"pushButton_c")
sizePolicy2.setHeightForWidth(self.pushButton_c.sizePolicy().hasHeightForWidth())
self.pushButton_c.setSizePolicy(sizePolicy2)
self.pushButton_c.setFont(font3)
self.gridLayout_4.addWidget(self.pushButton_c, 8, 0, 1, 1)
self.verticalSpacer_10 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.gridLayout_4.addItem(self.verticalSpacer_10, 9, 0, 1, 2)
self.gridLayout_4.setRowStretch(0, 5)
self.gridLayout_4.setRowStretch(1, 1)
self.gridLayout_4.setRowStretch(2, 5)
self.gridLayout_4.setRowStretch(3, 1)
self.gridLayout_4.setRowStretch(4, 5)
self.gridLayout_4.setRowStretch(5, 1)
self.gridLayout_4.setRowStretch(6, 5)
self.gridLayout_4.setRowStretch(7, 1)
self.gridLayout_4.setRowStretch(8, 5)
self.gridLayout_4.setRowStretch(9, 1)
self.gridLayout_4.setRowStretch(10, 5)
self.gridLayout_4.setColumnStretch(0, 1)
self.gridLayout_4.setColumnStretch(1, 2)
self.gridLayout.addWidget(self.groupBox_right, 0, 2, 1, 1)
self.gridLayout.setColumnStretch(0, 4)
self.gridLayout.setColumnStretch(1, 15)
self.gridLayout.setColumnStretch(2, 4)
MainWindow_bcg_quality_label.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_bcg_quality_label)
self.statusbar.setObjectName(u"statusbar")
MainWindow_bcg_quality_label.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_bcg_quality_label)
QMetaObject.connectSlotsByName(MainWindow_bcg_quality_label)
# setupUi
def retranslateUi(self, MainWindow_bcg_quality_label):
MainWindow_bcg_quality_label.setWindowTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"BCG\u7684\u8d28\u91cf\u6807\u6ce8", None))
self.groupBox_canvas.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u7ed8\u56fe\u533a", None))
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"BCG\u7684\u8d28\u91cf\u6807\u6ce8", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_input.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u5f00\u59cb\u5bfc\u5165", None))
self.groupBox_status.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u8fd0\u884c\u72b6\u6001", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u5f53\u524d\u7247\u6bb5\u65f6\u95f4", None))
self.label_6.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u5f53\u524d\u7247\u6bb5/\u7247\u6bb5\u603b\u6570", None))
self.label_12.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u6700\u957f\u8fde\u7eed\u65f6\u95f4", None))
self.label_13.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u4f53\u52a8\u65f6\u95f4\u5360\u6bd4", None))
self.groupBox_artifact_type.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u4f53\u52a8\u7c7b\u578b", None))
self.checkBox_allin.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u5168\u9009", None))
self.checkBox_type1.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u7c7b\u578b1-\u5267\u70c8\u4f53\u52a8", None))
self.checkBox_type2.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u7c7b\u578b2-\u8109\u51b2\u4f53\u52a8", None))
self.checkBox_type3.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u7c7b\u578b3-\u5e38\u89c4\u4f53\u52a8", None))
self.checkBox_type4.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u7c7b\u578b4-\u7591\u4f3c\u9f3e\u58f0", None))
self.checkBox_type5.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u7c7b\u578b5-\u79bb\u5e8a", None))
self.groupBox_function.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u529f\u80fd", None))
self.pushButton_invalid_signal_label.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u65e0\u6548\u4fe1\u53f7\u6807\u6ce8", None))
self.pushButton_Ctype_signal_label.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"C\u7c7b\u4fe1\u53f7\u6807\u6ce8", None))
self.groupBox_operation.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u64cd\u4f5c", None))
self.pushButton_prev.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"<(A)", None))
self.checkBox_examine_tobeLabeled.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u4ec5\u67e5\u672a\u6807\u7247\u6bb5", None))
self.checkBox_highlight_longest_continuous.setText(QCoreApplication.translate("MainWindow_bcg_quality_label", u"\u9ad8\u4eae\u6700\u957f\u8fde\u7eed", 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.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.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.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(P)", 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(I)", 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(J)", None))
# retranslateUi

View File

@ -0,0 +1,864 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow_bcg_quality_label</class>
<widget class="QMainWindow" name="MainWindow_bcg_quality_label">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1920</width>
<height>1080</height>
</rect>
</property>
<property name="windowTitle">
<string>BCG的质量标注</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout" columnstretch="4,15,4">
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_canvas">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>绘图区</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_canvas"/>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_left">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>BCG的质量标注</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="2,1,4,1,6,1,6,1,2,5">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="pushButton_input_setting">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>导入设置</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_input">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>开始导入</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_status">
<property name="title">
<string>运行状态</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>当前片段时间</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>当前片段/片段总数</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_12">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>最长连续时间</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_13">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>体动时间占比</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEdit_artifact_time_percentage">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_longest_continuous_time">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_data_part_num">
<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_time">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="2,1">
<item>
<widget class="QGroupBox" name="groupBox_artifact_type">
<property name="title">
<string>体动类型</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QCheckBox" name="checkBox_allin">
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>全选</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_type1">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>类型1-剧烈体动</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_type2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>类型2-脉冲体动</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_type3">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>类型3-常规体动</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_type4">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>类型4-疑似鼾声</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_type5">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>类型5-离床</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_function">
<property name="title">
<string>功能</string>
</property>
<layout class="QGridLayout" name="gridLayout_13">
<item row="0" column="0">
<widget class="QPushButton" name="pushButton_invalid_signal_label">
<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>无效信号标注</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pushButton_Ctype_signal_label">
<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>C类信号标注</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_operation">
<property name="title">
<string>操作</string>
</property>
<layout class="QGridLayout" name="gridLayout_7" rowstretch="1,1,1,1,3" columnstretch="1,1">
<item row="4" column="0">
<widget class="QPushButton" name="pushButton_prev">
<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>&lt;(A)</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="checkBox_examine_tobeLabeled">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>仅查未标片段</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="checkBox_highlight_longest_continuous">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>高亮最长连续</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="pushButton_next">
<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>&gt;(D)</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>输入备注</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="checkBox_display_afterfilter">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>去除工频噪声</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_remark">
<property name="enabled">
<bool>true</bool>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item 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>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_save">
<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>手动保存</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>日志</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QTextBrowser" name="textBrowser_info"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="2">
<widget class="QGroupBox" name="groupBox_right">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>标签记录</string>
</property>
<layout class="QGridLayout" name="gridLayout_4" rowstretch="5,1,5,1,5,1,5,1,5,1,5" columnstretch="1,2">
<item row="7" column="0" colspan="2">
<spacer name="verticalSpacer_9">
<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 row="3" column="0" colspan="2">
<spacer name="verticalSpacer_7">
<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 row="4" column="0">
<widget class="QPushButton" name="pushButton_b1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>24</pointsize>
</font>
</property>
<property name="text">
<string>b1(O)</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QTableWidget" name="tableWidget_c">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="columnCount">
<number>1</number>
</property>
<column/>
</widget>
</item>
<item row="0" column="1">
<widget class="QTableWidget" name="tableWidget_a1">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="columnCount">
<number>1</number>
</property>
<attribute name="horizontalHeaderMinimumSectionSize">
<number>33</number>
</attribute>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>75</number>
</attribute>
<attribute name="verticalHeaderMinimumSectionSize">
<number>32</number>
</attribute>
<column/>
</widget>
</item>
<item row="6" column="0">
<widget class="QPushButton" name="pushButton_b2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>24</pointsize>
</font>
</property>
<property name="text">
<string>b2(P)</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QPushButton" name="pushButton_f">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>24</pointsize>
</font>
</property>
<property name="text">
<string>删除</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QTableWidget" name="tableWidget_f">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="columnCount">
<number>1</number>
</property>
<column/>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="pushButton_a2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>24</pointsize>
</font>
</property>
<property name="text">
<string>a2(I)</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<spacer name="verticalSpacer_6">
<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 row="4" column="1">
<widget class="QTableWidget" name="tableWidget_b1">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="columnCount">
<number>1</number>
</property>
<column/>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="pushButton_a1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>24</pointsize>
</font>
</property>
<property name="text">
<string>a1(U)</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QTableWidget" name="tableWidget_b2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="columnCount">
<number>1</number>
</property>
<column/>
</widget>
</item>
<item row="2" column="1">
<widget class="QTableWidget" name="tableWidget_a2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="columnCount">
<number>1</number>
</property>
<column/>
</widget>
</item>
<item row="5" column="0" colspan="2">
<spacer name="verticalSpacer_8">
<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 row="8" column="0">
<widget class="QPushButton" name="pushButton_c">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>24</pointsize>
</font>
</property>
<property name="text">
<string>c(J)</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<spacer name="verticalSpacer_10">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -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())
@ -359,8 +367,11 @@ class Ui_MainWindow_label_check(object):
self.pushButton_save = QPushButton(self.groupBox_left) self.pushButton_save = QPushButton(self.groupBox_left)
self.pushButton_save.setObjectName(u"pushButton_save") self.pushButton_save.setObjectName(u"pushButton_save")
sizePolicy.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth()) sizePolicy3 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
self.pushButton_save.setSizePolicy(sizePolicy) sizePolicy3.setHorizontalStretch(0)
sizePolicy3.setVerticalStretch(0)
sizePolicy3.setHeightForWidth(self.pushButton_save.sizePolicy().hasHeightForWidth())
self.pushButton_save.setSizePolicy(sizePolicy3)
self.pushButton_save.setFont(font1) self.pushButton_save.setFont(font1)
self.horizontalLayout_3.addWidget(self.pushButton_save) self.horizontalLayout_3.addWidget(self.pushButton_save)
@ -502,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))
@ -521,7 +539,7 @@ class Ui_MainWindow_label_check(object):
self.label_6.setText(QCoreApplication.translate("MainWindow_label_check", u"\u6700\u5927\u8303\u56f4", None)) self.label_6.setText(QCoreApplication.translate("MainWindow_label_check", u"\u6700\u5927\u8303\u56f4", None))
self.label_8.setText(QCoreApplication.translate("MainWindow_label_check", u"\u79fb\u52a8\u95f4\u9694(ms)", None)) self.label_8.setText(QCoreApplication.translate("MainWindow_label_check", u"\u79fb\u52a8\u95f4\u9694(ms)", None))
self.checkBox_show_reference_line.setText(QCoreApplication.translate("MainWindow_label_check", u"\u7ed8\u5236\u53c2\u8003\u7ebf", None)) self.checkBox_show_reference_line.setText(QCoreApplication.translate("MainWindow_label_check", u"\u7ed8\u5236\u53c2\u8003\u7ebf", None))
self.pushButton_save.setText(QCoreApplication.translate("MainWindow_label_check", u"\u5bfc\u51fa\u6807\u7b7e", None)) self.pushButton_save.setText(QCoreApplication.translate("MainWindow_label_check", u"\u624b\u52a8\u4fdd\u5b58", None))
self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u65e5\u5fd7", None)) self.groupBox_4.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u65e5\u5fd7", None))
self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u5cf0\u503c\u5750\u6807\u548c\u4fe1\u606f", None)) self.groupBox_right.setTitle(QCoreApplication.translate("MainWindow_label_check", u"\u5cf0\u503c\u5750\u6807\u548c\u4fe1\u606f", None))
self.label_9.setText(QCoreApplication.translate("MainWindow_label_check", u"\u6570\u636e\u957f\u5ea6(\u70b9\u6570)", None)) self.label_9.setText(QCoreApplication.translate("MainWindow_label_check", u"\u6570\u636e\u957f\u5ea6(\u70b9\u6570)", 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">
@ -622,7 +646,7 @@
<item> <item>
<widget class="QPushButton" name="pushButton_save"> <widget class="QPushButton" name="pushButton_save">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -633,7 +657,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>导出标签</string> <string>手动保存</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -15,10 +15,10 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon, QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter, QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform) QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QComboBox, QGridLayout, QHBoxLayout, from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout,
QLabel, QMainWindow, QPlainTextEdit, QPushButton, QHBoxLayout, QLabel, QMainWindow, QPlainTextEdit,
QSizePolicy, QSpacerItem, QStatusBar, QVBoxLayout, QPushButton, QSizePolicy, QSpacerItem, QStatusBar,
QWidget) QVBoxLayout, QWidget)
class Ui_Signal_Label(object): class Ui_Signal_Label(object):
def setupUi(self, Signal_Label): def setupUi(self, Signal_Label):
@ -50,12 +50,39 @@ class Ui_Signal_Label(object):
self.plainTextEdit_root_path = QPlainTextEdit(self.centralwidget) self.plainTextEdit_root_path = QPlainTextEdit(self.centralwidget)
self.plainTextEdit_root_path.setObjectName(u"plainTextEdit_root_path") self.plainTextEdit_root_path.setObjectName(u"plainTextEdit_root_path")
self.plainTextEdit_root_path.setEnabled(False)
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.plainTextEdit_root_path.sizePolicy().hasHeightForWidth())
self.plainTextEdit_root_path.setSizePolicy(sizePolicy1)
self.verticalLayout_3.addWidget(self.plainTextEdit_root_path) self.verticalLayout_3.addWidget(self.plainTextEdit_root_path)
self.horizontalLayout_5 = QHBoxLayout()
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout_5.addItem(self.horizontalSpacer)
self.checkBox_darkmode = QCheckBox(self.centralwidget)
self.checkBox_darkmode.setObjectName(u"checkBox_darkmode")
font1 = QFont()
font1.setPointSize(12)
self.checkBox_darkmode.setFont(font1)
self.horizontalLayout_5.addWidget(self.checkBox_darkmode)
self.verticalLayout_3.addLayout(self.horizontalLayout_5)
self.horizontalLayout.addLayout(self.verticalLayout_3) self.horizontalLayout.addLayout(self.verticalLayout_3)
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout.addItem(self.horizontalSpacer_2)
self.verticalLayout_2 = QVBoxLayout() self.verticalLayout_2 = QVBoxLayout()
self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding) self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
@ -70,25 +97,32 @@ class Ui_Signal_Label(object):
self.pushButton_open = QPushButton(self.centralwidget) self.pushButton_open = QPushButton(self.centralwidget)
self.pushButton_open.setObjectName(u"pushButton_open") self.pushButton_open.setObjectName(u"pushButton_open")
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred) sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred)
sizePolicy1.setHorizontalStretch(0) sizePolicy2.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0) sizePolicy2.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.pushButton_open.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_open.sizePolicy().hasHeightForWidth())
self.pushButton_open.setSizePolicy(sizePolicy1) self.pushButton_open.setSizePolicy(sizePolicy2)
self.pushButton_open.setFont(font) self.pushButton_open.setFont(font)
self.verticalLayout_2.addWidget(self.pushButton_open) self.verticalLayout_2.addWidget(self.pushButton_open)
self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer_2)
self.horizontalLayout.addLayout(self.verticalLayout_2) self.horizontalLayout.addLayout(self.verticalLayout_2)
self.horizontalLayout.setStretch(0, 30)
self.horizontalLayout.setStretch(1, 1)
self.horizontalLayout.setStretch(2, 8)
self.verticalLayout.addLayout(self.horizontalLayout) self.verticalLayout.addLayout(self.horizontalLayout)
self.pushButton_approximately_align = QPushButton(self.centralwidget) self.pushButton_approximately_align = QPushButton(self.centralwidget)
self.pushButton_approximately_align.setObjectName(u"pushButton_approximately_align") self.pushButton_approximately_align.setObjectName(u"pushButton_approximately_align")
sizePolicy1.setHeightForWidth(self.pushButton_approximately_align.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_approximately_align.sizePolicy().hasHeightForWidth())
self.pushButton_approximately_align.setSizePolicy(sizePolicy1) self.pushButton_approximately_align.setSizePolicy(sizePolicy2)
self.pushButton_approximately_align.setFont(font) self.pushButton_approximately_align.setFont(font)
self.verticalLayout.addWidget(self.pushButton_approximately_align) self.verticalLayout.addWidget(self.pushButton_approximately_align)
@ -97,16 +131,16 @@ class Ui_Signal_Label(object):
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.pushButton_preprocess_BCG = QPushButton(self.centralwidget) self.pushButton_preprocess_BCG = QPushButton(self.centralwidget)
self.pushButton_preprocess_BCG.setObjectName(u"pushButton_preprocess_BCG") self.pushButton_preprocess_BCG.setObjectName(u"pushButton_preprocess_BCG")
sizePolicy1.setHeightForWidth(self.pushButton_preprocess_BCG.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_preprocess_BCG.sizePolicy().hasHeightForWidth())
self.pushButton_preprocess_BCG.setSizePolicy(sizePolicy1) self.pushButton_preprocess_BCG.setSizePolicy(sizePolicy2)
self.pushButton_preprocess_BCG.setFont(font) self.pushButton_preprocess_BCG.setFont(font)
self.horizontalLayout_2.addWidget(self.pushButton_preprocess_BCG) self.horizontalLayout_2.addWidget(self.pushButton_preprocess_BCG)
self.pushButton_preprocess_ECG = QPushButton(self.centralwidget) self.pushButton_preprocess_ECG = QPushButton(self.centralwidget)
self.pushButton_preprocess_ECG.setObjectName(u"pushButton_preprocess_ECG") self.pushButton_preprocess_ECG.setObjectName(u"pushButton_preprocess_ECG")
sizePolicy1.setHeightForWidth(self.pushButton_preprocess_ECG.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_preprocess_ECG.sizePolicy().hasHeightForWidth())
self.pushButton_preprocess_ECG.setSizePolicy(sizePolicy1) self.pushButton_preprocess_ECG.setSizePolicy(sizePolicy2)
self.pushButton_preprocess_ECG.setFont(font) self.pushButton_preprocess_ECG.setFont(font)
self.horizontalLayout_2.addWidget(self.pushButton_preprocess_ECG) self.horizontalLayout_2.addWidget(self.pushButton_preprocess_ECG)
@ -118,16 +152,16 @@ class Ui_Signal_Label(object):
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.pushButton_detect_Jpeak = QPushButton(self.centralwidget) self.pushButton_detect_Jpeak = QPushButton(self.centralwidget)
self.pushButton_detect_Jpeak.setObjectName(u"pushButton_detect_Jpeak") self.pushButton_detect_Jpeak.setObjectName(u"pushButton_detect_Jpeak")
sizePolicy1.setHeightForWidth(self.pushButton_detect_Jpeak.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_detect_Jpeak.sizePolicy().hasHeightForWidth())
self.pushButton_detect_Jpeak.setSizePolicy(sizePolicy1) self.pushButton_detect_Jpeak.setSizePolicy(sizePolicy2)
self.pushButton_detect_Jpeak.setFont(font) self.pushButton_detect_Jpeak.setFont(font)
self.horizontalLayout_3.addWidget(self.pushButton_detect_Jpeak) self.horizontalLayout_3.addWidget(self.pushButton_detect_Jpeak)
self.pushButton_detect_Rpeak = QPushButton(self.centralwidget) self.pushButton_detect_Rpeak = QPushButton(self.centralwidget)
self.pushButton_detect_Rpeak.setObjectName(u"pushButton_detect_Rpeak") self.pushButton_detect_Rpeak.setObjectName(u"pushButton_detect_Rpeak")
sizePolicy1.setHeightForWidth(self.pushButton_detect_Rpeak.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_detect_Rpeak.sizePolicy().hasHeightForWidth())
self.pushButton_detect_Rpeak.setSizePolicy(sizePolicy1) self.pushButton_detect_Rpeak.setSizePolicy(sizePolicy2)
self.pushButton_detect_Rpeak.setFont(font) self.pushButton_detect_Rpeak.setFont(font)
self.horizontalLayout_3.addWidget(self.pushButton_detect_Rpeak) self.horizontalLayout_3.addWidget(self.pushButton_detect_Rpeak)
@ -139,16 +173,16 @@ class Ui_Signal_Label(object):
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6") self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
self.pushButton_label_check_BCG = QPushButton(self.centralwidget) self.pushButton_label_check_BCG = QPushButton(self.centralwidget)
self.pushButton_label_check_BCG.setObjectName(u"pushButton_label_check_BCG") self.pushButton_label_check_BCG.setObjectName(u"pushButton_label_check_BCG")
sizePolicy1.setHeightForWidth(self.pushButton_label_check_BCG.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_label_check_BCG.sizePolicy().hasHeightForWidth())
self.pushButton_label_check_BCG.setSizePolicy(sizePolicy1) self.pushButton_label_check_BCG.setSizePolicy(sizePolicy2)
self.pushButton_label_check_BCG.setFont(font) self.pushButton_label_check_BCG.setFont(font)
self.horizontalLayout_6.addWidget(self.pushButton_label_check_BCG) self.horizontalLayout_6.addWidget(self.pushButton_label_check_BCG)
self.pushButton_label_check_ECG = QPushButton(self.centralwidget) self.pushButton_label_check_ECG = QPushButton(self.centralwidget)
self.pushButton_label_check_ECG.setObjectName(u"pushButton_label_check_ECG") self.pushButton_label_check_ECG.setObjectName(u"pushButton_label_check_ECG")
sizePolicy1.setHeightForWidth(self.pushButton_label_check_ECG.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_label_check_ECG.sizePolicy().hasHeightForWidth())
self.pushButton_label_check_ECG.setSizePolicy(sizePolicy1) self.pushButton_label_check_ECG.setSizePolicy(sizePolicy2)
self.pushButton_label_check_ECG.setFont(font) self.pushButton_label_check_ECG.setFont(font)
self.horizontalLayout_6.addWidget(self.pushButton_label_check_ECG) self.horizontalLayout_6.addWidget(self.pushButton_label_check_ECG)
@ -160,16 +194,16 @@ class Ui_Signal_Label(object):
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
self.pushButton_precisely_align = QPushButton(self.centralwidget) self.pushButton_precisely_align = QPushButton(self.centralwidget)
self.pushButton_precisely_align.setObjectName(u"pushButton_precisely_align") self.pushButton_precisely_align.setObjectName(u"pushButton_precisely_align")
sizePolicy1.setHeightForWidth(self.pushButton_precisely_align.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_precisely_align.sizePolicy().hasHeightForWidth())
self.pushButton_precisely_align.setSizePolicy(sizePolicy1) self.pushButton_precisely_align.setSizePolicy(sizePolicy2)
self.pushButton_precisely_align.setFont(font) self.pushButton_precisely_align.setFont(font)
self.horizontalLayout_4.addWidget(self.pushButton_precisely_align) self.horizontalLayout_4.addWidget(self.pushButton_precisely_align)
self.pushButton_cut_PSG = QPushButton(self.centralwidget) self.pushButton_cut_PSG = QPushButton(self.centralwidget)
self.pushButton_cut_PSG.setObjectName(u"pushButton_cut_PSG") self.pushButton_cut_PSG.setObjectName(u"pushButton_cut_PSG")
sizePolicy1.setHeightForWidth(self.pushButton_cut_PSG.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_cut_PSG.sizePolicy().hasHeightForWidth())
self.pushButton_cut_PSG.setSizePolicy(sizePolicy1) self.pushButton_cut_PSG.setSizePolicy(sizePolicy2)
self.pushButton_cut_PSG.setFont(font) self.pushButton_cut_PSG.setFont(font)
self.horizontalLayout_4.addWidget(self.pushButton_cut_PSG) self.horizontalLayout_4.addWidget(self.pushButton_cut_PSG)
@ -181,32 +215,32 @@ class Ui_Signal_Label(object):
self.pushButton_artifact_label = QPushButton(self.centralwidget) self.pushButton_artifact_label = QPushButton(self.centralwidget)
self.pushButton_artifact_label.setObjectName(u"pushButton_artifact_label") self.pushButton_artifact_label.setObjectName(u"pushButton_artifact_label")
sizePolicy1.setHeightForWidth(self.pushButton_artifact_label.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_artifact_label.sizePolicy().hasHeightForWidth())
self.pushButton_artifact_label.setSizePolicy(sizePolicy1) self.pushButton_artifact_label.setSizePolicy(sizePolicy2)
self.pushButton_artifact_label.setFont(font) self.pushButton_artifact_label.setFont(font)
self.verticalLayout.addWidget(self.pushButton_artifact_label) self.verticalLayout.addWidget(self.pushButton_artifact_label)
self.pushButton_bcg_quality_label = QPushButton(self.centralwidget) self.pushButton_bcg_quality_label = QPushButton(self.centralwidget)
self.pushButton_bcg_quality_label.setObjectName(u"pushButton_bcg_quality_label") self.pushButton_bcg_quality_label.setObjectName(u"pushButton_bcg_quality_label")
sizePolicy1.setHeightForWidth(self.pushButton_bcg_quality_label.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_bcg_quality_label.sizePolicy().hasHeightForWidth())
self.pushButton_bcg_quality_label.setSizePolicy(sizePolicy1) self.pushButton_bcg_quality_label.setSizePolicy(sizePolicy2)
self.pushButton_bcg_quality_label.setFont(font) self.pushButton_bcg_quality_label.setFont(font)
self.verticalLayout.addWidget(self.pushButton_bcg_quality_label) self.verticalLayout.addWidget(self.pushButton_bcg_quality_label)
self.pushButton_resp_quality_label = QPushButton(self.centralwidget) self.pushButton_resp_quality_label = QPushButton(self.centralwidget)
self.pushButton_resp_quality_label.setObjectName(u"pushButton_resp_quality_label") self.pushButton_resp_quality_label.setObjectName(u"pushButton_resp_quality_label")
sizePolicy1.setHeightForWidth(self.pushButton_resp_quality_label.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_resp_quality_label.sizePolicy().hasHeightForWidth())
self.pushButton_resp_quality_label.setSizePolicy(sizePolicy1) self.pushButton_resp_quality_label.setSizePolicy(sizePolicy2)
self.pushButton_resp_quality_label.setFont(font) self.pushButton_resp_quality_label.setFont(font)
self.verticalLayout.addWidget(self.pushButton_resp_quality_label) self.verticalLayout.addWidget(self.pushButton_resp_quality_label)
self.pushButton_SA_label = QPushButton(self.centralwidget) self.pushButton_SA_label = QPushButton(self.centralwidget)
self.pushButton_SA_label.setObjectName(u"pushButton_SA_label") self.pushButton_SA_label.setObjectName(u"pushButton_SA_label")
sizePolicy1.setHeightForWidth(self.pushButton_SA_label.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.pushButton_SA_label.sizePolicy().hasHeightForWidth())
self.pushButton_SA_label.setSizePolicy(sizePolicy1) self.pushButton_SA_label.setSizePolicy(sizePolicy2)
self.pushButton_SA_label.setFont(font) self.pushButton_SA_label.setFont(font)
self.verticalLayout.addWidget(self.pushButton_SA_label) self.verticalLayout.addWidget(self.pushButton_SA_label)
@ -237,6 +271,7 @@ class Ui_Signal_Label(object):
def retranslateUi(self, Signal_Label): def retranslateUi(self, Signal_Label):
Signal_Label.setWindowTitle(QCoreApplication.translate("Signal_Label", u"Signal_Label", None)) Signal_Label.setWindowTitle(QCoreApplication.translate("Signal_Label", u"Signal_Label", None))
self.label.setText(QCoreApplication.translate("Signal_Label", u"\u6570\u636e\u6839\u76ee\u5f55\uff1a", None)) self.label.setText(QCoreApplication.translate("Signal_Label", u"\u6570\u636e\u6839\u76ee\u5f55\uff1a", None))
self.checkBox_darkmode.setText(QCoreApplication.translate("Signal_Label", u"\u6df1\u8272\u6a21\u5f0f\u5f00\u5173", None))
self.pushButton_open.setText(QCoreApplication.translate("Signal_Label", u"\u6253\u5f00", None)) self.pushButton_open.setText(QCoreApplication.translate("Signal_Label", u"\u6253\u5f00", None))
self.pushButton_approximately_align.setText(QCoreApplication.translate("Signal_Label", u"\u6570\u636e\u7c97\u540c\u6b65", None)) self.pushButton_approximately_align.setText(QCoreApplication.translate("Signal_Label", u"\u6570\u636e\u7c97\u540c\u6b65", None))
self.pushButton_preprocess_BCG.setText(QCoreApplication.translate("Signal_Label", u"BCG\u7684\u9884\u5904\u7406", None)) self.pushButton_preprocess_BCG.setText(QCoreApplication.translate("Signal_Label", u"BCG\u7684\u9884\u5904\u7406", None))

View File

@ -24,9 +24,9 @@
<item row="0" column="0"> <item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,1,1,1,1,1,1,1,1,1"> <layout class="QVBoxLayout" name="verticalLayout" stretch="1,1,1,1,1,1,1,1,1,1">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout" stretch="30,1,8">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,0,0">
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
@ -40,10 +40,62 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPlainTextEdit" name="plainTextEdit_root_path"/> <widget class="QPlainTextEdit" name="plainTextEdit_root_path">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<spacer name="horizontalSpacer">
<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>
<widget class="QCheckBox" name="checkBox_darkmode">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>深色模式开关</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</item> </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>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
@ -86,6 +138,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>

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.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,17 +16,18 @@ 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 (QAbstractSpinBox, QApplication, QGridLayout, QGroupBox, from PySide6.QtWidgets import (QAbstractSpinBox, QApplication, QCheckBox, QGridLayout,
QHBoxLayout, QLabel, QMainWindow, QPushButton, QGroupBox, QHBoxLayout, QLabel, QMainWindow,
QRadioButton, QSizePolicy, QSpacerItem, QSpinBox, QPushButton, QRadioButton, QSizePolicy, QSpacerItem,
QStatusBar, QTextBrowser, QVBoxLayout, QWidget) QSpinBox, QStatusBar, QTextBrowser, QVBoxLayout,
QWidget)
class Ui_MainWindow_precisely_align(object): class Ui_MainWindow_precisely_align(object):
def setupUi(self, MainWindow_precisely_align): def setupUi(self, MainWindow_precisely_align):
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)
@ -68,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)
@ -96,6 +128,38 @@ class Ui_MainWindow_precisely_align(object):
self.groupBox_args.setObjectName(u"groupBox_args") self.groupBox_args.setObjectName(u"groupBox_args")
self.verticalLayout_5 = QVBoxLayout(self.groupBox_args) self.verticalLayout_5 = QVBoxLayout(self.groupBox_args)
self.verticalLayout_5.setObjectName(u"verticalLayout_5") self.verticalLayout_5.setObjectName(u"verticalLayout_5")
self.groupBox_6 = QGroupBox(self.groupBox_args)
self.groupBox_6.setObjectName(u"groupBox_6")
self.horizontalLayout = QHBoxLayout(self.groupBox_6)
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.checkBox_ECG_autoset = QCheckBox(self.groupBox_6)
self.checkBox_ECG_autoset.setObjectName(u"checkBox_ECG_autoset")
self.checkBox_ECG_autoset.setChecked(True)
self.horizontalLayout.addWidget(self.checkBox_ECG_autoset)
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Minimum)
self.horizontalLayout.addItem(self.horizontalSpacer)
self.label_17 = QLabel(self.groupBox_6)
self.label_17.setObjectName(u"label_17")
self.label_17.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter)
self.horizontalLayout.addWidget(self.label_17)
self.spinBox_ECG_expend_second = QSpinBox(self.groupBox_6)
self.spinBox_ECG_expend_second.setObjectName(u"spinBox_ECG_expend_second")
self.spinBox_ECG_expend_second.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter)
self.spinBox_ECG_expend_second.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons)
self.spinBox_ECG_expend_second.setMaximum(1000000)
self.spinBox_ECG_expend_second.setValue(30)
self.horizontalLayout.addWidget(self.spinBox_ECG_expend_second)
self.verticalLayout_5.addWidget(self.groupBox_6)
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.verticalLayout_2 = QVBoxLayout(self.groupBox_2) self.verticalLayout_2 = QVBoxLayout(self.groupBox_2)
@ -105,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)
@ -114,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)
@ -130,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)
@ -138,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)
@ -147,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)
@ -156,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)
@ -188,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)
@ -198,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)
@ -207,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)
@ -223,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)
@ -232,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)
@ -270,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)
@ -279,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)
@ -293,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)
@ -303,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)
@ -312,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)
@ -321,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)
@ -358,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)
@ -375,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)
@ -384,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)
@ -394,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)
@ -403,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)
@ -426,13 +560,50 @@ 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(1, 2)
self.verticalLayout_5.setStretch(2, 2)
self.verticalLayout_5.setStretch(3, 2)
self.verticalLayout_5.setStretch(4, 2)
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)
@ -488,8 +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, 2) 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)
@ -514,9 +685,16 @@ 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))
self.groupBox_6.setTitle(QCoreApplication.translate("MainWindow_precisely_align", u"ECG\u81ea\u52a8\u83b7\u53d6\u533a\u95f4", None))
self.checkBox_ECG_autoset.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u81ea\u52a8\u83b7\u53d6ECG\u533a\u95f4", None))
self.label_17.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u62d3\u5c55\u79d2\u6570\uff1a", None))
self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_precisely_align", u"\u524d\u6bb5BCG\u533a\u95f4\u5750\u6807\u53d6\u503c", None)) self.groupBox_2.setTitle(QCoreApplication.translate("MainWindow_precisely_align", u"\u524d\u6bb5BCG\u533a\u95f4\u5750\u6807\u53d6\u503c", None))
self.radioButton_BCG_front.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u524d\u6bb5BCG", None)) self.radioButton_BCG_front.setText(QCoreApplication.translate("MainWindow_precisely_align", u"\u524d\u6bb5BCG", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_precisely_align", u"~", None)) self.label_4.setText(QCoreApplication.translate("MainWindow_precisely_align", u"~", None))
@ -541,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,2,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,68 @@
<property name="title"> <property name="title">
<string>参数输入</string> <string>参数输入</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="0,0,0,0"> <layout class="QVBoxLayout" name="verticalLayout_5" stretch="2,2,2,2,2,0">
<item>
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>ECG自动获取区间</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="checkBox_ECG_autoset">
<property name="text">
<string>自动获取ECG区间</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Policy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_17">
<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="QSpinBox" name="spinBox_ECG_expend_second">
<property name="alignment">
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
</property>
<property name="maximum">
<number>1000000</number>
</property>
<property name="value">
<number>30</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item> <item>
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="groupBox_2">
<property name="title"> <property name="title">
@ -116,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">
@ -134,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">
@ -167,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">
@ -185,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">
@ -203,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">
@ -221,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">
@ -236,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">
@ -248,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">
@ -276,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">
@ -297,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">
@ -315,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">
@ -348,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">
@ -366,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">
@ -381,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">
@ -396,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">
@ -408,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">
@ -433,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">
@ -451,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">
@ -481,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">
@ -502,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">
@ -520,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">
@ -538,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">
@ -553,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">
@ -565,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">
@ -602,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">
@ -617,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">
@ -638,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">
@ -656,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">
@ -677,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">
@ -695,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">
@ -710,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">
@ -722,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">
@ -737,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

@ -0,0 +1,579 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'MainWindow_resp_quality_label.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, QCheckBox, QDoubleSpinBox, QGridLayout,
QGroupBox, QHBoxLayout, QHeaderView, QLabel,
QLineEdit, QMainWindow, QPushButton, QRadioButton,
QSizePolicy, QSpacerItem, QStatusBar, QTableWidget,
QTableWidgetItem, QTextBrowser, QVBoxLayout, QWidget)
class Ui_MainWindow_resp_quality_label(object):
def setupUi(self, MainWindow_resp_quality_label):
if not MainWindow_resp_quality_label.objectName():
MainWindow_resp_quality_label.setObjectName(u"MainWindow_resp_quality_label")
MainWindow_resp_quality_label.resize(1920, 1080)
self.centralwidget = QWidget(MainWindow_resp_quality_label)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.groupBox_canvas = QGroupBox(self.centralwidget)
self.groupBox_canvas.setObjectName(u"groupBox_canvas")
font = QFont()
font.setPointSize(10)
self.groupBox_canvas.setFont(font)
self.verticalLayout = QVBoxLayout(self.groupBox_canvas)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout_canvas = QVBoxLayout()
self.verticalLayout_canvas.setObjectName(u"verticalLayout_canvas")
self.verticalLayout.addLayout(self.verticalLayout_canvas)
self.gridLayout.addWidget(self.groupBox_canvas, 0, 1, 1, 1)
self.groupBox_left = QGroupBox(self.centralwidget)
self.groupBox_left.setObjectName(u"groupBox_left")
self.groupBox_left.setFont(font)
self.verticalLayout_2 = QVBoxLayout(self.groupBox_left)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.pushButton_input_setting = QPushButton(self.groupBox_left)
self.pushButton_input_setting.setObjectName(u"pushButton_input_setting")
sizePolicy = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_input_setting.sizePolicy().hasHeightForWidth())
self.pushButton_input_setting.setSizePolicy(sizePolicy)
font1 = QFont()
font1.setPointSize(12)
self.pushButton_input_setting.setFont(font1)
self.horizontalLayout.addWidget(self.pushButton_input_setting)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.gridLayout_5 = QGridLayout()
self.gridLayout_5.setObjectName(u"gridLayout_5")
self.pushButton_calculate_peaks = QPushButton(self.groupBox_left)
self.pushButton_calculate_peaks.setObjectName(u"pushButton_calculate_peaks")
sizePolicy.setHeightForWidth(self.pushButton_calculate_peaks.sizePolicy().hasHeightForWidth())
self.pushButton_calculate_peaks.setSizePolicy(sizePolicy)
self.pushButton_calculate_peaks.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_calculate_peaks, 1, 0, 1, 1)
self.pushButton_input_and_calculate_peaks = QPushButton(self.groupBox_left)
self.pushButton_input_and_calculate_peaks.setObjectName(u"pushButton_input_and_calculate_peaks")
sizePolicy.setHeightForWidth(self.pushButton_input_and_calculate_peaks.sizePolicy().hasHeightForWidth())
self.pushButton_input_and_calculate_peaks.setSizePolicy(sizePolicy)
self.pushButton_input_and_calculate_peaks.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_input_and_calculate_peaks, 0, 0, 1, 1)
self.pushButton_calculate_peaks_save = QPushButton(self.groupBox_left)
self.pushButton_calculate_peaks_save.setObjectName(u"pushButton_calculate_peaks_save")
sizePolicy.setHeightForWidth(self.pushButton_calculate_peaks_save.sizePolicy().hasHeightForWidth())
self.pushButton_calculate_peaks_save.setSizePolicy(sizePolicy)
self.pushButton_calculate_peaks_save.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_calculate_peaks_save, 2, 0, 1, 1)
self.pushButton_input_and_label = QPushButton(self.groupBox_left)
self.pushButton_input_and_label.setObjectName(u"pushButton_input_and_label")
sizePolicy.setHeightForWidth(self.pushButton_input_and_label.sizePolicy().hasHeightForWidth())
self.pushButton_input_and_label.setSizePolicy(sizePolicy)
self.pushButton_input_and_label.setFont(font1)
self.gridLayout_5.addWidget(self.pushButton_input_and_label, 0, 1, 3, 1)
self.verticalLayout_2.addLayout(self.gridLayout_5)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer)
self.groupBox_autoqualitylabel_options = QGroupBox(self.groupBox_left)
self.groupBox_autoqualitylabel_options.setObjectName(u"groupBox_autoqualitylabel_options")
self.gridLayout_3 = QGridLayout(self.groupBox_autoqualitylabel_options)
self.gridLayout_3.setObjectName(u"gridLayout_3")
self.label_6 = QLabel(self.groupBox_autoqualitylabel_options)
self.label_6.setObjectName(u"label_6")
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.label_6.sizePolicy().hasHeightForWidth())
self.label_6.setSizePolicy(sizePolicy1)
self.label_6.setFont(font1)
self.gridLayout_3.addWidget(self.label_6, 1, 0, 1, 1)
self.label_5 = QLabel(self.groupBox_autoqualitylabel_options)
self.label_5.setObjectName(u"label_5")
sizePolicy1.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
self.label_5.setSizePolicy(sizePolicy1)
self.label_5.setFont(font1)
self.gridLayout_3.addWidget(self.label_5, 0, 0, 1, 1)
self.doubleSpinBox_quality_threshold1 = QDoubleSpinBox(self.groupBox_autoqualitylabel_options)
self.doubleSpinBox_quality_threshold1.setObjectName(u"doubleSpinBox_quality_threshold1")
self.doubleSpinBox_quality_threshold1.setFont(font1)
self.doubleSpinBox_quality_threshold1.setMaximum(1.000000000000000)
self.doubleSpinBox_quality_threshold1.setSingleStep(0.100000000000000)
self.gridLayout_3.addWidget(self.doubleSpinBox_quality_threshold1, 0, 1, 1, 1)
self.doubleSpinBox_quality_threshold2 = QDoubleSpinBox(self.groupBox_autoqualitylabel_options)
self.doubleSpinBox_quality_threshold2.setObjectName(u"doubleSpinBox_quality_threshold2")
self.doubleSpinBox_quality_threshold2.setFont(font1)
self.doubleSpinBox_quality_threshold2.setMaximum(1.000000000000000)
self.doubleSpinBox_quality_threshold2.setSingleStep(0.100000000000000)
self.gridLayout_3.addWidget(self.doubleSpinBox_quality_threshold2, 1, 1, 1, 1)
self.pushButton_autoqualitylabel_recalculate = QPushButton(self.groupBox_autoqualitylabel_options)
self.pushButton_autoqualitylabel_recalculate.setObjectName(u"pushButton_autoqualitylabel_recalculate")
sizePolicy.setHeightForWidth(self.pushButton_autoqualitylabel_recalculate.sizePolicy().hasHeightForWidth())
self.pushButton_autoqualitylabel_recalculate.setSizePolicy(sizePolicy)
self.pushButton_autoqualitylabel_recalculate.setFont(font1)
self.gridLayout_3.addWidget(self.pushButton_autoqualitylabel_recalculate, 2, 1, 1, 1)
self.verticalLayout_2.addWidget(self.groupBox_autoqualitylabel_options)
self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.groupBox_artifact_type = QGroupBox(self.groupBox_left)
self.groupBox_artifact_type.setObjectName(u"groupBox_artifact_type")
self.verticalLayout_3 = QVBoxLayout(self.groupBox_artifact_type)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.checkBox_allin = QCheckBox(self.groupBox_artifact_type)
self.checkBox_allin.setObjectName(u"checkBox_allin")
font2 = QFont()
font2.setPointSize(20)
self.checkBox_allin.setFont(font2)
self.checkBox_allin.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_allin)
self.checkBox_type1 = QCheckBox(self.groupBox_artifact_type)
self.checkBox_type1.setObjectName(u"checkBox_type1")
self.checkBox_type1.setFont(font1)
self.checkBox_type1.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_type1)
self.checkBox_type2 = QCheckBox(self.groupBox_artifact_type)
self.checkBox_type2.setObjectName(u"checkBox_type2")
self.checkBox_type2.setFont(font1)
self.checkBox_type2.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_type2)
self.checkBox_type3 = QCheckBox(self.groupBox_artifact_type)
self.checkBox_type3.setObjectName(u"checkBox_type3")
self.checkBox_type3.setFont(font1)
self.checkBox_type3.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_type3)
self.checkBox_type4 = QCheckBox(self.groupBox_artifact_type)
self.checkBox_type4.setObjectName(u"checkBox_type4")
self.checkBox_type4.setFont(font1)
self.checkBox_type4.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_type4)
self.checkBox_type5 = QCheckBox(self.groupBox_artifact_type)
self.checkBox_type5.setObjectName(u"checkBox_type5")
self.checkBox_type5.setFont(font1)
self.checkBox_type5.setChecked(True)
self.verticalLayout_3.addWidget(self.checkBox_type5)
self.horizontalLayout_2.addWidget(self.groupBox_artifact_type)
self.groupBox_findpeaks_options = QGroupBox(self.groupBox_left)
self.groupBox_findpeaks_options.setObjectName(u"groupBox_findpeaks_options")
self.gridLayout_2 = QGridLayout(self.groupBox_findpeaks_options)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.label_4 = QLabel(self.groupBox_findpeaks_options)
self.label_4.setObjectName(u"label_4")
sizePolicy1.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
self.label_4.setSizePolicy(sizePolicy1)
self.label_4.setFont(font1)
self.gridLayout_2.addWidget(self.label_4, 0, 0, 1, 1)
self.doubleSpinBox_findpeaks_min_interval = QDoubleSpinBox(self.groupBox_findpeaks_options)
self.doubleSpinBox_findpeaks_min_interval.setObjectName(u"doubleSpinBox_findpeaks_min_interval")
self.doubleSpinBox_findpeaks_min_interval.setFont(font1)
self.doubleSpinBox_findpeaks_min_interval.setMaximum(10000.000000000000000)
self.gridLayout_2.addWidget(self.doubleSpinBox_findpeaks_min_interval, 0, 1, 1, 1)
self.label_3 = QLabel(self.groupBox_findpeaks_options)
self.label_3.setObjectName(u"label_3")
sizePolicy1.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy1)
self.label_3.setFont(font1)
self.gridLayout_2.addWidget(self.label_3, 1, 0, 1, 1)
self.doubleSpinBox_findpeaks_min_height = QDoubleSpinBox(self.groupBox_findpeaks_options)
self.doubleSpinBox_findpeaks_min_height.setObjectName(u"doubleSpinBox_findpeaks_min_height")
self.doubleSpinBox_findpeaks_min_height.setFont(font1)
self.doubleSpinBox_findpeaks_min_height.setMaximum(10000.000000000000000)
self.gridLayout_2.addWidget(self.doubleSpinBox_findpeaks_min_height, 1, 1, 1, 1)
self.horizontalLayout_2.addWidget(self.groupBox_findpeaks_options)
self.horizontalLayout_2.setStretch(0, 2)
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
self.groupBox_threshold_setting = QGroupBox(self.groupBox_left)
self.groupBox_threshold_setting.setObjectName(u"groupBox_threshold_setting")
self.gridLayout_6 = QGridLayout(self.groupBox_threshold_setting)
self.gridLayout_6.setObjectName(u"gridLayout_6")
self.doubleSpinBox_fillterMode_custom_low = QDoubleSpinBox(self.groupBox_threshold_setting)
self.doubleSpinBox_fillterMode_custom_low.setObjectName(u"doubleSpinBox_fillterMode_custom_low")
self.doubleSpinBox_fillterMode_custom_low.setFont(font1)
self.doubleSpinBox_fillterMode_custom_low.setMaximum(1.000000000000000)
self.doubleSpinBox_fillterMode_custom_low.setSingleStep(0.100000000000000)
self.gridLayout_6.addWidget(self.doubleSpinBox_fillterMode_custom_low, 3, 1, 1, 1)
self.doubleSpinBox_fillterMode_custom_high = QDoubleSpinBox(self.groupBox_threshold_setting)
self.doubleSpinBox_fillterMode_custom_high.setObjectName(u"doubleSpinBox_fillterMode_custom_high")
self.doubleSpinBox_fillterMode_custom_high.setFont(font1)
self.doubleSpinBox_fillterMode_custom_high.setMaximum(1.000000000000000)
self.doubleSpinBox_fillterMode_custom_high.setSingleStep(0.100000000000000)
self.gridLayout_6.addWidget(self.doubleSpinBox_fillterMode_custom_high, 3, 3, 1, 1)
self.label_2 = QLabel(self.groupBox_threshold_setting)
self.label_2.setObjectName(u"label_2")
self.label_2.setFont(font1)
self.label_2.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_6.addWidget(self.label_2, 1, 1, 1, 1)
self.label = QLabel(self.groupBox_threshold_setting)
self.label.setObjectName(u"label")
self.label.setFont(font1)
self.label.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_6.addWidget(self.label, 1, 3, 1, 1)
self.radioButton_orgBcg_fillterMode_preset = QRadioButton(self.groupBox_threshold_setting)
self.radioButton_orgBcg_fillterMode_preset.setObjectName(u"radioButton_orgBcg_fillterMode_preset")
self.radioButton_orgBcg_fillterMode_preset.setFont(font1)
self.radioButton_orgBcg_fillterMode_preset.setChecked(True)
self.gridLayout_6.addWidget(self.radioButton_orgBcg_fillterMode_preset, 0, 0, 1, 1)
self.radioButton_orgBcg_fillterMode_custom = QRadioButton(self.groupBox_threshold_setting)
self.radioButton_orgBcg_fillterMode_custom.setObjectName(u"radioButton_orgBcg_fillterMode_custom")
self.radioButton_orgBcg_fillterMode_custom.setFont(font1)
self.gridLayout_6.addWidget(self.radioButton_orgBcg_fillterMode_custom, 3, 0, 1, 1)
self.label_7 = QLabel(self.groupBox_threshold_setting)
self.label_7.setObjectName(u"label_7")
self.label_7.setFont(font1)
self.label_7.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.gridLayout_6.addWidget(self.label_7, 3, 2, 1, 1)
self.pushButton_refilter_orgBcg = QPushButton(self.groupBox_threshold_setting)
self.pushButton_refilter_orgBcg.setObjectName(u"pushButton_refilter_orgBcg")
sizePolicy.setHeightForWidth(self.pushButton_refilter_orgBcg.sizePolicy().hasHeightForWidth())
self.pushButton_refilter_orgBcg.setSizePolicy(sizePolicy)
self.pushButton_refilter_orgBcg.setFont(font1)
self.gridLayout_6.addWidget(self.pushButton_refilter_orgBcg, 0, 2, 1, 2)
self.gridLayout_6.setColumnStretch(0, 2)
self.gridLayout_6.setColumnStretch(1, 2)
self.gridLayout_6.setColumnStretch(2, 1)
self.gridLayout_6.setColumnStretch(3, 2)
self.verticalLayout_2.addWidget(self.groupBox_threshold_setting)
self.verticalSpacer_4 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(self.verticalSpacer_4)
self.groupBox_label_operation = QGroupBox(self.groupBox_left)
self.groupBox_label_operation.setObjectName(u"groupBox_label_operation")
self.gridLayout_7 = QGridLayout(self.groupBox_label_operation)
self.gridLayout_7.setObjectName(u"gridLayout_7")
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.setEnabled(False)
self.lineEdit_current_part_num.setFont(font1)
self.gridLayout_7.addWidget(self.lineEdit_current_part_num, 1, 1, 1, 1)
self.label_8 = QLabel(self.groupBox_label_operation)
self.label_8.setObjectName(u"label_8")
sizePolicy1.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth())
self.label_8.setSizePolicy(sizePolicy1)
self.label_8.setFont(font1)
self.label_8.setAlignment(Qt.AlignmentFlag.AlignCenter)
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.setObjectName(u"gridLayout_8")
self.pushButton_invalid = QPushButton(self.groupBox_label_operation)
self.pushButton_invalid.setObjectName(u"pushButton_invalid")
sizePolicy.setHeightForWidth(self.pushButton_invalid.sizePolicy().hasHeightForWidth())
self.pushButton_invalid.setSizePolicy(sizePolicy)
self.pushButton_invalid.setFont(font1)
self.gridLayout_8.addWidget(self.pushButton_invalid, 0, 1, 1, 1)
self.pushButton_reset = QPushButton(self.groupBox_label_operation)
self.pushButton_reset.setObjectName(u"pushButton_reset")
sizePolicy.setHeightForWidth(self.pushButton_reset.sizePolicy().hasHeightForWidth())
self.pushButton_reset.setSizePolicy(sizePolicy)
self.pushButton_reset.setFont(font1)
self.gridLayout_8.addWidget(self.pushButton_reset, 0, 2, 1, 1)
self.pushButton_valid = QPushButton(self.groupBox_label_operation)
self.pushButton_valid.setObjectName(u"pushButton_valid")
sizePolicy.setHeightForWidth(self.pushButton_valid.sizePolicy().hasHeightForWidth())
self.pushButton_valid.setSizePolicy(sizePolicy)
self.pushButton_valid.setFont(font1)
self.gridLayout_8.addWidget(self.pushButton_valid, 0, 0, 1, 1)
self.pushButton_prev = QPushButton(self.groupBox_label_operation)
self.pushButton_prev.setObjectName(u"pushButton_prev")
sizePolicy.setHeightForWidth(self.pushButton_prev.sizePolicy().hasHeightForWidth())
self.pushButton_prev.setSizePolicy(sizePolicy)
self.pushButton_prev.setFont(font1)
self.gridLayout_8.addWidget(self.pushButton_prev, 1, 1, 1, 1)
self.pushButton_next = QPushButton(self.groupBox_label_operation)
self.pushButton_next.setObjectName(u"pushButton_next")
sizePolicy.setHeightForWidth(self.pushButton_next.sizePolicy().hasHeightForWidth())
self.pushButton_next.setSizePolicy(sizePolicy)
self.pushButton_next.setFont(font1)
self.gridLayout_8.addWidget(self.pushButton_next, 1, 2, 1, 1)
self.pushButton_save = QPushButton(self.groupBox_label_operation)
self.pushButton_save.setObjectName(u"pushButton_save")
self.pushButton_save.setFont(font1)
self.gridLayout_8.addWidget(self.pushButton_save, 1, 0, 1, 1)
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.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, 2)
self.verticalLayout_2.setStretch(1, 3)
self.verticalLayout_2.setStretch(2, 1)
self.verticalLayout_2.setStretch(3, 3)
self.verticalLayout_2.setStretch(6, 1)
self.verticalLayout_2.setStretch(7, 6)
self.verticalLayout_2.setStretch(8, 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.groupBox = QGroupBox(self.groupBox_right)
self.groupBox.setObjectName(u"groupBox")
self.gridLayout_9 = QGridLayout(self.groupBox)
self.gridLayout_9.setObjectName(u"gridLayout_9")
self.verticalLayout_spectrum_display = QVBoxLayout()
self.verticalLayout_spectrum_display.setObjectName(u"verticalLayout_spectrum_display")
self.gridLayout_9.addLayout(self.verticalLayout_spectrum_display, 0, 0, 1, 1)
self.gridLayout_4.addWidget(self.groupBox, 0, 0, 1, 1)
self.groupBox_label = QGroupBox(self.groupBox_right)
self.groupBox_label.setObjectName(u"groupBox_label")
self.gridLayout_10 = QGridLayout(self.groupBox_label)
self.gridLayout_10.setObjectName(u"gridLayout_10")
self.label_11 = QLabel(self.groupBox_label)
self.label_11.setObjectName(u"label_11")
self.label_11.setFont(font1)
self.gridLayout_10.addWidget(self.label_11, 2, 0, 1, 1)
self.label_9 = QLabel(self.groupBox_label)
self.label_9.setObjectName(u"label_9")
self.label_9.setFont(font1)
self.gridLayout_10.addWidget(self.label_9, 0, 0, 1, 1)
self.lineEdit_filter_labeled = QLineEdit(self.groupBox_label)
self.lineEdit_filter_labeled.setObjectName(u"lineEdit_filter_labeled")
self.lineEdit_filter_labeled.setFont(font1)
self.gridLayout_10.addWidget(self.lineEdit_filter_labeled, 0, 1, 1, 1)
self.lineEdit_filter_tobelabeled = QLineEdit(self.groupBox_label)
self.lineEdit_filter_tobelabeled.setObjectName(u"lineEdit_filter_tobelabeled")
self.lineEdit_filter_tobelabeled.setFont(font1)
self.gridLayout_10.addWidget(self.lineEdit_filter_tobelabeled, 2, 1, 1, 1)
self.tableWidget_labeled = QTableWidget(self.groupBox_label)
if (self.tableWidget_labeled.columnCount() < 2):
self.tableWidget_labeled.setColumnCount(2)
self.tableWidget_labeled.setObjectName(u"tableWidget_labeled")
self.tableWidget_labeled.setColumnCount(2)
self.gridLayout_10.addWidget(self.tableWidget_labeled, 1, 0, 1, 2)
self.tableWidget_tobelabeled = QTableWidget(self.groupBox_label)
if (self.tableWidget_tobelabeled.columnCount() < 2):
self.tableWidget_tobelabeled.setColumnCount(2)
self.tableWidget_tobelabeled.setObjectName(u"tableWidget_tobelabeled")
self.tableWidget_tobelabeled.setColumnCount(2)
self.gridLayout_10.addWidget(self.tableWidget_tobelabeled, 3, 0, 1, 2)
self.gridLayout_4.addWidget(self.groupBox_label, 1, 0, 1, 1)
self.gridLayout_4.setRowStretch(0, 5)
self.gridLayout_4.setRowStretch(1, 4)
self.gridLayout.addWidget(self.groupBox_right, 0, 2, 1, 1)
self.gridLayout.setColumnStretch(0, 2)
self.gridLayout.setColumnStretch(1, 7)
self.gridLayout.setColumnStretch(2, 2)
MainWindow_resp_quality_label.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_resp_quality_label)
self.statusbar.setObjectName(u"statusbar")
MainWindow_resp_quality_label.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_resp_quality_label)
QMetaObject.connectSlotsByName(MainWindow_resp_quality_label)
# setupUi
def retranslateUi(self, MainWindow_resp_quality_label):
MainWindow_resp_quality_label.setWindowTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u547c\u5438\u53ef\u7528\u6027\u53ca\u95f4\u671f\u6807\u6ce8", None))
self.groupBox_canvas.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u7ed8\u56fe\u533a", None))
self.groupBox_left.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u547c\u5438\u53ef\u7528\u6027\u53ca\u95f4\u671f\u6807\u6ce8", None))
self.pushButton_input_setting.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_calculate_peaks.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u8ba1\u7b97\u5cf0\u503c\u5e76\u7ed8\u5236", None))
self.pushButton_input_and_calculate_peaks.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5bfc\u5165\u5e76\u7b97\u6cd5\u5b9a\u4f4d\u5cf0\u503c", None))
self.pushButton_calculate_peaks_save.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4fdd\u5b58\u5cf0\u503c\u7ed3\u679c", None))
self.pushButton_input_and_label.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5bfc\u5165\u5e76\u5f00\u59cb\u6807\u6ce8", None))
self.groupBox_autoqualitylabel_options.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4eba\u5de5\u6807\u6ce8\u9608\u503c\u8bbe\u7f6e", None))
self.label_6.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"threshold[1]", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"threshold[0]", None))
self.pushButton_autoqualitylabel_recalculate.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5e94\u7528\u5e76\u8ba1\u7b97", None))
self.groupBox_artifact_type.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4f53\u52a8\u7c7b\u578b", None))
self.checkBox_allin.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5168\u9009", None))
self.checkBox_type1.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u7c7b\u578b1-\u5267\u70c8\u4f53\u52a8", None))
self.checkBox_type2.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u7c7b\u578b2-\u8109\u51b2\u4f53\u52a8", None))
self.checkBox_type3.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u7c7b\u578b3-\u5e38\u89c4\u4f53\u52a8", None))
self.checkBox_type4.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u7c7b\u578b4-\u7591\u4f3c\u9f3e\u58f0", None))
self.checkBox_type5.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u7c7b\u578b5-\u79bb\u5e8a", None))
self.groupBox_findpeaks_options.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u5bfb\u5cf0\u53c2\u6570\u8bbe\u7f6e", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u6700\u5c0f\u95f4\u9694", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u6700\u5c0f\u9ad8\u5ea6", None))
self.groupBox_threshold_setting.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"OrgBCG\u5e26\u901a\u6ee4\u6ce2\u9891\u7387\u8bbe\u7f6e", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4e0b\u622a\u6b62\u9891\u7387", None))
self.label.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4e0a\u622a\u6b62\u9891\u7387", None))
self.radioButton_orgBcg_fillterMode_preset.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u9884\u8bbe", None))
self.radioButton_orgBcg_fillterMode_custom.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u81ea\u5b9a\u4e49", 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.groupBox_label_operation.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u6807\u6ce8\u64cd\u4f5c", 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_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_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_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_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_label.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u4fe1\u53f7\u7247\u6bb5\u53ca\u8d28\u91cf\u6807\u7b7e", None))
self.label_11.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u8d28\u91cf\u672a\u6807\u6ce8\u7684\u4fe1\u53f7\u7247\u6bb5", None))
self.label_9.setText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u8d28\u91cf\u5df2\u6807\u6ce8\u7684\u4fe1\u53f7\u7247\u6bb5", None))
self.lineEdit_filter_labeled.setPlaceholderText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u7b5b\u9009\u5668", None))
self.lineEdit_filter_tobelabeled.setPlaceholderText(QCoreApplication.translate("MainWindow_resp_quality_label", u"\u7b5b\u9009\u5668", None))
# retranslateUi

View File

@ -0,0 +1,882 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow_resp_quality_label</class>
<widget class="QMainWindow" name="MainWindow_resp_quality_label">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1920</width>
<height>1080</height>
</rect>
</property>
<property name="windowTitle">
<string>呼吸可用性及间期标注</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout" columnstretch="2,7,2">
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_canvas">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>绘图区</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_canvas"/>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_left">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>呼吸可用性及间期标注</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="2,3,1,3,0,0,1,6,5">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="pushButton_input_setting">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>导入设置</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_5">
<item row="1" column="0">
<widget class="QPushButton" name="pushButton_calculate_peaks">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>计算峰值并绘制</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="pushButton_input_and_calculate_peaks">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>导入并算法定位峰值</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="pushButton_calculate_peaks_save">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>保存峰值结果</string>
</property>
</widget>
</item>
<item row="0" column="1" rowspan="3">
<widget class="QPushButton" name="pushButton_input_and_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>导入并开始标注</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_autoqualitylabel_options">
<property name="title">
<string>人工标注阈值设置</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<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>threshold[1]</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<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>threshold[0]</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_quality_threshold1">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_quality_threshold2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="pushButton_autoqualitylabel_recalculate">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>应用并计算</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="2,0">
<item>
<widget class="QGroupBox" name="groupBox_artifact_type">
<property name="title">
<string>体动类型</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QCheckBox" name="checkBox_allin">
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>全选</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_type1">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>类型1-剧烈体动</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_type2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>类型2-脉冲体动</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_type3">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>类型3-常规体动</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_type4">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>类型4-疑似鼾声</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_type5">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>类型5-离床</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_findpeaks_options">
<property name="title">
<string>寻峰参数设置</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>最小间隔</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_findpeaks_min_interval">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="maximum">
<double>10000.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>最小高度</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_findpeaks_min_height">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="maximum">
<double>10000.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_threshold_setting">
<property name="title">
<string>OrgBCG带通滤波频率设置</string>
</property>
<layout class="QGridLayout" name="gridLayout_6" columnstretch="2,2,1,2">
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_fillterMode_custom_low">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QDoubleSpinBox" name="doubleSpinBox_fillterMode_custom_high">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>下截止频率</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>上截止频率</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QRadioButton" name="radioButton_orgBcg_fillterMode_preset">
<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="3" column="0">
<widget class="QRadioButton" name="radioButton_orgBcg_fillterMode_custom">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>自定义</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_7">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>~</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2" colspan="2">
<widget class="QPushButton" name="pushButton_refilter_orgBcg">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>应用并计算</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_label_operation">
<property name="title">
<string>标注操作</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_current_part_num">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_8">
<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="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">
<item row="0" column="1">
<widget class="QPushButton" name="pushButton_invalid">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>不可用G</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="pushButton_reset">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>重置H</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="pushButton_valid">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>可用F</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton_prev">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>上一段(A)</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButton_next">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>下一段(D)</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pushButton_save">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>手动保存</string>
</property>
</widget>
</item>
</layout>
</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>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>日志</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QTextBrowser" name="textBrowser_info"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="2">
<widget class="QGroupBox" name="groupBox_right">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>呼吸可用性及间期标注</string>
</property>
<layout class="QGridLayout" name="gridLayout_4" rowstretch="5,4">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>频谱</string>
</property>
<layout class="QGridLayout" name="gridLayout_9">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_spectrum_display"/>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_label">
<property name="title">
<string>信号片段及质量标签</string>
</property>
<layout class="QGridLayout" name="gridLayout_10">
<item row="2" column="0">
<widget class="QLabel" name="label_11">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>质量未标注的信号片段</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>质量已标注的信号片段</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_filter_labeled">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="placeholderText">
<string>筛选器</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_filter_tobelabeled">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="placeholderText">
<string>筛选器</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QTableWidget" name="tableWidget_labeled">
<property name="columnCount">
<number>2</number>
</property>
<column/>
<column/>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QTableWidget" name="tableWidget_tobelabeled">
<property name="columnCount">
<number>2</number>
</property>
<column/>
<column/>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -274,6 +274,18 @@ class Ui_MainWindow_SA_label_input_setting(object):
self.gridLayout_2.addWidget(self.groupBox_file_path_input_artifact, 5, 0, 1, 1) self.gridLayout_2.addWidget(self.groupBox_file_path_input_artifact, 5, 0, 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.gridLayout.addWidget(self.groupBox, 0, 0, 1, 4) self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 4)
@ -328,6 +340,8 @@ class Ui_MainWindow_SA_label_input_setting(object):
self.groupBox_file_path_input_artifact.setTitle(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u4f53\u52a8Artifact_a\u8def\u5f84", None)) 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.setPlainText("")
self.plainTextEdit_file_path_input_artifact.setPlaceholderText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) 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_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.pushButton_confirm.setText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u786e\u5b9a", None)) self.pushButton_confirm.setText(QCoreApplication.translate("MainWindow_SA_label_input_setting", u"\u786e\u5b9a", None))
# retranslateUi # retranslateUi

View File

@ -389,6 +389,22 @@
</layout> </layout>
</widget> </widget>
</item> </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>
</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

@ -0,0 +1,178 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'bcg_quality_label_input_setting.ui'
##
## Created by: Qt User Interface Compiler version 6.8.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QGridLayout, QGroupBox, QHBoxLayout,
QLabel, QMainWindow, QPlainTextEdit, QPushButton,
QRadioButton, QSizePolicy, QSpacerItem, QSpinBox,
QStatusBar, QVBoxLayout, QWidget)
class Ui_MainWindow_bcg_quality_label_input_setting(object):
def setupUi(self, MainWindow_bcg_quality_label_input_setting):
if not MainWindow_bcg_quality_label_input_setting.objectName():
MainWindow_bcg_quality_label_input_setting.setObjectName(u"MainWindow_bcg_quality_label_input_setting")
MainWindow_bcg_quality_label_input_setting.resize(540, 540)
self.centralwidget = QWidget(MainWindow_bcg_quality_label_input_setting)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.pushButton_cancel = QPushButton(self.centralwidget)
self.pushButton_cancel.setObjectName(u"pushButton_cancel")
font = QFont()
font.setPointSize(12)
self.pushButton_cancel.setFont(font)
self.gridLayout.addWidget(self.pushButton_cancel, 1, 3, 1, 1)
self.groupBox = QGroupBox(self.centralwidget)
self.groupBox.setObjectName(u"groupBox")
font1 = QFont()
font1.setPointSize(10)
self.groupBox.setFont(font1)
self.verticalLayout_2 = QVBoxLayout(self.groupBox)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.groupBox_file_path_input_signal_BCG = QGroupBox(self.groupBox)
self.groupBox_file_path_input_signal_BCG.setObjectName(u"groupBox_file_path_input_signal_BCG")
self.verticalLayout_5 = QVBoxLayout(self.groupBox_file_path_input_signal_BCG)
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_BCG)
self.label_2.setObjectName(u"label_2")
self.label_2.setFont(font)
self.horizontalLayout_2.addWidget(self.label_2)
self.spinBox_input_freq_signal_BCG = QSpinBox(self.groupBox_file_path_input_signal_BCG)
self.spinBox_input_freq_signal_BCG.setObjectName(u"spinBox_input_freq_signal_BCG")
self.spinBox_input_freq_signal_BCG.setFont(font)
self.spinBox_input_freq_signal_BCG.setMinimum(1)
self.spinBox_input_freq_signal_BCG.setMaximum(1000000)
self.horizontalLayout_2.addWidget(self.spinBox_input_freq_signal_BCG)
self.verticalLayout_5.addLayout(self.horizontalLayout_2)
self.plainTextEdit_file_path_input_signal_BCG = QPlainTextEdit(self.groupBox_file_path_input_signal_BCG)
self.plainTextEdit_file_path_input_signal_BCG.setObjectName(u"plainTextEdit_file_path_input_signal_BCG")
self.verticalLayout_5.addWidget(self.plainTextEdit_file_path_input_signal_BCG)
self.verticalLayout_5.setStretch(0, 1)
self.verticalLayout_5.setStretch(1, 2)
self.verticalLayout_2.addWidget(self.groupBox_file_path_input_signal_BCG)
self.groupBox_file_path_input_artifact = QGroupBox(self.groupBox)
self.groupBox_file_path_input_artifact.setObjectName(u"groupBox_file_path_input_artifact")
self.verticalLayout_6 = QVBoxLayout(self.groupBox_file_path_input_artifact)
self.verticalLayout_6.setObjectName(u"verticalLayout_6")
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_6.addWidget(self.plainTextEdit_file_path_input_artifact)
self.verticalLayout_6.setStretch(0, 2)
self.verticalLayout_2.addWidget(self.groupBox_file_path_input_artifact)
self.groupBox_file_path_save = QGroupBox(self.groupBox)
self.groupBox_file_path_save.setObjectName(u"groupBox_file_path_save")
self.verticalLayout_4 = QVBoxLayout(self.groupBox_file_path_save)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.plainTextEdit_file_path_save = QPlainTextEdit(self.groupBox_file_path_save)
self.plainTextEdit_file_path_save.setObjectName(u"plainTextEdit_file_path_save")
self.verticalLayout_4.addWidget(self.plainTextEdit_file_path_save)
self.verticalLayout_2.addWidget(self.groupBox_file_path_save)
self.groupBox_display_mode = QGroupBox(self.groupBox)
self.groupBox_display_mode.setObjectName(u"groupBox_display_mode")
self.horizontalLayout = QHBoxLayout(self.groupBox_display_mode)
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout.addItem(self.horizontalSpacer)
self.radioButton_30s_mode = QRadioButton(self.groupBox_display_mode)
self.radioButton_30s_mode.setObjectName(u"radioButton_30s_mode")
self.radioButton_30s_mode.setFont(font)
self.radioButton_30s_mode.setChecked(True)
self.horizontalLayout.addWidget(self.radioButton_30s_mode)
self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout.addItem(self.horizontalSpacer_3)
self.radioButton_10s_mode = QRadioButton(self.groupBox_display_mode)
self.radioButton_10s_mode.setObjectName(u"radioButton_10s_mode")
self.radioButton_10s_mode.setFont(font)
self.horizontalLayout.addWidget(self.radioButton_10s_mode)
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout.addItem(self.horizontalSpacer_2)
self.verticalLayout_2.addWidget(self.groupBox_display_mode)
self.verticalLayout_2.setStretch(0, 3)
self.verticalLayout_2.setStretch(1, 2)
self.verticalLayout_2.setStretch(2, 2)
self.verticalLayout_2.setStretch(3, 2)
self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 4)
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_bcg_quality_label_input_setting.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_bcg_quality_label_input_setting)
self.statusbar.setObjectName(u"statusbar")
MainWindow_bcg_quality_label_input_setting.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_bcg_quality_label_input_setting)
QMetaObject.connectSlotsByName(MainWindow_bcg_quality_label_input_setting)
# setupUi
def retranslateUi(self, MainWindow_bcg_quality_label_input_setting):
MainWindow_bcg_quality_label_input_setting.setWindowTitle(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_cancel.setText(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"\u53d6\u6d88", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_signal_BCG.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"\u540c\u6b65\u540e\u7684BCG\u8def\u5f84", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input_signal_BCG.setPlainText("")
self.plainTextEdit_file_path_input_signal_BCG.setPlaceholderText(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_artifact.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_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_bcg_quality_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_save.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"BCG\u8d28\u91cf\u6807\u7b7e\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_save.setPlaceholderText(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.groupBox_display_mode.setTitle(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"\u663e\u793a\u6a21\u5f0f", None))
self.radioButton_30s_mode.setText(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"30s\u6a21\u5f0f", None))
self.radioButton_10s_mode.setText(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"10s\u6a21\u5f0f", None))
self.pushButton_confirm.setText(QCoreApplication.translate("MainWindow_bcg_quality_label_input_setting", u"\u786e\u5b9a", None))
# retranslateUi

View File

@ -0,0 +1,222 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow_bcg_quality_label_input_setting</class>
<widget class="QMainWindow" name="MainWindow_bcg_quality_label_input_setting">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>540</width>
<height>540</height>
</rect>
</property>
<property name="windowTitle">
<string>导入设置</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="3">
<widget class="QPushButton" name="pushButton_cancel">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>取消</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QGroupBox" name="groupBox">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>文件路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="3,2,2,2">
<item>
<widget class="QGroupBox" name="groupBox_file_path_input_signal_BCG">
<property name="title">
<string>同步后的BCG路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="1,2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>采样率(Hz)</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_input_freq_signal_BCG">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_signal_BCG">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_file_path_input_artifact">
<property name="title">
<string>体动Artifact_a路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6" 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>
<widget class="QGroupBox" name="groupBox_file_path_save">
<property name="title">
<string>BCG质量标签保存路径</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>
<widget class="QGroupBox" name="groupBox_display_mode">
<property name="title">
<string>显示模式</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<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>
<widget class="QRadioButton" name="radioButton_30s_mode">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>30s模式</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<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>
<widget class="QRadioButton" name="radioButton_10s_mode">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>10s模式</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>
</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>

View File

@ -82,12 +82,31 @@ class Ui_MainWindow_precisely_align_input_setting(object):
self.groupBox_file_path_input_orgBcg.setObjectName(u"groupBox_file_path_input_orgBcg") self.groupBox_file_path_input_orgBcg.setObjectName(u"groupBox_file_path_input_orgBcg")
self.verticalLayout_8 = QVBoxLayout(self.groupBox_file_path_input_orgBcg) self.verticalLayout_8 = QVBoxLayout(self.groupBox_file_path_input_orgBcg)
self.verticalLayout_8.setObjectName(u"verticalLayout_8") self.verticalLayout_8.setObjectName(u"verticalLayout_8")
self.horizontalLayout_5 = QHBoxLayout()
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
self.label_5 = QLabel(self.groupBox_file_path_input_orgBcg)
self.label_5.setObjectName(u"label_5")
self.label_5.setFont(font)
self.horizontalLayout_5.addWidget(self.label_5)
self.spinBox_input_freq_orgBcg = QSpinBox(self.groupBox_file_path_input_orgBcg)
self.spinBox_input_freq_orgBcg.setObjectName(u"spinBox_input_freq_orgBcg")
self.spinBox_input_freq_orgBcg.setFont(font)
self.spinBox_input_freq_orgBcg.setMinimum(1)
self.spinBox_input_freq_orgBcg.setMaximum(1000000)
self.horizontalLayout_5.addWidget(self.spinBox_input_freq_orgBcg)
self.verticalLayout_8.addLayout(self.horizontalLayout_5)
self.plainTextEdit_file_path_input_orgBcg = QPlainTextEdit(self.groupBox_file_path_input_orgBcg) self.plainTextEdit_file_path_input_orgBcg = QPlainTextEdit(self.groupBox_file_path_input_orgBcg)
self.plainTextEdit_file_path_input_orgBcg.setObjectName(u"plainTextEdit_file_path_input_orgBcg") self.plainTextEdit_file_path_input_orgBcg.setObjectName(u"plainTextEdit_file_path_input_orgBcg")
self.verticalLayout_8.addWidget(self.plainTextEdit_file_path_input_orgBcg) self.verticalLayout_8.addWidget(self.plainTextEdit_file_path_input_orgBcg)
self.verticalLayout_8.setStretch(0, 3) self.verticalLayout_8.setStretch(1, 3)
self.gridLayout_2.addWidget(self.groupBox_file_path_input_orgBcg, 0, 0, 1, 2) self.gridLayout_2.addWidget(self.groupBox_file_path_input_orgBcg, 0, 0, 1, 2)
@ -112,12 +131,31 @@ class Ui_MainWindow_precisely_align_input_setting(object):
self.groupBox_file_path_input_BCG.setObjectName(u"groupBox_file_path_input_BCG") self.groupBox_file_path_input_BCG.setObjectName(u"groupBox_file_path_input_BCG")
self.verticalLayout_5 = QVBoxLayout(self.groupBox_file_path_input_BCG) self.verticalLayout_5 = QVBoxLayout(self.groupBox_file_path_input_BCG)
self.verticalLayout_5.setObjectName(u"verticalLayout_5") self.verticalLayout_5.setObjectName(u"verticalLayout_5")
self.horizontalLayout_4 = QHBoxLayout()
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
self.label_4 = QLabel(self.groupBox_file_path_input_BCG)
self.label_4.setObjectName(u"label_4")
self.label_4.setFont(font)
self.horizontalLayout_4.addWidget(self.label_4)
self.spinBox_input_freq_BCG = QSpinBox(self.groupBox_file_path_input_BCG)
self.spinBox_input_freq_BCG.setObjectName(u"spinBox_input_freq_BCG")
self.spinBox_input_freq_BCG.setFont(font)
self.spinBox_input_freq_BCG.setMinimum(1)
self.spinBox_input_freq_BCG.setMaximum(1000000)
self.horizontalLayout_4.addWidget(self.spinBox_input_freq_BCG)
self.verticalLayout_5.addLayout(self.horizontalLayout_4)
self.plainTextEdit_file_path_input_BCG = QPlainTextEdit(self.groupBox_file_path_input_BCG) self.plainTextEdit_file_path_input_BCG = QPlainTextEdit(self.groupBox_file_path_input_BCG)
self.plainTextEdit_file_path_input_BCG.setObjectName(u"plainTextEdit_file_path_input_BCG") self.plainTextEdit_file_path_input_BCG.setObjectName(u"plainTextEdit_file_path_input_BCG")
self.verticalLayout_5.addWidget(self.plainTextEdit_file_path_input_BCG) self.verticalLayout_5.addWidget(self.plainTextEdit_file_path_input_BCG)
self.verticalLayout_5.setStretch(0, 3) self.verticalLayout_5.setStretch(1, 3)
self.gridLayout_2.addWidget(self.groupBox_file_path_input_BCG, 1, 0, 1, 1) self.gridLayout_2.addWidget(self.groupBox_file_path_input_BCG, 1, 0, 1, 1)
@ -228,12 +266,14 @@ class Ui_MainWindow_precisely_align_input_setting(object):
self.groupBox_file_path_save.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u5bf9\u9f50\u4fe1\u606f\u4fdd\u5b58\u8def\u5f84", None)) self.groupBox_file_path_save.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u5bf9\u9f50\u4fe1\u606f\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_save_AlignInfo.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) self.plainTextEdit_file_path_save_AlignInfo.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.groupBox_file_path_input_orgBcg.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u539f\u59cborgBcg\u8def\u5f84", None)) self.groupBox_file_path_input_orgBcg.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u539f\u59cborgBcg\u8def\u5f84", None))
self.label_5.setText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input_orgBcg.setPlainText("") self.plainTextEdit_file_path_input_orgBcg.setPlainText("")
self.plainTextEdit_file_path_input_orgBcg.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) self.plainTextEdit_file_path_input_orgBcg.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_save_3.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u5bf9\u9f50J\u5cf0\u548cR\u5cf0\u4fdd\u5b58\u8def\u5f84", None)) self.groupBox_file_path_save_3.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u5bf9\u9f50J\u5cf0\u548cR\u5cf0\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_save_Jpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) self.plainTextEdit_file_path_save_Jpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_save_Rpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None)) self.plainTextEdit_file_path_save_Rpeak.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.groupBox_file_path_input_BCG.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u9884\u5904\u7406\u540e\u7684BCG\u8def\u5f84", None)) self.groupBox_file_path_input_BCG.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u9884\u5904\u7406\u540e\u7684BCG\u8def\u5f84", None))
self.label_4.setText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input_BCG.setPlainText("") self.plainTextEdit_file_path_input_BCG.setPlainText("")
self.plainTextEdit_file_path_input_BCG.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None)) self.plainTextEdit_file_path_input_BCG.setPlaceholderText(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_Jpeak.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4eba\u5de5\u7ea0\u6b63\u540e\u7684J\u5cf0\u8def\u5f84", None)) self.groupBox_file_path_input_Jpeak.setTitle(QCoreApplication.translate("MainWindow_precisely_align_input_setting", u"\u4eba\u5de5\u7ea0\u6b63\u540e\u7684J\u5cf0\u8def\u5f84", None))

View File

@ -89,7 +89,38 @@
<property name="title"> <property name="title">
<string>原始orgBcg路径</string> <string>原始orgBcg路径</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_8" stretch="3"> <layout class="QVBoxLayout" name="verticalLayout_8" stretch="0,3">
<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_orgBcg">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_orgBcg"> <widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_orgBcg">
<property name="plainText"> <property name="plainText">
@ -131,7 +162,38 @@
<property name="title"> <property name="title">
<string>预处理后的BCG路径</string> <string>预处理后的BCG路径</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="3"> <layout class="QVBoxLayout" name="verticalLayout_5" stretch="0,3">
<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_BCG">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_BCG"> <widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_BCG">
<property name="plainText"> <property name="plainText">

View File

@ -0,0 +1,195 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'resp_quality_label_input_setting.ui'
##
## Created by: Qt User Interface Compiler version 6.8.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QGridLayout, QGroupBox, QHBoxLayout,
QLabel, QMainWindow, QPlainTextEdit, QPushButton,
QSizePolicy, QSpinBox, QStatusBar, QVBoxLayout,
QWidget)
class Ui_MainWindow_resp_quality_label_input_setting(object):
def setupUi(self, MainWindow_resp_quality_label_input_setting):
if not MainWindow_resp_quality_label_input_setting.objectName():
MainWindow_resp_quality_label_input_setting.setObjectName(u"MainWindow_resp_quality_label_input_setting")
MainWindow_resp_quality_label_input_setting.resize(540, 720)
self.centralwidget = QWidget(MainWindow_resp_quality_label_input_setting)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.pushButton_cancel = QPushButton(self.centralwidget)
self.pushButton_cancel.setObjectName(u"pushButton_cancel")
font = QFont()
font.setPointSize(12)
self.pushButton_cancel.setFont(font)
self.gridLayout.addWidget(self.pushButton_cancel, 1, 3, 1, 1)
self.groupBox = QGroupBox(self.centralwidget)
self.groupBox.setObjectName(u"groupBox")
font1 = QFont()
font1.setPointSize(10)
self.groupBox.setFont(font1)
self.verticalLayout_2 = QVBoxLayout(self.groupBox)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.groupBox_file_path_input_signal_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.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, 1)
self.verticalLayout_5.setStretch(1, 2)
self.verticalLayout_2.addWidget(self.groupBox_file_path_input_signal_OrgBCG)
self.groupBox_file_path_input_Tho = QGroupBox(self.groupBox)
self.groupBox_file_path_input_Tho.setObjectName(u"groupBox_file_path_input_Tho")
self.verticalLayout_3 = QVBoxLayout(self.groupBox_file_path_input_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_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_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_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(0, 1)
self.verticalLayout_3.setStretch(1, 2)
self.verticalLayout_2.addWidget(self.groupBox_file_path_input_Tho)
self.groupBox_file_path_input_artifact = QGroupBox(self.groupBox)
self.groupBox_file_path_input_artifact.setObjectName(u"groupBox_file_path_input_artifact")
self.verticalLayout_6 = QVBoxLayout(self.groupBox_file_path_input_artifact)
self.verticalLayout_6.setObjectName(u"verticalLayout_6")
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_6.addWidget(self.plainTextEdit_file_path_input_artifact)
self.verticalLayout_6.setStretch(0, 2)
self.verticalLayout_2.addWidget(self.groupBox_file_path_input_artifact)
self.groupBox_file_path_save_Resp_quality_label = QGroupBox(self.groupBox)
self.groupBox_file_path_save_Resp_quality_label.setObjectName(u"groupBox_file_path_save_Resp_quality_label")
self.verticalLayout_4 = QVBoxLayout(self.groupBox_file_path_save_Resp_quality_label)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.plainTextEdit_file_path_save_Resp_quality_label = QPlainTextEdit(self.groupBox_file_path_save_Resp_quality_label)
self.plainTextEdit_file_path_save_Resp_quality_label.setObjectName(u"plainTextEdit_file_path_save_Resp_quality_label")
self.verticalLayout_4.addWidget(self.plainTextEdit_file_path_save_Resp_quality_label)
self.verticalLayout_2.addWidget(self.groupBox_file_path_save_Resp_quality_label)
self.groupBox_file_path_save_Tho_peak = QGroupBox(self.groupBox)
self.groupBox_file_path_save_Tho_peak.setObjectName(u"groupBox_file_path_save_Tho_peak")
self.verticalLayout_7 = QVBoxLayout(self.groupBox_file_path_save_Tho_peak)
self.verticalLayout_7.setObjectName(u"verticalLayout_7")
self.plainTextEdit_file_path_save_Tho_peak = QPlainTextEdit(self.groupBox_file_path_save_Tho_peak)
self.plainTextEdit_file_path_save_Tho_peak.setObjectName(u"plainTextEdit_file_path_save_Tho_peak")
self.verticalLayout_7.addWidget(self.plainTextEdit_file_path_save_Tho_peak)
self.verticalLayout_2.addWidget(self.groupBox_file_path_save_Tho_peak)
self.verticalLayout_2.setStretch(0, 3)
self.verticalLayout_2.setStretch(1, 3)
self.verticalLayout_2.setStretch(2, 2)
self.verticalLayout_2.setStretch(3, 2)
self.verticalLayout_2.setStretch(4, 2)
self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 4)
self.pushButton_confirm = QPushButton(self.centralwidget)
self.pushButton_confirm.setObjectName(u"pushButton_confirm")
self.pushButton_confirm.setFont(font)
self.gridLayout.addWidget(self.pushButton_confirm, 1, 2, 1, 1)
MainWindow_resp_quality_label_input_setting.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow_resp_quality_label_input_setting)
self.statusbar.setObjectName(u"statusbar")
MainWindow_resp_quality_label_input_setting.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow_resp_quality_label_input_setting)
QMetaObject.connectSlotsByName(MainWindow_resp_quality_label_input_setting)
# setupUi
def retranslateUi(self, MainWindow_resp_quality_label_input_setting):
MainWindow_resp_quality_label_input_setting.setWindowTitle(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"\u5bfc\u5165\u8bbe\u7f6e", None))
self.pushButton_cancel.setText(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"\u53d6\u6d88", None))
self.groupBox.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_signal_OrgBCG.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"\u540c\u6b65\u540e\u7684OrgBCG\u8def\u5f84", None))
self.label_2.setText(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"\u91c7\u6837\u7387(Hz)\uff1a", None))
self.plainTextEdit_file_path_input_signal_OrgBCG.setPlainText("")
self.plainTextEdit_file_path_input_signal_OrgBCG.setPlaceholderText(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_Tho.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"\u540c\u6b65\u540e\u7684Effort Tho\u8def\u5f84", None))
self.label_3.setText(QCoreApplication.translate("MainWindow_resp_quality_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_resp_quality_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_input_artifact.setTitle(QCoreApplication.translate("MainWindow_resp_quality_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_resp_quality_label_input_setting", u"\u6587\u4ef6\u8def\u5f84", None))
self.groupBox_file_path_save_Resp_quality_label.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"\u547c\u5438\u53ef\u7528\u6027\u6807\u7b7e\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_save_Resp_quality_label.setPlaceholderText(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.groupBox_file_path_save_Tho_peak.setTitle(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"Tho\u4fe1\u53f7\u547c\u5438\u95f4\u671f\u6807\u7b7e\u4fdd\u5b58\u8def\u5f84", None))
self.plainTextEdit_file_path_save_Tho_peak.setPlaceholderText(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"\u4fdd\u5b58\u8def\u5f84", None))
self.pushButton_confirm.setText(QCoreApplication.translate("MainWindow_resp_quality_label_input_setting", u"\u786e\u5b9a", None))
# retranslateUi

View File

@ -0,0 +1,213 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow_resp_quality_label_input_setting</class>
<widget class="QMainWindow" name="MainWindow_resp_quality_label_input_setting">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>540</width>
<height>720</height>
</rect>
</property>
<property name="windowTitle">
<string>导入设置</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="3">
<widget class="QPushButton" name="pushButton_cancel">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>取消</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QGroupBox" name="groupBox">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="title">
<string>文件路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="3,3,2,2,2">
<item>
<widget class="QGroupBox" name="groupBox_file_path_input_signal_OrgBCG">
<property name="title">
<string>同步后的OrgBCG路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="1,2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>采样率(Hz)</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_input_freq_signal_OrgBCG">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_input_signal_OrgBCG">
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>文件路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_file_path_input_Tho">
<property name="title">
<string>同步后的Effort Tho路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="1,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>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_file_path_input_artifact">
<property name="title">
<string>体动Artifact_a路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6" 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>
<widget class="QGroupBox" name="groupBox_file_path_save_Resp_quality_label">
<property name="title">
<string>呼吸可用性标签保存路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_save_Resp_quality_label">
<property name="placeholderText">
<string>保存路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_file_path_save_Tho_peak">
<property name="title">
<string>Tho信号呼吸间期标签保存路径</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QPlainTextEdit" name="plainTextEdit_file_path_save_Tho_peak">
<property name="placeholderText">
<string>保存路径</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButton_confirm">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>确定</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,168 @@
<h1>文件命名规范</h1>
<h3>当一份数据被完整走完标注流程后,数据文件夹目录结构将会是:</h3>
<pre><code>.../Label/&lt;sampID&gt;
|-Artifact_a_采样率.txt
|-Artifact_b_采样率.txt
|-Artifact_c_采样率.csv
|-SQ_label_10s.csv
|-SQ_label_30s.csv
|-Resp_quality_label.txt
|-Tho_peak_采样率.txt
|-SA Label_corrected.csv
|-SA Label_add.csv
|-Precisely_Align_Info.txt
|-Approximately_Align_Info.csv
.../OrgBCG_Aligned/&lt;sampID&gt;
|-BCG_Sync_采样率.txt
|-OrgBCG_Sync_采样率.txt
|-Jpeak_Sync_采样率.txt
.../OrgBCG_Text/&lt;sampID&gt;
|-OrgBCG_Raw_采样率.txt
|-BCG_Filter_采样率.txt
|-Jpeak_revise_采样率.txt
|-Jpeak_revise_corrected_采样率.txt
.../OrgBCG_Origin/&lt;sampID&gt;
|-...
.../PSG_Aligned/&lt;sampID&gt;
|-ECG_Sync_采样率.txt
|-Rpeak_Sync_采样率.txt
|-5_class_Sync_采样率.txt
|-SA Label_Sync.csv
|-Effort Abd_Sync_采样率.txt
|-Effort Tho_Sync_采样率.txt
|-Flow T_Sync_采样率.txt
|-Flow P_Sync_采样率.txt
|-Snore_Sync_采样率.txt
|-SpO2_Sync_采样率.txt
.../PSG_Text/&lt;sampID&gt;
|-ECG II_Raw_采样率.txt
|-ECG_Filter_采样率.txt
|-Rpeak_final_采样率.txt
|-Rpeak_final_corrected_采样率.txt
|-5_class_Raw_采样率.txt
|-SA Label_Raw.csv
|-Effort Abd_Raw_采样率.txt
|-Effort Tho_Raw_采样率.txt
|-Flow T_Raw_采样率.txt
|-Flow P_Raw_采样率.txt
|-Snore_Raw_采样率.txt
|-SpO2_Raw_采样率.txt
|-StartTime_Raw.txt
.../PSG_Origin/&lt;sampID&gt;
|-...
.../Receive_Origin
|-...
.../Report
|-...
</code></pre>
<h3>1 数据粗同步</h3>
<p>输入:</p>
<p>原始OrgBCG信号<code>./OrgBCG_Text/&lt;sampID&gt;/OrgBCG_Raw_采样率.txt</code></p>
<p>原始Tho信号<code>./PSG_Text/&lt;sampID&gt;/Effort Tho_Raw_采样率.txt</code></p>
<p>原始Abd信号<code>./PSG_Text/&lt;sampID&gt;/Effort Abd_Raw_采样率.txt</code></p>
<p>输出:</p>
<p>粗同步后的位置索引:<code>./Label/&lt;sampID&gt;/Approximately_Align_Info.csv</code></p>
<h3>2 预处理</h3>
<p>输入:</p>
<p>原始OrgBCG信号<code>./OrgBCG_Text/&lt;sampID&gt;/OrgBCG_Raw_采样率.txt</code></p>
<p>原始ECG信号<code>./PSG_Text/&lt;sampID&gt;/ECG II_Raw_采样率.txt</code></p>
<p>输出:</p>
<p>滤波后的BCG信号<code>./OrgBCG_Text/&lt;sampID&gt;/BCG_Filter_采样率.txt</code></p>
<p>滤波后的ECG信号<code>./PSG_Text/&lt;sampID&gt;/ECG_Filter_采样率.txt</code></p>
<h3>3 数据精同步</h3>
<h4>3.1 算法定位</h4>
<h4>3.1.1 R峰算法定位</h4>
<p>输入:</p>
<p>滤波后的ECG信号<code>./PSG_Text/&lt;sampID&gt;/ECG_Filter_采样率.txt</code></p>
<p>输出:</p>
<p>算法定位的R峰坐标<code>./PSG_Text/&lt;sampID&gt;/Rpeak_final_采样率.txt</code></p>
<h4>3.1.2 J峰算法定位</h4>
<p>输入:</p>
<p>滤波后的BCG信号<code>./OrgBCG_Text/&lt;sampID&gt;/BCG_Filter_采样率.txt</code></p>
<p>输出:</p>
<p>算法定位的J峰坐标<code>./OrgBCG_Text/&lt;sampID&gt;/Jpeak_revise_采样率.txt</code></p>
<h4>3.2 人工纠正</h4>
<h4>3.2.1 R峰人工纠正</h4>
<p>输入:</p>
<p>滤波后的ECG信号<code>./PSG_Text/&lt;sampID&gt;/ECG_Filter_采样率.txt</code></p>
<p>算法定位的R峰坐标<code>./PSG_Text/&lt;sampID&gt;/Rpeak_final_采样率.txt</code></p>
<p>粗同步后的位置索引:<code>./Label/&lt;sampID&gt;/Approximately_Align_Info.csv</code></p>
<p>输出:</p>
<p>人工纠正后的R峰坐标<code>./PSG_Text/&lt;sampID&gt;/Rpeak_final_corrected_采样率.txt</code></p>
<h4>3.2.2 J峰人工纠正*</h4>
<p>输入:</p>
<p>滤波后的BCG信号<code>./OrgBCG_Text/&lt;sampID&gt;/BCG_Filter_采样率.txt</code></p>
<p>算法定位的J峰坐标<code>./OrgBCG_Text/&lt;sampID&gt;/Jpeak_revise_采样率.txt</code></p>
<p>粗同步后的位置索引:<code>./Label/&lt;sampID&gt;/Approximately_Align_Info.csv</code></p>
<p>输出:</p>
<p>人工纠正后的J峰坐标<code>./OrgBCG_Text/&lt;sampID&gt;/Jpeak_revise_corrected_采样率.txt</code></p>
<h4>3.3 数据片段起止对齐、数据采样率同步</h4>
<p>输入:</p>
<p>滤波后的ECG信号<code>./PSG_Text/&lt;sampID&gt;/ECG_Filter_采样率.txt</code></p>
<p>人工纠正后的R峰坐标<code>./PSG_Text/&lt;sampID&gt;/Rpeak_final_corrected_采样率.txt</code></p>
<p>滤波后的BCG信号<code>./OrgBCG_Text/&lt;sampID&gt;/BCG_Filter_采样率.txt</code></p>
<p>人工纠正后的J峰坐标<code>./OrgBCG_Text/&lt;sampID&gt;/Jpeak_revise_corrected_采样率.txt</code></p>
<p>原始OrgBCG信号<code>./OrgBCG_Text/&lt;sampID&gt;/OrgBCG_Raw_采样率.txt</code></p>
<p>粗同步后的位置索引:<code>./Label/&lt;sampID&gt;/Approximately_Align_Info.csv</code></p>
<p>输出:</p>
<p>精同步对齐信息:<code>./Label/&lt;sampID&gt;/Precisely_Align_Info.txt</code></p>
<p>同步后的ECG信号<code>./PSG_Aligned/&lt;sampID&gt;/ECG_Sync_采样率.txt</code></p>
<p>同步后的R峰坐标<code>./PSG_Aligned/&lt;sampID&gt;/Rpeak_Sync_采样率.txt</code></p>
<p>同步后的BCG信号<code>./OrgBCG_Aligned/&lt;sampID&gt;/BCG_Sync_采样率.txt</code></p>
<p>同步后的OrgBCG信号<code>./OrgBCG_Aligned/&lt;sampID&gt;/OrgBCG_Sync_采样率.txt</code></p>
<p>同步后的J峰坐标<code>./OrgBCG_Aligned/&lt;sampID&gt;/Jpeak_Sync_采样率.txt</code></p>
<h4>3.4、冗余数据切割、标签映射</h4>
<p>输入:</p>
<p>精同步对齐信息:<code>./Label/&lt;sampID&gt;/Precisely_Align_Info.txt</code></p>
<p>原始的Flow T信号<code>./PSG_Text/&lt;sampID&gt;/Flow T_Sync_采样率.txt</code></p>
<p>原始的Flow P信号<code>./PSG_Text/&lt;sampID&gt;/Flow P_Sync_采样率.txt</code></p>
<p>原始的Tho信号<code>./PSG_Text/&lt;sampID&gt;/Effort Tho_Sync_采样率.txt</code></p>
<p>原始的Abd信号<code>./PSG_Text/&lt;sampID&gt;/Effort Abd_Sync_采样率.txt</code></p>
<p>原始的SpO2信号<code>./PSG_Text/&lt;sampID&gt;/SpO2_Sync_采样率.txt</code></p>
<p>原始的Snore信号<code>./PSG_Text/&lt;sampID&gt;/Snore_Sync_采样率.txt</code></p>
<p>原始的睡眠分期标签:<code>./PSG_Text/&lt;sampID&gt;/5_class_Raw_采样率.txt</code></p>
<p>原始的睡眠呼吸暂停事件标签:<code>./PSG_Text/&lt;sampID&gt;/SA Label_Raw.csv</code></p>
<p>输出:</p>
<p>同步后的Flow T信号<code>./PSG_Aligned/&lt;sampID&gt;/Flow T_Sync_采样率.txt</code></p>
<p>同步后的Flow P信号<code>./PSG_Aligned/&lt;sampID&gt;/Flow P_Sync_采样率.txt</code></p>
<p>同步后的Tho信号<code>./PSG_Aligned/&lt;sampID&gt;/Effort Tho_Sync_采样率.txt</code></p>
<p>同步后的Abd信号<code>./PSG_Aligned/&lt;sampID&gt;/Effort Abd_Sync_采样率.txt</code></p>
<p>同步后的SpO2信号<code>./PSG_Aligned/&lt;sampID&gt;/SpO2_Sync_采样率.txt</code></p>
<p>同步后的Snore信号<code>./PSG_Aligned/&lt;sampID&gt;/Snore_Sync_采样率.txt</code></p>
<p>同步后的睡眠分期标签:<code>./PSG_Aligned/&lt;sampID&gt;/5_class_Sync_采样率.txt</code></p>
<p>同步后的睡眠呼吸暂停事件标签:<code>./PSG_Aligned/&lt;sampID&gt;/SA Label_Sync.csv</code></p>
<h3>4 体动标记</h3>
<p>输入:</p>
<p>同步后的BCG信号<code>./OrgBCG_Aligned/&lt;sampID&gt;/BCG_Sync_采样率.txt</code></p>
<p>同步后的OrgBCG信号<code>./OrgBCG_Aligned/&lt;sampID&gt;/OrgBCG_Sync_采样率.txt</code></p>
<p>输出:</p>
<p>txt格式的体动标签<code>./Label/&lt;sampID&gt;/Artifact_a_采样率.txt</code></p>
<p>体动标签类型数量统计:<code>./Label/&lt;sampID&gt;/Artifact_b_采样率.txt</code></p>
<p>csv格式的体动标签<code>./Label/&lt;sampID&gt;/Artifact_c_采样率.csv</code></p>
<h3>5 质量评估</h3>
<p>输入:</p>
<p>同步后的BCG信号<code>./OrgBCG_Aligned/&lt;sampID&gt;/BCG_Sync_采样率.txt</code></p>
<p>txt格式的体动标签<code>./Label/&lt;sampID&gt;/Artifact_a_采样率.txt</code></p>
<p>输出:</p>
<p>质量标签:<code>./Label/&lt;sampID&gt;/SQ_label_10s.csv</code><code>./Label/&lt;sampID&gt;/SQ_label_30s.csv</code></p>
<h3>6 呼吸提取</h3>
<p>输入:</p>
<p>同步后的OrgBCG信号<code>./OrgBCG_Aligned/&lt;sampID&gt;/OrgBCG_Sync_采样率.txt</code></p>
<p>同步后的Tho信号<code>./PSG_Aligned/&lt;sampID&gt;/Effort Tho_Sync_采样率.txt</code></p>
<p>txt格式的体动标签<code>./Label/&lt;sampID&gt;/Artifact_a_采样率.txt</code></p>
<p>输出:</p>
<p>呼吸可用性标签:<code>./Label/&lt;sampID&gt;/Resp_quality_label.txt</code></p>
<p>Tho信号呼吸间期标签<code>./Label/&lt;sampID&gt;/Tho_peak_采样率.txt</code></p>
<h3>8 呼吸暂停事件标注</h3>
<p>输入:</p>
<p>同步后的OrgBCG信号<code>./OrgBCG_Aligned/&lt;sampID&gt;/OrgBCG_Sync_采样率.txt</code></p>
<p>txt格式的体动标签<code>./Label/&lt;sampID&gt;/Artifact_a_采样率.txt</code></p>
<p>同步后的Flow T信号<code>./PSG_Aligned/&lt;sampID&gt;/Flow T_Sync_采样率.txt</code></p>
<p>同步后的Flow P信号<code>./PSG_Aligned/&lt;sampID&gt;/Flow P_Sync_采样率.txt</code></p>
<p>同步后的Tho信号<code>./PSG_Aligned/&lt;sampID&gt;/Effort Tho_Sync_采样率.txt</code></p>
<p>同步后的Abd信号<code>./PSG_Aligned/&lt;sampID&gt;/Effort Abd_Sync_采样率.txt</code></p>
<p>同步后的SpO2信号<code>./PSG_Aligned/&lt;sampID&gt;/SpO2_Sync_采样率.txt</code></p>
<p>同步后的睡眠呼吸暂停事件标签:<code>./PSG_Aligned/&lt;sampID&gt;/SA Label_Sync.csv</code></p>
<p>输出:</p>
<p>修正后的呼吸暂停标签:<code>./Label/&lt;sampID&gt;/SA Label_corrected.csv</code></p>
<p>新增的呼吸暂停标签:<code>./Label/&lt;sampID&gt;/SA Label_add.csv</code></p>

View File

@ -1,300 +0,0 @@
# 文件命名规范
### 当一份数据被完整走完标注流程后,数据文件夹目录结构将会是:
```
.../Label/<sampID>
|-Artifact_a_采样率.txt
|-Artifact_b_采样率.txt
|-Artifact_c_采样率.csv
|-SQ_label_10s.csv
|-SQ_label_30s.csv
|-Resp_quality_label.txt
|-Tho_peak_采样率.txt
|-SA Label_corrected.csv
|-SA Label_add.csv
|-Precisely_Align_info.txt
|-Approximately_Align_Info.csv
.../OrgBCG_Aligned/<sampID>
|-BCG_Sync_采样率.txt
|-OrgBCG_Sync_采样率.txt
|-Jpeak_Sync_采样率.txt
.../OrgBCG_Text/<sampID>
|-OrgBCG_Raw_采样率.txt
|-BCG_Filter_采样率.txt
|-JPeak_revise_采样率.txt
|-JPeak_revise_corrected_采样率.txt
.../OrgBCG_Origin/<sampID>
|-...
.../PSG_Aligned/<sampID>
|-ECG_Sync_采样率.txt
|-Rpeak_Sync_采样率.txt
|-5_class_Sync_采样率.txt
|-SA Label_Sync.csv
|-Effort Abd_Sync_采样率.txt
|-Effort Tho_Sync_采样率.txt
|-Flow T_Sync_采样率.txt
|-Flow P_Sync_采样率.txt
|-Snore_Sync_采样率.txt
|-SpO2_Sync_采样率.txt
.../PSG_Text/<sampID>
|-ECG II_Raw_采样率.txt
|-ECG_Filter_采样率.txt
|-Rpeak_final_采样率.txt
|-Rpeak_final_corrected_采样率.txt
|-5_class_Raw_采样率.txt
|-SA Label_Raw.csv
|-Effort Abd_Raw_采样率.txt
|-Effort Tho_Raw_采样率.txt
|-Flow T_Raw_采样率.txt
|-Flow P_Raw_采样率.txt
|-Snore_Raw_采样率.txt
|-SpO2_Raw_采样率.txt
|-StartTime_Raw.txt
.../PSG_Origin/<sampID>
|-...
.../Receive_Origin
|-...
.../Report
|-...
```
### 1 数据粗同步
输入:
原始orgBcg信号`./OrgBCG_Text/<sampID>/OrgBCG_Raw_采样率.txt`
原始PSG信号`./PSG_Text/<sampID>/Axxxxxxx.edf`
输出:
粗同步后的位置索引:`./Label/<sampID>/Approximately_Align_Info.csv`
### 2 预处理
输入:
原始orgBcg信号`./OrgBCG_Text/<sampID>/OrgBCG_Raw_采样率.txt`
原始ECG信号`./PSG_Text/<sampID>/ECG II_Raw_采样率.txt`
输出:
带通滤波BCG信号`./OrgBCG_Text/<sampID>/BCG_Filter_采样率.txt`
滤波后的ECG信号`./PSG_Text/<sampID>/ECG_Filter_采样率.txt`
### 3 数据精同步
#### 3.1 算法定位
#### 3.1.1 R峰算法定位
输入:
滤波后的ECG信号`./PSG_Text/<sampID>/ECG_Filter_采样率.txt`
输出:
算法定位的R峰坐标`./PSG_Text/<sampID>/Rpeak_final_采样率.txt`
#### 3.1.2 J峰算法定位
输入:
带通滤波BCG信号`./OrgBCG_Text/<sampID>/BCG_Filter_采样率.txt`
输出:
算法定位的J峰坐标`./OrgBCG_Text/<sampID>/JPeak_revise_采样率.txt`
#### 3.2 人工纠正
#### 3.2.1 R峰人工纠正
输入:
滤波后的ECG信号`./PSG_Text/<sampID>/ECG_Filter_采样率.txt`
算法定位的R峰坐标`./PSG_Text/<sampID>/Rpeak_final_采样率.txt`
粗同步后的位置索引:`./Label/<sampID>/Approximately_Align_Info.csv`
输出:
人工纠正后的R峰坐标`./PSG_Text/<sampID>/Rpeak_final_corrected_采样率.txt`
#### 3.2.2 J峰人工纠正*
输入:
带通滤波BCG信号`./OrgBCG_Text/<sampID>/BCG_Filter_采样率.txt`
算法定位的J峰坐标`./OrgBCG_Text/<sampID>/JPeak_revise_采样率.txt`
粗同步后的位置索引:`./Label/<sampID>/Approximately_Align_Info.csv`
输出:
人工纠正后的J峰坐标`./OrgBCG_Text/<sampID>/JPeak_revise_corrected_采样率.txt`
#### 3.3 数据片段起止对齐、数据采样率同步
输入:
滤波后的ECG信号`./PSG_Text/<sampID>/ECG_Filter_采样率.txt`
人工纠正后的R峰坐标`./PSG_Text/<sampID>/Rpeak_final_corrected_采样率.txt`
带通滤波BCG信号`./OrgBCG_Text/<sampID>/BCG_Filter_采样率.txt`
人工纠正后的J峰坐标`./OrgBCG_Text/<sampID>/JPeak_revise_corrected_采样率.txt`
原始orgBcg信号`./OrgBCG_Text/<sampID>/OrgBCG_Raw_采样率.txt`
粗同步后的位置索引:`./Label/<sampID>/Approximately_Align_Info.csv`
输出:
精同步对齐信息:`./Label/<sampID>/Precisely_Align_info.txt`
同步后的ECG信号`./PSG_Aligned/<sampID>/ECG_Sync_采样率.txt`
同步后的R峰坐标`./PSG_Aligned/<sampID>/Rpeak_Sync_采样率.txt`
同步后的BCG信号`./OrgBCG_Aligned/<sampID>/BCG_Sync_采样率.txt`
同步后的orgBcg信号`./OrgBCG_Aligned/<sampID>/OrgBCG_Sync_采样率.txt`
同步后的J峰坐标`./OrgBCG_Aligned/<sampID>/Jpeak_Sync_采样率.txt`
#### 3.4、冗余数据切割、标签映射
输入:
精同步对齐信息:`./Label/<sampID>/Precisely_Align_info.txt`
原始的其他PSG通道信号`./PSG_Text/<sampID>/通道名_Raw_采样率.txt`通道名包括Effort Abd, Effort Tho, Flow T, Flow P, Snore, SpO2
原始的睡眠分期标签:`./PSG_Text/<sampID>/5_class_Raw_采样率.txt`
原始的睡眠呼吸暂停事件标签:`./PSG_Text/<sampID>/SA Label_Raw.csv`
输出:
同步后的其他PSG通道信号`./PSG_Aligned/<sampID>/通道名_Sync_采样率.txt`通道名包括Effort Abd, Effort Tho, Flow T, Flow P, Snore, SpO2
同步后的睡眠分期标签:`./PSG_Aligned/<sampID>/5_class_Sync_采样率.txt`
同步后的睡眠呼吸暂停事件标签:`./PSG_Aligned/<sampID>/SA Label_Sync.csv`
### 4 体动标记
输入:
同步后的BCG信号`./OrgBCG_Aligned/<sampID>/BCG_Sync_采样率.txt`
同步后的orgBcg信号`./OrgBCG_Aligned/<sampID>/OrgBCG_Sync_采样率.txt`
输出:
txt格式的体动标签`./Label/<sampID>/Artifact_a_采样率.txt`
体动标签类型数量统计:`./Label/<sampID>/Artifact_b_采样率.txt`
csv格式的体动标签`./Label/<sampID>/Artifact_c_采样率.csv`
### 5 质量评估
输入:
同步后的BCG信号`./OrgBCG_Aligned/<sampID>/BCG_Sync_采样率.txt`
txt格式的体动标签`./Label/<sampID>/Artifact_a_采样率.txt`
输出:
质量标签:`./Label/<sampID>/SQ_label_10s.csv``./Label/<sampID>/SQ_label_30s.csv`
### 6 心搏定位数据标注
输入:
输出:
### 7 呼吸提取
输入:
同步后的orgBcg信号`./OrgBCG_Aligned/<sampID>/orgBcg_Sync_采样率.txt`
同步后的THO信号`./PSG_Aligned/<sampID>/Effort Tho_Sync_采样率.txt`
txt格式的体动标签`./Label/<sampID>/Artifact_a_采样率.txt`
输出:
呼吸可用性标签:`./Label/<sampID>/Resp_quality_label.txt`
THO信号呼吸间期标签`./Label/<sampID>/Tho_peak_采样率.txt`
### 8 呼吸暂停事件标注
输入:
同步后的orgBcg信号`./OrgBCG_Aligned/<sampID>/OrgBCG_Sync_采样率.txt`
txt格式的体动标签`./Label/<sampID>/Artifact_a_采样率.txt`
同步后的Flow T信号`./PSG_Aligned/<sampID>/Flow T_Sync_采样率.txt`
同步后的Flow P信号`./PSG_Aligned/<sampID>/Flow P_Sync_采样率.txt`
同步后的THO信号`./PSG_Aligned/<sampID>/Effort Tho_Sync_采样率.txt`
同步后的ABD信号`./PSG_Aligned/<sampID>/Effort Abd_Sync_采样率.txt`
同步后的SpO2信号`./PSG_Aligned/<sampID>/SpO2_Sync_采样率.txt`
同步后的呼吸暂停标签:`./PSG_Aligned/<sampID>/SA Label_Sync.csv`
输出:
修正后的呼吸暂停标签:`./Label/<sampID>/SA Label_corrected.csv`
新增的呼吸暂停标签:`./Label/<sampID>/SA Label_add.csv`