hcp — HCP-preprocessed inputs#

Schema: HCPConfig in src/thesis/core/config/validators.py. Describes the on-disk layout of an HCP-style subject directory.

Field

Type

Default

Description

diffusion_dir

str

"T1w/Diffusion"

Diffusion subdirectory relative to the subject’s input_dir. Houses data.nii.gz, bvals, bvecs, nodif_brain_mask.nii*.

bedpostx_dir

str

"T1w/Diffusion.bedpostX"

BedpostX output subdirectory. Houses merged_*samples.nii.gz, mean_* outputs, etc.

t1_image

str

"T1w/T1w_acpc_dc_restore_1.25.nii"

T1 image path relative to input_dir. Also used as the SynthSeg input and as a registration fallback.

t2_image

str | None

None

Optional T2 image path relative to input_dir. Needed when registration.moving_modality: t2.

n_fibers

int

3

Number of fibres modelled in BedpostX. Used to construct sample-file names.

mask_name

str

"nodif_brain_mask.nii"

Brain-mask filename inside diffusion_dir.

mask_path

str | None

None

Full brain-mask path relative to input_dir. Overrides diffusion_dir / mask_name when set.

Example#

hcp:
  diffusion_dir: T1w/Diffusion
  bedpostx_dir: T1w/Diffusion.bedpostX
  t1_image: T1w/T1w_acpc_dc_restore_1.25.nii.gz
  t2_image: null
  n_fibers: 3
  mask_name: nodif_brain_mask.nii.gz
  mask_path: null   # falls back to diffusion_dir/mask_name

Notes#

  • The hcp workflow tolerates either .nii or .nii.gz for mask_name; the helper picks whichever exists. The same tolerance applies to t1_image — the documented default ends in .nii, but the loader resolves whichever of .nii/.nii.gz is present on disk (hence the example below uses the .nii.gz form).

  • For non-HCP-preprocessed data, run thesis run -w preprocess -p <patient> -c preprocess first to produce the expected layout under data/processed/<patient>/T1w/.

  • The tract_synthseg workflow (ProbTrackX2 backend) consumes hcp.t1_image for the SynthSeg step.