Skip to content

Commit

Permalink
Edit help dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
gurayerus committed Dec 7, 2024
1 parent 22cd663 commit 12b41d0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
22 changes: 11 additions & 11 deletions src/viewer/pages/prep_sMRI_dicomtonifti.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ def panel_wdir() -> None:
)
st.session_state.flags["dir_out"] = True

def help_input_data():
st.markdown(
"""
### Working Directory:
This is a .
"""
)
st.write('Example MUSE data file:')
st.dataframe(df_muse)
@st.dialog("Data organization") # type:ignore
def help_input_data():
st.markdown(
"""
### Working Directory:
This is a .
"""
)
st.write('Example MUSE data file:')

if st.button('I need help 🤔'):
help_input_data()
if st.button('I need help 🤔'):
help_input_data()


def panel_indicoms() -> None:
Expand Down
17 changes: 9 additions & 8 deletions src/viewer/utils/utils_st.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,7 @@ def util_panel_workingdir(app_type: str) -> None:
"""
curr_dir = st.session_state.paths["dset"]

# Read dataset name (used to create a folder where all results will be saved)
helpmsg = (
"Please provide a unique identifier for your experiment.\n\n A dedicated folder with this name will be created to store all input and output data associated with the analysis.\n\n The identifier can be any descriptive label; it doesn't need to match the input study or dataset name.\n\n Switch between experiments to run different pipelines or analyze new datasets."
)
st.session_state.dset = user_input_textfield(
"Experiment Identifier", st.session_state.dset, helpmsg, False
)

# Read output folder
if app_type == "desktop":
# Read output folder from the user
helpmsg = "Results will be saved to the output folder.\n\nChoose the path by typing it into the text field or using the file browser to browse and select it"
Expand All @@ -209,6 +202,14 @@ def util_panel_workingdir(app_type: str) -> None:
if dir_out != "":
st.session_state.paths["dir_out"] = dir_out

# Read dataset name (used to create a folder where all results will be saved)
helpmsg = (
"Please provide a name for your task.\n\n A dedicated folder with this name will be created to store all input and output data associated with the analysis.\n\n The identifier can be any descriptive label; it doesn't need to match the input study or dataset name.\n\n Switch between tasks to run different pipelines or analyze new datasets."
)
st.session_state.dset = user_input_textfield(
"Task Identifier", st.session_state.dset, helpmsg, False
)

# Create results folder
if st.session_state.dset != "" and st.session_state.paths["dir_out"] != "":
st.session_state.paths["dset"] = os.path.join(
Expand Down

0 comments on commit 12b41d0

Please sign in to comment.