SynthSeg Workflow#
Standalone FreeSurfer SynthSeg brain segmentation workflow.
thesis.workflows.synthseg#
SynthSeg brain segmentation workflow.
thesis.workflows.synthseg.workflow#
SynthSeg brain segmentation workflow.
Builds a standalone Nipype workflow that runs FreeSurfer’s mri_synthseg
on a T1-weighted image. The workflow can be executed on its own or embedded
inside a larger meta-workflow via Nipype’s nested-workflow mechanism.
- thesis.workflows.synthseg.workflow.resolve_t1_for_synthseg(config, context)[source]#
Resolve the T1 image path for the SynthSeg workflow.
Kept as a thin shim so the composite
tract_synthsegmeta-workflow and external preflight checks can still resolve the path without instantiating aPatientFile.- Parameters:
config (
PipelineConfig)context (
ProcessingContext)
- Return type:
- thesis.workflows.synthseg.workflow.build_workflow(*, t1, seg_dir, config, context)[source]#
Build a Nipype workflow that segments a T1w image with SynthSeg.
The workflow contains a single node (
synthseg) wrappingmri_synthseg. Outputs land in{output_dir}/segmentation/synthseg/{patient_id}_synthseg.nii.gz.- Parameters:
t1 (
Path|None) – Resolved T1-weighted image path (declared via@requires).seg_dir (
Path) – Resolved segmentation output directory.config (
PipelineConfig) – PipelineConfig (may include an optionalsynthsegsection).context (
ProcessingContext) – ProcessingContext carryingpatient_id.
- Return type:
Workflow- Returns:
Nipype Workflow ready to run or embed in a meta-workflow.