From 23074102d03b6036d8968a1d783a6df46a718d12 Mon Sep 17 00:00:00 2001 From: gurayerus Date: Sat, 7 Dec 2024 22:18:28 -0500 Subject: [PATCH] Add help --- src/viewer/pages/prep_sMRI_dicomtonifti.py | 36 +++++++++++++++++----- src/viewer/pages/workflow_sMRI_MLScores.py | 3 +- src/viewer/utils/utils_st.py | 8 ++--- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/viewer/pages/prep_sMRI_dicomtonifti.py b/src/viewer/pages/prep_sMRI_dicomtonifti.py index d65528f..66aade7 100644 --- a/src/viewer/pages/prep_sMRI_dicomtonifti.py +++ b/src/viewer/pages/prep_sMRI_dicomtonifti.py @@ -45,18 +45,24 @@ def panel_wdir() -> None: ) st.session_state.flags["dir_out"] = True - @st.dialog("Data organization") # type:ignore - def help_input_data(): + @st.dialog("Working Directory") # type:ignore + def help_working_dir(): st.markdown( """ - ### Working Directory: - This is a . + - A NiChart pipeline executes a series of steps, with input/output files organized in a predefined folder structure, the **"working directory"**. + + - Set an **"output path"** (desktop app only) and a **"dataset name"** to define the **working directory** for your analysis. You only need to set the working directory once. + + - The **dataset name** can be any identifier that describes your analysis or data; it does not need to match the input study or data folder name. + + - On the desktop app, you can initiate a NiChart pipeline by selecting the **working directory** from a previously completed task. + + - On the cloud app, the results are deleted in regular intervals, so they may not be available. """ ) - st.write('Example MUSE data file:') - if st.button('I need help 🤔'): - help_input_data() + if st.button('Get help 🤔', key='key_btn_working_dir'): + help_working_dir() def panel_indicoms() -> None: @@ -108,6 +114,22 @@ def panel_indicoms() -> None: icon=":material/thumb_up:", ) + @st.dialog("DICOM Data") # type:ignore + def help_in_dicoms(): + st.markdown( + """ + - Upload or select the input DICOM folder containing all DICOM files. Nested folders are supported. + + - On the desktop app, a symbolic link named **"Dicoms"** will be created in the **working directory**, pointing to your input DICOM folder. + + - On the cloud platform, you can directly drag and drop your DICOM files or folders and they will be uploaded to the **"Dicoms"** folder within the **working directory**. + + - On the cloud, **we strongly recommend** compressing your DICOM data into a single ZIP archive before uploading. The system will automatically extract the contents of the ZIP file into the **"Dicoms"** folder upon upload. + """ + ) + + if st.button('Get help 🤔', key='key_btn_help_in_dicoms'): + help_in_dicoms() def panel_detect() -> None: """ diff --git a/src/viewer/pages/workflow_sMRI_MLScores.py b/src/viewer/pages/workflow_sMRI_MLScores.py index 2b9ace9..e4cf4f6 100644 --- a/src/viewer/pages/workflow_sMRI_MLScores.py +++ b/src/viewer/pages/workflow_sMRI_MLScores.py @@ -156,8 +156,7 @@ def help_input_data(): st.write('Example demographic data file:') st.dataframe(df_demog) - - if st.button('I need help 🤔'): + if st.button('Get help 🤔'): help_input_data() # Panel for running MLScore diff --git a/src/viewer/utils/utils_st.py b/src/viewer/utils/utils_st.py index 648cff8..c76eee9 100644 --- a/src/viewer/utils/utils_st.py +++ b/src/viewer/utils/utils_st.py @@ -189,11 +189,11 @@ def util_panel_workingdir(app_type: str) -> None: # 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" + helpmsg = "Results will be saved to a dedicated folder at the output path.\n\nChoose the path by typing it into the text field or using the file browser to browse and select it" dir_out = user_input_foldername( "Select folder", "btn_sel_dir_out", - "Output folder", + "Output path", st.session_state.paths["file_search_dir"], st.session_state.paths["dir_out"], helpmsg, @@ -204,10 +204,10 @@ def util_panel_workingdir(app_type: str) -> None: # 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." + "Please provide a unique name for your data/analysis (example: MyStudy1).\n\n A dedicated folder with this name will be created to store all input and output data associated with the analysis." ) st.session_state.dset = user_input_textfield( - "Task Identifier", st.session_state.dset, helpmsg, False + "Dataset Name", st.session_state.dset, helpmsg, False ) # Create results folder