resomapper.cli

Functions

cli_prepare()

Comand Line Interface of resomapper.

cli_process(acqs_to_process, output_path)

Manage the interactive processing of acquisition data for a study.

cli_select_input_format()

Prompt the user to select the input data format for processing.

cli_select_masking_mode(study_dir)

Prompt the user to select a masking mode for a study.

cli_select_mt_runs(mton_filename_list, mtoff_filename_list)

run_cli()

Runs the CLI of resomapper, catching keyboard interruption to exit the program

Module Contents

resomapper.cli.cli_prepare()

Comand Line Interface of resomapper.

  1. Select root directory where studies are stored.

  2. Convert studies to nifti and organize them.

  3. Select of modalities to be processed.

  4. Process selected studies and save results.

resomapper.cli.cli_process(acqs_to_process, output_path)

Manage the interactive processing of acquisition data for a study.

This function facilitates the step-by-step processing of various modalities for each study in the provided acquisition list. It handles directory creation, file copying, and user interactions for selecting processing options.

Parameters:
  • acqs_to_process (dict) – A dictionary where keys are study identifiers and values are lists of modalities to process.

  • output_path (str) – The directory path where processed data and derivatives will be saved.

resomapper.cli.cli_select_input_format()

Prompt the user to select the input data format for processing.

Returns:

The selected input data format as specified by the user.

Return type:

str

resomapper.cli.cli_select_masking_mode(study_dir)

Prompt the user to select a masking mode for a study.

This function presents the user with options for providing a mask, including manual drawing, selecting an existing mask, or processing the image without a mask. It also checks for any previously created masks in the specified study directory and offers the option to reuse the most recent mask if available.

Parameters:

study_dir (str) – The directory containing the study data and potential mask files.

Returns:

A tuple containing the selected masking mode and the path to the most recent mask, if available.

Return type:

tuple

resomapper.cli.cli_select_mt_runs(mton_filename_list, mtoff_filename_list)
resomapper.cli.run_cli()

Runs the CLI of resomapper, catching keyboard interruption to exit the program or any other errors during execution.