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.sulcirec.brainprep_sulcirec

brainprep.workflow.sulcirec.brainprep_sulcirec(t1_file, output_dir, keep_intermediate=False, **kwargs)[source]

Subject level sulci reconstruction.

Applies morphologist tool [1] for cortical sulci extraction and identification.

Parameters:
t1_fileFile

Path to the input T1w image file.

output_dirDirectory

Directory where the prep-processing related outputs will be saved (i.e., the root of your dataset).

keep_intermediatebool

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

**kwargsdict
entities: dict

Dictionary of parsed BIDS entities.

Returns:
Bunch

A dictionary-like object containing:

  • sulci_graphs_files : list[File] - Left and right hemispheres sulci.

  • qc_file : File - QC TSV file.

Raises:
ValueError

If the input T1w file is not BIDS-compliant.

Notes

This workflow assumes the T1w image is organized in BIDS.

References

Examples

>>> from brainprep.config import Config
>>> from brainprep.workflow import brainprep_sulcirec
>>>
>>> with Config(dryrun=True, verbose=False):
...     outputs = brainprep_sulcirec(
...         t1_file=(
...             "/tmp/dataset/rawdata/sub-01/ses-01/anat/"
...             "sub-01_ses-01_run-01_T1w.nii.gz"
...         ),
...         output_dir="/tmp/dataset/derivatives",
...     )
>>> outputs
Bunch(
    sulci_graphs_files=[PosixPath('...'), PosixPath('...')],
    qc_file=PosixPath('...')
)