Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

brainprep.workflow.brainprep_longitudinal_sbm

brainprep.workflow.brainprep_longitudinal_sbm(t1_files, output_dir, keep_intermediate=False, **kwargs)[source]

Longitudinal SBM preprocessing.

Applies the longitudinal brain parcellation pre-processing described in [1]. This includes:

  1. the creation of a template for this subject.

  2. the parcellation refinements from the new generated template.

Parameters:
t1_fileslist[File]

Path to the t1 images.

output_dirDirectory

FreeSurfer working directory containing all the subjects.

keep_intermediatebool

If True, retains intermediate results (i.e., the workspace); useful for debugging. Default False.

**kwargsdict
entities: list[dict]

Dictionaries of parsed BIDS entities.

Returns:
Bunch

A dictionary-like object containing:

  • subject_dirs: list[Directory] - the FreeSurfer subject directories.

Raises:
ValueError

If the input T1w files are not BIDS-compliant.

Notes

This workflow assumes the T1w images are organized in BIDS.

References

Examples

>>> from brainprep.config import Config
>>> from brainprep.reporting import RSTReport
>>> from brainprep.workflow import brainprep_longitudinal_sbm
>>>
>>> with Config(dryrun=True, verbose=False):
...     report = RSTReport()
...     outputs = brainprep_longitudinal_sbm(
...         t1_files=[
...             "/tmp/dataset/rawdata/sub-01/ses-01/anat/"
...             "sub-01_ses-01_run-01_T1w.nii.gz",
...             "/tmp/dataset/rawdata/sub-01/ses-02/anat/"
...             "sub-01_ses-02_run-01_T1w.nii.gz",
...         ],
...         output_dir="/tmp/dataset/derivatives",
...     ) 
>>> outputs 
Bunch(
  subject_dirs: [PosixPath('...'), PosixPath('...')]
)

Examples using brainprep.workflow.brainprep_longitudinal_sbm

SBM

SBM