atlas — cohort atlas generation#

Schema: AtlasConfig in src/thesis/core/config/validators.py. Drives the cohort-level atlas workflow.

Field

Type

Default

Constraints

Description

presence_value

float

0.10

0.0 x 1.0

Threshold used for the prob_threshold calculation. A voxel is counted as “present” when its normalised value exceeds this threshold.

cov_mean_threshold_pct

float

0.01

0.0 x 1.0

Global atlas-mean-map percentage used to suppress low-signal voxels when computing CoV. CV is only computed where the mean exceeds cov_mean_threshold_pct × max(atlas_mean).

normalization_method

NormalizationMethod

waytotal

one of waytotal / streamline_density / max / softmax

Method for normalising streamline density volumes before aggregation. The default YAML value is the lowercase string waytotal (enum NormalizationMethod.WAYTOTAL). See below.

tractography_relpath

str

"tractography/probtrackx2"

Relative path under each patient directory where per-patient tractography output lives. The workflow expects <patient>/<tractography_relpath>/<run>/warped_streamlines/fdt_paths.nii.gz (+ waytotal). Override to tractography/mrtrix3 for the MRtrix3 backend.

output_subdir

str

"atlas"

Subdirectory under the cohort output directory where the statistical atlas (atlas_mean.nii.gz et al.) is written. Override per backend (e.g. atlas_mrtrix3) when running probtrackx2 and mrtrix3 into the same outputs/ tree to avoid clobbering.

normalization_method values#

Value

Description

waytotal

FSL ProbTrackX2 — divide by total streamline count (waytotal). Produces fraction-of-total per voxel.

streamline_density

MRtrix3 counterpart of waytotal. Divides by the value in waytotal, which the MRtrix3 workflow writes as the sum of SIFT2 per-streamline weights (when SIFT2 is enabled, matching the SIFT2-weighted TDI numerator) or the raw streamline count when SIFT2 is off.

max

Divide by the maximum voxel value in the volume. Scales to [0, 1].

softmax

Apply softmax (exp(x) / sum(exp(x))). Produces a probability distribution summing to 1.0 over the volume.

Example#

atlas:
  presence_value: 0.10
  cov_mean_threshold_pct: 0.01
  normalization_method: waytotal
  tractography_relpath: tractography/probtrackx2

For MRtrix3:

atlas:
  normalization_method: streamline_density
  tractography_relpath: tractography/mrtrix3

Notes#

  • The atlas workflow is cohort-level — -p/--patient-id and --all are ignored. The workflow scans the configured output base for per-subject outputs.

  • Atlas computation uses pure NumPy. The atlas.dask block has been removed entirely.

  • For atlas QC outputs (occupancy, cohort core, CV), see atlas_qc.