Preprocessing for pediatric (1–7 yo) MRI brain data
This preprocessing tool follows the BIDS standard and writes all outputs directly into your dataset’s derivatives/brainprep/ folder. It works with any BIDS-compliant dataset that provides an code/qc/raw/exclude.yaml file. The workflow runs in three steps and supports both cross-sectional and longitudinal datasets.
Pipeline (per T1w structural volumes):
SynthStrip → N4 → affine registration to template → SynthSeg → WhiteStripe intensity normalization.
Full usage + details (exclude rules, layouts, age filters, outputs) live in the documentation.
conda env create -f environment.yml
conda activate brainprepQuick check:
python brainprep.py --helpBuild a .txt list of absolute paths to the images you want to preprocess.
python create_input_txt.py /path/to/bids_root -l long --modality T1w -o to_preprocess.txtRun the pipeline and write outputs into derivatives/brainprep/.
python brainprep.py \
--inputs to_preprocess.txt \
--template /path/to/template.nii.gz \
--bids-root /path/to/bids_root \
--dataset mydataset_nameAggregate one or more datasets into a single CSV (paths + demographics + folds).
python create_dataset_csv.py \
--bids-roots /path/to/hc-calgary-preschool \
--layouts long \
--input-lists preprocess_hc-calgary-preschool.txt \
--age-units y \
--dest-path-for-images /scratch/$USER/training_inputs \
--out-csv dataset.csvbrainprep/
├── brainprep.py
├── create_input_txt.py
├── create_dataset_csv.py
├── environment.yml
Andjela Dimitrijevic
Publication coming soon...