qsiprep
tit.pre.qsi.qsiprep ¶
QSIPrep runner for TI-Toolbox.
This module provides functions to run QSIPrep as a sibling Docker container using the Docker-out-of-Docker (DooD) pattern.
run_qsiprep ¶
run_qsiprep(project_dir: str, subject_id: str, *, logger: Logger, output_resolution: float = QSI_DEFAULT_OUTPUT_RESOLUTION, cpus: int | None = None, memory_gb: int | None = None, omp_threads: int = QSI_DEFAULT_OMP_THREADS, image_tag: str = QSI_QSIPREP_IMAGE_TAG, skip_bids_validation: bool = True, denoise_method: str = 'dwidenoise', unringing_method: str = 'mrdegibbs', runner: CommandRunner | None = None) -> None
Run QSIPrep preprocessing for a subject's DWI data.
This function spawns a QSIPrep Docker container as a sibling to the current SimNIBS container using Docker-out-of-Docker (DooD).
Parameters¶
project_dir : str
Path to the BIDS project root directory.
subject_id : str
Subject identifier (without 'sub-' prefix).
logger : logging.Logger
Logger for status messages.
output_resolution : float, optional
Target output resolution in mm. Default: 2.0.
cpus : int, optional
Number of CPUs to allocate. Default: 8.
memory_gb : int, optional
Memory limit in GB. Default: 32.
omp_threads : int, optional
Number of OpenMP threads. Default: 1.
image_tag : str, optional
QSIPrep Docker image tag. Default from constants.QSI_QSIPREP_IMAGE_TAG.
skip_bids_validation : bool, optional
Skip BIDS validation. Default: True.
denoise_method : str, optional
Denoising method. Default: 'dwidenoise'.
unringing_method : str, optional
Unringing method. Default: 'mrdegibbs'.
runner : CommandRunner | None, optional
Command runner for subprocess execution.
Raises¶
PreprocessError If QSIPrep fails or prerequisites are not met.
Source code in tit/pre/qsi/qsiprep.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |