freesurfer
knowledge.atlas.freesurfer
Functions
| 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
| output |
str |
If “label”, return a mapping id → label. If “index”, return a mapping label → id. Defaults to “label”. |
'label' |
Returns
| 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
| idx |
int | list[int] |
One index or a list of indices. |
required |
Returns
|
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
| label |
str | list[str] |
One label or a list of labels. |
required |
Returns
|
Union[int, List[int]] |
int | list[int]: The corresponding index/indices. |