generate videos from selected z-axis sequences

This commit is contained in:
2026-05-03 02:59:00 +08:00
parent 5ba2d48fdb
commit f568faf6ed
3 changed files with 43 additions and 83 deletions

View File

@@ -865,13 +865,14 @@ class Handler(BaseHTTPRequestHandler):
max_angle = float(body.get("maxAngle", 20))
duration = float(body.get("durationSeconds", 6))
show_arrow = bool(body.get("showArrow", True))
source_label = body.get("sourceLabel", "DICOM")
def worker(job_id):
job_root = RESULT_DIR / job_id
reset_dir(job_root)
output_file = job_root / f"head_extension_{job_id}.mp4"
set_job(job_id, message="正在生成 0° 到目标角度的视频。")
output = generate_video(input_dir, output_file, max_angle, duration, show_arrow)
set_job(job_id, message=f"正在生成 {source_label} 的 z 轴序列视频。")
output = generate_video(input_dir, output_file, max_angle, duration, show_arrow, source_label)
output = Path(output).resolve()
return {
"video": {