qsirecon
tit.pre.qsi.qsirecon ¶
QSIRecon runner for TI-Toolbox.
This module provides functions to run QSIRecon as a sibling Docker container using the Docker-out-of-Docker (DooD) pattern.
run_qsirecon ¶
run_qsirecon(project_dir: str, subject_id: str, *, logger: Logger, recon_specs: list[str] | None = None, atlases: list[str] | None = None, use_gpu: bool = False, cpus: int | None = None, memory_gb: int | None = None, omp_threads: int = QSI_DEFAULT_OMP_THREADS, image_tag: str = QSI_QSIRECON_IMAGE_TAG, skip_odf_reports: bool = True, runner: CommandRunner | None = None) -> None
Run QSIRecon reconstruction for a subject's preprocessed DWI data.
This function spawns QSIRecon Docker containers as siblings to the current SimNIBS container using Docker-out-of-Docker (DooD).
QSIRecon is optional: it adds tractography, scalar maps and connectivity on top of QSIPrep output. The SimNIBS DTI tensor does not need it. Multiple reconstruction specs can be run sequentially.
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.
recon_specs : list[str] | None, optional
List of reconstruction specifications to run. Default: ['dsi_studio_gqi']
(GQI scalar maps, no tractography). Other specs (mrtrix_, dipy_,
amico_noddi, pyafq_*, etc.) remain available.
atlases : list[str] | None, optional
List of atlases for connectivity analysis. Default: None (no
connectivity). Needs a QSIPrep run with MNI normalization enabled.
use_gpu : bool, optional
Enable GPU acceleration. Default: False.
cpus : int | None, optional
Number of CPUs to allocate. None = inherit from current container.
memory_gb : int | None, optional
Memory limit in GB. None = inherit from current container.
omp_threads : int, optional
Threads per process. Default: constants.QSI_DEFAULT_OMP_THREADS
(min(cpu_count - 1, 8), matching QSIPrep's own default).
image_tag : str, optional
QSIRecon Docker image tag. Default from constants.QSI_QSIRECON_IMAGE_TAG.
skip_odf_reports : bool, optional
Skip ODF report generation. Default: True.
runner : CommandRunner | None, optional
Command runner for subprocess execution.
Raises¶
PreprocessError If QSIRecon fails or prerequisites are not met.
Source code in tit/pre/qsi/qsirecon.py
27 28 29 30 31 32 33 34 35 36 37 38 39 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 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | |
list_available_recon_specs ¶
Return list of available QSIRecon reconstruction specifications.
Returns¶
list[str] List of available recon spec names.