HuggingKatze commited on
Commit
ead1826
·
1 Parent(s): 7dc3471

mediastinal default

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -148,7 +148,7 @@ def maybe_reset_controls(loaded_key: str, default_low: float, default_high: floa
148
  st.session_state["bit_depth"] = bit_depth
149
  st.session_state["bit_depth_slider"] = bit_depth
150
  st.session_state["bit_depth_input"] = bit_depth
151
- st.session_state["window_preset"] = "Lung [-1350, 150]"
152
  st.session_state["window_low"] = float(default_low)
153
  st.session_state["window_high"] = float(default_high)
154
  st.session_state["window_slider"] = (float(default_low), float(default_high))
@@ -302,7 +302,7 @@ def main() -> None:
302
  st.markdown("## Input and Controls")
303
  control_note("Use the controls below from top to bottom: choose an input, pick a slice if needed, then adjust quantization and CT window settings.")
304
  source_mode = st.radio("Input source", ["Built-in sample", "Upload a file"])
305
- control_note("Choose **Built-in sample** to explore prepared examples, or **Upload a file** to test your own grayscale, DICOM, or NIfTI data.")
306
 
307
  selected_builtin = None
308
  loaded = None
@@ -343,7 +343,7 @@ def main() -> None:
343
  st.info("Choose a built-in sample or upload a file to begin.")
344
  return
345
 
346
- lung_low, lung_high = WINDOW_PRESETS["Lung [-1350, 150]"]
347
  try:
348
  preview_image = loaded.image
349
  preview_range_image = resize_for_display(preview_image)
 
148
  st.session_state["bit_depth"] = bit_depth
149
  st.session_state["bit_depth_slider"] = bit_depth
150
  st.session_state["bit_depth_input"] = bit_depth
151
+ st.session_state["window_preset"] = "Mediastinal [-160, 240]"
152
  st.session_state["window_low"] = float(default_low)
153
  st.session_state["window_high"] = float(default_high)
154
  st.session_state["window_slider"] = (float(default_low), float(default_high))
 
302
  st.markdown("## Input and Controls")
303
  control_note("Use the controls below from top to bottom: choose an input, pick a slice if needed, then adjust quantization and CT window settings.")
304
  source_mode = st.radio("Input source", ["Built-in sample", "Upload a file"])
305
+ control_note("Choose **Built-in sample** to explore prepared examples, or **Upload a file** to test your own grayscale, DICOM data.")
306
 
307
  selected_builtin = None
308
  loaded = None
 
343
  st.info("Choose a built-in sample or upload a file to begin.")
344
  return
345
 
346
+ lung_low, lung_high = WINDOW_PRESETS["Mediastinal [-160, 240]"]
347
  try:
348
  preview_image = loaded.image
349
  preview_range_image = resize_for_display(preview_image)