freesurfer

knowledge.atlas.freesurfer

Functions

Name Description
fs_mapper Create a mapping between FreeSurfer indices and labels.
idx2label Convert one or many FreeSurfer indices to labels.
label2idx Convert one or many FreeSurfer labels to indices.

fs_mapper

knowledge.atlas.freesurfer.fs_mapper(output='label')

Create a mapping between FreeSurfer indices and labels.

Parameters

Name Type Description Default
output str If “label”, return a mapping id → label. If “index”, return a mapping label → id. Defaults to “label”. 'label'

Returns

Name Type Description
dict Dict[Union[int, str], Union[int, str]] Mapping between indices and labels according to the selected output mode.

idx2label

knowledge.atlas.freesurfer.idx2label(idx)

Convert one or many FreeSurfer indices to labels.

Parameters

Name Type Description Default
idx int | list[int] One index or a list of indices. required

Returns

Name Type Description
Union[str, List[str]] str | list[str]: The corresponding label(s).

label2idx

knowledge.atlas.freesurfer.label2idx(label)

Convert one or many FreeSurfer labels to indices.

Parameters

Name Type Description Default
label str | list[str] One label or a list of labels. required

Returns

Name Type Description
Union[int, List[int]] int | list[int]: The corresponding index/indices.