Commit ·
ead1826
1
Parent(s): 7dc3471
mediastinal default
Browse files147 unmodified lines148149150151152153154147 unmodified lines30230330430530630730834 unmodified lines343344345346347348349147 unmodified linesst.session_state["bit_depth"] = bit_depthst.session_state["bit_depth_slider"] = bit_depthst.session_state["bit_depth_input"] = bit_depthst.session_state["window_preset"] = "Lung [-1350, 150]"st.session_state["window_low"] = float(default_low)st.session_state["window_high"] = float(default_high)st.session_state["window_slider"] = (float(default_low), float(default_high))147 unmodified linesst.markdown("## Input and Controls")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.")source_mode = st.radio("Input source", ["Built-in sample", "Upload a file"])control_note("Choose **Built-in sample** to explore prepared examples, or **Upload a file** to test your own grayscale, DICOM, or NIfTI data.")selected_builtin = Noneloaded = None34 unmodified linesst.info("Choose a built-in sample or upload a file to begin.")returnlung_low, lung_high = WINDOW_PRESETS["Lung [-1350, 150]"]try:preview_image = loaded.imagepreview_range_image = resize_for_display(preview_image)147 unmodified lines148149150151152153154147 unmodified lines30230330430530630730834 unmodified lines343344345346347348349147 unmodified linesst.session_state["bit_depth"] = bit_depthst.session_state["bit_depth_slider"] = bit_depthst.session_state["bit_depth_input"] = bit_depthst.session_state["window_preset"] = "Mediastinal [-160, 240]"st.session_state["window_low"] = float(default_low)st.session_state["window_high"] = float(default_high)st.session_state["window_slider"] = (float(default_low), float(default_high))147 unmodified linesst.markdown("## Input and Controls")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.")source_mode = st.radio("Input source", ["Built-in sample", "Upload a file"])control_note("Choose **Built-in sample** to explore prepared examples, or **Upload a file** to test your own grayscale, DICOM data.")selected_builtin = Noneloaded = None34 unmodified linesst.info("Choose a built-in sample or upload a file to begin.")returnlung_low, lung_high = WINDOW_PRESETS["Mediastinal [-160, 240]"]try:preview_image = loaded.imagepreview_range_image = resize_for_display(preview_image)
app.py+3-3