Commit ·
ead1826
1
Parent(s): 7dc3471
mediastinal default
Browse files147 unmodified lines148149150151151152153154147 unmodified lines30230330430530530630730834 unmodified lines343344345346346347348349147 unmodified lines st.session_state["bit_depth"] = bit_depth st.session_state["bit_depth_slider"] = bit_depth st.session_state["bit_depth_input"] = bit_depth st.session_state["window_preset"] = "Lung [-1350, 150]" st.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 lines st.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.") control_note("Choose **Built-in sample** to explore prepared examples, or **Upload a file** to test your own grayscale, DICOM data.")
selected_builtin = None loaded = None34 unmodified lines st.info("Choose a built-in sample or upload a file to begin.") return
lung_low, lung_high = WINDOW_PRESETS["Lung [-1350, 150]"] lung_low, lung_high = WINDOW_PRESETS["Mediastinal [-160, 240]"] try: preview_image = loaded.image preview_range_image = resize_for_display(preview_image)app.py+3-3