Localize image target selector labels

This commit is contained in:
admin
2026-06-03 09:53:32 +08:00
parent a1e1d71f66
commit af062e1c6c

18
app.py
View File

@@ -461,19 +461,19 @@ def main() -> None:
tab_views, tab_overlay, tab_ddf, tab_metrics = st.tabs(["正交三视图", "重叠对比", "形变场", "量化图"]) tab_views, tab_overlay, tab_ddf, tab_metrics = st.tabs(["正交三视图", "重叠对比", "形变场", "量化图"])
with tab_views: with tab_views:
view_target = st.radio("显示对象", ["Fixed", "Moving", "Warped"], horizontal=True) view_target = st.radio("显示对象", ["固定图像", "移动图像", "配准后图像"], horizontal=True)
if view_target == "Fixed": if view_target == "固定图像":
render_three_views(fixed_xyz, "Fixed Image") render_three_views(fixed_xyz, "固定图像")
elif view_target == "Moving": elif view_target == "移动图像":
render_three_views(moving_xyz, "Moving Image") render_three_views(moving_xyz, "移动图像")
elif warped_xyz is not None: elif warped_xyz is not None:
render_three_views(warped_xyz, "Warped Image") render_three_views(warped_xyz, "配准后图像")
else: else:
st.warning("尚未生成 Warped Image") st.warning("尚未生成配准后图像")
with tab_overlay: with tab_overlay:
if warped_xyz is None: if warped_xyz is None:
st.warning("尚未生成 Warped Image") st.warning("尚未生成配准后图像")
else: else:
render_overlay_views(fixed_xyz, warped_xyz) render_overlay_views(fixed_xyz, warped_xyz)
@@ -485,7 +485,7 @@ def main() -> None:
with tab_metrics: with tab_metrics:
if warped_xyz is None: if warped_xyz is None:
st.warning("尚未生成 Warped Image") st.warning("尚未生成配准后图像")
else: else:
render_metric_charts(fixed_xyz, moving_xyz, warped_xyz, ddf_xyz) render_metric_charts(fixed_xyz, moving_xyz, warped_xyz, ddf_xyz)
metrics_file = Path(metrics_path) metrics_file = Path(metrics_path)