Files
REVOXELSEG_DICOM/工程分析/实现方案-2026-05-20-11-51-05.md

61 lines
2.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 实现方案:默认医学数据资产入库
实现方案文档路径:`工程分析/实现方案-2026-05-20-11-51-05.md`
## 修改目标
将默认项目依赖的 `Head_CT_DICOM/``Head_CT_ReConstruct/` 纳入 Git/Gitea使新环境克隆仓库后能够直接加载默认演示项目。
## 涉及路径
- `.gitignore`
- `.gitattributes`
- `Head_CT_DICOM/`
- `Head_CT_ReConstruct/`
- `工程分析/需求分析-2026-05-20-11-51-05.md`
- `工程分析/实现方案-2026-05-20-11-51-05.md`
- `工程分析/测试方案-2026-05-20-11-51-05.md`
- `工程分析/经验记录.md`
## 技术路线
1. 统计两个默认数据目录的文件数量与体积,记录入测试方案。
2. 调整 `.gitignore`,移除 `Head_CT_DICOM/``Head_CT_ReConstruct/` 的忽略规则。
3. 新增 `.gitattributes`,将 `*.dcm``*.stl` 作为二进制文件处理。
4. 使用 `git add` 精确暂存默认数据目录、配置文件和本次工程分析文档。
5. 检查暂存内容,确认不包含软著材料、历史删除状态或无关文件。
6. 提交并推送到 Gitea。
7. 构建并重新部署项目,验证默认项目接口返回 DICOM/STL 数量正常。
## 执行步骤
- 读取 `工程分析/经验记录.md` 后执行最终修改。
- 使用 `du``find``git status` 检查数据目录状态。
- 修改 `.gitignore``.gitattributes`
- 运行 `npm run build`
- 验证 `/api/health`、首页和 `/api/projects/head-ct-demo`
- 精确提交并推送。
- 重启 `tmux` 会话 `revoxelseg-dicom`
## 兼容性与回滚方案
- 目录名保持不变,后端默认项目扫描逻辑无需修改。
- 回滚时可恢复 `.gitignore` 忽略规则,并从 Git 历史中移除或停止跟踪默认数据;但历史大文件仍会存在于旧提交中。
- 若 Gitea push 因大小限制失败,应保留本地 commit 并记录失败原因,再考虑 Git LFS、压缩包发布或对象存储。
## 预计文件变更
- 修改 `.gitignore`
- 新增 `.gitattributes`
- 新增 300 个 DICOM 文件。
- 新增 9 个 STL 文件。
- 新增本次工程分析三份文档。
- 追加 `工程分析/经验记录.md`
## 提交与部署策略
- commit message 包含 `2026-05-20-11-51-05` 和“默认医学数据入库”描述。
- 推送默认远端 `origin/main`
- 软著相关目录 `新撰写软著文档/` 不暂存、不提交。
- 部署优先使用 `tmux` 会话 `revoxelseg-dicom``npm run serve -- --host 0.0.0.0 --port 4000`