Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -65,13 +65,13 @@ def retrieve_idc_index_body_parts():
|
|
65 |
st.session_state.option = None
|
66 |
|
67 |
if 'idc_data' not in st.session_state:
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
case_list = []
|
75 |
st.session_state.idc_data = True
|
76 |
else:
|
77 |
case_list = glob.glob("model/asset/idc_samples/*nii/*.nii.gz")
|
@@ -157,8 +157,8 @@ file_ = open("idc_serieUID_selection.gif", "rb")
|
|
157 |
contents = file_.read()
|
158 |
data_url = base64.b64encode(contents).decode("utf-8")
|
159 |
file_.close()
|
160 |
-
|
161 |
-
st.write("What is left is to paste the copied SeriesInstanceUID into the filter by SeriesInstanceUID box.")
|
162 |
|
163 |
st.write("Below is an overview of the SegVol method and authors acknowledgement.")
|
164 |
st.image(Image.open('model/asset/overview back.png'), use_column_width=True)
|
@@ -189,7 +189,7 @@ if demo_type=="Select an IDC demo case from tcga_lihc collection":
|
|
189 |
placeholder="Select a demo case...",
|
190 |
on_change=reset_demo_case)
|
191 |
elif demo_type=="Filter by DICOM SeriesInstanceUID":
|
192 |
-
with st.form("Filter by DICOM
|
193 |
uploaded_serieUID = st.text_input("Enter a DICOM SeriesInstanceUID", value=None)
|
194 |
submitted = st.form_submit_button("Submit", on_click=clear_prompts)
|
195 |
if submitted:
|
|
|
65 |
st.session_state.option = None
|
66 |
|
67 |
if 'idc_data' not in st.session_state:
|
68 |
+
case_list = download_idc_data_serieUID(serieUID_lst=["1.3.6.1.4.1.14519.5.2.1.8421.4008.125612661111422710051062993644",
|
69 |
+
"1.3.6.1.4.1.14519.5.2.1.3344.4008.552105302448832783460360105045",
|
70 |
+
"1.3.6.1.4.1.14519.5.2.1.3344.4008.217290429362492484143666931850",
|
71 |
+
"1.3.6.1.4.1.14519.5.2.1.3344.4008.315023636447426194723399171147",
|
72 |
+
"1.3.6.1.4.1.14519.5.2.1.3344.4008.307374355712319704057189924161"],
|
73 |
+
output_folder="model/asset/idc_samples")
|
74 |
+
# case_list = []
|
75 |
st.session_state.idc_data = True
|
76 |
else:
|
77 |
case_list = glob.glob("model/asset/idc_samples/*nii/*.nii.gz")
|
|
|
157 |
contents = file_.read()
|
158 |
data_url = base64.b64encode(contents).decode("utf-8")
|
159 |
file_.close()
|
160 |
+
st.markdown(f'<img src="data:image/gif;base64,{data_url}>',unsafe_allow_html = True)
|
161 |
+
st.write("What is left is to paste the copied SeriesInstanceUID as showed above into the filter by DICOM SeriesInstanceUID box.")
|
162 |
|
163 |
st.write("Below is an overview of the SegVol method and authors acknowledgement.")
|
164 |
st.image(Image.open('model/asset/overview back.png'), use_column_width=True)
|
|
|
189 |
placeholder="Select a demo case...",
|
190 |
on_change=reset_demo_case)
|
191 |
elif demo_type=="Filter by DICOM SeriesInstanceUID":
|
192 |
+
with st.form("Filter by DICOM SeriesInstanceUID"):
|
193 |
uploaded_serieUID = st.text_input("Enter a DICOM SeriesInstanceUID", value=None)
|
194 |
submitted = st.form_submit_button("Submit", on_click=clear_prompts)
|
195 |
if submitted:
|