recon_all
tit.pre.recon_all ¶
FreeSurfer recon-all wrapper for cortical surface reconstruction.
This module provides a wrapper around FreeSurfer's recon-all command
for automated cortical reconstruction and segmentation, as well as
standalone subcortical segmentation (thalamic nuclei and hippocampal
subfields).
Public API¶
run_recon_all
Run FreeSurfer recon-all for a subject.
run_subcortical_segmentations
Run thalamic-nuclei and hippocampal-subfield segmentations standalone.
See Also¶
tit.pre.charm : SimNIBS CHARM head-mesh generation. tit.pre.structural.run_pipeline : Full preprocessing pipeline.
run_subcortical_segmentations ¶
run_subcortical_segmentations(project_dir: str, subject_id: str, *, logger, runner: CommandRunner | None = None) -> None
Run thalamic-nuclei and hippocampal-subfield segmentations standalone.
Resolves the FreeSurfer subjects directory from the project layout and
delegates to the internal segmentation runner. Intended for cases where
recon-all has already completed and only the subcortical step needs
to be (re-)run.
Parameters¶
project_dir : str
BIDS project root.
subject_id : str
Subject identifier without the sub- prefix.
logger : logging.Logger
Logger for progress output.
runner : CommandRunner or None, optional
Subprocess runner for streaming output.
See Also¶
run_recon_all : Full FreeSurfer recon-all (includes subcortical).
run_pipeline : Full preprocessing pipeline.
Source code in tit/pre/recon_all.py
run_recon_all ¶
run_recon_all(project_dir: str, subject_id: str, *, logger, parallel: bool = False, runner: CommandRunner | None = None) -> None
Run FreeSurfer recon-all for a subject.
Runs the full recon-all -all pipeline and, upon success,
automatically runs thalamic-nuclei and hippocampal-subfield
segmentations.
Parameters¶
project_dir : str
BIDS project root.
subject_id : str
Subject identifier without the sub- prefix.
logger : logging.Logger
Logger used for progress and command output.
parallel : bool, optional
Use FreeSurfer OpenMP parallelization.
runner : CommandRunner or None, optional
Subprocess runner used to stream output.
Raises¶
PreprocessError
If no T1 file is found, the output directory already exists, or
recon-all exits with a non-zero code.
See Also¶
run_subcortical_segmentations : Standalone subcortical segmentation. run_charm : SimNIBS CHARM head-mesh generation.
Source code in tit/pre/recon_all.py
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 | |